summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-02-12 18:05:24 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-03 17:40:12 +0000
commitc678d1a524a22c4a79b5496273ea346448589f7d (patch)
treee92683d1576cb8ea8b0b8e920d6f81ad16632d7e /documentation/dev-manual
parenta09238adc7eb71183bf70c3fe732d5a392d98893 (diff)
downloadpoky-c678d1a524a22c4a79b5496273ea346448589f7d.tar.gz
dev-manual: Updated the devtool add section.
(From yocto-docs rev: 3d6efac4a54de21f4c6bba4e3eb3a7c2fcfd33ba) 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.xml125
1 files changed, 120 insertions, 5 deletions
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml
index b07b6c96c9..843b1b788d 100644
--- a/documentation/dev-manual/dev-manual-model.xml
+++ b/documentation/dev-manual/dev-manual-model.xml
@@ -1779,10 +1779,24 @@
1779 <title>Use <filename>devtool add</filename> to Integrate New Code</title> 1779 <title>Use <filename>devtool add</filename> to Integrate New Code</title>
1780 1780
1781 <para> 1781 <para>
1782 This section describes the <filename>devtool</filename> 1782 The <filename>devtool add</filename> command generates
1783 workflow to integrate new code. 1783 a new recipe based on existing source code.
1784 With this workflow, you can either build and deploy 1784 This command takes advantage of the
1785 your code or rebuild an image that contains your code. 1785 <link linkend='devtool-the-workspace-layer-structure'>workspace</link>
1786 layer that many <filename>devtool</filename> commands
1787 use.
1788 The command is flexible enough to allow you to extract source
1789 code into both the workspace or a separate local Git repository
1790 and to use existing code that does not need to be extracted.
1791 </para>
1792
1793 <para>
1794 Depending on your particular scenario, the arguments and options
1795 you use with <filename>devtool add</filename> form different
1796 combinations.
1797 The following diagram shows common development flows
1798 you would use with the <filename>devtool add</filename>
1799 command:
1786 </para> 1800 </para>
1787 1801
1788 <para> 1802 <para>
@@ -1791,6 +1805,106 @@
1791 1805
1792 <para> 1806 <para>
1793 <orderedlist> 1807 <orderedlist>
1808 <listitem><para><emphasis>Generating the New Recipe</emphasis>:
1809 The top part of the flow shows three scenarios by which
1810 you could use <filename>devtool add</filename> to
1811 generate a recipe based on existing source code.</para>
1812
1813 <para>In a shared development environment, it is
1814 typical where other developers are responsible for
1815 various areas of source code.
1816 As a developer, you are probably interested in using
1817 that source code as part of your development using
1818 the Yocto Project.
1819 All you need is access to the code, a recipe, and a
1820 controlled area in which to do your work.</para>
1821
1822 <para>Within the diagram, three possible scenarios
1823 feed into the <filename>devtool add</filename> workflow:
1824 <itemizedlist>
1825 <listitem><para><emphasis>Left</emphasis>:
1826 The left scenario represents a situation
1827 where the source tree (srctree) exists as a
1828 previously extracted Git structure outside of
1829 the <filename>devtool</filename> workspace.
1830 </para>
1831
1832 <para>The following command names the recipe
1833 and identifies where the existing source tree
1834 is located:
1835 <literallayout class='monospaced'>
1836 $ devtool add <replaceable>recipe srctree</replaceable>
1837 </literallayout>
1838 <note>
1839 If a recipe exists that is associated with
1840 source code, <filename>devtool</filename>
1841 can leverage off that if it knows about the
1842 layer in which the recipe resides.
1843 Be sure to update your
1844 <filename>conf/bblayers.conf</filename> file
1845 to include the layers you want
1846 <filename>devtool</filename> to know about
1847 when looking for an existing recipe.
1848 </note>
1849 The command examines the source code and creates
1850 a recipe for it placing the recipe into the
1851 workspace.</para>
1852
1853 <para>Because the extracted source code already exists,
1854 <filename>devtool</filename> does not try to
1855 relocate it into the workspace - just the new
1856 (or a modified copy of) the recipe is placed in
1857 the workspace.</para>
1858
1859 <para>Aside from a recipe folder, the command
1860 also creates an append folder and places an initial
1861 <filename>*.bbappend</filename> within.
1862 </para></listitem>
1863 <listitem><para><emphasis>Middle</emphasis>:
1864 The middle scenario represents a situation where
1865 the source code does not exist locally.
1866 In this case, the code is in an upstream Git
1867 repository and needs to be extracted to some
1868 local area.
1869 Furthermore, the first positional argument
1870 <replaceable>srctree</replaceable> in this case
1871 identifies where the
1872 <filename>devtool add</filename> command
1873 will locate the extracted code outside of the
1874 workspace:
1875 <literallayout class='monospaced'>
1876 $ devtool add <replaceable>srctree fetchuri</replaceable>
1877 </literallayout>
1878 In summary, the source code is pulled from
1879 <replaceable>fetchuri</replaceable> and extracted
1880 into the location defined by
1881 <replaceable>srctree</replaceable> as a local
1882 Git repository.</para>
1883
1884 <para>Within workspace, <filename>devtool</filename>
1885 creates both the recipe and an append file
1886 for the recipe.
1887 </para></listitem>
1888 <listitem><para><emphasis>Right</emphasis>:
1889 The right scenario represents another situation
1890 where the source code does not exist locally
1891 and again needs to be extracted.
1892 However, in this situation, you want to extract the
1893 source into the workspace.
1894 Thus, everything you need will be located in the
1895 workspace:
1896 <literallayout class='monospaced'>
1897 $ devtool add <replaceable>recipe fetchuri</replaceable>
1898 </literallayout>
1899 With this command, <filename>devtool</filename>
1900 creates a recipe and an append file in the
1901 workspace as well as extracts the upstream
1902 source files into a local Git repository also
1903 within the <filename>sources</filename> folder.
1904 </para></listitem>
1905 </itemizedlist>
1906 </para></listitem>
1907<!--
1794 <listitem><para><emphasis>Add a New Recipe</emphasis>: 1908 <listitem><para><emphasis>Add a New Recipe</emphasis>:
1795 The <filename>devtool add</filename> command automatically 1909 The <filename>devtool add</filename> command automatically
1796 generates the needed Metadata that allows the OpenEmbedded 1910 generates the needed Metadata that allows the OpenEmbedded
@@ -1845,7 +1959,7 @@
1845 to fetch source from a remote URL, the command turns 1959 to fetch source from a remote URL, the command turns
1846 the source directory into a Git repository if one does 1960 the source directory into a Git repository if one does
1847 not already exist. 1961 not already exist.
1848 You can disable this behavior by using the "--no-git" 1962 You can disable this behavior by using the "&dash;&dash;no-git"
1849 option. 1963 option.
1850 The <filename>devtool add</filename> command does this in 1964 The <filename>devtool add</filename> command does this in
1851 order to support using 1965 order to support using
@@ -1866,6 +1980,7 @@
1866 recipe. 1980 recipe.
1867 </tip> 1981 </tip>
1868 </para></listitem> 1982 </para></listitem>
1983-->
1869 <listitem><para><emphasis>Edit the Recipe</emphasis>: 1984 <listitem><para><emphasis>Edit the Recipe</emphasis>:
1870 At this point, you can use <filename>devtool edit-recipe</filename> 1985 At this point, you can use <filename>devtool edit-recipe</filename>
1871 to open up the editor as defined by the 1986 to open up the editor as defined by the