jffs2+mtd+big endian problem

David Woodhouse dwmw2 at infradead.org
Mon Jan 19 06:04:04 EST 2004


On Mon, 2004-01-19 at 18:58 +0800, Li Yang wrote:
> I have some problem accessing CVS from the damned corporate network. 

How strange. I can make the machine available for dialin if you want --
it's funny how a few international phone calls make managers suddenly
want to lean on incompetent IS staff to fix broken firewalls :)

If you really can't even use CONNECT through an HTTP proxy, there are
nightly snapshots at ftp://ftp.uk.linux.org/pub/people/dwmw2/mtd/cvs/

> The image generated by mkfs.jffs2 with -b seems ok, but it's not all
> right after I done some operations on the target.  In the bottom is the
> log of these operations.
> 
> Yes, I have examined a section which is formatted by the target board. 
> The first several bytes of the section are:  
> 
> fe3c0000: 03208519 0c000000 98dc60f0 ffffffff    . ........`.....
> fe3c0010: ffffffff ffffffff ffffffff ffffffff    ................
> 
> They are all 32-bit swapped.  I traced into the JFFS2 code, and know it
> use mtd->write to write data into flash.  Which function is it turned
> out to be finally?  Is it the write defined in the drivers/mtd/maps/
> files?  I used __raw_write*() at the very beginning, it shouldn't be
> like this.

This sounds like you're using byte-swapping operations in your map
driver. You should be using __raw_write*() not write*(). You said you
were 'at the very beginning'... are you still doing that now?

-- 
dwmw2





More information about the linux-mtd mailing list