[yocto] Prescribed way to make global variables in recipes?

Burton, Ross ross.burton at intel.com
Fri Apr 8 07:44:23 PDT 2016


On 8 April 2016 at 15:30, Andy Gikling <agikling at minnetronix.com> wrote:

> Dear Yocto,
>
>
>
> First of all, I love this project.  Thanks for all your hard work.
>
>
>
> Question:  What is the prescribed way to allow image recipes to make
> global configuration variables that other recipes can use?
>
>
You can't.  The basic reason being that images are built from packages, and
the packages have already been built when the image is built.


> Ideally, for CI purposes we would like to allow our CI server to simply
> call “bitbake faux-app” to make a release build and then “bitbake
> faux-app-debug” to make a debug build.  The thought process is I could have
> a variable defined in both “faux-app_0.1.bb” and “faux-app-debug_0.1.bb”
> called FAUX_RELEASE_MODE.  In faux-app_0.1.bb this variable would be set
> to “release” and in faux-app-debug_0.1.bb it would be set to “debug.”
>

In your view, what would happen if you did "bitbake faux-app
faux-app-debug"?

There are several ways to fix this that don't involve breaking how OE
works.  Either have a rootfs-time postprocess command in the debug image
recipe that manipulates the installed file system, or have two recipes for
the thing that changes (in this case u-boot) where one includes the other
and makes the changes required, and the image install the relevant package
(u-boot vs u-boot-debug).

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160408/60be8a36/attachment.html>


More information about the yocto mailing list