Hi guys:
Sorry to disturb you.
We need to produce a DataIO bin file with all the BSP images, and it contains ECC value.
(Total images: uboot, zimage, zimage.dtb, rootfs.tar.bz) We will burn the bare NandFlash chip with this DataIO bin file.
I produce the DataIO bin file refer to the Nand chip which taken out of the mother board after burn the MFGTools and before the first time power on. We could treat this nand chip as a bare chip.
1. i.MX6 DualLite, NandFlash (Micron MT29F8G08ABABAWP)
2. Nand size:1 GiB , Page size: 4 KiB, Sub-page size: 4 KiB, OOB size: 224 bytes
Eraseblock size: 512 KiB, 128 pages per block
3. Nand patitions:
uboot | uboot_env | kernel | kernel_dtb | kernel_backup | kernel_dtb_backup | rootfs ......
8 | 2 | 8 | 1 | 8 | 1 | ...... (MiB)
4. Nand config and Page Layout: gf_len: 13, MetaData: 10 Byte
Block0 size: 512 + 10 = 522Byte Block0EccType = 16
BlockN(1~7) size: 512Byte BlockNEccType = 16
Ecc0~ECC7 size: 26Byte
5. calculate ECC refer to kobs-ng-3.10.53-1.1.0
init_bch();
encode_bch();
for () {
ecc_buf[i] = reverse_bit(ecc_buf[i]);
}
Question:
All pages in Uboot and Kernel partitions:
data Block0(10 + 512) ECC does not match value in the bare chip from the mother board.
data BlockN(1~7) are correct and match the bare chip taken out of the mother board.
But there was one exception, the first page of Uboot partition are correct. (because the 1K padding?)
Thanks in anyway.