I am having a hard time booting up an ARM linux kernel with a rootfs using QEMU. First I tried compiling it myself, then resorted to the debian linux-image-rt-armmp kernel, nothing works.
Here is what I got:
- I created a rootfs using debootstrap onto an ext4 disk image
- I have the linux kernel ready in vmlinuz (for the debian compiled one) / bzImage (self compiled)
- I copied the initrd created by the debootstrap
I tried a couple of QEMU invocation:
qemu-system-arm -machine virt -kernel linux-kernel/vmlinuz -append "root=/dev/sda rootwait console=ttyAMA0" -drive file=./armhf.img,format=raw,index=0,media=disk -cpu cortex-a15 -smp 2 -s -m 1024< this waits because the disk is never available
qemu-system-arm -machine virt -kernel linux-kernel/vmlinuz -append "root=/dev/ram rootwait console=ttyAMA0" -initrd linux-kernel/initrd.img -cpu cortex-a15 -smp 2 -s -m 1024 -nographic< this boots into initramfs however it cannot find /dev/ram, or any other disk
- If I specify another
virteverything goes silent and I cannot see anything
- Various variations of specifying
-hda. If I leave the kernel to panic (i.e. omitting
rootwait), I cannot see any dev available, no matter what I specify.
Because I do not see the disk, I was assuming missing drivers. Why are they not baked into the debian built kernel? I tried compiling a few things I read across several posts into the custom kernel, though nothing seemed to work. Does anyone know specific CONFIGs I need to enable here?
I also found this syzkaller guide which uses buildroot to create the rootfs. Though I do not see why their guide would be working if the kernel does not even see the disk. Additionally I would rather use debootstrap.
Is me missing the device tree the root of all this
Any other ideas?