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.

U-boot NAND读取文件系统出错,ECC: uncorrectable.



自己制作jffs2文件系统使用参数

mkfs.jffs2 -lqn -s 1024 -e  0x20000 -r rootfs -o /mnt/hgfs/work/rd-jffs2.bin -p 0xC820000

我的FLASH

通过u-boot烧写之后,运行第一遍并没有问题,没有打印错误信息,但是reboot之后或者关机之后重启,就会在u-boot从NAND中读取jffs2时出现

NAND read: device 0 offset 0x6c0000, size 0x27e0000
ECC: uncorrectable.
ECC: uncorrectable.
ECC: uncorrectable.
ECC: uncorrectable.
ECC: uncorrectable.......

而且后面挂在jffs2时出现 mtd->read(0x13800 bytes from 0x27cc800) returned ECC error

但是似乎系统可以进的去,而且正常运行。

估计mkfs.jffs2参数是不是有问题,尝试改了很多次,依然出现这个问题。

  • Chi Xiaoyan,

    你使用的是哪款芯片?

  • 忘了说了,8148,还有只有文件系统出现ECC: uncorrectable,从flash中读kernel没有错误

  • Chi Xiaoyuan,

    你使用的是哪个版本的kernel?你的ECC使用的是1-bit ECC么?

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_NAND_Driver_User_Guide

    Note: Due to constrain of metadata layout in OOB area, only '1-bit Hamming H/W' or '1-bit Hamming S/W' ECC schemes can be used with JFFS2 File-system

  • 我的kernel版本是2.6.37,使用的是BCH-8 HW ECC

    NAND read: device 0 offset 0x6c0000, size 0x27e0000
    ECC: uncorrectable.
    ECC: uncorrectable.
    ................(中间有很多ECC: uncorrectable.)
    NAND read from offset 6c0000 failed -74
    41811968 bytes read: ERROR
    ## Booting kernel from Legacy Image at 81000000 ...
    Image Name: Linux-2.6.37
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2753180 Bytes = 2.6 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

    我看打印信息是在u-boot阶段出现错误的,kernel最后能启动,文件系统最后也进去了,就是这地方打印ECC错误

  • Chi Xiaoyan,

    之前帖子已经提到了,如果使用8-bit ECC,对于jffs2文件系统obb区域不够放。

    如果你使用8-bit ECC,文件系统可使用ubi。

  • 你好,

    我按照你说的做了,换成UBI,同样的问题还是会出现

    NAND read: device 0 offset 0x6c0000, size 0x27c0000
    ECC: uncorrectable.
    ECC: uncorrectable.
    ECC: uncorrectable.
    NAND read from offset 6c0000 failed -74
    41680896 bytes read: ERROR

    下面是挂在文件系统打印的

    UBI error: ubi_io_read: error -74 (ECC error) while reading 129024 bytes from PEB 3:2048, read 129024 bytes
    UBI error: ubi_io_read: error -74 (ECC error) while reading 129024 bytes from PEB 4:2048, read 129024 bytes
    UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    UBIFS: file system size: 190568448 bytes (186102 KiB, 181 MiB, 1477 LEBs)
    UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
    UBIFS: media format: w4/r0 (latest is w4/r0)
    UBIFS: default compressor: lzo
    UBIFS: reserved for root: 0 bytes (0 KiB)

    我用的还是BCH-8,一样的现象,第一次烧写没有出错,之后重启再运行就会出错

  • Chi Xiaoyan,

    你能否确认你在uboot和kernel里面使用的都是BCH-8?

  • Chi Xiaoyan,

    请问你使用的软件是IPNC RDK3.8么?如果是,请根据下面的论坛讨论打一下补丁看看。

    https://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/t/361486

  • 看了你的建议之后,又逛了一天论坛,都没成功,不过还是谢谢你

    但是我最后还是弄成了..........虽然是歪打正着,我想测试一下tftp,拷了一个文件进flash,结果就好了...........一直没有出现ECC报警........

    希望有大神给解释一下,真的莫名其妙