[oe] wrapping bb and updating base bb environments

Denys Dmytriyenko denis at denix.org
Tue Nov 15 23:52:41 UTC 2011


On Tue, Nov 15, 2011 at 09:43:04PM +0200, mgundes wrote:
>    Hi,
> 
>    I wonder if there is a way to wrap a bb file. For example, I use
> dropbear with oe classic but I need to make some update in dropbear init
> script. I copied oe/openembedded/recipes/dropbear/ to another bb path which
> has higher bbfile priority. In this case bitbake find bb and files
> in workarea/recipes/dropbear/ and I update init script in
> path workarea/recipes/dropbear/dropbear/init. It is ok and work fine
> however I duplicate whole recipe files for my little update. Is there a
> better way do same thing without duplicating whole files such as simple bb
> wrapping original dropbear bb file?
> 
>    Since oe is so modular and talented I though there would already be a
> way to do that :)

There are at least 2 ways - first is the old amend class[1], which allows you 
to alter recipes with simple amend.inc placed in your overlay, that gets 
parsed after the corresponding recipe, letting you overwrite any variables 
from the original recipe, like we often do in Arago, for example[2][3].

Another way is to use bbappend feature of the newer bitbake. It's used quite a 
lot with the "new" layered structure of oe-core and meta-oe. You just place a 
file, named like your recipe, but instead of .bb extension, it's .bbappend[4][5]

[1] http://cgit.openembedded.org/openembedded/tree/classes/amend.bbclass?h=org.openembedded.dev
[2] http://arago-project.org/git/?p=arago.git;a=blob;f=recipes/openobex/openobex/amend.inc;hb=HEAD
[3] http://arago-project.org/git/?p=arago.git;a=blob;f=recipes/qt4/qt4-embedded-4.7.2/amend.inc;hb=HEAD
[4] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-devtools/gcc/gcc-cross_4.6.bbappend
[5] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-qt/qt4/qt4-embedded_4.7.4.bbappend

-- 
Denys




More information about the Openembedded-devel mailing list