[U-Boot-Users] Question about the setenv command

Dave Hylands dhylands at gmail.com
Mon Jun 26 16:18:45 CEST 2006


HI Wolfgang,

> Where did you get the sources from? I understand that this is not the
> official source tree?

It starts out using the official 1.1.4 source and adds a bunch of
patches which appear to be specific to the gumstix hardware.

> > In version 1.1.2, I was able to use a command like this:
> >
> > setenv linux "$bootcmd"
> >
> > and this would make the variable 'linux' have the same value as the
> > variable 'bootcmd'
>
> Yes. Thisis standard use and must work on all systems.

It turns out that this does in fact work as before using simple variables.

I think that the issue has nothing to do with the 1.1.2 versus 1.1.4
but rather that

setenv linux "$bootcmd"

doesn't work when bootcmd is set to this (all on one line):

setenv bootcmd "icache on;setenv stderr nulldev; setenv stdout
nulldev; if mmcinit && fatload mmc 0 a2000000 gumstix-factory.script;
then setenv stdout serial; setenv stderr serial; echo Found
gumstix-factory script...; autoscr; else setenv stdout serial;setenv
stderr serial;fsload && bootm; fi"

I get the following output:

GUM> setenv linux "$bootcmd"
Usage:
setenv  - set environment variables

But if I copy and paste the contents (using my terminal program) then
everything works fine. Or if I simplify bootcmd then everything works
fine.

-- 
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




More information about the U-Boot mailing list