How to build initramfs with modules but without bzImage
I am building 2 images. One has my rootfs, the other builds a kernel with builtin initramfs.
To build the initramfs I did the following:
In the .../conf directory, I create a file named initramfs.conf and add the following:
INITRAMFS_IMAGE = "core-image-minimal-initramfs"INITRAMFS_IMAGE_BUNDLE = "1"
IMAGE_FSTYPES = "cpio.gz"
Then to build the initramfs based on the core-image-base recipe, I execute the following bitbake command:
bitbake -R conf/initramfs.conf core-image-minimal-initramfs
When it completes, there is a kernel + initramfs file in the .../tmp/ deploy/images/..../ directory.
This image boots to the init script, but then hangs as the mmc drivers have not been included.
Now I create a core-image-minimal-initramfs.bbappend file and PACKAGE_INSTALL the modules I need (also tried kernel-modules).
Unfortunately this also installs the kernel bzImage in the /boot directory, that appears to be a dependancy. This adds another 6MB to my initramfs, which is now to load.
I expect it should be possible to add the modules without adding the kernel, but haven't been able to find a way to do that. Or it should be possible to remove the contents of /boot after do_rootfs.
But I have no clue how to do that.
Or am I just generating the initramfs in the wrong way?
Ferry