action #152849
openRISC-V testing on openqa.o.o
80%
Description
@pvorel asked about riscv64 testing on o3.
AFAIK everything for that should be in place and just needs to be connected up, so I did an experiment.
Locally on my TW machine I was able to get a test working. I started by cloning an aarch64_cpu_max job with some variables overwritten:
clone_job.pl --skip-chained-deps --from https://openqa.opensuse.org --host localhost --skip-download 3826258 ARCH=riscv64 FLAVOR=JeOS-for-RISCV HDD_1=openSUSE-Tumbleweed-RISC-V-JeOS-efi.riscv64.raw QEMU=riscv64 QEMUCPU=rv64 QEMUMACHINE=virt UEFI_PFLASH_CODE=/usr/share/qemu/ovmf-riscv64-code.bin UEFI_PFLASH_VARS=/usr/share/qemu/ovmf-riscv64-vars.bin WORKER_CLASS=qemu_x86_64 ASSET_256= QEMU_HUGE_PAGES_PATH=
This failed because the flash images don't match the size expected by QEMU, I had to adjust that.
Then it failed because of no video output. Apparently VGA
doesn't work, switching to QEMU_VIDEO_DEVICE=virtio-gpu-pci
fixed that.
Next failure: The kernel didn't get a device tree (EFI stub printed Generating empty DTB
). This was due to recent QEMU using ACPI by default which isn't really working yet. Using QEMUMACHINE=virt,acpi=off
fixes that.
Next failure: No keyboard input possible. Fixed with QEMU_APPEND="device usb-kbd"
. Also noticed a warning about isa-fdc
in the log, fixed with QEMU_NO_FDC_SET=1
. Both of those are addressed by https://github.com/os-autoinst/os-autoinst/pull/2420 and currently applied as workaround on o3.
With this it booted properly and only test adjustments were necessary: https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/18360
I set it up on o3 as well, specifically the openqaworker28 machine which is not production enabled and suitable for experiments like this.
For emulation it needs qemu-extra
(contains qemu-system-riscv64) and qemu-uefi-riscv64
(from the TW repo):
zypper in qemu-extra zypper in http://download.opensuse.org/tumbleweed/repo/oss/noarch/qemu-uefi-riscv64-202308-3.1.noarch.rpm
The flash images have to be exactly 32MiB in size to fit the virt
machine type:
cd /usr/share/qemu/; for i in code vars; do cp ovmf-riscv64-$i.bin ovmf-riscv64-$i-32m.bin; truncate -s 32M ovmf-riscv64-$i-32m.bin; done
The version of QEMU in Leap 15.5 is too old, it only ends up with a black screen. So on ow28 I added the Virtualization repo and did zypper -v dup
+ zypper -v in --from Virtualization qemu-extra
.
I added a riscv64_cpu_max
machine type on o3 as well as a JeOS-for-RISCV
flavor, to post the TW disk image:
openqa-client --host https://openqa.opensuse.org isos post HDD_1_URL=https://download.opensuse.org/ports/riscv/tumbleweed/images/openSUSE-Tumbleweed-RISC-V-JeOS-efi.riscv64-2023.11.30-Build1.34.raw.xz DISTRI=opensuse FLAVOR=JeOS-for-RISCV ARCH=riscv64 VERSION=Tumbleweed BUILD=20231220
Current state on o3: https://openqa.opensuse.org/tests/3829935
Pending PRs:
https://github.com/os-autoinst/os-autoinst/pull/2420
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/18360