test riscv in xenomai-images CI
v3 cover test riscv in xenomai-images CI
Hi all,
this enables RISC-V testing in the Xenomai Images CI.
It runs the EVL test suite on both qemu-riscv64 as well as the StarFive VisionFive2.
See the last successful run here:
https://gitlab.com/Xenomai/xenomai-images/-/pipelines/2500187079
Changes since v1 (the RFC):
* Do not depend on meta-isar but add the visionfive2 BSP to xenomai-images
* Use the latest openSBI version but stick to u-boot 2025.07 which is unfortunately the last version that supports booting from SD-Card.
* Use the risc-v defconfig of linux kernel 7.0 and add the needed debug and nfs switches in additional sections in the end. Factoring out the snippets for all architectures can be discussed in later patch sets.
* Only run the tests on the qemu05 runner (tag: SIEMENS_ERL_QEMU) as long as qemu01 runs on the outdated qemu 7.2.2 which hangs up with riscv workloads from time to time.
Changes since v2:
* Add information about the used board version in the xeno-lab to test file and commit message
* Add information about the used u-boot version to the commit message
Tobias Schaffner (4):
ci: Build and test the evl risc-v port on qemu
ci: Fix deploy script to handle multiple DTB files
riscv: Add StarFive VisionFive2 board support
ci: run ci tests on StarFive VisionFive2 1.2a
ci/lib/gitlab-ci-base.yml | 59 ++- ci/lib/kernel/head.yml | 26 ++ conf/machine/qemu-riscv64.conf | 1 - conf/machine/starfive-visionfive2.conf | 21 ++ kas/board/starfive-visionfive2.yaml | 15 + .../opensbi-starfive-visionfive2_1.8.1.bb | 18 + .../u-boot-starfive-visionfive2_2025.07.bb | 30 ++ recipes-kernel/linux/files/common_nodbg.cfg | 2 + recipes-kernel/linux/files/riscv64_defconfig | 335 ++++++++++++++++++ scripts/deploy_to_aws.sh | 9 +- tests/jobs/xenomai-qemu-riscv64.yml | 95 +++++ tests/jobs/xenomai-starfive-visionfive2.yml | 71 ++++ wic/starfive-visionfive2.wks | 23 ++ 13 files changed, 694 insertions(+), 11 deletions(-) create mode 100644 conf/machine/starfive-visionfive2.conf create mode 100644 kas/board/starfive-visionfive2.yaml create mode 100644 recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.8.1.bb create mode 100644 recipes-bsp/u-boot/u-boot-starfive-visionfive2_2025.07.bb create mode 100644 recipes-kernel/linux/files/riscv64_defconfig create mode 100644 tests/jobs/xenomai-qemu-riscv64.yml create mode 100644 tests/jobs/xenomai-starfive-visionfive2.yml create mode 100644 wic/starfive-visionfive2.wks
Signature · 1 line
2.43.0
PATCH v3 1/4 ci: Build and test the evl risc-v port on qemu
Build evl for quemu-riscv64 and run the evl tests in lava. Skip the ptrace-sync test for now as it fails because of an open issue in EVL.
Added sections in the end of the riscv64 defconfig for nfs and debugging specific configs to allow easy factoring out as snippets later.
Only run the tests on the qemu05 runner (tag: SIEMENS_ERL_QEMU) as long as qemu01 runs on the outdated qemu 7.2.2 which hangs up with riscv workloads from time to time.
--- ci/lib/gitlab-ci-base.yml | 38 ++- ci/lib/kernel/head.yml | 13 + conf/machine/qemu-riscv64.conf | 1 - recipes-kernel/linux/files/common_nodbg.cfg | 2 + recipes-kernel/linux/files/riscv64_defconfig | 335 +++++++++++++++++++ tests/jobs/xenomai-qemu-riscv64.yml | 95 ++++++ 6 files changed, 477 insertions(+), 7 deletions(-) create mode 100644 recipes-kernel/linux/files/riscv64_defconfig create mode 100644 tests/jobs/xenomai-qemu-riscv64.yml
ci/lib/gitlab-ci-base.yml +32 -6
@@ -85,11 +85,14 @@ default: paths: - build/downloads +.build-qemu-rules: &build-qemu-rules + - if: '$KERNEL_VERSION == $KERNEL_VERSION_WITH_QEMU' + - if: '$ALL_QEMU_JOBS == "true"' + .build-qemu: extends: .build rules: - - if: '$KERNEL_VERSION == $KERNEL_VERSION_WITH_QEMU' - - if: '$ALL_QEMU_JOBS == "true"' + - *build-qemu-rules .test: stage: test
@@ -109,6 +112,12 @@ default: rules: - if: '$LAVA_TESTS_ENABLED == "true"' +.test-qemu-rules: &test-qemu-rules + - if: '$LAVA_TESTS_ENABLED != "true"' + when: never + - if: '$KERNEL_VERSION == $KERNEL_VERSION_WITH_QEMU' + - if: '$ALL_QEMU_JOBS == "true"' + .test-qemu: extends: .test variables:
@@ -116,10 +125,7 @@ default: ADDITIONAL_TEST_TIMEOUT_MINUTES: 25 EVL_TESTS_SKIP_PATTERN: "sched-quota-accuracy|sched-tp-accuracy|sched-tp-overrun|monitor-event-untrack" rules: - - if: '$LAVA_TESTS_ENABLED != "true"' - when: never - - if: '$KERNEL_VERSION == $KERNEL_VERSION_WITH_QEMU' - - if: '$ALL_QEMU_JOBS == "true"' + - *test-qemu-rules .build:qemu-amd64: extends: .build-qemu
@@ -154,6 +160,26 @@ default: variables: TARGET: qemu-arm64 +.build:qemu-riscv64: + extends: .build-qemu + variables: + TARGET: qemu-riscv64 + CACHE_ARCH: riscv64 + rules: + - if: '$XENOMAI_VERSION != "4-next"' + when: never + - *build-qemu-rules + +.lava-test:qemu-riscv64: + extends: .test-qemu + variables: + TARGET: qemu-riscv64 + EVL_TESTS_SKIP_PATTERN: "ptrace-sync|sched-quota-accuracy|sched-tp-accuracy|sched-tp-overrun|monitor-event-untrack" + rules: + - if: '$XENOMAI_VERSION != "4-next"' + when: never + - *test-qemu-rules + .build:hikey: extends: .build variables:
ci/lib/kernel/head.yml +13 -0
@@ -48,6 +48,19 @@ lava-test-head:qemu-arm64: variables: KERNEL_VERSION: "head" +build-head:qemu-riscv64: + extends: .build:qemu-riscv64 + variables: + LINUX_BUILD_OPTION: ":kas/opt/linux-head.yaml" + KERNEL_VERSION: "head" + CACHE_KERNEL: evl + +lava-test-head:qemu-riscv64: + needs: [ "build-head:qemu-riscv64" ] + extends: .lava-test:qemu-riscv64 + variables: + KERNEL_VERSION: "head" + build-head:rpi4: extends: .build:rpi4 variables:
conf/machine/qemu-riscv64.conf +0 -1
@@ -12,4 +12,3 @@ require qemu-machine.inc DISTRO_ARCH = "riscv64" -KERNEL_DEFCONFIG = ""
recipes-kernel/linux/files/common_nodbg.cfg +2 -0
@@ -1,5 +1,7 @@ # CONFIG_IPIPE_DEBUG is not set # CONFIG_XENO_OPT_DEBUG is not set +# CONFIG_EVL_DEBUG is not set +# CONFIG_EVL_DEBUG_CORE is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set # CONFIG_BUG_ON_DATA_CORRUPTION is not set
recipes-kernel/linux/files/riscv64_defconfig new file +335 -0
335 lines not on this page · raw message
tests/jobs/xenomai-qemu-riscv64.yml new file +95 -0
95 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v3 2/4 ci: Fix deploy script to handle multiple DTB files
In reply to Tobias SchaffnerLoop over DTB files individually instead of treating them as one path.
--- scripts/deploy_to_aws.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
scripts/deploy_to_aws.sh +5 -4
@@ -53,7 +53,8 @@ image=$(ls "${images_dir}/${target}/${isar_base_name}".*.gz) aws s3 cp "${image}" "${deploy_dir}/$(basename "${image}")" # DTB -dtb=$(ls "${images_dir}/${target}/"*.dtb 2> /dev/null || true ) -if [ -n "${dtb}" ] ; then - aws s3 cp "${dtb}" "${deploy_dir}/$(basename "${dtb}")" -fi +for dtb in "${images_dir}/${target}/"*.dtb ; do + if [ -f "${dtb}" ]; then + aws s3 cp "${dtb}" "${deploy_dir}/$(basename "${dtb}")" + fi +done
Signature · 1 line
2.43.0
PATCH v3 3/4 riscv: Add StarFive VisionFive2 board support
In reply to Tobias SchaffnerAdd machine config, U-Boot, OpenSBI, and WIC layout for StarFive VisionFive2 RISC-V board.
Use the latest openSBI version 1.8.1 but stick to u-boot 2025.07 which is unfortunately the last version that supports booting from SD-Card.
--- conf/machine/starfive-visionfive2.conf | 21 +++++++++++++ kas/board/starfive-visionfive2.yaml | 15 ++++++++++ .../opensbi-starfive-visionfive2_1.8.1.bb | 18 +++++++++++ .../u-boot-starfive-visionfive2_2025.07.bb | 30 +++++++++++++++++++ wic/starfive-visionfive2.wks | 23 ++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 conf/machine/starfive-visionfive2.conf create mode 100644 kas/board/starfive-visionfive2.yaml create mode 100644 recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.8.1.bb create mode 100644 recipes-bsp/u-boot/u-boot-starfive-visionfive2_2025.07.bb create mode 100644 wic/starfive-visionfive2.wks
conf/machine/starfive-visionfive2.conf new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright (c) Siemens AG, 2023-2026 +# +# SPDX-License-Identifier: MIT +# + +DISTRO_ARCH = "riscv64" + +DTB_FILES = " \ + starfive/jh7110-starfive-visionfive-2-v1.2a.dtb \ + starfive/jh7110-starfive-visionfive-2-v1.3b.dtb" + +IMAGE_FSTYPES ?= "wic" +WKS_FILE ?= "starfive-visionfive2.wks" +IMAGER_INSTALL:wic += " \ + u-boot-starfive-visionfive2 \ + ${SYSTEMD_BOOTLOADER_INSTALL}" +IMAGER_BUILD_DEPS += "u-boot-starfive-visionfive2" + +PREFERRED_PROVIDER_u-boot-${MACHINE} = "u-boot-starfive-visionfive2" +
kas/board/starfive-visionfive2.yaml new file +15 -0
@@ -0,0 +1,15 @@ +# +# Xenomai Real-Time System +# +# Copyright (c) Siemens AG, 2026 +# +# Authors: +# Tobias Schaffner <[email protected]> +# +# SPDX-License-Identifier: MIT +# + +header: + version: 14 + +machine: starfive-visionfive2
recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.8.1.bb new file +18 -0
@@ -0,0 +1,18 @@ +# +# Copyright (c) Siemens AG, 2023-2026 +# +# SPDX-License-Identifier: MIT + +inherit opensbi + +DESCRIPTION = "OpenSBI firmware for StarFive VisionFive 2" + +SRC_URI += "https://github.com/riscv-software-src/opensbi/archive/refs/tags/v${PV}.tar.gz;downloadfilename=opensbi-${PV}.tar.gz" +SRC_URI[sha256sum] = "fb1ae61a85e966322101acb1c982f84d9eaafc4de7dd474a7d7546d9bb321c6f" + +S = "${WORKDIR}/opensbi-${PV}" + +OPENSBI_EXTRA_BUILDARGS = "FW_TEXT_START=0x40000000 FW_OPTIONS=0" +OPENSBI_BIN = "fw_dynamic.bin" + +COMPATIBLE_MACHINE = "^(starfive-visionfive2)$"
recipes-bsp/u-boot/u-boot-starfive-visionfive2_2025.07.bb new file +30 -0
@@ -0,0 +1,30 @@ +# +# Copyright (c) Siemens AG, 2023-2026 +# +# SPDX-License-Identifier: MIT + +inherit u-boot + +DESCRIPTION = "U-Boot for StarFive VisionFive 2" + +COMPATIBLE_MACHINE = "^(starfive-visionfive2)$" + +SRC_URI += "https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2" +SRC_URI[sha256sum] = "0f933f6c5a426895bf306e93e6ac53c60870e4b54cda56d95211bec99e63bec7" + +S = "${WORKDIR}/u-boot-${PV}" + +DEPENDS += "opensbi-starfive-visionfive2" +DEBIAN_BUILD_DEPENDS .= ", opensbi-starfive-visionfive2, \ + python3-dev:native, python3-setuptools, swig, \ + libssl-dev:${DISTRO_ARCH}, libssl-dev:native, \ + libgnutls28-dev:${DISTRO_ARCH}, libgnutls28-dev:native" + +U_BOOT_CONFIG = "starfive_visionfive2_defconfig" +U_BOOT_BIN = "all" +U_BOOT_EXTRA_BUILDARGS = "OPENSBI=/usr/lib/opensbi/starfive-visionfive2/fw_dynamic.bin" + +do_prepare_build:append() { + echo "u-boot.itb spl/u-boot-spl.bin.normal.out /usr/lib/u-boot/${MACHINE}" > \ + ${S}/debian/u-boot-${MACHINE}.install +}
wic/starfive-visionfive2.wks new file +23 -0
@@ -0,0 +1,23 @@ +# +# Copyright (c) Siemens AG, 2023-2026 +# +# SPDX-License-Identifier: MIT + +# The partition layout is based on the VisionFive2 example image: +# https://github.com/starfive-tech/VisionFive2/blob/JH7110_VisionFive2_devel/Makefile#L394 +# However, instead of booting via ubootenv + fit, we boot fit + efi +# +# When booting from the SD card, make sure that the DIP switches are set to SD card. +# By that, the board reads the u-boot firmware from the SD instead of the internal flash. +# This is required to boot efi with the correct device tree, which is included in the fit image. + +# SPL +part --source rawcopy --sourceparams "file=/usr/lib/u-boot/starfive-visionfive2/u-boot-spl.bin.normal.out" --fixed-size 2M --part-type 2E54B353-1271-4842-806F-E436D6AF6985 +# U-Boot FIT +part --source rawcopy --sourceparams "file=/usr/lib/u-boot/starfive-visionfive2/u-boot.itb" --fixed-size 4M --part-type BC13C2FF-59E6-4262-A352-B275FD6F7172 +# EFI - DTB comes from U-Boot, not hardcoded in loader entry +part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot" --use-uuid --label efi --part-type EF00 --align 1024 +# rootfs +part / --source rootfs --use-uuid --fstype ext4 --mkfs-extraopts "-T default" --label image --active --align 1024 --exclude-path=boot/ + +bootloader --ptable gpt --timeout=0 --append "console=tty0 console=ttyS0,115200 earlycon rootwait"
Signature · 1 line
2.43.0
PATCH v3 4/4 ci: run ci tests on StarFive VisionFive2 1.2a
In reply to Tobias SchaffnerAdd CI/LAVA build and test jobs for hardware testing on the StarFive VisionFive2 1.2a board in the xenomai lab.
Only run the tests on the qemu05 runner (tag: SIEMENS_ERL_QEMU) as long as qemu01 runs on the outdated qemu 7.2.2 which hangs up with riscv workloads from time to time.
--- ci/lib/gitlab-ci-base.yml | 21 ++++++ ci/lib/kernel/head.yml | 13 ++++ tests/jobs/xenomai-starfive-visionfive2.yml | 71 +++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 tests/jobs/xenomai-starfive-visionfive2.yml
ci/lib/gitlab-ci-base.yml +21 -0
@@ -227,3 +227,24 @@ default: resource_group: board-x86-64-efi variables: TARGET: x86-64-efi + +.build:starfive-visionfive2: + extends: .build + variables: + TARGET: starfive-visionfive2 + CACHE_ARCH: riscv64 + rules: + - if: '$XENOMAI_VERSION != "4-next"' + when: never + - when: always + +.lava-test:starfive-visionfive2: + extends: .test + resource_group: board-starfive-visionfive2 + variables: + TARGET: starfive-visionfive2 + EVL_TESTS_SKIP_PATTERN: "ptrace-sync" + rules: + - if: '$XENOMAI_VERSION != "4-next"' + when: never + - if: '$LAVA_TESTS_ENABLED == "true"'
ci/lib/kernel/head.yml +13 -0
@@ -61,6 +61,19 @@ lava-test-head:qemu-riscv64: variables: KERNEL_VERSION: "head" +build-head:starfive-visionfive2: + extends: .build:starfive-visionfive2 + variables: + LINUX_BUILD_OPTION: ":kas/opt/linux-head.yaml" + KERNEL_VERSION: "head" + CACHE_KERNEL: evl + +lava-test-head:starfive-visionfive2: + needs: [ "build-head:starfive-visionfive2" ] + extends: .lava-test:starfive-visionfive2 + variables: + KERNEL_VERSION: "head" + build-head:rpi4: extends: .build:rpi4 variables:
tests/jobs/xenomai-starfive-visionfive2.yml new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [PATCH xenomai-images v3 4/4] ci: run ci tests on StarFive VisionFive2 1.2a
Quoted 6 lines · Tobias Schaffner
Add CI/LAVA build and test jobs for hardware testing on the StarFive VisionFive2 1.2a board in the xenomai lab.
Only run the tests on the qemu05 runner (tag:
SIEMENS_ERL_QEMU) as long as qemu01 runs on the outdated qemu 7.2.2 which hangs up with riscv workloads from time to time.
The second paragraph is a mismatch for this patch.
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center
Quoted 21 lines · Tobias Schaffner
Hi all,
this enables RISC-V testing in the Xenomai Images CI.
It runs the EVL test suite on both qemu-riscv64 as well as the StarFive VisionFive2.
See the last successful run here:
https://gitlab.com/Xenomai/xenomai-images/-/pipelines/2500187079Changes since v1 (the RFC):
* Do not depend on meta-isar but add the visionfive2 BSP to xenomai-images
* Use the latest openSBI version but stick to u-boot 2025.07 which is unfortunately the last version that supports booting from SD-Card.
* Use the risc-v defconfig of linux kernel 7.0 and add the needed debug and nfs switches in additional sections in the end. Factoring out the snippets for all architectures can be discussed in later patch sets.
* Only run the tests on the qemu05 runner (tag:SIEMENS_ERL_QEMU) as long as qemu01 runs on the outdated qemu 7.2.2 which hangs up with riscv workloads from time to time.
Quoted 7 lines
Changes since v2:
* Add information about the used board version in the xeno-lab to test file and commit message
* Add information about the used u-boot version to the commit messageTobias Schaffner (4):
ci: Build and test the evl risc-v port on qemu
This was already merged.
Quoted 2 lines
ci: Fix deploy script to handle multiple DTB files
riscv: Add StarFive VisionFive2 board support
This one is still lacking Kconfig integration.
Jan
Quoted 25 lines
ci: run ci tests on StarFive VisionFive2 1.2a
ci/lib/gitlab-ci-base.yml | 59 ++- ci/lib/kernel/head.yml | 26 ++ conf/machine/qemu-riscv64.conf | 1 - conf/machine/starfive-visionfive2.conf | 21 ++ kas/board/starfive-visionfive2.yaml | 15 + .../opensbi-starfive-visionfive2_1.8.1.bb | 18 + .../u-boot-starfive-visionfive2_2025.07.bb | 30 ++ recipes-kernel/linux/files/common_nodbg.cfg | 2 + recipes-kernel/linux/files/riscv64_defconfig | 335 ++++++++++++++++++ scripts/deploy_to_aws.sh | 9 +- tests/jobs/xenomai-qemu-riscv64.yml | 95 +++++ tests/jobs/xenomai-starfive-visionfive2.yml | 71 ++++ wic/starfive-visionfive2.wks | 23 ++ 13 files changed, 694 insertions(+), 11 deletions(-) create mode 100644 conf/machine/starfive-visionfive2.conf create mode 100644 kas/board/starfive-visionfive2.yaml create mode 100644 recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.8.1.bb create mode 100644 recipes-bsp/u-boot/u-boot-starfive-visionfive2_2025.07.bb create mode 100644 recipes-kernel/linux/files/riscv64_defconfig create mode 100644 tests/jobs/xenomai-qemu-riscv64.yml create mode 100644 tests/jobs/xenomai-starfive-visionfive2.yml create mode 100644 wic/starfive-visionfive2.wks
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center