Hi All,
we are using DM385 IPNC RDK 3.8.0. our requirement is to update uboot environment variables/uImage from filesystem. we tried to update NAND uboot environment variables from filesystem with fw_setenv , we can see environment variable updated with fw_printenv , but when we reboot the device, at u-boot level it gives below errors:
ECC: uncorrectable.
ECC: uncorrectable.
*** Warning - bad CRC or NAND, using default environment
and uboot uses default bootargs, now to figure out issue whether lies in fw_setenv binary , we flashed uImage to nand from filesystem and tried to take uImage from nand , that also failed.
below is the method we tried to flash uImage from filesystem:
#cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "U-Boot-min"
mtd1: 00240000 00020000 "U-Boot"
mtd2: 00020000 00020000 "U-Boot Env"
mtd3: 00440000 00020000 "Kernel"
mtd4: 06900000 00020000 "File System"
mtd5: 00c00000 00020000 "Data"
mtd6: 03500000 00020000 "File System2"
mtd7: 14f40000 00020000 "Reserved"
#flash_eraseall /dev/mtd3
#nandwrite -p /dev/mtd3 uImage
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
Writing data to block 8 at offset 0x100000
Writing data to block 9 at offset 0x120000
Writing data to block 10 at offset 0x140000
Writing data to block 11 at offset 0x160000
Writing data to block 12 at offset 0x180000
Writing data to block 13 at offset 0x1a0000
Writing data to block 14 at offset 0x1c0000
Writing data to block 15 at offset 0x1e0000
Writing data to block 16 at offset 0x200000
Writing data to block 17 at offset 0x220000
Writing data to block 18 at offset 0x240000
#sync
#reboot
at uboot if we try to read uImage from nand
DM388_IPNC#ipnc_ff_init 1;nboot 0x81000000 0 0x280000;
Loading from nand0, offset 0x280000
ECC: uncorrectable.
ECC: uncorrectable.
ECC: uncorrectable.
ECC: uncorrectable.
NAND read from offset 280000 failed -74
** Read error
We checked on uboot logs , and kernel menuconfig , both place BCH8 HW ECC is selected.
Uboot logs:
NAND: HW ECC BCH8 Selected
In kernel menuconfig also HW ECC BCH8 is selected
Device Drivers --->
Memory Technology Device (MTD) support --->
NAND Device Support --->
<*>NAND Flash device on OMAP2 and OMAP3
Select the ECC scheme for OMAP NAND driver (OMAP_ECC_BCH8_CODE_HW (recommended))
We also tested flashing ubifs filesystem on nand and when we modify any files/create new files on ubifs it doesn't get corrupted even after reboot.
So the problem is happening when nand is written from kernel and the same partition being accessed from uboot.
What should be the solution to this problem?
Thanks and Regards,
Vismay