* [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2
@ 2024-01-02 10:08 Jan Kiszka
2024-01-02 10:08 ` [PATCH 1/9] crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}" Jan Kiszka
` (9 more replies)
0 siblings, 10 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, Helmut Grohne
This brings back riscv64 cross-building via a not-so-nice-but-needed
temporary workaround and uses the outcome for fixing and updating the
VisionFive 2 to all-upstream.
Jan
CC: Helmut Grohne <helmut@subdivi.de>
Jan Kiszka (9):
crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}"
Add workaround for cross-building riscv64
meta-isar: jh7110-u-boot-spl-tool: Use BPN instead of PN
meta-isar: starfive-visionfive2: Use kernel DTB
meta-isar: jh7110-u-boot-spl-tool: Rework
meta-isar: starfive-visionfive2: Switch to upstream U-Boot
meta-isar: starfive-visionfive2: Drop obsolete recipes
meta-isar: linux-mainline: Update to 6.6.9
meta-isar: Switch VisionFive 2 to mainline kernel
.../conf/machine/starfive-visionfive2.conf | 15 ++-----
.../jh7110-u-boot-spl-image/files/install | 1 -
.../jh7110-u-boot-spl-image/files/rules | 10 -----
.../jh7110-u-boot-spl-image_0.1.bb | 32 ---------------
...l_0.1.bb => jh7110-u-boot-spl-tool_0.2.bb} | 2 +-
.../opensbi/files/starfive-visionfive2-rules | 12 ++++++
.../files/starfive-visionfive2-rules.tmpl | 17 --------
...ensbi-starfive-visionfive2_1.2+20230310.bb | 11 +----
.../files/starfive-visionfive2-rules.tmpl | 35 ++++++++++++++++
...-starfive-visionfive2_2021.10+VF2-3.0.4.bb | 31 --------------
.../u-boot-starfive-visionfive2_2023.10.bb | 29 +++++++++++++
.../files/rules.tmpl | 12 ------
.../files/visionfive2-u-boot-firmware.install | 1 -
.../visionfive2-uboot-fit-image.its.tmpl | 41 -------------------
.../visionfive2-u-boot-firmware.bb | 38 -----------------
.../linux/files/starfive2_extra.cfg | 6 +--
...ine_5.4.203.bb => linux-mainline_6.6.9.bb} | 8 ++--
.../linux/linux-starfive_5.15-visionfive2.bb | 19 ---------
.../canned-wks/starfive-visionfive2.wks.in | 4 +-
meta/classes/crossvars.bbclass | 2 +-
meta/recipes-devtools/keyutils/keyutils.bb | 13 ++++++
.../sbuild-chroot/sbuild-chroot-host.bb | 2 +
22 files changed, 108 insertions(+), 233 deletions(-)
delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install
delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
rename meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/{jh7110-u-boot-spl-tool_0.1.bb => jh7110-u-boot-spl-tool_0.2.bb} (85%)
create mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules
delete mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
create mode 100755 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl
delete mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb
rename meta-isar/recipes-kernel/linux/{linux-mainline_5.4.203.bb => linux-mainline_6.6.9.bb} (82%)
delete mode 100644 meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
create mode 100644 meta/recipes-devtools/keyutils/keyutils.bb
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/9] crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}"
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 2/9] Add workaround for cross-building riscv64 Jan Kiszka
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
95427cc8 forgot about the case that PACKAGE_ARCH is to be derived from
BUILD_ARCH - while that is considering PACKAGE_ARCH before setting
BUILD_ARCH at all. Account for that case by adding the unresolved value
of PACKAGE_ARCH into the cross-build case because that is what the
statement is about: Set PACKAGE_ARCH to HOST_ARCH only if cross-building
is enabled for a package.
Fixes: 95427cc8a760 ("crossvars: Adjust logic to account for -native package builds in non-cross setups")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/crossvars.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/crossvars.bbclass b/meta/classes/crossvars.bbclass
index a7834b99..828afe46 100644
--- a/meta/classes/crossvars.bbclass
+++ b/meta/classes/crossvars.bbclass
@@ -22,7 +22,7 @@ python __anonymous() {
if distro_arch != host_arch and \
(package_arch == host_arch or \
- (package_arch in [distro_arch, compat_arch] and mode == "1")):
+ (package_arch in [distro_arch, compat_arch, '${BUILD_ARCH}'] and mode == "1")):
d.setVar('BUILD_ARCH', host_arch)
schroot_dir = d.getVar('SCHROOT_HOST_DIR', False)
sbuild_dep = "sbuild-chroot-host" + flavor_suffix + ":do_build"
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/9] Add workaround for cross-building riscv64
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
2024-01-02 10:08 ` [PATCH 1/9] crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}" Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-08 17:31 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 3/9] meta-isar: jh7110-u-boot-spl-tool: Use BPN instead of PN Jan Kiszka
` (7 subsequent siblings)
9 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, Helmut Grohne
From: Jan Kiszka <jan.kiszka@siemens.com>
As Debian unstable does not care for riscv64 packages being in sync with
other archs, cross-building is generally broken. However, we are at
least currently just one package away from an essential crossbuild env,
and that is libkeyutils1. By rebuilding that package from source for
riscv64, non-cross, and then using it for sbuild-chroot-host, we can
start building the kernel and firmware packages cross again.
This patch should be removed again once riscv64 hits trixie, thus
testing. But that may take some more moons, and we will benefit greatly
from having a workaround until then to fix and improve other topics
around that arch.
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059698 for
more background.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
CC: Helmut Grohne <helmut@subdivi.de>
---
meta/recipes-devtools/keyutils/keyutils.bb | 13 +++++++++++++
.../sbuild-chroot/sbuild-chroot-host.bb | 2 ++
2 files changed, 15 insertions(+)
create mode 100644 meta/recipes-devtools/keyutils/keyutils.bb
diff --git a/meta/recipes-devtools/keyutils/keyutils.bb b/meta/recipes-devtools/keyutils/keyutils.bb
new file mode 100644
index 00000000..e3c8e909
--- /dev/null
+++ b/meta/recipes-devtools/keyutils/keyutils.bb
@@ -0,0 +1,13 @@
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg
+
+SRC_URI = "apt://${PN}"
+
+PROVIDES += "libkeyutils1 libkeyutils-dev"
+
+ISAR_CROSS_COMPILE = "0"
+DEB_BUILD_OPTIONS += "nocheck"
diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
index 255d6937..b61e3634 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
@@ -24,3 +24,5 @@ SBUILD_CHROOT_PREINSTALL:riscv64 ?= " \
gcc-riscv64-linux-gnu \
g++-riscv64-linux-gnu \
dpkg-cross"
+
+DEPENDS:append:riscv64 = " keyutils"
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/9] meta-isar: jh7110-u-boot-spl-tool: Use BPN instead of PN
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
2024-01-02 10:08 ` [PATCH 1/9] crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}" Jan Kiszka
2024-01-02 10:08 ` [PATCH 2/9] Add workaround for cross-building riscv64 Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 4/9] meta-isar: starfive-visionfive2: Use kernel DTB Jan Kiszka
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
Fixes installation when PN is -native or -compat.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
index 292334f6..37b52ab3 100644
--- 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
@@ -16,7 +16,7 @@ S = "${WORKDIR}/tools/spl_tool"
do_prepare_build[cleandirs] += "${S}/debian"
do_prepare_build(){
deb_debianize
- echo "spl_tool usr/lib/jh7110-uboot-spl-tool" > ${S}/debian/${PN}.install
+ echo "spl_tool usr/lib/jh7110-uboot-spl-tool" > ${S}/debian/${BPN}.install
}
COMPATIBLE_MACHINE = "starfive-visionfive2"
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/9] meta-isar: starfive-visionfive2: Use kernel DTB
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
` (2 preceding siblings ...)
2024-01-02 10:08 ` [PATCH 3/9] meta-isar: jh7110-u-boot-spl-tool: Use BPN instead of PN Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 5/9] meta-isar: jh7110-u-boot-spl-tool: Rework Jan Kiszka
` (5 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
This will be needed when switching to upstream U-Boot as the DTB there
is not compatible with currently used downstream kernel.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/conf/machine/starfive-visionfive2.conf | 3 ++-
.../scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta-isar/conf/machine/starfive-visionfive2.conf b/meta-isar/conf/machine/starfive-visionfive2.conf
index d96041fc..806d914c 100644
--- a/meta-isar/conf/machine/starfive-visionfive2.conf
+++ b/meta-isar/conf/machine/starfive-visionfive2.conf
@@ -21,4 +21,5 @@ IMAGER_BUILD_DEPS += " \
# DTB file for OpenSBI
DTB_UBOOT_JH7110_VF2 = "starfive_visionfive2.dtb"
# DTB file for booting
-DTB_FILES = "starfive/jh7110-visionfive-v2.dtb"
+DTB_VISIONFIVE2 = "jh7110-visionfive-v2.dtb"
+DTB_FILES = "starfive/${DTB_VISIONFIVE2}"
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
index 0f3d76a9..99156f81 100644
--- a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
+++ b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
@@ -16,7 +16,7 @@ part --source rawcopy --sourceparams "file=/usr/share/jh7110-uboot-spl-image/u-b
# 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
+part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot,dtb=${DTB_VISIONFIVE2}" --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/
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 5/9] meta-isar: jh7110-u-boot-spl-tool: Rework
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
` (3 preceding siblings ...)
2024-01-02 10:08 ` [PATCH 4/9] meta-isar: starfive-visionfive2: Use kernel DTB Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 6/9] meta-isar: starfive-visionfive2: Switch to upstream U-Boot Jan Kiszka
` (4 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
Install the binary as normal tool under /usr/bin to simplify its usage.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules | 2 +-
...110-u-boot-spl-tool_0.1.bb => jh7110-u-boot-spl-tool_0.2.bb} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/{jh7110-u-boot-spl-tool_0.1.bb => jh7110-u-boot-spl-tool_0.2.bb} (85%)
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
index 6a25dd36..a8b2c6b8 100644
--- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
@@ -4,7 +4,7 @@ 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
+ spl_tool -c -f u-boot-spl.bin
%:
dh \$@
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.2.bb
similarity index 85%
rename from meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb
rename to meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.2.bb
index 37b52ab3..6c998029 100644
--- 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.2.bb
@@ -16,7 +16,7 @@ S = "${WORKDIR}/tools/spl_tool"
do_prepare_build[cleandirs] += "${S}/debian"
do_prepare_build(){
deb_debianize
- echo "spl_tool usr/lib/jh7110-uboot-spl-tool" > ${S}/debian/${BPN}.install
+ echo "spl_tool usr/bin" > ${S}/debian/${BPN}.install
}
COMPATIBLE_MACHINE = "starfive-visionfive2"
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 6/9] meta-isar: starfive-visionfive2: Switch to upstream U-Boot
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
` (4 preceding siblings ...)
2024-01-02 10:08 ` [PATCH 5/9] meta-isar: jh7110-u-boot-spl-tool: Rework Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 7/9] meta-isar: starfive-visionfive2: Drop obsolete recipes Jan Kiszka
` (3 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
There are no more reasons to use the vendor tree, U-Boot 2023.10
sufficiently supports the board.
Moving upstream allows for significant simplifications in the build. We
are now building OpenSBI first and are then using U-Boot to finish all
artifacts needed for the image.
The wks file is updated accordingly, switching the GUID of the U-Boot
partition to the one upstream is recommending. Unneeded options for the
first two partitions are dropped at this chance.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../conf/machine/starfive-visionfive2.conf | 10 ++----
.../opensbi/files/starfive-visionfive2-rules | 12 +++++++
.../files/starfive-visionfive2-rules.tmpl | 17 ---------
...ensbi-starfive-visionfive2_1.2+20230310.bb | 11 ++----
.../files/starfive-visionfive2-rules.tmpl | 35 +++++++++++++++++++
...-starfive-visionfive2_2021.10+VF2-3.0.4.bb | 31 ----------------
.../u-boot-starfive-visionfive2_2023.10.bb | 29 +++++++++++++++
.../canned-wks/starfive-visionfive2.wks.in | 4 +--
8 files changed, 82 insertions(+), 67 deletions(-)
create mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules
delete mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
create mode 100755 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl
delete mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb
diff --git a/meta-isar/conf/machine/starfive-visionfive2.conf b/meta-isar/conf/machine/starfive-visionfive2.conf
index 806d914c..c7f72bb3 100644
--- a/meta-isar/conf/machine/starfive-visionfive2.conf
+++ b/meta-isar/conf/machine/starfive-visionfive2.conf
@@ -8,18 +8,12 @@ DISTRO_ARCH = "riscv64"
KERNEL_NAME ?= "starfive"
IMAGE_FSTYPES ?= "wic"
-
WKS_FILE ?= "starfive-visionfive2.wks.in"
IMAGER_INSTALL:wic += " \
- jh7110-u-boot-spl-image \
- visionfive2-u-boot-firmware \
+ u-boot-starfive-visionfive2 \
${SYSTEMD_BOOTLOADER_INSTALL}"
-IMAGER_BUILD_DEPS += " \
- jh7110-u-boot-spl-image \
- visionfive2-u-boot-firmware"
+IMAGER_BUILD_DEPS += "u-boot-starfive-visionfive2"
-# DTB file for OpenSBI
-DTB_UBOOT_JH7110_VF2 = "starfive_visionfive2.dtb"
# DTB file for booting
DTB_VISIONFIVE2 = "jh7110-visionfive-v2.dtb"
DTB_FILES = "starfive/${DTB_VISIONFIVE2}"
diff --git a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules
new file mode 100644
index 00000000..452ff356
--- /dev/null
+++ b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules
@@ -0,0 +1,12 @@
+#!/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/files/starfive-visionfive2-rules.tmpl b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
deleted file mode 100644
index 5f35c1c2..00000000
--- a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/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
index f6d6905a..afbba0f3 100644
--- 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
@@ -9,25 +9,18 @@ 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"
+ file://starfive-visionfive2-rules"
# 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
+ echo "build/platform/generic/firmware/fw_dynamic.bin /usr/lib/opensbi/starfive-visionfive2/" > ${S}/debian/install
}
COMPATIBLE_MACHINE = "starfive-visionfive2"
diff --git a/meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl b/meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl
new file mode 100755
index 00000000..01bb9156
--- /dev/null
+++ b/meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+
+# Debian rules for custom U-Boot build
+#
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2018-2021
+#
+# SPDX-License-Identifier: MIT
+
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
+SET_CROSS_BUILD_TOOLS=CROSS_BUILD_TOOLS=y
+endif
+
+override_dh_auto_build:
+ $(MAKE) $(PARALLEL_MAKE) ${U_BOOT_CONFIG}
+ $(MAKE) $(PARALLEL_MAKE) flash.bin OPENSBI=/usr/lib/opensbi/starfive-visionfive2/fw_dynamic.bin
+ spl_tool -c -f spl/u-boot-spl.bin
+ $(MAKE) -n u-boot-initial-env >/dev/null 2>&1; if [ $$? -ne 2 ]; then \
+ $(MAKE) $(PARALLEL_MAKE) u-boot-initial-env; \
+ else \
+ ./scripts/get_default_envs.sh >u-boot-initial-env; \
+ fi
+ $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools
+
+override_dh_auto_install:
+ mv tools/env/lib.a tools/env/libubootenv.a
+
+override_dh_auto_test:
+
+override_dh_strip:
+ dh_strip -X libubootenv.a
+
+%:
+ dh $@ --parallel
diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
deleted file mode 100644
index 9e1b7251..00000000
--- a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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;nobranch=1;protocol=https;destsuffix=u-boot-${PV}"
-SRCREV = "b6e2b0e85c774a18ae668223a6e5f7d335895243"
-
-DEBIAN_BUILD_DEPENDS .= ", libssl-dev, libssl-dev:native"
-
-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
-}
-
-COMPATIBLE_MACHINE = "starfive-visionfive2"
diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb
new file mode 100644
index 00000000..5428080a
--- /dev/null
+++ b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb
@@ -0,0 +1,29 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+require recipes-bsp/u-boot/u-boot-custom.inc
+
+COMPATIBLE_MACHINE = "starfive-visionfive2"
+
+SRC_URI += "https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
+ file://starfive-visionfive2-rules.tmpl"
+SRC_URI[sha256sum] = "e00e6c6f014e046101739d08d06f328811cebcf5ae101348f409cbbd55ce6900"
+
+DEPENDS += "opensbi-starfive-visionfive2 jh7110-u-boot-spl-tool-native"
+DEBIAN_BUILD_DEPENDS .= ", opensbi-starfive-visionfive2, \
+ jh7110-u-boot-spl-tool:native, \
+ swig, python3-dev:native, python3-setuptools, \
+ libssl-dev:${DISTRO_ARCH}, libssl-dev:native"
+
+U_BOOT_CONFIG = "starfive_visionfive2_defconfig"
+U_BOOT_BIN = "u-boot.itb spl/u-boot-spl.bin.normal.out"
+
+TEMPLATE_FILES += "starfive-visionfive2-rules.tmpl"
+
+S = "${WORKDIR}/u-boot-${PV}"
+
+do_prepare_build:append() {
+ cp ${WORKDIR}/starfive-visionfive2-rules ${S}/debian/rules
+}
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
index 99156f81..ed8a3b71 100644
--- a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
+++ b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
@@ -12,9 +12,9 @@
# 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
+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/share/visionfive2-u-boot-firmware/visionfive2_fw_payload.img" --ondisk mmcblk1 --fixed-size 4M --offset 4M --part-type 5B193300-FC78-40CD-8002-E86C45580B47
+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
part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot,dtb=${DTB_VISIONFIVE2}" --use-uuid --label efi --part-type EF00 --align 1024
# rootfs
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 7/9] meta-isar: starfive-visionfive2: Drop obsolete recipes
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
` (5 preceding siblings ...)
2024-01-02 10:08 ` [PATCH 6/9] meta-isar: starfive-visionfive2: Switch to upstream U-Boot Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 8/9] meta-isar: linux-mainline: Update to 6.6.9 Jan Kiszka
` (2 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
We are now using U-Boot for what these recipes where once introduced.
Signed-off-by: Jan Kiszka <jan.kiszka@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 | 32 ---------------
.../files/rules.tmpl | 12 ------
.../files/visionfive2-u-boot-firmware.install | 1 -
.../visionfive2-uboot-fit-image.its.tmpl | 41 -------------------
.../visionfive2-u-boot-firmware.bb | 38 -----------------
7 files changed, 135 deletions(-)
delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install
delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.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
deleted file mode 100644
index c300f842..00000000
--- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install
+++ /dev/null
@@ -1 +0,0 @@
-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
deleted file mode 100644
index a8b2c6b8..00000000
--- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
- 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
deleted file mode 100644
index c004c86c..00000000
--- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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-native u-boot-starfive-visionfive2"
-DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool:native, u-boot-starfive-visionfive2:${DISTRO_ARCH}"
-
-# this is a host tool
-PACKAGE_ARCH = "${BUILD_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}"
-
-COMPATIBLE_MACHINE = "starfive-visionfive2"
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
deleted file mode 100644
index 4826f7d6..00000000
--- a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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
deleted file mode 100644
index d1bdf6d6..00000000
--- a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
+++ /dev/null
@@ -1 +0,0 @@
-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
deleted file mode 100644
index 4cbe9318..00000000
--- a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
+++ /dev/null
@@ -1,41 +0,0 @@
-/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
deleted file mode 100644
index 4fe91b45..00000000
--- a/meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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}"
-
-COMPATIBLE_MACHINE = "starfive-visionfive2"
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 8/9] meta-isar: linux-mainline: Update to 6.6.9
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
` (6 preceding siblings ...)
2024-01-02 10:08 ` [PATCH 7/9] meta-isar: starfive-visionfive2: Drop obsolete recipes Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 9/9] meta-isar: Switch VisionFive 2 to mainline kernel Jan Kiszka
2024-01-03 16:39 ` [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
This will allow to use the mainline kernel also on the VisionFive 2.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../{linux-mainline_5.4.203.bb => linux-mainline_6.6.9.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta-isar/recipes-kernel/linux/{linux-mainline_5.4.203.bb => linux-mainline_6.6.9.bb} (85%)
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.9.bb
similarity index 85%
rename from meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
rename to meta-isar/recipes-kernel/linux/linux-mainline_6.6.9.bb
index 47270cbb..c8c5d55f 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.9.bb
@@ -1,7 +1,7 @@
# Example recipe for building the mainline kernel
#
# This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2018-2020
+# Copyright (c) Siemens AG, 2018-2024
#
# SPDX-License-Identifier: MIT
@@ -10,13 +10,13 @@ require recipes-kernel/linux/linux-custom.inc
ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else d.getVar('PV') }"
SRC_URI += " \
- https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${ARCHIVE_VERSION}.tar.xz \
+ https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${ARCHIVE_VERSION}.tar.xz \
file://x86_64_defconfig \
file://ftpm-module.cfg \
file://subdir/no-ubifs-fs.cfg \
file://no-root-nfs.cfg;apply=no"
-SRC_URI[sha256sum] = "fc933f5b13066cfa54aacb5e86747a167bad1d8d23972e4a03ab5ee36c29798a"
+SRC_URI[sha256sum] = "8ebc65af0cfc891ba63dce0546583da728434db0f5f6a54d979f25ec47f548b3"
S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 9/9] meta-isar: Switch VisionFive 2 to mainline kernel
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
` (7 preceding siblings ...)
2024-01-02 10:08 ` [PATCH 8/9] meta-isar: linux-mainline: Update to 6.6.9 Jan Kiszka
@ 2024-01-02 10:08 ` Jan Kiszka
2024-01-03 16:39 ` [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
9 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-02 10:08 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
From: Jan Kiszka <jan.kiszka@siemens.com>
Using 6.6 as baseline means dropping support for PCIe (M.2), timer
(alternative clocksource), PWM, CAN, PWMDAC, Display, ISP (camera). We
still get a connected and generally working board this way, and we no
longer need to maintain a separate recipe. Also the example-module now
builds fine.
As mainline is fine with the DT provided by mainline U-Boot, stop using
the kernel's DT.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../conf/machine/starfive-visionfive2.conf | 6 +-----
| 6 +++---
.../linux/linux-mainline_6.6.9.bb | 2 ++
.../linux/linux-starfive_5.15-visionfive2.bb | 19 -------------------
.../canned-wks/starfive-visionfive2.wks.in | 2 +-
5 files changed, 7 insertions(+), 28 deletions(-)
delete mode 100644 meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
diff --git a/meta-isar/conf/machine/starfive-visionfive2.conf b/meta-isar/conf/machine/starfive-visionfive2.conf
index c7f72bb3..baae7ed8 100644
--- a/meta-isar/conf/machine/starfive-visionfive2.conf
+++ b/meta-isar/conf/machine/starfive-visionfive2.conf
@@ -5,7 +5,7 @@
DISTRO_ARCH = "riscv64"
-KERNEL_NAME ?= "starfive"
+KERNEL_NAME ?= "mainline"
IMAGE_FSTYPES ?= "wic"
WKS_FILE ?= "starfive-visionfive2.wks.in"
@@ -13,7 +13,3 @@ IMAGER_INSTALL:wic += " \
u-boot-starfive-visionfive2 \
${SYSTEMD_BOOTLOADER_INSTALL}"
IMAGER_BUILD_DEPS += "u-boot-starfive-visionfive2"
-
-# DTB file for booting
-DTB_VISIONFIVE2 = "jh7110-visionfive-v2.dtb"
-DTB_FILES = "starfive/${DTB_VISIONFIVE2}"
--git a/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg b/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
index d11c28de..d7c42d73 100644
--- a/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
+++ b/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
@@ -1,3 +1,3 @@
-# additional configuration to support stock debian userlands
-CONFIG_BINFMT_MISC=y
-CONFIG_SQUASHFS=m
+# still needed in 6.6, see commit 07863871dfb162965b21bb8c2e4861bdb0019da3
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_STARFIVE=y
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_6.6.9.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.9.bb
index c8c5d55f..ee2352de 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_6.6.9.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.9.bb
@@ -16,6 +16,8 @@ SRC_URI += " \
file://subdir/no-ubifs-fs.cfg \
file://no-root-nfs.cfg;apply=no"
+SRC_URI:append:riscv64 = " file://starfive2_extra.cfg"
+
SRC_URI[sha256sum] = "8ebc65af0cfc891ba63dce0546583da728434db0f5f6a54d979f25ec47f548b3"
S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
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
deleted file mode 100644
index e9e0bf4a..00000000
--- a/meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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"
-
-COMPATIBLE_MACHINE = "starfive-visionfive2"
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
index ed8a3b71..2600580a 100644
--- a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
+++ b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
@@ -16,7 +16,7 @@ part --source rawcopy --sourceparams "file=/usr/lib/u-boot/starfive-visionfive2/
# 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
-part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot,dtb=${DTB_VISIONFIVE2}" --use-uuid --label efi --part-type EF00 --align 1024
+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/
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
` (8 preceding siblings ...)
2024-01-02 10:08 ` [PATCH 9/9] meta-isar: Switch VisionFive 2 to mainline kernel Jan Kiszka
@ 2024-01-03 16:39 ` Jan Kiszka
2024-01-05 15:45 ` Anton Mikanovich
9 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2024-01-03 16:39 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, Helmut Grohne, Srinuvasan Arjunan
On 02.01.24 11:08, 'Jan Kiszka' via isar-users wrote:
> This brings back riscv64 cross-building via a not-so-nice-but-needed
> temporary workaround and uses the outcome for fixing and updating the
> VisionFive 2 to all-upstream.
>
> Jan
>
>
> CC: Helmut Grohne <helmut@subdivi.de>
>
> Jan Kiszka (9):
> crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}"
> Add workaround for cross-building riscv64
> meta-isar: jh7110-u-boot-spl-tool: Use BPN instead of PN
> meta-isar: starfive-visionfive2: Use kernel DTB
> meta-isar: jh7110-u-boot-spl-tool: Rework
> meta-isar: starfive-visionfive2: Switch to upstream U-Boot
> meta-isar: starfive-visionfive2: Drop obsolete recipes
> meta-isar: linux-mainline: Update to 6.6.9
> meta-isar: Switch VisionFive 2 to mainline kernel
>
> .../conf/machine/starfive-visionfive2.conf | 15 ++-----
> .../jh7110-u-boot-spl-image/files/install | 1 -
> .../jh7110-u-boot-spl-image/files/rules | 10 -----
> .../jh7110-u-boot-spl-image_0.1.bb | 32 ---------------
> ...l_0.1.bb => jh7110-u-boot-spl-tool_0.2.bb} | 2 +-
> .../opensbi/files/starfive-visionfive2-rules | 12 ++++++
> .../files/starfive-visionfive2-rules.tmpl | 17 --------
> ...ensbi-starfive-visionfive2_1.2+20230310.bb | 11 +----
> .../files/starfive-visionfive2-rules.tmpl | 35 ++++++++++++++++
> ...-starfive-visionfive2_2021.10+VF2-3.0.4.bb | 31 --------------
> .../u-boot-starfive-visionfive2_2023.10.bb | 29 +++++++++++++
> .../files/rules.tmpl | 12 ------
> .../files/visionfive2-u-boot-firmware.install | 1 -
> .../visionfive2-uboot-fit-image.its.tmpl | 41 -------------------
> .../visionfive2-u-boot-firmware.bb | 38 -----------------
> .../linux/files/starfive2_extra.cfg | 6 +--
> ...ine_5.4.203.bb => linux-mainline_6.6.9.bb} | 8 ++--
> .../linux/linux-starfive_5.15-visionfive2.bb | 19 ---------
> .../canned-wks/starfive-visionfive2.wks.in | 4 +-
> meta/classes/crossvars.bbclass | 2 +-
> meta/recipes-devtools/keyutils/keyutils.bb | 13 ++++++
> .../sbuild-chroot/sbuild-chroot-host.bb | 2 +
> 22 files changed, 108 insertions(+), 233 deletions(-)
> delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install
> delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules
> delete mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
> rename meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/{jh7110-u-boot-spl-tool_0.1.bb => jh7110-u-boot-spl-tool_0.2.bb} (85%)
> create mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules
> delete mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl
> create mode 100755 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl
> delete mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
> create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb
> delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl
> delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install
> delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl
> delete mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb
> rename meta-isar/recipes-kernel/linux/{linux-mainline_5.4.203.bb => linux-mainline_6.6.9.bb} (82%)
> delete mode 100644 meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
> create mode 100644 meta/recipes-devtools/keyutils/keyutils.bb
>
Forgot to mention: This series also depends on [1].
That patch not only enables replacing pre-installed (from bootstrap)
packages in the sbuild-chroot, it also allows to install additional ones
from isar-apt - positive side effect.
Jan
[1]
https://groups.google.com/d/msgid/isar-users/9b36ffce-0214-4734-b04a-06475bb0c97c%40siemens.com
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2
2024-01-03 16:39 ` [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
@ 2024-01-05 15:45 ` Anton Mikanovich
2024-01-05 21:19 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: Anton Mikanovich @ 2024-01-05 15:45 UTC (permalink / raw)
To: Jan Kiszka, isar-users
Cc: Felix Moessbauer, Helmut Grohne, Srinuvasan Arjunan, Baurzhan Ismagulov
03/01/2024 18:39, 'Jan Kiszka' via isar-users wrote:
> Forgot to mention: This series also depends on [1].
>
> That patch not only enables replacing pre-installed (from bootstrap)
> packages in the sbuild-chroot, it also allows to install additional ones
> from isar-apt - positive side effect.
>
> Jan
>
> [1]
> https://groups.google.com/d/msgid/isar-users/9b36ffce-0214-4734-b04a-06475bb0c97c%40siemens.com
>
This patchset not just add cross-build of RISC-V, but also fix non-cross
building of starfive-visionfive2:example-module.
On the other hand 'Restore support' patch will influence on isar-apt usage
quite a lot and should be tested more carefully. We've experienced several
failed CI builds with this changes but can't say for sure if commit was the
reason.
We are trying to avoid unstable changes before the release.
That's why I propose to merge RISC-V related changes first. At least to fix
non-cross startfive-visionfive2 building.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2
2024-01-05 15:45 ` Anton Mikanovich
@ 2024-01-05 21:19 ` Jan Kiszka
0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-05 21:19 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
Cc: Felix Moessbauer, Helmut Grohne, Srinuvasan Arjunan, Baurzhan Ismagulov
On 05.01.24 16:45, Anton Mikanovich wrote:
> 03/01/2024 18:39, 'Jan Kiszka' via isar-users wrote:
>> Forgot to mention: This series also depends on [1].
>>
>> That patch not only enables replacing pre-installed (from bootstrap)
>> packages in the sbuild-chroot, it also allows to install additional ones
>> from isar-apt - positive side effect.
>>
>> Jan
>>
>> [1]
>> https://groups.google.com/d/msgid/isar-users/9b36ffce-0214-4734-b04a-06475bb0c97c%40siemens.com
>>
> This patchset not just add cross-build of RISC-V, but also fix non-cross
> building of starfive-visionfive2:example-module.
> On the other hand 'Restore support' patch will influence on isar-apt usage
> quite a lot and should be tested more carefully. We've experienced several
> failed CI builds with this changes but can't say for sure if commit was the
> reason.
> We are trying to avoid unstable changes before the release.
> That's why I propose to merge RISC-V related changes first. At least to fix
> non-cross startfive-visionfive2 building.
I don't think the latter is worth the effort - no one will use that
without cross-building. That's also why visionfive2 was broken for so
many months.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/9] Add workaround for cross-building riscv64
2024-01-02 10:08 ` [PATCH 2/9] Add workaround for cross-building riscv64 Jan Kiszka
@ 2024-01-08 17:31 ` Jan Kiszka
0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-01-08 17:31 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, Helmut Grohne
On 02.01.24 11:08, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> As Debian unstable does not care for riscv64 packages being in sync with
> other archs, cross-building is generally broken. However, we are at
> least currently just one package away from an essential crossbuild env,
> and that is libkeyutils1. By rebuilding that package from source for
> riscv64, non-cross, and then using it for sbuild-chroot-host, we can
> start building the kernel and firmware packages cross again.
>
> This patch should be removed again once riscv64 hits trixie, thus
> testing. But that may take some more moons, and we will benefit greatly
> from having a workaround until then to fix and improve other topics
> around that arch.
>
> See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059698 for
> more background.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> CC: Helmut Grohne <helmut@subdivi.de>
> ---
> meta/recipes-devtools/keyutils/keyutils.bb | 13 +++++++++++++
> .../sbuild-chroot/sbuild-chroot-host.bb | 2 ++
> 2 files changed, 15 insertions(+)
> create mode 100644 meta/recipes-devtools/keyutils/keyutils.bb
>
> diff --git a/meta/recipes-devtools/keyutils/keyutils.bb b/meta/recipes-devtools/keyutils/keyutils.bb
> new file mode 100644
> index 00000000..e3c8e909
> --- /dev/null
> +++ b/meta/recipes-devtools/keyutils/keyutils.bb
> @@ -0,0 +1,13 @@
> +# This software is a part of ISAR.
> +# Copyright (c) Siemens AG, 2023
> +#
> +# SPDX-License-Identifier: MIT
> +
> +inherit dpkg
> +
> +SRC_URI = "apt://${PN}"
> +
> +PROVIDES += "libkeyutils1 libkeyutils-dev"
> +
> +ISAR_CROSS_COMPILE = "0"
> +DEB_BUILD_OPTIONS += "nocheck"
> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
> index 255d6937..b61e3634 100644
> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
> @@ -24,3 +24,5 @@ SBUILD_CHROOT_PREINSTALL:riscv64 ?= " \
> gcc-riscv64-linux-gnu \
> g++-riscv64-linux-gnu \
> dpkg-cross"
> +
> +DEPENDS:append:riscv64 = " keyutils"
We can drop this! Helmut just pointed out that Debian has fixed this
issue (and possibly more). There might be new ones in the future,
though, at least until riscv64 hits testing.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-01-08 17:31 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 10:08 [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
2024-01-02 10:08 ` [PATCH 1/9] crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}" Jan Kiszka
2024-01-02 10:08 ` [PATCH 2/9] Add workaround for cross-building riscv64 Jan Kiszka
2024-01-08 17:31 ` Jan Kiszka
2024-01-02 10:08 ` [PATCH 3/9] meta-isar: jh7110-u-boot-spl-tool: Use BPN instead of PN Jan Kiszka
2024-01-02 10:08 ` [PATCH 4/9] meta-isar: starfive-visionfive2: Use kernel DTB Jan Kiszka
2024-01-02 10:08 ` [PATCH 5/9] meta-isar: jh7110-u-boot-spl-tool: Rework Jan Kiszka
2024-01-02 10:08 ` [PATCH 6/9] meta-isar: starfive-visionfive2: Switch to upstream U-Boot Jan Kiszka
2024-01-02 10:08 ` [PATCH 7/9] meta-isar: starfive-visionfive2: Drop obsolete recipes Jan Kiszka
2024-01-02 10:08 ` [PATCH 8/9] meta-isar: linux-mainline: Update to 6.6.9 Jan Kiszka
2024-01-02 10:08 ` [PATCH 9/9] meta-isar: Switch VisionFive 2 to mainline kernel Jan Kiszka
2024-01-03 16:39 ` [PATCH 0/9] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
2024-01-05 15:45 ` Anton Mikanovich
2024-01-05 21:19 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox