Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Anis Bougrine <anis.bougrine10@gmail.com>,
	 openembedded-core@lists.openembedded.org
Cc: antonin.godard@bootlin.com, bruce.ashfield@gmail.com,
	 jose.quaresma@oss.qualcomm.com
Subject: Re: [OE-core][PATCH v4 3/4] kernel: centralize kernel module installation path in one variable
Date: Mon, 24 Aug 2026 19:57:37 +0100	[thread overview]
Message-ID: <7a5b45d7162c3c6ddaa263355b5654330bdd00bd.camel@linuxfoundation.org> (raw)
In-Reply-To: <20260822002601.90667-4-anis.bougrine10@gmail.com>

On Sat, 2026-08-22 at 02:26 +0200, Anis Bougrine wrote:
> The kernel module installation path is currently defined in multiple
> places, although it is used 10 times throughout the code. This
> increases the risk of bugs due to inconsistencies or desynchronization.
> 
> Centralizing the path in a single variable makes the code more
> reliable and easier to maintain.
> 
> Signed-off-by: Anis Bougrine <anis.bougrine10@gmail.com>
> ---
>     changes in v4:
>     
>     - Re-sign kernel modules after package stripping process
>     - Remove package-stripping skip in package.py
>     - Add MOD_INSTALL_PREFIX variable
>     
>     changes in v3:
>     
>     - Fixing rebase issue.
>     
>     changes in v2:
>     
>     - Use the conditional INSTALL_MOD_STRIP environment variable to avoid
>       duplicating the oe_runmake call.
>     - Use `scripts/config` script instead of grepping .config file.
> ---
>  meta/classes-recipe/kernel-module-split.bbclass |  4 +++-
>  meta/classes-recipe/kernel.bbclass              | 13 +++++++------
>  2 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass
> index 253a723b95..061522fc22 100644
> --- a/meta/classes-recipe/kernel-module-split.bbclass
> +++ b/meta/classes-recipe/kernel-module-split.bbclass
> @@ -48,6 +48,8 @@ KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}"
>  KERNEL_MODULE_PROVIDE_VIRTUAL ?= "1"
>  
>  # Sign kernel modules if auto-signing is enabled in the kernel config
> +# MOD_INSTALL_PREFIX must be the same at installation and signing time.
> +MOD_INSTALL_PREFIX ?= "${nonarch_base_libdir}/modules/${KERNEL_VERSION}"
>  post_strip_kernel_modules_signing(){
>      # Read .config values
>      is_modules="$(${S}/scripts/config --file ${B}/.config --state MODULES)"

Rather than setting that in two places, you could set it once in
kernel-arch.bbclass. I did a bit of work to try and allow common things
to go in one place...

This series looks like a much better solution to the signing issue btw,
thanks!

Cheers,

Richard


  reply	other threads:[~2026-08-24 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22  0:25 [OE-core][PATCH v4 0/4] Make signed kernel modules stripped Anis Bougrine
2026-08-22  0:25 ` [OE-core][PATCH v4 1/4] kernel.bbclass: re-sign kernel modules after package stripping process Anis Bougrine
2026-08-22  0:25 ` [OE-core][PATCH v4 2/4] package.py: remove stripping and splitting skip for signed kernel modules Anis Bougrine
2026-08-22  0:26 ` [OE-core][PATCH v4 3/4] kernel: centralize kernel module installation path in one variable Anis Bougrine
2026-08-24 18:57   ` Richard Purdie [this message]
2026-08-22  0:26 ` [OE-core][PATCH v4 4/4] documentation.conf: add documentation for MOD_INSTALL_PREFIX variable Anis Bougrine
2026-08-22 16:12 ` [OE-core][PATCH v4 0/4] Make signed kernel modules stripped Mathieu Dubois-Briand
2026-08-24  0:03   ` Bougrine Anis
2026-08-25 18:33 ` Peter Kjellerstedt

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=7a5b45d7162c3c6ddaa263355b5654330bdd00bd.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=anis.bougrine10@gmail.com \
    --cc=antonin.godard@bootlin.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=jose.quaresma@oss.qualcomm.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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