Patchwork base.bbclass: add support for SOC_FAMILY in COMPATIBLE_MACHINES

login
register
mail settings
Submitter Koen Kooi
Date Feb. 28, 2011, 7:21 p.m.
Message ID <1298920867-4961-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/839/
State Accepted
Headers show

Comments

Koen Kooi - Feb. 28, 2011, 7:21 p.m.
* Add support for using SOC_FAMILY in the COMPATIBLE_MACHINES
  setting for a recipe.
* This will allow recipes to work for entire families of
  devices without having to maintain/update the compatible
  devices as new devices are added into a family

Based on 07076390358f211bd96779bec2d6eb5eaa0ad699 by Chase Maupin <chase.maupin@ti.com>

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/classes/base.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Koen Kooi - March 1, 2011, 7:55 p.m.
ping

Op 28 feb 2011, om 20:21 heeft Koen Kooi het volgende geschreven:

> * Add support for using SOC_FAMILY in the COMPATIBLE_MACHINES
>  setting for a recipe.
> * This will allow recipes to work for entire families of
>  devices without having to maintain/update the compatible
>  devices as new devices are added into a family
> 
> Based on 07076390358f211bd96779bec2d6eb5eaa0ad699 by Chase Maupin <chase.maupin@ti.com>
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> meta/classes/base.bbclass |    4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index a674f52..aaf99da 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -342,7 +342,9 @@ python () {
>             import re
>             this_machine = bb.data.getVar('MACHINE', d, 1)
>             if this_machine and not re.match(need_machine, this_machine):
> -                raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
> +                this_soc_family = bb.data.getVar('SOC_FAMILY', d, 1)
> +                if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family:
> +                    raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
> 
> 
>         dont_want_license = bb.data.getVar('INCOMPATIBLE_LICENSE', d, 1)
> -- 
> 1.6.6.1
>
Mark Hatle - March 1, 2011, 8:26 p.m.
On 3/1/11 1:55 PM, Koen Kooi wrote:
> ping

Do you have an example showing how this is to be used?

--Mark

> Op 28 feb 2011, om 20:21 heeft Koen Kooi het volgende geschreven:
> 
>> * Add support for using SOC_FAMILY in the COMPATIBLE_MACHINES
>>  setting for a recipe.
>> * This will allow recipes to work for entire families of
>>  devices without having to maintain/update the compatible
>>  devices as new devices are added into a family
>>
>> Based on 07076390358f211bd96779bec2d6eb5eaa0ad699 by Chase Maupin <chase.maupin@ti.com>
>>
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ---
>> meta/classes/base.bbclass |    4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> index a674f52..aaf99da 100644
>> --- a/meta/classes/base.bbclass
>> +++ b/meta/classes/base.bbclass
>> @@ -342,7 +342,9 @@ python () {
>>             import re
>>             this_machine = bb.data.getVar('MACHINE', d, 1)
>>             if this_machine and not re.match(need_machine, this_machine):
>> -                raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
>> +                this_soc_family = bb.data.getVar('SOC_FAMILY', d, 1)
>> +                if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family:
>> +                    raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
>>
>>
>>         dont_want_license = bb.data.getVar('INCOMPATIBLE_LICENSE', d, 1)
>> -- 
>> 1.6.6.1
>>
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Khem Raj - March 1, 2011, 11:53 p.m.
On Tue, Mar 1, 2011 at 11:55 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> ping
>

I have applied this sorry for delay

-Khem
Tom Rini - March 2, 2011, 12:14 a.m.
On 03/01/2011 01:26 PM, Mark Hatle wrote:
> On 3/1/11 1:55 PM, Koen Kooi wrote:
>> ping
>
> Do you have an example showing how this is to be used?

For example:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/conf/machine/include/omap3.inc
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap3.inc
Mark Hatle - March 2, 2011, 12:51 a.m.
On 3/1/11 6:14 PM, Tom Rini wrote:
> On 03/01/2011 01:26 PM, Mark Hatle wrote:
>> On 3/1/11 1:55 PM, Koen Kooi wrote:
>>> ping
>>
>> Do you have an example showing how this is to be used?
> 
> For example:
> http://cgit.openembedded.org/cgit.cgi/openembedded/tree/conf/machine/include/omap3.inc
> http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap3.inc
> 

Thanks, that makes sense to me.  I think it's useful.  (It's already in, no
objections to that)

--Mark

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index a674f52..aaf99da 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -342,7 +342,9 @@  python () {
             import re
             this_machine = bb.data.getVar('MACHINE', d, 1)
             if this_machine and not re.match(need_machine, this_machine):
-                raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
+                this_soc_family = bb.data.getVar('SOC_FAMILY', d, 1)
+                if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family:
+                    raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
 
 
         dont_want_license = bb.data.getVar('INCOMPATIBLE_LICENSE', d, 1)