riscv-software-src / opensbi

RISC-V Open Source Supervisor Binary Interface
Other
971 stars 491 forks source link

qemu-system-riscv64: -append only allowed with -kernel option #361

Open swordsman-yuan opened 1 month ago

swordsman-yuan commented 1 month ago

I was trying to pass the Linux Kernel as a payload to OpenSBI to launch Qemu-Virt, and I found that the instructions in opensbi/docs/platform/qemu_virt.md might be problematic: qemu-system-riscv64 -M virt -m 256M -nographic \ -bios build/platform/generic/firmware/fw_payload.elf \ -drive file=<path_to_linux_rootfs>,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -append "root=/dev/vda rw console=ttyS0" However, in the Qemu version I use (Qemu-7.2.0), it will prompt: qemu-system-riscv64: -append only allowed with -kernel option, so the above method of passing bootargs to the kernel may not be feasible.

alistair23 commented 1 month ago

You should be able to pass -bios none -kernel build/platform/generic/firmware/fw_payload.elf