[v4,3/6] starfive-visionfive2: add BSP kernel

Message ID 20230410094252.1151370-4-felix.moessbauer@siemens.com
State Accepted, archived
Headers show
Series Add BSP for StarFiveTech VisionFive2 Risc-V board | expand

Commit Message

MOESSBAUER, Felix April 10, 2023, 9:42 a.m. UTC
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>
---
 .../linux/files/starfive2_extra.cfg             |  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

Patch

diff --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"