在安装时,JFFS2 CLEANMARKER尺寸从默认的0x0C(12B)变为0x0200(512B)。
当我将测试图像挂载到目标hw(NOR)上时,我看到了这种行为,当我将任何文件复制到文件系统时,文件系统大小以疯狂的方式增加。
试验台
我创建了一个512kB的“aa55”文件,仅供参考,并创建了JFFS2文件系统未压缩的图像(擦除块128kB页4kB)
dd if=<(yes $'\xaa55' |tr -d "\n") of=firma_512kB.txt bs=1024 count=512
mkdir firma/
cp firma
cp firma_512kB.txt firma/
sudo mkfs.jffs2 -v -o firma_512.jffs2 -e 0x20000 -s 0x1000 -m none -d firma/
在目标上,图像被复制到mtd14。 (之前已被删除。看看CLEANMARKER的大小是0x0c)
flash_eraseall -j /dev/mtd14
00000000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 ff ff ff ff |... ............|
00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
...
000a0000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 ff ff ff ff |... ............|
000a0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000c0000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 ff ff ff ff |... ............|
000c0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
...
*
00860000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 ff ff ff ff |... ............|
00860010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00880000
图像复制到mtd15设备和检查,显示...(可以看到图像复制正常,CLEANMARKER尺寸仍为0x0c)
dd if=firma_512.jffs2 of=/dev/mtd14
hexdump -C /dev/mtd14
(hexdump -C /dev/mtdblock14 gives the same result)
....
00081340 85 19 02 e0 44 10 00 00 6d 58 d1 84 02 00 00 00 |....D...mX......|
00081350 84 00 00 00 a4 81 00 00 e8 03 e8 03 00 00 08 00 |................|
00081360 a3 dc df 53 a3 dc df 53 a3 dc df 53 00 f0 07 00 |...S...S...S....|
00081370 00 10 00 00 00 10 00 00 00 00 00 00 db 7c 54 f0 |.............|T.|
00081380 3c 30 bd 6f aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 |<0.o.U.U.U.U.U.U|
00081390 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 |.U.U.U.U.U.U.U.U|
*
00082380 aa 55 aa 55 ff ff ff ff ff ff ff ff ff ff ff ff |.U.U............|
00082390 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000a0000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 ff ff ff ff |... ............|
000a0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000c0000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 ff ff ff ff |... ............|
000c0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
现在脑死亡问题,至少对我而言。 mount -t jffs2 / dev / mtdblock14 / mnt / app2
dmesg
CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x200
...
CLEANMARKER node found at 0x000c0000 has totlen 0xc != normal 0x200
CLEANMARKER node found at 0x000e0000 has totlen 0xc != normal 0x200
...
CLEANMARKER node found at 0x00860000 has totlen 0xc != normal 0x200
hexdump -C /dev/mtd14
....
00081340 85 19 02 e0 44 10 00 00 6d 58 d1 84 02 00 00 00 |....D...mX......|
00081350 84 00 00 00 a4 81 00 00 e8 03 e8 03 00 00 08 00 |................|
00081360 a3 dc df 53 a3 dc df 53 a3 dc df 53 00 f0 07 00 |...S...S...S....|
00081370 00 10 00 00 00 10 00 00 00 00 00 00 db 7c 54 f0 |.............|T.|
00081380 3c 30 bd 6f aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 |<0.o.U.U.U.U.U.U|
00081390 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 |.U.U.U.U.U.U.U.U|
*
00082380 aa 55 aa 55 ff ff ff ff ff ff ff ff ff ff ff ff |.U.U............|
00082390 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000a0000 85 19 03 20 00 02 00 00 67 db 4c ad ff ff ff ff |... ....g.L.....|
000a0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000c0000 85 19 03 20 00 02 00 00 67 db 4c ad ff ff ff ff |... ....g.L.....|
000c0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000e0000 85 19 03 20 00 02 00 00 67 db 4c ad ff ff ff ff |... ....g.L.....|
000e0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
CLEANMARKER的尺寸变化不仅造成混乱,而且浪费了设备的大量空间。为什么在装载时会改变它?可以避免吗?
欢迎您提出建议/建议
目标谴责:
Linux的2.6.31
NOR:Spansion S29GL512S(擦除扇区128kB页面大小4kB x16dBUS)