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.

通过应用程序更新ubifs根文件系统挂接失败

使用的是飞凌嵌入式的开发板,但是用的uboot和kernel内核都是ti官网上下载,具体的是这样的:使用mtd_utils制作了mkfs.ubifs和ubinize,并且使用这两个工具生成了ubi.img跟文件镜像,我把MLO、uboot.ing、zImage、ubi.img等都拷贝到sd卡中,在uboot中通过一系列命令将这些文件从sd卡中分别拷入对应的nandflash分区,然后重新上电从nandflash启动,一切正常,ubifs根文件系统的挂接也正常,可以运行应用程序。

我自己做了一个上位机来对开发板进行远程更新跟文件系统,先擦除,后烧写,按块来写,每块写64页,等显示所有数据均已发送完毕,升级成功后,重新上电,但是在挂接跟文件的时候出错了:

[ 1.751703] ubi0: attaching mtd9
[ 1.863985] ubi0 warning: ubi_attach: valid VID header but corrupted EC header at PEB 176
[ 1.872268] ubi0 error: ubi_compare_lebs: unsupported on-flash UBI format
[ 1.879393] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd9, error -22
[ 1.886604] UBI error: cannot attach mtd9
[ 1.891991] input: volume_keys0 as /devices/platform/volume_keys0/input/input0
[ 1.900505] hctosys: unable to open rtc device (rtc0)
[ 1.906566] ALSA device list:
[ 1.909565] No soundcards found.
[ 1.914036] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
[ 1.922211] Please append a correct "root=" boot option; here are the available partitions:
[ 1.930625] 0100 65536 ram0
[ 1.930631] (driver?)
[ 1.936839] 0101 65536 ram1
[ 1.936843] (driver?)
[ 1.943038] 0102 65536 ram2
[ 1.943042] (driver?)
[ 1.949183] 0103 65536 ram3
[ 1.949187] (driver?)
[ 1.955355] 0104 65536 ram4

我猜想是不是在更新中数据出错了,于是重新上电到uboot中把nandflash中的数据打印出来看一下,当然数据太多了,20多M,我只是选取了头、中间、尾部的一些数据来看,来和ubi.img文件进行比较,数据好像也没有什么错。

因为经验不够,没有什么思路来解决这个问题,所以发帖求助一下,希望大神们能给些建议。