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