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 directory
    • conf/local.conf
    • conf/multiconfig/configname1.conf * conf/multiconfig/configname2.conf
  • in layer conf directory:
    • meta-custom/conf/multiconfig/confignameX.conf

Pros:

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}"

[PATCH] multiconfig: use diferent TMPDIR for each machine

path: root/meta-ti-bsp/conf/multiconfig/k3r5.conf

references