jffs2_do_reserve_space
David,
The Flash starts at 0x0 phys and has a firmware bootloader pre-configured in (has its own header too).
Then the Flash Loader I'm using adds a 0x40 header to the beginning of every binary image loaded to flash. It adds 0x40 to the Linux Loader (blob), Kernel, and jffs2.
I got confused by your emails!?! is this causing the problem we are seeing or its only causing the printks and sanity checks?!
If its only causing the sanity checks to appear, its fine for now (I'll fix the loader later on). But if its the cause of the kernel panic let me know. When I add your patch (stable) I get:
Further such events for this erase block will not be printed
Node at 0x003dfd54 with
length 0x000002e6 would run over the end of the erase block
Perhaps the file system
was created with the wrong erase size?<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 notdjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e0004: 0xe200 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e0008: 0x109a insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e000c: 0x2008 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e0010: 0x3da4 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e0014: 0x900e insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e0018: 0x35d2 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e001c: 0xa404 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e0020: 0x04f4 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003e0024: 0x4801 instead
Further such events for this erase block will not be printed
Node at 0x003ffc80 with
length 0x000003bc would run over the end of the erase block
Perhaps the file system
was created with the wrong erase size?<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 notdjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00400004: 0x2c17 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00400008: 0x684f insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0040000c: 0x0804 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00400010: 0x5f3c insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00400014: 0x614c insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00400018: 0x0984 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0040001c: 0xe791 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00400020: 0xb477 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00400024: 0xb7f5 instead
Further such events for this erase block will not be printed
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 72K
Kernel panic: Attempted to kill init!
Another question? why does the jffs do a sanity check on all flash when I'm only loading /dev/mtdblock2? Is there a way to make it not do so and only do so on the jffs2 image which I can download later without a 0x40 header?
----- Original Message -----
From: David Woodhouse <[email protected]>
Date: Thu, 25 Jul 2002 18:16:50 +0100
To:
Subject: Re: jffs2_do_reserve_space
Quoted 46 lines
Quoted 1 line · [email protected] said:
Can you try this?
Or this version if you're using the stable branch...
As I said in private mail, I suspect you've written your jffs2 image to the flash
0x40bytes out of place, and the printk in this sanity check isn't actually correct for you, although it will be for most people who trigger it.Index:
scan.c
===================================================================
RCS file:/home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.51.2.2
diff -u -p -r1.51.2.2scan.cscan.c +10
-1@@ -261,6 +261,16 @@ static int jffs2_scan_eraseblock (structcontinue ; } +if (ofs + node.totlen > jeb->offset + c->sector_size) { +/* Eep. Node goes over the end of the erase block. */ +printk (KERN_WARNING "Node at 0x%08x with length 0x%08x would run over the end of the erase block\n" , + ofs, node.totlen); +printk (KERN_WARNING "Perhaps the file system was created with the wrong erase size?" ); +DIRTY_SPACE (4 ); + ofs +=4 ; +continue ; + } +switch (node.nodetype |JFFS2_NODE_ACCURATE ) {case JFFS2_NODETYPE_INODE : err =jffs2_scan_inode_node (c, jeb, &ofs); --dwmw2
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Signature · 6 lines
__________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Get 4 DVDs for $.49 cents! plus shipping & processing. Click to join. http://oas-central.realmedia.com/RealMedia/ads/click_lx.ads/mail.com/columbiahouse/1112745096/x09/ExactAdv/ColumbiaHouse_IO473_7.19_8.19/blank.gif/636632633232383133383736634333430
Quoted 9 lines · [email protected] said:
Then the Flash Loader I'm using adds a
0x40header to the beginning of every binary image loaded to flash. It adds0x40to the Linux Loader (blob), Kernel, and jffs2.I got confused by your emails!?! is this causing the problem we are seeing or its only causing the printks and sanity checks?!
If its only causing the sanity checks to appear, its fine for now
(I'll fix the loader later on). But if its the cause of the kernel panic let me know.
It was causing the panic. Now that I've added the sanity check in the patch I sent you, it's causing that instead of a panic, and also it's causing the corruption which prevents your init from starting.
--
dwmw2