dev-manual: Edits to the devtool-add section.
(From yocto-docs rev: f7f3cfa4a6faa556650b5ab8a04e68c585c30107) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
740369fa14
commit
9582da61de
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
<title>Common Development Models</title>
|
<title>Common Development Models</title>
|
||||||
|
|
||||||
|
<para role='writernotes'>
|
||||||
|
Test paragraph.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Many development models exist for which you can use the Yocto Project.
|
Many development models exist for which you can use the Yocto Project.
|
||||||
This chapter overviews simple methods that use tools provided by the
|
This chapter overviews simple methods that use tools provided by the
|
||||||
|
@ -1743,21 +1747,24 @@
|
||||||
As mentioned earlier, <filename>devtool</filename> helps
|
As mentioned earlier, <filename>devtool</filename> helps
|
||||||
you easily develop projects whose build output must be part of
|
you easily develop projects whose build output must be part of
|
||||||
an image built using the OpenEmbedded build system.
|
an image built using the OpenEmbedded build system.
|
||||||
The remainder of this section presents the workflow you would
|
|
||||||
use that includes <filename>devtool</filename>.
|
|
||||||
<footnote>
|
|
||||||
<para>
|
|
||||||
Kudos and thanks to
|
|
||||||
<ulink url='mailto:twoerner@gmail.com'>Trevor Woerner</ulink>
|
|
||||||
whose
|
|
||||||
"<ulink url='https://drive.google.com/file/d/0B3KGzY5fW7laTDVxUXo3UDRvd2s/view'>Yocto Project Developer Workflow Tutorial</ulink>"
|
|
||||||
paper contributed nicely towards the development of this
|
|
||||||
section.
|
|
||||||
</para>
|
|
||||||
</footnote>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Three entry points exist that allow you develop using
|
||||||
|
<filename>devtool</filename>:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis><filename>devtool add</filename></emphasis>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>devtool modify</filename></emphasis>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>devtool upgrade</filename></emphasis>
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The remainder of this section presents these workflows.
|
||||||
|
<note>
|
||||||
The steps in this section assume you have a previously built
|
The steps in this section assume you have a previously built
|
||||||
image that is already either running in QEMU or running on actual
|
image that is already either running in QEMU or running on actual
|
||||||
hardware.
|
hardware.
|
||||||
|
@ -1765,190 +1772,186 @@
|
||||||
target, SSH is installed in the image and if the image is running
|
target, SSH is installed in the image and if the image is running
|
||||||
on real hardware that you have network access to and from your
|
on real hardware that you have network access to and from your
|
||||||
development machine.
|
development machine.
|
||||||
|
</note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='update-your-external-source'>
|
<section id='use-devtool-to-integrate-new-code'>
|
||||||
<title>Update Your External Source</title>
|
<title>Use <filename>devtool add</filename> to Integrate New Code</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Part of the development flow using
|
This section describes the <filename>devtool</filename>
|
||||||
<filename>devtool</filename> of course involves updating
|
workflow to integrate new code.
|
||||||
your source files.
|
With this workflow, you can either build and deploy
|
||||||
Several opportunities exist in the workflow to extract and
|
your code or rebuild an image that contains your code.
|
||||||
work on the files.
|
|
||||||
For now, just realize that you need to be able to have
|
|
||||||
access to and edit files.
|
|
||||||
One obvious solution is to initially extract the code into an
|
|
||||||
isolated area in preparation for modification.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Another option is to use the
|
<imagedata fileref="figures/devtool-add-flow.png" align="center" />
|
||||||
<filename>devtool modify</filename> command.
|
|
||||||
This command makes use of a "workspace" layer where much of
|
|
||||||
the transitional work occurs, which is needed for setting up
|
|
||||||
Metadata used by the OpenEmbedded build system that lets you
|
|
||||||
build your software.
|
|
||||||
Options (i.e. "-x") exist using <filename>devtool</filename>
|
|
||||||
that enable you to use the tool to extract source code.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='use-devtool-to-integrate-your-code-with-the-image'>
|
|
||||||
<title>Use <filename>devtool add</filename> to Integrate Your Code with the Image</title>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para><emphasis>Add a New Recipe</emphasis>:
|
||||||
The <filename>devtool add</filename> command automatically
|
The <filename>devtool add</filename> command automatically
|
||||||
generates the needed Metadata that allows the OpenEmbedded
|
generates the needed Metadata that allows the OpenEmbedded
|
||||||
build system to build your code into the image.
|
build system to build your code.
|
||||||
<note>
|
Following are some forms you can use to enter the command:
|
||||||
If a package or packages produced by the recipe on which
|
|
||||||
you are working are not already in
|
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
|
|
||||||
for the image, you must add them.
|
|
||||||
The <filename>devtool add</filename> command does not
|
|
||||||
add them for you.
|
|
||||||
</note>
|
|
||||||
Use the following command form:
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ devtool add <replaceable>your-project-name</replaceable> <replaceable>path-to-source</replaceable>
|
$ devtool add [<replaceable>recipe_name</replaceable>] <replaceable>source_path</replaceable>
|
||||||
|
$ devtool add [<replaceable>recipe_name</replaceable>] <replaceable>source_path remote_URL</replaceable>
|
||||||
|
$ devtool add [<replaceable>recipe_name</replaceable>] <replaceable>remote_URL</replaceable>
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
The <filename>devtool</filename> command automatically detects the
|
||||||
|
<replaceable>recipe_name</replaceable> and, in many cases, the
|
||||||
<para>
|
version if you do not supply a name or version with the command.</para>
|
||||||
Running <filename>devtool</filename> for the first time
|
<para>Running <filename>devtool</filename> for the first time
|
||||||
creates a workspace layer through the
|
creates a workspace layer, which by default is named
|
||||||
<filename>bblayers.conf</filename> file that
|
"workspace", and adds it to your
|
||||||
is based on your project's location:
|
<filename>conf/bblayers.conf</filename> file:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
<replaceable>path-to-source</replaceable>/<replaceable>build-directory</replaceable>/<replaceable>workspace-layer</replaceable>
|
<replaceable>source_path</replaceable>/<replaceable>build_directory</replaceable>/<replaceable>workspace_layer</replaceable>
|
||||||
</literallayout>
|
</literallayout>
|
||||||
By default, the name of the workspace layer is "workspace".
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For details on the workspace layer created in the
|
For details on the workspace layer created in the
|
||||||
<replaceable>build-directory</replaceable>,
|
<replaceable>build-directory</replaceable>,
|
||||||
see the
|
see the
|
||||||
"<link linkend='devtool-adding-a-new-recipe-to-the-workspace'>Adding a New Recipe to the Workspace Layer</link>"
|
"<link linkend='devtool-the-workspace-layer-structure'>The Workspace Layer Structure</link>"
|
||||||
section.
|
section.</para>
|
||||||
</para>
|
<para>You can also specify a <replaceable>remote_URL</replaceable>
|
||||||
|
from which to download source instead of (or in addition
|
||||||
<!--
|
to) specifying a <replaceable>source_path</replaceable>.
|
||||||
<para>
|
If you specify a URL but not a <replaceable>source_path</replaceable>,
|
||||||
Of course, each layer must have a
|
<filename>devtool</filename> uses a subdirectory called "sources"
|
||||||
<filename>layer.conf</filename> configuration file.
|
within <filename>workspace</filename> to house the source files.</para>
|
||||||
<filename>devtool</filename> also creates this configuration
|
<para>Here is an example command that provides the
|
||||||
file:
|
<replaceable>remote_URL</replaceable> only:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cat workspace/conf/layer.conf
|
$ devtool add ftp://ftp.bitwizard.nl/mtr/mtr-0.86.tar.gz
|
||||||
# ### workspace layer autogenerated by devtool ###
|
NOTE: Creating workspace layer in /home/scottrif/poky/build/workspace
|
||||||
BBPATH =. "${LAYERDIR}:"
|
NOTE: Enabling workspace layer in bblayers.conf
|
||||||
BBFILES += "${LAYERDIR}/recipes/*/*.bb \
|
NOTE: Using default source tree path /home/scottrif/poky/build/workspace/sources/mtr
|
||||||
${LAYERDIR}/appends/*.bbappend"
|
NOTE: Recipe /home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb
|
||||||
BBFILE_COLLECTIONS += "workspacelayer"
|
has been automatically created; further editing may be required to
|
||||||
BBFILE_PATTERN_workspacelayer = "^${LAYERDIR}/"
|
make it fully functional
|
||||||
BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1"
|
$
|
||||||
BBFILE_PRIORITY_workspacelayer = "99"
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
In this example, <filename>devtool</filename> detected both
|
||||||
-->
|
a recipe name and version from the software for use when
|
||||||
|
creating the <filename>mtr_0.86.bb</filename> recipe file.
|
||||||
<para>
|
Because no <filename>source_path</filename> was provided, the
|
||||||
Running <filename>devtool add</filename> automatically
|
tool also created the default directory
|
||||||
generates your recipe:
|
<filename>sources/mtr/</filename> in the created
|
||||||
|
<filename>workspace</filename> directory.</para>
|
||||||
|
<para>If you are using <filename>devtool add</filename>
|
||||||
|
to fetch source from a remote URL, the command turns
|
||||||
|
the source directory into a Git repository if one does
|
||||||
|
not already exist.
|
||||||
|
You can disable this behavior by using the "--no-git"
|
||||||
|
option.
|
||||||
|
The <filename>devtool add</filename> command does this in
|
||||||
|
order to support using
|
||||||
|
<filename>devtool update-recipe</filename>, shown as step
|
||||||
|
5 in the flow diagram, to later create patches.
|
||||||
|
<tip>
|
||||||
|
In case you ever need to locate the directory in which
|
||||||
|
<filename>devtool</filename> creates the recipe or, you
|
||||||
|
need to locate the source, you can use <filename>devtool</filename>
|
||||||
|
to check status:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cat workspace/recipes/<replaceable>your-project-name</replaceable>/<replaceable>your-project-name</replaceable>.bb
|
$ devtool status
|
||||||
# Recipe created by recipetool
|
mtr: /home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
|
||||||
# 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 = ""
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
Continuing with the example, the tool returns the location
|
||||||
|
for the source followed by the location and name of the
|
||||||
<para>
|
recipe.
|
||||||
Lastly, the <filename>devtool add</filename> command creates the
|
</tip>
|
||||||
<filename>.bbappend</filename> file:
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Edit the Recipe</emphasis>:
|
||||||
|
At this point, you can use <filename>devtool edit-recipe</filename>
|
||||||
|
to open up the editor as defined by the
|
||||||
|
<filename>$EDITOR</filename> environment variable
|
||||||
|
and modify the file:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cat workspace/appends/<replaceable>your-project-name</replaceable>.bbappend
|
$ devtool edit-recipe <replaceable>recipe</replaceable>
|
||||||
inherit externalsrc
|
|
||||||
EXTERNALSRC = "/<replaceable>path-to-source</replaceable>/<replaceable>your-project-name</replaceable>"
|
|
||||||
|
|
||||||
# initial_rev: <replaceable>commit-ID</replaceable>
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
From within the editor, you can make modifications to the
|
||||||
|
recipe that take affect when you build it later.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Build the Recipe or Rebuild the Image</emphasis>:
|
||||||
|
At this point in the flow, the next step you
|
||||||
|
take depends on what you are going to do with
|
||||||
|
the new code.</para>
|
||||||
|
<para>If you need to take the build output and eventually
|
||||||
|
move it to the target hardware, you would use
|
||||||
|
<filename>devtool build</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ devtool build <replaceable>recipe</replaceable>
|
||||||
|
</literallayout></para>
|
||||||
|
<para>On the other hand, if you want an image to
|
||||||
|
contain the recipe's packages for immediate deployment
|
||||||
|
onto a device (e.g. for testing purposes), you can use
|
||||||
|
the <filename>devtool build-image</filename> command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ devtool build-image <replaceable>image</replaceable>
|
||||||
|
</literallayout>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Deploy the Build Output</emphasis>:
|
||||||
|
When you use the <filename>devtool build</filename>
|
||||||
|
command to build out your recipe, you probably want to
|
||||||
|
see if the resulting build output works as expected on target
|
||||||
|
hardware.
|
||||||
|
You can deploy your build output to that target hardware by
|
||||||
|
using the <filename>devtool deploy-target</filename> command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ devtool deploy-target <replaceable>recipe target</replaceable>
|
||||||
|
</literallayout>
|
||||||
|
The <replaceable>target</replaceable> is a live target machine
|
||||||
|
running as an SSH server.</para>
|
||||||
|
|
||||||
|
<para>You can, of course, also deploy the image you build
|
||||||
|
using the <filename>devtool build-image</filename> command
|
||||||
|
to actual hardware.
|
||||||
|
However, <filename>devtool</filename> does not provide a
|
||||||
|
specific command that allows you to do this.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Optionally Update the Recipe With Patch Files</emphasis>:
|
||||||
|
Once you are satisfied with the recipe you probably want
|
||||||
|
to generate patch files that go with the recipe.
|
||||||
|
You do this before moving the recipe
|
||||||
|
to its final layer and cleaning up the workspace area
|
||||||
|
<filename>devtool</filename> uses.
|
||||||
|
This optional step is especially relevant if you are
|
||||||
|
using or adding third-party software.</para>
|
||||||
|
<para>To convert commits created using Git to patch files,
|
||||||
|
use the <filename>devtool update-recipe</filename> command.
|
||||||
|
<note>
|
||||||
|
Any patches added, removed, or otherwise must be
|
||||||
|
previously committed to the upstream Git repository.
|
||||||
|
</note>
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ devtool update-recipe <replaceable>recipe_name</replaceable>
|
||||||
|
</literallayout>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Move the Recipe to its Permanent Layer</emphasis>:
|
||||||
|
Before cleaning up the workspace, you need to move the
|
||||||
|
final recipe to its permanent layer.
|
||||||
|
You must do this before using the
|
||||||
|
<filename>devtool reset</filename> command if you want to
|
||||||
|
retain the recipe.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Reset the Recipe</emphasis>:
|
||||||
|
As a final step, you can restore the state such that
|
||||||
|
standard layers and the upstream source is used to build
|
||||||
|
the recipe rather than data in the workspace.
|
||||||
|
To reset the recipe, use the <filename>devtool reset</filename>
|
||||||
|
command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ devtool reset <replaceable>recipe</replaceable>
|
||||||
|
</literallayout>
|
||||||
|
</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='build-your-project'>
|
|
||||||
<title>Build Your Project</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can use BitBake or <filename>devtool build</filename> to
|
|
||||||
build your modified project.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To use BitBake, use the following:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake <replaceable>your-project-name</replaceable>
|
|
||||||
</literallayout>
|
|
||||||
Alternatively, you can use
|
|
||||||
<filename>devtool build</filename>, which is equivalent to
|
|
||||||
<filename>bitbake -c populate_sysroot</filename>.
|
|
||||||
For example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ devtool build <replaceable>your-project-name</replaceable>
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<section id='dev-build-the-image'>
|
|
||||||
<title>Build the Image</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The final step before testing is to rebuild the base image
|
|
||||||
with your project changes as part of the image.
|
|
||||||
Simply run BitBake again on your image.
|
|
||||||
Here is an example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake <replaceable>image</replaceable>
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='dev-testing-the-image'>
|
|
||||||
<title>Testing the Image</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Once you have the image, you can test it using QEMU.
|
|
||||||
Here is an example assuming "qemux86":
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ runqemu qemux86 <replaceable>image</replaceable>
|
|
||||||
</literallayout>
|
|
||||||
For information on how to test an image using QEMU, see the
|
|
||||||
"<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
|
|
||||||
section.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
-->
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='devtool-quick-reference'>
|
<section id='devtool-quick-reference'>
|
||||||
|
@ -1959,7 +1962,7 @@
|
||||||
adding a new recipe and the supporting Metadata to a temporary
|
adding a new recipe and the supporting Metadata to a temporary
|
||||||
workspace layer.
|
workspace layer.
|
||||||
This section provides a short reference on
|
This section provides a short reference on
|
||||||
<filename>devtool</filename> for most of the commands.
|
<filename>devtool</filename> and its commands.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='devtool-getting-help'>
|
<section id='devtool-getting-help'>
|
||||||
|
@ -1993,6 +1996,8 @@
|
||||||
undeploy-target Undeploy recipe output files in live target machine
|
undeploy-target Undeploy recipe output files in live target machine
|
||||||
search Search available recipes
|
search Search available recipes
|
||||||
build Build a recipe
|
build Build a recipe
|
||||||
|
edit-recipe Edit a recipe file in your workspace
|
||||||
|
configure-help Get help on configure script options
|
||||||
add Add a new recipe
|
add Add a new recipe
|
||||||
modify Modify the source for an existing recipe
|
modify Modify the source for an existing recipe
|
||||||
extract Extract the source for an existing recipe
|
extract Extract the source for an existing recipe
|
||||||
|
@ -2000,7 +2005,6 @@
|
||||||
update-recipe Apply changes from external source tree to recipe
|
update-recipe Apply changes from external source tree to recipe
|
||||||
status Show workspace status
|
status Show workspace status
|
||||||
reset Remove a recipe from your workspace
|
reset Remove a recipe from your workspace
|
||||||
edit-recipe Edit a recipe file in your workspace
|
|
||||||
build-image Build image including workspace recipe packages
|
build-image Build image including workspace recipe packages
|
||||||
|
|
||||||
Use devtool <subcommand> --help to get help on a specific command
|
Use devtool <subcommand> --help to get help on a specific command
|
||||||
|
@ -2015,6 +2019,7 @@
|
||||||
$ devtool add --help
|
$ devtool add --help
|
||||||
usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
|
usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
|
||||||
[--version VERSION] [--no-git] [--binary] [--also-native]
|
[--version VERSION] [--no-git] [--binary] [--also-native]
|
||||||
|
[--src-subdir SUBDIR]
|
||||||
[recipename] [srctree] [fetchuri]
|
[recipename] [srctree] [fetchuri]
|
||||||
|
|
||||||
Adds a new recipe to the workspace to build a specified source tree. Can
|
Adds a new recipe to the workspace to build a specified source tree. Can
|
||||||
|
@ -2026,7 +2031,7 @@
|
||||||
auto-detect it.
|
auto-detect it.
|
||||||
srctree Path to external source tree. If not specified, a
|
srctree Path to external source tree. If not specified, a
|
||||||
subdirectory of
|
subdirectory of
|
||||||
/home/<replaceable>user</replaceable>/poky/build/workspace/sources will be
|
/home/scottrif/poky/build/workspace/sources will be
|
||||||
used.
|
used.
|
||||||
fetchuri Fetch the specified URI and extract it to create the
|
fetchuri Fetch the specified URI and extract it to create the
|
||||||
source tree
|
source tree
|
||||||
|
@ -2047,6 +2052,52 @@
|
||||||
structure). Useful with binary packages e.g. RPMs.
|
structure). Useful with binary packages e.g. RPMs.
|
||||||
--also-native Also add native variant (i.e. support building recipe
|
--also-native Also add native variant (i.e. support building recipe
|
||||||
for the build host as well as the target machine)
|
for the build host as well as the target machine)
|
||||||
|
--src-subdir SUBDIR Specify subdirectory within source tree to use
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='devtool-the-workspace-layer-structure'>
|
||||||
|
<title>The Workspace Layer Structure</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<filename>devtool</filename> uses a "Workspace" layer
|
||||||
|
in which to accomplish builds.
|
||||||
|
This layer is not specific to any single
|
||||||
|
<filename>devtool</filename> command but is rather a common
|
||||||
|
working area used across the tool.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following figure shows the workspace structure:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<imagedata fileref="figures/build-workspace-directory.png"
|
||||||
|
width="6in" depth="5in" align="left" scale="70" />
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
README - Provides information on what is in workspace layer and how to
|
||||||
|
manage it.
|
||||||
|
|
||||||
|
.devtool_md5 - A checksum file used by devtool.
|
||||||
|
|
||||||
|
appends - A directory that contains *.bbappend files, which point to
|
||||||
|
external source.
|
||||||
|
|
||||||
|
conf - A configuration directory that contains the layer.conf file.
|
||||||
|
|
||||||
|
recipes - A directory containing recipes. This directory contains a
|
||||||
|
folder for each directory added whose name matches that of the
|
||||||
|
added recipe. devtool places the <replaceable>recipe</replaceable>.bb file
|
||||||
|
within that sub-directory.
|
||||||
|
|
||||||
|
sources - A directory containing a working copy of the source files used
|
||||||
|
when building the recipe. This directory contains a
|
||||||
|
folder for each set of source files matched to a corresponding
|
||||||
|
recipe.
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
@ -2065,49 +2116,26 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following example creates and adds a new recipe named
|
The following example creates and adds a new recipe named
|
||||||
<filename>jackson</filename> to the workspace layer.
|
<filename>jackson</filename> to a workspace layer the tool creates.
|
||||||
The source code built by the recipes resides in
|
The source code built by the recipes resides in
|
||||||
<filename>/home/scottrif/sources/jackson</filename>:
|
<filename>/home/scottrif/sources/jackson</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ devtool add jackson /home/scottrif/sources/jackson
|
$ devtool add jackson /home/scottrif/sources/jackson
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool add --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you add a recipe and the workspace layer does not exist,
|
If you add a recipe and the workspace layer does not exist,
|
||||||
the command creates the layer and populates it as follows:
|
the command creates the layer and populates it as
|
||||||
</para>
|
described in
|
||||||
|
"<link linkend='devtool-the-workspace-layer-structure'>The Workspace Layer Structure</link>"
|
||||||
<para>
|
section.
|
||||||
<imagedata fileref="figures/build-workspace-directory.png"
|
|
||||||
width="6in" depth="4in" align="center" scale="100" />
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
README - Provides information on what is in workspace layer and how to
|
|
||||||
manage it.
|
|
||||||
|
|
||||||
appends - A directory that contains *.bbappend files, which point to
|
|
||||||
external source.
|
|
||||||
|
|
||||||
conf - A configuration directory that contains the layer.conf file.
|
|
||||||
|
|
||||||
recipes - A directory containing recipes. This directory contains a
|
|
||||||
folder for each directory added whose name matches that of the
|
|
||||||
added recipe. devtool places the <replaceable>recipe</replaceable>.bb file
|
|
||||||
within that sub-directory.
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Running <filename>devtool add</filename> when the
|
Running <filename>devtool add</filename> when the
|
||||||
workspace layer exists causes the tool to add the recipe
|
workspace layer exists causes the tool to add the recipe,
|
||||||
and append files into the existing workspace layer.
|
append files, and source files into the existing workspace layer.
|
||||||
The <filename>.bbappend</filename> file is created to point
|
The <filename>.bbappend</filename> file is created to point
|
||||||
to the external source tree.
|
to the external source tree.
|
||||||
</para>
|
</para>
|
||||||
|
@ -2130,10 +2158,6 @@
|
||||||
development branch into which you can checkout the source
|
development branch into which you can checkout the source
|
||||||
and whether or not to keep a temporary directory, which is
|
and whether or not to keep a temporary directory, which is
|
||||||
useful for debugging.
|
useful for debugging.
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool extract --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2155,10 +2179,6 @@
|
||||||
development branch into which you can checkout the source
|
development branch into which you can checkout the source
|
||||||
and whether or not to keep a temporary directory, which is
|
and whether or not to keep a temporary directory, which is
|
||||||
useful for debugging.
|
useful for debugging.
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool sync --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2188,10 +2208,6 @@
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Using the above command form, the default development branch
|
Using the above command form, the default development branch
|
||||||
would be "devtool".
|
would be "devtool".
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool modify --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2215,10 +2231,6 @@
|
||||||
"-a" or "--any-recipe" option.
|
"-a" or "--any-recipe" option.
|
||||||
Using either of these options allows you to edit any recipe
|
Using either of these options allows you to edit any recipe
|
||||||
regardless of its location.
|
regardless of its location.
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool edit-recipe --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2268,10 +2280,6 @@
|
||||||
file.
|
file.
|
||||||
If an append file already exists, the command updates it
|
If an append file already exists, the command updates it
|
||||||
appropriately.
|
appropriately.
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool update-recipe --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2298,10 +2306,6 @@
|
||||||
the source revision to which you want to upgrade (i.e. the
|
the source revision to which you want to upgrade (i.e. the
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>,
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>,
|
||||||
whether or not to apply patches, and so forth.
|
whether or not to apply patches, and so forth.
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool upgrade --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2326,10 +2330,18 @@
|
||||||
the recipe or the append files have been modified, the
|
the recipe or the append files have been modified, the
|
||||||
command preserves the modified files in a separate "attic"
|
command preserves the modified files in a separate "attic"
|
||||||
subdirectory under the workspace layer.
|
subdirectory under the workspace layer.
|
||||||
<note>
|
</para>
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool reset --help</filename> command.
|
<para>
|
||||||
</note>
|
Here is an example that resets the workspace directory that
|
||||||
|
contains the <filename>mtr</filename> recipe:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ devtool reset mtr
|
||||||
|
NOTE: Cleaning sysroot for recipe mtr...
|
||||||
|
NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/mtr as-is; if you no
|
||||||
|
longer need it then please delete it manually
|
||||||
|
$
|
||||||
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2353,10 +2365,6 @@
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ devtool build <replaceable>recipe</replaceable>
|
$ devtool build <replaceable>recipe</replaceable>
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool build --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2367,6 +2375,10 @@
|
||||||
Use the <filename>devtool build-image</filename> command
|
Use the <filename>devtool build-image</filename> command
|
||||||
to build an image, extending it to include packages from
|
to build an image, extending it to include packages from
|
||||||
recipes in the workspace.
|
recipes in the workspace.
|
||||||
|
Using this command is useful when you want an image that
|
||||||
|
ready for immediate deployment onto a device for testing.
|
||||||
|
For proper integration into a final image, you need to
|
||||||
|
edit your custom image recipe appropriately.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -2407,12 +2419,6 @@
|
||||||
You should never use it to update an image that will be
|
You should never use it to update an image that will be
|
||||||
used in production.
|
used in production.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool deploy-target --help</filename>
|
|
||||||
command.
|
|
||||||
</para>
|
|
||||||
</note>
|
</note>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
@ -2433,10 +2439,6 @@
|
||||||
The <replaceable>target</replaceable> is the address of the
|
The <replaceable>target</replaceable> is the address of the
|
||||||
target machine, which must be running an SSH server (i.e.
|
target machine, which must be running an SSH server (i.e.
|
||||||
<filename>user@hostname</filename>).
|
<filename>user@hostname</filename>).
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool undeploy-target --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2459,10 +2461,6 @@
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ devtool create-workspace
|
$ devtool create-workspace
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool create-workspace --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -2492,6 +2490,15 @@
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
devtool status
|
devtool status
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
Following is sample output after using
|
||||||
|
<link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>devtool add</filename></link>
|
||||||
|
to create and add the <filename>mtr_0.86.bb</filename> recipe
|
||||||
|
to the <filename>workspace</filename> directory:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ devtool status
|
||||||
|
mtr: /home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
|
||||||
|
$
|
||||||
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -2512,10 +2519,6 @@
|
||||||
you must supply a <replaceable>keyword</replaceable>.
|
you must supply a <replaceable>keyword</replaceable>.
|
||||||
The command uses the <replaceable>keyword</replaceable> when
|
The command uses the <replaceable>keyword</replaceable> when
|
||||||
searching for a match.
|
searching for a match.
|
||||||
<note>
|
|
||||||
For complete syntax, use the
|
|
||||||
<filename>devtool search --help</filename> command.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue