summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-01-11 07:59:01 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-21 21:58:01 +0000
commitad5409229a72d143ed916d677ec59b39ef8d3f1b (patch)
tree1cf6d0151926cb609969a83f21ed4ef5221bf392
parent6a2456a3ab0dd8aa4f2473adbfb01cd06e7212b0 (diff)
downloadpoky-ad5409229a72d143ed916d677ec59b39ef8d3f1b.tar.gz
dev-manual: Edits to the "Writing a New Recipe" section.
Completed applying the revision comments from Paul Eggleton for the third revision of this new section. (From yocto-docs rev: d641aa6318cb87e9d41dda39cc4747c44888aa4d) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml75
1 files changed, 38 insertions, 37 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 331700bdea..880a429317 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -1136,7 +1136,7 @@
1136 </section> 1136 </section>
1137 </section> 1137 </section>
1138 1138
1139 <section id='usingpoky-writing-a-new-recipe'> 1139 <section id='new-recipe-writing-a-new-recipe'>
1140 <title>Writing a New Recipe</title> 1140 <title>Writing a New Recipe</title>
1141 1141
1142 <para> 1142 <para>
@@ -1426,7 +1426,7 @@
1426 extracted during the <filename>do_unpack</filename> task. 1426 extracted during the <filename>do_unpack</filename> task.
1427 For another example that specifies these types of files, see 1427 For another example that specifies these types of files, see
1428 the 1428 the
1429 "<link linkend='usingpoky-extend-addpkg-autotools'>Autotooled Package</link>" 1429 "<link linkend='new-recipe-autotooled-package'>Autotooled Package</link>"
1430 section. 1430 section.
1431 </para> 1431 </para>
1432 1432
@@ -1522,7 +1522,7 @@
1522 The directories are assumed to be subdirectories of the 1522 The directories are assumed to be subdirectories of the
1523 directory in which the recipe or append file resides. 1523 directory in which the recipe or append file resides.
1524 For another example that specifies these types of files, see the 1524 For another example that specifies these types of files, see the
1525 "<link linkend='usingpoky-extend-addpkg-singlec'>Single .c File Package (Hello World!)</link>" 1525 "<link linkend='new-recipe-single-c-file-package-hello-world'>Single .c File Package (Hello World!)</link>"
1526 section. 1526 section.
1527 </para> 1527 </para>
1528 1528
@@ -1716,15 +1716,13 @@
1716 <title>Configuring the Recipe</title> 1716 <title>Configuring the Recipe</title>
1717 1717
1718 <para> 1718 <para>
1719 Configuration, such as build-time or runtime dependencies,
1720 is typically accomplished by running a configure script with
1721 some options, or by modifying a build configuration file.
1719 Most software provides some means of setting build-time 1722 Most software provides some means of setting build-time
1720 configuration options before compilation. 1723 configuration options before compilation.
1721 Typically, setting these options is accomplished by running a 1724 You can often find build-time or runtime dependencies in the
1722 configure script with some options, or by modifying a build 1725 software's documentation.
1723 configuration file.
1724 <note>
1725 It is possible that required build-time or runtime dependencies
1726 exist in the software's documentation.
1727 </note>
1728 </para> 1726 </para>
1729 1727
1730 <para> 1728 <para>
@@ -1849,14 +1847,15 @@
1849 or <filename>nativesdk</filename> only. 1847 or <filename>nativesdk</filename> only.
1850 The failure occurs when the compilation process uses 1848 The failure occurs when the compilation process uses
1851 improper headers, libraries, or other files from the 1849 improper headers, libraries, or other files from the
1852 host system during cross-compiling for the target. 1850 host system when cross-compiling for the target.
1853 </para> 1851 </para>
1854 <para>To fix the problem, you should be able to see 1852 <para>To fix the problem, examine the
1853 <filename>log.do_compile</filename> file to identify
1855 the host paths being used (e.g. 1854 the host paths being used (e.g.
1856 <filename>/usr/include</filename>, 1855 <filename>/usr/include</filename>,
1857 <filename>/usr/lib</filename>, and so forth) by 1856 <filename>/usr/lib</filename>, and so forth) and then
1858 examining the <filename>log.do_compile</filename> 1857 either add configure options, apply a patch, or do both.
1859 file.</para></listitem> 1858 </para></listitem>
1860 <listitem><para><emphasis>Failure to find required 1859 <listitem><para><emphasis>Failure to find required
1861 libraries/headers:</emphasis> 1860 libraries/headers:</emphasis>
1862 If a build-time dependency is missing because it has 1861 If a build-time dependency is missing because it has
@@ -1911,14 +1910,15 @@
1911 Consequently, you do not have to have a 1910 Consequently, you do not have to have a
1912 <filename>do_install</filename> task as part of your 1911 <filename>do_install</filename> task as part of your
1913 recipe. 1912 recipe.
1913 You just need to make sure the install portion of the
1914 build completes with no issues.
1914 However, if you wish to install additional files not 1915 However, if you wish to install additional files not
1915 already being installed by 1916 already being installed by
1916 <filename>make install</filename>, you should do this 1917 <filename>make install</filename>, you should do this
1917 using a <filename>do_install_append</filename> function 1918 using a <filename>do_install_append</filename> function
1918 using the install command as described in 1919 using the install command as described in
1919 <emphasis>Manual</emphasis> later in this list. 1920 <emphasis>Manual</emphasis> later in this list.
1920 You just need to make sure the install portion of the 1921 </para></listitem>
1921 build completes with no issues.</para></listitem>
1922 <listitem><para><emphasis>Other (using 1922 <listitem><para><emphasis>Other (using
1923 <filename>make install</filename>):</emphasis> 1923 <filename>make install</filename>):</emphasis>
1924 You need to define a 1924 You need to define a
@@ -1935,7 +1935,7 @@
1935 </para> 1935 </para>
1936 <para>For an example recipe using 1936 <para>For an example recipe using
1937 <filename>make install</filename>, see the 1937 <filename>make install</filename>, see the
1938 "<link linkend='usingpoky-extend-addpkg-makefile'>Makefile-Based Package</link>" 1938 "<link linkend='new-recipe-makefile-based-package'>Makefile-Based Package</link>"
1939 section.</para></listitem> 1939 section.</para></listitem>
1940 <listitem><para><emphasis>Manual:</emphasis> 1940 <listitem><para><emphasis>Manual:</emphasis>
1941 You need to define a 1941 You need to define a
@@ -2030,7 +2030,8 @@
2030 </para> 2030 </para>
2031 2031
2032 <para> 2032 <para>
2033 Here are some examples: 2033 The OpenEmbedded build system provides support for two
2034 different ways of starting services:
2034 <itemizedlist> 2035 <itemizedlist>
2035 <listitem><para><emphasis>SysVinit:</emphasis> 2036 <listitem><para><emphasis>SysVinit:</emphasis>
2036 SysVinit is a system and service manager that 2037 SysVinit is a system and service manager that
@@ -2040,8 +2041,8 @@
2040 started by the Linux kernel when the system boots. 2041 started by the Linux kernel when the system boots.
2041 Init then controls the startup, running and shutdown 2042 Init then controls the startup, running and shutdown
2042 of all other programs.</para> 2043 of all other programs.</para>
2043 <para>To include this service, your recipe needs to 2044 <para>To enable a service using SysVinit, your recipe
2044 inherit the 2045 needs to inherit the
2045 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-update-rc.d'><filename>update-rc.d</filename></ulink> 2046 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-update-rc.d'><filename>update-rc.d</filename></ulink>
2046 class. 2047 class.
2047 The class helps facilitate safely installing the 2048 The class helps facilitate safely installing the
@@ -2059,11 +2060,12 @@
2059 homepage at 2060 homepage at
2060 <ulink url='http://freedesktop.org/wiki/Software/systemd/'></ulink>. 2061 <ulink url='http://freedesktop.org/wiki/Software/systemd/'></ulink>.
2061 </para> 2062 </para>
2062 <para>To include this service, your recipe needs to 2063 <para>To enable a service using Systemd, your recipe
2063 inherit the <filename>systemd</filename> class. 2064 needs to inherit the <filename>systemd</filename> class.
2064 See the 2065 See the <filename>systemd.bbclass</filename> file
2065 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/systemd.bbclass'><filename>systemd.bbclass</filename></ulink> 2066 located in your
2066 file or the 2067 <link linkend='source-directory'>Source Directory</link>
2068 in <filename>meta/classes</filename> or the
2067 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-systemd'><filename>systemd.bbclass</filename></ulink>" 2069 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-systemd'><filename>systemd.bbclass</filename></ulink>"
2068 section for more information.</para></listitem> 2070 section for more information.</para></listitem>
2069 </itemizedlist> 2071 </itemizedlist>
@@ -2109,12 +2111,12 @@
2109 <para> 2111 <para>
2110 For an example showing how to install a post-installation 2112 For an example showing how to install a post-installation
2111 script, see the 2113 script, see the
2112 "<link linkend='usingpoky-extend-addpkg-postinstalls'>Post-Installation Scripts</link>" 2114 "<link linkend='new-recipe-post-installation-scripts'>Post-Installation Scripts</link>"
2113 section. 2115 section.
2114 </para> 2116 </para>
2115 </section> 2117 </section>
2116 2118
2117 <section id='usingpoky-extend-addpkg-postinstalls'> 2119 <section id='new-recipe-post-installation-scripts'>
2118 <title>Post-Installation Scripts</title> 2120 <title>Post-Installation Scripts</title>
2119 2121
2120 <para> 2122 <para>
@@ -2180,10 +2182,9 @@
2180 </para> 2182 </para>
2181 2183
2182 <note> 2184 <note>
2183 Equivalent support for <filename>pre-install</filename>, 2185 Equivalent support for pre-install, pre-uninstall, and
2184 <filename>pre-uninstall</filename>, and 2186 post-uninstall scripts exist by way of
2185 <filename>post-uninstall</filename> scripts exist 2187 <filename>pkg_preinst</filename>,
2186 by way of <filename>pkg_preinst</filename>,
2187 <filename>pkg_prerm</filename>, and 2188 <filename>pkg_prerm</filename>, and
2188 <filename>pkg_postrm</filename>, respectively. 2189 <filename>pkg_postrm</filename>, respectively.
2189 These scrips work in exactly the same way as does 2190 These scrips work in exactly the same way as does
@@ -2208,7 +2209,7 @@
2208 <para> 2209 <para>
2209 For information on how to customize your image by adding 2210 For information on how to customize your image by adding
2210 specific packages, see the 2211 specific packages, see the
2211 "<link linkend='usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</link>" 2212 "<link linkend='usingpoky-extend-customimage'>Customizing Images</link>"
2212 section. 2213 section.
2213 </para> 2214 </para>
2214 </section> 2215 </section>
@@ -2227,7 +2228,7 @@
2227 </itemizedlist> 2228 </itemizedlist>
2228 </para> 2229 </para>
2229 2230
2230 <section id='usingpoky-extend-addpkg-singlec'> 2231 <section id='new-recipe-single-c-file-package-hello-world'>
2231 <title>Single .c File Package (Hello World!)</title> 2232 <title>Single .c File Package (Hello World!)</title>
2232 2233
2233 <para> 2234 <para>
@@ -2276,7 +2277,7 @@
2276 </para> 2277 </para>
2277 </section> 2278 </section>
2278 2279
2279 <section id='usingpoky-extend-addpkg-autotools'> 2280 <section id='new-recipe-autotooled-package'>
2280 <title>Autotooled Package</title> 2281 <title>Autotooled Package</title>
2281 <para> 2282 <para>
2282 Applications that use Autotools such as <filename>autoconf</filename> and 2283 Applications that use Autotools such as <filename>autoconf</filename> and
@@ -2311,7 +2312,7 @@
2311 </para> 2312 </para>
2312 </section> 2313 </section>
2313 2314
2314 <section id='usingpoky-extend-addpkg-makefile'> 2315 <section id='new-recipe-makefile-based-package'>
2315 <title>Makefile-Based Package</title> 2316 <title>Makefile-Based Package</title>
2316 2317
2317 <para> 2318 <para>
@@ -2401,7 +2402,7 @@
2401 PR = "r3" 2402 PR = "r3"
2402 PE = "1" 2403 PE = "1"
2403 2404
2404 XORG_PN = "libxpm" 2405 XORG_PN = "libXpm"
2405 2406
2406 PACKAGES =+ "sxpm cxpm" 2407 PACKAGES =+ "sxpm cxpm"
2407 FILES_cxpm = "${bindir}/cxpm" 2408 FILES_cxpm = "${bindir}/cxpm"