<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3698" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV> </DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>I have one NOR flash£¬ sector size is 128k.
</FONT></DIV>
<DIV>I want to make jffs2 filesystem on it to store data.</DIV>
<DIV>I have used flash_eraseall -j to format it as jffs2.</DIV>
<DIV>But I meet the problem when mount the /dev/mtdblock1.</DIV>
<DIV>Thanks for any pointers or ideas.</DIV>
<DIV> </DIV>
<DIV>
<DIV><FONT size=2>-sh-2.05b# mount -t jffs2 /dev/mtdblock1 /mnt/jffs
<BR>Cowardly refusing to erase blocks on filesystem with no valid JFFS2
nodes<BR>empty_blocks 0, bad_blocks 0, c->nr_blocks 42<BR>mount: Mounting
/dev/mtdblock1 on /mnt/jffs failed: Input/output error</FONT></DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>I have used mtd_debug cmd to test, and result is right:<FONT
size=2><BR></FONT></DIV>
<DIV>
<DIV>
<DIV><FONT size=2></FONT></DIV><FONT size=2><FONT size=2># cat
/proc/mtd<BR>dev: size erasesize
name</FONT></DIV>
<DIV>
<DIV><FONT size=2>mtd1: 00540000 00020000 "jffs"<BR>mtd2: 00180000 00020000
"others"</FONT></DIV></FONT></DIV></DIV>
<DIV> </DIV>
<DIV># mtd_debug erase /dev/mtd1 0x0 0x20000 <BR>MTD_open<BR>MTD_ioctl<BR>Erased
131072 bytes from address 0x00000000 in flash<BR>MTD_close<BR># dd if=/dev/zero
of=file.img bs=1k count=128<BR>128+0 records in<BR>128+0 records out<BR>#
mtd_debug write /dev/mtdblock1 0x0 0x20000 file.img<BR>Copied 131072 bytes from
file.img to address 0x00000000 in flash<BR># mtd_debug read /dev/mtdblock1 0x0
0x20000 file_rd.img<BR>Copied 131072 bytes from address 0x00000000 in flash to
file_rd.img<BR># cmp -l file.img file_rd.img<BR># </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Here is the detail error info:</DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>-sh-2.05b# flash_eraseall -j
/dev/mtd1<BR>MTD_open<BR>MTD_ioctl<BR>MTD_ioctl<BR>Erasing 128 Kibyte @ 0
-- 0 % MTD_ioctl<BR>complete.MTD_write<BR>ErasiMTD_ioctlen at 0.<BR>ng 128
Kibyte @ 20000 -- 2 % complete.MTD_write<BR>EMTD_ioctlritten at
20000.<BR>rasing 128 Kibyte @ 40000 -- 4 %
complete.MTD_write<BR>EMTD_ioctlritten at 40000.<BR>... ...</FONT></DIV>
<DIV><FONT size=2>... ...<BR>MTD_ioctlwritten at 500000.<BR>Erasing 128 Kibyte @
520000 -- 97 % complete.MTD_write<BR>MTD_closewritten at 520000.<BR>Erasing 128
Kibyte @ 540000 -- 100% complete.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>-sh-2.05b# mount -t jffs2 /dev/mtdblock1 /mnt/jffs
<BR>Cowardly refusing to erase blocks on filesystem with no valid JFFS2
nodes<BR>empty_blocks 0, bad_blocks 0, c->nr_blocks 42<BR>mount: Mounting
/dev/mtdblock1 on /mnt/jffs failed: Input/output
error</FONT></DIV></FONT></DIV></BODY></HTML>