* [PATCH v2 1/5] testsuite: make test_libc_dev_deploy KERNEL_NAME agnostic
2026-08-17 11:34 [PATCH v2 0/5] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
@ 2026-08-17 11:34 ` 'Felix Moessbauer' via isar-users
2026-08-17 11:34 ` [PATCH v2 2/5] kernel: bind x86_64_defconfig to amd64 architecture instead of machine 'Felix Moessbauer' via isar-users
` (3 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-17 11:34 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, 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 ca4b7cd8..f5d54904 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/20260817113420.750731-2-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v2 2/5] kernel: bind x86_64_defconfig to amd64 architecture instead of machine
2026-08-17 11:34 [PATCH v2 0/5] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
2026-08-17 11:34 ` [PATCH v2 1/5] testsuite: make test_libc_dev_deploy KERNEL_NAME agnostic 'Felix Moessbauer' via isar-users
@ 2026-08-17 11:34 ` 'Felix Moessbauer' via isar-users
2026-08-18 6:27 ` 'Jan Kiszka' via isar-users
2026-08-17 11:34 ` [PATCH v2 3/5] kernel: make source package architecture specific 'Felix Moessbauer' via isar-users
` (2 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-17 11:34 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, 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. Further, we only add it 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 | 3 ++-
meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb | 4 ++--
2 files changed, 4 insertions(+), 3 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..e2775c8d 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
@@ -13,4 +13,5 @@ SRC_URI += " \
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.85.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
index 10444680..786a9db8 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.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] = "e35ac999f40a6874493d8d60f33f1150d7a89ae5841c428da82257fbcd
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/20260817113420.750731-3-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 2/5] kernel: bind x86_64_defconfig to amd64 architecture instead of machine
2026-08-17 11:34 ` [PATCH v2 2/5] kernel: bind x86_64_defconfig to amd64 architecture instead of machine 'Felix Moessbauer' via isar-users
@ 2026-08-18 6:27 ` 'Jan Kiszka' via isar-users
0 siblings, 0 replies; 12+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-08-18 6:27 UTC (permalink / raw)
To: Felix Moessbauer, isar-users
On 17.08.26 13:34, Felix Moessbauer wrote:
> 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. Further, we only add it to the SRC_URI if actually
> needed.
>
You should leave a reasoning here as well.
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb | 3 ++-
> meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb | 4 ++--
> 2 files changed, 4 insertions(+), 3 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..e2775c8d 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
> @@ -13,4 +13,5 @@ SRC_URI += " \
>
> SRCREV = "af3adf9f9c633ac0e1d68487d7fad22285dda8a3"
>
> -KERNEL_DEFCONFIG:qemuamd64-cip = "x86_64_defconfig"
> +SRC_URI:append:amd64 = " file://${KERNEL_DEFCONFIG}"
We already have file://x86_64_defconfig in SRC_URI - drop that other
statement then.
> +KERNEL_DEFCONFIG:amd64 = "x86_64_defconfig"
> diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
> index 10444680..786a9db8 100644
> --- a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
> +++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.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] = "e35ac999f40a6874493d8d60f33f1150d7a89ae5841c428da82257fbcd
>
> 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"
>
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/76bd1ba7-64ec-484b-835d-facc3da25777%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 3/5] kernel: make source package architecture specific
2026-08-17 11:34 [PATCH v2 0/5] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
2026-08-17 11:34 ` [PATCH v2 1/5] testsuite: make test_libc_dev_deploy KERNEL_NAME agnostic 'Felix Moessbauer' via isar-users
2026-08-17 11:34 ` [PATCH v2 2/5] kernel: bind x86_64_defconfig to amd64 architecture instead of machine 'Felix Moessbauer' via isar-users
@ 2026-08-17 11:34 ` 'Felix Moessbauer' via isar-users
2026-08-18 6:23 ` 'Jan Kiszka' via isar-users
2026-08-17 11:34 ` [PATCH v2 4/5] kernel: move common parts of linux-mainline to inc 'Felix Moessbauer' via isar-users
2026-08-17 11:34 ` [PATCH v2 5/5] kernel: use architecture specific names for kernels 'Felix Moessbauer' via isar-users
4 siblings, 1 reply; 12+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-17 11:34 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, Felix Moessbauer
Currently we mark our kernel source packages as Arch=any all, despite
the content of the package is architecture specific. Here, we make the
package architecture specific by avoiding any Arch=any identifier in the
control file. This results in having Architecture: ${DISTRO_ARCH} all in
the generated .dsc file. The same applies to the custom kernel modules.
A special case is the "linux-kbuild-${KERNEL_NAME_PROVIDED}-
${DISTRO_ARCH}-cross" package, which is specific to the BUILD_ARCH, as
it contains host tooling binaries for the host, which are derived from
the target specific kernel.
Ensuring that we do not generate multiple kernel packages with different
content but the same name (for multiple architectures) will be done in
later commits.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes-recipe/linux-kernel.bbclass | 3 ++-
.../linux-module/files/debian/control.tmpl | 2 +-
meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++-----
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/meta/classes-recipe/linux-kernel.bbclass b/meta/classes-recipe/linux-kernel.bbclass
index ac587b17..74a49aa8 100644
--- a/meta/classes-recipe/linux-kernel.bbclass
+++ b/meta/classes-recipe/linux-kernel.bbclass
@@ -78,6 +78,7 @@ TEMPLATE_FILES += " \
TEMPLATE_VARS += " \
BPN \
+ BUILD_ARCH \
KBUILD_DEPENDS \
KERNEL_ARCH \
KERNEL_DEBIAN_DEPENDS \
@@ -274,7 +275,7 @@ def get_additional_build_profiles(d):
profiles += ' pkg.{}.libcdev-arch-all'.format(d.getVar('BPN'))
return profiles
-KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', 'any', d) }"
+KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', d.getVar('DISTRO_ARCH'), d) }"
DEB_BUILD_PROFILES += "${@get_additional_build_profiles(d)}"
do_prepare_build[cleandirs] += "${S}/debian"
diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
index d8f4aded..3c222979 100644
--- a/meta/recipes-kernel/linux-module/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
@@ -7,6 +7,6 @@ Maintainer: ${MAINTAINER}
Rules-Requires-Root: no
Package: ${PN}
-Architecture: any
+Architecture: ${DISTRO_ARCH}
Depends: ${KERNEL_IMAGE_PKG}, kmod
Description: ${DESCRIPTION}
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index 77c4048b..f89a1f56 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -8,7 +8,7 @@ Rules-Requires-Root: no
Package: linux-image-${KERNEL_NAME_PROVIDED}
Build-Profiles: <pkg.${BPN}.kernel>
-Architecture: any
+Architecture: ${DISTRO_ARCH}
Depends: ${KERNEL_DEBIAN_DEPENDS}
Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
This package contains the Linux kernel, modules and corresponding other
@@ -16,7 +16,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
Package: linux-headers-${KERNEL_NAME_PROVIDED}
Build-Profiles: <pkg.${BPN}.kernel>
-Architecture: any
+Architecture: ${DISTRO_ARCH}
Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlibs:Depends}
Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
This package provides kernel header files for @KR@ on ${DISTRO_ARCH}
@@ -47,14 +47,14 @@ Description: Linux Kernel Headers for development (for cross-compiling)
Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
Build-Profiles: <pkg.${BPN}.kernel>
Section: debug
-Architecture: any
+Architecture: ${DISTRO_ARCH}
Description: Linux kernel debugging symbols for @KR@
This package will come in handy if you need to debug the kernel. It provides
all the necessary debug symbols for the kernel and its modules.
Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
Build-Profiles: <pkg.${BPN}.kbuild !pkg.${BPN}.cross>
-Architecture: any
+Architecture: ${DISTRO_ARCH}
Depends: ${perl:Depends}, ${shlibs:Depends}
Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
This package provides kernel kbuild scripts and tools for @KR@
@@ -62,7 +62,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross
Build-Profiles: <pkg.${BPN}.kbuild pkg.${BPN}.cross>
-Architecture: any
+Architecture: ${BUILD_ARCH}
Multi-Arch: foreign
Depends: ${perl:Depends}, ${shlibs:Depends}
Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
--
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/20260817113420.750731-4-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 3/5] kernel: make source package architecture specific
2026-08-17 11:34 ` [PATCH v2 3/5] kernel: make source package architecture specific 'Felix Moessbauer' via isar-users
@ 2026-08-18 6:23 ` 'Jan Kiszka' via isar-users
2026-08-20 7:45 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 1 reply; 12+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-08-18 6:23 UTC (permalink / raw)
To: Felix Moessbauer, isar-users
On 17.08.26 13:34, Felix Moessbauer wrote:
> Currently we mark our kernel source packages as Arch=any all, despite
> the content of the package is architecture specific. Here, we make the
You are still stating something imprecise here, and that should be
fixed: The package is not only architecture specific. It is depending an
a number of variables and files that do have arch dependencies but can
also have more. Please clarify this so that people don't get confused.
> package architecture specific by avoiding any Arch=any identifier in the
> control file. This results in having Architecture: ${DISTRO_ARCH} all in
> the generated .dsc file. The same applies to the custom kernel modules.
>
> A special case is the "linux-kbuild-${KERNEL_NAME_PROVIDED}-
> ${DISTRO_ARCH}-cross" package, which is specific to the BUILD_ARCH, as
> it contains host tooling binaries for the host, which are derived from
> the target specific kernel.
>
> Ensuring that we do not generate multiple kernel packages with different
> content but the same name (for multiple architectures) will be done in
> later commits.
...or different machine configs or even image variants (e.g. debug vs.
production config). It is risky to suggest that just making a kernel
arch-specific would be enough for all scenarios.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta/classes-recipe/linux-kernel.bbclass | 3 ++-
> .../linux-module/files/debian/control.tmpl | 2 +-
> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++-----
> 3 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/meta/classes-recipe/linux-kernel.bbclass b/meta/classes-recipe/linux-kernel.bbclass
> index ac587b17..74a49aa8 100644
> --- a/meta/classes-recipe/linux-kernel.bbclass
> +++ b/meta/classes-recipe/linux-kernel.bbclass
> @@ -78,6 +78,7 @@ TEMPLATE_FILES += " \
>
> TEMPLATE_VARS += " \
> BPN \
> + BUILD_ARCH \
> KBUILD_DEPENDS \
> KERNEL_ARCH \
> KERNEL_DEBIAN_DEPENDS \
> @@ -274,7 +275,7 @@ def get_additional_build_profiles(d):
> profiles += ' pkg.{}.libcdev-arch-all'.format(d.getVar('BPN'))
> return profiles
>
> -KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', 'any', d) }"
> +KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', d.getVar('DISTRO_ARCH'), d) }"
> DEB_BUILD_PROFILES += "${@get_additional_build_profiles(d)}"
>
> do_prepare_build[cleandirs] += "${S}/debian"
> diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> index d8f4aded..3c222979 100644
> --- a/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> @@ -7,6 +7,6 @@ Maintainer: ${MAINTAINER}
> Rules-Requires-Root: no
>
> Package: ${PN}
> -Architecture: any
> +Architecture: ${DISTRO_ARCH}
> Depends: ${KERNEL_IMAGE_PKG}, kmod
> Description: ${DESCRIPTION}
> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
> index 77c4048b..f89a1f56 100644
> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> @@ -8,7 +8,7 @@ Rules-Requires-Root: no
>
> Package: linux-image-${KERNEL_NAME_PROVIDED}
> Build-Profiles: <pkg.${BPN}.kernel>
> -Architecture: any
> +Architecture: ${DISTRO_ARCH}
> Depends: ${KERNEL_DEBIAN_DEPENDS}
> Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
> This package contains the Linux kernel, modules and corresponding other
> @@ -16,7 +16,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
>
> Package: linux-headers-${KERNEL_NAME_PROVIDED}
> Build-Profiles: <pkg.${BPN}.kernel>
> -Architecture: any
> +Architecture: ${DISTRO_ARCH}
Interestingly, Debian does not seem to set an architecture for
linux-headers*. What is the value then, all or any?
> Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlibs:Depends}
> Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
> This package provides kernel header files for @KR@ on ${DISTRO_ARCH}
> @@ -47,14 +47,14 @@ Description: Linux Kernel Headers for development (for cross-compiling)
> Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
> Build-Profiles: <pkg.${BPN}.kernel>
> Section: debug
> -Architecture: any
> +Architecture: ${DISTRO_ARCH}
> Description: Linux kernel debugging symbols for @KR@
> This package will come in handy if you need to debug the kernel. It provides
> all the necessary debug symbols for the kernel and its modules.
>
> Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
> Build-Profiles: <pkg.${BPN}.kbuild !pkg.${BPN}.cross>
> -Architecture: any
> +Architecture: ${DISTRO_ARCH}
> Depends: ${perl:Depends}, ${shlibs:Depends}
> Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
> This package provides kernel kbuild scripts and tools for @KR@
> @@ -62,7 +62,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
>
> Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross
> Build-Profiles: <pkg.${BPN}.kbuild pkg.${BPN}.cross>
> -Architecture: any
> +Architecture: ${BUILD_ARCH}
> Multi-Arch: foreign
> Depends: ${perl:Depends}, ${shlibs:Depends}
> Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
And for linux-kbuild, it uses the architecture "linux-any" - what's that?
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/34136d7c-dbda-4c3e-8dfd-faca4d42d273%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 3/5] kernel: make source package architecture specific
2026-08-18 6:23 ` 'Jan Kiszka' via isar-users
@ 2026-08-20 7:45 ` 'MOESSBAUER, Felix' via isar-users
2026-08-20 8:13 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 12+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2026-08-20 7:45 UTC (permalink / raw)
To: Kiszka, Jan, isar-users
On Tue, 2026-08-18 at 08:23 +0200, Jan Kiszka wrote:
> On 17.08.26 13:34, Felix Moessbauer wrote:
> > Currently we mark our kernel source packages as Arch=any all, despite
> > the content of the package is architecture specific. Here, we make the
>
> You are still stating something imprecise here, and that should be
> fixed: The package is not only architecture specific. It is depending an
> a number of variables and files that do have arch dependencies but can
> also have more. Please clarify this so that people don't get confused.
Will do in the v3
>
> > package architecture specific by avoiding any Arch=any identifier in the
> > control file. This results in having Architecture: ${DISTRO_ARCH} all in
> > the generated .dsc file. The same applies to the custom kernel modules.
> >
> > A special case is the "linux-kbuild-${KERNEL_NAME_PROVIDED}-
> > ${DISTRO_ARCH}-cross" package, which is specific to the BUILD_ARCH, as
> > it contains host tooling binaries for the host, which are derived from
> > the target specific kernel.
> >
> > Ensuring that we do not generate multiple kernel packages with different
> > content but the same name (for multiple architectures) will be done in
> > later commits.
>
> ...or different machine configs or even image variants (e.g. debug vs.
> production config). It is risky to suggest that just making a kernel
> arch-specific would be enough for all scenarios.
yes
>
> >
> > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > ---
> > meta/classes-recipe/linux-kernel.bbclass | 3 ++-
> > .../linux-module/files/debian/control.tmpl | 2 +-
> > meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++-----
> > 3 files changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/meta/classes-recipe/linux-kernel.bbclass b/meta/classes-recipe/linux-kernel.bbclass
> > index ac587b17..74a49aa8 100644
> > --- a/meta/classes-recipe/linux-kernel.bbclass
> > +++ b/meta/classes-recipe/linux-kernel.bbclass
> > @@ -78,6 +78,7 @@ TEMPLATE_FILES += " \
> >
> > TEMPLATE_VARS += " \
> > BPN \
> > + BUILD_ARCH \
> > KBUILD_DEPENDS \
> > KERNEL_ARCH \
> > KERNEL_DEBIAN_DEPENDS \
> > @@ -274,7 +275,7 @@ def get_additional_build_profiles(d):
> > profiles += ' pkg.{}.libcdev-arch-all'.format(d.getVar('BPN'))
> > return profiles
> >
> > -KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', 'any', d) }"
> > +KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', d.getVar('DISTRO_ARCH'), d) }"
> > DEB_BUILD_PROFILES += "${@get_additional_build_profiles(d)}"
> >
> > do_prepare_build[cleandirs] += "${S}/debian"
> > diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> > index d8f4aded..3c222979 100644
> > --- a/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> > +++ b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> > @@ -7,6 +7,6 @@ Maintainer: ${MAINTAINER}
> > Rules-Requires-Root: no
> >
> > Package: ${PN}
> > -Architecture: any
> > +Architecture: ${DISTRO_ARCH}
> > Depends: ${KERNEL_IMAGE_PKG}, kmod
> > Description: ${DESCRIPTION}
> > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
> > index 77c4048b..f89a1f56 100644
> > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> > @@ -8,7 +8,7 @@ Rules-Requires-Root: no
> >
> > Package: linux-image-${KERNEL_NAME_PROVIDED}
> > Build-Profiles: <pkg.${BPN}.kernel>
> > -Architecture: any
> > +Architecture: ${DISTRO_ARCH}
> > Depends: ${KERNEL_DEBIAN_DEPENDS}
> > Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
> > This package contains the Linux kernel, modules and corresponding other
> > @@ -16,7 +16,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
> >
> > Package: linux-headers-${KERNEL_NAME_PROVIDED}
> > Build-Profiles: <pkg.${BPN}.kernel>
> > -Architecture: any
> > +Architecture: ${DISTRO_ARCH}
>
> Interestingly, Debian does not seem to set an architecture for
> linux-headers*. What is the value then, all or any?
They do. The linux-headers-<version>-<arch> packages are architecture
specific, the linux-headers-<version>-common are arch=all.
In isar we don't split this package.
>
> > Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlibs:Depends}
> > Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
> > This package provides kernel header files for @KR@ on ${DISTRO_ARCH}
> > @@ -47,14 +47,14 @@ Description: Linux Kernel Headers for development (for cross-compiling)
> > Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
> > Build-Profiles: <pkg.${BPN}.kernel>
> > Section: debug
> > -Architecture: any
> > +Architecture: ${DISTRO_ARCH}
> > Description: Linux kernel debugging symbols for @KR@
> > This package will come in handy if you need to debug the kernel. It provides
> > all the necessary debug symbols for the kernel and its modules.
> >
> > Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
> > Build-Profiles: <pkg.${BPN}.kbuild !pkg.${BPN}.cross>
> > -Architecture: any
> > +Architecture: ${DISTRO_ARCH}
> > Depends: ${perl:Depends}, ${shlibs:Depends}
> > Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
> > This package provides kernel kbuild scripts and tools for @KR@
> > @@ -62,7 +62,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
> >
> > Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross
> > Build-Profiles: <pkg.${BPN}.kbuild pkg.${BPN}.cross>
> > -Architecture: any
> > +Architecture: ${BUILD_ARCH}
> > Multi-Arch: foreign
> > Depends: ${perl:Depends}, ${shlibs:Depends}
> > Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
>
> And for linux-kbuild, it uses the architecture "linux-any" - what's that?
That's the wildcard for any architecture that uses Linux (in contrast
to any, which would also match gnu-hurd / hurd-i386). As we are Linux
only anyways, this should not matter for us.
Felix
>
> Jan
>
> --
> Siemens AG, Foundational Technologies
> Linux Expert Center
--
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/0cd7141bb189d0b40496e472c51f32eae638497d.camel%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 3/5] kernel: make source package architecture specific
2026-08-20 7:45 ` 'MOESSBAUER, Felix' via isar-users
@ 2026-08-20 8:13 ` 'Jan Kiszka' via isar-users
2026-08-20 8:29 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 1 reply; 12+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-08-20 8:13 UTC (permalink / raw)
To: Moessbauer, Felix (FT RPD CED OES-DE), isar-users
On 20.08.26 09:45, Moessbauer, Felix (FT RPD CED OES-DE) wrote:
> On Tue, 2026-08-18 at 08:23 +0200, Jan Kiszka wrote:
>> On 17.08.26 13:34, Felix Moessbauer wrote:>>> @@ -62,7 +62,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kbuild
scripts and tools for @KR@
>>>
>>> Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross
>>> Build-Profiles: <pkg.${BPN}.kbuild pkg.${BPN}.cross>
>>> -Architecture: any
>>> +Architecture: ${BUILD_ARCH}
>>> Multi-Arch: foreign
>>> Depends: ${perl:Depends}, ${shlibs:Depends}
>>> Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
>>
>> And for linux-kbuild, it uses the architecture "linux-any" - what's that?
>
> That's the wildcard for any architecture that uses Linux (in contrast
> to any, which would also match gnu-hurd / hurd-i386). As we are Linux
> only anyways, this should not matter for us.
>
In other words, Debian uses "any" here.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/919b3679-f906-4970-8e25-ca2a4d4dcba3%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 3/5] kernel: make source package architecture specific
2026-08-20 8:13 ` 'Jan Kiszka' via isar-users
@ 2026-08-20 8:29 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 0 replies; 12+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2026-08-20 8:29 UTC (permalink / raw)
To: Kiszka, Jan, isar-users
On Thu, 2026-08-20 at 10:13 +0200, Jan Kiszka wrote:
> On 20.08.26 09:45, Moessbauer, Felix (FT RPD CED OES-DE) wrote:
> > On Tue, 2026-08-18 at 08:23 +0200, Jan Kiszka wrote:
> > > On 17.08.26 13:34, Felix Moessbauer wrote:>>> @@ -62,7 +62,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kbuild
> scripts and tools for @KR@
> > > >
> > > > Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross
> > > > Build-Profiles: <pkg.${BPN}.kbuild pkg.${BPN}.cross>
> > > > -Architecture: any
> > > > +Architecture: ${BUILD_ARCH}
> > > > Multi-Arch: foreign
> > > > Depends: ${perl:Depends}, ${shlibs:Depends}
> > > > Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
> > >
> > > And for linux-kbuild, it uses the architecture "linux-any" - what's that?
> >
> > That's the wildcard for any architecture that uses Linux (in contrast
> > to any, which would also match gnu-hurd / hurd-i386). As we are Linux
> > only anyways, this should not matter for us.
> >
> In other words, Debian uses "any" here.
Well... Yes, but this in the end is identical to build arch, as long as
the generated source package is not shared across build hosts.
But good point. We probably want to drop this patch, as I was looking
at the linux-signed-<arch> packages which are indeed architecture
specific. But the generic linux package is not (and the linux-kbuild is
part of the "linux" package, while the kernels and headers are part of
the "linux-signed-<arch>" package). As we don't do this split IMHO both
variants are fine, but dropping this patch is simpler.
Felix
>
> Jan
>
> --
> Siemens AG, Foundational Technologies
> Linux Expert Center
--
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/a24be3447d5560e7eb7f80b1a2b312b5ec254f7d.camel%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 4/5] kernel: move common parts of linux-mainline to inc
2026-08-17 11:34 [PATCH v2 0/5] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
` (2 preceding siblings ...)
2026-08-17 11:34 ` [PATCH v2 3/5] kernel: make source package architecture specific 'Felix Moessbauer' via isar-users
@ 2026-08-17 11:34 ` 'Felix Moessbauer' via isar-users
2026-08-17 11:34 ` [PATCH v2 5/5] kernel: use architecture specific names for kernels 'Felix Moessbauer' via isar-users
4 siblings, 0 replies; 12+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-17 11:34 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, 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.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
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.85.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
index 786a9db8..11b90127 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.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] = "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
diff --git a/meta-isar/recipes-kernel/linux/linux-phy_6.12.85.bb b/meta-isar/recipes-kernel/linux/linux-phy_6.12.85.bb
index a61befe2..33265f6b 100644
--- a/meta-isar/recipes-kernel/linux/linux-phy_6.12.85.bb
+++ b/meta-isar/recipes-kernel/linux/linux-phy_6.12.85.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/20260817113420.750731-5-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v2 5/5] kernel: use architecture specific names for kernels
2026-08-17 11:34 [PATCH v2 0/5] Fix single-name single-content rule for kernel packages 'Felix Moessbauer' via isar-users
` (3 preceding siblings ...)
2026-08-17 11:34 ` [PATCH v2 4/5] kernel: move common parts of linux-mainline to inc 'Felix Moessbauer' via isar-users
@ 2026-08-17 11:34 ` 'Felix Moessbauer' via isar-users
2026-08-18 6:26 ` 'Jan Kiszka' via isar-users
4 siblings, 1 reply; 12+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-08-17 11:34 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, Felix Moessbauer
The kernel source packages are architecture specific. By that, we also
have to encode the architecture in the KERNEL_NAME, if that is not
already implicitly the case (e.g. when building a kernel for a specific
machine).
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 | 3 +++
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.85.bb | 2 ++
testsuite/citest.py | 2 +-
11 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 2db05169..15b47cce 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -1175,6 +1175,9 @@ 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.
+
### 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 dcc3f560..cb47c157 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -628,11 +628,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 e2775c8d..bb196b5a 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.85.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
index 11b90127..13c694b0 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.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 f5d54904..c2ac144a 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/20260817113420.750731-6-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 5/5] kernel: use architecture specific names for kernels
2026-08-17 11:34 ` [PATCH v2 5/5] kernel: use architecture specific names for kernels 'Felix Moessbauer' via isar-users
@ 2026-08-18 6:26 ` 'Jan Kiszka' via isar-users
0 siblings, 0 replies; 12+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-08-18 6:26 UTC (permalink / raw)
To: Felix Moessbauer, isar-users
On 17.08.26 13:34, Felix Moessbauer wrote:
> The kernel source packages are architecture specific. By that, we also
> have to encode the architecture in the KERNEL_NAME, if that is not
> already implicitly the case (e.g. when building a kernel for a specific
> machine).
Same feedback as on patch 3.
>
> 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 | 3 +++
> 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.85.bb | 2 ++
> testsuite/citest.py | 2 +-
> 11 files changed, 26 insertions(+), 8 deletions(-)
>
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index 2db05169..15b47cce 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -1175,6 +1175,9 @@ 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.
> +
Here, you actually exand on the specifics. Maybe add that operation mode
(debug vs. production config) as another variation example so that
people realize what they are doing when customizing the kernel recipes.
Can be more than two sentences if needed.
Jan
> ### 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 dcc3f560..cb47c157 100644
> --- a/doc/user_manual.md
> +++ b/doc/user_manual.md
> @@ -628,11 +628,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 e2775c8d..bb196b5a 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.85.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
> index 11b90127..13c694b0 100644
> --- a/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.bb
> +++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.12.85.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 f5d54904..c2ac144a 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}')
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/6400d112-4637-4bc2-8948-43c18c90d7ec%40siemens.com.
^ permalink raw reply [flat|nested] 12+ messages in thread