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

Open
#361 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
linux
Domain
documentation

Research direction

Read opensbi/docs/platform/qemu_virt.md and reproduce the documented command with Qemu-7.2.0. Check how boot arguments should be passed when -append requires -kernel, then update the instructions so the Qemu-Virt Linux launch procedure works and remains clear.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C
Stars
1.6k
Forks
734
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from riscv-software-src/opensbi

All issues in riscv-software-src/opensbi

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.