
Dear David Aldrich,
In message 41302A7145AC054FA7A96CFD03835A0A114C7F@EX10MBX02.EU.NEC.COM you wrote:
I would be grateful for some help with environment variable substitution in U-Boot please.
Make sure to read the manual, and the FAQ section, especially http://www.denx.de/wiki/view/DULG/CommandLineParsing
I have:
=> printenv [snip] bootargs=console=ttyS0,115200 root=/dev/nfs rw ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off nfsroot=${serverip}:${rootpath}
...
When I leave the system to autoboot I see:
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/nfs rw ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off nfsroot=${serverip}:${rootpath}
So environment variable substitution is not happening.
Why (and where) should it happen? The "bootm" command will just pass the content of the "bootargs" variable as command line to the Linux kernel - it will not modify it in any way.
If you want variable substitution to take place, you must invoce the shell - one way or another. The recommended and usually most efficient way is to (iteratively) build the kernel command line (i. e. the bootargs variable) dynamically; in this process you also get the variables substituted as you want it.
See the examples in the manual, or many of the built-in default environment settings, for example in "include/configs/amcc-common.h"
Best regards,
Wolfgang Denk