U-Boot for Exeda
Contents
Overview
The Exeda uses the U-Boot boot-loader for low-level initialization and operating system loading. U-Boot is an open source boot-loader available for a wide range of embedded processor architectures. This page summarizes settings and features unique to the Exeda port of U-Boot. Comprehensive documentation of the U-Boot project may be found at http://www.denx.de/wiki/view/DULG/UBoot. The CompuLab U-Boot version for the Exeda is checked out from U-Boot-1_2_0 of Das U-Boot repository and can be obtained from CompuLab website in binary form. CompuLab U-Boot source will be provided on request.
Exeda specific U-Boot commands
A brief U-Boot command reference can be found here. The following commands are specific to the Exeda port of U-Boot:
- CPU frequency scaling
- cpufreq with no arguments - display the current frequency setting
- cpufreq <frequency> - set CPU frequency; (allowed frequency values : 104/208/312/520)
- Hardware configuration information *
- hwinfo - print device hardware configuration information
Default Environment
U-Boot features an extensive default environment, for boot sequence control and hardware configuration.
Variable | Default setting | Description |
---|---|---|
bootcmd | This variable defines a command string that is automatically executed when the initial countdown is not interrupted. | |
bootdelay | 3 sec | Delay before automatic boot starts |
boot_mode | uboot | Boot option setting. See Boot Sequence Options for details. |
bootargs | The contents of this variable are passed to the Linux kernel as boot arguments | |
stdin | serial | Standard input stream |
stdout | serial | Standard output stream |
stderr | serial | Standard error stream |
baudrate | 115200 | Serial port baud rate |
ethaddr | set at production time | Ethernet MAC address for the extender board ethernet interface |
ipaddr | - | IP address; needed for tftp command |
serverip | - | Server address; needed for tftp command |
autoload | no | Determines whether the "dhcp", "bootp" and "rarpb" commands will automatically download an image. |
splashimage | 0x000B0000 | Address of a bitmap image used as splash-screen. |
usb_mode | slave | USB port operation mode. The only values allowed are: "slave" or "host". Must be set before "usb start" command is issued. |
extpwr_mode | on | Determines whether the external power enable (GPIO<97>) is asserted. |
cpu_freq | maximum supported by CPU | CPU frequency. Used by "cpufreq" command to store the frequency setting. |
mem_zero | on | Determines whether memory zeroing is performed. Allowed values: "on", "off".
Set to "off" for shorter boot time. |
Boot Sequence Options
Boot Options
The U-Boot boot-loader supports several basic boot options. The environment variable "boot_mode" determines which boot sequence is executed. The variable may be set to the following values:
- uboot - the Exeda boots up to the U-boot command prompt.
- linux - the default Linux boot from NAND sequence is executed. Please see Linux documentation for details.
- wince - the default WinCE boot from NAND sequence is executed. Please see WinCE documentation for details.
- any other value - the command stored in the bootcmd variable is executed.
Bringing to Default State
Pressing and holding Ctrl D during the boot process will restore the U-Boot settings to the default factory values. Use this if the environment has been corrupted.
O/S Update Boot Sequence
Pressing the ON/OFF button for more than four seconds during the boot process will put the system into the O/S update boot sequence. The boot-loader will attempt to detect an external storage device (USB or MMC) and search for updated image files. If no files are detected, the system will boot up to the U-Boot command prompt. This boot mode allows easy and fast software updates without connecting a PC host. Please refer to O/S manuals for specific update procedures.
NAND Flash System
The Exeda port of U-Boot supports the MTD flash driver that is used with the Linux O/S. U-Boot will load the appropriate driver according to the boot_mode environment variable. Additionally, the nand_mode environment variable may be used to set the NAND driver mode explicitly. Setting nand_mode to on will cause U-Boot to load the MTD driver. If nand_mode is set to off the MTD driver will not be loaded. See WinCE documentation for further details.
Updating U-Boot
Do not interrupt the process or shut down the system during update. Doing so can result in a disabled Exeda device that will need to be shipped to CompuLab for reprogramming |
Update through serial port (preferred method)
- Start terminal emulation program on your PC using the serial port to which the supplied serial cable is connected. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
- Turn on the Exeda. U-Boot will start and you will get a command prompt.
- Use the loadb command to start image download
U-Boot> loadb a0010000
- In a terminal emulation program, send the U-Boot image file using kermit mode. For example, in HyperTerminal, use "Transfer >> Send File". A "Send File" dialog will appear. In the protocol combo box, choose Kermit. Fill in the U-Boot image filename and press the "Send" button.
- Use the following commands to store the downloaded image into the Exeda NOR flash:
U-Boot> protect off 0 +50000 U-Boot> erase 0 +50000 U-Boot> cp.b a0010000 0 50000
- Reboot the Exeda.
Update through USB and Disk-on-Key
A USB flash drive is needed for this procedure.
- On the host PC, copy the u-boot-x.x.x.bin file to the USB flash drive. Rename the file u-boot.bin.
- Connect the USB flash drive to the Exeda OTG USB port using the supplied "USB-A receptacle to Mini-USB A male" cable.
- Start a terminal emulation program on your PC using the serial port to which the supplied serial cable is connected. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
- Turn on the Exeda. U-Boot will start and you will get a command prompt.
- Enable the U-Boot USB host subsystem:
U-Boot> setenv usb_mode host U-Boot> usb start
- After U-Boot has detected the USB storage device copy U-Boot image to the Exeda RAM:
U-Boot> fatload usb 0 a0010000 u-boot.bin
- Use the following commands to store the U-Boot image into the Exeda NOR flash:
U-Boot> protect off 0 +50000 U-Boot> erase 0 +50000 U-Boot> cp.b a0010000 0 50000
- Reboot the Exeda.
Update through LAN / TFTP
The Ethernet extender board ("Y" option) is needed for this procedure.
- Install TFTP service (or server) on the host PC. The TFTP server tested by Compulab is TFTPD32, http://tftpd32.jounin.net, it is also included in the Linux and WinCE distribution packages.
- Rename the u-boot-x.x.x.bin file to u-boot.bin and copy it to the TFTP directory.
- Start a terminal emulation program on your PC using the serial port to which the supplied serial cable is connected. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
- Turn on the Exeda. U-Boot will start and you will get a command prompt.
- Type printenv in order to check the current IP settings. Modify them if needed using the setenv ipaddr and setenv serverip commands. Or, use U-Boot's DHCP capability to automatically set the IP address.
- Download U-Boot image to the Exeda RAM:
U-Boot> tftp a0010000 u-boot.bin
- Use the following commands to store the downloaded image into the Exeda NOR flash:
U-Boot> protect off 0 +50000 U-Boot> erase 0 +50000 U-Boot> cp.b a0010000 0 50000
- Reboot the Exeda.
Memory Map
NOR Flash
Memory Address range | Block Range | Size | Usage |
---|---|---|---|
0x00000000 - 0x0004FFFF | 1 - 5 | 320KB | U-Boot bootloader |
0x00050000 - 0x0005FFFF | 6 | 64KB | U-Boot environment |
0x00060000 - 0x0006FFFF | 7 | 64KB | Setup block |
0x00070000 - 0x000AFFFF | 8 - 11 | 256KB | Utilities and applications |
0x000B0000 - 0x000FFFFF | 12 - 16 | 320KB | Splash-screen |
SDRAM Memory
SDRAM map: SDRAM starts at 0xA0000000; maximum is 0xA8000000 (128MB).
U-Boot system: 0xA7800000 ...... SDRAM top
U-Boot operates with a virtual memory subsystem turned on, using one-to-one virtual to physical address mapping.