[3/4] qemuriscv64: add support for ubuntu resolute

Message ID 20261015211527.3143702-4-felix.moessbauer@siemens.com
State New
Headers show
Series [1/4] sdimage-efi: use uuid for boot partition to support virtio disks | expand

Commit Message

Felix Moessbauer Oct. 15, 2026, 9:15 p.m. UTC
The ubuntu resolute target also has an efi-only kernel and is built
for the RAV23 machine (with vector extensions), while the debian
targets are built for rv64.

We now provide the corresponding QEMU args, so this target can be
bootet. For efi booting, this means using an EDK2 on pflash and the
default builtin OpenSBI as bios.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta-isar/conf/machine/qemuriscv64.conf | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Patch

diff --git a/meta-isar/conf/machine/qemuriscv64.conf b/meta-isar/conf/machine/qemuriscv64.conf
index a2a5de9b..283404ce 100644
--- a/meta-isar/conf/machine/qemuriscv64.conf
+++ b/meta-isar/conf/machine/qemuriscv64.conf
@@ -10,18 +10,26 @@  KERNEL_NAME ?= "riscv64"
 KERNEL_NAME:ubuntu ?= "generic"
 
 IMAGE_FSTYPES ?= "ext4"
+# the ubuntu kernel is an EFI zboot image, so it can only boot via UEFI from wic
+IMAGE_FSTYPES:resolute ?= "wic"
 ROOTFS_EXTRA ?= "128"
 
-# grub-efi is incompatible with targets riscv64, thus no sdimage-efi default
-WKS_FILE ?= "qemuriscv"
+# grub-efi has no riscv64 target, so use the systemd-boot variant
+WKS_FILE ?= "sdimage-efi-sd"
+IMAGER_BOM:wic += "${SYSTEMD_BOOTLOADER_INSTALL}"
+IMAGER_INSTALL:wic += "${SYSTEMD_BOOTLOADER_INSTALL}"
 
 QEMU_ROOTFS_DEV ?= "vda"
 
 QEMU_ARCH ?= "riscv64"
 QEMU_MACHINE ?= "virt"
 QEMU_CPU ?= "rv64"
+# ubuntu riscv64 is built for RVA23
+QEMU_CPU:resolute ?= "rva23s64"
 # TODO: start_vm doesn't support multiline vars
 QEMU_DISK_ARGS ?= "-drive file=##ROOTFS_IMAGE##,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0"
+# EDK2 on pflash, OpenSBI as bios; virtio-rng is required as rv64 has no CPU RNG
+QEMU_DISK_ARGS:resolute ?= "-drive file=##ROOTFS_IMAGE##,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-rng-pci -drive if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd"
 
 MACHINE_SERIAL ?= "ttyS0"
 BAUDRATE_TTY ?= "115200"