* Board specific bbappend file
@ 2013-12-05 16:02 Stefan Roese
2013-12-05 16:09 ` Bruce Ashfield
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2013-12-05 16:02 UTC (permalink / raw)
To: yocto
Dear List!
I'm trying to add a board specific *.bbappend file to a recipe. To add
board specific informations/settings to this recipe but without changing
the common (generic) recipe (*.bb) file. Something like this:
recipe:
linux-xyz_3.12.bb
board-specific append file:
linux-xyz-board-foo_3.12.bbappend
From the documentation I read:
"
Append files must have the same root names as their corresponding
recipes. For example, the append file someapp_1.5.1.bbappend must apply
to someapp_1.5.1.bb.
"
So it seems impossible to "encrypt" the board name into the bbappend
file name. Or am I missing something?
If not, is there another way to add such board-specific stuff to a
recipe without changing the generic recipe?
Thanks,
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 16:02 Board specific bbappend file Stefan Roese
@ 2013-12-05 16:09 ` Bruce Ashfield
2013-12-05 16:27 ` Stefan Roese
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2013-12-05 16:09 UTC (permalink / raw)
To: Stefan Roese, yocto
On 13-12-05 11:02 AM, Stefan Roese wrote:
> Dear List!
>
> I'm trying to add a board specific *.bbappend file to a recipe. To add
> board specific informations/settings to this recipe but without changing
> the common (generic) recipe (*.bb) file. Something like this:
>
> recipe:
> linux-xyz_3.12.bb
>
> board-specific append file:
> linux-xyz-board-foo_3.12.bbappend
>
> From the documentation I read:
> "
> Append files must have the same root names as their corresponding
> recipes. For example, the append file someapp_1.5.1.bbappend must apply
> to someapp_1.5.1.bb.
> "
>
> So it seems impossible to "encrypt" the board name into the bbappend
> file name. Or am I missing something?
>
> If not, is there another way to add such board-specific stuff to a
> recipe without changing the generic recipe?
What exactly are you tried to change on a per-board basis ? Assuming
it is variables, you can use the standard OVERRIDES mechanism to
have a version specific bbappend, that changes variables on a per
board basis.
i.e.
FOO_<machine name> = "bar"
FOO_<another machine name> = "bar2"
Assuming the generic recipe uses these variables appropriately, you'll
be fine.
Bruce
>
> Thanks,
> Stefan
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 16:09 ` Bruce Ashfield
@ 2013-12-05 16:27 ` Stefan Roese
2013-12-05 16:33 ` Bruce Ashfield
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2013-12-05 16:27 UTC (permalink / raw)
To: Bruce Ashfield, yocto
Hi Bruce,
On 05.12.2013 17:09, Bruce Ashfield wrote:
>> I'm trying to add a board specific *.bbappend file to a recipe. To add
>> board specific informations/settings to this recipe but without changing
>> the common (generic) recipe (*.bb) file. Something like this:
>>
>> recipe:
>> linux-xyz_3.12.bb
>>
>> board-specific append file:
>> linux-xyz-board-foo_3.12.bbappend
>>
>> From the documentation I read:
>> "
>> Append files must have the same root names as their corresponding
>> recipes. For example, the append file someapp_1.5.1.bbappend must apply
>> to someapp_1.5.1.bb.
>> "
>>
>> So it seems impossible to "encrypt" the board name into the bbappend
>> file name. Or am I missing something?
>>
>> If not, is there another way to add such board-specific stuff to a
>> recipe without changing the generic recipe?
>
> What exactly are you tried to change on a per-board basis ? Assuming
> it is variables, you can use the standard OVERRIDES mechanism to
> have a version specific bbappend, that changes variables on a per
> board basis.
>
> i.e.
>
> FOO_<machine name> = "bar"
> FOO_<another machine name> = "bar2"
>
> Assuming the generic recipe uses these variables appropriately, you'll
> be fine.
Specifically its the SRC_URI / SRC_URI_append variable (e.g. for a linux
kernel and u-boot etc). And since this one is used in many recipes, I
can't just put those settings in the machine conf file.
Do you have any recommendations how to change this variable (per recipe)
without touching the generic bb file?
Thanks,
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 16:27 ` Stefan Roese
@ 2013-12-05 16:33 ` Bruce Ashfield
2013-12-05 16:44 ` Stefan Roese
2013-12-05 17:49 ` Paul Eggleton
0 siblings, 2 replies; 9+ messages in thread
From: Bruce Ashfield @ 2013-12-05 16:33 UTC (permalink / raw)
To: Stefan Roese, yocto
On 13-12-05 11:27 AM, Stefan Roese wrote:
> Hi Bruce,
>
> On 05.12.2013 17:09, Bruce Ashfield wrote:
>>> I'm trying to add a board specific *.bbappend file to a recipe. To add
>>> board specific informations/settings to this recipe but without changing
>>> the common (generic) recipe (*.bb) file. Something like this:
>>>
>>> recipe:
>>> linux-xyz_3.12.bb
>>>
>>> board-specific append file:
>>> linux-xyz-board-foo_3.12.bbappend
>>>
>>> From the documentation I read:
>>> "
>>> Append files must have the same root names as their corresponding
>>> recipes. For example, the append file someapp_1.5.1.bbappend must apply
>>> to someapp_1.5.1.bb.
>>> "
>>>
>>> So it seems impossible to "encrypt" the board name into the bbappend
>>> file name. Or am I missing something?
>>>
>>> If not, is there another way to add such board-specific stuff to a
>>> recipe without changing the generic recipe?
>>
>> What exactly are you tried to change on a per-board basis ? Assuming
>> it is variables, you can use the standard OVERRIDES mechanism to
>> have a version specific bbappend, that changes variables on a per
>> board basis.
>>
>> i.e.
>>
>> FOO_<machine name> = "bar"
>> FOO_<another machine name> = "bar2"
>>
>> Assuming the generic recipe uses these variables appropriately, you'll
>> be fine.
>
> Specifically its the SRC_URI / SRC_URI_append variable (e.g. for a linux
> kernel and u-boot etc). And since this one is used in many recipes, I
> can't just put those settings in the machine conf file.
>
> Do you have any recommendations how to change this variable (per recipe)
> without touching the generic bb file?
You can absolutely change the SRC_URI on a per-board basis. Just use
the technique that I showed above, and do it in a bbappend to your
linux recipe.
i.e. something like: SRC_URI_qemux86 += "file://myfancypatch.patch"
Cheers,
Bruce
>
> Thanks,
> Stefan
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 16:33 ` Bruce Ashfield
@ 2013-12-05 16:44 ` Stefan Roese
2013-12-05 16:51 ` Bruce Ashfield
2013-12-05 17:49 ` Paul Eggleton
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2013-12-05 16:44 UTC (permalink / raw)
To: Bruce Ashfield, yocto
On 05.12.2013 17:33, Bruce Ashfield wrote:
>>> What exactly are you tried to change on a per-board basis ? Assuming
>>> it is variables, you can use the standard OVERRIDES mechanism to
>>> have a version specific bbappend, that changes variables on a per
>>> board basis.
>>>
>>> i.e.
>>>
>>> FOO_<machine name> = "bar"
>>> FOO_<another machine name> = "bar2"
>>>
>>> Assuming the generic recipe uses these variables appropriately, you'll
>>> be fine.
>>
>> Specifically its the SRC_URI / SRC_URI_append variable (e.g. for a linux
>> kernel and u-boot etc). And since this one is used in many recipes, I
>> can't just put those settings in the machine conf file.
>>
>> Do you have any recommendations how to change this variable (per recipe)
>> without touching the generic bb file?
>
> You can absolutely change the SRC_URI on a per-board basis. Just use
> the technique that I showed above, and do it in a bbappend to your
> linux recipe.
>
> i.e. something like: SRC_URI_qemux86 += "file://myfancypatch.patch"
Yes, right. But this would mean doing it in a "generic" bbappend file? E.g.
recipe:
linux-xyz_3.12.bb
and its "generic" append file:
linux-xyz_3.12.bbappend
And thinking about for example 20 boards, this would mean to add 20
"SRC_URI_fooabc" defines to this bbappend file. Just shifting the
changes from the bb file to the "common" bbappend file.
What I was looking for is more a way to do this on a one-file-per-board
basis. Is this possible somehow?
Thanks,
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 16:44 ` Stefan Roese
@ 2013-12-05 16:51 ` Bruce Ashfield
2013-12-05 18:34 ` Martin Jansa
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2013-12-05 16:51 UTC (permalink / raw)
To: Stefan Roese, yocto
On 13-12-05 11:44 AM, Stefan Roese wrote:
> On 05.12.2013 17:33, Bruce Ashfield wrote:
>>>> What exactly are you tried to change on a per-board basis ? Assuming
>>>> it is variables, you can use the standard OVERRIDES mechanism to
>>>> have a version specific bbappend, that changes variables on a per
>>>> board basis.
>>>>
>>>> i.e.
>>>>
>>>> FOO_<machine name> = "bar"
>>>> FOO_<another machine name> = "bar2"
>>>>
>>>> Assuming the generic recipe uses these variables appropriately, you'll
>>>> be fine.
>>>
>>> Specifically its the SRC_URI / SRC_URI_append variable (e.g. for a linux
>>> kernel and u-boot etc). And since this one is used in many recipes, I
>>> can't just put those settings in the machine conf file.
>>>
>>> Do you have any recommendations how to change this variable (per recipe)
>>> without touching the generic bb file?
>>
>> You can absolutely change the SRC_URI on a per-board basis. Just use
>> the technique that I showed above, and do it in a bbappend to your
>> linux recipe.
>>
>> i.e. something like: SRC_URI_qemux86 += "file://myfancypatch.patch"
>
> Yes, right. But this would mean doing it in a "generic" bbappend file? E.g.
>
Definitions vary. I wouldn't call that generic :)
> recipe:
> linux-xyz_3.12.bb
>
> and its "generic" append file:
> linux-xyz_3.12.bbappend
>
> And thinking about for example 20 boards, this would mean to add 20
> "SRC_URI_fooabc" defines to this bbappend file. Just shifting the
> changes from the bb file to the "common" bbappend file.
Yes that's how variable namespace and override resolution works (at
a high level).
>
> What I was looking for is more a way to do this on a one-file-per-board
> basis. Is this possible somehow?
There are plenty of things you could do, but I'd think of them more as
hacks (or maybe someone else reading has a clean suggestion that I'm
not aware of) with python, etc.
You could also have a layer per board, and each layer have a bbappend
with the boards changes, that's what layers provide already.
On a separate note, if you really are managing this many boards, with
patches, configs and separate changes you really don't want to spread
those patches into many layers, files and rcipes. Maintenance becomes
a big problem, as does patch failures and consistent configuration
management.
Cheers,
Bruce
>
> Thanks,
> Stefan
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 16:33 ` Bruce Ashfield
2013-12-05 16:44 ` Stefan Roese
@ 2013-12-05 17:49 ` Paul Eggleton
2013-12-05 17:52 ` Bruce Ashfield
1 sibling, 1 reply; 9+ messages in thread
From: Paul Eggleton @ 2013-12-05 17:49 UTC (permalink / raw)
To: Bruce Ashfield, Stefan Roese; +Cc: yocto
On Thursday 05 December 2013 11:33:58 Bruce Ashfield wrote:
> You can absolutely change the SRC_URI on a per-board basis. Just use
> the technique that I showed above, and do it in a bbappend to your
> linux recipe.
>
> i.e. something like: SRC_URI_qemux86 += "file://myfancypatch.patch"
overrides and += do not play well. You must use _append in this case i.e.
SRC_URI_append_qemux86 = " file://myfancypatch.patch"
(remembering leading spaces, as usual with _append and variables that are
space-separated lists)
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 17:49 ` Paul Eggleton
@ 2013-12-05 17:52 ` Bruce Ashfield
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2013-12-05 17:52 UTC (permalink / raw)
To: Paul Eggleton, Stefan Roese; +Cc: yocto
On 13-12-05 12:49 PM, Paul Eggleton wrote:
> On Thursday 05 December 2013 11:33:58 Bruce Ashfield wrote:
>> You can absolutely change the SRC_URI on a per-board basis. Just use
>> the technique that I showed above, and do it in a bbappend to your
>> linux recipe.
>>
>> i.e. something like: SRC_URI_qemux86 += "file://myfancypatch.patch"
>
> overrides and += do not play well. You must use _append in this case i.e.
Thanks for the update. I don't patch from recipes, so that's why I
watered down my response with "something like" :)
Bruce
>
> SRC_URI_append_qemux86 = " file://myfancypatch.patch"
>
> (remembering leading spaces, as usual with _append and variables that are
> space-separated lists)
>
> Cheers,
> Paul
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Board specific bbappend file
2013-12-05 16:51 ` Bruce Ashfield
@ 2013-12-05 18:34 ` Martin Jansa
0 siblings, 0 replies; 9+ messages in thread
From: Martin Jansa @ 2013-12-05 18:34 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 3090 bytes --]
On Thu, Dec 05, 2013 at 11:51:18AM -0500, Bruce Ashfield wrote:
> On 13-12-05 11:44 AM, Stefan Roese wrote:
> > On 05.12.2013 17:33, Bruce Ashfield wrote:
> >>>> What exactly are you tried to change on a per-board basis ? Assuming
> >>>> it is variables, you can use the standard OVERRIDES mechanism to
> >>>> have a version specific bbappend, that changes variables on a per
> >>>> board basis.
> >>>>
> >>>> i.e.
> >>>>
> >>>> FOO_<machine name> = "bar"
> >>>> FOO_<another machine name> = "bar2"
> >>>>
> >>>> Assuming the generic recipe uses these variables appropriately, you'll
> >>>> be fine.
> >>>
> >>> Specifically its the SRC_URI / SRC_URI_append variable (e.g. for a linux
> >>> kernel and u-boot etc). And since this one is used in many recipes, I
> >>> can't just put those settings in the machine conf file.
> >>>
> >>> Do you have any recommendations how to change this variable (per recipe)
> >>> without touching the generic bb file?
> >>
> >> You can absolutely change the SRC_URI on a per-board basis. Just use
> >> the technique that I showed above, and do it in a bbappend to your
> >> linux recipe.
> >>
> >> i.e. something like: SRC_URI_qemux86 += "file://myfancypatch.patch"
> >
> > Yes, right. But this would mean doing it in a "generic" bbappend file? E.g.
> >
>
> Definitions vary. I wouldn't call that generic :)
>
> > recipe:
> > linux-xyz_3.12.bb
> >
> > and its "generic" append file:
> > linux-xyz_3.12.bbappend
> >
> > And thinking about for example 20 boards, this would mean to add 20
> > "SRC_URI_fooabc" defines to this bbappend file. Just shifting the
> > changes from the bb file to the "common" bbappend file.
>
> Yes that's how variable namespace and override resolution works (at
> a high level).
>
> >
> > What I was looking for is more a way to do this on a one-file-per-board
> > basis. Is this possible somehow?
>
> There are plenty of things you could do, but I'd think of them more as
> hacks (or maybe someone else reading has a clean suggestion that I'm
> not aware of) with python, etc.
>
> You could also have a layer per board, and each layer have a bbappend
> with the boards changes, that's what layers provide already.
Overrides should be used even in cases with separate layer for each
board.
Documentation was improved lately about this problem:
http://www.yoctoproject.org/docs/1.5/dev-manual/dev-manual.html#best-practices-to-follow-when-creating-layers
> On a separate note, if you really are managing this many boards, with
> patches, configs and separate changes you really don't want to spread
> those patches into many layers, files and rcipes. Maintenance becomes
> a big problem, as does patch failures and consistent configuration
> management.
>
> Cheers,
>
> Bruce
>
> >
> > Thanks,
> > Stefan
> >
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-12-05 18:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 16:02 Board specific bbappend file Stefan Roese
2013-12-05 16:09 ` Bruce Ashfield
2013-12-05 16:27 ` Stefan Roese
2013-12-05 16:33 ` Bruce Ashfield
2013-12-05 16:44 ` Stefan Roese
2013-12-05 16:51 ` Bruce Ashfield
2013-12-05 18:34 ` Martin Jansa
2013-12-05 17:49 ` Paul Eggleton
2013-12-05 17:52 ` Bruce Ashfield
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.