My understanding is that u-boot already support bad block for the environment 
config.   When reading or writing the config from/to the nand, u-boot skip bad 
block.  However, you need to reserve some spare blocks in nand for environment 
config.  This is done in u-boot-nand.lds:

/* Align to next NAND block.  The NAND has block of 128K ==> 0x20000*/
    . = ALIGN(0x20000);
    common/environment.o  (.ppcenv)
    /* Keep some space here for redundant env and potential bad env blocks */
    . = ALIGN(0x80000);


Regards 

Sylvain Côté

-----Original Message-----
From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On 
Behalf Of Frans Meulenbroeks
Sent: Thursday, January 08, 2009 10:19 AM
To: u-boot@lists.denx.de
Subject: [U-Boot] NAND bad environment block handling

Hi,

I'm wondering what the best way is to handle bad environment blocks in NAND.

According to the spec of our supplier a delivered component is considered to be 
OK if less than 2% of the blocks are not bad.
This means that for our products we need to take into account that worst case 
2% of the blocks are bad. But even with 1% bad blocks we have an issue:
If the bad blocks are distributed randomly we have a chance of 1/100 * 1/100 so 
1 out of 10.000 that both U-Boot environment blocks are bad. 
And actually things could even be worse if the bad blocks are caused by some 
manufacturing defect at our supplier and both environment blocks happen to be 
bad in a whole batch of ICs.

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?

Thanks alot!
Frans Meulenbroeks


      
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to