b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

dm368 ecc 移植ubifs到dm368成功

电脑杂谈  发布时间:2017-06-04 14:03:05  来源:网络整理

我在用TI的dm368开发板,kernel是2.6.32.17,默认的flash文件系统是jffs2,但是jffs2在大分区下,mount速度很慢,而且占用ram较多,因此,我想使用ubifs看看性能是否会更好些。

ubifs的原理和配置过程,很多网页都有介绍的,我给一个链接,大家可以看看,我就不转载了,我重点说我移植过程中遇到并解决的问题。

kerne的配置很简单,2.6.32里面都有,选上并重新编译就好了。

ubiattach、ubimkvol等工具,TI的dvsdk里面自带了,能用,我就偷了个懒,没有重新编译。

很轻松的照着网页说明操作了下,mount 分区也成功了,复制文件也成功了,很高兴:)

ubiattach /dev/ubi_ctrl -m 3

ubimkvol /dev/ubi0 -N rootfs -s 480MiB

mount -t ubifs ubi0_0 /mnt/nand/ -o sync

但很快就遇到麻烦了,开发板关机重新启动,我再mout ubi文件系统就出错了,提示了一堆错误,而且分区是空的,之前复制的文件不见了。

问题如下:

ubiattach /dev/ubi_ctrl -m 3

UBI error: ubi_io_read: error -74while reading 64 bytes from PEB 1662:0, read 64 bytes

UBI error: ubi_io_read: error -74while reading 64 bytes from PEB 1663:0, read 64 bytes

为了分析问题,我把mtd和ubifs的debug log都打开了,看到了一些信息;

#define EBADMSG 74 /* Not a data message */

/*Nand returns -EBADMSG on ecc errors, but it returns

* the data. For our userspace tools it isimportant

* to dump areas with ecc errors !

* For kernel internal usage it also mightreturn -EUCLEAN

* to signal the caller that a bitflip hasoccured and has

* been corrected by the ECC algorithm.

* Userspace software which accesses NAND thisway

* must be aware of the fact that it deals withNAND

*/

nand_do_read_ops

stats= mtd->ecc_stats;

if(mtd->ecc_stats.failed - stats.failed)

return-EBADMSG;

nand_read_page_hwecc

stat= chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);

if(stat

mtd->ecc_stats.failed++;

else

mtd->ecc_stats.corrected+= stat;

看样子,应该是ECC出错了,可是我用的是硬件ECC校验,怎么可能几乎全部的page都出现ecc校验错误了呢?

root@dm368-evm:~#flash_eraseall /dev/mtd3


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/dianqi/article-51076-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...