[U-Boot] U-boot env variables parsing
Wolfgang Denk
wd at denx.de
Thu Apr 1 14:47:45 CEST 2010
Dear Joakim Tjernlund,
In message <OFEBF95CA1.44E68372-ONC12576F8.0043F4F7-C12576F8.0044D7F5 at transmode.se> you wrote:
>
> linuxip=ip=$(ipaddr)::$(gatewayip):$(netmask):$(hostname):$(linuxif):off
> tboot=setenv bootargs $(linuxroot) $(linuxip) $(extra);tftp 100000; bootm 100000
>
> it was fairly simple to do but I don't think WD applied it since the old shell was obsolete
I don't think you ever posted this before. I cannot find any trace of
such a patch - not in the public archives nor locally.
> /* find macros in this token and replace them */
> - process_macros (token, finaltoken);
> + if(process_macros (token, finaltoken)){
> + strcpy(tmptoken,finaltoken);
> + while(process_macros (tmptoken, finaltoken))
> + strcpy(tmptoken,finaltoken);
> + }
Hm... will this not make escaping impossible? Assume you want to pass
arg=${name}
to Linux. How would you escape this so it does NOT get expanded if
you run process_macros() arbitrarily often?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Brontosaurus Principle: Organizations can grow faster than their
brains can manage them in relation to their environment and to their
own physiology: when this occurs, they are an endangered species.
- Thomas K. Connellan
More information about the U-Boot
mailing list