[U-Boot-Users] script examples...
Wolfgang Denk
wd at denx.de
Mon Jun 23 22:21:57 CEST 2003
In message <7C52E0B9-A5B7-11D7-A774-00039390D626 at pepper.com> you wrote:
> This sounds what I need but I get syntax errors when trying the
> following:
Well, check with a real shell - the syntax is the same:
> if fatls <filename> then run erase 0x00000000 0x0003ffff
> else
> run bootm
> fi
>
> Should this work?
No, there is a separator missing. Either
if fatls <filename>
then run erase 0x00000000 0x0003ffff
else
run bootm
fi
or
if fatls <filename> ; then run erase 0x00000000 0x0003ffff
else
run bootm
fi
should work.
One word of a warning, though: "run bootm" means you have defined a
vaiable "bootm" which contains some commands; but there is also a
U-Boot command "bootm" - there is no problem with that, it will
actually work fine, but for matters of style I recommend to use
different names, though.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
If I had to live my life again, I'd make the same mistakes, only
sooner. -- Tallulah Bankhead
More information about the U-Boot
mailing list