Fix for image corrupt when use mfgtool Mfgtools-Rel-1.6.2.042  to program MX508 NAND -blog archive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fix for image corrupt when use mfgtool Mfgtools-Rel-1.6.2.042  to program MX508 NAND -blog archive

998 Views
GraceH
Senior Contributor II

when use kobs-ng program u-boot image to NAND with MX508 RD3 board,
the image loaded to RAM by ROM loader has some bytes corrupted at address 0x207CF and 0x407CF.

the kobs-ng dump shows

m_u32Firmware1_startingPage = 512
m_u32Firmware2_startingPage = 1280
m_u32PagesInFirmware1 = 177
m_u32PagesInFirmware2 = 177
m_u32DBBTSearchAreaStartAddress = 256
m_u32BadBlockMarkerByte = 1999
m_u32BadBlockMarkerStartBit = 0
m_u32BBMarkerPhysicalOffset = 2048
m_u32BCHType = 0
m_u32DISBBM = 0
The problem is caused by manufacturer bad block Marker.
If manufacturer bad block mark byte is used, it will be swapped with metadata[0] to complete page data when ROM read data from NAND.
When use kobs-ng to program NAND, it will write DisBBM to configure block to indicate whether swap is needed.
Because m_u32BadBlockMarkerByte = 1999 is 0x7CF
In 508 ROM code, if m_u32DISBBM is 0, the byte will be swapped.

the mfg tool used is Mfgtools-Rel-1.6.2.042 which download from www.freescale.com.

The fix is modifying kobs-ng.11.09.01, change m_u32EnDISBBM to 1.

static platform_config mx50_boot_config = {
.m_u32RomVer = ROM_Version_3,
.m_u32EnDISBBM = 0, // change to 1
.m_u32EnSoftEcc = 1,
.m_u32EnBootStreamVerify = 0,
.m_u32UseNfcGeo = 1,
.m_u32UseMultiBootArea = 0,
.m_u32UseSinglePageStride = 0,
.rom_mtd_init = v3_rom_mtd_init,
.rom_mtd_commit_structures = v3_rom_mtd_commit_structures,
};

then build kobs-ng.11.09.01 and create your own initramfs.cpio.gz.uboot.

Also you can use attached initramfs.cpio.gz.uboot  initramfs.cpio.gz.uboot

Original Attachment has been moved to: 29-initramfs.cpio.gz.uboot

Tags (1)
0 Kudos
Reply
0 Replies