Package: qemu-efi-riscv64
Version: 2023.08-1
Priority: wishlist

Hello Dann,

thanks for packaging qemu-efi-riscv64 in experimental.

For first users it would be helpful to add a README.Debian explaining how to use the EDK II firmware with QEMU by giving an example, e.g.


Package qemu-efi-riscv64 provides a RISC-V EDK II binary RISCV_VIRT_VARS.fd and an empty variables data base RISCV_VIRT_VARS.fd.

Below you can find an example how to invoke QEMU to boot from a disk image (disk.img).

The variables data base is copied so that it can be written to.

By default the EDK II virt machine provides ACPI tables and no device-tree. The parameter acpi=off is used to provide a device-tree instead.

cp /usr/share/qemu-efi-riscv64/ .
qemu-system-riscv64 \
-M virt,acpi=off -m 4096 -smp 4 \
-serial mon:stdio \
-device virtio-gpu-pci \
-device qemu-xhci \
-device usb-kbd \
-device usb-mouse \
-drive \
if=pflash,format=raw,unit=0,file=/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=RISCV_VIRT_VARS.fd \
-drive file=disk.img,format=raw,if=virtio \
-device virtio-net-device,netdev=net0 \
-device virtio-rng-pci \
-netdev user,id=net0

If you only need a serial console, you could use

qemu-system-riscv64 \
-M virt,acpi=off -m 4096 -smp 4 \
-nographic \
-drive \
if=pflash,format=raw,unit=0,file=/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=RISCV_VIRT_VARS.fd \
-drive file=disk.img,format=raw,if=virtio \
-device virtio-net-device,netdev=net0 \
-device virtio-rng-pci \
-netdev user,id=net0

On the serial console press the ESC key twice to reach the EDK II menu during the count down.


Should package qemu-system-misc be marked as suggested?

Best regards

Heinrich

Reply via email to