devtool
automatically
generates the needed Metadata that allows the OpenEmbedded
build system to build your code into the image.
Use the following command form:
$ devtool addyour-project-name
path-to-source
/your-project-name
Running devtool
modifies the
bblayers.conf
used to build the
image in the Yocto Project.
For more information on the bblayers.conf
,
see the
"BSP Layers"
section in the Yocto Project Board Support Package (BSP) Developer's Guide.
Running devtool
adds a new workspace
layer to the bblayers.conf
file that
is based on your project's location:
path-to-source
/build-directory
/workspace-layer
By default, the name of the workspace layer is "workplace".
For details on the workspace layer created in the
build-directory
,
see the
"Adding a New Recipe to the Workspace Layer"
section.
Of course, each layer must have a
layer.conf
configuration file.
devtool
also creates this configuration
file:
$ cat workspace/conf/layer.conf # ### workspace layer autogenerated by devtool ### BBPATH =. "${LAYERDIR}:" BBFILES += "${LAYERDIR}/recipes/*/*.bb \ ${LAYERDIR}/appends/*.bbappend" BBFILE_COLLECTIONS += "workspacelayer" BBFILE_PATTERN_workspacelayer = "^${LAYERDIR}/" BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1" BBFILE_PRIORITY_workspacelayer = "99"
Running devtool
also automatically
generates your recipe:
$ cat workspace/recipes/your-project-name
/your-project-name
.bb # Recipe created by recipetool # This is the basis of a recipe and may need further editing in order to be fully functional. # (Feel free to remove these comments when editing.) # # Unable to find any files that looked like license statements. Check the accompanying # documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly. LICENSE = "CLOSED" LIC_FILES_CHKSUM = "" # No information for SRC_URI yet (only an external source tree was # specified) SRC_URI = "" DEPENDS = "libx11" # NOTE: if this software is not capable of being built in a separate build directory # from the source, you should replace autotools with autotools-brokensep in the # inherit line inherit autotools # Specify any options you want to pass to the configure script using EXTRA_OECONF: EXTRA_OECONF = ""
Lastly, the devtool
creates the
.bbappend
file:
$ cat workspace/appends/your-project-name
.bbappend inherit externalsrc EXTERNALSRC = "/path-to-source
/your-project-name
" # initial_rev:commit-ID