Commit Graph

4 Commits

Author SHA1 Message Date
Alexander Kanavin
f6f50200c9 meta/lib/bblayers/buildconf.py: add support for configuration summaries
(From OE-Core rev: 7117e3d08570202c79d618d4fb6a67895b1df564)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19 11:47:53 +00:00
Jermain Horsman
01ef197c6b lib/bblayers/buildconf.py: Remove unused imports/variables
(From OE-Core rev: 720f48c0692a4cbb00535151b049704645748216)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-04 23:47:51 +00:00
Adrian Freihofer
9537b02838 buildconf: compare abspath
We have something like ${TOPDIR}/../../poky/meta in the bblayers.conf
file. This does not work without normalizing the path for comparison.

(From OE-Core rev: e0d45bcd34311ae248bac9378f46962198d148ef)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-26 12:28:39 +01:00
Alexander Kanavin
3f9e3feb22 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$

(From OE-Core rev: f319534dc8fc68dfe120d129154a509f0cd6a3b0)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-01 10:07:02 +01:00