移植UBI的5号错误————UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 0:512, written 0 byte

 1、5号错误

UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 0:512, written 0 bytes

查阅include/asm-generic/error.h发现5号错误的定义为“#define EIO  5 /* I/O error */”。
http://www.linux-mtd.infradead.org/faq/ubi.html#L_subpage_verify_fail 有对这个问题的专门描述:
I get "ubi_io_write: error -5 while writing 512 bytes to PEB 5:512"
If you have a 2048 bytes per NAND page device, and have CONFIG_MTD_NAND_VERIFY_WRITE enabled in your kernel, you will need to turn it off. The code does not currently (as of 2.6.26) perform verification of sub-page writes correctly. As UBI is one of the few users of sub-page writes, not much else seems to be affected by this bug.

虽然是说Linux内核配置,可是u-boot中同样有CONFIG_MTD_NAND_VERIFY_WRITE ,在smartarm3250.h中将这个宏注释掉,问题解决。要在内核中把MTD_NAND_VERIFY_WRITE这个宏关闭

     Device Drivers  --->  

        <*> Memory Technology Device (MTD) support  ---> 

              <*>   NAND Device Support  --->  

                       [ ]   Verify NAND page writes 


2、19号错误

内核找不到分区,也就是你的bootargs变量设置错误,ubi.mtd=(你要烧到的分区)

你可能感兴趣的:(移植UBI的5号错误————UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 0:512, written 0 byte)