From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, daniel.bovensiepen@siemens.com,
florian.bezdeka@siemens.com,
Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v4 2/6] starfive-visionfive2: package opensbi firmware
Date: Mon, 10 Apr 2023 09:42:48 +0000 [thread overview]
Message-ID: <20230410094252.1151370-3-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20230410094252.1151370-1-felix.moessbauer@siemens.com>
This patch adds the opensbi firmware for the starfive visionfive2 board,
based on the official BSP package.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
.../files/starfive-visionfive2-rules.tmpl | 17 ++++++++++
...ensbi-starfive-visionfive2_1.2+20230310.bb | 31 +++++++++++++++++++
2 files changed, 48 insertions(+)
create mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
create mode 100644 meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb
diff --git a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
new file mode 100644
index 00000000..5f35c1c2
--- /dev/null
+++ b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
+endif
+
+UBOOT_DTB_FILE := /usr/share/u-boot/starfive-visionfive2/${DTB_UBOOT_JH7110_VF2}
+FW_TEXT_START := 0x40000000
+
+override_dh_auto_build:
+ CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) PLATFORM=generic \
+ FW_PAYLOAD_PATH=/usr/lib/u-boot/starfive-visionfive2/u-boot.bin \
+ FW_FDT_PATH=$(UBOOT_DTB_FILE) \
+ FW_TEXT_START=$(FW_TEXT_START)
+
+%:
+ dh $@
diff --git a/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb b/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb
new file mode 100644
index 00000000..86be2932
--- /dev/null
+++ b/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb
@@ -0,0 +1,31 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg
+
+DESCRIPTION = "OpenSBI firmware for StarFive VisionFive 2"
+
+SRC_URI = " \
+ git://github.com/riscv-software-src/opensbi.git;destsuffix=opensbi-${PV};protocol=https;branch=master \
+ file://starfive-visionfive2-rules.tmpl"
+# required patches are not yet part of a release, but will be in 1.3
+SRCREV = "2868f26131308ff345382084681ea89c5b0159f1"
+
+S = "${WORKDIR}/opensbi-${PV}"
+TEMPLATE_FILES += "starfive-visionfive2-rules.tmpl"
+TEMPLATE_VARS += "DTB_UBOOT_JH7110_VF2"
+
+DEPENDS = "u-boot-starfive-visionfive2"
+DEBIAN_BUILD_DEPENDS = " \
+ u-boot-starfive-visionfive2, \
+ u-boot-starfive-visionfive2-dev"
+
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build() {
+ cp ${WORKDIR}/starfive-visionfive2-rules ${WORKDIR}/rules
+ deb_debianize
+
+ echo "build/platform/generic/firmware/fw_payload.bin /usr/lib/opensbi/starfive-visionfive2/" > ${S}/debian/install
+}
--
2.34.1
next prev parent reply other threads:[~2023-04-10 9:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 9:42 [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 1/6] starfive-visionfive2: package u-boot Felix Moessbauer
2023-06-04 9:26 ` Jan Kiszka
2023-04-10 9:42 ` Felix Moessbauer [this message]
2023-04-10 9:42 ` [PATCH v4 3/6] starfive-visionfive2: add BSP kernel Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 4/6] starfive-visionfive2: create u-boot-spl firmware Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 5/6] starfive-visionfive2: create u-boot-spl FIT image Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 6/6] starfive-visionfive2: add machine Felix Moessbauer
2023-05-26 5:14 ` [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board MOESSBAUER, Felix
2023-05-26 7:48 ` Uladzimir Bely
2023-05-27 10:41 ` Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230410094252.1151370-3-felix.moessbauer@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=daniel.bovensiepen@siemens.com \
--cc=florian.bezdeka@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox