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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,127 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

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.

标记 (1)
0 项奖励
回复
0 回复数