I'm compiling a new kernel (4.4.10 LTS), nominally with the intent of enabling the memory subsystem for cgroups, but in reality it is mostly for the experience of doing it (first time kernel build here).
The kernel compilation itself is (as a pleasant surprise) nice and easy with the available tiny core kernel config and:
make oldconfig
make nconfig
make
However, I'm having trouble getting the modules initrd file to match the one that comes with Tiny Core.
Packing up the initrd is ok (with `find lib | cpio -H newc -o | gzip -9 > modules64.gz`), but the resulting file is a whopping 22.9 MB. As a comparison, the core modules64.gz is only 6.4 MB.
The wiki makes reference to this issue, but with no specifics on how the reduction is done. It also makes reference to some of the path adjustments, and a needed symlink, that are needed in the modules initrd.
To try and make them match I'm in the process of diffing the dir trees between an unpacked core modules64.gz and the one that I have created. However, it occurs to me that this process has probably been automated by the Tiny Core team for the release process...
Is there a script available for converting the "make modules_install" output into a suitable/filtered/minimized dir structure for cpio archiving into an initrd file? Or is this usually done by hand, given the infrequency of Tiny Core kernel updates?
As another side question: Assuming I don't mistakenly drop an expected kernel feature, will the latest core rootfs64.gz be compatible with any new vmlinuz and modules64.gz files I create? My assumption is that it will be due to backwards compatibility of the ABI, but I wanted to confirm this.