All of lore.kernel.org
 help / color / mirror / Atom feed
* Conditional Configuration Fragments
@ 2014-06-09 15:26 Pierre Yves MORDRET
  2014-06-09 16:41 ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Yves MORDRET @ 2014-06-09 15:26 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 930 bytes --]

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 ?

Many thanks in advance


[cid:image003.png@01CF8407.F99988A0]

Pierre-Yves MORDRET | TINA: 166 7286 | Tel: +33 244027286 | Mobile: +33 611091514
UPD | Middleware Integrator


[-- Attachment #1.2: Type: text/html, Size: 5646 bytes --]

[-- Attachment #2: image003.png --]
[-- Type: image/png, Size: 9920 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Conditional Configuration Fragments
  2014-06-09 15:26 Conditional Configuration Fragments Pierre Yves MORDRET
@ 2014-06-09 16:41 ` Bruce Ashfield
  2014-06-09 16:56   ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2014-06-09 16:41 UTC (permalink / raw)
  To: Pierre Yves MORDRET, yocto

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!

Bruce


>
> Many thanks in advance
>
> Description: Description: Description: Description: Description:
> Description: Description: Description: Description: Description:
> Description: Description: logo_big5
>
> Pierre-Yves MORDRET |TINA: 166 7286 |Tel: +33 244027286 | Mobile: +33
> 611091514
>
> UPD | Middleware Integrator
>
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Conditional Configuration Fragments
  2014-06-09 16:41 ` Bruce Ashfield
@ 2014-06-09 16:56   ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2014-06-09 16:56 UTC (permalink / raw)
  To: Bruce Ashfield, Pierre Yves MORDRET; +Cc: yocto

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Conditional Configuration Fragments
  2014-06-10 16:04 ` Bruce Ashfield
@ 2014-06-10 16:09   ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2014-06-10 16:09 UTC (permalink / raw)
  To: Bruce Ashfield, Pierre Yves MORDRET; +Cc: yocto

On Tuesday 10 June 2014 12:04:19 Bruce Ashfield wrote:
> On 14-06-10 11:11 AM, Pierre Yves MORDRET wrote:
> > On Monday 09 June 2014 09:56:20 Paul Eggleton 
<paul.eggleton@linux.intel.com> wrote:
> >> 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.
> > 
> > Many Thanks for your answers.
> > Thus I was thinking of making 2 separate linux.bb, one for deployment and
> > the other for debug (i.e. linux-debug.bb) and update
> > PREFERRED_PROVIDER_virtual/kernel accordingly. But is there an automatic
> > way to select proper .bb (linux.bb or linux-debug.bb) file like setting
> > this variable(PREFERRED_PROVIDER_virtual/kernel) within the .bb image
> > file ? Won't it work ?
> > 
> > Another option which is coming on top of my mind:
> > SRC_URI_append_<image-name> = " file://configuration_segment.cfg"
> > Is it something realistic and working ?
> 
> The image name would have to be an OVERRIDE value for variables.
> Last I checked it wasn't, but perhaps Paul can straighten out that
> point as well :)

No, you can't do this, nor can you select PREFERRED_PROVIDER from the image. 
You cannot influence the building of other recipes from the image recipe at 
all.

As I said before, the only way to make this work would be if the kernel 
produced uniquely named packages that could be selected from the image; our 
kernel recipes don't currently do that though, and it would be a fairly major 
change in order to do that.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Conditional Configuration Fragments
  2014-06-10 15:11 Pierre Yves MORDRET
@ 2014-06-10 16:04 ` Bruce Ashfield
  2014-06-10 16:09   ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2014-06-10 16:04 UTC (permalink / raw)
  To: Pierre Yves MORDRET, Paul Eggleton; +Cc: yocto

On 14-06-10 11:11 AM, Pierre Yves MORDRET wrote:
> On Monday 09 June 2014 09:56:20 Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
>> 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.
>
> Many Thanks for your answers.
> Thus I was thinking of making 2 separate linux.bb, one for deployment and the other for debug (i.e. linux-debug.bb) and update PREFERRED_PROVIDER_virtual/kernel accordingly.
> But is there an automatic way to select proper .bb (linux.bb or linux-debug.bb) file like setting this variable(PREFERRED_PROVIDER_virtual/kernel) within the .bb image file ? Won't it work ?
>
> Another option which is coming on top of my mind:
> SRC_URI_append_<image-name> = " file://configuration_segment.cfg"
> Is it something realistic and working ?

The image name would have to be an OVERRIDE value for variables.
Last I checked it wasn't, but perhaps Paul can straighten out that
point as well :)

Cheers,

Bruce

>
> Please advise
> Many thanks in advance
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Conditional Configuration Fragments
@ 2014-06-10 15:11 Pierre Yves MORDRET
  2014-06-10 16:04 ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Yves MORDRET @ 2014-06-10 15:11 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

On Monday 09 June 2014 09:56:20 Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> 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.

Many Thanks for your answers.
Thus I was thinking of making 2 separate linux.bb, one for deployment and the other for debug (i.e. linux-debug.bb) and update PREFERRED_PROVIDER_virtual/kernel accordingly.
But is there an automatic way to select proper .bb (linux.bb or linux-debug.bb) file like setting this variable(PREFERRED_PROVIDER_virtual/kernel) within the .bb image file ? Won't it work ?

Another option which is coming on top of my mind:
SRC_URI_append_<image-name> = " file://configuration_segment.cfg"
Is it something realistic and working ? 

Please advise
Many thanks in advance


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-10 16:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09 15:26 Conditional Configuration Fragments Pierre Yves MORDRET
2014-06-09 16:41 ` Bruce Ashfield
2014-06-09 16:56   ` Paul Eggleton
2014-06-10 15:11 Pierre Yves MORDRET
2014-06-10 16:04 ` Bruce Ashfield
2014-06-10 16:09   ` Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.