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 4/6] starfive-visionfive2: create u-boot-spl firmware
Date: Mon, 10 Apr 2023 09:42:50 +0000 [thread overview]
Message-ID: <20230410094252.1151370-5-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20230410094252.1151370-1-felix.moessbauer@siemens.com>
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
.../jh7110-u-boot-spl-image/files/install | 1 +
.../jh7110-u-boot-spl-image/files/rules | 10 +++++++
.../jh7110-u-boot-spl-image_0.1.bb | 30 +++++++++++++++++++
.../jh7110-u-boot-spl-tool_0.1.bb | 23 ++++++++++++++
4 files changed, 64 insertions(+)
create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install
create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb
diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install
new file mode 100644
index 00000000..c300f842
--- /dev/null
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install
@@ -0,0 +1 @@
+u-boot-spl.bin.normal.out usr/share/jh7110-uboot-spl-image
diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
new file mode 100644
index 00000000..6a25dd36
--- /dev/null
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+U_BOOT_SPL_BIN := /usr/lib/u-boot/starfive-visionfive2/u-boot-spl.bin
+
+override_dh_auto_build:
+ cp $(U_BOOT_SPL_BIN) u-boot-spl.bin
+ /usr/lib/jh7110-uboot-spl-tool/spl_tool -c -f u-boot-spl.bin
+
+%:
+ dh \$@
diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
new file mode 100644
index 00000000..08c53b51
--- /dev/null
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
@@ -0,0 +1,30 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg
+
+SRC_URI = "file://rules file://install"
+
+DESCRIPTION = "StarFive VisionFive 2 u-boot SPL"
+DEPENDS = "jh7110-u-boot-spl-tool u-boot-starfive-visionfive2"
+DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool, u-boot-starfive-visionfive2:${DISTRO_ARCH}"
+
+# this is a host tool
+PACKAGE_ARCH = "${HOST_ARCH}"
+
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build(){
+ deb_debianize
+ cp ${WORKDIR}/install ${S}/debian/
+}
+
+do_deploy() {
+ dpkg --fsys-tarfile ${WORKDIR}/jh7110-u-boot-spl-image_${PV}*.deb | \
+ tar xOf - "./usr/share/jh7110-uboot-spl-image/u-boot-spl.bin.normal.out" \
+ > "${DEPLOY_DIR_IMAGE}/u-boot-spl.bin.normal.out"
+}
+
+addtask deploy after do_dpkg_build before do_build
+do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}"
diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb
new file mode 100644
index 00000000..1835d474
--- /dev/null
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb
@@ -0,0 +1,23 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg
+
+DESCRIPTION = "VisionFive2 SDK spl_tool"
+LICENSE = "CPL-1"
+
+SRC_URI = "git://github.com/starfive-tech/Tools.git;branch=master;protocol=https;destsuffix=tools"
+SRCREV = "8c5acc4e5eb7e4ad012463b05a5e3dbbfed1c38d"
+
+S = "${WORKDIR}/tools/spl_tool"
+
+# This is a host tool
+PACKAGE_ARCH = "${HOST_ARCH}"
+
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build(){
+ deb_debianize
+ echo "spl_tool usr/lib/jh7110-uboot-spl-tool" > ${S}/debian/${PN}.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 ` [PATCH v4 2/6] starfive-visionfive2: package opensbi firmware Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 3/6] starfive-visionfive2: add BSP kernel Felix Moessbauer
2023-04-10 9:42 ` Felix Moessbauer [this message]
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-5-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