[U-Boot-Users] uboot script parameters.

Wolfgang Denk wd at denx.de
Thu Jul 20 00:46:59 CEST 2006


In message <FAB00A8DC59FAB42B13C2B3B0F6877010EFD30C9 at ehost011-3.exch011.intermedia.net> you wrote:
> 
> Couple questions regarding u-boot scripts:
> 
> 1) Is it possible to create proprietary u-boot script which takes
> parameters (like bash for instance):

No.

> setenv getkernel tftp 2000000 \$1\/uImage

Note that this is a definition of  an  envrionment  variable,  not  a
script. A script is a different thing.

> 2) Looks like u-boot doesn't support nested substitution of script
> parameters. For instance:

It does, but only within the context of the "run" command.

> => setenv sw_ver 1.0.10
> => setenv image_path rel\/\$(sw_ver)

Why are you escaping the / here?

Also note that you should ${sw_ver}. The old syntax $(...)  has  been
deprecated and will cease to exist soon.

> => printenv image_path
> image_path=rel/$(sw_ver)
> =>

Try: 

	=> sete foo echo ${image_path}
	=> run foo
	rel/1.0.10


> Am I doing something wrong?

Yes, you make a MAJOR mistake:

> ------_=_NextPart_001_01C6AB7A.77AD4D53
> Content-Type: text/html;
> 	charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
> 
> <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =

You MUST NOT post HTML here!!!!

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Fools ignore complexity. Pragmatists suffer it. Some  can  avoid  it.
Geniuses remove it.
     - Perlis's Programming Proverb #58, SIGPLAN Notices, Sept.  1982




More information about the U-Boot mailing list