* CLEANMARKER node found at 0x007a4000 has totlen 0xc != normal 0x0
@ 2007-06-11 16:03 Kevin Morfitt
2007-06-12 6:08 ` Ricard Wanderlof
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Morfitt @ 2007-06-11 16:03 UTC (permalink / raw)
To: linux-mtd
Hi
I'm using mtd-utils-1.0.0 on a KB9202B with a 32M NAND flash. /dev/mtd0 is
mapped as one partition:
[root@KB9202B:~] cat /proc/mtd
dev: size erasesize name
mtd0: 02000000 00004000 "nand_fs"
I create my jffs image using:
mkfs.jffs2 --pad=0x4000 --eraseblock=0x4000 -l --root=kb9202_nfsroot/target_fs
-o full_fs.bin
To program the NAND, when I'm mounted via NFS, I do:
[root@KB9202B:~] flash_eraseall -j /dev/mtd0
Erasing 16 Kibyte @ 1ffc000 -- 99 % complete. Cleanmarker written at
1ffc000.
[root@KB9202B:~] nandwrite -f /dev/mtd0 /full_fs.bin
When I re-boot from MTD I always get lots of messages like "CLEANMARKER node
found at 0x007a4000 has totlen 0xc != normal 0x0". The board still boots but
after a few re-boots I end up getting other messages like:
Empty flash at 0x007de204 ends at 0x007de400
JFFS2 notice: (187) check_node_data: wrong data CRC in data node at
0x007de800: read 0x95b49b87, calculated 0xc429c7e8.
I've seen the other threads on this subjects and tried using '-n' in my
mkfs.jffs2 command but if I do that nandwrite fails with:
[root@KB9202B:~] Input file is not page aligned
[root@KB9202B:~] Data did not fit into device, due to bad blocks
I've read somewhere else that the "wrong data CRC" message might mean my
erase size is wrong but I don't know what the erase size should be anyway.
I'd appreciate any advice anyone could give.
Thanks
Kev
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: CLEANMARKER node found at 0x007a4000 has totlen 0xc != normal 0x0
2007-06-11 16:03 CLEANMARKER node found at 0x007a4000 has totlen 0xc != normal 0x0 Kevin Morfitt
@ 2007-06-12 6:08 ` Ricard Wanderlof
0 siblings, 0 replies; 2+ messages in thread
From: Ricard Wanderlof @ 2007-06-12 6:08 UTC (permalink / raw)
To: Linux mtd
On Mon, 11 Jun 2007, Kevin Morfitt wrote:
> I'm using mtd-utils-1.0.0 on a KB9202B with a 32M NAND flash. /dev/mtd0
> is mapped as one partition:
>
> [root@KB9202B:~] cat /proc/mtd
> dev: size erasesize name
> mtd0: 02000000 00004000 "nand_fs"
From this we can see that the [erase]block size is 0x4000, as one would
expect for a NAND flash of this size.
> I create my jffs image using:
>
> mkfs.jffs2 --pad=0x4000 --eraseblock=0x4000 -l --root=kb9202_nfsroot/target_fs
> -o full_fs.bin
--pad should suffice, it should pad the image up to a multiple of the
block size.
> To program the NAND, when I'm mounted via NFS, I do:
>
> [root@KB9202B:~] flash_eraseall -j /dev/mtd0
> Erasing 16 Kibyte @ 1ffc000 -- 99 % complete. Cleanmarker written at
> 1ffc000.
> [root@KB9202B:~] nandwrite -f /dev/mtd0 /full_fs.bin
Since you are writting a preformatted image, and not just erasing the
flash to get an empty jffs2 partition, I would suggest not using -j to
flash_eraseall, in order to get a clean flash.
(Side note: Even if you did want to create an empty jffs2 partition, you
could skip the -j . The JFFS2 driver automatically erases and writes
cleanmarkers to blocks that lack them. It does take a bit of time on first
boot though, but as a kernel thread that runs in the background, so you
may not even notice it.)
> When I re-boot from MTD I always get lots of messages like "CLEANMARKER node
> found at 0x007a4000 has totlen 0xc != normal 0x0". The board still boots but
> after a few re-boots I end up getting other messages like:
AFAIR this is what happens when you have cleanmarkers in the image and you
are using nand flash. The solution as you suggest is to specify -n (or
--no-cleanmarkers) to mkfs.jffs2.
> I've seen the other threads on this subjects and tried using '-n' in my
> mkfs.jffs2 command but if I do that nandwrite fails with:
>
> [root@KB9202B:~] Input file is not page aligned
> [root@KB9202B:~] Data did not fit into device, due to bad blocks
I think this could be because you are erasing the flash with -j. The flash
isn't empty, and writing with nandwrite clashes with the data already
there. The 'not page aligned' bit is confusing though.
You can also specify -p (or --pad) to nandwrite to get it to pad the
image.
> I've read somewhere else that the "wrong data CRC" message might mean my
> erase size is wrong but I don't know what the erase size should be anyway.
You can see the erase[block] size in /proc/mtd, or in the data sheet of
the device (called 'block size' there).
So to sum up:
- Use -n and --pad to mkfs.jffs2 (or skip --pad here and specify it to
nandwrite instead).
- Avoid -j with flash_eraseall
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-12 6:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-11 16:03 CLEANMARKER node found at 0x007a4000 has totlen 0xc != normal 0x0 Kevin Morfitt
2007-06-12 6:08 ` Ricard Wanderlof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox