jffs2 problem
Hi,
I'm trying to use latest MTD CVS snapshot to create jffs2 image and boot my ARM target using that image as rootfs. Booting halts at:
...jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0xfe48 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0xa2f9 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x8db7 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x9549 instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x000073a0
You cannot use older JFFS2 filesystems with newer kernels
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
SR.4 or SR.5 bits set in buffer write (status b0). Clearing.
This is on 2.6.12.2. On 2.6.9 image is correctly mounted and booted. I belive that mkfs.jffs2 is one of the latest -
$ mkfs.jffs2 --version mkfs.jffs2: revision 1.45
- and image is created with:
mkfs.jffs2 -e 131072 -r <dir> -o rootfs.jffs2
Am I missing something here?
regards,
hk
Signature · 4 lines
..because under Linux "if something is possible in principle, then it is already implemented or somebody is working on it". --LKI
Quoted 3 lines · Hinko Kocevar
Hi,
I'm trying to use latest MTD CVS snapshot to create jffs2 image and boot my ARM target using that image as rootfs. Booting halts at:
How did you check that your (probably correct) image was correctly written to the flash? May be there are some driver-level problems ? What kind of flash is that ?
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Quoted 9 lines · Artem B. Bityuckiy
Quoted 3 lines · Hinko Kocevar
Hi,
I'm trying to use latest MTD CVS snapshot to create jffs2 image and boot my ARM target using that image as rootfs. Booting halts at:
How did you check that your (probably correct) image was correctly written to the flash? May be there are some driver-level problems ? What kind of flash is that ?
Flash is NOR Intel E28F128J3A150.
I'm booting with NFS enabled kernel and rootfs over NFS, then erasing mtd partition that holds rootfs and then copying rootfs.jffs2 to mtd partition like this:
$ flash_eraseall /dev/mtd2 $ cp /tmp/rootfs.jffs2 /dev/mtd2
I can mount jffs2 partition afterwards with:
$ mount -t jffs2 /dev/mtdblock2 /mnt/jffs2 $ ls /mnt/jffs2/ bin etc linuxrc proc staging usr dev lib mnt sbin tmp var
regards,
hk
Signature · 4 lines
..because under Linux "if something is possible in principle, then it is already implemented or somebody is working on it". --LKI
Quoted 3 lines
Flash is NOR Intel E28F128J3A150.
I'm booting with NFS enabled kernel and rootfs over NFS, then erasing mtd partition that holds rootfs and then copying rootfs.jffs2 to mtd partition like this:
Could you please enable JFFS2 debugging and post its output?
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Quoted 7 lines · Artem B. Bityuckiy
Quoted 3 lines
Flash is NOR Intel E28F128J3A150.
I'm booting with NFS enabled kernel and rootfs over NFS, then erasing mtd partition that holds rootfs and then copying rootfs.jffs2 to mtd partition like this:
Could you please enable JFFS2 debugging and post its output?
There you go. This is with JFFS2 debug set to 2 and MTD debug set to 3.
...
NET: Registered protocol family 17jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x234a instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x755a instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x7404 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x2e9e instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x7084 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x3922 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x3d61 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x8bd7 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x71ed instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x0f2a instead Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00005ae4
You cannot use older JFFS2 filesystems with newer kernels
Old JFFS2 bitmask found at 0x00006d1c
You cannot use older JFFS2 filesystems with newer kernels
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased SR.4 or SR.5 bits set in buffer write (status b0). Clearing.
I dont't understand why would JFFS2 complain about older fs and newer kernel if I'm using mkfs.jffs2 from July 2005 snapshot?!
Signature · 4 lines
..because under Linux "if something is possible in principle, then it is already implemented or somebody is working on it". --LKI
Quoted 4 lines · Hinko Kocevar
There you go. This is with JFFS2 debug set to 2 and MTD debug set to 3.
...
NET: Registered protocol family 17jffs2_scan_eraseblock(): Magic bitmask0x1985not found at0x00000000:0x234ainstead
Even though you enabled JFFS2 debugging,
the debugging messages are not seen on your console.
Could you please dump the first N (say, 128) bytes at the offset 0x00000000 of the JFFS2 partition (/dev/mtd2)? Does it contain 0x234a (LE) as the first 16-bit word?
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Quoted 10 lines · Artem B. Bityuckiy
Quoted 4 lines · Hinko Kocevar
There you go. This is with JFFS2 debug set to 2 and MTD debug set to 3.
...
NET: Registered protocol family 17jffs2_scan_eraseblock(): Magic bitmask0x1985not found at0x00000000:0x234ainsteadEven though you enabled JFFS2 debugging,
the debugging messages are not seen on your console.
Maybe
echo 8 > /proc/sys/kernel/printk
???
--
Steven
Quoted 1 line · Steven Scholz
echo 8 >
/proc/sys/kernel/printk
Yep, or 'dmesg -n8'
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Quoted 8 lines · Artem B. Bityuckiy
Quoted 4 lines · Hinko Kocevar
There you go. This is with JFFS2 debug set to 2 and MTD debug set to 3.
...
NET: Registered protocol family 17jffs2_scan_eraseblock(): Magic bitmask0x1985not found at0x00000000:0x234ainstead
Quoted 5 lines
Even though you enabled JFFS2 debugging,
the debugging messages are not seen on your console.Could you please dump the first N (say, 128) bytes at the offset
0x00000000of the JFFS2 partition (/dev/mtd2)? Does it contain0x234a(LE) as the first 16-bit word?
Creating 3 MTD partitions on "Trizeps2 flash":
0x00000000-0x00060000 : "Bootloader"
mtd: Giving out device 0 to Bootloader
0x00060000-0x00140000 : "Kernel"
mtd: Giving out device 1 to Kernel
0x00140000-0x01000000 : "Filesystem"
mtd: Giving out device 2 to Filesystem
Core#0>md 0x140000
00140000 : 20031985 0000000c e41eb0b1 e0011985 ... ............ 00140010 : 0000002b 7d266ee6 00000001 00000000 +....n&}........ 00140020 : 00000002 424913b1 00000403 daeea20c ......IB........ 00140030 : 556683ff ff6e6962 e0021985 00000044 ..fUbin.....D... 00140040 : 98f7fb1d 00000002 00000001 000041ed .............A.. 00140050 : 006403e8 00000000 424913b1 424913b1 ..d.......IB..IB 00140060 : 424913b1 00000000 00000000 00000000 ..IB............ 00140070 : 00000000 00000000 379225cb e0011985 .........%.7.... 00140080 : 0000002b 7d266ee6 00000001 00000001 +....n&}........ 00140090 : 00000003 4242dd58 00000403 855955ad ....X.BB.....UY. 001400a0 : ee322817 ff766564 e0021985 00000044 .(2.dev.....D... 001400b0 : 98f7fb1d 00000003 00000001 000041ed .............A.. 001400c0 : 006403e8 00000000 4242dd58 4242dd58 ..d.....X.BBX.BB 001400d0 : 4242dd58 00000000 00000000 00000000 X.BB............ 001400e0 : 00000000 00000000 c54033c0 e0011985 .........3@..... 001400f0 : 0000002b 7d266ee6 00000001 00000002 +....n&}........
I've spotted possible problem here - it seems that kernel overwrites part of the rootfs at the begining - I have reserved 0xe0000 for kernel partition, but I noticed that my newer kernels are larger than this. Need to check this out...
Signature · 4 lines
..because under Linux "if something is possible in principle, then it is already implemented or somebody is working on it". --LKI
Quoted 3 lines · Hinko Kocevar
I've spotted possible problem here - it seems that kernel overwrites part of the rootfs at the begining - I have reserved
0xe0000for kernel partition, but I noticed that my newer kernels are larger than this. Need to check this out...
Yep, that was it. If my memory serves me well, I already had similar problems a while ago when I had to raise the kernel mtd partition from ~600k to 900k.
Where is this re-sizing gonna stop? ;)
Sorry for the noise.
Signature · 4 lines
..because under Linux "if something is possible in principle, then it is already implemented or somebody is working on it". --LKI