Skip to contentSkip to conversation

problem with build jffs2 filesystem

DISCUSSION fyaowen 2 participants 2 messages Mar 30, 2002 Memory technology devices (MTD)

lore
Share & tools
lore

fyaowen

author
#0 lore raw

Hi, all
I am running linux-2.4.2-rmk2-np2 on Assabet + Neponset. There is total 64M flash memory on them. I have patitioned it as follows:
length device name

0x00040000     mtd0     bootloader   \
0x000c0000     mtd1     kernel        |
0x00300000     mtd2     ramdisk       |  on Assabet (32M)
0x01c00000     mtd3     apps         /
0x00040000     mtd4     bootloader1  \
0x000c0000     mtd5     kernel1       | 
0x00300000     mtd6     ramdisk1      |  on Neponset(32M) 
0x00e00000     mtd7     apps1         |
0x00e00000     mtd8     apps2        /

I want to make jffs2 filesystem on mtd7:
mkfs.jffs2 -e 0x00040000 -p -r some/dir -o jffs2.image (build a jffs2 image, am I right?)

dd if=jffs2.image of=/dev/mtd7
mount -t jffs2 /dev/mtd7 /mnt

After I gave out this instruction, all partitions on Neponset were erased.

This is the messages from the kernel.
jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00000000: 0xffff instead jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00000004: 0xffff instead jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00000008: 0xffff instead
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00040000: 0xffff instead jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00040004: 0xffff instead jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00040008: 0xffff instead
JFFS2: Erase block at 0x00040000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00080000: 0xffff instead jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00080004: 0xffff instead jffs2_scan_eraseblock(): Magic bitmask 0x1984 not found at 0x00080008: 0xffff instead
JFFS2: Erase block at 0x00080000 is not formatted. It will be erased

What's wrong with it?
Any help is appreciated.

fyaowen

______________________________________

===================================================================
������ѵ������� (http://mail.sina.com.cn)
���˷�����Ϣ�������г���һ�ߣ��ó���ʱ�ͳ��֣� (http://classad.sina.com.cn/2shou/)

#1 lore raw
Quoted 4 lines · [email protected] said:

dd if=jffs2.image of=/dev/mtd7
mount -t jffs2 /dev/mtd7 /mnt
After I gave out this instruction, all partitions on Neponset were erased.

That mount command should have failed. You cannot mount the character device.

--
dwmw2