From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Bougrine Anis" <anis.bougrine10@gmail.com>
Cc: <openembedded-core@lists.openembedded.org>, <ross.burton@arm.com>
Subject: Re: [OE-core] [PATCH] kernel.bbclass: add strip process for signed kernel modules
Date: Thu, 13 Aug 2026 09:21:00 +0200 [thread overview]
Message-ID: <DKNMULYY5WRL.1AGY4AN1ETRUY@bootlin.com> (raw)
In-Reply-To: <CAGgtUzaO1g+CXpoOi-aUgYNYF-8SGOVvWNWnJvOXFsLjCjVYmQ@mail.gmail.com>
Hi,
On Wed Aug 12, 2026 at 5:46 PM CEST, Bougrine Anis wrote:
> Hi Antonin,
>
> I took your suggestion into account. A v2 patch may look like this:
>
> if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> # If the module will be auto-signed, perform stripping before
> signing.
> if [ "$(./source/scripts/config --file ./.config --state
> MODULE_SIG)" = y ] &&
> [ "$(./source/scripts/config --file ./.config --state
> MODULE_SIG_ALL)" = y ]; then
> export INSTALL_MOD_STRIP="--strip-debug
> --remove-section=.comment --remove-section=.note --preserve-dates"
> fi
> oe_runmake DEPMOD=echo
> MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}
> INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
> fi
>
> However, I think grepping the .config file is more reliable, since its
> location inside ${WORKDIR} is more stable than the location of the config
> script.
Can you use the script directly from the source using S?
${S}/scripts/config --file ./.config --state ...
Also, if you know the config file is always going to be in your current working
directory, then you can do:
${S}/scripts/config --state ...
Since the default value for --file is "./.config".
So your conditions would look like:
if [ "$(${S}/scripts/config --state MODULE_SIG)" = "y" ] && [ "$(${S}/scripts/config --state MODULE_SIG_ALL)" = "y" ]; then
(not tested)
Antonin
prev parent reply other threads:[~2026-08-13 7:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 13:06 [OE-core] [PATCH] kernel.bbclass: add strip process for signed kernel modules Anis Bougrine
2026-08-12 13:26 ` Bruce Ashfield
2026-08-12 15:40 ` Bougrine Anis
2026-08-12 13:50 ` Antonin Godard
2026-08-12 15:46 ` Bougrine Anis
2026-08-13 7:21 ` Antonin Godard [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=DKNMULYY5WRL.1AGY4AN1ETRUY@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=anis.bougrine10@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@arm.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