From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Mon, 26 Oct 2009 04:13:13 -0400 Subject: [U-Boot] macro substitution - can someone explain please In-Reply-To: References: Message-ID: <200910260413.14473.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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