烧写jffs2遇到的问题及解决方法

原文地址:http://blog.sina.com.cn/s/blog_4ab2ba57010194e6.html

最近在弄hi3531的开发板,自制文件系统烧写进32M spi flash启动后出现如下问题:
Node at 0x0000f568 with length 0x00000b20 would run over theend of the erase block
Perhaps the file system was created with the wrong erasesize?
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f56c: 0x0b20 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f570: 0x74a8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f574: 0x001d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f578: 0x0014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f57c: 0x81ed instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f580: 0x01fd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f584: 0x7b70 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f588: 0x08ca instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f58c: 0x08ca instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x0000f590: 0x08ca instead
Further such events for this erase block will not beprinted
usb 1-1: new high speed USB device number 43 usinghiusb-ehci
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x00010000: 0xfd51 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x00010004: 0xc38c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at0x00010008: 0x9d64 instead
仔细检查之后发现是制作文件系统时块大小设置错了,只要修改mkfs.jffs2后-e的参数即可,例如本例,现在spiflash的块大小只有64k,而我制作文件系统之时设置成256k即0x40000,修改如下:
#osdrv/pub/bin/pc/mkfs.jffs2 -d osdrv/pub/rootfs_uclibc -l -e 0x40000 -oosdrv/pub/rootfs_uclibc_256k.jffs2
osdrv/pub/bin/pc/mkfs.jffs2 -d osdrv/pub/rootfs_uclibc -l -e 0x10000 -oosdrv/pub/rootfs_uclibc_256k.jffs2

你可能感兴趣的:(linux驱动)