[U-Boot] Question regarding NAND environment

Scott Wood scottwood at freescale.com
Thu Jan 26 18:27:35 CET 2012


On 01/26/2012 11:05 AM, Peter Barada wrote:
> I'm trying to have a robust environment stored in NAND, and three blocks
> of space available to store it in.
> 
> Looking at the REDUND code, I see it only keeps two copies of the
> environment regardless of the amount of space available.  Instead I'm
> looking to use CONFIG_ENV_RANGE to handle the extra blocks.

CONFIG_ENV_RANGE and CONFIG_ENV_*_REDUND are orthogonal, not alternatives.

> Can/does the code save multiple copies of the environment across the
> three blocks, 

No.  Its purpose is to provide room to skip blocks that are formally
marked as bad.

If you want REDUND with more than two copies, you'll have to modify the
REDUND code to support that.

> and can readenv read copies of the environment (skipping
> bad blocks) until it finds one good environment?  I'm trying to prevent
> any corruption from happening if (unlikely but possible) power fails
> while saving the environment.

Why are two copies insufficient for that?

-Scott



More information about the U-Boot mailing list