[ECOS] JFFS2 on big-endian system

Gary Thomas gary@mlbassoc.com
Tue Nov 25 16:08:00 GMT 2003


On Tue, 2003-11-25 at 09:04, Roland Caßebohm wrote:
> On Montag, 24. November 2003 21:10, Gary Thomas wrote:
> > On Mon, 2003-11-24 at 10:46, Roland Caßebohm wrote:
> > > Hello,
> > >
> > > I try to use jffs2 on my big-endian system. First I had the problem, that
> > > mkfs.jffs2 couldn't make big-andian images, even if -b was set. Now I
> > > have a newer version which could do that.
> > >
> > > This is what I have done:
> > >
> > > Linux> mkfs.jffs2 -o jffs2_b.img -b -r experimental -e 0x10000
> > >
> > > RedBoot> load -r -b 0x40000 -h 192.168.1.36 jffs2_b.img
> > > RedBoot> fis create -f 0x20c0000 -l 0x30000 jffs2
> > >
> > > It works except of mount() gave th following output:
> > >
> > > <4>Node at 0x00000c30 with length 0x000004d6 would run over the end of
> > > the erase block
> > > <4>Perhaps the file system was created with the wrong erase size?
> > > <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c38:
> > > 0xde82 instead
> > > <5>Further such events for this erase block will not be printed
> > > <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001000:
> > > 0x7cba instead
> > > <5>Further such events for this erase block will not be printed
> > >
> > > Does anybody know what could be wrong?
> >
> > Does your FLASH actually have an erase block size of 64K (0x10000)?
> > This number is *critical* - if it's wrong, either too large or too
> > small, the whole file system fails.
> >
> > Other than that, try turning on the low level debug messages.  That may
> > show you something.
> 
> I have tried something other, I've created an empty image:
> 
> RedBoot> fis create -f 0x20c0000 -l 0x30000 jffs2
> 
> Now mount() executes without any warnings and I can create and delete files,
> but after the next reboot mount() gave the following warnings:
> 
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 
> 0x2003
>  instead
> <5>Further such events for this erase block will not be printed
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001000: 
> 0x2003
>  instead
> <5>Further such events for this erase block will not be printed
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002000: 
> 0x2003
>  instead
> <5>Further such events for this erase block will not be printed
> ...
> 
> If I look at the FLASH image at offset for example 0x5000 I get:
> 
> RedBoot> x -b 0x20c5000
> 020C5000: 20 03 20 03 00 00 00 0C  81 24 4B 06 FF FF FF FF  | . ......$K.....|
> 020C5010: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  |................|
> 
> So at the place of the magic bitmask is a copy of the node type.
> With debugging I found out that my compiler seems to have problem making
> such initialization as it is done in jffs2_mark_erased_block().
> 
> The attached change fixed it to me, but I think maybe it is a compiler bug?
> 
> Maybe the other problems I have if I save a ready filesystem image in FLASH
> has similar reasons.

What compiler/version are you using?

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list