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

Andy Gikling agikling at minnetronix.com
Fri Apr 8 10:22:09 PDT 2016


This doesn’t seem to be a viable option.  I’m still missing something I think.

We are adding our own layer on top of our soc vendor’s layer.  In their layer there is a specialized u-boot recipe for the imx6 we are using.

So I try to make a recipe for uboot (u-boot-faux_2014.04.bb<http://u-boot-faux_2014.04.bb>) that includes the vendor’s uboot recipe with “include recipes-bsp/u-boot/u-boot_2014.04.bb” as suggested and try to build an image that is going to IMAGE_INSTALL my customized version of u-boot instead of the soc vendor’s.  However, I get an error at bitbake parse time saying:

ERROR: Multiple .bb files are due to be built which each provide u-boot

This makes sense because bitbake sees that yes, in fact now there are two recipes that provide u-boot.  I suppose I can do something like use “PREFERRED_PROVIDER_u-boot” in my local.conf, but now I need to change my local.conf any time I want to build a different image (ie bitbake faux-app and bitbake faux-app-debug).  I really want a workflow that doesn’t require me to change configuration files, instead just bitbake different image recipes.

In this project I also need to conditionally patch the kernel and I’m going to have this same problem with multiple kernel providers as well.  Also, I don’t want to remove our soc vendor’s layer to get around this error.  Their layer sets up the machine and all sorts of other things.  If I got rid of it I would need to build all that functionality into my project’s layer…  or is this what I’m going to need to do?

Thoughts?

~Andy

From: Burton, Ross [mailto:ross.burton at intel.com]
Sent: Friday, April 08, 2016 10:10 AM
To: Andy Gikling
Cc: yocto at yoctoproject.org
Subject: Re: [yocto] Prescribed way to make global variables in recipes?


On 8 April 2016 at 16:05, Andy Gikling <agikling at minnetronix.com<mailto:agikling at minnetronix.com>> wrote:
So what do I do in that case? Just make two of my own versions of the u-boot_2014.04.bb<http://u-boot_2014.04.bb> file, and give them different names?  For example “u-boot-faux_2014.04.bb<http://u-boot-faux_2014.04.bb>” and “u-boot-faux-debug_2014.04.bb<http://u-boot-faux-debug_2014.04.bb>” ?  That should work but does that make sense to do?

As the stock u-boot appears to be sufficient I'd say use that and then add a u-boot-faux-debug_2014.04.bb<http://u-boot-faux-debug_2014.04.bb> recipe that just does "include u-boot-${PV}.bb" and then whatever SRC_URI changes you want in that version.

Hopefully you don't need to make any fiddly changes to the recipe as PN is now different.

Ross

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


More information about the yocto mailing list