From: "'MOESSBAUER, Felix' via isar-users" <isar-users@googlegroups.com>
To: "Kiszka, Jan" <jan.kiszka@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 3/5] kernel: make source package architecture specific
Date: Thu, 20 Aug 2026 07:45:32 +0000 [thread overview]
Message-ID: <0cd7141bb189d0b40496e472c51f32eae638497d.camel@siemens.com> (raw)
In-Reply-To: <34136d7c-dbda-4c3e-8dfd-faca4d42d273@siemens.com>
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.
next prev parent reply other threads:[~2026-08-20 7:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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-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
2026-08-18 6:23 ` 'Jan Kiszka' via isar-users
2026-08-20 7:45 ` 'MOESSBAUER, Felix' via isar-users [this message]
2026-08-20 8:13 ` 'Jan Kiszka' via isar-users
2026-08-20 8:29 ` 'MOESSBAUER, Felix' 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
2026-08-18 6:26 ` 'Jan Kiszka' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0cd7141bb189d0b40496e472c51f32eae638497d.camel@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox