public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: kai.kang@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] module.bbclass: check whether CONFIG_MODULES set
Date: Wed, 04 Feb 2026 14:05:52 +0000	[thread overview]
Message-ID: <4c2fe6d55fc04781560d73fd038ee6b8d205c08e.camel@linuxfoundation.org> (raw)
In-Reply-To: <CADkTA4N=XXArnsygSnAUptBby_BBX1qxsL2bjT+r1gDePWVmZg@mail.gmail.com>

On Wed, 2026-02-04 at 09:02 -0500, Bruce Ashfield wrote:
> On Wed, Feb 4, 2026 at 8:58 AM Richard Purdie <richard.purdie@linuxfoundation.org> 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 <kai.kang=windriver.com@lists.openembedded.org> wrote:
> > > > From: Kai Kang <kai.kang@windriver.com>
> > > > 
> > > > 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'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





  reply	other threads:[~2026-02-04 14:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04  2:09 [PATCH] module.bbclass: check whether CONFIG_MODULES set kai.kang
2026-02-04 13:46 ` [OE-core] " Bruce Ashfield
2026-02-04 13:58   ` Richard Purdie
2026-02-04 14:02     ` Bruce Ashfield
2026-02-04 14:05       ` Richard Purdie [this message]
2026-02-04 14:10         ` Bruce Ashfield
2026-02-04 15:53           ` Richard Purdie
2026-02-05  9:08             ` Kai
2026-02-05 12:58               ` Bruce Ashfield
2026-02-05 14:49               ` Richard Purdie
2026-02-12  6:48                 ` Kai

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=4c2fe6d55fc04781560d73fd038ee6b8d205c08e.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bruce.ashfield@gmail.com \
    --cc=kai.kang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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