| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
Author: Sean Chang Peter Ryser XAPP542 (v1.0) Sept. 2004 Sum
Top Searches for this datasheetGetting Started with U-Boot ML300 Author: Sean Chang Peter Ryser XAPP542 (v1.0) Sept. 2004 Summary This application note covers steps necessary open source firmware, Universal Bootloader (U-Boot), boot Linux embedded PowerPC405 (PPC405) processor available Virtex-II ProML300 Evaluation Platforms. Introduction U-Boot universal bootloader that easily extensible accommodate various embedded devices based popular architectures. Being open source project, received contributions from developers over world. strengths U-Boot flexibility users boot their systems from various sources such Ethernet Trivial File Transfer Protocol (TFTP), flash memory, serial port. ML300 port U-Boot includes Embedded Development (EDK) Microprocessor Library Definition (MLD) format that automatically generate libraries matching hardware project. This application note offers concrete steps U-Boot running PPC405 processor embedded VirtexII FPGA that featured ML300 board. exercises this application note prepared standard workstation running Linux. workstation development tools that came with ML300 development board package installed. Also installed MontaVista Linux Preview ML300. This application note assumes knowledge covered application note XAPP765, Getting Started with MontaVista Linux. first section shows steps necessary U-Boot running ML300 development board. next section discusses stand-alone applications provides ready demonstrations. third section demonstrates some useful U-Boot commands ML300. Finally, section covers additional features relating U-Boot that might useful. Table lists tools files required started. Table Required Tools Item Workstation ML300 board Files associated with application note CompactFlash adapter writer Parallel Cable download cable Details Standard system running Linux with compiler. http://www.xilinx.com/ml300. PCs, CompactFlash writer. Most these writers USB-based. laptops, card adapter that ships with ML300. Shipped with ML300 board. 2004 Xilinx, Inc. rights reserved. Xilinx trademarks, registered trademarks, patents, further disclaimers listed other trademarks registered trademarks property their respective owners. specifications subject change without notice. NOTICE DISCLAIMER: Xilinx providing this design, code, information is." providing design, code, information possible implementation this feature, application, standard, Xilinx makes representation that this implementation free from claims infringement. responsible obtaining rights require your implementation. Xilinx expressly disclaims warranty whatsoever with respect adequacy implementation, including limited warranties representations that this implementation free from claims infringement implied warranties merchantability fitness particular purpose. XAPP542 (v1.0) Sept. 2004 www.xilinx.com Getting U-Boot Running Table Required Tools (Continued) Item development tools MontaVista Linux Preview ML300 Details Shipped with ML300 board. Fill form access MontaVista Linux Professional Edition Platform field, select Xilinx Virtex-II ML300. e-mail with access page containing README image files will sent. Burn image source image needed. Getting U-Boot Running exercises this section demonstrate quick U-Boot running ML300 development board. Downloading Building ML300 Reference Design This section shows build reference design ML300. Extract ML300 reference design from ml300_edk3.zip file reference design file ML300 located xapp542.zip package. Save "ml300_edk3.zip" $HOME/xilinx/ unzip file. $HOME/xilinx unzip ml300_edk3.zip Build hardware bitstream doing following: system_linux.xmp XPS% init_bram generated hardware bitstream located here: This will used "Generating File," page generate file. pre-generated bitstream, download.bit, available within xapp542.zip package. Downloading Compiling Source Code U-Boot This section provides instructions downloading compiling source code U-Boot. compressed source code file U-Boot found within xapp542.zip package. Save "u-boot.tar.bz2" $HOME/xilinx uncompress file. $HOME/xilinx bunzip2 u-boot.tar.bz2 u-boot.tar Compile source code U-Boot using "ppc_405-" tools from MontaVista. Please refer XAPP765, Getting Started with MontaVista Linux, instructions install MontaVista Linux Preview ML300 include MontaVista tools search path. $HOME/xilinx/u-boot-1.1.1 export CROSS_COMPILE=ppc_405make distclean make ml300_config make executable file located here: www.xilinx.com XAPP542 (v1.0) Sept. 2004 Getting U-Boot Running pre-compiled U-Boot executable file, uboot.elf, available within xapp542.zip package. Generating File This section shows generate file from hardware bitstream file U-Boot generated from previous exercises. Generate file using bitstream file U-Boot. -tcl genace.tcl -jprog -board ml300 implementation/download.bit -elf ././u-boot-1.1.1/u-boot -ace uboot.ace pre-generated file, uboot.ace, available within xapp542.zip package. Save uboot.ace file Microdrive that ships with ML300 development board under XILINX/myace directory. Building U-Boot Compatible Linux Kernel Copy Linux from project Linux kernel. Assuming source kernel from MontaVista Linux Preview copied $HOME/linux-2.4.20_mvl31/ directory, following shows copy Linux from project Linux kernel: $HOME/linux-2.4.20_mvl31/ gtar gtar Apply ml300.uboot.patch. Before configuring Linux kernel, apply ml300.uboot.patch file, available within xapp542.zip package, source kernel. This patch makes board structure compatible with U-Boot. $HOME/linux-2.4.20_mvl31/ patch $HOME/ml300.uboot.patch Configure Linux kernel. Follow steps "Building MontaVista Linux Kernel ML300" section XAPP765. Note that normal build targets like "zImage" "bzImage" used U-Boot. MontaVista Linux Preview ML300 supports build target called "uImage" that build image files usable U-Boot. pre-compiled Linux image file, uboot.uImage, built with "make uImage" available download within xapp542.zip package. Create "linux" directory Microdrive. Create directory called "linux" partition Microdrive store uboot.uImage file there. U-Boot load this image file on-board system memory space during boot start Linux. XAPP542 (v1.0) Sept. 2004 www.xilinx.com Getting U-Boot Running Starting U-Boot ML300 This section illustrates steps necessary enable U-Boot start Linux automatically upon board power Connect serial cable from ML300 host workstation. Open terminal window connect port with following settings: 9600 baud, data bits, parity, stop bit, hardware flow control. This standard UBoot. System dial power board. System ACECF automatically loads bitstream starts U-Boot from file. When U-Boot starts, waits seconds before going through auto-boot process. pressed within 3-second period, then U-Boot does through autoboot process waits users enter commands. Since this first time U-Boot booted ML300 board, please press <Enter> before 3-second period stop U-Boot from going into auto-boot process. size persistent environment information U-Boot default. stored inter-integrated circuit (IIC) EEPROM available ML300 board starting address location 0xC00. Because environment stored this section EEPROM initially, output terminal window from U-Boot shows warning message relating environment CRC, which normal this point. Another warning relating board specific parameters might also shown board specific parameters section (0x400 0x7FF) EEPROM corrupted. Under normal cases, only environment warning shows first time U-Boot starts. output something similar following: U-Boot 1.1.1 (Jul 2004 12:47:21) assuming ML300 DRAM: Warning CRC, using default environment Out: Err: serial serial serial Warning board specific parameters error stop autoboot: resolve environment warning, desired environment variables save environment information back EEPROM using saveenv command. First, display default environment information used U-Boot using printenv command. Then, appropriate environment variables have U-Boot launch Linux default then save environment back EEPROM. When asked UBoot whether overwrite board specific area, press board warning shown step above, otherwise press corrupted board specific parameters section EEPROM. Shown below command exchange from terminal with user commands shown bold: printenv bootargs=console=ttyS0,9600 ip=off root=/dev/xsysace/disc0/part3 bootcmd=bootp bootdelay=3 baudrate=9600 loads_echo=1 www.xilinx.com XAPP542 (v1.0) Sept. 2004 Getting U-Boot Running stdin=serial stdout=serial stderr=serial ethaddr=00.0a.35.00.22.01 setenv bootargs console=ttyS0,9600 ip=off root=/dev/xsysace/disc0/part3 setenv bootfile linux/uboot.uImage setenv bootcmd fatload 400000 \${bootfile}\;bootm 400000 saveenv Saving Environment EEPROM. Only address value will written, want U-Boot update your board specific area with only these parameters? <y/n> printenv bootdelay=3 baudrate=9600 loads_echo=1 stdin=serial stdout=serial stderr=serial ethaddr=00.0a.35.00.22.01 bootargs=console=ttyS0,9600 ip=off root=/dev/xsysace/disc0/part3 bootfile=linux/uboot.uImage bootcmd=fatload 400000 ${bootfile};bootm 400000 that environment information set, press System reset again. This time, warning message does appear. press U-Boot continue with auto-boot process. When Linux login prompt shows means UBoot successfully booted Linux. "linux" login name "ml300" password. Below output from terminal window (the bold lines explained next): U-Boot 1.1.1 (Aug 2004 10:59:48) assuming ML300 DRAM: Out: Err: serial serial serial stop autoboot: reading linux/uboot.uImage 590893 bytes read Booting image 00400000 Image Name: Image Type: Data Size: Linux-2.4.20_mvl31-ml300 PowerPC Linux Kernel Image (gzip compressed) 641348 Bytes 626.3 Load Address: 00000000 Entry Point: 00000000 XAPP542 (v1.0) Sept. 2004 www.xilinx.com Getting U-Boot Running Verifying Checksum Uncompressing Kernel Image Linux version 2.4.20_mvl31-ml300. Xilinx Virtex-II port node totalpages: 32768 zone(0): 32768 pages. zone(1): pages. zone(2): pages. Kernel command line: console=ttyS0,9600 ip=off root=/dev/xsysace Starting internet superserver: inetd. Hostname: ml300. Starting MontaVista Linux 2.1, Professional Edition ml300 login: linux password: ml300 Here brief explanation whole process when ML300 powers With System dial System uses configuration file located XILINX/myace directory Microdrive partition configure board. bitstream file used configure FPGA load executable file U-Boot memory start U-Boot ML300 board. When U-Boot starts, looks environment information EEPROM loads that into on-board system memory uses guide itself through rest booting sequence. Based environment settings used step above, U-Boot reads Linux image file stores address location 0x400000. From above U-Boot output snippet, this shown when U-Boot outputs line: reading linux/uboot.uImage U-Boot performs check verification Linux image file make sure that corrupted uncompresses image file necessary. This shown when UBoot outputs line: Booting image 00400000 Finally, U-Boot transfers control Linux. This shown when U-Boot outputs line: Linux version 2.4.20_mvl31-ml300 www.xilinx.com XAPP542 (v1.0) Sept. 2004 Running Stand-Alone Applications Running Stand-Alone Applications interesting features U-Boot ability execute stand-alone applications. They used simple hardware diagnostic tools verify hardware board. These applications located directory. demos this section illustrate stand-alone applications access information from on-board sensors Real-Time-Clock (RTC). executable files both demonstrations included xapp542.zip package. executable file system monitor application called "system_monitor.bin" executable file application called "rtc_clock.bin". Store these files root directory partition Microdrive U-Boot load them from there into system memory. System Monitor Program This program, system_monitor.bin, designed load address 0x50000. Notice that there offset between starting point execution location executable. command starts program execution specified address location. Below command exchange from terminal window: fatload 50000 system_monitor.bin reading system_monitor.bin 3656 bytes read 50004 Starting application 0x00050004 Example expects version Actual U-Boot version CPU.U255 Power Monitor (1.8-5V) Reading. Measurement: Measurement: Measurement: Measurement: Temp Measurement: 1.771V 2.265V 4.765V 4.382V CPU.U256 Power Monitor (2.5-12V) Reading. Measurement: 2.460V Measurement: 12.062V 3.145V 4.765V Measurement: Measurement: Temp Measurement: PIO.U2 Power Monitor (1.8-5V) Reading. Measurement: Measurement: Measurement: Measurement: Temp Measurement: 1.781V 2.278V 4.765V 4.382V PIO.U4 Power Monitor (2.5-12V) Reading. Measurement: 2.460V XAPP542 (v1.0) Sept. 2004 www.xilinx.com Running Stand-Alone Applications Measurement: 12.000V 3.145V 4.765V Measurement: Measurement: Temp Measurement: On-Chip Temperature Sensor Reading. Ambient Temp: On-die Temp: Ambient Temperature Sensor Reading. Ambient Temperature: 32.3750C Application terminated, When stand-alone applications exit, U-Boot prints termination message, Application terminated, 0x0, shown above. program above shows information from system monitors temperature sensors ML300 board. Real-Time-Clock Program This program, "rtc_clock.bin", designed load address 0x40000. Below command exchange from terminal window: fatload 40000 rtc_clock.bin reading rtc_clock.bin 2432 bytes read 40004 Starting application 0x00040004 Example expects version Actual U-Boot version ***** Clock Reading: 08/26/2004 11:35:10 Thursday want modify current clock setting [y/n]? Application terminated, This program shows date information from that ML300 board. www.xilinx.com XAPP542 (v1.0) Sept. 2004 U-Boot Commands ML300 U-Boot Commands ML300 This section demonstrates U-Boot commands ML300 board; particular, commands that useful manipulating devices, System commands that useful retrieving CompactFlash Microdrive data. Commands Start checking which devices available. iprobe command probe available hardware. iprobe Valid chip addresses: Chip addresses represented include read write command bit. This means, example, EEPROM memory chip with chip address 0x50 will show 0xA0 write 0xA1 read. Table below shows complete listing device types their associated chip addresses. Please refer ML300 Users Guide details each device. Table Device Types Chip Addresses Device Type Monitor (1.8 Monitor (2.5 12V) Monitor (1.8 Monitor (2.5 12V) On-Chip Temperature Ambient Temperature EEPROM Audio Trimpot Brightness Trimpot EEPROM Clock Chip Address 0x14 0x15 0x16 0x17 0x18 0x4B 0x50 0x53 0x56 0x57 0x6F display what EEPROM, command display memory content. 400.2 0400: 0410: 0420: c00.2 0c00: 0c10: 0c20: 0c30: 0c40: 0c50: E=000a35002201.C =80. x.Tbootargs=con sole=ttyS0,9600 ip=off root=/dev /xsysace/disc0/p art3 rw.bootdela y=3.baudrate=960 Note: Address location 0xC00 default location where U-Boot stores environment values; 0x400 default location board specific information. XAPP542 (v1.0) Sept. 2004 www.xilinx.com U-Boot Commands ML300 Device 0x56 (chip address) brightness trimpot. change brightness setting ML300 board, command write single byte data location 0xf8. inm.b 000000f8: 000000f8: 000000f8: x(type non-hexadecimal char stop) brightness changes when value 0xf8 changed from 0x20 0xb0. value 0xff brightest 0x00 darkest. System Commands Information about partition Microdrive displayed using fatinfo command. fatinfo Partition Filesystem: FAT16 NAME show directory listing, fatls command. fatls xilinx.sys readme.txt xilinx/ vxworks/ pr_ace/ bmp/ uboot/ file(s), dir(s) fatls uboot 1396931 final.ace 567833 no_fat 590930 fat_ace8 590893 fat_ace16 592910 fat_ace16_nfs 1396931 final_16.ace 592955 fat_ace8_nfs file(s), dir(s) Command Reference U-Boot following tables offer quick reference useful commands along with examples usage. additional commands details, refer section 5.9, U-boot Command Line Interface, U-Boot guide Table Download Execution Related Commands Command bootm Description Boots application image from memory Usage: bootm [addr [arg Starts application address 'addr' Usage: <addr> [arg www.xilinx.com XAPP542 (v1.0) Sept. 2004 U-Boot Commands ML300 Table Download Execution Related Commands (Continued) Command bootp Description Boots image network using BOOTP gather network information first then TFTP protocol download "bootfile". Usage: bootp [loadAddress] [bootfilename] tftpboot Boots image network using TFTP protocol Usage: tftpboot [loadAddress] [bootfilename] Table Related Commands Command iprobe Description Probes discover active devices. Usage: iprobe Displays memory content. length address field specified with modifier. none specified, then default used. Usage: <i2c_chip> <addr>[.0|.1|.2] [count] Writes (fills) memory with byte value. Usage: <i2c_chip> <addr>[.0|.1|.2] <data> [count] Modifies memory with auto-increment address. Usage: imm[.b|.w|.l] <i2c_chip> <addr>[.0|.1|.2] Modifies memory with constant address. Usage: inm[.b|.w|.l] <i2c_chip> <addr>[.0|.1|.2] icrc32 Calculates checksum. Usage: icrc32 <i2c_chip> <addr>[.0|.1|.2] <count> Table Related Commands Command fatinfo Description Displays partition information. Interface defines type storage used, e.g. "scsi" SCSI, "ide" IDE, "ace" System defines zero-base device number used there multiple devices using same interface. Part defines partition number being accessed particular device through particular interface. Usage: fatinfo <interface> <dev[:part]> fatls Displays content directory. Usage: fatls <interface> <dev[:part]> [directory] fatload Loads file from partition user specified address location. Usage: fatload <interface> <dev[:part]> <addr> <filename> [bytes] XAPP542 (v1.0) Sept. 2004 www.xilinx.com Additional Features Table Miscellaneous Environment Variable Related Commands Command printenv Description Prints environment variable information. Usage: printenv [env name] setenv Sets environment variable. Usage: setenv <name> <value> saveenv Saves current environment variable information back EEPROM. Usage: saveenv Additional Features This section covers additional features relating U-Boot that users might find useful. particular, covers following topics: "Regenerating Hardware Parameters" "Downloading U-Boot using XMD" "Configuring U-Boot Boot from BOOTP/TFTP Server" "Accessing Server U-Boot" Regenerating Hardware Parameters This section shows regenerate hardware parameters U-Boot when reference design changed. reference design ML300 changed, design built from scratch either with Base System Builder (BSB) hand, please make sure that following hardware components included part design before proceeding: Ethernet System 16x50 serial port/UART least one) Most likely, hardware information different from original reference design. U-Boot know hardware parameters, there options: Edit directly reflect changes hardware design. preferred utilize technology provided make changes automatically. this, follow steps below: Copy System project file software configuration file: system.xmp system_uboot.xmp system.mss system_uboot.mss Edit system_uboot.xmp change "MSS file" setting system_uboot.mss. example: Original (system.xmp): IntStyle: default File: system.mhs File: system.mss File: projnav/system.npl www.xilinx.com XAPP542 (v1.0) Sept. 2004 Additional Features Architecture: virtex2p (system_uboot.xmp): IntStyle: default File: system.mhs File: system_uboot.mss File: projnav/system.npl Architecture: virtex2p Modify "system_uboot.mss" adding LIBRARY section follows: BEGIN LIBRARY PARAMETER LIBRARY_NAME uboot PARAMETER LIBRARY_VER 1.00.a PARAMETER TARGET_DIR ./././././u-boot-1.1.1/ PARAMETER CONNECTED_PERIPHS Copy sw_services uboot_v1_00_a directories from U-Boot project directory. $HOME/xilinx/ projects/ml300_edk3 sw_services/uboot_v1_00_a/ bsp/ Now, generate Xilinx ML300 U-Boot: system_uboot.xmp XPS% libsclean XPS% libs configuration files copied right places within U-Boot source tree. file reflects hardware design parameters. Downloading U-Boot using This sections shows download U-Boot using XMD. Instead generating file using System start U-Boot, also loaded started through XMD. "run download" from within load bitstream. Then, command download start U-Boot shown: $HOME/xilinx/u-boot-1.1.1/ XMD% ppcconnect XMD% u-boot XMD% XAPP542 (v1.0) Sept. 2004 www.xilinx.com Additional Features Configuring U-Boot Boot from BOOTP/TFTP Server This section shows configure U-Boot boot from BOOTP/TFTP server. information configure BOOTP/TFTP server, please refer U-Boot guide Once server save Linux image file /tftpboot/uboot.uImage this "bootfile". BOOTP server then only environment information needed address (ethaddr). "bootp" instead "tftpboot" when setting 'bootcmd" environment this case. only TFTP server then "ipaddr", "serverip", "bootfile" environments also need addition "ethaddr". appropriate values according TFTP server configuration. Below example when only TFTP server setenv ethaddr 00.0a.35.00.22.01 setenv ipaddr 125.128.54.56 setenv serverip 125.128.64.51 setenv bootfile /tftpboot/uboot.uImage setenv bootcmd tftpboot\;bootm 400000 saveenv Saving Environment EEPROM. Only address value will written, want U-Boot update your board specific area with only these parameters? <y/n> printenv bootdelay=3 loads_echo=1 baudrate=9600 stdin=serial stdout=serial stderr=serial bootargs=console=ttyS0,9600 ip=off root=/dev/xsysace/disc0/part3 ethaddr=00.0a.35.00.22.01 ipaddr=125.128.54.56 serverip=125.128.64.51 bootfile=/tftpboot/uboot.uImage bootcmd=tftpboot;bootm 400000 www.xilinx.com XAPP542 (v1.0) Sept. 2004 Additional Features Press System reset button. This time, U-Boot automatically downloads Linux image file /tftpboot/uboot.uImage from designated TFTP server starts Linux. Below output from U-Boot terminal window: U-Boot 1.1.1 (Aug 2004 10:59:48) assuming ML300 DRAM: serial Out: serial Err: serial stop autoboot: TFTP from server 125.128.64.51; address 125.128.54.56 Filename '/tftpboot/uboot.uImage'. Load address: 0x400000 Loading: done Bytes transferred 872566 (d5076 hex) Booting image 00400000 Image Name: Linux-2.4.20_mvl31-ml300 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 641348 Bytes 626.3 Load Address: 00000000 Entry Point: 00000000 Verifying Checksum Uncompressing Kernel Image Linux version 2.4.20_mvl31-ml300. Xilinx Virtex-II port node totalpages: 32768 zone(0): 32768 pages. zone(1): pages. zone(2): pages. Kernel command line: console=ttyS0,9600 ip=off root=/dev/xsysace Starting internet superserver: inetd. Hostname: ml300. Starting MontaVista Linux 2.1, Professional Edition ml300 login: XAPP542 (v1.0) Sept. 2004 www.xilinx.com Additional Features Accessing Server U-Boot This section shows access server U-Boot. following commands useful users wish access repository U-Boot. REPOSITORY login command lets users into U-Boot project. When prompted password, enter anything. Below example command bold: login Logging password: REPOSITORY checkout [OPTIONS] PROJECT(S) command lets users check U-Boot project. This checks entire source U-Boot project. checkout u-boot checkout: Updating u-boot u-boot/CHANGELOG u-boot/COPYING u-boot/CREDITS u-boot/MAINTAINERS u-boot/MAKEALL u-boot/Makefile update [OPTIONS] [FILES] command lets users update their existing UBoot source code files. original source code needs checked using command above order this update command. certain files have been updated repository, this downloads changes local copy source code files. There different options available, please refer documentation accessible from more information. diff [OPTIONS] [FILES] command lets users comparison between local copy source code files ones repository. When users want submit patch, output from diff command what needed. more information different command options please refer www.xilinx.com XAPP542 (v1.0) Sept. 2004 References References Xilinx, Inc., XAPP765: Getting Started with MontaVista Linux Virtex-II Pro, Xilinx, Inc., UG038: ML300 User Guide, ML300 evaluation platform website, http://www.xilinx.com/ml300 website, http://www.xilinx.com/edk design tools center website, http://www.xilinx.com/ise example designs page: U-Boot project home page: http://u-boot.sourceforge.net DENX Software Engineering, DENX U-Boot Linux Guide (DULG) TQM8xxL, MontaVista Linux Preview ML300, Revision History following table shows revision history this document. Date 09/27/04 Version Initial Xilinx release. Revision XAPP542 (v1.0) Sept. 2004 www.xilinx.com Other recent searchesUG-01084-1 - UG-01084-1 UG-01084-1 Datasheet IXBD4410SI - IXBD4410SI IXBD4410SI Datasheet ICX404AL - ICX404AL ICX404AL Datasheet ICX054BL - ICX054BL ICX054BL Datasheet DB3X317K - DB3X317K DB3X317K Datasheet BRM-1040-NS - BRM-1040-NS BRM-1040-NS Datasheet
Privacy Policy | Disclaimer |