meta data for this page
multiconfig
13 Building Images for Multiple Targets With Multiconfig
With default - no multiconfig - usage bitbake works with one config local.conf
.
It is possible to use bitbake parallel tasks to build more targets and machines at the same time.
When bitbake target is prefixed with special mc:configname:target
then bitbake looks for configname.conf
instead of local.conf
.
Default local.conf
is still avail as empty config mc::target
.
Bitbake looks for additional configs in multiconfig
directory.
This directory can be located in 2 places:
- in build
conf
directoryconf/local.conf
conf/multiconfig/configname1.conf *
conf/multiconfig/configname2.conf
- in layer
conf
directory:meta-custom/conf/multiconfig/confignameX.conf
Pros:
- Acts as predefined
local.conf
shipped within layer. - It has great benefits when SSTATE cache is already filled and when multiple rootfs images are assembled in parallel.
- The same TMPDIR can be used, when building the same distro for multiple similar machines and multiple similar images.
Cons:
- With empty SSTATE it can perform even worse than sequential build where 1st build will store some reusable object in sstate cache.
- See
Note Support for multiple configuration builds in the Yocto Project 5.3.999 (Whinlatter) Release does not include Shared State (sstate) optimizations. Consequently, if a build uses the same object twice in, for example, two different TMPDIR directories, the build either loads from an existing sstate cache for that build at the start or builds the object fresh.
- Separate TMPDIR must be used when crucial configs are changed between multiconfis. Common practice is to use separate TMPDIR per distro.
Example usage:
invoke bitbake target with prefix:
bitbake mc:configname:target1 mc:configname:target2
the default config - local.conf
is still available - as unnamed config:
bitbake mc::target1
- myconfig.yml
--- header: version: 18 target: - mc:genio-510-sbc:core-image-minimal - mc:genio-700-sbc:core-image-minimal - mc:genio-700-evb:core-image-minimal ...
TMPDIR
- myconfig.conf
DISTRO = "poky" # rename TMPDIR with option to override it: MY_TMP_APPEND ?= "-poky" TMPDIR:append = "${MY_TMP_APPEND}"
or
- local.conf
TMPDIR = "${TOPDIR}/tmp-${DISTRO}"
references
“Multiconfig Inception” by Joshua Watt:
Use BB multiconfig with kas: