Project

General

Profile

Actions

action #152849

closed

RISC-V testing on openqa.o.o

Added by favogt 7 months ago. Updated 9 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2023-12-21
Due date:
% Done:

100%

Estimated time:

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

Actions #1

Updated by okurz 7 months ago

  • Category set to Feature requests
  • Target version set to future
Actions #2

Updated by favogt about 1 month ago

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

That's no longer necessary, http://download.opensuse.org/tumbleweed/repo/oss/noarch/qemu-uefi-riscv64-202311-1.1.noarch.rpm has this fixed.

Actions #3

Updated by favogt 16 days ago

  • Status changed from New to Resolved
  • Assignee set to favogt
  • % Done changed from 80 to 100

openqaworker28 sat idle for a long time so for now it's configured as RISC-V capable worker. That uncovered a regression in os-autoinst: https://github.com/os-autoinst/os-autoinst/pull/2502.

Some test code changes later, the jobs are now providing increasingly useful results.

TW for RISC-V doesn't use TTM, so instead of hooking it up to openqa-trigger-from-obs I added a pipeline to jenkins: http://jenkins.qa.suse.de/job/jeos-riscv-openqa/

Actions #4

Updated by pvorel 9 days ago

@favogt FYI I added 4 LTP jobs running on risc-v on devel group https://openqa.opensuse.org/admin/job_templates/38. Please let me know if this is problematic for any reason (lack of resources) or just remove it yourself.

Actions #5

Updated by pvorel 9 days ago

Also I wonder, if the working jobs could be moved into "openSUSE Tumbleweed risc-v" (which would need to be created first).

Actions #6

Updated by favogt 9 days ago

@favogt FYI I added 4 LTP jobs running on risc-v on devel group https://openqa.opensuse.org/admin/job_templates/38. Please let me know if this is problematic for any reason (lack of resources) or just remove it yourself.

I had to add EXCLUDE_MODULES as workaround (it expects onlyRequires, which the RISC-V image does intentionally not have) and it appears they're (mostly) working now \o/
Resources are not an issue, RISC-V currently has a powerful dedicated x86_64 worker.

Also I wonder, if the working jobs could be moved into "openSUSE Tumbleweed risc-v" (which would need to be created first).

Given that the jobs appear to work well enough that they're actually useful, I created that group. I'll move working jobs over soon.

Actions

Also available in: Atom PDF