From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, wzh@ilbers.de,
Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc
Date: Wed, 26 Aug 2026 15:14:56 +0200 [thread overview]
Message-ID: <20260826131457.1702004-4-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260826131457.1702004-1-felix.moessbauer@siemens.com>
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.103.bb | 39 +---------------
.../linux/linux-phy_6.12.103.bb | 2 +-
3 files changed, 47 insertions(+), 39 deletions(-)
create mode 100644 meta-isar/recipes-kernel/linux/linux-mainline.inc
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline.inc b/meta-isar/recipes-kernel/linux/linux-mainline.inc
new file mode 100644
index 00000000..d93c8e51
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/linux-mainline.inc
@@ -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
+}
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.103.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.103.bb
index d0779c84..11b90127 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.103.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.103.bb
@@ -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] = "f143aaade8877ba5616e788b4482576db28481bcf557ef537f4fcc3938fc3176"
-
-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
diff --git a/meta-isar/recipes-kernel/linux/linux-phy_6.12.103.bb b/meta-isar/recipes-kernel/linux/linux-phy_6.12.103.bb
index a61befe2..33265f6b 100644
--- a/meta-isar/recipes-kernel/linux/linux-phy_6.12.103.bb
+++ b/meta-isar/recipes-kernel/linux/linux-phy_6.12.103.bb
@@ -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"
--
2.55.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260826131457.1702004-4-felix.moessbauer%40siemens.com.
next prev parent reply other threads:[~2026-08-26 13:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 13:14 [PATCH v4 0/4] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
2026-08-26 13:14 ` [PATCH v4 1/4] testsuite: make test_libc_dev_deploy KERNEL_NAME agnostic 'Felix Moessbauer' via isar-users
2026-08-26 13:14 ` [PATCH v4 2/4] kernel: bind x86_64_defconfig to amd64 architecture instead of machine 'Felix Moessbauer' via isar-users
2026-08-26 13:14 ` 'Felix Moessbauer' via isar-users [this message]
2026-08-27 13:05 ` [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc Zhihang Wei
2026-08-28 6:26 ` 'MOESSBAUER, Felix' via isar-users
2026-08-28 14:50 ` Zhihang Wei
2026-08-26 13:14 ` [PATCH v4 4/4] kernel: use architecture specific names for kernels 'Felix Moessbauer' via isar-users
2026-09-04 8:31 ` [PATCH v4 0/4] Fix single-name single-content rule for kernel packages Zhihang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260826131457.1702004-4-felix.moessbauer@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=wzh@ilbers.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox