This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ubi_io_read: error -74 (ECC error) when using UBIFS rootfs

Other Parts Discussed in Thread: DRA752, DRA72

Hi All,

   I am using DRA752 CPU + 7.02.00.02 SDK , I want to use ubifs rootfs on nand flash (MT29F4G08ABADAWP) 

I use command to generate ubifs.img

mkfs.ubifs -q -r filesystem -m 2048 -e 129024 -c 4000 -o mtd.ubifs -x lzo -F

ubinize -o ubifs.img -m 2048 -p 128KiB  -s 2048  -O 2048 ubinize.cfg

ubinize.cfg

[ubifs]
mode=ubi
image=mtd.ubifs
vol_id=0
vol_size=500MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize

And then no matter I burn the ubifs.img in bootloader or linux , it always pop up many ubi_io_read: error -74 (ECC error) during ubiattach .

in the bootloader I use 

load mmc 0 0x81000000 ubifs.img

nand write 0x81000000  0xa00000 0xf800000

In the linux  I use

flash_eraseall /dev/mtd9

ubiformat /dev/mtd9 -O 2048 -s 2048 -f ubifs.img

ubiattach /dev/ubi_ctrl  -O 2048 -m 9

My nand dts setting

&gpmc {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&nand_default>;
ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */
nand@0,0 {
reg = <0 0 4>; /* device IO registers */
ti,nand-ecc-opt = "bch8";
ti,elm-id = <&elm>;
nand-bus-width = <8>;
gpmc,device-width = <2>;
gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <80>;
gpmc,cs-wr-off-ns = <80>;
gpmc,adv-on-ns = <0>;
gpmc,adv-rd-off-ns = <60>;
gpmc,adv-wr-off-ns = <60>;
gpmc,we-on-ns = <10>;
gpmc,we-off-ns = <50>;
gpmc,oe-on-ns = <4>;
gpmc,oe-off-ns = <40>;
gpmc,access-ns = <40>;
gpmc,wr-access-ns = <80>;
gpmc,rd-cycle-ns = <80>;
gpmc,wr-cycle-ns = <80>;
gpmc,bus-turnaround-ns = <0>;
gpmc,cycle2cycle-delay-ns = <0>;
gpmc,clk-activation-ns = <0>;
gpmc,wait-monitoring-ns = <0>;
gpmc,wr-data-mux-bus-ns = <0>;
/* MTD partition table */
/* All SPL-* partitions are sized to minimal length
* which can be independently programmable. For
* NAND flash this is equal to size of erase-block */
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "NAND.SPL";
reg = <0x00000000 0x000020000>;
};
partition@1 {
label = "NAND.SPL.backup1";
reg = <0x00020000 0x00020000>;
};
partition@2 {
label = "NAND.SPL.backup2";
reg = <0x00040000 0x00020000>;
};
partition@3 {
label = "NAND.SPL.backup3";
reg = <0x00060000 0x00020000>;
};
partition@4 {
label = "NAND.u-boot-spl-os";
reg = <0x00080000 0x00040000>;
};
partition@5 {
label = "NAND.u-boot";
reg = <0x000c0000 0x00100000>;
};
partition@6 {
label = "NAND.u-boot-env";
reg = <0x001c0000 0x00020000>;
};
partition@7 {
label = "NAND.u-boot-env.backup1";
reg = <0x001e0000 0x00020000>;
};
partition@8 {
label = "NAND.kernel";
reg = <0x00200000 0x00800000>;
};
partition@9 {
label = "NAND.file-system";
reg = <0x00a00000 0x1f600000>; // 502M
};
};
};

20160729-nandboot-1.log.txt