public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Fix single-name single-content rule for kernel packages
@ 2026-08-26 13:14 '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
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-26 13:14 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, wzh, Felix Moessbauer

Similar to upstream Debian, our kernel source packages are (among others)
architecture specific. By that, we also have to encode the architecture
(or machine) in the name of the package. Otherwise existing packages might
get reused on rebuilds with other targets (or multiarch)

In isar, this has ever been modeled incorrectly (the kernels .dsc file
was arch=any despite being arch specific). This is easy to fix, but
also depending on the kernels was done incorrectly (a KERNEL_NAME =
mainline is not specific enough, as mainline on arm64 is technically a
different kernel (source package) than mainline on amd64.

Patch 4 carries the implementation of option (1) from [1].

[1] https://groups.google.com/g/isar-users/c/JmB2FuEXZBU/m/azKokFVsAwAJ

The series has been tested in -t cross, -t kernel CI.

Changes since v3:

- rebased onto next
- drop p3 ("kernel: make source package architecture specific") as not
  strictly needed and breaks module build on generic kernels

Changes since v2:

- improve commit messages according to Jan's feedback
- improve API changelog
- p2: drop redundant x86_64_defconfig

Changes since v1:

- no functional change
- rework API changelog and user manual

Best regards,
Felix Moessbauer
Siemens AG

Felix Moessbauer (4):
  testsuite: make test_libc_dev_deploy KERNEL_NAME agnostic
  kernel: bind x86_64_defconfig to amd64 architecture instead of machine
  kernel: move common parts of linux-mainline to inc
  kernel: use architecture specific names for kernels

 RECIPE-API-CHANGELOG.md                       |  4 ++
 doc/user_manual.md                            | 13 +++++-
 meta-isar/conf/machine/beagleplay.conf        |  2 +-
 meta-isar/conf/machine/de0-nano-soc.conf      |  2 +-
 meta-isar/conf/machine/hikey.conf             |  2 +-
 meta-isar/conf/machine/qemuamd64-cip.conf     |  2 +-
 meta-isar/conf/machine/sifive-fu540.conf      |  2 +-
 meta-isar/conf/machine/stm32mp15x.conf        |  2 +-
 .../linux/linux-cip_4.4.166-cip29.bb          |  7 ++-
 .../recipes-kernel/linux/linux-mainline.inc   | 45 +++++++++++++++++++
 .../linux/linux-mainline_6.12.103.bb          | 39 +---------------
 .../linux/linux-phy_6.12.103.bb               |  2 +-
 testsuite/citest.py                           | 23 +++++++---
 13 files changed, 91 insertions(+), 54 deletions(-)
 create mode 100644 meta-isar/recipes-kernel/linux/linux-mainline.inc

-- 
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-1-felix.moessbauer%40siemens.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v4 1/4] testsuite: make test_libc_dev_deploy KERNEL_NAME agnostic
  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 ` '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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-26 13:14 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, wzh, Felix Moessbauer

We currently hard-code the relation between these targets and the
expected recipes that are built. As a preparation to use target specific
kernel names, we generalize the test to read the actual KERNEL_NAME from
the bitbake vars.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 testsuite/citest.py | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index 197ed11a..2b368b33 100644
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -640,6 +640,10 @@ class KernelTests(CIBaseTest):
 
     def test_libc_dev_deploy(self):
         """Test that the linux-libc-dev packages are deployed (parse only)."""
+        def kernel_recipe(target):
+            kernel_name = CIUtils.getVars('KERNEL_NAME', target=target)
+            return f'linux-{kernel_name}'
+
         targets = [
             'mc:hikey-bookworm:isar-image-ci',
             'mc:hikey-trixie:isar-image-ci'
@@ -650,23 +654,28 @@ class KernelTests(CIBaseTest):
         self.init()
         buildlist, _ = self.generate_dependency_graph(targets, lines=lines)
 
+        bookworm_kernel = kernel_recipe('mc:hikey-bookworm:isar-image-ci')
+        trixie_kernel = kernel_recipe('mc:hikey-trixie:isar-image-ci')
+
         with open(buildlist, 'r') as f:
             built = set(line.strip() for line in f if line.strip())
 
         # trixie produces arch=all linux-libc-dev packages, which are built by
         # the dedicated -libctarget variant.
         self.assertIn(
-            'mc:hikey-trixie:linux-mainline-libctarget', built,
-            "trixie: linux-mainline-libctarget (linux-libc-dev is not built)")
+            f'mc:hikey-trixie:{trixie_kernel}-libctarget', built,
+            f"trixie: {trixie_kernel}-libctarget "
+            "(linux-libc-dev is not built)")
 
         # bookworm produces an arch-specific linux-libc-dev, built by the base
         # recipe itself; no -libctarget variant is needed.
         self.assertIn(
-            'mc:hikey-bookworm:linux-mainline', built,
-            "bookworm: linux-mainline (linux-libc-dev is not built)")
+            f'mc:hikey-bookworm:{bookworm_kernel}', built,
+            f"bookworm: {bookworm_kernel} (linux-libc-dev is not built)")
         self.assertNotIn(
-            'mc:hikey-bookworm:linux-mainline-libctarget', built,
-            "bookworm: unexpected -libctarget variant is built")
+            f'mc:hikey-bookworm:{bookworm_kernel}-libctarget', built,
+            f"bookworm: unexpected {bookworm_kernel}-libctarget "
+            "variant is built")
 
         # The unrelated cip kernel must not be pulled in as libc-dev provider.
         for target in built:
-- 
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-2-felix.moessbauer%40siemens.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v4 2/4] kernel: bind x86_64_defconfig to amd64 architecture instead of machine
  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 ` 'Felix Moessbauer' via isar-users
  2026-08-26 13:14 ` [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc 'Felix Moessbauer' via isar-users
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-26 13:14 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, wzh, Felix Moessbauer

This defconfig is a reasonable default for all amd64 machines. We now
make it the default for that architecture for linux-cip and
linux-mainline.

As a preparation to build architecture specific source packages for the
kernel, we only add the x86 defconfig to the SRC_URI if actually needed.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb | 5 +++--
 meta-isar/recipes-kernel/linux/linux-mainline_6.12.103.bb | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb b/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
index 1f4d75bc..cc3a5a0e 100644
--- a/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
+++ b/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
@@ -9,8 +9,9 @@ inherit linux-kernel
 
 SRC_URI += " \
     git://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git;protocol=https;branch=linux-4.4.y-cip;destsuffix=${P} \
-    file://x86_64_defconfig"
+"
 
 SRCREV = "af3adf9f9c633ac0e1d68487d7fad22285dda8a3"
 
-KERNEL_DEFCONFIG:qemuamd64-cip = "x86_64_defconfig"
+SRC_URI:append:amd64 = " file://${KERNEL_DEFCONFIG}"
+KERNEL_DEFCONFIG:amd64 = "x86_64_defconfig"
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 248d9767..d0779c84 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
@@ -11,7 +11,6 @@ ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else
 
 SRC_URI += " \
     https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${ARCHIVE_VERSION}.tar.xz \
-    file://x86_64_defconfig \
     file://ftpm-module.cfg \
     file://subdir \
     file://no-root-nfs.cfg;apply=no"
@@ -20,7 +19,8 @@ SRC_URI[sha256sum] = "f143aaade8877ba5616e788b4482576db28481bcf557ef537f4fcc3938
 
 S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
 
-KERNEL_DEFCONFIG:qemuamd64 = "x86_64_defconfig"
+SRC_URI:append:amd64 = " file://${KERNEL_DEFCONFIG}"
+KERNEL_DEFCONFIG:amd64 = "x86_64_defconfig"
 
 LINUX_VERSION_EXTENSION = "-isar"
 
-- 
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-3-felix.moessbauer%40siemens.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc
  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
  2026-08-27 13:05   ` 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
  4 siblings, 1 reply; 9+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-26 13:14 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, wzh, Felix Moessbauer

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v4 4/4] kernel: use architecture specific names for kernels
  2026-08-26 13:14 [PATCH v4 0/4] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
                   ` (2 preceding siblings ...)
  2026-08-26 13:14 ` [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc 'Felix Moessbauer' via isar-users
@ 2026-08-26 13:14 ` '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
  4 siblings, 0 replies; 9+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-26 13:14 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, wzh, Felix Moessbauer

The kernel source packages are specific to at least the architecture,
but also other aspects like machine and prod / debug configurations.

The linux-mainline and linux-cip kernels here are only architecture
specific, so we now encode the architecture in the KERNEL_NAME. For other
kernels that are already specific to a machine, we don't encode the
architecture in the name as this would be redundant.

For the kernel recipes which are generic (like mainline and cip), we
simply extend the PN with -${DISTRO_ARCH}, so bitbake can find the
dependency and instanciate an architecture specific variant.

By that, we also need to adapt the default in test_per_kernel, which
explicitly builds the module for the kernel that corresponds to the
multiconfig target.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 RECIPE-API-CHANGELOG.md                             |  4 ++++
 doc/user_manual.md                                  | 13 ++++++++++++-
 meta-isar/conf/machine/beagleplay.conf              |  2 +-
 meta-isar/conf/machine/de0-nano-soc.conf            |  2 +-
 meta-isar/conf/machine/hikey.conf                   |  2 +-
 meta-isar/conf/machine/qemuamd64-cip.conf           |  2 +-
 meta-isar/conf/machine/sifive-fu540.conf            |  2 +-
 meta-isar/conf/machine/stm32mp15x.conf              |  2 +-
 .../recipes-kernel/linux/linux-cip_4.4.166-cip29.bb |  2 ++
 .../recipes-kernel/linux/linux-mainline_6.12.103.bb |  2 ++
 testsuite/citest.py                                 |  2 +-
 11 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 2db05169..15b608dd 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -1175,6 +1175,10 @@ DPKG_ARCH ?= "${DISTRO_ARCH}"
 
 Firmware packages are an exception because they are built for only one architecture.
 
+**Note**: This rule also applies to kernel packages. Set `KERNEL_NAME` to an
+architecture- or machine-specific name, as appropriate. If the kernel is built
+in different modes (such as prod or debug), encode the mode in the name too.
+
 ### Add Hyper-V machine support
 
 A new machine `hyper-v` has been introduced for building images
diff --git a/doc/user_manual.md b/doc/user_manual.md
index f3b1acb9..dff4ff0a 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -629,11 +629,22 @@ For example, in your machine configuration:
 
 ```bitbake
 KERNEL_NAME = "armmp"
-KERNEL_NAMES = "armmp mainline"
+KERNEL_NAMES = "armmp mainline-arm64"
 ```
 
 When `KERNEL_NAMES` is set, recipes inheriting the `per-kernel` class will generate variants for each listed kernel. Installation of each must be explicitly handled in the image.
 
+Kernel source packages contain architecture-specific content. Therefore, builds
+for multiple architectures must publish source packages with distinct names.
+For a kernel built for only one target, the name may remain unchanged.
+
+Generic kernel recipes can append `${DISTRO_ARCH}` to `PN`, to provide the
+kernel for all architectures.
+
+```
+PN .= "-${DISTRO_ARCH}"
+```
+
 ---
 
 ## Add a New Image
diff --git a/meta-isar/conf/machine/beagleplay.conf b/meta-isar/conf/machine/beagleplay.conf
index d030256d..8cefd939 100644
--- a/meta-isar/conf/machine/beagleplay.conf
+++ b/meta-isar/conf/machine/beagleplay.conf
@@ -5,7 +5,7 @@
 
 DISTRO_ARCH ?= "arm64"
 
-KERNEL_NAME ?= "mainline"
+KERNEL_NAME ?= "mainline-${DISTRO_ARCH}"
 
 IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "beagleplay.wks.in"
diff --git a/meta-isar/conf/machine/de0-nano-soc.conf b/meta-isar/conf/machine/de0-nano-soc.conf
index 78f841df..7059822a 100644
--- a/meta-isar/conf/machine/de0-nano-soc.conf
+++ b/meta-isar/conf/machine/de0-nano-soc.conf
@@ -5,7 +5,7 @@
 
 DISTRO_ARCH ?= "armhf"
 
-KERNEL_NAME ?= "mainline"
+KERNEL_NAME ?= "mainline-${DISTRO_ARCH}"
 
 U_BOOT_CONFIG:de0-nano-soc = "socfpga_de0_nano_soc_defconfig"
 U_BOOT_BIN:de0-nano-soc = "u-boot-with-spl.sfp"
diff --git a/meta-isar/conf/machine/hikey.conf b/meta-isar/conf/machine/hikey.conf
index 019e1910..1e696b4d 100644
--- a/meta-isar/conf/machine/hikey.conf
+++ b/meta-isar/conf/machine/hikey.conf
@@ -5,7 +5,7 @@
 
 DISTRO_ARCH = "arm64"
 
-KERNEL_NAME ?= "mainline"
+KERNEL_NAME ?= "mainline-${DISTRO_ARCH}"
 
 IMAGE_FSTYPES = "wic"
 WKS_FILE ?= "hikey"
diff --git a/meta-isar/conf/machine/qemuamd64-cip.conf b/meta-isar/conf/machine/qemuamd64-cip.conf
index e7eaa2d6..9d633362 100644
--- a/meta-isar/conf/machine/qemuamd64-cip.conf
+++ b/meta-isar/conf/machine/qemuamd64-cip.conf
@@ -5,4 +5,4 @@
 
 include conf/machine/qemuamd64.conf
 
-KERNEL_NAME = "cip"
+KERNEL_NAME = "cip-${DISTRO_ARCH}"
diff --git a/meta-isar/conf/machine/sifive-fu540.conf b/meta-isar/conf/machine/sifive-fu540.conf
index c9bbc57b..07846f99 100644
--- a/meta-isar/conf/machine/sifive-fu540.conf
+++ b/meta-isar/conf/machine/sifive-fu540.conf
@@ -5,7 +5,7 @@
 
 DISTRO_ARCH = "riscv64"
 
-KERNEL_NAME ?= "mainline"
+KERNEL_NAME ?= "mainline-${DISTRO_ARCH}"
 
 IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "sifive-fu540"
diff --git a/meta-isar/conf/machine/stm32mp15x.conf b/meta-isar/conf/machine/stm32mp15x.conf
index 7aa410a5..aa453d8f 100644
--- a/meta-isar/conf/machine/stm32mp15x.conf
+++ b/meta-isar/conf/machine/stm32mp15x.conf
@@ -5,7 +5,7 @@
 
 DISTRO_ARCH ?= "armhf"
 
-KERNEL_NAME ?= "mainline"
+KERNEL_NAME ?= "mainline-${DISTRO_ARCH}"
 
 U_BOOT_CONFIG:stm32mp15x = "stm32mp15_trusted_defconfig"
 U_BOOT_BIN:stm32mp15x = "u-boot.stm32"
diff --git a/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb b/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
index cc3a5a0e..e2e51304 100644
--- a/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
+++ b/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
@@ -5,6 +5,8 @@
 #
 # SPDX-License-Identifier: MIT
 
+PN .= "-${DISTRO_ARCH}"
+
 inherit linux-kernel
 
 SRC_URI += " \
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 11b90127..13c694b0 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,4 +5,6 @@
 #
 # SPDX-License-Identifier: MIT
 
+PN .= "-${DISTRO_ARCH}"
+
 require recipes-kernel/linux/linux-mainline.inc
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 2b368b33..f011b13c 100644
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -627,7 +627,7 @@ class KernelTests(CIBaseTest):
         """Test per-kernel recipe variants for external kernel modules."""
 
         targets = ['mc:qemuarm64-bookworm:isar-image-ci']
-        kernel_names = self.params.get('kernel_names', default='mainline')
+        kernel_names = self.params.get('kernel_names', default='mainline-arm64')
         kernel_names = [k.strip() for k in kernel_names.split(',') if k.strip()]
         modules = [f"example-module-{k}" for k in kernel_names]
         modules.append('example-module-${KERNEL_NAME}')
-- 
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-5-felix.moessbauer%40siemens.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc
  2026-08-26 13:14 ` [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc 'Felix Moessbauer' via isar-users
@ 2026-08-27 13:05   ` Zhihang Wei
  2026-08-28  6:26     ` 'MOESSBAUER, Felix' via isar-users
  0 siblings, 1 reply; 9+ messages in thread
From: Zhihang Wei @ 2026-08-27 13:05 UTC (permalink / raw)
  To: Felix Moessbauer, isar-users


On 8/26/26 15:14, Felix Moessbauer wrote:
> 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"
> +

Hi Felix,

The checksum here should also be updated, as below. The patch
"meta-isar/recipes-kernel: bump linux and kselftest to 6.12.103" has been
merged.

Zhihang

> 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
> <snip>
> -SRC_URI[sha256sum] = "f143aaade8877ba5616e788b4482576db28481bcf557ef537f4fcc3938fc3176"
> <snip>

-- 
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/3f69ed80-e622-4f13-86a4-91397cf1f580%40ilbers.de.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc
  2026-08-27 13:05   ` Zhihang Wei
@ 2026-08-28  6:26     ` 'MOESSBAUER, Felix' via isar-users
  2026-08-28 14:50       ` Zhihang Wei
  0 siblings, 1 reply; 9+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2026-08-28  6:26 UTC (permalink / raw)
  To: Zhihang Wei, isar-users

On Thu, 2026-08-27 at 15:05 +0200, Zhihang Wei wrote:
> On 8/26/26 15:14, Felix Moessbauer wrote:
> > 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"
> > +
> 
> Hi Felix,
> 
> The checksum here should also be updated, as below. The patch
> "meta-isar/recipes-kernel: bump linux and kselftest to 6.12.103" has been
> merged.

Hi, I'm sorry that I missed this. Shall I send a v5 or can you just
bump the checksum on merging?

Felix

> 
> Zhihang
> 
> > 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
> > <snip>
> > -SRC_URI[sha256sum] = "f143aaade8877ba5616e788b4482576db28481bcf557ef537f4fcc3938fc3176"
> > <snip>

-- 
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/f9cdc417670ae518344bfc09ad66260e1bba9350.camel%40siemens.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc
  2026-08-28  6:26     ` 'MOESSBAUER, Felix' via isar-users
@ 2026-08-28 14:50       ` Zhihang Wei
  0 siblings, 0 replies; 9+ messages in thread
From: Zhihang Wei @ 2026-08-28 14:50 UTC (permalink / raw)
  To: MOESSBAUER, Felix, isar-users



On 8/28/26 08:26, MOESSBAUER, Felix wrote:
> On Thu, 2026-08-27 at 15:05 +0200, Zhihang Wei wrote:
>> On 8/26/26 15:14, Felix Moessbauer wrote:
>>> 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"
>>> +
>> Hi Felix,
>>
>> The checksum here should also be updated, as below. The patch
>> "meta-isar/recipes-kernel: bump linux and kselftest to 6.12.103" has been
>> merged.
> Hi, I'm sorry that I missed this. Shall I send a v5 or can you just
> bump the checksum on merging?
>
> Felix

Let me get back to you next week, we still need some time to review.

Zhihang

>> Zhihang
>>
>>> 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
>>> <snip>
>>> -SRC_URI[sha256sum] = "f143aaade8877ba5616e788b4482576db28481bcf557ef537f4fcc3938fc3176"
>>> <snip>

-- 
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/2bfc0a92-4845-4d23-8dfb-e7fbe02ee7e6%40ilbers.de.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v4 0/4] Fix single-name single-content rule for kernel packages
  2026-08-26 13:14 [PATCH v4 0/4] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
                   ` (3 preceding siblings ...)
  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 ` Zhihang Wei
  4 siblings, 0 replies; 9+ messages in thread
From: Zhihang Wei @ 2026-09-04  8:31 UTC (permalink / raw)
  To: Felix Moessbauer, isar-users; +Cc: jan.kiszka

Bumped the hash in p3 and applied to next, thanks.

Zhihang

On 8/26/26 15:14, Felix Moessbauer wrote:
> Similar to upstream Debian, our kernel source packages are (among others)
> architecture specific. By that, we also have to encode the architecture
> (or machine) in the name of the package. Otherwise existing packages might
> get reused on rebuilds with other targets (or multiarch)
>
> In isar, this has ever been modeled incorrectly (the kernels .dsc file
> was arch=any despite being arch specific). This is easy to fix, but
> also depending on the kernels was done incorrectly (a KERNEL_NAME =
> mainline is not specific enough, as mainline on arm64 is technically a
> different kernel (source package) than mainline on amd64.
>
> Patch 4 carries the implementation of option (1) from [1].
>
> [1] https://groups.google.com/g/isar-users/c/JmB2FuEXZBU/m/azKokFVsAwAJ
>
> The series has been tested in -t cross, -t kernel CI.
>
> Changes since v3:
>
> - rebased onto next
> - drop p3 ("kernel: make source package architecture specific") as not
>    strictly needed and breaks module build on generic kernels
>
> Changes since v2:
>
> - improve commit messages according to Jan's feedback
> - improve API changelog
> - p2: drop redundant x86_64_defconfig
>
> Changes since v1:
>
> - no functional change
> - rework API changelog and user manual
>
> Best regards,
> Felix Moessbauer
> Siemens AG
>
> Felix Moessbauer (4):
>    testsuite: make test_libc_dev_deploy KERNEL_NAME agnostic
>    kernel: bind x86_64_defconfig to amd64 architecture instead of machine
>    kernel: move common parts of linux-mainline to inc
>    kernel: use architecture specific names for kernels
>
>   RECIPE-API-CHANGELOG.md                       |  4 ++
>   doc/user_manual.md                            | 13 +++++-
>   meta-isar/conf/machine/beagleplay.conf        |  2 +-
>   meta-isar/conf/machine/de0-nano-soc.conf      |  2 +-
>   meta-isar/conf/machine/hikey.conf             |  2 +-
>   meta-isar/conf/machine/qemuamd64-cip.conf     |  2 +-
>   meta-isar/conf/machine/sifive-fu540.conf      |  2 +-
>   meta-isar/conf/machine/stm32mp15x.conf        |  2 +-
>   .../linux/linux-cip_4.4.166-cip29.bb          |  7 ++-
>   .../recipes-kernel/linux/linux-mainline.inc   | 45 +++++++++++++++++++
>   .../linux/linux-mainline_6.12.103.bb          | 39 +---------------
>   .../linux/linux-phy_6.12.103.bb               |  2 +-
>   testsuite/citest.py                           | 23 +++++++---
>   13 files changed, 91 insertions(+), 54 deletions(-)
>   create mode 100644 meta-isar/recipes-kernel/linux/linux-mainline.inc
>

-- 
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/288a3ddd-2e91-482d-af8c-b2bcfadd2d1f%40ilbers.de.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-09-04  8:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v4 3/4] kernel: move common parts of linux-mainline to inc 'Felix Moessbauer' via isar-users
2026-08-27 13:05   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox