I'm trying to get a self-compiled kernel running together with an initramfs. It worked on the old raspberry, but somehow I can't get it to run.
What I'm trying to do exactly: Load kernel, "run" initramfs which then performs some checks (system-update etc.), finally mounting a squashfs image and invoking switch_root on said system.
But the kernel somehow refuses to run the initramfs' init. I tried various settings in
config.txt but none of them seem to work, the kernel always waits for some root to be available (or fails with
VFS: unable to mount root fs on unknown block). I assume that I'm missing some cmdline setting (probably a correct
root=/dev/ram0 did not work) or a kernel flag. My current cmdline:
dwc_otg.lpm_enable=0 console=tty1 elevator=deadline rootwait, config.txt:
initramfs initramfs.gz followkernel
When I add
root=/dev/mmcblk0p6 roottype=ext4 the whole system boots (into some test-linux I added to verify the kernel itself works).
I checked that the kernel is compiled with initramfs support (
BLK_DEV_INITRD=y), compiling the initramfs into the kernel image is not an option sadly. The kernel (4.1 stable) is compiled using buildroot. Kernel binary format is zImage (seems not to work with vmlinux, screen stays black).