最近在弄hi3520Dv300的开发板,自制文件系统烧写进32M spi flash启动后出现如下问题:
Node at 0x0000f568 with length 0x00000b20 would run over the end of the erase block
Perhaps the file system was created with the wrong erase size?
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f56c: 0x0b20 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f570: 0x74a8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f574: 0x001d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f578: 0x0014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f57c: 0x81ed instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f580: 0x01fd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f584: 0x7b70 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f588: 0x08ca instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f58c: 0x08ca instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000f590: 0x08ca instead
Further such events for this erase block will not be printed
usb 1-1: new high speed USB device number 43 using hiusb-ehci
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0xfd51 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0xc38c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0x9d64 instead
情况1:
仔细检查之后发现是制作文件系统时块大小设置错了,只要修改mkfs.jffs2后-e的参数即可,例如本例,现在spi flash的块大小只有64k,而我制作文件系统之时设置成256k即0x40000,修改如下:
#osdrv/pub/bin/pc/mkfs.jffs2 -d osdrv/pub/rootfs_uclibc -l -e 0x40000 -o osdrv/pub/rootfs_uclibc_256k.jffs2
osdrv/pub/bin/pc/mkfs.jffs2 -d osdrv/pub/rootfs_uclibc -l -e 0x10000 -o osdrv/pub/rootfs_uclibc_256k.jffs2
情况2:
mw.b 82000000 ff b00000 需写入FF才能继续,否则出错。
tftp 0x82000000 rootfs_hi3521a_64k.jffs2
sf probe 0
sf erase 500000 b00000
sf write 82000000 500000 b00000