Page 1 of 1

Clean kernel image embedded initramfs

Posted: 14 Apr 2017, 18:14
by Dukers
SystemRescueCd's kernel is compiled in two stages. After first compile, modules are packed into a cpio file and then in the second compile CONFIG_INITRAMFS_SOURCE is set to this temporary cpio.

This makes things simple since the final bzImage contains both kernel image itself and the modules. Unfortunately in the embedded cpio there are more things, *not* just the modules. We get a complete fs hierarchy (busybox based), an /init, etc.

Would be possible pack into the cpio just the /lib/modules directory and move everything else to initram.igz?

I ask that because it would make easier for other projects use your kernel image (rescue32, rescue64, etc), replacing the user space software. And IMHO SystemRescueCd's initramfs would be more organized.

Thank you.