Revision as of 12:28, 3 August 2013 by Craig Peacock (Talk | contribs)

Below is the default environment variables from U-Boot 2013.04-dirty (Jun 19 2013 - 09:57:14) shipped as part of Cloud9 GNOME Image 2013.06.20:

U-Boot# printenv

arch=arm
baudrate=115200
board=am335x
board_name=A335BNLT
board_rev=0A5A
bootcmd=gpio set 53; 
	i2c mw 0x24 1 0x3e; 
	run findfdt; 
	mmc dev 0; 
	if mmc rescan ; 
		then echo micro SD card found;
		setenv mmcdev 0;
	else echo No micro SD card found, setting mmcdev to 1;
		setenv mmcdev 1;
	fi;
	setenv bootpart ${mmcdev}:2;
	mmc dev ${mmcdev}; 
	if mmc rescan; 
		then gpio set 54; 
		echo SD/MMC found on device ${mmcdev};
		if run loadbootenv; 
			then echo Loaded environment from ${bootenv};
			run importbootenv;
		fi;
		if test -n $uenvcmd; 
			then echo Running uenvcmd ...;
			run uenvcmd;
		fi;
		gpio set 55; 
		if run loaduimage; 
			then gpio set 56; 
			run loadfdt;
			run mmcboot;
		fi;
	fi;
bootdelay=1
bootdir=/boot
bootenv=uEnv.txt
bootfile=uImage
bootpart=0:2
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc mmc 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 3C0;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
ethact=cpsw
ethaddr=c8:a0:30:ac:e0:ef
fdt_high=0xffffffff
fdtaddr=0x80F80000
fdtfile=am335x-boneblack.dtb
findfdt=if test $board_name = A33515BB; 
		then setenv fdtfile am335x-evm.dtb; 
	fi; 
	if test $board_name = A335X_SK; 
		then setenv fdtfile am335x-evmsk.dtb; 
	fi;
	if test $board_name = A335BONE; 
		then setenv fdtfile am335x-bone.dtb; 
	fi; 
	if test $board_name = A335BNLT; 
		then setenv fdtfile am335x-boneblack.dtb; 
	fi
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
kloadaddr=0x80007fc0
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
loaduimage=load mmc ${bootpart} ${kloadaddr} ${bootdir}/${bootfile}
mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr} - ${fdtaddr}
mmcdev=0
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mtdids=nand0=omap2-nand.0
mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${loadaddr}
nandimgsize=0x500000
nandroot=ubi0:rootfs rw ubi.mtd=7,2048
nandrootfstype=ubifs rootwait=1
nandsrcaddr=0x280000
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootm ${loadaddr} - ${fdtaddr}
nfsopts=nolock
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${loadaddr} ${rdaddr} ${fdtaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootpath=/export/rootfs
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootm ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
usbnet_devaddr=c8:a0:30:ac:e0:ef
vendor=ti
ver=U-Boot 2013.04-dirty (Jun 19 2013 - 09:57:14)

Environment size: 3877/131068 bytes

The variables above roughly translate into the following commands used to boot the BeagleBone Black:

load mmc 1:2 0x80F80000 /boot/am335x-boneblack.dtb
load mmc 1:2 0x80007fc0 /boot/uImage
setenv bootargs console=ttyO0,115200n8 ${optargs} root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
bootm 0x80007fc0 - 0x80F80000