[U-Boot] macro substitution - can someone explain please

Mike Frysinger vapier at gentoo.org
Mon Oct 26 09:11:18 CET 2009


On Monday 26 October 2009 03:44:41 javier Martin wrote:
> I have a similar problem. In my environment:
> 
> bootcmd=cp.b c0040000 ${loadaddr} 280000;bootm ${loadaddr}
> mtdparts=mtdparts=mxc_nor_flash.0:256k(U-Boot),2560k(kernel),29312k(rootfs)
> ,512k(config),128k(env1) bootargs=noinitrd console=ttymxc0,115200
>  root=/dev/mtdblock2
> init=linuxrc rw ${mtdparts}
> 
> But when I execute 'run bootm', kernel boots but "mtdparts" variable
> is not substituted in kernel command line:

i dont think your issue is the same as David's.  you need to force expansion 
of the variable yourself.
set bootcmd "run do_args; run do_boot"
set do_args "set init linuxrc rw ${mtdparts}"
set do_boot "cp.b c0040000 ${loadaddr} 280000;bootm ${loadaddr}"
-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/f70df714/attachment.pgp 


More information about the U-Boot mailing list