jffs2挂flash时,报下面错误的一个解决方法

来源:互联网 发布:程序员眼睛疼 编辑:程序博客网 时间:2024/05/16 17:24

Further such events for this erase block will not be printed


jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320000: 0xcdae instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320004: 0xfa5e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320008: 0xe72a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0032000c: 0x4f7c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320010: 0xfe9f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320014: 0xb5bc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320018: 0xa15d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0032001c: 0x73df instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320020: 0x9ebf instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00320024: 0xdfdf instead

(none) login: root


出上面问题原因是我用rootfs.jffs2烧写的,文件大小是3.2M,然后UBOOTFLASH时,写的大小是4M,把多余0.8MDDR数据写到了FLASH中,内核的JFFS2可能对JFFS2文件结尾比较敏感,如果多出来的部分不是字节0的填充,就出问题了。解决方法就是生成一个4M大小的rootfs.bin,前面3.2Mrootfs.jffs2填充,后面为0,问题就解决了。

 

下面两条命令生成4Mrootfs.bin

dd if=/dev/zero    of=rootfs.binbs=1M   count=4

dd if=out/rootfs.jffs2  of=rootfs.bin conv=notrunc

 

tftp 0x82000000 huqiang/rootfs.jffs2;sf probe0:0 24000000 0;sf erase 0x340000 0x400000;sf write 0x82000000 0x340000 0x400000
0 0
原创粉丝点击