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

Re: cramfs problems, also file(1)



On Tue, Jul 17, 2001 at 12:16:07AM +0200, Russell Coker wrote:
> 
> Is it possible for a cramfs image to have data that isn't endian specific?
> 
> I expect that as the usual contents for cramfs is kernel modules they are 
> inherantly CPU (and therefore endian) specific and therefore there is no 
> point in trying to achieve portability.  Or am I missing something?
> 
> I know the docs make some vague reference to CDs, but I couldn't imagine 
> anyone wanting to use cramfs instead of iso9660 or Ext2 for CDs (I use Ext2 
> for most of my CDs).

Embedded systems use cramfs pretty generically.  It's only the file
metadata that is BE or LE.  The reasoning for making it only LE
is so that you don't have to support cross-endianness everywhere
and pollute fast paths with if(endianness==HOST_ENDIAN) everywhere.
It's really only i386 processors that have dismal cross-endian
performance; on PowerPC, the byteswap is essentially free.  (And
don't forget, ext2 filesystems are LE only...)  It's not really about
portability, it's more about maintainer sanity -- portability is
a non-negotiable requirement.



dave...



Reply to: