SBC35-C398/Setup
v1.0
www.winsystems.com
Page 10
Environment variables may be composed of other variables. All of the text in a U-Boot
environment variable preceded by a ‘
$
’ and enclosed between the braces ‘
{
’ and ‘
}
’ are
themselves environment variables. When U-Boot encounters this markup notation
during variable processing, it replaces the markup characters and variable name with
the variable’s string contents. In the list above, the environment variable ‘
bootargs
’ is
comprised of the following string:
console=ttymxc0,115200n8 ${video1} ${video2} ${video3}
When used internally by U-Boot,
${video1}
is expanded to become:
video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24
${video2}
will be expanded to become:
video=mxcfb1:dev=ldb,1024x600M@60,if=RGB666
and
${video3}
will expand to become:
video=mxcfb2: off
The complete expansion of the environment variable ‘
bootargs
’ will become:
console=ttymxc0,115200n8
video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24
video=mxcfb1:dev=ldb,1024x600M@60,if=RGB666 video=mxcfb2: off
By using U-Boot’s variable expansion capability, complex U-Boot environment strings
can be assembled from simple strings. The following sections illustrate important
U-Boot devices and their environment variables.
bootdelay=3
baudrate=115200
ipaddr=192.168.1.103
serverip=192.168.1.101
netmask=255.255.255.0
loadaddr=0x10800000
rd_loadaddr=0x11000000
netdev=eth0
ethprime=FEC0
kernel=uImage
cpu_count=maxcpus=4
video1=video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24 video2=video=mxcfb1:dev=ldb,1024x600M@60,if=RGB666
video3=video=mxcfb2:off
bootargs=console=ttymxc0,115200n8 ${video1} ${video2} ${video3}
bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw ip=none ‘${cpu_count} bootcmd_mmc=run
bootargs_mmc; fatload ${mmc_bootdevice} ${loadaddr} ${kernel}; bootm ${loadaddr} bootcmd=run bootcmd_mmc
mmc_bootdevice=mmc 1:1
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0