[U-Boot] handling of bad blocks in nand

Arno Steffen arno.steffen at googlemail.com
Fri Jul 9 11:12:35 CEST 2010


Sorry another question to that.

As for instance I want to have 10MB for root partion and keep 2 blocks
extra as reserve for some bad blocks.
I will erase the hole 10MB+2block, write 10MB. That's what I do in uboot.

But in Kernel I have some partition table like this:

    {
        .name           = "root(1)",
        .offset         = MTDPART_OFS_APPEND,
        .size           = 82*(64*2048),        /*10MB + 256k*/
        .mask_flags     = MTD_WRITEABLE /* force read-only */
    },

There are right now the 2 extra blocks inside (but they haven't been
written or formatted).
That is wrong, isn't it? The kernel might now write beyond the 10MB.

I think I have to set size to 80*(62*2048) and append the 2 extra
blocks to the offset in the next Partition to leave this 2 block free.

But I am not sure. So thanks for a quick look and an advice.


More information about the U-Boot mailing list