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]> 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]> wrote:
On Wed, 2026-02-04 at 08:46 -0500, Bruce Ashfield via
lists.openembedded.org wrote:
On Tue, Feb 3, 2026 at 9:09 PM Kai Kang via
lists.openembedded.org
<[email protected]> wrote:
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.


This isn't the place to do that check.

If modules are disabled get modules_do_compile out of the
tasks.
Does it make sense to have something including module.bbclass
which
doesn't have CONFIG_MODULES set?
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 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 :/
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


Cheers,

Richard




--
Kai Kang
Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#230568): 
https://lists.openembedded.org/g/openembedded-core/message/230568
Mute This Topic: https://lists.openembedded.org/mt/117627823/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to