[U-Boot] NAND bad environment block handling

Marcel Ziswiler marcel at ziswiler.com
Fri Jan 9 08:21:35 CET 2009


Scott Wood <scottwood <at> freescale.com> writes:

> On Thu, Jan 08, 2009 at 07:19:29AM -0800, Frans Meulenbroeks wrote:
> > Is there a solution for this? (obviously I am not considering the
> > situation for a single system, where I just would relocate the
> > environment block; this concerns a production situation).
> > 
> > E.g. it would be nice if U-Boot could read the env from the next non-bad
block at/after the env address.
> > 
> > Has someone experience in this area? Ideas? Suggestions?
> 
> As others pointed out, this is supported; just make the environment range
> larger than the environment size.
> 
> However, this can be wasteful, especially with large block sizes; someone
> a while ago proposed putting a pointer to the environment in the OOB of
> the first block.

The openmoko guys do have an alternative implementation which dynamically sizes
all partitions in NAND according to what bad blocks are found therefore not
wasting any space. And they are using it in full-scale production environment
for the GTA02. Unfortunately I don't think this made it into mainline just yet.



More information about the U-Boot mailing list