Qiang Li - Mpu Se

How kobs-ng tool calculate the DBBT field -blog archive

Discussion created by Qiang Li - Mpu Se Employee on Dec 7, 2011

The DBBT is at the 4th block of the NAND, there are 4 copies at block 4 ~ 7, the first 4 blocks (block 0 ~ 3) are 4 FCB copies.

The Kobs-ng code to calculate the DBBT address for iMX53 is in function v2_rom_mtd_init() file "mtd.c",
   stride_size_in_bytes = mtd_erasesize;  // It is the block size
   search_area_size_in_bytes = 4 * stride_size_in_bytes;  // Skip 4 blocks for FCB
   search_area_size_in_pages = search_area_size_in_bytes / mtd_writesize(md);

The kobs-ng will calculate the FCB tabel from the block size and page size that MTD driver reported. If you set wrong block size in the MTD driver, the calculation will be wrong too.

If you are using the Freescale LTIB, you can select the "mtd-utility" package into rootfs, and use the followed command to dump the FCB data from NAND of your board:
   $ nanddump /dev/mtd0 -f /dump.dat -s 0x0 -l 0x500000

It will dump the first 5MB of the NAND data to file "/dump.dat", then you can check the FCB for DBBT search address.

Outcomes