[U-Boot] howto deal with nested $() in bootenv?

Arno Steffen arno.steffen at googlemail.com
Thu Mar 4 16:08:50 CET 2010


To set my uboot environment (2008-10) I upload a script to uboot

set serverip 		192.168.90.230
a) set bootargs_nfs    mem=128M console=ttyS2,115200n8 noinitrd rw
root=/dev/nfs nfsroot=$(serverip):/opt/rootfs, nolock
b) set bootargs_nfs    mem=128M console=ttyS2,115200n8 noinitrd rw
root=/dev/nfs nfsroot=\$(serverip):/opt/rootfs, nolock
set boot_nfs		tftpboot 0x80000000 spv/uImage\; set bootargs
\$(bootargs_nfs)\; run addip\; bootm 0x80000000

I case a) the serverip while loading will inserted fix in bootargs_nfs
In case b) the serverip will not replaced so that the kernel get a
$(serverip) part of command line.

How to change this above, so that I can later change serverip without
changing anything else?

Regards
Arno


More information about the U-Boot mailing list