
In message 7C52E0B9-A5B7-11D7-A774-00039390D626@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