public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH v2 5/5] kernel: use architecture specific names for kernels
Date: Tue, 18 Aug 2026 08:26:58 +0200	[thread overview]
Message-ID: <6400d112-4637-4bc2-8948-43c18c90d7ec@siemens.com> (raw)
In-Reply-To: <20260817113420.750731-6-felix.moessbauer@siemens.com>

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.

      reply	other threads:[~2026-08-18  6:27 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
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 [this message]

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=6400d112-4637-4bc2-8948-43c18c90d7ec@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