User manual
Linux Guide taskit GmbH
\$(basicargs) initrd=0x\$(fileaddr),0x\$(filesize) \$(mtdparts)\;bootm
\$(kerneladdr)
U-Boot> printenv ramboot
ramboot=tftpboot 21400000 initrd.bin;setenv bootargs $(basicargs)
initrd=0x$(fileaddr),0x$(filesize) $(mtdparts);bootm $(kerneladdr)
Once again, note the escape characters before all special characters. Later, when
ramboot is run, the variable names will be replaced with their contents. Here, however,
when setting the variables, they need to be interpreted as strings.
The boot script is now almost done, but the new entries need to be saved by calling
saveenv; otherwise everything needs to be entered again after the next boot.
U-Boot> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...flash_erase: first: 2 last: 2
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
Now we can test the script:
U-Boot> boot
TFTP from server 192.168.2.238; our IP address is 192.168.2.171
Filename 'initrd.bin'.
Load address: 0x21100000
Loading:###################################################
#############################
done
Bytes transferred = 1478664 (169008 hex)
## Booting image at 10060000 ...
Image Name: uImage
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 739208 Bytes = 721.9 kB
Load Address: 21000000
Entry Point: 21000000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing
Linux...................................... done, booting the kernel.
...
Kernel command line: console=ttyS0,115200 mem=64M root=/dev/ram rw
initrd=0x21000000,0x169008 mtdparts=physmap_flash.0:384k(boot)ro,
1664k(linux)ro,3072k(initrd)ro,10240k(cfg),-(custom)
Page 13 of 65 Version 1.26 (2008-04-30)