* Problem mounting JFFS2
@ 2003-07-30 14:48 "David Müller (ELSOFT AG)"
2003-07-30 16:21 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: "David Müller (ELSOFT AG)" @ 2003-07-30 14:48 UTC (permalink / raw)
To: linux-mtd
Hello
I'm trying to get a JFFS2 filesystem on a 64MB NAND flash device working
on an ARM based system (running Linux-2.4.21 and the latest MTD CVS code).
I prepare the JFFS2 image on my host system like this
temp> mkfs.jffs2 --version
mkfs.jffs2: revision 1.38
temp> mkfs.jffs2 -d targetfs -o targetfs.img -e 16 -l -q -v -n
and burn it into the NAND device on the target. If i later try to mount
it under Linux with "mount -t jffs2 /dev/mtdblock/1 /mnt", i get the
following output:
jffs2: Erase block size too small (16KiB). Using virtual blocks size
(32KiB) instead
jffs2_check_nand_cleanmarker(): Cleanmarker node not detected in block
at 00000000
OOB at 00000000 was 33 f3 c0 ff f0 ff ff ff ff ff ff ff ff ff ff ff
jffs2_check_nand_cleanmarker(): Cleanmarker node not detected in block
at 000080
OOB at 00008000 was 03 f0 00 ff f0 ff ff ff ff ff ff ff ff ff ff ff
[deleted rest of cleanmarker check]
Ino #14 is absent but node not REF_PRISTINE. Reading.
ARGH. About to write node to 0x00004000 on flash, but there are data
already there:
0x00004000: 85 19 02 e0 20 03 00 00 10 25 f5 2e 0e 00 00 00
Write of 1576 bytes at 0x00004000 failed. returned -5, retlen 0
Not marking the space at 0x00004000 as dirty because the flash driver
returned retlen zero
Error writing new dnode: -5
Any idea what is going wrong?
TIA
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem mounting JFFS2
2003-07-30 14:48 Problem mounting JFFS2 "David Müller (ELSOFT AG)"
@ 2003-07-30 16:21 ` Thomas Gleixner
2003-07-31 9:31 ` "David Müller (ELSOFT AG)"
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2003-07-30 16:21 UTC (permalink / raw)
To: David Müller (ELSOFT AG), linux-mtd
On Wednesday 30 July 2003 16:48, David Müller (ELSOFT AG) wrote:
> Hello
>
> I'm trying to get a JFFS2 filesystem on a 64MB NAND flash device working
> on an ARM based system (running Linux-2.4.21 and the latest MTD CVS code).
>
> I prepare the JFFS2 image on my host system like this
>
> temp> mkfs.jffs2 --version
> mkfs.jffs2: revision 1.38
>
> temp> mkfs.jffs2 -d targetfs -o targetfs.img -e 16 -l -q -v -n
>
>
> and burn it into the NAND device on the target. If i later try to mount
> it under Linux with "mount -t jffs2 /dev/mtdblock/1 /mnt", i get the
> following output:
How do you burn it into the NAND device ? Are you updating the OOB area ?
read http://linux-mtd.infradead.org/tech/nand.html
use nandwrite from the util directory, if you can do it from a running system
> jffs2: Erase block size too small (16KiB). Using virtual blocks size
> (32KiB) instead
That's due to memory consumption. If we have 16KiB eraseblock size we need too
much memory to keep track of all eraseblocks. So we use virtual 32KiB blocks
instead.
> jffs2_check_nand_cleanmarker(): Cleanmarker node not detected in block
> at 00000000
> OOB at 00000000 was 33 f3 c0 ff f0 ff ff ff ff ff ff ff ff ff ff ff
> jffs2_check_nand_cleanmarker(): Cleanmarker node not detected in block
> at 000080
> OOB at 00008000 was 03 f0 00 ff f0 ff ff ff ff ff ff ff ff ff ff ff
> [deleted rest of cleanmarker check]
See above
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem mounting JFFS2
2003-07-30 16:21 ` Thomas Gleixner
@ 2003-07-31 9:31 ` "David Müller (ELSOFT AG)"
0 siblings, 0 replies; 3+ messages in thread
From: "David Müller (ELSOFT AG)" @ 2003-07-31 9:31 UTC (permalink / raw)
To: tglx; +Cc: linux-mtd
Hello
Thomas Gleixner wrote:
> On Wednesday 30 July 2003 16:48, David Müller (ELSOFT AG) wrote:
>
>>Hello
>>
>>I'm trying to get a JFFS2 filesystem on a 64MB NAND flash device working
>>on an ARM based system (running Linux-2.4.21 and the latest MTD CVS code).
>>
>>I prepare the JFFS2 image on my host system like this
>>
>>temp> mkfs.jffs2 --version
>>mkfs.jffs2: revision 1.38
>>
>>temp> mkfs.jffs2 -d targetfs -o targetfs.img -e 16 -l -q -v -n
>>
>>
>>and burn it into the NAND device on the target. If i later try to mount
>>it under Linux with "mount -t jffs2 /dev/mtdblock/1 /mnt", i get the
>>following output:
>
>
> How do you burn it into the NAND device ? Are you updating the OOB area ?
> read http://linux-mtd.infradead.org/tech/nand.html
> use nandwrite from the util directory, if you can do it from a running system
>
>
I'm using U-Boot's http://sourceforge.net/projects/u-boot "nand" command
to erase and write the NAND flash.
If i use the nandwrite command
# nandwrite --version
nandwrite 1.2
# nandwrite --jffs2 /dev/mtd/1 /tmp/targetfs.img
and mount it, the error is gone but the mounted filesystem is empty (no
files, not directories).
If i write the image using U-Boot's command, then there is the reported
error but the mounted filesystem is populated with directories and some
files (see below) although some files are missing or corrupt.
# ll /mnt/
total 0
drwxr-xr-x 2 0 0 0 Apr 23 2003 bin
drwxr-xr-x 2 0 0 0 Apr 2 2003 dev
drwxr-xr-x 2 0 0 0 Apr 2 2003 dev-state
drwxr-xr-x 2 0 0 0 Apr 2 2003 etc
drwxr-xr-x 2 0 0 0 Apr 2 2003 home
drwxr-xr-x 2 0 0 0 Apr 2 2003 lib
drwxr-xr-x 2 0 0 0 Apr 2 2003 proc
drwxr-xr-x 2 0 0 0 Apr 2 2003 root
drwxr-xr-x 2 0 0 0 Apr 2 2003 sbin
drwxr-xr-x 2 0 0 0 Apr 2 2003 tmp
drwxr-xr-x 2 0 0 0 Apr 2 2003 usr
drwxr-xr-x 2 0 0 0 Apr 2 2003 var
# ll /mnt/bin/
total 391
-rwxr-xr-x 1 0 0 400168 Apr 23 2003 armdemo
>>jffs2: Erase block size too small (16KiB). Using virtual blocks size
>>(32KiB) instead
>
>
> That's due to memory consumption. If we have 16KiB eraseblock size we need too
> much memory to keep track of all eraseblocks. So we use virtual 32KiB blocks
> instead.
>
>
Yes, i know. This was the reason why i had to upgrade to the latest
version of the JFFS2 code, as the version i used before was unable to
handle it.
What really bothers me is this error:
Ino #14 is absent but node not REF_PRISTINE. Reading.
ARGH. About to write node to 0x00004000 on flash, but there are data
already there:
0x00004000: 85 19 02 e0 20 03 00 00 10 25 f5 2e 0e 00 00 00
Write of 1576 bytes at 0x00004000 failed. returned -5, retlen 0
Not marking the space at 0x00004000 as dirty because the flash driver
returned retlen zero
Error writing new dnode: -5
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-31 9:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-30 14:48 Problem mounting JFFS2 "David Müller (ELSOFT AG)"
2003-07-30 16:21 ` Thomas Gleixner
2003-07-31 9:31 ` "David Müller (ELSOFT AG)"
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox