Re: [poky] [PATCH 2/4] conf/fragments: add fragments for qemux86-64 and qemuarm64

Richard Purdie <[email protected]> Wed, 04 Jun 2025 09:48:34 +0100
Newsgroups org.yoctoproject.lists.poky
Message-ID <e94887f831142516ccf60e3f477155b5b6e5f92d.camel@linuxfoundation.org>
On Wed, 2025-06-04 at 09:46 +0200, Alexander Kanavin wrote:
> On Tue, 3 Jun 2025 at 21:48, Richard Purdie
> <[email protected]> wrote:
> 
> > What bothers me about this is that we have multiple files, each
> > with a
> > single similar config line in them. It implies we need to create a
> > new
> > machine config fragment for every machine, which to be honest, is
> > madness.
> > 
> > Would it be better if the config/setup code understood what
> > something
> > like "machine/qemux86-64" or "distro/poky" meant and did something
> > magic with that?
> 
> Haha, yes. I've been stuck in the subject so long that I no longer
> see the forest for the trees.

It is hard when you're deeply into something like this! Something has
bothered me about these for a while but it has taken me far too long to
be able to succinctly explain it.

> I think bitbake-config-build should be extended to have
> 'list-machines/set-machine/list-distros/set-distro', and then
> bitbake-setup would call out to that, like it already does for
> fragments. There's already 'show-machines' in bitbake-layers, which
> should be renamed and moved, so that bitbake-layers is less
> over-stuffed with sub-commands.

Maybe. I do like the idea of being able to express a configuration with
just a list of fragments so a magic mapping of machine/XXX and
distro/XXX does still have some appeal. We could code something:

BBCONFIG_FRAGMENT_VARIABLE_MAPS = "machine/:MACHINE and distro/:DISTRO"

to make the code generic?

Cheers,

Richard