[yocto] creating global variables in a recipes

Christopher Larson kergoth at gmail.com
Wed Feb 1 08:14:40 PST 2012


Nope. Recipes cannot modify the metadata of other recipes or the configuration metadata, ever. In particular cases, we emit content to tmpdir and read it back in elsewhere, but in general you should just not do what you're trying to do, and find a better solution.

-- 
Christopher Larson


On Wednesday, February 1, 2012 at 8:49 AM, Joshua Immanuel wrote:

> Hello all,
> 
> On Wed, 2012-02-01 at 12:07 +0530, Joshua Immanuel wrote:
> > > At present in my custom image recipe I've added the following
> > > lines
> > > 
> > > SOME_VARIABLE = "Blah"
> > > do_bootimg[depends] += "base-files:do_install"
> > > 
> > > But the contents of ${SOME_VARIABLE} is not available in the
> > > 'base-files' recipe. Even
> > > 
> > > export SOME_VARIABLE = "Blah"
> > > 
> > > doesn't solve the problem. 
> > > 
> > 
> > 
> > $ bitbake custom-image -c devshell
> > 
> > In the above devshell I can find the contents of ${SOME_VARIABLE}
> > available but the content of it is empty in 'base-files' recipe. 
> > 
> 
> 
> In other words, I need to define global variables in a package which can
> be used across multiple packages. At present the only option I have is
> to export the variable in build/conf/local.conf. IMHO, this doesn't feel
> like a proper solution (as the variable is my layer specific). Moreover,
> I can't change the value of it in one package to be used in other
> package(s).
> 
> Is there any other way to do this? Please guide me.
> 
> Regards
> Joshua
> -- 
> Joshua Immanuel
> HiPro IT Solutions Private Limited
> http://hipro.co.in
> 
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org (mailto:yocto at yoctoproject.org)
> https://lists.yoctoproject.org/listinfo/yocto
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20120201/92ede673/attachment.html>


More information about the yocto mailing list