protecting env partitions from bad blocks

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 6 03:25:22 EDT 2011


Hi Boaz,

Please do not top-post.

On Sun, Jun 05, 2011 at 03:38:40PM +0300, Boaz Ben-David wrote:
> Hi Juergen,
> 
> Thanks for your reply.
> Please correct me if I'm wrong here, but from what you are saying,
> if my flash has a block
> size of 512KB (thats the erase size also) and I define the env
> partition to have say 5 blocks with one that is bad
> I'm covered if I do my read/write operations using a bb device.
> 
> Also, say a block gets wear out after extended use, will it be
> marked bad after a failed write operation for example?

barebox currently does not actively mark a block as bad. You can only
do it manually from the command line.
However, it correctly handles bad blocks once they are there, so
if barebox starts and can't read its environment, you can mark
a block bad on the command line. After a 'saveenv' the bad block
gets skipped during write (and also during reading next time).

This is a lack of features, so patches welcome.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list