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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#243336): 
https://lists.openembedded.org/g/openembedded-core/message/243336
Mute This Topic: https://lists.openembedded.org/mt/120717114/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to