[U-Boot] Davinci DM365 custom design : Problem when reading uBoot environment variables

Scott Wood scottwood at freescale.com
Wed Sep 15 20:15:14 CEST 2010


On Wed, 15 Sep 2010 18:21:11 +0200
Reda MIMOUNE <reda.mimoune at easii-ic.com> wrote:


> But when I reset the board, the message is *** Warning bad CRC or NAND. the zone was set to a NAND block size of 128KB (since it is mandatory to be the same size).
> I put some debug messages to find out that the read_env function used returns an error because of my environment variables block is bad. This i cannot understand since it wrote data in the right block.

If the block is bad, then that's not the right block. :-)

You can use CONFIG_ENV_RANGE to declare a multi-block range, larger than
the environment size, to allow bad blocks to be skipped.  Or you can
use the new env.oob feature to dynamically mark a known-good block as
your environment.

> To widen the problem I choose to double the environment size to 256KB. It is still the same.

You need to use CONFIG_ENV_RANGE and keep the environment the same size
-- otherwise it thinks you really want two blocks of environment data,
and one of those blocks being bad is still fatal.

> I typed the "nand bad " at prompt and my blocks + the bad block tables were marked as bad ! is that normal that BBT are marked bad ?

Yes, the BBT blocks are marked bad so they won't be used for other
purposes.

> So for the moment i try to remove this bad character from my block by trying to erase all the nand, and using nand scrub.

Please be careful with that.  Unless you have reason to believe that
the block was accidentally marked bad by something software did, you
ought to leave bad block markers in place.  The manufacturer put that
marker there to indicate that the block is unreliable (it's normal for
NAND flash to contain a few such blocks).

-Scott



More information about the U-Boot mailing list