* [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board
@ 2023-04-10 9:42 Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 1/6] starfive-visionfive2: package u-boot Felix Moessbauer
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: Felix Moessbauer @ 2023-04-10 9:42 UTC (permalink / raw)
To: isar-users
Cc: jan.kiszka, daniel.bovensiepen, florian.bezdeka, Felix Moessbauer
Changes since v3:
- rebased onto next
- drop "u-boot: make KCFLAGS and HOSTCFLAGS configurable"
- opensbi: update version
- u-boot
- update which makes patches obsolete
- support to compile without cross
- simplify build dependencies
- remove KCFLAGS injection
- spl_tool: replace with OSS version from StarFive
- linux: update which makes patches obsolete
Changes since v2:
- rebased onto next
- rework u-boot customization (p1)
- update opensbi
- update kernel
Changes since v1:
- rebased onto next (including bitbake 2.0 migration)
- exclude opensbi memory range in u-boot DT
- use upstream OpenSBI version (instead of StarFive version)
This series adds a new machine "starfive-visionfive2" which is a
Risc-V board based on the JH7110 SoC. The BSP is modeled based on the
buildroot SDK [1], but without any proprietary imaging components.
Further, we implement the fit + efi boot toolchain, instead of the
proposed ubootenv + fit version. This also requires that we embed the
board's linux device tree into the fit, as memory and reserved-memory
nodes are resolved via the efi API (implemented by u-boot) instead of
resolving them via the DT in Linux.
As the JH7110 SoC has no usable upstream support yet, we directly
build the 5.15 based kernel from the SDK, instead of porting patches
on top of the standard Linux. Distro kernels are also not supported.
Best regards,
Felix Moessbauer
Siemens AG
Felix Moessbauer (6):
starfive-visionfive2: package u-boot
starfive-visionfive2: package opensbi firmware
starfive-visionfive2: add BSP kernel
starfive-visionfive2: create u-boot-spl firmware
starfive-visionfive2: create u-boot-spl FIT image
starfive-visionfive2: add machine
meta-isar/conf/local.conf.sample | 1 +
.../conf/machine/starfive-visionfive2.conf | 29 +++++++++++++
.../starfive-visionfive2-sid-ports.conf | 7 ++++
.../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 +++++++++++
.../files/starfive-visionfive2-rules.tmpl | 17 ++++++++
...ensbi-starfive-visionfive2_1.2+20230310.bb | 31 ++++++++++++++
...five-visionfive2_2022.01-rc4+VF2-2.11.5.bb | 31 ++++++++++++++
.../files/rules.tmpl | 12 ++++++
.../files/visionfive2-u-boot-firmware.install | 1 +
.../visionfive2-uboot-fit-image.its.tmpl | 41 +++++++++++++++++++
.../visionfive2-u-boot-firmware.bb | 36 ++++++++++++++++
.../linux/files/starfive2_extra.cfg | 3 ++
.../linux/linux-starfive_5.15-visionfive2.bb | 17 ++++++++
.../canned-wks/starfive-visionfive2.wks.in | 23 +++++++++++
17 files changed, 313 insertions(+)
create mode 100644 meta-isar/conf/machine/starfive-visionfive2.conf
create mode 100644 meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf
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
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
create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb
create mode 100644 meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
create mode 100644 meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
create mode 100644 meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 1/6] starfive-visionfive2: package u-boot
2023-04-10 9:42 [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
@ 2023-04-10 9:42 ` 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
` (6 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Felix Moessbauer @ 2023-04-10 9:42 UTC (permalink / raw)
To: isar-users
Cc: jan.kiszka, daniel.bovensiepen, florian.bezdeka, Felix Moessbauer
This patch adds the u-boot firmware for the starfive visionfive2 board.
As the image is signed at build time, but verified at runtime, we get a
rather complex cross dependency chain around openssl. To not diverge
from the official visionfive2 BSP example, we keep the image signing.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
...five-visionfive2_2022.01-rc4+VF2-2.11.5.bb | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb
diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb
new file mode 100644
index 00000000..0eeedc1a
--- /dev/null
+++ b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb
@@ -0,0 +1,31 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+require recipes-bsp/u-boot/u-boot-custom.inc
+
+SRC_URI += "git://github.com/starfive-tech/u-boot.git;branch=JH7110_VisionFive2_devel;protocol=https;destsuffix=u-boot-${PV}"
+SRCREV = "ac0ac696256abf412826d74ee918dd417e207d7b"
+
+DEBIAN_BUILD_DEPENDS .= ", libssl-dev:${DISTRO_ARCH}"
+# when cross compiling, we need the library on the host as well, as the signature computation is done locally
+DEBIAN_BUILD_DEPENDS .= "${@ ', libssl-dev:${HOST_ARCH}' if d.getVar('ISAR_CROSS_COMPILE') == '1' else '' }"
+
+U_BOOT_CONFIG = "starfive_visionfive2_defconfig"
+U_BOOT_BIN = "u-boot.bin"
+U_BOOT_SPL_BIN = "spl/u-boot-spl.bin"
+
+S = "${WORKDIR}/u-boot-${PV}"
+
+# install dtb files for opensbi
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build:append() {
+ # also build and install spl component
+ sed -i 's|${U_BOOT_BIN}|${U_BOOT_BIN} ${U_BOOT_SPL_BIN}|g' ${S}/debian/rules
+ echo "${U_BOOT_SPL_BIN} usr/lib/u-boot/${MACHINE}/" \
+ >> ${S}/debian/u-boot-${MACHINE}.install
+ # install device tree
+ echo "arch/riscv/dts/*.dtb usr/share/u-boot/${MACHINE}/" \
+ >> ${S}/debian/u-boot-${MACHINE}-dev.install
+}
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 2/6] starfive-visionfive2: package opensbi firmware
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-04-10 9:42 ` Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 3/6] starfive-visionfive2: add BSP kernel Felix Moessbauer
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Felix Moessbauer @ 2023-04-10 9:42 UTC (permalink / raw)
To: isar-users
Cc: jan.kiszka, daniel.bovensiepen, florian.bezdeka, Felix Moessbauer
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 3/6] starfive-visionfive2: add BSP kernel
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-04-10 9:42 ` [PATCH v4 2/6] starfive-visionfive2: package opensbi firmware Felix Moessbauer
@ 2023-04-10 9:42 ` Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 4/6] starfive-visionfive2: create u-boot-spl firmware Felix Moessbauer
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Felix Moessbauer @ 2023-04-10 9:42 UTC (permalink / raw)
To: isar-users
Cc: jan.kiszka, daniel.bovensiepen, florian.bezdeka, Felix Moessbauer
This patch adds the kernel (including configuration) from the
SDK package. To make this kernel build on gcc12, we add a patch
that fixes the machine model.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
| 3 +++
.../linux/linux-starfive_5.15-visionfive2.bb | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
create mode 100644 meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
--git a/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg b/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
new file mode 100644
index 00000000..d11c28de
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
@@ -0,0 +1,3 @@
+# additional configuration to support stock debian userlands
+CONFIG_BINFMT_MISC=y
+CONFIG_SQUASHFS=m
diff --git a/meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb b/meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
new file mode 100644
index 00000000..e0700989
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
@@ -0,0 +1,17 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+require recipes-kernel/linux/linux-custom.inc
+
+SRC_URI += " \
+ git://github.com/starfive-tech/linux.git;protocol=https;branch=JH7110_VisionFive2_devel;destsuffix=linux-visionfive-${PV} \
+ file://starfive2_extra.cfg"
+SRCREV = "a87c6861c6d96621026ee53b94f081a1a00a4cc7"
+
+S = "${WORKDIR}/linux-visionfive-${PV}"
+
+KERNEL_DEFCONFIG = "starfive_visionfive2_defconfig"
+
+LINUX_VERSION_EXTENSION = "-isar"
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 4/6] starfive-visionfive2: create u-boot-spl firmware
2023-04-10 9:42 [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
` (2 preceding siblings ...)
2023-04-10 9:42 ` [PATCH v4 3/6] starfive-visionfive2: add BSP kernel Felix Moessbauer
@ 2023-04-10 9:42 ` Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 5/6] starfive-visionfive2: create u-boot-spl FIT image Felix Moessbauer
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Felix Moessbauer @ 2023-04-10 9:42 UTC (permalink / raw)
To: isar-users
Cc: jan.kiszka, daniel.bovensiepen, florian.bezdeka, Felix Moessbauer
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 5/6] starfive-visionfive2: create u-boot-spl FIT image
2023-04-10 9:42 [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
` (3 preceding siblings ...)
2023-04-10 9:42 ` [PATCH v4 4/6] starfive-visionfive2: create u-boot-spl firmware Felix Moessbauer
@ 2023-04-10 9:42 ` Felix Moessbauer
2023-04-10 9:42 ` [PATCH v4 6/6] starfive-visionfive2: add machine Felix Moessbauer
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Felix Moessbauer @ 2023-04-10 9:42 UTC (permalink / raw)
To: isar-users
Cc: jan.kiszka, daniel.bovensiepen, florian.bezdeka, Felix Moessbauer
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
.../files/rules.tmpl | 12 ++++++
.../files/visionfive2-u-boot-firmware.install | 1 +
.../visionfive2-uboot-fit-image.its.tmpl | 41 +++++++++++++++++++
.../visionfive2-u-boot-firmware.bb | 36 ++++++++++++++++
4 files changed, 90 insertions(+)
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb
diff --git a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
new file mode 100644
index 00000000..4826f7d6
--- /dev/null
+++ b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+KERNEL_VERSION=$(shell find /usr/lib/ -maxdepth 1 -type d -name 'linux-image-*' | head -1 | sed 's/.*linux-image-//g')
+
+override_dh_auto_configure:
+ sed -i 's|<KERNEL_VERSION>|$(KERNEL_VERSION)|g' visionfive2-uboot-fit-image.its
+
+override_dh_auto_build:
+ mkimage -A riscv -O u-boot -f ${IMAGE_ITS_FILE} visionfive2_fw_payload.img
+
+%:
+ dh $@
diff --git a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
new file mode 100644
index 00000000..d1bdf6d6
--- /dev/null
+++ b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
@@ -0,0 +1 @@
+visionfive2_fw_payload.img usr/share/visionfive2-u-boot-firmware
diff --git a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
new file mode 100644
index 00000000..4cbe9318
--- /dev/null
+++ b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
@@ -0,0 +1,41 @@
+/dts-v1/;
+
+/ {
+ description = "U-boot-spl FIT image for JH7110 VisionFive2";
+ #address-cells = <2>;
+
+ images {
+ firmware {
+ description = "u-boot";
+ data = /incbin/("/usr/lib/opensbi/starfive-visionfive2/fw_payload.bin");
+ type = "firmware";
+ arch = "riscv";
+ os = "u-boot";
+ load = <0x0 0x40000000>;
+ entry = <0x0 0x40000000>;
+ compression = "none";
+ };
+ fdt {
+ description = "DTB";
+ data = /incbin/("/usr/lib/linux-image-<KERNEL_VERSION>/${DTB_FILES}");
+ type = "flat_dt";
+ arch = "riscv";
+ compression = "none";
+ load = <0x46000000>;
+ entry = <0x46000000>;
+ hash {
+ algo = "sha1";
+ };
+ };
+ };
+
+ configurations {
+ default = "config-1";
+
+ config-1 {
+ description = "U-boot-spl FIT config for JH7110 VisionFive2";
+ firmware = "firmware";
+ fdt = "fdt";
+ };
+ };
+};
diff --git a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb
new file mode 100644
index 00000000..b2303968
--- /dev/null
+++ b/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb
@@ -0,0 +1,36 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg
+
+DESCRIPTION = "StarFive VisionFive 2 u-boot firmware"
+
+IMAGE_ITS_FILE = "visionfive2-uboot-fit-image.its"
+SRC_URI = " \
+ file://${IMAGE_ITS_FILE}.tmpl \
+ file://rules.tmpl \
+ file://visionfive2-u-boot-firmware.install"
+
+DEPENDS += "opensbi-starfive-visionfive2 linux-image-${KERNEL_NAME}"
+DEBIAN_BUILD_DEPENDS += "opensbi-starfive-visionfive2, u-boot-tools, device-tree-compiler, linux-image-${KERNEL_NAME}"
+
+TEMPLATE_FILES = "${IMAGE_ITS_FILE}.tmpl rules.tmpl"
+TEMPLATE_VARS = "IMAGE_ITS_FILE DTB_FILES"
+
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build(){
+ cp ${WORKDIR}/${IMAGE_ITS_FILE} ${S}/
+ cp ${WORKDIR}/visionfive2-u-boot-firmware.install ${S}/debian/
+ deb_debianize
+}
+
+do_deploy() {
+ dpkg --fsys-tarfile ${WORKDIR}/visionfive2-u-boot-firmware_${PV}*.deb | \
+ tar xOf - "./usr/share/visionfive2-u-boot-firmware/visionfive2_fw_payload.img" \
+ > "${DEPLOY_DIR_IMAGE}/visionfive2_fw_payload.img"
+}
+
+addtask deploy after do_dpkg_build before do_build
+do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}"
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 6/6] starfive-visionfive2: add machine
2023-04-10 9:42 [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
` (4 preceding siblings ...)
2023-04-10 9:42 ` [PATCH v4 5/6] starfive-visionfive2: create u-boot-spl FIT image Felix Moessbauer
@ 2023-04-10 9:42 ` Felix Moessbauer
2023-05-26 5:14 ` [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board MOESSBAUER, Felix
2023-05-27 10:41 ` Uladzimir Bely
7 siblings, 0 replies; 11+ messages in thread
From: Felix Moessbauer @ 2023-04-10 9:42 UTC (permalink / raw)
To: isar-users
Cc: jan.kiszka, daniel.bovensiepen, florian.bezdeka, Felix Moessbauer
This patch adds the RISCV64 based StarFive VisionFive 2 machine.
The target still needs a custom kernel and also only works from debian
bookworm on.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta-isar/conf/local.conf.sample | 1 +
.../conf/machine/starfive-visionfive2.conf | 29 +++++++++++++++++++
.../starfive-visionfive2-sid-ports.conf | 7 +++++
.../canned-wks/starfive-visionfive2.wks.in | 23 +++++++++++++++
4 files changed, 60 insertions(+)
create mode 100644 meta-isar/conf/machine/starfive-visionfive2.conf
create mode 100644 meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf
create mode 100644 meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index 7e0184e4..47f473a1 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -77,6 +77,7 @@ BBMULTICONFIG = " \
rpi-arm-v7l-bullseye \
rpi-arm64-v8-bullseye \
sifive-fu540-sid-ports \
+ starfive-visionfive2-sid-ports \
qemuarm64-focal \
qemuamd64-focal \
"
diff --git a/meta-isar/conf/machine/starfive-visionfive2.conf b/meta-isar/conf/machine/starfive-visionfive2.conf
new file mode 100644
index 00000000..a07b064f
--- /dev/null
+++ b/meta-isar/conf/machine/starfive-visionfive2.conf
@@ -0,0 +1,29 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+DISTRO_ARCH = "riscv64"
+
+KERNEL_NAME ?= "starfive"
+
+PREFERRED_PROVIDER_u-boot-starfive-visionfive2 = "u-boot-starfive-visionfive2"
+
+IMAGE_FSTYPES ?= "wic"
+
+WKS_FILE ?= "starfive-visionfive2.wks.in"
+IMAGER_INSTALL += " \
+ jh7110-u-boot-spl-image \
+ visionfive2-u-boot-firmware \
+ ${SYSTEMD_BOOTLOADER_INSTALL}"
+IMAGER_BUILD_DEPS += " \
+ jh7110-u-boot-spl-image \
+ visionfive2-u-boot-firmware"
+
+IMAGE_INSTALL += "sshd-regen-keys"
+IMAGE_INSTALL += "expand-on-first-boot"
+
+# DTB file for OpenSBI
+DTB_UBOOT_JH7110_VF2 = "starfive_visionfive2.dtb"
+# DTB file for booting
+DTB_FILES = "starfive/jh7110-visionfive-v2.dtb"
diff --git a/meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf b/meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf
new file mode 100644
index 00000000..98c9534a
--- /dev/null
+++ b/meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf
@@ -0,0 +1,7 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+MACHINE = "starfive-visionfive2"
+DISTRO = "debian-sid-ports"
diff --git a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
new file mode 100644
index 00000000..0f3d76a9
--- /dev/null
+++ b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
@@ -0,0 +1,23 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# 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/share/jh7110-uboot-spl-image/u-boot-spl.bin.normal.out" --ondisk mmcblk1 --fixed-size 2M --offset 2M --part-type 2E54B353-1271-4842-806F-E436D6AF6985
+# U-Boot FIT
+part --source rawcopy --sourceparams "file=/usr/share/visionfive2-u-boot-firmware/visionfive2_fw_payload.img" --ondisk mmcblk1 --fixed-size 4M --offset 4M --part-type 5B193300-FC78-40CD-8002-E86C45580B47
+# EFI
+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"
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board
2023-04-10 9:42 [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
` (5 preceding siblings ...)
2023-04-10 9:42 ` [PATCH v4 6/6] starfive-visionfive2: add machine Felix Moessbauer
@ 2023-05-26 5:14 ` MOESSBAUER, Felix
2023-05-26 7:48 ` Uladzimir Bely
2023-05-27 10:41 ` Uladzimir Bely
7 siblings, 1 reply; 11+ messages in thread
From: MOESSBAUER, Felix @ 2023-05-26 5:14 UTC (permalink / raw)
To: isar-users; +Cc: Bovensiepen, Daniel (bovi), Bezdeka, Florian, Kiszka, Jan
Dear maintainers,
are there any news on this series?
Can we merge it?
Best regards,
Felix
On Mon, 2023-04-10 at 09:42 +0000, Felix Moessbauer wrote:
> Changes since v3:
>
> - rebased onto next
> - drop "u-boot: make KCFLAGS and HOSTCFLAGS configurable"
> - opensbi: update version
> - u-boot
> - update which makes patches obsolete
> - support to compile without cross
> - simplify build dependencies
> - remove KCFLAGS injection
> - spl_tool: replace with OSS version from StarFive
> - linux: update which makes patches obsolete
>
> Changes since v2:
>
> - rebased onto next
> - rework u-boot customization (p1)
> - update opensbi
> - update kernel
>
> Changes since v1:
>
> - rebased onto next (including bitbake 2.0 migration)
> - exclude opensbi memory range in u-boot DT
> - use upstream OpenSBI version (instead of StarFive version)
>
> This series adds a new machine "starfive-visionfive2" which is a
> Risc-V board based on the JH7110 SoC. The BSP is modeled based on the
> buildroot SDK [1], but without any proprietary imaging components.
>
> Further, we implement the fit + efi boot toolchain, instead of the
> proposed ubootenv + fit version. This also requires that we embed the
> board's linux device tree into the fit, as memory and reserved-memory
> nodes are resolved via the efi API (implemented by u-boot) instead of
> resolving them via the DT in Linux.
>
> As the JH7110 SoC has no usable upstream support yet, we directly
> build the 5.15 based kernel from the SDK, instead of porting patches
> on top of the standard Linux. Distro kernels are also not supported.
>
> Best regards,
> Felix Moessbauer
> Siemens AG
>
> Felix Moessbauer (6):
> starfive-visionfive2: package u-boot
> starfive-visionfive2: package opensbi firmware
> starfive-visionfive2: add BSP kernel
> starfive-visionfive2: create u-boot-spl firmware
> starfive-visionfive2: create u-boot-spl FIT image
> starfive-visionfive2: add machine
>
> meta-isar/conf/local.conf.sample | 1 +
> .../conf/machine/starfive-visionfive2.conf | 29 +++++++++++++
> .../starfive-visionfive2-sid-ports.conf | 7 ++++
> .../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 +++++++++++
> .../files/starfive-visionfive2-rules.tmpl | 17 ++++++++
> ...ensbi-starfive-visionfive2_1.2+20230310.bb | 31 ++++++++++++++
> ...five-visionfive2_2022.01-rc4+VF2-2.11.5.bb | 31 ++++++++++++++
> .../files/rules.tmpl | 12 ++++++
> .../files/visionfive2-u-boot-firmware.install | 1 +
> .../visionfive2-uboot-fit-image.its.tmpl | 41
> +++++++++++++++++++
> .../visionfive2-u-boot-firmware.bb | 36 ++++++++++++++++
> .../linux/files/starfive2_extra.cfg | 3 ++
> .../linux/linux-starfive_5.15-visionfive2.bb | 17 ++++++++
> .../canned-wks/starfive-visionfive2.wks.in | 23 +++++++++++
> 17 files changed, 313 insertions(+)
> create mode 100644 meta-isar/conf/machine/starfive-visionfive2.conf
> create mode 100644 meta-isar/conf/multiconfig/starfive-visionfive2-
> sid-ports.conf
> 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
> 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
> create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-
> visionfive2_2022.01-rc4+VF2-2.11.5.bb
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/files/rules.tmpl
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/files/visionfive2-u-boot-firmware.install
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/files/visionfive2-uboot-fit-image.its.tmpl
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/visionfive2-u-boot-firmware.bb
> create mode 100644 meta-isar/recipes-
> kernel/linux/files/starfive2_extra.cfg
> create mode 100644 meta-isar/recipes-kernel/linux/linux-
> starfive_5.15-visionfive2.bb
> create mode 100644 meta-isar/scripts/lib/wic/canned-wks/starfive-
> visionfive2.wks.in
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board
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
0 siblings, 0 replies; 11+ messages in thread
From: Uladzimir Bely @ 2023-05-26 7:48 UTC (permalink / raw)
To: MOESSBAUER, Felix, isar-users
On Fri, 2023-05-26 at 05:14 +0000, 'MOESSBAUER, Felix' via isar-users
wrote:
> Dear maintainers,
>
> are there any news on this series?
> Can we merge it?
>
> Best regards,
> Felix
>
Hello.
v4 passed CI quite long ago, but we were waiting for the board
delivery.
I'll check the patchset on top of latest next and we'll merge them soon
(If it passes CI, it will be done by Monday, I hope).
> On Mon, 2023-04-10 at 09:42 +0000, Felix Moessbauer wrote:
> > Changes since v3:
> >
> > - rebased onto next
> > - drop "u-boot: make KCFLAGS and HOSTCFLAGS configurable"
> > - opensbi: update version
> > - u-boot
> > - update which makes patches obsolete
> > - support to compile without cross
> > - simplify build dependencies
> > - remove KCFLAGS injection
> > - spl_tool: replace with OSS version from StarFive
> > - linux: update which makes patches obsolete
> >
> > Changes since v2:
> >
> > - rebased onto next
> > - rework u-boot customization (p1)
> > - update opensbi
> > - update kernel
> >
> > Changes since v1:
> >
> > - rebased onto next (including bitbake 2.0 migration)
> > - exclude opensbi memory range in u-boot DT
> > - use upstream OpenSBI version (instead of StarFive version)
> >
> > This series adds a new machine "starfive-visionfive2" which is a
> > Risc-V board based on the JH7110 SoC. The BSP is modeled based on
> > the
> > buildroot SDK [1], but without any proprietary imaging components.
> >
> > Further, we implement the fit + efi boot toolchain, instead of the
> > proposed ubootenv + fit version. This also requires that we embed
> > the
> > board's linux device tree into the fit, as memory and reserved-
> > memory
> > nodes are resolved via the efi API (implemented by u-boot) instead
> > of
> > resolving them via the DT in Linux.
> >
> > As the JH7110 SoC has no usable upstream support yet, we directly
> > build the 5.15 based kernel from the SDK, instead of porting
> > patches
> > on top of the standard Linux. Distro kernels are also not
> > supported.
> >
> > Best regards,
> > Felix Moessbauer
> > Siemens AG
> >
> > Felix Moessbauer (6):
> > starfive-visionfive2: package u-boot
> > starfive-visionfive2: package opensbi firmware
> > starfive-visionfive2: add BSP kernel
> > starfive-visionfive2: create u-boot-spl firmware
> > starfive-visionfive2: create u-boot-spl FIT image
> > starfive-visionfive2: add machine
> >
> > meta-isar/conf/local.conf.sample | 1 +
> > .../conf/machine/starfive-visionfive2.conf | 29 +++++++++++++
> > .../starfive-visionfive2-sid-ports.conf | 7 ++++
> > .../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 +++++++++++
> > .../files/starfive-visionfive2-rules.tmpl | 17 ++++++++
> > ...ensbi-starfive-visionfive2_1.2+20230310.bb | 31 ++++++++++++++
> > ...five-visionfive2_2022.01-rc4+VF2-2.11.5.bb | 31 ++++++++++++++
> > .../files/rules.tmpl | 12 ++++++
> > .../files/visionfive2-u-boot-firmware.install | 1 +
> > .../visionfive2-uboot-fit-image.its.tmpl | 41
> > +++++++++++++++++++
> > .../visionfive2-u-boot-firmware.bb | 36
> > ++++++++++++++++
> > .../linux/files/starfive2_extra.cfg | 3 ++
> > .../linux/linux-starfive_5.15-visionfive2.bb | 17 ++++++++
> > .../canned-wks/starfive-visionfive2.wks.in | 23 +++++++++++
> > 17 files changed, 313 insertions(+)
> > create mode 100644 meta-isar/conf/machine/starfive-
> > visionfive2.conf
> > create mode 100644 meta-isar/conf/multiconfig/starfive-
> > visionfive2-
> > sid-ports.conf
> > 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
> > 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
> > create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-
> > visionfive2_2022.01-rc4+VF2-2.11.5.bb
> > create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> > firmware/files/rules.tmpl
> > create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> > firmware/files/visionfive2-u-boot-firmware.install
> > create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> > firmware/files/visionfive2-uboot-fit-image.its.tmpl
> > create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> > firmware/visionfive2-u-boot-firmware.bb
> > create mode 100644 meta-isar/recipes-
> > kernel/linux/files/starfive2_extra.cfg
> > create mode 100644 meta-isar/recipes-kernel/linux/linux-
> > starfive_5.15-visionfive2.bb
> > create mode 100644 meta-isar/scripts/lib/wic/canned-wks/starfive-
> > visionfive2.wks.in
> >
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board
2023-04-10 9:42 [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
` (6 preceding siblings ...)
2023-05-26 5:14 ` [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board MOESSBAUER, Felix
@ 2023-05-27 10:41 ` Uladzimir Bely
7 siblings, 0 replies; 11+ messages in thread
From: Uladzimir Bely @ 2023-05-27 10:41 UTC (permalink / raw)
To: Felix Moessbauer, isar-users
On Mon, 2023-04-10 at 09:42 +0000, 'Felix Moessbauer' via isar-users
wrote:
> Changes since v3:
>
> - rebased onto next
> - drop "u-boot: make KCFLAGS and HOSTCFLAGS configurable"
> - opensbi: update version
> - u-boot
> - update which makes patches obsolete
> - support to compile without cross
> - simplify build dependencies
> - remove KCFLAGS injection
> - spl_tool: replace with OSS version from StarFive
> - linux: update which makes patches obsolete
>
> Changes since v2:
>
> - rebased onto next
> - rework u-boot customization (p1)
> - update opensbi
> - update kernel
>
> Changes since v1:
>
> - rebased onto next (including bitbake 2.0 migration)
> - exclude opensbi memory range in u-boot DT
> - use upstream OpenSBI version (instead of StarFive version)
>
> This series adds a new machine "starfive-visionfive2" which is a
> Risc-V board based on the JH7110 SoC. The BSP is modeled based on the
> buildroot SDK [1], but without any proprietary imaging components.
>
> Further, we implement the fit + efi boot toolchain, instead of the
> proposed ubootenv + fit version. This also requires that we embed the
> board's linux device tree into the fit, as memory and reserved-memory
> nodes are resolved via the efi API (implemented by u-boot) instead of
> resolving them via the DT in Linux.
>
> As the JH7110 SoC has no usable upstream support yet, we directly
> build the 5.15 based kernel from the SDK, instead of porting patches
> on top of the standard Linux. Distro kernels are also not supported.
>
> Best regards,
> Felix Moessbauer
> Siemens AG
>
> Felix Moessbauer (6):
> starfive-visionfive2: package u-boot
> starfive-visionfive2: package opensbi firmware
> starfive-visionfive2: add BSP kernel
> starfive-visionfive2: create u-boot-spl firmware
> starfive-visionfive2: create u-boot-spl FIT image
> starfive-visionfive2: add machine
>
> meta-isar/conf/local.conf.sample | 1 +
> .../conf/machine/starfive-visionfive2.conf | 29 +++++++++++++
> .../starfive-visionfive2-sid-ports.conf | 7 ++++
> .../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 +++++++++++
> .../files/starfive-visionfive2-rules.tmpl | 17 ++++++++
> ...ensbi-starfive-visionfive2_1.2+20230310.bb | 31 ++++++++++++++
> ...five-visionfive2_2022.01-rc4+VF2-2.11.5.bb | 31 ++++++++++++++
> .../files/rules.tmpl | 12 ++++++
> .../files/visionfive2-u-boot-firmware.install | 1 +
> .../visionfive2-uboot-fit-image.its.tmpl | 41
> +++++++++++++++++++
> .../visionfive2-u-boot-firmware.bb | 36 ++++++++++++++++
> .../linux/files/starfive2_extra.cfg | 3 ++
> .../linux/linux-starfive_5.15-visionfive2.bb | 17 ++++++++
> .../canned-wks/starfive-visionfive2.wks.in | 23 +++++++++++
> 17 files changed, 313 insertions(+)
> create mode 100644 meta-isar/conf/machine/starfive-visionfive2.conf
> create mode 100644 meta-isar/conf/multiconfig/starfive-visionfive2-
> sid-ports.conf
> 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
> 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
> create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-
> visionfive2_2022.01-rc4+VF2-2.11.5.bb
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/files/rules.tmpl
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/files/visionfive2-u-boot-firmware.install
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/files/visionfive2-uboot-fit-image.its.tmpl
> create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-
> firmware/visionfive2-u-boot-firmware.bb
> create mode 100644 meta-isar/recipes-
> kernel/linux/files/starfive2_extra.cfg
> create mode 100644 meta-isar/recipes-kernel/linux/linux-
> starfive_5.15-visionfive2.bb
> create mode 100644 meta-isar/scripts/lib/wic/canned-wks/starfive-
> visionfive2.wks.in
>
> --
> 2.34.1
>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 1/6] starfive-visionfive2: package u-boot
2023-04-10 9:42 ` [PATCH v4 1/6] starfive-visionfive2: package u-boot Felix Moessbauer
@ 2023-06-04 9:26 ` Jan Kiszka
0 siblings, 0 replies; 11+ messages in thread
From: Jan Kiszka @ 2023-06-04 9:26 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: daniel.bovensiepen, florian.bezdeka
On 10.04.23 11:42, Felix Moessbauer wrote:
> This patch adds the u-boot firmware for the starfive visionfive2 board.
> As the image is signed at build time, but verified at runtime, we get a
> rather complex cross dependency chain around openssl. To not diverge
> from the official visionfive2 BSP example, we keep the image signing.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> ...five-visionfive2_2022.01-rc4+VF2-2.11.5.bb | 31 +++++++++++++++++++
> 1 file changed, 31 insertions(+)
> create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb
>
> diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb
> new file mode 100644
> index 00000000..0eeedc1a
> --- /dev/null
> +++ b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.bb
> @@ -0,0 +1,31 @@
> +#
> +# Copyright (c) Siemens AG, 2023
> +#
> +# SPDX-License-Identifier: MIT
> +
> +require recipes-bsp/u-boot/u-boot-custom.inc
> +
> +SRC_URI += "git://github.com/starfive-tech/u-boot.git;branch=JH7110_VisionFive2_devel;protocol=https;destsuffix=u-boot-${PV}"
> +SRCREV = "ac0ac696256abf412826d74ee918dd417e207d7b"
This is not a stable reference: JH7110_VisionFive2_devel is rebasing,
and now it left ac0ac696 orphaned behind [1].
Looking at u-boot master, upcoming 2023.07 will support the chip with
theses drivers:
1. ns16550 UART Driver.
2. StarFive JH7110 clock Driver.
3. StarFive JH7110 reset Driver.
4. Cadence QSPI controller Driver.
5. MMC SPI Driver for MMC/SD support.
Wouldn't that be enough for now? USB is missing which might be nice if
booting from an emulated stick but the standard scenarios should work -
and using some U-Boot 2023.07-rcX will not break CI again.
Jan
PS: Your recipe claims to be 2022.01-rc4-something but the U-Boot
baseline is actually 2021.10. Maybe selected the wrong sha?
[1]
https://github.com/starfive-tech/u-boot/commit/ac0ac696256abf412826d74ee918dd417e207d7b
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-06-04 9:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox