* Nand dump Jffs2
@ 2007-07-05 1:14 Eric
2007-07-05 6:16 ` David Woodhouse
0 siblings, 1 reply; 4+ messages in thread
From: Eric @ 2007-07-05 1:14 UTC (permalink / raw)
To: linux-mtd
Hi,
My Linux kernel v2.4.7-vrs1, Nand flash Sumsong k9f5608x0d (page size: 512 bytes, OOB 16 bytes, 32 pages per block, total 2048 blocks and 32M).
After I mount an erased nand flash as JFFS2 file system, I dump the flash, and I find the first page of the first block is:
0x00 85 19 3 20 c 0 0 0 b1 b0 1e e4 ff ff ff ff
0x10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x20 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x30 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x40 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x50 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x60 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x70 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x80 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x90 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xa0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xb0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xd0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xe0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xf0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x110 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x120 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x130 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x140 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x150 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x160 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x170 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x180 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x190 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x1a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x1b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x1c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x1d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x1e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x1f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
---OOB ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
It seems that the first 8 bytes are JFFS2 cleanmarker. However, the Linux MTD web page (http://www.linux-mtd.infradead.org/doc/nand.html) says the cleanmarker starts at offset 0x08 of OOB area.
If I use Linux kernel v2.6.21, the first block of the first page is:
0x00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000000d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000000e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000130: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000001a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000001b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000001c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000001d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000001e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x000001f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
OOB Data: ff ff ff ff ff ff ff ff 85 19 03 20 08 00 00 00
I think this is OK.
Any idea?
Thanks and Regards
Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Nand dump Jffs2
2007-07-05 1:14 Nand dump Jffs2 Eric
@ 2007-07-05 6:16 ` David Woodhouse
2007-07-05 6:38 ` Eric
0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2007-07-05 6:16 UTC (permalink / raw)
To: Eric; +Cc: linux-mtd
On Thu, 2007-07-05 at 09:14 +0800, Eric wrote:
> I think this is OK.
>
> Any idea?
I've ignored the offtopic bits about some prehistoric kernel. Yes, what
you see in the sensible part about 2.6.21 looks OK. What kind of ideas
were you expecting?
--
dwmw2
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Nand dump Jffs2
2007-07-05 6:16 ` David Woodhouse
@ 2007-07-05 6:38 ` Eric
2007-07-05 14:02 ` David Woodhouse
0 siblings, 1 reply; 4+ messages in thread
From: Eric @ 2007-07-05 6:38 UTC (permalink / raw)
To: 'David Woodhouse'; +Cc: linux-mtd
A quick response, thanks first.
I believe we will move to Kernel v2.6.21 eventually. But I am still curious
about the kernel v2.4.27.
Currently we are using kernel v2.4.27. Sometimes the JFFS2 on the flash will
become corrupted probably due to JFFS2 GC. I am studing it and I find that
the cleanmarker of the two kernels locates at different position on Nand
flash. It seems that kernel v2.4.27 does not take the advantage of Nand
flash OOB area at all. I donnot know if this is true.
Another interesting thing:
I create JFFS2 filesystem under v2.6.21. Turn to v2.4.27, mount the nand
flash successfully, but kernel says:
jffs2_scan_dirent_node(): Node CRC failed on node at 0x01c737f4: Read
0xffffffff, calculated 0x2322e93d
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01c737f8:
0x0034 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01c737fc:
0x292f instead
Unknown but compatible feature node (0x2004) found at offset 0x01ccbf50
Unknown but compatible feature node (0x2004) found at offset 0x01d03f68
Unknown but compatible feature node (0x2004) found at offset 0x01d23f74
Unknown but compatible feature node (0x2004) found at offset 0x01d9bfd8
Unknown but compatible feature node (0x2004) found at offset 0x01df7fc4
Unknown but compatible feature node (0x2004) found at offset 0x01f93f54
Unknown but compatible feature node (0x2004) found at offset 0x01ff82b8
It seems that kernel v2.4.27 is forward compatible with v2.6.21.
> -----Original Message-----
> From: David Woodhouse [mailto:dwmw2@infradead.org]
> Sent: Thursday, 5 July 2007 2:17 PM
> To: Eric
> Cc: linux-mtd@lists.infradead.org
> Subject: Re: Nand dump Jffs2
>
> On Thu, 2007-07-05 at 09:14 +0800, Eric wrote:
> > I think this is OK.
> >
> > Any idea?
>
> I've ignored the offtopic bits about some prehistoric kernel.
> Yes, what you see in the sensible part about 2.6.21 looks OK.
> What kind of ideas were you expecting?
>
> --
> dwmw2
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Nand dump Jffs2
2007-07-05 6:38 ` Eric
@ 2007-07-05 14:02 ` David Woodhouse
0 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2007-07-05 14:02 UTC (permalink / raw)
To: Eric; +Cc: linux-mtd
On Thu, 2007-07-05 at 14:38 +0800, Eric wrote:
> It seems that kernel v2.4.27 does not take the advantage of Nand
> flash OOB area at all. I donnot know if this is true.
The 2.4 kernel does not support NAND flash at all, IIRC. Certainly JFFS2
in the 2.4 kernel does not.
--
dwmw2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-05 14:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 1:14 Nand dump Jffs2 Eric
2007-07-05 6:16 ` David Woodhouse
2007-07-05 6:38 ` Eric
2007-07-05 14:02 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox