Use the devtool add
command to add a new recipe
to the workspace layer.
The recipe you add should not exist -
devtool
creates it for you.
The source files the recipe uses should exist in an external
area.
The following example creates and adds a new recipe named
jackson
to a workspace layer the tool creates.
The source code built by the recipes resides in
/home/
:
user
/sources/jackson
$ devtool add jackson /home/user
/sources/jackson
If you add a recipe and the workspace layer does not exist, the command creates the layer and populates it as described in "The Workspace Layer Structure" section.
Running devtool add
when the
workspace layer exists causes the tool to add the recipe,
append files, and source files into the existing workspace layer.
The .bbappend
file is created to point
to the external source tree.
By default, devtool add
uses the latest
revision (i.e. master) when unpacking files from a remote URI.
In some cases, you might want to specify a source revision by
branch, tag, or commit hash. You can specify these options when
using the devtool add
command:
To specify a source branch, use the
--srcbranch
option:
$ devtool add --srcbranch thud jackson /home/user
/sources/jackson
In the previous example, you are checking out the thud branch.
To specify a specific tag or commit hash, use the
--srcrev
option:
$ devtool add --srcrev yocto-2.6 jackson /home/user
/sources/jackson $ devtool add --srcrevsome_commit_hash
/home/user
/sources/jackson
The previous examples check out the yocto-2.6 tag
and the commit associated with the
some_commit_hash
hash.
--autorev
or -a
.