* Whitespace not allowed in COMPATIBLE_MACHINE
@ 2011-11-29 10:12 Ulf Samuelsson
2011-11-29 11:08 ` Phil Blundell
0 siblings, 1 reply; 5+ messages in thread
From: Ulf Samuelsson @ 2011-11-29 10:12 UTC (permalink / raw)
To: openembedded-core
Have had a lot of problems trying to get a recipe running.
I finally discovered that "COMPATIBLE_MACHINE" is sensitive to whitespace.
Working:
COMPATIBLE_MACHINE = "machine1"
COMPATIBLE_MACHINE = "machine1|machine2"
COMPATIBLE_MACHINE = "(machine1)"
COMPATIBLE_MACHINE = "(machine1|machine2)"
COMPATIBLE_MACHINE = "machine1"
COMPATIBLE_MACHINE += "|machine2"
Not Working:
COMPATIBLE_MACHINE = " machine1"
COMPATIBLE_MACHINE = "machine1 "
COMPATIBLE_MACHINE = "machine1|machine2"
COMPATIBLE_MACHINE = "machine1 |machine2"
COMPATIBLE_MACHINE = "machine1| machine2"
COMPATIBLE_MACHINE = "machine1 | machine2"
COMPATIBLE_MACHINE = " (machine1)"
COMPATIBLE_MACHINE = "(machine1|machine2) "
etc.
This is a real PITA expecially since COMPATIBLE_MACHINE is yet to be
documented in the manual
--
Best Regards
Ulf Samuelsson
eMagii
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Whitespace not allowed in COMPATIBLE_MACHINE
2011-11-29 10:12 Whitespace not allowed in COMPATIBLE_MACHINE Ulf Samuelsson
@ 2011-11-29 11:08 ` Phil Blundell
2011-11-29 14:09 ` Ulf Samuelsson
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-11-29 11:08 UTC (permalink / raw)
To: ulf, Patches and discussions about the oe-core layer
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.
>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...
>COMPATIBLE_MACHINE = "machine1 |machine2"
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Whitespace not allowed in COMPATIBLE_MACHINE
2011-11-29 11:08 ` Phil Blundell
@ 2011-11-29 14:09 ` Ulf Samuelsson
2011-11-29 14:47 ` Chris Larson
2011-11-29 15:23 ` Phil Blundell
0 siblings, 2 replies; 5+ messages in thread
From: Ulf Samuelsson @ 2011-11-29 14:09 UTC (permalink / raw)
To: openembedded-core
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@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Best Regards
Ulf Samuelsson
eMagii
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Whitespace not allowed in COMPATIBLE_MACHINE
2011-11-29 14:09 ` Ulf Samuelsson
@ 2011-11-29 14:47 ` Chris Larson
2011-11-29 15:23 ` Phil Blundell
1 sibling, 0 replies; 5+ messages in thread
From: Chris Larson @ 2011-11-29 14:47 UTC (permalink / raw)
To: ulf, Patches and discussions about the oe-core layer
On Tue, Nov 29, 2011 at 7:09 AM, Ulf Samuelsson
<openembedded-core@emagii.com> wrote:
>
>>> 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.
As Phil points out, += results in a space separator. If you want
direct concatenation without a separator, use .=.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Whitespace not allowed in COMPATIBLE_MACHINE
2011-11-29 14:09 ` Ulf Samuelsson
2011-11-29 14:47 ` Chris Larson
@ 2011-11-29 15:23 ` Phil Blundell
1 sibling, 0 replies; 5+ messages in thread
From: Phil Blundell @ 2011-11-29 15:23 UTC (permalink / raw)
To: ulf, Patches and discussions about the oe-core layer
On Tue, 2011-11-29 at 15:09 +0100, Ulf Samuelsson wrote:
> 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?
Hm, good question. I think the primary use of documentation.conf is for
bitdoc but, given that the copy of bitdoc in oe-core is sufficiently
bitrotten that it doesn't currently run at all, I suspect not many
people are using it. I'm not sure if there are any other links to that
config file.
> Is there a reason to use a regular expression?
> Why not a list of compatible machines?
A regular expression can always represent a list (via the A|B|C
notation) and it allows you to have more complex/concise expressions as
well.
> 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|
You can use ".=" to avoid that issue.
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-29 15:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 10:12 Whitespace not allowed in COMPATIBLE_MACHINE Ulf Samuelsson
2011-11-29 11:08 ` Phil Blundell
2011-11-29 14:09 ` Ulf Samuelsson
2011-11-29 14:47 ` Chris Larson
2011-11-29 15:23 ` Phil Blundell
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.