Hello,
I am trying compile and boot Linux kernel 5.3 using qemu version 3.0.50 with buildroot Linux.
Simulation is for riscv64, qemu command used is qemu-system-riscv64.
when i boot, kernel boots successfully, but fails while mounting the root file system with below error.
[ 0.358581] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.364428] virtio_blk virtio2: Cannot get IRQ resource
[ 0.368602] virtio_blk virtio2: Cannot get IRQ resource
[ 0.370852] virtio_blk virtio2: Cannot get IRQ resource
[ 0.380566] VFS: Cannot open root device "vda" or unknown-block(0,0): error -6
[ 0.382455] Please append a correct "root=" boot option; here are the available partitions:
[ 0.385194] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.387625] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.3.0-10169-g574cc45 #12
[ 0.389898] Call Trace:
[ 0.390902] [<ffffffe00002e118>] walk_stackframe+0x0/0xfc
[ 0.392368] [<ffffffe00002e354>] show_stack+0x3c/0x50
[ 0.393724] [<ffffffe0003740ec>] dump_stack+0x84/0xac
[ 0.395028] [<ffffffe0000349d4>] panic+0x134/0x2e8
[ 0.396353] [<ffffffe00000162c>] mount_block_root+0x274/0x35c
[ 0.397893] [<ffffffe0000017bc>] mount_root+0xa8/0xbc
[ 0.399071] [<ffffffe000001928>] prepare_namespace+0x158/0x1b4
[ 0.400259] [<ffffffe00000116c>] kernel_init_freeable+0x1f0/0x228
[ 0.401303] [<ffffffe00038ec64>] kernel_init+0x1c/0x124
[ 0.402153] [<ffffffe00002c7cc>] ret_from_exception+0x0/0x10
[ 0.403453] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
qemu command used for booting is "qemu-system-riscv64 -nographic -smp 1 -machine virt -m 8192 -kernel /home/firechip/i-firesim/sw/firesim-software/images/br-base-bin -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0 -device virtio-net-device,netdev=usernet -netdev user,id=usernet,hostfwd=tcp::10000-:22 -device virtio-blk-device,drive=hd0 -drive file=/home/firechip/i-firesim/sw/firesim-software/images/br-base.img,format=raw,id=hd0 -append ro root=/dev/vda"
Any suggestion or solutions will be of great help.
--
Guruswamy Basavaiah