[U-Boot] NAND bad environment block handling

Derek Ou derek at siconix.com
Thu Jan 8 19:27:45 CET 2009


Hi,

I think bad blocks are less likely to happen near the first block, which 
is guaranteed to be good.  It may be possible to find NAND chip that 
guarantee more blocks but I have not encountered one myself.

U-boot has the code to skip bad block when reading environment.  As 
Sylvain said, you just need to reserve enough spare blocks.  Like his 
sample,  if you have 2 spare blocks after the environment block and 
using your 1% probability, the chance of all 3 blocks are bad are 1 out 
of 1,000,000.  In this case, the environment will collide with the next 
partition, which could be your redundant environment or even Linux kernel.

Derek
> ------------------------------
> 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
>   


More information about the U-Boot mailing list