[OE-core] Whitespace not allowed in COMPATIBLE_MACHINE

Ulf Samuelsson openembedded-core at emagii.com
Tue Nov 29 14:09:23 UTC 2011


On 2011-11-29 12:08, Phil Blundell wrote:
> On Tue, 2011-11-29 at 11:12 +0100, Ulf Samuelsson wrote:
>> Have had a lot of problems trying to get a recipe running.
>> I finally discovered that "COMPATIBLE_MACHINE" is sensitive to whitespace.
>> This is a real PITA expecially since COMPATIBLE_MACHINE is yet to be
>> documented in the manual
> Indeed, it's a regular expression.  This is mentioned in
> documentation.conf:
>
> COMPATIBLE_MACHINE[doc] = "A regular expression which matches the
> MACHINES support by the package/file. Failure to match will cause the
> file to be skipped by the parser."
>
> If you think the description can be improved then I'm sure patches would
> be welcome.

Its pretty clear, but this assumes that you are aware of the file itself.
Have just started looking into openembedded-core, so I didnt even know 
the file existed.
Is this file mentioned anywhere?

I was looking at the openembedded "manual" in the home page
where COMPATIBLE_MACHINE is mentioned, but not much else.

Is there a reason to use a regular expression?
Why not a list of compatible machines?

Obviously you can have
COMPATIBLE_MACHINE = "at91*"
but if you need to list machines, and you have plenty of them
you have one very long line...

>> Working:
>> COMPATIBLE_MACHINE = "machine1"
>> COMPATIBLE_MACHINE = "machine1|machine2"
>> COMPATIBLE_MACHINE = "(machine1)"
>> COMPATIBLE_MACHINE = "(machine1|machine2)"
>>
>> COMPATIBLE_MACHINE = "machine1"
>> COMPATIBLE_MACHINE += "|machine2"
> I'm slightly surprised that this last example would work.  It ought to
> be equivalent to...
>

It seems to work for me.

I have in my U-Boot recipe:
COMPATIBLE_MACHINE     = 
"at91sam9260ek|at91sam9xeek|at91sam9g20ek|at91sam9g20ek_2mmc"
COMPATIBLE_MACHINE    += "|at91sam9261ek|at91sam9g10ek"
COMPATIBLE_MACHINE    += "|at91sam9263ek"
COMPATIBLE_MACHINE    += 
"|at91sam9g45ek|at91sam9g45ekes|at91sam9m10ekes|at91sam9m10g45ek"
COMPATIBLE_MACHINE    += 
"|at91sam9g15ek|at91sam9g25ek|at91sam9g35ek|at91sam9x25ek|at91sam9x35ek"
COMPATIBLE_MACHINE    += "|at91sam9rlek"

MACHINE =  "at91sam9g35ek"
If I add a space in the COMPATIBLE_MACHINE definition somewhere,
then the recipe is not used.

Hmm, I just realized why it will work.
If I try to build for "at91sam9263ek" then the regexp becomes 
"at91sam963ek " (with a space),
so it will only work for machines which are not at the end of a line...

If I want to split into several lines, then I guess an ugly hack would be.
COMPATIBLE_MACHINE     = 
"at91sam9260ek|at91sam9xeek|at91sam9g20ek|at91sam9g20ek_2mmc|            
                XX1"
COMPATIBLE_MACHINE    += "|at91sam9261ek|at91sam9g10ek|                
                                                                         
XX2"
COMPATIBLE_MACHINE    += "|at91sam9263ek|                               
                                                                        
              XX3"
COMPATIBLE_MACHINE    += 
"|at91sam9g45ek|at91sam9g45ekes|at91sam9m10ekes|at91sam9m10g45ek|       
             XX4"
COMPATIBLE_MACHINE    += 
"|at91sam9g15ek|at91sam9g25ek|at91sam9g35ek|at91sam9x25ek|at91sam9x35ek|    
     XX5"
COMPATIBLE_MACHINE    += "|at91sam9rlek"

BR
Ulf Samuelsson

>> COMPATIBLE_MACHINE = "machine1 |machine2"
> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


-- 
Best Regards
Ulf Samuelsson
eMagii





More information about the Openembedded-core mailing list