test riscv in xenomai-images CI
v4 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
Changes since v3:
* qemu-riscv64 testing patch already merged
* Cleaned up the mixed up commit message (sorry for the mess)
* Added StarFive VisionFive2 kconfig entry
Tobias Schaffner (3):
ci: Fix deploy script to handle multiple DTB files
riscv: Add StarFive VisionFive2 board support
ci: run ci tests on StarFive VisionFive2 1.2a
Kconfig | 5 ++ ci/lib/gitlab-ci-base.yml | 21 ++++++ ci/lib/kernel/head.yml | 13 ++++ conf/machine/starfive-visionfive2.conf | 21 ++++++ kas/board/starfive-visionfive2.yaml | 15 ++++ .../opensbi-starfive-visionfive2_1.8.1.bb | 19 +++++ .../u-boot-starfive-visionfive2_2025.07.bb | 31 ++++++++ scripts/deploy_to_aws.sh | 9 +-- tests/jobs/xenomai-starfive-visionfive2.yml | 71 +++++++++++++++++++ wic/starfive-visionfive2.wks | 23 ++++++ 10 files changed, 224 insertions(+), 4 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 tests/jobs/xenomai-starfive-visionfive2.yml create mode 100644 wic/starfive-visionfive2.wks
Signature · 1 line
2.43.0
PATCH v4 1/3 ci: Fix deploy script to handle multiple DTB files
Loop 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 v4 2/3 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.
--- Kconfig | 5 +++ conf/machine/starfive-visionfive2.conf | 21 +++++++++++++ kas/board/starfive-visionfive2.yaml | 15 +++++++++ .../opensbi-starfive-visionfive2_1.8.1.bb | 19 ++++++++++++ .../u-boot-starfive-visionfive2_2025.07.bb | 31 +++++++++++++++++++ wic/starfive-visionfive2.wks | 23 ++++++++++++++ 6 files changed, 114 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
Kconfig +5 -0
@@ -56,6 +56,10 @@ config TARGET_RPI4 bool "Raspberry Pi 4" select ARCH_ARM64 +config TARGET_STARFIVE_VISIONFIVE2 + bool "StarFive VisionFive2" + select ARCH_RISCV64 + endchoice config KAS_INCLUDE_TARGET
@@ -68,6 +72,7 @@ config KAS_INCLUDE_TARGET default "kas/board/qemu-riscv64.yaml" if TARGET_QEMU_RISCV64 default "kas/board/hikey.yaml" if TARGET_HIKEY default "kas/board/rpi4.yaml" if TARGET_RPI4 + default "kas/board/starfive-visionfive2.yaml" if TARGET_STARFIVE_VISIONFIVE2 choice prompt "Xenomai version"
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 +19 -0
@@ -0,0 +1,19 @@ +# +# Copyright (c) Siemens AG, 2023-2026 +# +# SPDX-License-Identifier: MIT + +inherit opensbi + +MAINTAINER = "Tobias Schaffner <[email protected]>" +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 +31 -0
@@ -0,0 +1,31 @@ +# +# Copyright (c) Siemens AG, 2023-2026 +# +# SPDX-License-Identifier: MIT + +inherit u-boot + +MAINTAINER = "Tobias Schaffner <[email protected]>" +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 v4 3/3 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.
--- 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
Jan Kiszka
AppliedQuoted 45 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.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 messageChanges since v3:
* qemu-riscv64 testing patch already merged
* Cleaned up the mixed up commit message (sorry for the mess)
* Added StarFive VisionFive2 kconfig entryTobias Schaffner (3):
ci: Fix deploy script to handle multiple DTB files
riscv: Add StarFive VisionFive2 board support
ci: run ci tests on StarFive VisionFive2 1.2aKconfig | 5 ++ ci/lib/gitlab-ci-base.yml | 21 ++++++ ci/lib/kernel/head.yml | 13 ++++ conf/machine/starfive-visionfive2.conf | 21 ++++++ kas/board/starfive-visionfive2.yaml | 15 ++++ .../opensbi-starfive-visionfive2_1.8.1.bb | 19 +++++ .../u-boot-starfive-visionfive2_2025.07.bb | 31 ++++++++ scripts/deploy_to_aws.sh | 9 +-- tests/jobs/xenomai-starfive-visionfive2.yml | 71 +++++++++++++++++++
Quoted 9 lines
wic/starfive-visionfive2.wks | 23 ++++++ 10 files changed, 224 insertions(+), 4 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 tests/jobs/xenomai-starfive-visionfive2.yml create mode 100644 wic/starfive-visionfive2.wks
Thanks, applied.
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center