Bitbaking Multiple Images From One Source

Sorry… another bitbaking question. I hope this one isn’t stupid or the answer isn’t too obvious.

I would like to use the same ‘oe-core’ to bitbake images and SDKs for both the ‘apalis-t30’ and ‘apalis-tk1’ modules.

I know that the image output lives in its own folder based on the ‘MACHINE’ specified but for the SDK, is there any way to specify an output directory based on machine? Also, when installing the toolchain on the host, can the installer use separate directories (/usr/local/oe-core-t30)?

I’ve discovered the ‘BBMULTICONF’ option for the ‘local.conf’ and I’ve had this set up and working but I’m not sure if this fulfils all the above needs.



Bitbaking for multiple machines in one oe-installation is simple. I usually do that as follows:

MACHINE=apalis-t30 bitbake console-tdx-image
MACHINE=apalis-tk1 bitbake console-tdx-image

That overrides whatever you did set in conf/local.conf with the weak ‘MACHINE ?=’ assignment.

The SDK artefacts in deploy/sdk do have the same file names independent of the machine or the image recipe name built. Bitbake will refuse to replace the files from a previous build for another machines.

So you will have to move the SDK files out of the way when building for a different machine and/or a different image recipe.

At install time the install scripts asks you for an install path which by default is always ‘/usr/local/oecore-x86_64/’. You are free to change that to whatever location suits you needs and thus have different paths for different machines.

I myself never used ‘BBMULTICONF’. From the megamanual this looks like one solution to your problem, however I guess for what you want to do it looks like a bit of an overkill.


P.S. Have a look at this script. It builds a set of images for a set of machines, optionally together with the SDK. If an SDK is built it is moved out of the way after the build finished.

Thanks @max.tx

That looks exactly the kind of thing I’m looking for.

I’ll avoid the BBMULTICONF and use parts of the script you provided.

Perfect. Let us know if it worked.