[U-Boot-Users] want to know scenario

How u-boot treats the following commands:
setenv ipaddr 192.168.2.202 saveenv printenv reset go printenv
vs
saveenv printenv reset go printenv (is there a possiblity of failure in this command)?
Thanks in advance

Hi Sapirf,
How u-boot treats the following commands:
Your question is really cryptic. If you do have a running U-Boot, you probably know the answers, but hey sometimes even I don't believe my own eyes.
setenv ipaddr 192.168.2.202 saveenv printenv
This shold change ipaddr to what you tell U-Boot, save it to persistent storage (whereever that is on your board) and finally dump the whole environment.
reset
Wow, now you reset your board...
go
... and force the next incarnation of U-Boot to display an error message as you didn't provide a second argumtn.
printenv
But the environment is still there!
vs
saveenv printenv reset go printenv (is there a possiblity of failure in this command)?
Well, the error message is printed at a different time and you don't change ipaddr - and no printenv will never fail as long as your hardware lives.
By now I am pretty sure I did not understand your question, so maybe you try again...
Cheers Detlev
participants (2)
-
Detlev Zundel
-
sapirf fersht