Hi,
I have a few questions on bad block management on NAND device as done by u-boot
(2009-03) and kernel (2.6.30-rc6) and would appreciate any responses to help in
my understanding.
a) I have seen u-boot stores the bad block table (BBT) in the last two blocks.
Is this Linux community wide convention on using the last two blocks to store
BBT?
b) If not, are there any device specific files in u-boot and linux kernel that
allows us to specify the blocks reserved for BBT?
c) What happens if the last two blocks or blocks reserved for BBT are bad?
Should we store additional copies of BBT in other blocks?
d) In linux kernel, we have mtd/flash partitioning. For example - if we have
the following partition table
static struct mtd_partition davinci_nand_partitions[] = {
{
/* UBL (a few copies) plus U-Boot */
.name = "bootloader",
.offset = 0,
.size = 30 * NAND_BLOCK_SIZE,
.mask_flags = MTD_WRITEABLE, /* force read-only */
}, {
/* U-Boot environment */
.name = "params",
.offset = MTDPART_OFS_APPEND,
.size = 2 * NAND_BLOCK_SIZE,
.mask_flags = 0,
}, {
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = SZ_4M,
.mask_flags = 0,
}, {
.name = "filesystem1",
.offset = MTDPART_OFS_APPEND,
.size = SZ_512M,
.mask_flags = 0,
}, {
.name = "filesystem2",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
.mask_flags = 0,
}
/* two blocks with bad block table (and mirror) at the end */
};
As per the partition table above, the filesystem will occupy the last
blocks of the NAND. Does it mean the filesystem can overwrite the last two
blocks reserved for bad block table or is there a protection built in the linux
kernel to avoid such overwrites?
Thanks in advance for your help.
Regards,
Prateek
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source