A few people have expressed interest in this, and I needed it as
well. Currently, cramfs images aren't shareable between different endian
architectures. The documentation states the meta-data should always be
stored little endian, as the cost of swabbing would be low, but the code
doesn't do it. We needed shareable images, so I modified inode.c,
cramfs_fs.h, and mkcramfs.h to enable a big-endian machine to swab meta
data when writing (mkcramfs.c) and reading (inode.c). This is done with
#defined macros (the 26 bit/6 bit bitfield is kind of ugly to translate),
so the code doesn't change for little-endian machines, only big-endian.
I tested reading le on be, reading a be-written le image on le, etc...
This is a patch against 2.4.10.
Description: Text document