generic-poky/bitbake/lib/bb
Richard Purdie 218b81acb6 bitbake: bitbake: Initial multi-config support
This patch adds the notion of supporting multiple configurations within
a single build. To enable it, set a line in local.conf like:

BBMULTICONFIG = "configA configB configC"

This would tell bitbake that before it parses the base configuration,
it should load conf/configA.conf and so on for each different
configuration. These would contain lines like:

MACHINE = "A"

or other variables which can be set which can be built in the same
build directory (or change TMPDIR not to conflict).

One downside I've already discovered is that if we want to inherit this
file right at the start of parsing, the only place you can put the
configurations is in "cwd", since BBPATH isn't constructed until the
layers are parsed and therefore using it as a preconf file isn't
possible unless its located there.

Execution of these targets takes the form "bitbake
multiconfig:configA:core-image-minimal core-image-sato" so similar to
our virtclass approach for native/nativesdk/multilib using BBCLASSEXTEND.

Implementation wise, the implication is that instead of tasks being
uniquely referenced with "recipename/fn:task" it now needs to be
"configuration:recipename:task".

We already started using "virtual" filenames for recipes when we
implemented BBCLASSEXTEND and this patch adds a new prefix to
these, "multiconfig:<configname>:" and hence avoid changes to a large
part of the codebase thanks to this. databuilder has an internal array
of data stores and uses the right one depending on the supplied virtual
filename.

That trick allows us to use the existing parsing code including the
multithreading mostly unchanged as well as most of the cache code.

For recipecache, we end up with a dict of these accessed by
multiconfig (mc). taskdata and runqueue can only cope with one recipecache
so for taskdata, we pass in each recipecache and have it compute the result
and end up with an array of taskdatas. We can only have one runqueue so there
extensive changes there.

This initial implementation has some drawbacks:

a) There are no inter-multi-configuration dependencies as yet

b) There are no sstate optimisations. This means if the build uses the
same object twice in say two different TMPDIRs, it will either load from
an existing sstate cache at the start or build it twice. We can then in
due course look at ways in which it would only build it once and then
reuse it. This will likely need significant changes to the way sstate
currently works to make that possible.

(Bitbake rev: 5287991691578825c847bac2368e9b51c0ede3f0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-18 10:06:27 +01:00
..
fetch2 bitbake: fetch2/gitannex.py: use 'git annex init' instead of 'git annex sync' 2016-08-11 00:07:08 +01:00
parse bitbake: ast/ConfHandler: Add a syntax to clear variable 2016-08-18 10:06:26 +01:00
pysh bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
server bitbake: bitbake: implement idle timeout for xmlrpc server 2016-07-21 07:48:52 +01:00
tests bitbake: ast/ConfHandler: Add a syntax to clear variable 2016-08-18 10:06:26 +01:00
ui bitbake: knotty: don't show number of running tasks in quiet mode 2016-08-17 10:22:58 +01:00
COW.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
__init__.py bitbake: lib/bb: Set required python 3 version to 3.4.0 2016-06-02 08:24:03 +01:00
build.py bitbake: lib/bb/build: handle incomplete message fragments in log FIFO 2016-07-26 08:10:37 +01:00
cache.py bitbake: bitbake: Initial multi-config support 2016-08-18 10:06:27 +01:00
cache_extra.py bitbake: bitbake: cooker: get extra information from recipe cache 2013-09-22 12:19:44 +01:00
checksum.py bitbake: lib/bb/checksum: avoid exception on broken symlinks 2016-07-29 09:53:32 +01:00
codeparser.py bitbake: codeparser: Use hashlib for hashing, not hash() 2016-06-03 13:48:33 +01:00
command.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
compat.py bitbake: compat/server/utils: Jettison pre python 2.7.3 workarounds 2013-06-14 17:26:30 +01:00
cooker.py bitbake: bitbake: Initial multi-config support 2016-08-18 10:06:27 +01:00
cookerdata.py bitbake: bitbake: Initial multi-config support 2016-08-18 10:06:27 +01:00
daemonize.py bitbake: daemonize/prserv/tests/fetch: Convert file() -> open() 2016-05-13 13:41:32 +01:00
data.py bitbake: Implement support for per-task exports 2016-05-19 09:05:20 +01:00
data_smart.py bitbake: data_smart/utils: Add 'd' to the context used for better_eval in python expansion 2016-06-13 12:16:10 +01:00
event.py bitbake: cooker: add BuildInit event 2016-08-11 00:09:26 +01:00
exceptions.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
main.py bitbake: bitbake: implement idle timeout for xmlrpc server 2016-07-21 07:48:52 +01:00
methodpool.py bitbake: event/utils/methodpool: Add a cache of compiled code objects 2015-12-22 00:02:05 +00:00
monitordisk.py bitbake: bitbake: Update logger.warn() -> logger.warning() 2016-05-11 10:34:30 +01:00
msg.py bitbake: knotty: add quiet output mode 2016-07-08 09:57:27 +01:00
namedtuple_with_abc.py bitbake: lib/bb/*.py: Typo fixes/grammar/comment fixes, nothing functional. 2014-08-25 08:57:45 +01:00
persist_data.py bitbake: persist_data: Fix py3 update stack overflow 2016-08-11 00:07:08 +01:00
process.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
progress.py bitbake: lib/bb/progress: avoid possibility of start event being reported twice 2016-07-26 08:10:35 +01:00
providers.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
runqueue.py bitbake: bitbake: Initial multi-config support 2016-08-18 10:06:27 +01:00
shell.py Introduce new param caches_array into Cache impl. 2011-06-07 22:39:52 +01:00
siggen.py bitbake: bitbake: Initial multi-config support 2016-08-18 10:06:27 +01:00
taskdata.py bitbake: taskdata/runqueue: Rewrite without use of ID indirection 2016-06-15 08:35:07 +01:00
tinfoil.py bitbake: bitbake: Initial multi-config support 2016-08-18 10:06:27 +01:00
utils.py bitbake: bb/utils.py: export_proxies add GIT_PROXY_COMMAND 2016-08-17 10:22:58 +01:00