module.bbclass: check whether CONFIG_MODULES set
PATCH 1/1 module.bbclass: check whether CONFIG_MODULES set
From: Kai Kang <[email protected]>
Check whether kernel config CONFIG_MODULES set or not before do_compile and do_install in module.bbclass. If not set, it cannot build and install external modules.
--- meta/classes-recipe/module.bbclass | 60 +++++++++++++++++------------- 1 file changed, 34 insertions(+), 26 deletions(-)
meta/classes-recipe/module.bbclass +34 -26
@@ -47,37 +47,45 @@ python do_devshell:prepend () { } module_do_compile() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ - KERNEL_VERSION=${KERNEL_VERSION} \ - CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ - AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \ - STRIP="${KERNEL_STRIP}" \ - O=${STAGING_KERNEL_BUILDDIR} \ - KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ - ${MAKE_TARGETS} + if grep -q -i '^CONFIG_MODULES=y$' ${STAGING_KERNEL_BUILDDIR}/.config ; then + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ + KERNEL_VERSION=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \ + STRIP="${KERNEL_STRIP}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ + ${MAKE_TARGETS} + else + bbnote "The present kernel disabled CONFIG_MODULES that cannot build or install external modules." + fi } module_do_install() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ - INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ - CC="${KERNEL_CC}" LD="${KERNEL_LD}" OBJCOPY="${KERNEL_OBJCOPY}" \ - STRIP="${KERNEL_STRIP}" \ - O=${STAGING_KERNEL_BUILDDIR} \ - KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ - ${MODULES_INSTALL_TARGET} + if grep -q -i '^CONFIG_MODULES=y$' ${STAGING_KERNEL_BUILDDIR}/.config; then + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ + INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" OBJCOPY="${KERNEL_OBJCOPY}" \ + STRIP="${KERNEL_STRIP}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ + ${MODULES_INSTALL_TARGET} - if [ ! -e "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then - bbwarn "Module.symvers not found in ${B}/${MODULES_MODULE_SYMVERS_LOCATION}" - bbwarn "Please consider setting MODULES_MODULE_SYMVERS_LOCATION to a" - bbwarn "directory below B to get correct inter-module dependencies" + if [ ! -e "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then + bbwarn "Module.symvers not found in ${B}/${MODULES_MODULE_SYMVERS_LOCATION}" + bbwarn "Please consider setting MODULES_MODULE_SYMVERS_LOCATION to a" + bbwarn "directory below B to get correct inter-module dependencies" + else + install -Dm0644 "${B}/${MODULES_MODULE_SYMVERS_LOCATION}"/Module.symvers ${D}${includedir}/${BPN}/Module.symvers + # Module.symvers contains absolute path to the build directory. + # While it doesn't actually seem to matter which path is specified, + # clear them out to avoid confusion + sed -e 's:${B}/::g' -i ${D}${includedir}/${BPN}/Module.symvers + fi else - install -Dm0644 "${B}/${MODULES_MODULE_SYMVERS_LOCATION}"/Module.symvers ${D}${includedir}/${BPN}/Module.symvers - # Module.symvers contains absolute path to the build directory. - # While it doesn't actually seem to matter which path is specified, - # clear them out to avoid confusion - sed -e 's:${B}/::g' -i ${D}${includedir}/${BPN}/Module.symvers + bbnote "The present kernel disabled CONFIG_MODULES that cannot build or install external modules." fi }
Signature · 1 line
2.34.1
Quoted 6 lines · Kai Kang via lists.openembedded.org
From: Kai Kang <[email protected]>
Check whether kernel config
CONFIG_MODULESset or not beforedo_compileanddo_installin module.bbclass. If not set, it cannot build and install external modules.
This isn't the place to do that check.
If modules are disabled get modules_do_compile out of the tasks.
Bruce
Quoted 125 lines
Signed-off-by Kai Kang <[email protected]>--- meta/classes-recipe/module.bbclass | 60 +++++++++++++++++------------- 1 file changed, 34 insertions(+), 26 deletions(-)meta/classes-recipe/module.bbclass +1
-9@@ -47,37 +47,45 @@ python do_devshell:prepend () { } module_do_compile() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ - KERNEL_VERSION=${KERNEL_VERSION} \ - CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ - AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \ - STRIP="${KERNEL_STRIP}" \ - O=${STAGING_KERNEL_BUILDDIR} \ - KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ - ${MAKE_TARGETS} + if grep -q -i '^CONFIG_MODULES=y$'${STAGING_KERNEL_BUILDDIR}/.config ; then
meta/classes-recipe/module.bbclass +11
-0+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ + KERNEL_VERSION=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \ + STRIP="${KERNEL_STRIP}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ + ${MAKE_TARGETS} + else + bbnote "The present kernel disabled CONFIG_MODULES thatcannot build or install external modules."
meta/classes-recipe/module.bbclass +1
-2+ fi } module_do_install() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - oe_runmake DEPMOD=echoMODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \
meta/classes-recipe/module.bbclass +0
-2- INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ - CC="${KERNEL_CC}" LD="${KERNEL_LD}"OBJCOPY="${KERNEL_OBJCOPY}" \
meta/classes-recipe/module.bbclass +1
-4- STRIP="${KERNEL_STRIP}" \ - O=${STAGING_KERNEL_BUILDDIR} \ - KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ - ${MODULES_INSTALL_TARGET} + if grep -q -i '^CONFIG_MODULES=y$'${STAGING_KERNEL_BUILDDIR}/.config; then
meta/classes-recipe/module.bbclass +2
-0+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echoMODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \
meta/classes-recipe/module.bbclass +2
-0+ INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}"OBJCOPY="${KERNEL_OBJCOPY}" \
meta/classes-recipe/module.bbclass +4
-1+ STRIP="${KERNEL_STRIP}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ + ${MODULES_INSTALL_TARGET} - if [ ! -e "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers"] ; then
- bbwarn "Module.symvers not found in
${B}/${MODULES_MODULE_SYMVERS_LOCATION}"
- bbwarn "Please consider settingMODULES_MODULE_SYMVERS_LOCATIONto a"
- bbwarn "directory below B to get correct inter-module
dependencies"
+ if [ ! -e
"${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then
+ bbwarn "Module.symvers not found in
${B}/${MODULES_MODULE_SYMVERS_LOCATION}"
+ bbwarn "Please consider settingMODULES_MODULE_SYMVERS_LOCATIONto a"
+ bbwarn "directory below B to get correct
inter-module dependencies"meta/classes-recipe/module.bbclass +2
-0+ else + install -Dm0644"${B}/${MODULES_MODULE_SYMVERS_LOCATION}"/Module.symvers ${D}${includedir}/${BPN}/Module.symvers
+ # Module.symvers contains absolute path to the
build directory.
+ # While it doesn't actually seem to matter which
path is specified,meta/classes-recipe/module.bbclass +2
-0+ # clear them out to avoid confusion + sed -e 's:${B}/::g' -i${D}${includedir}/${BPN}/Module.symvers
meta/classes-recipe/module.bbclass +1
-1+ fi else - install -Dm0644"${B}/${MODULES_MODULE_SYMVERS_LOCATION}"/Module.symvers ${D}${includedir}/${BPN}/Module.symvers
- # Module.symvers contains absolute path to the build
directory.
- # While it doesn't actually seem to matter which path is
specified,meta/classes-recipe/module.bbclass +0
-2- # clear them out to avoid confusion - sed -e 's:${B}/::g' -i${D}${includedir}/${BPN}/Module.symvers
+ bbnote "The present kernel disabledCONFIG_MODULESthat
cannot build or install external modules."
fi
}--
2.34.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#230492):
https://lists.openembedded.org/g/openembedded-core/message/230492
Mute This Topic: https://lists.openembedded.org/mt/117627823/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 11 lines · Bruce Ashfield via lists.openembedded.org
Quoted 6 lines · Kai Kang via lists.openembedded.org
From: Kai Kang <[email protected]>
Check whether kernel config
CONFIG_MODULESset or not beforedo_compileanddo_installin module.bbclass. If not set, it cannot build and install external modules.
Quoted 3 lines
This isn't the place to do that check.
If modules are disabled get
modules_do_compileout of the tasks.
Does it make sense to have something including module.bbclass which doesn't have CONFIG_MODULES set?
Cheers,
Richard
Quoted 14 lines · Richard Purdie
Quoted 3 lines · Bruce Ashfield via lists.openembedded.org
On Tue, Feb 3, 2026 at 9:09 PM Kai Kang via lists.openembedded.org
Quoted 8 lines · <[email protected]> wrote:
Quoted 6 lines
From: Kai Kang <[email protected]>
Check whether kernel config
CONFIG_MODULESset or not beforedo_compileanddo_installin module.bbclass. If not set, it cannot build and install external modules.
Quoted 7 lines
Quoted 3 lines
This isn't the place to do that check.
If modules are disabled get
modules_do_compileout of the tasks.Does it make sense to have something including module.bbclass which doesn't have
CONFIG_MODULESset?
Yes, that's what I'm trying to say.
Don't even include it if you can't build modules. That puts the conditional in a single place, and keeps the code cleaner in the class.
Bruce
Quoted 5 lines
Cheers,
Richard
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 15 lines · Bruce Ashfield
Quoted 14 lines · Richard Purdie
Quoted 12 lines · Bruce Ashfield via lists.openembedded.org
Quoted 6 lines · Kai Kang via lists.openembedded.org
From: Kai Kang <[email protected]>
Check whether kernel config
CONFIG_MODULESset or not beforedo_compileanddo_installin module.bbclass. If not set, it cannot build and install external modules.This isn't the place to do that check.
If modules are disabled get
modules_do_compileout of the tasks.
Quoted 8 lines
Quoted 2 lines
Does it make sense to have something including module.bbclass which doesn't have
CONFIG_MODULESset?Yes, that's what I'm trying to say.
Don't even include it if you can't build modules. That puts the conditional in a single place, and keeps the code cleaner in the class.
I think we're talking cross purposes a bit.
The issue is that if you ever reach do_compile in something using module.bbclass which does not have CONFIG_MODULES set, that is a problem and a hard error.
So I'd argue that:
* we only need the check in do_compile
* it should be a fatal exit hard error, not a warning
which means the patch needs tweaking but not as you're suggesting.
I'm not sure skipping the tasks makes sense, I think what we're needing is a sanity check for a configuration which stops the build if it ever happens.
The rust check would then be similar. Stop and error if the configuration would never work/doesn't make sense.
Cheers,
Richard
Quoted 35 lines · Richard Purdie
Quoted 1 line · Bruce Ashfield
On Wed, Feb 4, 2026 at 8:58 AM Richard Purdie <
Quoted 1 line · [email protected]> wrote:
Quoted 1 line
On Wed, 2026-02-04 at 08:46 -0500, Bruce Ashfield via
Quoted 1 line · lists.openembedded.org
Quoted 1 line
Quoted 1 line
On Tue, Feb 3, 2026 at 9:09 PM Kai Kang via lists.openembedded.org
Quoted 3 lines · <[email protected]> wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
From: Kai Kang <[email protected]>
Check whether kernel config
CONFIG_MODULESset or not before
do_compileQuoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
and
do_installin module.bbclass. If not set, it cannot build and install external modules.This isn't the place to do that check.
If modules are disabled get
modules_do_compileout of the tasks.Quoted 8 lines
Quoted 2 lines
Does it make sense to have something including module.bbclass which doesn't have
CONFIG_MODULESset?Yes, that's what I'm trying to say.
Don't even include it if you can't build modules. That puts the conditional in a single place, and keeps the code cleaner in the class.
I think we're talking cross purposes a bit.
The issue is that if you ever reach
do_compilein something using module.bbclass which does not haveCONFIG_MODULESset, that is a problem and a hard error.
Quoted 8 lines
So I'd argue that:
* we only need the check in
do_compile
* it should be a fatal exit hard error, not a warningwhich means the patch needs tweaking but not as you're suggesting.
I don't have a strong opinion, so won't object.
I just don't think adding any conditionals for module support in moduldes.bbclass makes sense. So one versus two checks is a wash for me.
Bruce
Quoted 14 lines
I'm not sure skipping the tasks makes sense, I think what we're needing is a sanity check for a configuration which stops the build if it ever happens.
The rust check would then be similar. Stop and error if the configuration would never work/doesn't make sense.
Cheers,
Richard
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 53 lines · Bruce Ashfield
Quoted 39 lines · Richard Purdie
Quoted 26 lines · Bruce Ashfield
Quoted 15 lines · Richard Purdie
Quoted 13 lines · Bruce Ashfield via lists.openembedded.org
Quoted 8 lines · Kai Kang via lists.openembedded.org
From: Kai Kang <[email protected]>
Check whether kernel config
CONFIG_MODULESset or not beforedo_compile
anddo_installin module.bbclass. If not set, it cannot build and
install external modules.Quoted 8 lines
Quoted 4 lines
This isn't the place to do that check.
If modules are disabled get
modules_do_compileout of the tasks.Does it make sense to have something including module.bbclass which
doesn't haveCONFIG_MODULESset?Quoted 5 lines
Yes, that's what I'm trying to say.
Don't even include it if you can't build modules. That puts the conditional in a single place, and keeps the code cleaner in the class.
I think we're talking cross purposes a bit.
The issue is that if you ever reach
do_compilein something using module.bbclass which does not haveCONFIG_MODULESset, that is a problem and a hard error.Quoted 8 lines
So I'd argue that:
* we only need the check in
do_compile
* it should be a fatal exit hard error, not a warningwhich means the patch needs tweaking but not as you're suggesting.
Quoted 5 lines
I don't have a strong opinion, so won't object.
I just don't think adding any conditionals for module support in moduldes.bbclass makes sense. So one versus two checks is a wash for me.
I agree the warn conditional isn't quite right. I think it should be:
if [ CONFIG_MODULES not set in config ];
bberror Broken config, CONFIG_MODULES not set
exit 1
fi
so it is basically a sanity test that the config is valid.
I'm a bit worried about what I'm missing though :/
Cheers,
Richard
Quoted 55 lines · Richard Purdie
Quoted 47 lines · Bruce Ashfield
Quoted 35 lines · Richard Purdie
Quoted 20 lines · Bruce Ashfield
Quoted 18 lines · Richard Purdie
Quoted 16 lines · Bruce Ashfield via lists.openembedded.org
Quoted 8 lines · Kai Kang via lists.openembedded.org
From: Kai Kang<[email protected]>
Check whether kernel config
CONFIG_MODULESset or not beforedo_compile
anddo_installin module.bbclass. If not set, it cannot build and
install external modules.This isn't the place to do that check.
If modules are disabled get
modules_do_compileout of the tasks.Quoted 8 lines
Quoted 3 lines
Does it make sense to have something including module.bbclass which
doesn't haveCONFIG_MODULESset?Yes, that's what I'm trying to say.
Don't even include it if you can't build modules. That puts the conditional in a single place, and keeps the code cleaner in the class.
I think we're talking cross purposes a bit.
The issue is that if you ever reach
do_compilein something using module.bbclass which does not haveCONFIG_MODULESset, that is a problem and a hard error.Quoted 8 lines
So I'd argue that:
* we only need the check in
do_compile
* it should be a fatal exit hard error, not a warningwhich means the patch needs tweaking but not as you're suggesting.
Quoted 5 lines
I don't have a strong opinion, so won't object.
I just don't think adding any conditionals for module support in moduldes.bbclass makes sense. So one versus two checks is a wash for me.
I agree the warn conditional isn't quite right. I think it should be:
Quoted 8 lines
if [
CONFIG_MODULESnot set in config ];
bberror Broken config,CONFIG_MODULESnot set exit 1
fiso it is basically a sanity test that the config is valid.
I'm a bit worried about what I'm missing though :/
The original problem is kernel config_modules is disabled, then external modules such as lttng-modules can't be built.
Recipe lttng-tools RRECOMMENDS on lttng-modules. If install lttng-tools into image, it fails to build lttng-modules.
Kernel config CONFIG_MODULES couldn't be checked whether enabled or disabled after bitbake parse. Then there is no chance to remove lttng-module from the dependencies. That why I check the config during the do_compile and do_install with bbnote and generate empty rpm package.
Regards,
Kai
Quoted 7 lines
Cheers,
Richard
Signature · 2 lines
Kai Kang Wind River Linux
Quoted 73 lines · Kai
On 2/4/26 23:53, Richard Purdie wrote:
On Wed, 2026-02-04 at 09:10 -0500, Bruce Ashfield wrote:
On Wed, Feb 4, 2026 at 9:05 AM Richard Purdie<[email protected]> <[email protected]> wrote:
On Wed, 2026-02-04 at 09:02 -0500, Bruce Ashfield wrote:
On Wed, Feb 4, 2026 at 8:58 AM Richard Purdie<[email protected]> <[email protected]> wrote:
On Wed, 2026-02-04 at 08:46 -0500, Bruce Ashfield vialists.openembedded.org wrote:
On Tue, Feb 3, 2026 at 9:09 PM Kai Kang vialists.openembedded.org<[email protected]> <[email protected]> wrote:
From: Kai Kang <[email protected]> <[email protected]>
Check whether kernel config
CONFIG_MODULESset or not beforedo_compile
anddo_installin module.bbclass. If not set, it cannot build and
install external modules.This isn't the place to do that check.
If modules are disabled get
modules_do_compileout of the tasks.Does it make sense to have something including module.bbclass which
doesn't haveCONFIG_MODULESset?Yes, that's what I'm trying to say.
Don't even include it if you can't build modules. That puts the conditional in a single place, and keeps the code cleaner in the class.
I think we're talking cross purposes a bit.
The issue is that if you ever reach
do_compilein something using module.bbclass which does not haveCONFIG_MODULESset, that is a problem and a hard error.So I'd argue that:
* we only need the check in
do_compile
* it should be a fatal exit hard error, not a warningwhich means the patch needs tweaking but not as you're suggesting.
I don't have a strong opinion, so won't object.
I just don't think adding any conditionals for module support in moduldes.bbclass makes sense. So one versus two checks is a wash for me.
I agree the warn conditional isn't quite right. I think it should be:
if [
CONFIG_MODULESnot set in config ];
bberror Broken config,CONFIG_MODULESnot set
exit 1
fiso it is basically a sanity test that the config is valid.
I'm a bit worried about what I'm missing though :/
The original problem is kernel
config_modulesis disabled, then external modules such as lttng-modules can't be built.
Quoted 8 lines
Recipe lttng-tools RRECOMMENDS on lttng-modules. If install lttng-tools into image, it fails to build lttng-modules.
Kernel config
CONFIG_MODULEScouldn't be checked whether enabled or disabled after bitbake parse. Then there is no chance to remove lttng-module from the dependencies. That why I check the config during thedo_compileanddo_installwith bbnote and generate empty rpm package.
That's exactly why we had a patch to the lttng source code.
Someone updated that patch recently, so it has probably caused a regression.
Bruce
Quoted 16 lines
Regards,
KaiCheers,
Richard
--
Kai Kang
Wind River Linux
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 13 lines · Kai
On 2/4/26 23:53, Richard Purdie wrote:
I agree the warn conditional isn't quite right. I think it shouldQuoted 11 lines
be:
if [
CONFIG_MODULESnot set in config ];
bberror Broken config,CONFIG_MODULESnot set
exit 1
fiso it is basically a sanity test that the config is valid.
I'm a bit worried about what I'm missing though :/
Quoted 11 lines
The original problem is kernel
config_modulesis disabled, then external modules such as lttng-modules can't be built.
Recipe lttng-tools RRECOMMENDS on lttng-modules. If install lttng- tools into image, it fails to build lttng-modules.
Kernel config CONFIG_MODULES couldn't be checked whether enabled or disabled after bitbake parse. Then there is no
chance to remove lttng-module from the dependencies. That why I check the config during thedo_compileanddo_install
with bbnote and generate empty rpm package.
That is a bit different to the problem I thought this was addressing (I was coming from the rust patches angle).
In that case we probably need to have something like "kernel-modules" in KERNEL_FEATURES and we check in the lttng-tools recipes if kernel- modules are in KERNEL_FEATURES. The kernel itself can then error if the feature is selected but not configured and lttng-modules can fail to parse with an error if it isn't set?
lttng-tools is not useful without the module support.
Cheers,
Richard
Quoted 25 lines · Richard Purdie
Quoted 16 lines · Kai
On 2/4/26 23:53, Richard Purdie wrote:
I agree the warn conditional isn't quite right. I think it shouldQuoted 11 lines
be:
if [
CONFIG_MODULESnot set in config ];
bberror Broken config,CONFIG_MODULESnot set exit 1
fiso it is basically a sanity test that the config is valid.
I'm a bit worried about what I'm missing though :/
The original problem is kernel
config_modulesis disabled, then
external modules such as lttng-modules can't be built.Quoted 8 lines
Recipe lttng-tools RRECOMMENDS on lttng-modules. If install lttng- tools into image, it fails to build lttng-modules.
Kernel config CONFIG_MODULES couldn't be checked whether enabled or disabled after bitbake parse. Then there is no
chance to remove lttng-module from the dependencies. That why I check the config during thedo_compileanddo_install
with bbnote and generate empty rpm package.
Quoted 8 lines
That is a bit different to the problem I thought this was addressing (I was coming from the rust patches angle).
In that case we probably need to have something like "kernel-modules" in
KERNEL_FEATURESand we check in the lttng-tools recipes if kernel- modules are inKERNEL_FEATURES. The kernel itself can then error if the feature is selected but not configured and lttng-modules can fail to parse with an error if it isn't set?
I sent a patch to preset LTTNGMODULES with '?='. Then it could be overridden from conf files to clear it. It should be the one who disable kernel modules support to break the dependency betweenlttng-modules and lttng-tools.
Thanks, Kai
Quoted 10 lines
lttng-tools is not useful without the module support.
Cheers,
Richard
Signature · 2 lines
Kai Kang Wind River Linux