[yocto] Usage of yocto on different (production vs debug) scenarios

Iván Castell icastell at nayarsystems.com
Fri Apr 20 00:59:06 PDT 2018


Hello forum.

We are trying to use yocto in a continuous integration environment with
different (production vs debug) scenarios.

To setup a given scenario (production vs debug) we are using something like
this:

    $ SCENARIO=debug
    $ MACHINE=<machine> DISTRO=<distro>-${SCENARIO} source
../../build-<machine>-${SCENARIO}
    $ bitbake <image>-${SCENARIO}

So we have different image recipes:

    * image-production.bb
    * image-debug.bb

Different distros:

    * distro-production.conf
    * distro-debug.conf

And different build directories:

    * build-<machine>-production
    * build-<machine>-debug

To optimize space usage and compilation time, we setup a shared sstate
cache and a shared directory for downloads. This seems a good starting
point.

However, things are getting complicated, because there is no way to exclude
some recipes easily. For example, we don't want iptables installed on the
debug image, but dependency chains include iptables by default even when
declaring IMAGE_INSTALL_remove explicitly. In this case we decided checking
SCENARIO inside iptables_%.bbappend to decide what rules are installed on
the image (rules.production vs rules.debug).

But at the end, this method is poisoning all our recipes with that kind of
ugly controls [...]

Do you think this is the right way to manage this? Can you suggest a
better/more convenient way to deal with this?

Thank you in advance! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180420/d83796cb/attachment.html>


More information about the yocto mailing list