summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-01-29 13:07:47 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-03 17:40:12 +0000
commit9582da61de441ba2c5b347a299c6e66a04b087a7 (patch)
tree1615c9047852f35c9944ac46555c5323dd9c0e79 /documentation/dev-manual
parent740369fa145e056ecba89cfde62d7d250fec1352 (diff)
downloadpoky-9582da61de441ba2c5b347a299c6e66a04b087a7.tar.gz
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>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-model.xml543
1 files changed, 273 insertions, 270 deletions
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml
index d2ab2d7f41..d3fadbd1f7 100644
--- a/documentation/dev-manual/dev-manual-model.xml
+++ b/documentation/dev-manual/dev-manual-model.xml
@@ -6,6 +6,10 @@
6 6
7<title>Common Development Models</title> 7<title>Common Development Models</title>
8 8
9<para role='writernotes'>
10 Test paragraph.
11</para>
12
9<para> 13<para>
10 Many development models exist for which you can use the Yocto Project. 14 Many development models exist for which you can use the Yocto Project.
11 This chapter overviews simple methods that use tools provided by the 15 This chapter overviews simple methods that use tools provided by the
@@ -1743,212 +1747,211 @@
1743 As mentioned earlier, <filename>devtool</filename> helps 1747 As mentioned earlier, <filename>devtool</filename> helps
1744 you easily develop projects whose build output must be part of 1748 you easily develop projects whose build output must be part of
1745 an image built using the OpenEmbedded build system. 1749 an image built using the OpenEmbedded build system.
1746 The remainder of this section presents the workflow you would
1747 use that includes <filename>devtool</filename>.
1748 <footnote>
1749 <para>
1750 Kudos and thanks to
1751 <ulink url='mailto:twoerner@gmail.com'>Trevor Woerner</ulink>
1752 whose
1753 "<ulink url='https://drive.google.com/file/d/0B3KGzY5fW7laTDVxUXo3UDRvd2s/view'>Yocto Project Developer Workflow Tutorial</ulink>"
1754 paper contributed nicely towards the development of this
1755 section.
1756 </para>
1757 </footnote>
1758 </para> 1750 </para>
1759 1751
1760 <para> 1752 <para>
1761 The steps in this section assume you have a previously built 1753 Three entry points exist that allow you develop using
1762 image that is already either running in QEMU or running on actual 1754 <filename>devtool</filename>:
1763 hardware. 1755 <itemizedlist>
1764 Also, it is assumed that for deployment of the image to the 1756 <listitem><para><emphasis><filename>devtool add</filename></emphasis>
1765 target, SSH is installed in the image and if the image is running 1757 </para></listitem>
1766 on real hardware that you have network access to and from your 1758 <listitem><para><emphasis><filename>devtool modify</filename></emphasis>
1767 development machine. 1759 </para></listitem>
1760 <listitem><para><emphasis><filename>devtool upgrade</filename></emphasis>
1761 </para></listitem>
1762 </itemizedlist>
1768 </para> 1763 </para>
1769 1764
1770 <section id='update-your-external-source'> 1765 <para>
1771 <title>Update Your External Source</title> 1766 The remainder of this section presents these workflows.
1772 1767 <note>
1773 <para> 1768 The steps in this section assume you have a previously built
1774 Part of the development flow using 1769 image that is already either running in QEMU or running on actual
1775 <filename>devtool</filename> of course involves updating 1770 hardware.
1776 your source files. 1771 Also, it is assumed that for deployment of the image to the
1777 Several opportunities exist in the workflow to extract and 1772 target, SSH is installed in the image and if the image is running
1778 work on the files. 1773 on real hardware that you have network access to and from your
1779 For now, just realize that you need to be able to have 1774 development machine.
1780 access to and edit files. 1775 </note>
1781 One obvious solution is to initially extract the code into an 1776 </para>
1782 isolated area in preparation for modification.
1783 </para>
1784
1785 <para>
1786 Another option is to use the
1787 <filename>devtool modify</filename> command.
1788 This command makes use of a "workspace" layer where much of
1789 the transitional work occurs, which is needed for setting up
1790 Metadata used by the OpenEmbedded build system that lets you
1791 build your software.
1792 Options (i.e. "-x") exist using <filename>devtool</filename>
1793 that enable you to use the tool to extract source code.
1794 </para>
1795 </section>
1796
1797 <section id='use-devtool-to-integrate-your-code-with-the-image'>
1798 <title>Use <filename>devtool add</filename> to Integrate Your Code with the Image</title>
1799
1800 <para>
1801 The <filename>devtool add</filename> command automatically
1802 generates the needed Metadata that allows the OpenEmbedded
1803 build system to build your code into the image.
1804 <note>
1805 If a package or packages produced by the recipe on which
1806 you are working are not already in
1807 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
1808 for the image, you must add them.
1809 The <filename>devtool add</filename> command does not
1810 add them for you.
1811 </note>
1812 Use the following command form:
1813 <literallayout class='monospaced'>
1814 $ devtool add <replaceable>your-project-name</replaceable>&nbsp;<replaceable>path-to-source</replaceable>
1815 </literallayout>
1816 </para>
1817
1818 <para>
1819 Running <filename>devtool</filename> for the first time
1820 creates a workspace layer through the
1821 <filename>bblayers.conf</filename> file that
1822 is based on your project's location:
1823 <literallayout class='monospaced'>
1824 <replaceable>path-to-source</replaceable>/<replaceable>build-directory</replaceable>/<replaceable>workspace-layer</replaceable>
1825 </literallayout>
1826 By default, the name of the workspace layer is "workspace".
1827 </para>
1828
1829 <para>
1830 For details on the workspace layer created in the
1831 <replaceable>build-directory</replaceable>,
1832 see the
1833 "<link linkend='devtool-adding-a-new-recipe-to-the-workspace'>Adding a New Recipe to the Workspace Layer</link>"
1834 section.
1835 </para>
1836
1837<!--
1838 <para>
1839 Of course, each layer must have a
1840 <filename>layer.conf</filename> configuration file.
1841 <filename>devtool</filename> also creates this configuration
1842 file:
1843 <literallayout class='monospaced'>
1844 $ cat workspace/conf/layer.conf
1845 # ### workspace layer auto­generated by devtool ###
1846 BBPATH =. "${LAYERDIR}:"
1847 BBFILES += "${LAYERDIR}/recipes/*/*.bb \
1848 ${LAYERDIR}/appends/*.bbappend"
1849 BBFILE_COLLECTIONS += "workspacelayer"
1850 BBFILE_PATTERN_workspacelayer = "^${LAYERDIR}/"
1851 BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1"
1852 BBFILE_PRIORITY_workspacelayer = "99"
1853 </literallayout>
1854 </para>
1855-->
1856
1857 <para>
1858 Running <filename>devtool add</filename> automatically
1859 generates your recipe:
1860 <literallayout class='monospaced'>
1861 $ cat workspace/recipes/<replaceable>your-project-name</replaceable>/<replaceable>your-project-name</replaceable>.bb
1862 # Recipe created by recipetool
1863 # This is the basis of a recipe and may need further editing in order to be fully functional.
1864 # (Feel free to remove these comments when editing.)
1865 #
1866 # Unable to find any files that looked like license statements. Check the accompanying
1867 # documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.
1868 LICENSE = "CLOSED"
1869 LIC_FILES_CHKSUM = ""
1870
1871 # No information for SRC_URI yet (only an external source tree was
1872 # specified)
1873 SRC_URI = ""
1874
1875 DEPENDS = "libx11"
1876 # NOTE: if this software is not capable of being built in a separate build directory
1877 # from the source, you should replace autotools with autotools­-brokensep in the
1878 # inherit line
1879 inherit autotools
1880
1881 # Specify any options you want to pass to the configure script using EXTRA_OECONF:
1882 EXTRA_OECONF = ""
1883 </literallayout>
1884 </para>
1885
1886 <para>
1887 Lastly, the <filename>devtool add</filename> command creates the
1888 <filename>.bbappend</filename> file:
1889 <literallayout class='monospaced'>
1890 $ cat workspace/appends/<replaceable>your-project-name</replaceable>.bbappend
1891 inherit externalsrc
1892 EXTERNALSRC = "/<replaceable>path-to-source</replaceable>/<replaceable>your-project-name</replaceable>"
1893
1894 # initial_rev: <replaceable>commit-ID</replaceable>
1895 </literallayout>
1896 </para>
1897 </section>
1898 1777
1899 <section id='build-your-project'> 1778 <section id='use-devtool-to-integrate-new-code'>
1900 <title>Build Your Project</title> 1779 <title>Use <filename>devtool add</filename> to Integrate New Code</title>
1901 1780
1902 <para> 1781 <para>
1903 You can use BitBake or <filename>devtool build</filename> to 1782 This section describes the <filename>devtool</filename>
1904 build your modified project. 1783 workflow to integrate new code.
1784 With this workflow, you can either build and deploy
1785 your code or rebuild an image that contains your code.
1905 </para> 1786 </para>
1906 1787
1907 <para> 1788 <para>
1908 To use BitBake, use the following: 1789 <imagedata fileref="figures/devtool-add-flow.png" align="center" />
1909 <literallayout class='monospaced'>
1910 $ bitbake <replaceable>your-project-name</replaceable>
1911 </literallayout>
1912 Alternatively, you can use
1913 <filename>devtool build</filename>, which is equivalent to
1914 <filename>bitbake -c populate_sysroot</filename>.
1915 For example:
1916 <literallayout class='monospaced'>
1917 $ devtool build <replaceable>your-project-name</replaceable>
1918 </literallayout>
1919 </para> 1790 </para>
1920 </section>
1921
1922<!--
1923 <section id='dev-build-the-image'>
1924 <title>Build the Image</title>
1925 1791
1926 <para> 1792 <para>
1927 The final step before testing is to rebuild the base image 1793 <orderedlist>
1928 with your project changes as part of the image. 1794 <listitem><para><emphasis>Add a New Recipe</emphasis>:
1929 Simply run BitBake again on your image. 1795 The <filename>devtool add</filename> command automatically
1930 Here is an example: 1796 generates the needed Metadata that allows the OpenEmbedded
1931 <literallayout class='monospaced'> 1797 build system to build your code.
1932 $ bitbake <replaceable>image</replaceable> 1798 Following are some forms you can use to enter the command:
1933 </literallayout> 1799 <literallayout class='monospaced'>
1934 </para> 1800 $ devtool add [<replaceable>recipe_name</replaceable>]&nbsp;<replaceable>source_path</replaceable>
1935 </section> 1801 $ devtool add [<replaceable>recipe_name</replaceable>]&nbsp;<replaceable>source_path remote_URL</replaceable>
1936 1802 $ devtool add [<replaceable>recipe_name</replaceable>]&nbsp;<replaceable>remote_URL</replaceable>
1937 <section id='dev-testing-the-image'> 1803 </literallayout>
1938 <title>Testing the Image</title> 1804 The <filename>devtool</filename> command automatically detects the
1939 1805 <replaceable>recipe_name</replaceable> and, in many cases, the
1940 <para> 1806 version if you do not supply a name or version with the command.</para>
1941 Once you have the image, you can test it using QEMU. 1807 <para>Running <filename>devtool</filename> for the first time
1942 Here is an example assuming "qemux86": 1808 creates a workspace layer, which by default is named
1943 <literallayout class='monospaced'> 1809 "workspace", and adds it to your
1944 $ runqemu qemux86 <replaceable>image</replaceable> 1810 <filename>conf/bblayers.conf</filename> file:
1945 </literallayout> 1811 <literallayout class='monospaced'>
1946 For information on how to test an image using QEMU, see the 1812 <replaceable>source_path</replaceable>/<replaceable>build_directory</replaceable>/<replaceable>workspace_layer</replaceable>
1947 "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>" 1813 </literallayout>
1948 section. 1814 For details on the workspace layer created in the
1815 <replaceable>build-directory</replaceable>,
1816 see the
1817 "<link linkend='devtool-the-workspace-layer-structure'>The Workspace Layer Structure</link>"
1818 section.</para>
1819 <para>You can also specify a <replaceable>remote_URL</replaceable>
1820 from which to download source instead of (or in addition
1821 to) specifying a <replaceable>source_path</replaceable>.
1822 If you specify a URL but not a <replaceable>source_path</replaceable>,
1823 <filename>devtool</filename> uses a subdirectory called "sources"
1824 within <filename>workspace</filename> to house the source files.</para>
1825 <para>Here is an example command that provides the
1826 <replaceable>remote_URL</replaceable> only:
1827 <literallayout class='monospaced'>
1828 $ devtool add ftp://ftp.bitwizard.nl/mtr/mtr-0.86.tar.gz
1829 NOTE: Creating workspace layer in /home/scottrif/poky/build/workspace
1830 NOTE: Enabling workspace layer in bblayers.conf
1831 NOTE: Using default source tree path /home/scottrif/poky/build/workspace/sources/mtr
1832 NOTE: Recipe /home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb
1833 has been automatically created; further editing may be required to
1834 make it fully functional
1835 $
1836 </literallayout>
1837 In this example, <filename>devtool</filename> detected both
1838 a recipe name and version from the software for use when
1839 creating the <filename>mtr_0.86.bb</filename> recipe file.
1840 Because no <filename>source_path</filename> was provided, the
1841 tool also created the default directory
1842 <filename>sources/mtr/</filename> in the created
1843 <filename>workspace</filename> directory.</para>
1844 <para>If you are using <filename>devtool add</filename>
1845 to fetch source from a remote URL, the command turns
1846 the source directory into a Git repository if one does
1847 not already exist.
1848 You can disable this behavior by using the "--no-git"
1849 option.
1850 The <filename>devtool add</filename> command does this in
1851 order to support using
1852 <filename>devtool update-recipe</filename>, shown as step
1853 5 in the flow diagram, to later create patches.
1854 <tip>
1855 In case you ever need to locate the directory in which
1856 <filename>devtool</filename> creates the recipe or, you
1857 need to locate the source, you can use <filename>devtool</filename>
1858 to check status:
1859 <literallayout class='monospaced'>
1860 $ devtool status
1861 mtr: /home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
1862 $
1863 </literallayout>
1864 Continuing with the example, the tool returns the location
1865 for the source followed by the location and name of the
1866 recipe.
1867 </tip>
1868 </para></listitem>
1869 <listitem><para><emphasis>Edit the Recipe</emphasis>:
1870 At this point, you can use <filename>devtool edit-recipe</filename>
1871 to open up the editor as defined by the
1872 <filename>$EDITOR</filename> environment variable
1873 and modify the file:
1874 <literallayout class='monospaced'>
1875 $ devtool edit-recipe <replaceable>recipe</replaceable>
1876 </literallayout>
1877 From within the editor, you can make modifications to the
1878 recipe that take affect when you build it later.
1879 </para></listitem>
1880 <listitem><para><emphasis>Build the Recipe or Rebuild the Image</emphasis>:
1881 At this point in the flow, the next step you
1882 take depends on what you are going to do with
1883 the new code.</para>
1884 <para>If you need to take the build output and eventually
1885 move it to the target hardware, you would use
1886 <filename>devtool build</filename>:
1887 <literallayout class='monospaced'>
1888 $ devtool build <replaceable>recipe</replaceable>
1889 </literallayout></para>
1890 <para>On the other hand, if you want an image to
1891 contain the recipe's packages for immediate deployment
1892 onto a device (e.g. for testing purposes), you can use
1893 the <filename>devtool build-image</filename> command:
1894 <literallayout class='monospaced'>
1895 $ devtool build-image <replaceable>image</replaceable>
1896 </literallayout>
1897 </para></listitem>
1898 <listitem><para><emphasis>Deploy the Build Output</emphasis>:
1899 When you use the <filename>devtool build</filename>
1900 command to build out your recipe, you probably want to
1901 see if the resulting build output works as expected on target
1902 hardware.
1903 You can deploy your build output to that target hardware by
1904 using the <filename>devtool deploy-target</filename> command:
1905 <literallayout class='monospaced'>
1906 $ devtool deploy-target <replaceable>recipe target</replaceable>
1907 </literallayout>
1908 The <replaceable>target</replaceable> is a live target machine
1909 running as an SSH server.</para>
1910
1911 <para>You can, of course, also deploy the image you build
1912 using the <filename>devtool build-image</filename> command
1913 to actual hardware.
1914 However, <filename>devtool</filename> does not provide a
1915 specific command that allows you to do this.
1916 </para></listitem>
1917 <listitem><para><emphasis>Optionally Update the Recipe With Patch Files</emphasis>:
1918 Once you are satisfied with the recipe you probably want
1919 to generate patch files that go with the recipe.
1920 You do this before moving the recipe
1921 to its final layer and cleaning up the workspace area
1922 <filename>devtool</filename> uses.
1923 This optional step is especially relevant if you are
1924 using or adding third-party software.</para>
1925 <para>To convert commits created using Git to patch files,
1926 use the <filename>devtool update-recipe</filename> command.
1927 <note>
1928 Any patches added, removed, or otherwise must be
1929 previously committed to the upstream Git repository.
1930 </note>
1931 <literallayout class='monospaced'>
1932 $ devtool update-recipe <replaceable>recipe_name</replaceable>
1933 </literallayout>
1934 </para></listitem>
1935 <listitem><para><emphasis>Move the Recipe to its Permanent Layer</emphasis>:
1936 Before cleaning up the workspace, you need to move the
1937 final recipe to its permanent layer.
1938 You must do this before using the
1939 <filename>devtool reset</filename> command if you want to
1940 retain the recipe.
1941 </para></listitem>
1942 <listitem><para><emphasis>Reset the Recipe</emphasis>:
1943 As a final step, you can restore the state such that
1944 standard layers and the upstream source is used to build
1945 the recipe rather than data in the workspace.
1946 To reset the recipe, use the <filename>devtool reset</filename>
1947 command:
1948 <literallayout class='monospaced'>
1949 $ devtool reset <replaceable>recipe</replaceable>
1950 </literallayout>
1951 </para></listitem>
1952 </orderedlist>
1949 </para> 1953 </para>
1950 </section> 1954 </section>
1951-->
1952 </section> 1955 </section>
1953 1956
1954 <section id='devtool-quick-reference'> 1957 <section id='devtool-quick-reference'>
@@ -1959,7 +1962,7 @@
1959 adding a new recipe and the supporting Metadata to a temporary 1962 adding a new recipe and the supporting Metadata to a temporary
1960 workspace layer. 1963 workspace layer.
1961 This section provides a short reference on 1964 This section provides a short reference on
1962 <filename>devtool</filename> for most of the commands. 1965 <filename>devtool</filename> and its commands.
1963 </para> 1966 </para>
1964 1967
1965 <section id='devtool-getting-help'> 1968 <section id='devtool-getting-help'>
@@ -1993,6 +1996,8 @@
1993 undeploy-target Undeploy recipe output files in live target machine 1996 undeploy-target Undeploy recipe output files in live target machine
1994 search Search available recipes 1997 search Search available recipes
1995 build Build a recipe 1998 build Build a recipe
1999 edit-recipe Edit a recipe file in your workspace
2000 configure-help Get help on configure script options
1996 add Add a new recipe 2001 add Add a new recipe
1997 modify Modify the source for an existing recipe 2002 modify Modify the source for an existing recipe
1998 extract Extract the source for an existing recipe 2003 extract Extract the source for an existing recipe
@@ -2000,7 +2005,6 @@
2000 update-recipe Apply changes from external source tree to recipe 2005 update-recipe Apply changes from external source tree to recipe
2001 status Show workspace status 2006 status Show workspace status
2002 reset Remove a recipe from your workspace 2007 reset Remove a recipe from your workspace
2003 edit-recipe Edit a recipe file in your workspace
2004 build-image Build image including workspace recipe packages 2008 build-image Build image including workspace recipe packages
2005 2009
2006 Use devtool &lt;subcommand&gt; --help to get help on a specific command 2010 Use devtool &lt;subcommand&gt; --help to get help on a specific command
@@ -2015,6 +2019,7 @@
2015 $ devtool add --help 2019 $ devtool add --help
2016 usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI] 2020 usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
2017 [--version VERSION] [--no-git] [--binary] [--also-native] 2021 [--version VERSION] [--no-git] [--binary] [--also-native]
2022 [--src-subdir SUBDIR]
2018 [recipename] [srctree] [fetchuri] 2023 [recipename] [srctree] [fetchuri]
2019 2024
2020 Adds a new recipe to the workspace to build a specified source tree. Can 2025 Adds a new recipe to the workspace to build a specified source tree. Can
@@ -2026,7 +2031,7 @@
2026 auto-detect it. 2031 auto-detect it.
2027 srctree Path to external source tree. If not specified, a 2032 srctree Path to external source tree. If not specified, a
2028 subdirectory of 2033 subdirectory of
2029 /home/<replaceable>user</replaceable>/poky/build/workspace/sources will be 2034 /home/scottrif/poky/build/workspace/sources will be
2030 used. 2035 used.
2031 fetchuri Fetch the specified URI and extract it to create the 2036 fetchuri Fetch the specified URI and extract it to create the
2032 source tree 2037 source tree
@@ -2047,44 +2052,29 @@
2047 structure). Useful with binary packages e.g. RPMs. 2052 structure). Useful with binary packages e.g. RPMs.
2048 --also-native Also add native variant (i.e. support building recipe 2053 --also-native Also add native variant (i.e. support building recipe
2049 for the build host as well as the target machine) 2054 for the build host as well as the target machine)
2055 --src-subdir SUBDIR Specify subdirectory within source tree to use
2050 </literallayout> 2056 </literallayout>
2051 </para> 2057 </para>
2052 </section> 2058 </section>
2053 2059
2054 <section id='devtool-adding-a-new-recipe-to-the-workspace'> 2060 <section id='devtool-the-workspace-layer-structure'>
2055 <title>Adding a New Recipe to the Workspace Layer</title> 2061 <title>The Workspace Layer Structure</title>
2056 2062
2057 <para> 2063 <para>
2058 Use the <filename>devtool add</filename> command to add a new recipe 2064 <filename>devtool</filename> uses a "Workspace" layer
2059 to the workspace layer. 2065 in which to accomplish builds.
2060 The recipe you add should not exist - 2066 This layer is not specific to any single
2061 <filename>devtool</filename> creates it for you. 2067 <filename>devtool</filename> command but is rather a common
2062 The source files the recipe uses should exist in an external 2068 working area used across the tool.
2063 area.
2064 </para> 2069 </para>
2065 2070
2066 <para> 2071 <para>
2067 The following example creates and adds a new recipe named 2072 The following figure shows the workspace structure:
2068 <filename>jackson</filename> to the workspace layer.
2069 The source code built by the recipes resides in
2070 <filename>/home/scottrif/sources/jackson</filename>:
2071 <literallayout class='monospaced'>
2072 $ devtool add jackson /home/scottrif/sources/jackson
2073 </literallayout>
2074 <note>
2075 For complete syntax, use the
2076 <filename>devtool add --help</filename> command.
2077 </note>
2078 </para>
2079
2080 <para>
2081 If you add a recipe and the workspace layer does not exist,
2082 the command creates the layer and populates it as follows:
2083 </para> 2073 </para>
2084 2074
2085 <para> 2075 <para>
2086 <imagedata fileref="figures/build-workspace-directory.png" 2076 <imagedata fileref="figures/build-workspace-directory.png"
2087 width="6in" depth="4in" align="center" scale="100" /> 2077 width="6in" depth="5in" align="left" scale="70" />
2088 </para> 2078 </para>
2089 2079
2090 <para> 2080 <para>
@@ -2092,6 +2082,8 @@
2092 README - Provides information on what is in workspace layer and how to 2082 README - Provides information on what is in workspace layer and how to
2093 manage it. 2083 manage it.
2094 2084
2085 .devtool_md5 - A checksum file used by devtool.
2086
2095 appends - A directory that contains *.bbappend files, which point to 2087 appends - A directory that contains *.bbappend files, which point to
2096 external source. 2088 external source.
2097 2089
@@ -2101,13 +2093,49 @@
2101 folder for each directory added whose name matches that of the 2093 folder for each directory added whose name matches that of the
2102 added recipe. devtool places the <replaceable>recipe</replaceable>.bb file 2094 added recipe. devtool places the <replaceable>recipe</replaceable>.bb file
2103 within that sub-directory. 2095 within that sub-directory.
2096
2097 sources - A directory containing a working copy of the source files used
2098 when building the recipe. This directory contains a
2099 folder for each set of source files matched to a corresponding
2100 recipe.
2104 </literallayout> 2101 </literallayout>
2105 </para> 2102 </para>
2103 </section>
2104
2105 <section id='devtool-adding-a-new-recipe-to-the-workspace'>
2106 <title>Adding a New Recipe to the Workspace Layer</title>
2107
2108 <para>
2109 Use the <filename>devtool add</filename> command to add a new recipe
2110 to the workspace layer.
2111 The recipe you add should not exist -
2112 <filename>devtool</filename> creates it for you.
2113 The source files the recipe uses should exist in an external
2114 area.
2115 </para>
2116
2117 <para>
2118 The following example creates and adds a new recipe named
2119 <filename>jackson</filename> to a workspace layer the tool creates.
2120 The source code built by the recipes resides in
2121 <filename>/home/scottrif/sources/jackson</filename>:
2122 <literallayout class='monospaced'>
2123 $ devtool add jackson /home/scottrif/sources/jackson
2124 </literallayout>
2125 </para>
2126
2127 <para>
2128 If you add a recipe and the workspace layer does not exist,
2129 the command creates the layer and populates it as
2130 described in
2131 "<link linkend='devtool-the-workspace-layer-structure'>The Workspace Layer Structure</link>"
2132 section.
2133 </para>
2106 2134
2107 <para> 2135 <para>
2108 Running <filename>devtool add</filename> when the 2136 Running <filename>devtool add</filename> when the
2109 workspace layer exists causes the tool to add the recipe 2137 workspace layer exists causes the tool to add the recipe,
2110 and append files into the existing workspace layer. 2138 append files, and source files into the existing workspace layer.
2111 The <filename>.bbappend</filename> file is created to point 2139 The <filename>.bbappend</filename> file is created to point
2112 to the external source tree. 2140 to the external source tree.
2113 </para> 2141 </para>
@@ -2130,10 +2158,6 @@
2130 development branch into which you can checkout the source 2158 development branch into which you can checkout the source
2131 and whether or not to keep a temporary directory, which is 2159 and whether or not to keep a temporary directory, which is
2132 useful for debugging. 2160 useful for debugging.
2133 <note>
2134 For complete syntax, use the
2135 <filename>devtool extract --help</filename> command.
2136 </note>
2137 </para> 2161 </para>
2138 </section> 2162 </section>
2139 2163
@@ -2155,10 +2179,6 @@
2155 development branch into which you can checkout the source 2179 development branch into which you can checkout the source
2156 and whether or not to keep a temporary directory, which is 2180 and whether or not to keep a temporary directory, which is
2157 useful for debugging. 2181 useful for debugging.
2158 <note>
2159 For complete syntax, use the
2160 <filename>devtool sync --help</filename> command.
2161 </note>
2162 </para> 2182 </para>
2163 </section> 2183 </section>
2164 2184
@@ -2188,10 +2208,6 @@
2188 </literallayout> 2208 </literallayout>
2189 Using the above command form, the default development branch 2209 Using the above command form, the default development branch
2190 would be "devtool". 2210 would be "devtool".
2191 <note>
2192 For complete syntax, use the
2193 <filename>devtool modify --help</filename> command.
2194 </note>
2195 </para> 2211 </para>
2196 </section> 2212 </section>
2197 2213
@@ -2215,10 +2231,6 @@
2215 "-a" or "--any-recipe" option. 2231 "-a" or "--any-recipe" option.
2216 Using either of these options allows you to edit any recipe 2232 Using either of these options allows you to edit any recipe
2217 regardless of its location. 2233 regardless of its location.
2218 <note>
2219 For complete syntax, use the
2220 <filename>devtool edit-recipe --help</filename> command.
2221 </note>
2222 </para> 2234 </para>
2223 </section> 2235 </section>
2224 2236
@@ -2268,10 +2280,6 @@
2268 file. 2280 file.
2269 If an append file already exists, the command updates it 2281 If an append file already exists, the command updates it
2270 appropriately. 2282 appropriately.
2271 <note>
2272 For complete syntax, use the
2273 <filename>devtool update-recipe --help</filename> command.
2274 </note>
2275 </para> 2283 </para>
2276 </section> 2284 </section>
2277 2285
@@ -2298,10 +2306,6 @@
2298 the source revision to which you want to upgrade (i.e. the 2306 the source revision to which you want to upgrade (i.e. the
2299 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>, 2307 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>,
2300 whether or not to apply patches, and so forth. 2308 whether or not to apply patches, and so forth.
2301 <note>
2302 For complete syntax, use the
2303 <filename>devtool upgrade --help</filename> command.
2304 </note>
2305 </para> 2309 </para>
2306 </section> 2310 </section>
2307 2311
@@ -2326,10 +2330,18 @@
2326 the recipe or the append files have been modified, the 2330 the recipe or the append files have been modified, the
2327 command preserves the modified files in a separate "attic" 2331 command preserves the modified files in a separate "attic"
2328 subdirectory under the workspace layer. 2332 subdirectory under the workspace layer.
2329 <note> 2333 </para>
2330 For complete syntax, use the 2334
2331 <filename>devtool reset --help</filename> command. 2335 <para>
2332 </note> 2336 Here is an example that resets the workspace directory that
2337 contains the <filename>mtr</filename> recipe:
2338 <literallayout class='monospaced'>
2339 $ devtool reset mtr
2340 NOTE: Cleaning sysroot for recipe mtr...
2341 NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/mtr as-is; if you no
2342 longer need it then please delete it manually
2343 $
2344 </literallayout>
2333 </para> 2345 </para>
2334 </section> 2346 </section>
2335 2347
@@ -2353,10 +2365,6 @@
2353 <literallayout class='monospaced'> 2365 <literallayout class='monospaced'>
2354 $ devtool build <replaceable>recipe</replaceable> 2366 $ devtool build <replaceable>recipe</replaceable>
2355 </literallayout> 2367 </literallayout>
2356 <note>
2357 For complete syntax, use the
2358 <filename>devtool build --help</filename> command.
2359 </note>
2360 </para> 2368 </para>
2361 </section> 2369 </section>
2362 2370
@@ -2367,6 +2375,10 @@
2367 Use the <filename>devtool build-image</filename> command 2375 Use the <filename>devtool build-image</filename> command
2368 to build an image, extending it to include packages from 2376 to build an image, extending it to include packages from
2369 recipes in the workspace. 2377 recipes in the workspace.
2378 Using this command is useful when you want an image that
2379 ready for immediate deployment onto a device for testing.
2380 For proper integration into a final image, you need to
2381 edit your custom image recipe appropriately.
2370 </para> 2382 </para>
2371 2383
2372 <para> 2384 <para>
@@ -2407,12 +2419,6 @@
2407 You should never use it to update an image that will be 2419 You should never use it to update an image that will be
2408 used in production. 2420 used in production.
2409 </para> 2421 </para>
2410
2411 <para>
2412 For complete syntax, use the
2413 <filename>devtool deploy-target --help</filename>
2414 command.
2415 </para>
2416 </note> 2422 </note>
2417 </para> 2423 </para>
2418 </section> 2424 </section>
@@ -2433,10 +2439,6 @@
2433 The <replaceable>target</replaceable> is the address of the 2439 The <replaceable>target</replaceable> is the address of the
2434 target machine, which must be running an SSH server (i.e. 2440 target machine, which must be running an SSH server (i.e.
2435 <filename>user@hostname</filename>). 2441 <filename>user@hostname</filename>).
2436 <note>
2437 For complete syntax, use the
2438 <filename>devtool undeploy-target --help</filename> command.
2439 </note>
2440 </para> 2442 </para>
2441 </section> 2443 </section>
2442 2444
@@ -2459,10 +2461,6 @@
2459 <literallayout class='monospaced'> 2461 <literallayout class='monospaced'>
2460 $ devtool create-workspace 2462 $ devtool create-workspace
2461 </literallayout> 2463 </literallayout>
2462 <note>
2463 For complete syntax, use the
2464 <filename>devtool create-workspace --help</filename> command.
2465 </note>
2466 </para> 2464 </para>
2467 2465
2468 <para> 2466 <para>
@@ -2492,6 +2490,15 @@
2492 <literallayout class='monospaced'> 2490 <literallayout class='monospaced'>
2493 devtool status 2491 devtool status
2494 </literallayout> 2492 </literallayout>
2493 Following is sample output after using
2494 <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>devtool add</filename></link>
2495 to create and add the <filename>mtr_0.86.bb</filename> recipe
2496 to the <filename>workspace</filename> directory:
2497 <literallayout class='monospaced'>
2498 $ devtool status
2499 mtr: /home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
2500 $
2501 </literallayout>
2495 </para> 2502 </para>
2496 </section> 2503 </section>
2497 2504
@@ -2512,10 +2519,6 @@
2512 you must supply a <replaceable>keyword</replaceable>. 2519 you must supply a <replaceable>keyword</replaceable>.
2513 The command uses the <replaceable>keyword</replaceable> when 2520 The command uses the <replaceable>keyword</replaceable> when
2514 searching for a match. 2521 searching for a match.
2515 <note>
2516 For complete syntax, use the
2517 <filename>devtool search --help</filename> command.
2518 </note>
2519 </para> 2522 </para>
2520 </section> 2523 </section>
2521 </section> 2524 </section>