[yocto] Conditional Configuration Fragments

Paul Eggleton paul.eggleton at linux.intel.com
Mon Jun 9 09:56:20 PDT 2014


On Monday 09 June 2014 12:41:36 Bruce Ashfield wrote:
> On 14-06-09 11:26 AM, Pierre Yves MORDRET wrote:
> > Hello,
> > 
> > I really don’t know whether this is feasible or not, but I’m trying to
> > build a yocto image (custom image) with conditional configuration
> > fragments.
> > 
> > Today I have 2 image type: one for deployment purpose and another for
> > debug purpose. Debug images is only a superset of deployment image with
> > additional debug capabilities: nothing else.
> > 
> > However now I would like to add additional linux kernel features to this
> > debug image (ex: CONFIG_DEBUG_INFO=y).
> > 
> > I want to add this feature into debug image, but NOT in deployment image.
> > 
> > I was thinking to create a .bbappend to my linux .bb file, but again I
> > don’t see how to use .bbappend in a conditional way (based on image name
> > for instance)
> > 
> > Do you have any idea to perform such request ?
> 
> Fragments are either just added to the SRC_URI or KERNEL_FEATURES via
> the normal variable assignment rules.
> 
> So if you have something that you can test on (image/distro feature as
> an example), you can use anonymous python and do a conditional
> assignment.
> 
> Others on the list may have more elegant suggestions!

This can't work for what Pierre is asking for. You can't have a single recipe 
built differently depending on what image is being built - our system does not 
work that way. At a basic level, recipes create packages, and then the image 
recipe selects which packages should go into the image.

Given that the kernel does not produce named packages in our system, I'm not 
sure we currently have a way to build two different kernel recipes and select 
one in one image and another in another image (which is the way we normally 
handle this kind of requirement with other recipes.) Probably the only way to 
do this is to have two completely separate build directories.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list