Hi, I've made some tests this night to reduce the size of 2.6 kernel. I've modularized almost all that can be (except IDE, mouse and keyboard). vmlinuz is now a bit less than 1.3 Megabytes. Compiling ext2 as a module would save us about 70 more kilobytes. ext2 module is 79k, cramfs takes 13k when builtin. A cramfs initrd is slightly larger than a ext2 initrd (about 2k).
So I patched mkinitrd and make-initrd to allow to build cramfs initrd. (patchs included in this mail). For now, the kernel can't load directly cramfs initrd (because the code doesn't recognize cramfs magic number), but it can load gzipped cramfs initrd (because the code can recognize a gzip file). Well, a patch has been made (by Debian ?) and is included in Debian kernel, but we don't care much since we can (theorically) load gzip cramfs. (I've extracted the patch from Debian's messy patch, it is included too in this mail). But when I try to boot with a gzipped cramfs initrd, the kernel can gunzip the initrd but fails to mount it as ramfs, sys_mount("/dev/root.old","/root","cramfs", ...) exits with EINVAL code. Strangly enough, I can mount the initrd correctly once the kernel is booted up (in this case, I use a ext2 initrd, ext2 and cramfs are builtin). Should I ask about it on lkml ? -- Olivier Blin
mkinitrd.cramfs.patch
Description: Binary data
make-initrd.cramfs.patch
Description: Binary data
do_mounts_rd.c.cramfs.patch
Description: Binary data