[U-Boot] reset environment

In development, it's a bit of a pain that installing a new u-boot image with different settings for bootargs and bootcmd doesn't actually change anything, because the environment in flash is still valid.
Worse, there doesn't seem to be a command to say "over-write that with your new defaults"
If that is indeed so, then can I propose such a command should be added?
I'll try to knock out the patch if no-one more skilled wants to leap into action! David Collier
www.dexdyne.com

Dear "Dexdyne Postmaster",
In message <memo.20090811100114.12188A@postmaster+dexdyne.com.cix.co.uk> you wrote:
In development, it's a bit of a pain that installing a new u-boot image with different settings for bootargs and bootcmd doesn't actually change anything, because the environment in flash is still valid.
This depends on your configuration. When using an "embedded" environment, this will get replaced with each install.
Worse, there doesn't seem to be a command to say "over-write that with your new defaults"
You can run a script image that does whatever you want.
If that is indeed so, then can I propose such a command should be added?
Search the archives. There has been a proposal before, and even an API has been agreed on, it's just that nobody implemented it yet. Patches are welcome.
Best regards,
Wolfgang Denk

Dear "Dexdyne Postmaster",
whoops - fixed that now!!!
This depends on your configuration. When using an "embedded" environment, this will get replaced with each install.
" this will get replaced with each install "
sorry - I don't know how you mean that will happen....
OK - I'm working on an AVR32 - if I follow the instructions they give, it replaces the u-boot code, and leaves the environment sector in flash unchanged. I have added a 1-byte-write to the sector to my script to corrupt it.... but a command would be easier.
Worse, there doesn't seem to be a command to say "over-write that with your new defaults"
You can run a script image that does whatever you want.
OK again - I don't seem to have scripting enabled in my u-boot - I'd like to do that so I can use && in by boot sequence.
What would I put in a script to have the effect of forcing a load of the new defaults??? If there's no single command, do you mean I could make up a script full of "set" commands?
If that is indeed so, then can I propose such a command should be added?
Search the archives. There has been a proposal before, and even an API has been agreed on, it's just that nobody implemented it yet. Patches are welcome.
I did some reading last night, and did indeed find the proposed implementation on the to-do list ....
Thanks
David Collier
www.dexdyne.com

Dear "David Collier",
In message <memo.20090812101725.10088B@postmaster+dexdyne.com.cix.co.uk> you wrote:
Dear "Dexdyne Postmaster",
whoops - fixed that now!!!
Thanks.
This depends on your configuration. When using an "embedded" environment, this will get replaced with each install.
" this will get replaced with each install "
sorry - I don't know how you mean that will happen....
If you flash a new U-Boot image, this will also overwrite the embedded environment with the one built into the U-Boot image.
OK - I'm working on an AVR32 - if I follow the instructions they give, it
I have no idea who "they" are, nor what instructions "they" give, but if you follow their advice you should probably ask them for help, too.
replaces the u-boot code, and leaves the environment sector in flash unchanged. I have added a 1-byte-write to the sector to my script to corrupt it.... but a command would be easier.
As mentioned above, with an embedded environment this is not needed.
OK again - I don't seem to have scripting enabled in my u-boot - I'd like to do that so I can use && in by boot sequence.
Well, then enable it.
What would I put in a script to have the effect of forcing a load of the new defaults??? If there's no single command, do you mean I could make up a script full of "set" commands?
A list of "setevn" commands, correct.
Best regards,
Wolfgang Denk
participants (3)
-
David Collier
-
Dexdyne Postmaster
-
Wolfgang Denk