All of lore.kernel.org
 help / color / mirror / Atom feed
* Totally wrecked my ENV
@ 2020-03-23 20:02 Udo Waechter
  2020-03-24 14:18 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Udo Waechter @ 2020-03-23 20:02 UTC (permalink / raw)
  To: u-boot

Hi there,

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'"

printenv is also unknown

After several reboots, even 'printenv' is not known. In previous boots,
I could do 'printenv' an truly there were some weird outputs.....

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

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

The board is a riotboard with U-Boot 2019.01, which I build/installed
myself (ages ago)

Any help is highly appreciated.

Thanks,
udo.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200323/2a551f13/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Totally wrecked my ENV
  2020-03-23 20:02 Totally wrecked my ENV Udo Waechter
@ 2020-03-24 14:18 ` Wolfgang Denk
  2020-03-24 15:15   ` Udo Waechter
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2020-03-24 14:18 UTC (permalink / raw)
  To: u-boot

Dear Udo,

In message <a70e84c8-506b-f61f-2884-0798a43cecc3@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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Totally wrecked my ENV
  2020-03-24 14:18 ` Wolfgang Denk
@ 2020-03-24 15:15   ` Udo Waechter
  0 siblings, 0 replies; 3+ messages in thread
From: Udo Waechter @ 2020-03-24 15:15 UTC (permalink / raw)
  To: u-boot

Thank you very much Wolfgang,

reinstalling U-Boot helped.

Cheers,
udo.

On 24/03/2020 15:18, Wolfgang Denk wrote:
> Dear Udo,
> 
> In message <a70e84c8-506b-f61f-2884-0798a43cecc3@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
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200324/a90ea788/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-24 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 20:02 Totally wrecked my ENV Udo Waechter
2020-03-24 14:18 ` Wolfgang Denk
2020-03-24 15:15   ` Udo Waechter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.