]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
bitbake-layers: add a command to save the active build configuration as a template...
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 31 Aug 2022 11:13:56 +0000 (13:13 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 Sep 2022 09:05:42 +0000 (10:05 +0100)
commitf319534dc8fc68dfe120d129154a509f0cd6a3b0
tree55b37f357ca7999d0dd42f26d7624861550c1a45
parentc6f2b57be8893ee58f20cc29d8ec3a5a6edf7c07
bitbake-layers: add a command to save the active build configuration as a template into a layer

This is the reverse of setting up a build by pointing TEMPLATECONF to a directory
with a template and running '. oe-init-build-env': this takes the config files from build/conf,
replaces site-specific paths in bblayers.conf with ##OECORE##-relative paths, and copies
the config files into a specified layer under a specified template name.

In many or perhaps most cases such static prefabricated configurations (that require no
further editing) are just enough, and I believe they should be offered by the
official configuration management. On the other hand, generating build configurations with a
sufficiently versatile tool is a far more complex problem, and one we should try to tackle
once we see where and how static configs fall short.

Tooling to discover and select these templates when setting up a build will be provided later on.

How to use:

alex@Zen2:/srv/work/alex/poky/build-layersetup$ bitbake-layers save-build-conf ../../meta-alex/ test-1
NOTE: Starting bitbake server...
NOTE: Configuration template placed into /srv/work/alex/meta-alex/conf/templates/test-1
Please review the files in there, and particularly provide a configuration description in /srv/work/alex/meta-alex/conf/templates/test-1/conf-notes.txt
You can try out the configuration with
TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1
alex@Zen2:/srv/work/alex/poky/build-layersetup$

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/bblayers/buildconf.py [new file with mode: 0644]
meta/lib/oeqa/selftest/cases/bblayers.py