Board specific bbappend file
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
Quoted 19 lines · Stefan Roese
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.bbboard-specific append file:
linux-xyz-board-foo_3.12.bbappendFrom 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.
"
Quoted 5 lines
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
Quoted 8 lines
Thanks,
Stefan
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Hi Bruce,
Quoted 28 lines · Bruce Ashfield
Quoted 17 lines
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.bbboard-specific append file:
linux-xyz-board-foo_3.12.bbappendFrom 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.
"Quoted 5 lines
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.
Quoted 7 lines
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
Quoted 39 lines · Stefan Roese
Hi Bruce,
Quoted 28 lines · Bruce Ashfield
Quoted 17 lines
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.bbboard-specific append file:
linux-xyz-board-foo_3.12.bbappendFrom 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.
"Quoted 5 lines
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.
Quoted 7 lines
i.e.
FOO_<machine name> = "bar"
FOO_<another machine name> = "bar2"Assuming the generic recipe uses these variables appropriately, you'll be fine.
Quoted 6 lines
Specifically its the
SRC_URI/SRC_URI_appendvariable (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
Quoted 4 lines
Thanks,
Stefan
Quoted 17 lines · Bruce Ashfield
Quoted 17 lines
Quoted 5 lines
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.
Quoted 7 lines
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_appendvariable (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.
Quoted 8 lines
Quoted 2 lines
Do you have any recommendations how to change this variable (per recipe) without touching the generic bb file?
You can absolutely change the
SRC_URIon 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
Quoted 21 lines · Stefan Roese
Quoted 20 lines · Bruce Ashfield
Quoted 19 lines
Quoted 5 lines
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.
Quoted 7 lines
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_appendvariable (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?
Quoted 8 lines
Quoted 5 lines
You can absolutely change the
SRC_URIon 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 :)
Quoted 9 lines
recipe:
linux-xyz_3.12.bband its "generic" append file:
linux-xyz_3.12.bbappendAnd 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).
Quoted 3 lines
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
Quoted 4 lines
Thanks,
Stefan
Quoted 50 lines · Bruce Ashfield
Quoted 21 lines · Stefan Roese
Quoted 20 lines · Bruce Ashfield
Quoted 19 lines
Quoted 5 lines
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.
Quoted 7 lines
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_appendvariable (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?
Quoted 8 lines
Quoted 5 lines
You can absolutely change the
SRC_URIon 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 :)
Quoted 9 lines
recipe:
linux-xyz_3.12.bband its "generic" append file:
linux-xyz_3.12.bbappendAnd 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).
Quoted 3 lines
What I was looking for is more a way to do this on a one-file-per-board basis. Is this possible somehow?
Quoted 6 lines
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
Quoted 19 lines
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
Quoted 4 lines
Thanks,
Stefan_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 5 lines · On Thursday 05 December 2013 11:33:58 Bruce Ashfield wrote:
You can absolutely change the
SRC_URIon 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
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 8 lines · Paul Eggleton
Quoted 5 lines · On Thursday 05 December 2013 11:33:58 Bruce Ashfield wrote:
You can absolutely change the
SRC_URIon 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
_appendin 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
Quoted 9 lines
SRC_URI_append_qemux86= " file://myfancypatch.patch"(remembering leading spaces, as usual with
_appendand variables that are space-separated lists)Cheers,
Paul