Totally wrecked my ENV

Wolfgang Denk wd at denx.de
Tue Mar 24 15:18:19 CET 2020


Dear Udo,

In message <a70e84c8-506b-f61f-2884-0798a43cecc3 at zoide.net> you wrote:
>
> while trying to set the mac-address of a device in u-boot I somehow
> wrecked the whole thing.
>
> I think I did 'setenv eth0addr xx:xx:xx:xx:xx:xx' followed by 'saveenv'
> After that, my device tells me "Unknown command 'run' - try 'help'" and
> also "Unknown command 'env' - try 'help'"

I can't imagine of a situation where a correctly running U-Boot
would suffer in such a way from any misspelled environment settings.

> I seemed to me that some wrong quoting in the above 'setenv' command
> messed up all the strings.

No, the cause of the problem must be elsewhere.

> I'm lost now, how can I achienve a total reset of my ENV?

Resetting your environment will not help.  When U-Boot cannot find
command names like run or printenv, it's internal data  stuctures
have been corrupted, and this will not go away if you clean up the
environment.  You must reflash the whole U-Boot image.  If you can
still boot into Linux, I would use this to write the new U-Boot
image, as you cannot really trust your U-Boot any more.  If not, and
you can still load and flash an image in U-Boot, then try that.  If
this doesn't work either, then you probably have to use a JTAG
debugger (if you have a JTAG connector on your board).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
There are two ways to write error-free programs. Only the  third  one
works.


More information about the U-Boot mailing list