From: "hellohello" <hellohello008@163.com>
To: "linuxppc-dev list" <linuxppc-dev@ozlabs.org>
Subject: JFFS2 question : Mounting /dev/mtdblock1 failed , NOR flash
Date: Mon, 16 Aug 2010 17:44:16 +0800 [thread overview]
Message-ID: <00e901cb3d27$97f473b0$9d1cbcc0@sfdomain.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]
I have one NOR flash, sector size is 128k.
I want to make jffs2 filesystem on it to store data.
I have used flash_eraseall -j to format it as jffs2.
But I meet the problem when mount the /dev/mtdblock1.
Thanks for any pointers or ideas.
-sh-2.05b# mount -t jffs2 /dev/mtdblock1 /mnt/jffs
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 42
mount: Mounting /dev/mtdblock1 on /mnt/jffs failed: Input/output error
I have used mtd_debug cmd to test, and result is right:
# cat /proc/mtd
dev: size erasesize name
mtd1: 00540000 00020000 "jffs"
mtd2: 00180000 00020000 "others"
# mtd_debug erase /dev/mtd1 0x0 0x20000
MTD_open
MTD_ioctl
Erased 131072 bytes from address 0x00000000 in flash
MTD_close
# dd if=/dev/zero of=file.img bs=1k count=128
128+0 records in
128+0 records out
# mtd_debug write /dev/mtdblock1 0x0 0x20000 file.img
Copied 131072 bytes from file.img to address 0x00000000 in flash
# mtd_debug read /dev/mtdblock1 0x0 0x20000 file_rd.img
Copied 131072 bytes from address 0x00000000 in flash to file_rd.img
# cmp -l file.img file_rd.img
#
Here is the detail error info:
-sh-2.05b# flash_eraseall -j /dev/mtd1
MTD_open
MTD_ioctl
MTD_ioctl
Erasing 128 Kibyte @ 0 -- 0 % MTD_ioctl
complete.MTD_write
ErasiMTD_ioctlen at 0.
ng 128 Kibyte @ 20000 -- 2 % complete.MTD_write
EMTD_ioctlritten at 20000.
rasing 128 Kibyte @ 40000 -- 4 % complete.MTD_write
EMTD_ioctlritten at 40000.
... ...
... ...
MTD_ioctlwritten at 500000.
Erasing 128 Kibyte @ 520000 -- 97 % complete.MTD_write
MTD_closewritten at 520000.
Erasing 128 Kibyte @ 540000 -- 100% complete.
-sh-2.05b# mount -t jffs2 /dev/mtdblock1 /mnt/jffs
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 42
mount: Mounting /dev/mtdblock1 on /mnt/jffs failed: Input/output error
[-- Attachment #2: Type: text/html, Size: 3246 bytes --]
reply other threads:[~2010-08-16 9:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00e901cb3d27$97f473b0$9d1cbcc0@sfdomain.com' \
--to=hellohello008@163.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).