[PATCH 2/3] opensbi-starfive-visionfive2: Use new obensbi class

1 view
Skip to first unread message

Jan Kiszka

unread,
Oct 29, 2025, 2:08:21 PM (2 days ago) Oct 29
to isar-users
From: Jan Kiszka <jan.k...@siemens.com>

This simplifies the recipe, specifically obsoleting the need for an own
rules file.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
.../opensbi/files/starfive-visionfive2-rules | 12 ------------
.../opensbi/opensbi-starfive-visionfive2_1.4.bb | 17 +++++------------
2 files changed, 5 insertions(+), 24 deletions(-)
delete mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules

diff --git a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules
deleted file mode 100644
index 452ff356..00000000
--- a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/make -f
-
-ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
-endif
-
-override_dh_auto_build:
- CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) \
- PLATFORM=generic FW_TEXT_START=0x40000000 FW_OPTIONS=0
-
-%:
- dh $@
diff --git a/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.4.bb b/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.4.bb
index 766d1ed7..0b08a1af 100644
--- a/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.4.bb
+++ b/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.4.bb
@@ -1,25 +1,18 @@
#
-# Copyright (c) Siemens AG, 2023
+# Copyright (c) Siemens AG, 2023-2025
#
# SPDX-License-Identifier: MIT

-inherit dpkg
+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 \
- file://starfive-visionfive2-rules"
+SRC_URI += "https://github.com/riscv-software-src/opensbi/archive/refs/tags/v${PV}.tar.gz;downloadfilename=opensbi-${PV}.tar.gz"
SRC_URI[sha256sum] = "319b62a4186fbce9b81a0c5f0ec9f003a10c808397a72138bc9745d9b87b1eb1"

S = "${WORKDIR}/opensbi-${PV}"

-do_prepare_build[cleandirs] += "${S}/debian"
-do_prepare_build() {
- cp ${WORKDIR}/starfive-visionfive2-rules ${WORKDIR}/rules
- deb_debianize
-
- echo "build/platform/generic/firmware/fw_dynamic.bin /usr/lib/opensbi/starfive-visionfive2/" > ${S}/debian/install
-}
+OPENSBI_EXTRA_BUILDARGS = "FW_TEXT_START=0x40000000 FW_OPTIONS=0"
+OPENSBI_BIN = "fw_dynamic.bin"

COMPATIBLE_MACHINE = "starfive-visionfive2"
--
2.51.0

Reply all
Reply to author
Forward
0 new messages