U-Boot/Configuration

This article provides a collection of various scenarios for booting with U-Boot.

Boot
For getting these bits loaded onto the hardware, please refer to the respective howto:
 * SD Card
 * NAND
 * SPI NOR Flash
 * USB OTG
 * Ethernet

For booting from sd with mainline u-boot, the recommended way is:


 * create a file boot.cmd on the first partition (also check Kernel arguments for extra 'bootargs' options):




 * Substitute zImage in place of uImage in the commands above, and then use the bootz command instead of bootm.

Setting u-boot environment variables
There is a difference in setting environment variables between the boot script and the U-Boot shell.

Inside the shell you would set, for instance: setenv root /dev/sda1

But in the script you would use: root=/dev/sda1

SD Card (legacy kernel)
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} ext2load mmc 0 0x43000000 script.bin ext2load mmc 0 0x48000000 uImage bootm 0x48000000

NAND
Example U-Boot environment, as found in  from a stock android U-Boot environment partition

bootdelay=0 bootcmd=run setargs boot_normal console=ttyS0,115200 nand_root=/dev/nandc mmc_root=/dev/mmcblk0p4 init=/init loglevel=8 setargs=setenv bootargs console=${console} root=${nand_root} init=${init} loglevel=${loglevel} boot_normal=nand read 40007800 boot;boota 40007800 boot_recovery=nand read 40007800 recovery;boota 40007800 boot_fastboot=fastboot

NFS
Recent version of U-Boot are able to boot from NFS as well as TFTP, but you have to get rid of the automatic setup of FTP. Check Ethernet for more information.

FB console
To get U-Boot output shown on the built-in framebuffer driver (currently, HDMI only at 1024x768), add the following to your boot.cmd: setenv stdout=serial,vga setenv stderr=serial,vga The default environment has these values set as well.

LCD Settings
There is a separate wiki page about configuring LCD in U-Boot.