From: Martin Egholm Nielsen <martin@egholm-nielsen.dk>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Reading or writing jffs2 - how?
Date: Wed, 15 Dec 2004 13:56:29 +0100 [thread overview]
Message-ID: <cppc9u$op8$1@sea.gmane.org> (raw)
Hi there,
I have tried to create a jffs2-image of the linux-filesystem I wish to
use, and then write it to my flash using "nand write.jffs2 100000 0
$(filesize)". But with no luck...
Then I began to investigate the fundamental "ls" and "nand erase"
commands, but neither there did I have any success. Below is a trace of
what I've tried in order to get something working.
In section 2, I'd expect the nand to be mountable from Linux - but's
it's not.
In section 3, I'd expect the filesystem to be ls'ed correct from u-boot
- but it's not...
Can someone tell me if there is something I've misunderstood?
********************************
********** 1 U-Boot ************
********************************
U-Boot 1.1.2 (Nov 27 2004 - 11:50:10)
CPU: IBM PowerPC 405EP Rev. B at 333.333 MHz (PLB=111, OPB=55, EBC=37 MHz)
==== 8< 8< 8< ====
NAND:Probing@0xff400000
64 MB
==== 8< 8< 8< ====
=> nand erase clean
NAND erase: device 0 offset 0, size 67108864 ... OK
=> ls
Scanning JFFS2 FS: done.
=>
*******************************
********** 2 Linux ************
*******************************
# cat /proc/mtd
dev: size erasesize name
mtd0: 04000000 00004000 "Trampoline Nand Flash (128 MB)"
# mount -t jffs2 /dev/mtdblock0 mnt/nand0
jffs2: Erase block size too small (16KiB). Using virtual blocks size
(32KiB) instead
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 1325, bad_blocks 4, c->nr_blocks 2048
mount: Mounting /dev/mtdblock0 on /mnt/nand0 failed: Invalid argument
# eraseall /dev/mtd0
Erasingnand_erase: attempt to erase a bad block at p 16 Kibyte @ 400age
0x00000020
0 -- 0 % complenand_erase: attempt to erase te.
eraseall: /a bad block at page 0x00000040
dev/mtd0: MTD Ernand_erase: attempt to erasase failure: Inpe a bad block
at page 0x00000060
nand_erase: attempt to erase a bad blo
Erasing 16 Kibck at page 0x00000080
yte @ 8000 -- 0nand_erase: attempt to er % complete.
erase a bad block at page 0x000000a0
aseall: /dev/mtd0: MTD Erase fainalure: Input/outpnd_erase: attempt to
erase a b
ad block at page 0x000000c0
ut error
Erasinand_erng 16 Kibyte @ case: attempt to erase a bad block at page
0x000000e0
000 -- 0 % complete.
eraseall: /dev/mtd0: MTD Erase failure: Input/output error
Erasing 16 Kibyte @ 10000 -- 0 % complete.
eraseall: /dev/mtd0: MTD Erase failure: Input/output error
Erasing 16 Kibyte @ 14000 -- 0 % complete.
eraseall: /dev/mtd0: MTD Erase failure: Input/output error
Erasing 16 Kibyte @ 18000 -- 0 % complete.
eraseall: /dev/mtd0: MTD Erase failure: Input/output error
Erasing 16 Kibyte @ 1c000 -- 0 % complete.
eraseall: /dev/mtd0: MTD Erase failure: Input/output error
Erased 65536 Kibyte @ 0 -- 100% complete.
# mount -t jffs2 /dev/mtdblock0 /mnt/nand0/
jffs2: Erase block size too small (16KiB). Using virtual blocks size
(32KiB) instead
# touch /mnt/nand0/testfile
# mkdir /mnt/nand0/testdir
# umount /mnt/nand0
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they all?
jffs2: Couldn't find erase block to garbage collect!
# mount -t jffs2 /dev/mtdblock0 /mnt/nand0/
jffs2: Erase block size too small (16KiB). Using virtual blocks size
(32KiB) instead
# ls -l /mnt/nand0/
drwxr-xr-x 2 0 0 0 Feb 8 05:59 testdir
-rw-r--r-- 1 0 0 0 Feb 8 05:59 testfile
********************************
********** 3 U-Boot ************
********************************
=> ls
Scanning JFFS2 FS: done.
=>
Best regards,
Martin Egholm
next reply other threads:[~2004-12-15 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-15 12:56 Martin Egholm Nielsen [this message]
2004-12-15 20:47 ` [U-Boot-Users] Reading or writing jffs2 - how? Detlev Zundel
2004-12-15 20:56 ` Detlev Zundel
2004-12-16 15:11 ` [U-Boot-Users] " Martin Egholm Nielsen
2004-12-16 15:17 ` Martin Egholm Nielsen
2004-12-20 14:09 ` Martin Egholm Nielsen
2004-12-20 17:25 ` Detlev Zundel
2004-12-21 9:01 ` Martin Egholm Nielsen
2004-12-21 9:12 ` Wolfgang Denk
2004-12-21 9:30 ` Martin Egholm Nielsen
2004-12-21 12:07 ` Wolfgang Denk
2004-12-21 12:46 ` Martin Egholm Nielsen
2004-12-21 19:19 ` Detlev Zundel
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='cppc9u$op8$1@sea.gmane.org' \
--to=martin@egholm-nielsen.dk \
--cc=u-boot@lists.denx.de \
/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