Patchwork [1/7] linux-yocto/3.8: allow kernel feature _appends to be overriden

login
register
mail settings
Submitter Bruce Ashfield
Date March 26, 2013, 2:46 p.m.
Message ID <cd19c63a4d2874eb48c9a96a69a38af730c00834.1364308617.git.bruce.ashfield@windriver.com>
Download mbox | patch
Permalink /patch/46937/
State Accepted
Commit ec9210718e8cd28ef5cddaa2a148e30cd9a21601
Headers show

Comments

Bruce Ashfield - March 26, 2013, 2:46 p.m.
It was pointed out that the current way the KERNEL_FEATURES variable
is appended in the base linux-yocto recipe doesn't allow the appended
features to be prevented in a layer without using python code and
a recipe finalize hook.

To allow easier overriding of 'extra' or 'optional' features that are
defined in the linux-yocto recipe, we create a KERNEL_EXTRA_FEATURES
variable. This variable can be set in a layer to define extra features
or cleared to prevent the recipe's extra features from being appended
to the core functionality.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/recipes-kernel/linux/linux-yocto_3.8.bb |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Darren Hart - March 26, 2013, 3:48 p.m.
On 03/26/2013 07:46 AM, Bruce Ashfield wrote:
> It was pointed out that the current way the KERNEL_FEATURES variable
> is appended in the base linux-yocto recipe doesn't allow the appended
> features to be prevented in a layer without using python code and
> a recipe finalize hook.
> 
> To allow easier overriding of 'extra' or 'optional' features that are
> defined in the linux-yocto recipe, we create a KERNEL_EXTRA_FEATURES
> variable. This variable can be set in a layer to define extra features
> or cleared to prevent the recipe's extra features from being appended
> to the core functionality.

You know what I'm going to say right? Docume.... right, good.

Bruce, are you keeping a list of things that have changed and need
documentation in the kernel-dev manual? Could you share it?

--
Darren

> 
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
>  meta/recipes-kernel/linux/linux-yocto_3.8.bb |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.8.bb b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> index b395e45..f29675a 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> @@ -23,8 +23,7 @@ KMETA = "meta"
>  COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
>  
>  # Functionality flags
> -KERNEL_FEATURES_append = " features/netfilter/netfilter.scc"
> -KERNEL_FEATURES_append_qemux86=" cfg/sound.scc"
> -KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
> -KERNEL_FEATURES_append_qemux86=" cfg/paravirt_kvm.scc"
> +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
> +KERNEL_FEATURES_append_qemux86=" ${KERNEL_EXTRA_FEATURES} cfg/sound.scc cfg/paravirt_kvm.scc"
> +KERNEL_FEATURES_append_qemux86-64=" ${KERNEL_EXTRA_FEATURES} cfg/sound.scc"
>  KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
>
Bruce Ashfield - March 26, 2013, 3:49 p.m.
On 13-03-26 11:48 AM, Darren Hart wrote:
> On 03/26/2013 07:46 AM, Bruce Ashfield wrote:
>> It was pointed out that the current way the KERNEL_FEATURES variable
>> is appended in the base linux-yocto recipe doesn't allow the appended
>> features to be prevented in a layer without using python code and
>> a recipe finalize hook.
>>
>> To allow easier overriding of 'extra' or 'optional' features that are
>> defined in the linux-yocto recipe, we create a KERNEL_EXTRA_FEATURES
>> variable. This variable can be set in a layer to define extra features
>> or cleared to prevent the recipe's extra features from being appended
>> to the core functionality.
>
> You know what I'm going to say right? Docume.... right, good.
>
> Bruce, are you keeping a list of things that have changed and need
> documentation in the kernel-dev manual? Could you share it?

I do have a list, I'll put it in bugzilla.

Bruce

