[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#266327: cramfs tools on big-endian architecture



Package: cramfs
Version: 1.1-6
Severity: wishlist 


 The cramfstools cteares WRONG ENDIANITY filesystem
on the big-endian architectures (i.e. the mips-eb)

  David Schleef <ds@schleef.org> wrote:
"According to Linus, big endian cramfs doesn't exist. "
http://lists.debian.org/debian-devel/2001/07/msg01161.html

 However, mkcramfs creates big-endin file imeges in the
big-endian hosts:

big-endian.host$ mkcramfs dir  image.cramfs

little-endian.host$ mkcramfs dir image.cramfs

 The "mkcramfs" produces DIFFERENT file images.

big-endian.host$ od -ha image.cramfs
0000000 cd28 453d 0010 0000 0000 0500 0000 0000
          (   M   =   E dle nul nul nul nul nul nul enq nul nul nul nul
0000020 6f43 706d 6572 7373 6465 5220 4d4f 5346
          C   o   m   p   r   e   s   s   e   d  sp   R   O   M   F   S


little-endian.host$ od -ha image.cramfs
0000000 3d45 28cd 5000 0001 0003 0000 0000 0000
          E   =   M   ( nul   P soh nul etx nul nul nul nul nul nul nul
0000020 6f43 706d 6572 7373 6465 5220 4d4f 5346
          C   o   m   p   r   e   s   s   e   d  sp   R   O   M   F   S


 There are a lot of patches for the linux kernel :
http://www.ussg.iu.edu/hypermail/linux/kernel/0202.3/0365.html
Access to the constants reworked as :
...
#define CRAMFS_32(x) swab32(x) 
...
if (super.magic != CRAMFS_32(CRAMFS_MAGIC))

Another kernel patches (JFYI):
http://lists.infradead.org/pipermail/linux-mtd/2003-August/008471.html
http://www.linux-mips.org/archives/linux-mips/2001-09/msg00259.html


Is it possible to implement endianness-aware cramfs tools like:
http://seclists.org/linux-kernel/2001/Dec/0760.html






Reply to: