[U-Boot] u-boot environment variable parsing

Wolfgang Denk wd at denx.de
Thu Jul 21 15:11:30 CEST 2011


Dear "Hebbar, Gururaja",

In message <C82BA3053CFD354AACBD25EFBD2A4EC603F0193C2D at dbde02.ent.ti.com> you wrote:
> 
> 
> The question here is mmc_args re-uses variable bootargs as
> $(bootargs) & nand_args re-uses it as ${bootargs}. Note the
> difference in curly & flower brackets. "run mmc_args" fails for me
> however nand_args runs properly.

Does this not answer your question sufficiently?

> My question is
> 1. Which is correct?

${...} is correct.

> 2. What is the difference between the two?

${...} is correct, and $(...) is not correct.

> I have seen few boards using both methods.

$(...) was used in very old versions of U-Boot, but this got changed
for the sake of compatibility with standard shell syntax.

Note that the simple cmmand line parser still accepts the obsolete
$(...) format; the hush shell doesn't.

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
A morsel of genuine history is a  thing  so  rare  as  to  be  always
valuable.                                          - Thomas Jefferson


More information about the U-Boot mailing list