siemens / kas

Setup tool for bitbake based projects
MIT License
339 stars 145 forks source link

Using kas to generate conf/multiconfig/configA.conf #80

Closed therealjumbo closed 2 years ago

therealjumbo commented 2 years ago

Is kas capable of generating the different mutliconfig files described here: https://docs.yoctoproject.org/dev-manual/common-tasks.html?highlight=multiconfig#setting-up-and-running-a-multiple-configuration-build

That is, it can populate BBMULTICONFIG in build/local.conf, but can it also populate the entire files like build/multiconfig/target1.conf, build/multiconfig/target2.conf and so on since those files must be (according to the yocto documentation) in build/multiconfig/?

If it cannot populate these files how are people currently using this feature? Do you have another generator? Do you use a pre-build script to cp them in? Do you add build/multiconfig/* to your git repo and check them in that way?

jan-kiszka commented 2 years ago

I don't have a Yocto example at hand. Under Isar, we are using it by letting the layer provide the multiconf files, see e.g. https://github.com/ilbers/isar/tree/master/meta-isar/conf/multiconfig and https://github.com/siemens/jailhouse-images/tree/master/conf/multiconfig.

HED-jzignego commented 2 years ago

Thanks, that helps a lot.

HED-jzignego commented 2 years ago

The isar documentation says this:

  • BBMULTICONFIG - The list of the complete configuration definition files. BitBake looks for conf/multiconfig/<CONFIG>.conf in every layer. Every configuration must define MACHINE, DISTRO and DISTRO_ARCH.

However bitbake's documentation says differently. It claims that the multiconfig directory must be under the build/ directory.

The location for these multiconfig configuration files is specific. They must reside in the current build directory in a sub-directory of conf named multiconfig.

Which is the case?

EDIT: same person, just using a different account. Apologies for the confusion.

jan-kiszka commented 2 years ago

A good share of the truth is in the bitbake.conf you are using. OE/Yocto have a

require conf/multiconfig/${BB_CURRENT_MC}.conf

in their bitbake.conf, Isar uses weaker include here. Not sure if there are additional paths for multiconfigs beyond that.

HED-jzignego commented 2 years ago

It seems that OE/Yocto actually do support conf/multiconfig/target1.conf in a layer in addition to in the build dir. I tested this with Yocto 3.2, so releases at least as old as that work. I did need to cherry pick some bug fixes to make it work sanely. See this issue/bug here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13566 which explains why the documentation is incorrect.

HED-jzignego commented 2 years ago

@jan-kiszka I can't seem to close the issue, but if you would like to I'm happy.