[U-Boot-Users] redundant environment block

Wolfgang Denk wd at denx.de
Wed Jun 23 15:32:26 CEST 2004


In message <OF5F8667A7.07E4DE39-ON85256EBC.0044D597-85256EBC.0047ED01 at nanometrics.ca> you wrote:
> 
> According to my tests/observations, when you first issue a saveenv to a
> brand new flash, only one environment block is written.  This means any

Saveenv will _always_ write only one block. This is intentional.

> corruption to this block will wipe out the saved environment.  Apparently

Remember that the most likely way to  corrupt  this  block  is  by  a
failing  saveenv  comand.  If  you  have  to  deal  with  arbitrarily
corrupted sectors in flash you have  lost  anyway  -  with  the  same
probability  you  can lose any other seciotr as well, for example one
which contains U-boot code.

Also, in many cases  (when  embedded  environment  is  used),  _both_
redundanrd   sectors   will   be  pre-initialized  with  the  default
environment.

> this is often the case for production units, unless there is an environment
> upgrade.  After two saveenv commands, it can indeed survive corruption to
> one block.

The behaviour of U-Boot is simple and clear.  It  makes  it  easy  to
adapt your production to your requirements.

> By the way, as you might have already known, I'm still using 0.4.8.  The

Don't blame us for that.


I'm not sure what you're  trying  to  point  out.  I  don't  see  any
deficientcies on U-Boots part here.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
It is more rational to sacrifice one life than six.
	-- Spock, "The Galileo Seven", stardate 2822.3




More information about the U-Boot mailing list