We have a collection of related, and partly interdependent, packages. They live in separate Git repositories. Like:

The packages are currently built by setting up the Yocto environment, checking out all of them and running bitbake with the image target that depends on all of them. The checkout is done with logic containing special logic. That is

git clone https://git.yoctoproject.org/git/poky
git clone -b $BRANCH [email protected]:common
git clone -b $BRANCH [email protected]:libfoo
git clone -b $BRANCH [email protected]:libbar
git clone -b $BRANCH [email protected]:libbarex
git clone -b $BRANCH [email protected]:daemon
. poky/oe-init-build-env
bitbake final-image

The disadvantage is that the CI server does not understand the configuration management side of things, so it can't do things like building each pull-request, not to mention reporting it back to the Git repository manager to gate the pull-requests on it.

So I would like to start splitting the build to build each package separately, pulling the dependencies according to some specification that shall be updated as needed.

But how do I do that?

I can add

bitbake -c populate_sdk final-image

to the main build, and then use the SDK to build individual components. However that means that any changes in common have to be merged, and the SDK rebuilt, before I can build libfoo, libbar or daemon and additionally changes to libbar have to be merged before I can build libbarex.

Can I push the results of these incremental builds to some kind of repository and pull them back to build the dependent component without having to rebuild the SDK?

0 Answers