I am on a 64-bit kernel and want to run a 32-bit kernel in QEMU. Once I had the compressed kernel image I tried creating the initramfs image using
mkinitcpio but this only created an image with 64-bit code (busybox, which
mkinitcpio uses, was 64-bit and the other executables too).
I could use the
gen_init_cpio program, which is part of the kernel and get the 32-bit executables in some other way, but I'd prefer to avoid this and let a program decide what the kernel needs in rootfs.
Is there any way to get a 32-bit initramfs image while running a 64-bit kernel?