>
> --
> Darren
>
>>
>> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>> ---
>>   meta/recipes-kernel/linux/linux-yocto_3.8.bb |    7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.8.bb b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
>> index b395e45..f29675a 100644
>> --- a/meta/recipes-kernel/linux/linux-yocto_3.8.bb
>> +++ b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
>> @@ -23,8 +23,7 @@ KMETA = "meta"
>>   COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
>>
>>   # Functionality flags
>> -KERNEL_FEATURES_append = " features/netfilter/netfilter.scc"
>> -KERNEL_FEATURES_append_qemux86=" cfg/sound.scc"
>> -KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
>> -KERNEL_FEATURES_append_qemux86=" cfg/paravirt_kvm.scc"
>> +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
>> +KERNEL_FEATURES_append_qemux86=" ${KERNEL_EXTRA_FEATURES} cfg/sound.scc cfg/paravirt_kvm.scc"
>> +KERNEL_FEATURES_append_qemux86-64=" ${KERNEL_EXTRA_FEATURES} cfg/sound.scc"
>>   KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
>>
>
Darren Hart - March 26, 2013, 3:54 p.m.
On 03/26/2013 08:49 AM, Bruce Ashfield wrote:
> On 13-03-26 11:48 AM, Darren Hart wrote:
>> On 03/26/2013 07:46 AM, Bruce Ashfield wrote:
>>> It was pointed out that the current way the KERNEL_FEATURES variable
>>> is appended in the base linux-yocto recipe doesn't allow the appended
>>> features to be prevented in a layer without using python code and
>>> a recipe finalize hook.
>>>
>>> To allow easier overriding of 'extra' or 'optional' features that are
>>> defined in the linux-yocto recipe, we create a KERNEL_EXTRA_FEATURES
>>> variable. This variable can be set in a layer to define extra features
>>> or cleared to prevent the recipe's extra features from being appended
>>> to the core functionality.
>>
>> You know what I'm going to say right? Docume.... right, good.
>>
>> Bruce, are you keeping a list of things that have changed and need
>> documentation in the kernel-dev manual? Could you share it?
> 
> I do have a list, I'll put it in bugzilla.

Thank you sir!
Bruce Ashfield - March 26, 2013, 7:50 p.m.
On 13-03-26 11:54 AM, Darren Hart wrote:
>
>
> On 03/26/2013 08:49 AM, Bruce Ashfield wrote:
>> On 13-03-26 11:48 AM, Darren Hart wrote:
>>> On 03/26/2013 07:46 AM, Bruce Ashfield wrote:
>>>> It was pointed out that the current way the KERNEL_FEATURES variable
>>>> is appended in the base linux-yocto recipe doesn't allow the appended
>>>> features to be prevented in a layer without using python code and
>>>> a recipe finalize hook.
>>>>
>>>> To allow easier overriding of 'extra' or 'optional' features that are
>>>> defined in the linux-yocto recipe, we create a KERNEL_EXTRA_FEATURES
>>>> variable. This variable can be set in a layer to define extra features
>>>> or cleared to prevent the recipe's extra features from being appended
>>>> to the core functionality.
>>>
>>> You know what I'm going to say right? Docume.... right, good.
>>>
>>> Bruce, are you keeping a list of things that have changed and need
>>> documentation in the kernel-dev manual? Could you share it?
>>
>> I do have a list, I'll put it in bugzilla.
>
> Thank you sir!

I'm overloading bug 3423 with the list of documentation updates that I'll
send out for 1.4 .. it has now been updated.

Cheers,

Bruce

>

Patch

diff --git a/meta/recipes-kernel/linux/linux-yocto_3.8.bb b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
index b395e45..f29675a 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.8.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
@@ -23,8 +23,7 @@  KMETA = "meta"
 COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
 
 # Functionality flags
-KERNEL_FEATURES_append = " features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/paravirt_kvm.scc"
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append_qemux86=" ${KERNEL_EXTRA_FEATURES} cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" ${KERNEL_EXTRA_FEATURES} cfg/sound.scc"
 KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"