new file mode 100644
@@ -0,0 +1,45 @@
+# Example recipe for building the mainline kernel
+#
+# This software is a part of Isar.
+# Copyright (c) Siemens AG, 2026
+#
+# SPDX-License-Identifier: MIT
+
+inherit linux-kernel
+
+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/v6.x/linux-${ARCHIVE_VERSION}.tar.xz \
+ file://ftpm-module.cfg \
+ file://subdir \
+ file://no-root-nfs.cfg;apply=no"
+
+SRC_URI[sha256sum] = "e35ac999f40a6874493d8d60f33f1150d7a89ae5841c428da82257fbcd070aed"
+
+S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
+
+SRC_URI:append:amd64 = " file://${KERNEL_DEFCONFIG}"
+KERNEL_DEFCONFIG:amd64 = "x86_64_defconfig"
+
+LINUX_VERSION_EXTENSION = "-isar"
+
+KERNEL_CONFIG_FRAGMENTS = "subdir/no-ubifs-fs.cfg"
+
+check_fragments_applied() {
+ grep -q "# CONFIG_MTD is not set" ${S}/debian/rules ||
+ cat << EOF | sed -i '/^override_dh_auto_build/ r /dev/stdin' ${S}/debian/rules
+ if ! grep "# CONFIG_MTD is not set" \$(O)/.config && \\
+ ! grep "# CONFIG_MTD_UBI is not set" \$(O)/.config; then \\
+ grep "# CONFIG_UBIFS_FS is not set" \$(O)/.config || \\
+ (echo "Self-check failed: CONFIG_UBIFS_FS still enabled" && exit 1); \\
+ fi
+ grep "CONFIG_ROOT_NFS=y" \$(O)/.config || \\
+ (echo "Self-check failed: CONFIG_ROOT_NFS not enabled" && exit 1)
+EOF
+}
+
+# For testing purposes only
+dpkg_configure_kernel:append() {
+ check_fragments_applied
+}
@@ -5,41 +5,4 @@
#
# SPDX-License-Identifier: MIT
-inherit linux-kernel
-
-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/v6.x/linux-${ARCHIVE_VERSION}.tar.xz \
- file://ftpm-module.cfg \
- file://subdir \
- file://no-root-nfs.cfg;apply=no"
-
-SRC_URI[sha256sum] = "e35ac999f40a6874493d8d60f33f1150d7a89ae5841c428da82257fbcd070aed"
-
-S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
-
-SRC_URI:append:amd64 = " file://${KERNEL_DEFCONFIG}"
-KERNEL_DEFCONFIG:amd64 = "x86_64_defconfig"
-
-LINUX_VERSION_EXTENSION = "-isar"
-
-KERNEL_CONFIG_FRAGMENTS = "subdir/no-ubifs-fs.cfg"
-
-check_fragments_applied() {
- grep -q "# CONFIG_MTD is not set" ${S}/debian/rules ||
- cat << EOF | sed -i '/^override_dh_auto_build/ r /dev/stdin' ${S}/debian/rules
- if ! grep "# CONFIG_MTD is not set" \$(O)/.config && \\
- ! grep "# CONFIG_MTD_UBI is not set" \$(O)/.config; then \\
- grep "# CONFIG_UBIFS_FS is not set" \$(O)/.config || \\
- (echo "Self-check failed: CONFIG_UBIFS_FS still enabled" && exit 1); \\
- fi
- grep "CONFIG_ROOT_NFS=y" \$(O)/.config || \\
- (echo "Self-check failed: CONFIG_ROOT_NFS not enabled" && exit 1)
-EOF
-}
-
-# For testing purposes only
-dpkg_configure_kernel:append() {
- check_fragments_applied
-}
+require recipes-kernel/linux/linux-mainline.inc
@@ -1,4 +1,4 @@
-require recipes-kernel/linux/linux-mainline_${PV}.bb
+require recipes-kernel/linux/linux-mainline.inc
SRC_URI:remove = "file://ftpm-module.cfg"
SRC_URI:remove = "file://subdir/no-ubifs-fs.cfg"
As a preparation to provide linux-mainline for multiple targets, we move the common parts (currently everything) to an .inc file and include that in the kernel recipes. No functional change. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- .../recipes-kernel/linux/linux-mainline.inc | 45 +++++++++++++++++++ .../linux/linux-mainline_6.12.85.bb | 39 +--------------- .../recipes-kernel/linux/linux-phy_6.12.85.bb | 2 +- 3 files changed, 47 insertions(+), 39 deletions(-) create mode 100644 meta-isar/recipes-kernel/linux/linux-mainline.inc