Mounting big endian jffs2 images on mtdram on a x86

Hans-Christian Egtvedt hcegtvedt at norway.atmel.com
Tue May 15 03:45:26 EDT 2007


On Tue, 2007-05-15 at 08:42 +0800, David Woodhouse wrote:
> On Mon, 2007-05-14 at 13:34 +0300, Artem Bityutskiy wrote:
> > 
> > > I am trying to mount an JFFS2 image made with mkfs.jffs2 on my x86
> > > laptop. The image is made with --big-endian set.
> > 
> > I think you cannot do this without re-compiling JFFS2. I am not sure,
> > just glance to the code (to je32_to_cpu and the like macros).
> 
> Edit fs/jffs2/nodelist.h and set JFFS2_BIG_ENDIAN instead of
> JFFS2_NATIVE_ENDIAN.

Ah, thanks for this hint.

> The reason it's not a runtime option is because that would be quite
> slow, and it's a very esoteric feature.

For development systems it would be a great feature, hence my original
email. But for an embedded system this should not be present at all.

> I'm sorry. I should have just made it either big- or little-endian right
> from the very beginning and never made the mistake of letting it be
> host-endian.

What I would have liked was a possibility to choose which read/write
operations should be used when using my developing machine, but for the
kernel I boot my embedded target with I would like an optimized jffs2
driver.

Use native endianess by default, but have a possibility to override at
runtime.

</thoughts>

-- 
Best regards
Hans-Christian Egtvedt





More information about the linux-mtd mailing list