[U-Boot] macro substitution - can someone explain please
Mike Frysinger
vapier at gentoo.org
Mon Oct 26 09:13:13 CET 2009
On Friday 23 October 2009 08:25:00 David Collier wrote:
> If I put the following line in my board.h file
>
> #define CONFIG_RAMBOOTCOMMAND \
> "ping ${serverip} && tftp && bootm ${fileaddr}"
start with the binary. run `strings` on your u-boot.bin (or whatever you're
using) and see what ramboot is set to.
> then when I do PRINTENV I see
>
> ramboot=ping ${serverip} && tftp && bootm 0x10400000
>
> so clearly at some point the text ${fileaddr} has been substituted,
> whereas ${serverip} hasn't
>
> If I retype the line at the command prompt, the ${fileaddr} appears as I
> wished, so it must be happening diring compile and so on.
i doubt variable expansion is happening during compile. it isnt like gcc
knows how to expand shell variables in C code.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091026/b142f35c/attachment.pgp
More information about the U-Boot
mailing list