OK, I agree somewhat that we need to save disk space, just as I agree we
should reduce CPU usage. That said, would you want to save a few CPU
cycles if (for example) it meant we didn't use the ELF binary format,
and had to change? Yes, we went from a.out to ELF, but it was a major
pain even when Linux was far less widely used.
> > But then every person who wants to build a kernel will have to have
> > the patched version of cpio until such a time it is part of the standard
> > cpio tool...
> If we go with little-endian then only big-endian architectures will need
> the patch, and they tend to need patches for lots of things anyway. Or
> if you like I'll write a little utility that goes through the file and
> byteswaps all the int fields.
But the proposed cpio format (AFAIK) has ASCII numbers, which is what you
were originally complaining about. I see that cpio(1) says that "by
default, cpio creates binary format archives... and can read archives
created on machines with a different byte-order".
Excluding alignment issues (which can also be handled relatively easily),
is there a reason why we chose the ASCII format over binary, especially
since the binary format _appears_ to be portable (assuming endian
conversions at decoding time), despite warnings to the contrary?
> > (which may be "never"). I would much rather use the currently
> > available tools than save 20 bytes off a 900kB kernel image.
> What if it's more than 20 bytes?
Well, anything less than half a sector (or a network packet) isn't
Well, a few quick tests show (GNU cpio version 2.4.2), with raw sizes
in "blocks" as output by cpio, compressed sizes in bytes:
find <dir> | cpio -o -H <format> | gzip -9 | wc -c
dir bin (default) newc (proposed)
raw gzip raw gzip
/sbin 15121 3289678 12952 2769451
/etc 8822 689517 8996 693700
/usr/local/sbin 1895 385461 1899 385764
The binary format reports lots of "truncating inode number", but for
the purpose of initramfs, that is not an issue as we don't anticipate
more than 64k files. I don't know why the /sbin test is so heavily
in favour of the newc (ASCII) format, but I repeated it to confirm
-- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://www-mddsp.enel.ucalgary.ca/People/adilger/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/