diff options
| author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2012-12-07 17:29:51 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-11 16:17:56 +0000 |
| commit | 73ffb8298b545a1a1fb96bc5952b7365c4c43bfd (patch) | |
| tree | 9c6473cb4e3c5dd8370c2d417c304e1a302fa643 /documentation/poky-ref-manual/ref-classes.xml | |
| parent | acb3f72afaa28ba5d23ca6e5cdf9f1162ea656a3 (diff) | |
| download | poky-73ffb8298b545a1a1fb96bc5952b7365c4c43bfd.tar.gz | |
Documentation: poky-ref-manual - Removed all trailing whitespace.
(From yocto-docs rev: 564a28c2501034ea7e2eb16afc43dfaf931b6f6f)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/poky-ref-manual/ref-classes.xml')
| -rw-r--r-- | documentation/poky-ref-manual/ref-classes.xml | 346 |
1 files changed, 173 insertions, 173 deletions
diff --git a/documentation/poky-ref-manual/ref-classes.xml b/documentation/poky-ref-manual/ref-classes.xml index 973d065f58..5ba9811853 100644 --- a/documentation/poky-ref-manual/ref-classes.xml +++ b/documentation/poky-ref-manual/ref-classes.xml | |||
| @@ -6,23 +6,23 @@ | |||
| 6 | <title>Classes</title> | 6 | <title>Classes</title> |
| 7 | 7 | ||
| 8 | <para> | 8 | <para> |
| 9 | Class files are used to abstract common functionality and share it amongst multiple | 9 | Class files are used to abstract common functionality and share it amongst multiple |
| 10 | <filename>.bb</filename> files. | 10 | <filename>.bb</filename> files. |
| 11 | Any metadata usually found in a <filename>.bb</filename> file can also be placed in a class | 11 | Any metadata usually found in a <filename>.bb</filename> file can also be placed in a class |
| 12 | file. | 12 | file. |
| 13 | Class files are identified by the extension <filename>.bbclass</filename> and are usually placed | 13 | Class files are identified by the extension <filename>.bbclass</filename> and are usually placed |
| 14 | in a <filename>classes/</filename> directory beneath the | 14 | in a <filename>classes/</filename> directory beneath the |
| 15 | <filename>meta*/</filename> directory found in the | 15 | <filename>meta*/</filename> directory found in the |
| 16 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. | 16 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. |
| 17 | Class files can also be pointed to by BUILDDIR (e.g. <filename>build/</filename>)in the same way as | 17 | Class files can also be pointed to by BUILDDIR (e.g. <filename>build/</filename>)in the same way as |
| 18 | <filename>.conf</filename> files in the <filename>conf</filename> directory. | 18 | <filename>.conf</filename> files in the <filename>conf</filename> directory. |
| 19 | Class files are searched for in <link linkend='var-BBPATH'><filename>BBPATH</filename></link> | 19 | Class files are searched for in <link linkend='var-BBPATH'><filename>BBPATH</filename></link> |
| 20 | using the same method by which <filename>.conf</filename> files are searched. | 20 | using the same method by which <filename>.conf</filename> files are searched. |
| 21 | </para> | 21 | </para> |
| 22 | 22 | ||
| 23 | <para> | 23 | <para> |
| 24 | In most cases inheriting the class is enough to enable its features, although | 24 | In most cases inheriting the class is enough to enable its features, although |
| 25 | for some classes you might need to set variables or override some of the | 25 | for some classes you might need to set variables or override some of the |
| 26 | default behaviour. | 26 | default behaviour. |
| 27 | </para> | 27 | </para> |
| 28 | 28 | ||
| @@ -30,14 +30,14 @@ | |||
| 30 | <title>The base class - <filename>base.bbclass</filename></title> | 30 | <title>The base class - <filename>base.bbclass</filename></title> |
| 31 | 31 | ||
| 32 | <para> | 32 | <para> |
| 33 | The base class is special in that every <filename>.bb</filename> | 33 | The base class is special in that every <filename>.bb</filename> |
| 34 | file inherits it automatically. | 34 | file inherits it automatically. |
| 35 | This class contains definitions for standard basic | 35 | This class contains definitions for standard basic |
| 36 | tasks such as fetching, unpacking, configuring (empty by default), compiling | 36 | tasks such as fetching, unpacking, configuring (empty by default), compiling |
| 37 | (runs any <filename>Makefile</filename> present), installing (empty by default) and packaging | 37 | (runs any <filename>Makefile</filename> present), installing (empty by default) and packaging |
| 38 | (empty by default). | 38 | (empty by default). |
| 39 | These classes are often overridden or extended by other classes | 39 | These classes are often overridden or extended by other classes |
| 40 | such as <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>. | 40 | such as <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>. |
| 41 | The class also contains some commonly used functions such as <filename>oe_runmake</filename>. | 41 | The class also contains some commonly used functions such as <filename>oe_runmake</filename>. |
| 42 | </para> | 42 | </para> |
| 43 | </section> | 43 | </section> |
| @@ -46,14 +46,14 @@ | |||
| 46 | <title>Autotooled Packages - <filename>autotools.bbclass</filename></title> | 46 | <title>Autotooled Packages - <filename>autotools.bbclass</filename></title> |
| 47 | 47 | ||
| 48 | <para> | 48 | <para> |
| 49 | Autotools (<filename>autoconf</filename>, <filename>automake</filename>, | 49 | Autotools (<filename>autoconf</filename>, <filename>automake</filename>, |
| 50 | and <filename>libtool</filename>) bring standardization. | 50 | and <filename>libtool</filename>) bring standardization. |
| 51 | This class defines a set of tasks (configure, compile etc.) that | 51 | This class defines a set of tasks (configure, compile etc.) that |
| 52 | work for all Autotooled packages. | 52 | work for all Autotooled packages. |
| 53 | It should usually be enough to define a few standard variables | 53 | It should usually be enough to define a few standard variables |
| 54 | and then simply <filename>inherit autotools</filename>. | 54 | and then simply <filename>inherit autotools</filename>. |
| 55 | This class can also work with software that emulates Autotools. | 55 | This class can also work with software that emulates Autotools. |
| 56 | For more information, see the | 56 | For more information, see the |
| 57 | "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg-autotools'>Autotooled Package</ulink>" | 57 | "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg-autotools'>Autotooled Package</ulink>" |
| 58 | section in the Yocto Project Development Manual. | 58 | section in the Yocto Project Development Manual. |
| 59 | </para> | 59 | </para> |
| @@ -62,19 +62,19 @@ | |||
| 62 | It's useful to have some idea of how the tasks defined by this class work | 62 | It's useful to have some idea of how the tasks defined by this class work |
| 63 | and what they do behind the scenes. | 63 | and what they do behind the scenes. |
| 64 | <itemizedlist> | 64 | <itemizedlist> |
| 65 | <listitem><para><filename>do_configure</filename> ‐ regenerates the | 65 | <listitem><para><filename>do_configure</filename> ‐ regenerates the |
| 66 | configure script (using <filename>autoreconf</filename>) and then launches it | 66 | configure script (using <filename>autoreconf</filename>) and then launches it |
| 67 | with a standard set of arguments used during cross-compilation. | 67 | with a standard set of arguments used during cross-compilation. |
| 68 | You can pass additional parameters to <filename>configure</filename> through the | 68 | You can pass additional parameters to <filename>configure</filename> through the |
| 69 | <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable. | 69 | <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable. |
| 70 | </para></listitem> | 70 | </para></listitem> |
| 71 | <listitem><para><filename>do_compile</filename> ‐ runs <filename>make</filename> with | 71 | <listitem><para><filename>do_compile</filename> ‐ runs <filename>make</filename> with |
| 72 | arguments that specify the compiler and linker. | 72 | arguments that specify the compiler and linker. |
| 73 | You can pass additional arguments through | 73 | You can pass additional arguments through |
| 74 | the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable. | 74 | the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable. |
| 75 | </para></listitem> | 75 | </para></listitem> |
| 76 | <listitem><para><filename>do_install</filename> ‐ runs <filename>make install</filename> | 76 | <listitem><para><filename>do_install</filename> ‐ runs <filename>make install</filename> |
| 77 | and passes a DESTDIR option, which takes its value from the standard | 77 | and passes a DESTDIR option, which takes its value from the standard |
| 78 | <filename><link linkend='var-DESTDIR'>DESTDIR</link></filename> variable. | 78 | <filename><link linkend='var-DESTDIR'>DESTDIR</link></filename> variable. |
| 79 | </para></listitem> | 79 | </para></listitem> |
| 80 | </itemizedlist> | 80 | </itemizedlist> |
| @@ -85,28 +85,28 @@ | |||
| 85 | <title>Alternatives - <filename>update-alternatives.bbclass</filename></title> | 85 | <title>Alternatives - <filename>update-alternatives.bbclass</filename></title> |
| 86 | 86 | ||
| 87 | <para> | 87 | <para> |
| 88 | Several programs can fulfill the same or similar function and be installed with the same name. | 88 | Several programs can fulfill the same or similar function and be installed with the same name. |
| 89 | For example, the <filename>ar</filename> command is available from the | 89 | For example, the <filename>ar</filename> command is available from the |
| 90 | <filename>busybox</filename>, <filename>binutils</filename> and | 90 | <filename>busybox</filename>, <filename>binutils</filename> and |
| 91 | <filename>elfutils</filename> packages. | 91 | <filename>elfutils</filename> packages. |
| 92 | The <filename>update-alternatives.bbclass</filename> class handles renaming the | 92 | The <filename>update-alternatives.bbclass</filename> class handles renaming the |
| 93 | binaries so that multiple packages can be installed without conflicts. | 93 | binaries so that multiple packages can be installed without conflicts. |
| 94 | The <filename>ar</filename> command still works regardless of which packages are installed | 94 | The <filename>ar</filename> command still works regardless of which packages are installed |
| 95 | or subsequently removed. | 95 | or subsequently removed. |
| 96 | The class renames the conflicting binary in each package and symlinks the highest | 96 | The class renames the conflicting binary in each package and symlinks the highest |
| 97 | priority binary during installation or removal of packages. | 97 | priority binary during installation or removal of packages. |
| 98 | </para> | 98 | </para> |
| 99 | <para> | 99 | <para> |
| 100 | Four variables control this class: | 100 | Four variables control this class: |
| 101 | <itemizedlist> | 101 | <itemizedlist> |
| 102 | <listitem><para><filename>ALTERNATIVE_NAME</filename> ‐ The name of the | 102 | <listitem><para><filename>ALTERNATIVE_NAME</filename> ‐ The name of the |
| 103 | binary that is replaced (<filename>ar</filename> in this example).</para></listitem> | 103 | binary that is replaced (<filename>ar</filename> in this example).</para></listitem> |
| 104 | <listitem><para><filename>ALTERNATIVE_LINK</filename> ‐ The path to | 104 | <listitem><para><filename>ALTERNATIVE_LINK</filename> ‐ The path to |
| 105 | the resulting binary (<filename>/bin/ar</filename> in this example).</para></listitem> | 105 | the resulting binary (<filename>/bin/ar</filename> in this example).</para></listitem> |
| 106 | <listitem><para><filename>ALTERNATIVE_PATH</filename> ‐ The path to the | 106 | <listitem><para><filename>ALTERNATIVE_PATH</filename> ‐ The path to the |
| 107 | real binary (<filename>/usr/bin/ar.binutils</filename> in this example).</para></listitem> | 107 | real binary (<filename>/usr/bin/ar.binutils</filename> in this example).</para></listitem> |
| 108 | <listitem><para><filename>ALTERNATIVE_PRIORITY</filename> ‐ The priority of | 108 | <listitem><para><filename>ALTERNATIVE_PRIORITY</filename> ‐ The priority of |
| 109 | the binary. | 109 | the binary. |
| 110 | The version with the most features should have the highest priority.</para></listitem> | 110 | The version with the most features should have the highest priority.</para></listitem> |
| 111 | </itemizedlist> | 111 | </itemizedlist> |
| 112 | </para> | 112 | </para> |
| @@ -120,12 +120,12 @@ | |||
| 120 | <title>Initscripts - <filename>update-rc.d.bbclass</filename></title> | 120 | <title>Initscripts - <filename>update-rc.d.bbclass</filename></title> |
| 121 | 121 | ||
| 122 | <para> | 122 | <para> |
| 123 | This class uses <filename>update-rc.d</filename> to safely install an | 123 | This class uses <filename>update-rc.d</filename> to safely install an |
| 124 | initialization script on behalf of the package. | 124 | initialization script on behalf of the package. |
| 125 | The OpenEmbedded build system takes care of details such as making sure the script is stopped before | 125 | The OpenEmbedded build system takes care of details such as making sure the script is stopped before |
| 126 | a package is removed and started when the package is installed. | 126 | a package is removed and started when the package is installed. |
| 127 | Three variables control this class: | 127 | Three variables control this class: |
| 128 | <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>, | 128 | <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>, |
| 129 | <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and | 129 | <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and |
| 130 | <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>. | 130 | <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>. |
| 131 | See the variable links for details. | 131 | See the variable links for details. |
| @@ -137,16 +137,16 @@ | |||
| 137 | 137 | ||
| 138 | <para> | 138 | <para> |
| 139 | Before <filename>pkg-config</filename> had become widespread, libraries shipped shell | 139 | Before <filename>pkg-config</filename> had become widespread, libraries shipped shell |
| 140 | scripts to give information about the libraries and include paths needed | 140 | scripts to give information about the libraries and include paths needed |
| 141 | to build software (usually named <filename>LIBNAME-config</filename>). | 141 | to build software (usually named <filename>LIBNAME-config</filename>). |
| 142 | This class assists any recipe using such scripts. | 142 | This class assists any recipe using such scripts. |
| 143 | </para> | 143 | </para> |
| 144 | 144 | ||
| 145 | <para> | 145 | <para> |
| 146 | During staging, BitBake installs such scripts into the | 146 | During staging, BitBake installs such scripts into the |
| 147 | <filename>sysroots/</filename> directory. | 147 | <filename>sysroots/</filename> directory. |
| 148 | BitBake also changes all paths to point into the <filename>sysroots/</filename> | 148 | BitBake also changes all paths to point into the <filename>sysroots/</filename> |
| 149 | directory so all builds that use the script will use the correct | 149 | directory so all builds that use the script will use the correct |
| 150 | directories for the cross compiling layout. | 150 | directories for the cross compiling layout. |
| 151 | </para> | 151 | </para> |
| 152 | </section> | 152 | </section> |
| @@ -171,7 +171,7 @@ | |||
| 171 | 171 | ||
| 172 | <para> | 172 | <para> |
| 173 | During staging, BitBake installs <filename>pkg-config</filename> data into the | 173 | During staging, BitBake installs <filename>pkg-config</filename> data into the |
| 174 | <filename>sysroots/</filename> directory. | 174 | <filename>sysroots/</filename> directory. |
| 175 | By making use of sysroot functionality within <filename>pkg-config</filename>, | 175 | By making use of sysroot functionality within <filename>pkg-config</filename>, |
| 176 | this class no longer has to manipulate the files. | 176 | this class no longer has to manipulate the files. |
| 177 | </para> | 177 | </para> |
| @@ -183,14 +183,14 @@ | |||
| 183 | <para> | 183 | <para> |
| 184 | Many software licenses require that source files be provided along with the binaries. | 184 | Many software licenses require that source files be provided along with the binaries. |
| 185 | To simplify this process, two classes were created: | 185 | To simplify this process, two classes were created: |
| 186 | <filename>src_distribute.bbclass</filename> and | 186 | <filename>src_distribute.bbclass</filename> and |
| 187 | <filename>src_distribute_local.bbclass</filename>. | 187 | <filename>src_distribute_local.bbclass</filename>. |
| 188 | </para> | 188 | </para> |
| 189 | 189 | ||
| 190 | <para> | 190 | <para> |
| 191 | The results of these classes are <filename>tmp/deploy/source/</filename> | 191 | The results of these classes are <filename>tmp/deploy/source/</filename> |
| 192 | subdirs with sources sorted by | 192 | subdirs with sources sorted by |
| 193 | <filename><link linkend='var-LICENSE'>LICENSE</link></filename> field. | 193 | <filename><link linkend='var-LICENSE'>LICENSE</link></filename> field. |
| 194 | If recipes list few licenses (or have entries like "Bitstream Vera"), | 194 | If recipes list few licenses (or have entries like "Bitstream Vera"), |
| 195 | the source archive is placed in each license directory. | 195 | the source archive is placed in each license directory. |
| 196 | </para> | 196 | </para> |
| @@ -198,11 +198,11 @@ | |||
| 198 | <para> | 198 | <para> |
| 199 | This class operates using three modes: | 199 | This class operates using three modes: |
| 200 | <itemizedlist> | 200 | <itemizedlist> |
| 201 | <listitem><para><emphasis>copy:</emphasis> Copies the files to the | 201 | <listitem><para><emphasis>copy:</emphasis> Copies the files to the |
| 202 | distribute directory.</para></listitem> | 202 | distribute directory.</para></listitem> |
| 203 | <listitem><para><emphasis>symlink:</emphasis> Symlinks the files to the | 203 | <listitem><para><emphasis>symlink:</emphasis> Symlinks the files to the |
| 204 | distribute directory.</para></listitem> | 204 | distribute directory.</para></listitem> |
| 205 | <listitem><para><emphasis>move+symlink:</emphasis> Moves the files into | 205 | <listitem><para><emphasis>move+symlink:</emphasis> Moves the files into |
| 206 | the distribute directory and then symlinks them back.</para></listitem> | 206 | the distribute directory and then symlinks them back.</para></listitem> |
| 207 | </itemizedlist> | 207 | </itemizedlist> |
| 208 | </para> | 208 | </para> |
| @@ -213,11 +213,11 @@ | |||
| 213 | 213 | ||
| 214 | <para> | 214 | <para> |
| 215 | Recipes for Perl modules are simple. | 215 | Recipes for Perl modules are simple. |
| 216 | These recipes usually only need to point to the source's archive and then inherit the | 216 | These recipes usually only need to point to the source's archive and then inherit the |
| 217 | proper <filename>.bbclass</filename> file. | 217 | proper <filename>.bbclass</filename> file. |
| 218 | Building is split into two methods depending on which method the module authors used. | 218 | Building is split into two methods depending on which method the module authors used. |
| 219 | </para> | 219 | </para> |
| 220 | 220 | ||
| 221 | <para> | 221 | <para> |
| 222 | Modules that use old <filename>Makefile.PL</filename>-based build system require | 222 | Modules that use old <filename>Makefile.PL</filename>-based build system require |
| 223 | <filename>cpan.bbclass</filename> in their recipes. | 223 | <filename>cpan.bbclass</filename> in their recipes. |
| @@ -240,12 +240,12 @@ | |||
| 240 | </para> | 240 | </para> |
| 241 | 241 | ||
| 242 | <para> | 242 | <para> |
| 243 | Extensions that use an Autotools-based build system require Autotools and | 243 | Extensions that use an Autotools-based build system require Autotools and |
| 244 | <filename>distutils</filename>-based <filename>.bbclasse</filename> files in their recipes. | 244 | <filename>distutils</filename>-based <filename>.bbclasse</filename> files in their recipes. |
| 245 | </para> | 245 | </para> |
| 246 | 246 | ||
| 247 | <para> | 247 | <para> |
| 248 | Extensions that use <filename>distutils</filename>-based build systems require | 248 | Extensions that use <filename>distutils</filename>-based build systems require |
| 249 | <filename>distutils.bbclass</filename> in their recipes. | 249 | <filename>distutils.bbclass</filename> in their recipes. |
| 250 | </para> | 250 | </para> |
| 251 | </section> | 251 | </section> |
| @@ -254,10 +254,10 @@ | |||
| 254 | <title>Developer Shell - <filename>devshell.bbclass</filename></title> | 254 | <title>Developer Shell - <filename>devshell.bbclass</filename></title> |
| 255 | 255 | ||
| 256 | <para> | 256 | <para> |
| 257 | This class adds the <filename>devshell</filename> task. | 257 | This class adds the <filename>devshell</filename> task. |
| 258 | Distribution policy dictates whether to include this class. | 258 | Distribution policy dictates whether to include this class. |
| 259 | See the | 259 | See the |
| 260 | "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section | 260 | "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section |
| 261 | in the Yocto Project Development Manual for more information about using <filename>devshell</filename>. | 261 | in the Yocto Project Development Manual for more information about using <filename>devshell</filename>. |
| 262 | </para> | 262 | </para> |
| 263 | </section> | 263 | </section> |
| @@ -266,16 +266,16 @@ | |||
| 266 | <title>Package Groups - <filename>packagegroup.bbclass</filename></title> | 266 | <title>Package Groups - <filename>packagegroup.bbclass</filename></title> |
| 267 | 267 | ||
| 268 | <para> | 268 | <para> |
| 269 | This class sets default values appropriate for package group recipes (such as | 269 | This class sets default values appropriate for package group recipes (such as |
| 270 | <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>, | 270 | <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>, |
| 271 | <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>, | 271 | <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>, |
| 272 | <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>, | 272 | <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>, |
| 273 | and so forth. | 273 | and so forth. |
| 274 | It is highly recommended that all package group recipes inherit this class. | 274 | It is highly recommended that all package group recipes inherit this class. |
| 275 | </para> | 275 | </para> |
| 276 | <para> | 276 | <para> |
| 277 | For information on how to use this class, see the | 277 | For information on how to use this class, see the |
| 278 | "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Tasks</ulink>" | 278 | "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Tasks</ulink>" |
| 279 | section in the Yocto Project Development Manual. | 279 | section in the Yocto Project Development Manual. |
| 280 | </para> | 280 | </para> |
| 281 | <para> | 281 | <para> |
| @@ -289,41 +289,41 @@ | |||
| 289 | 289 | ||
| 290 | <para> | 290 | <para> |
| 291 | The packaging classes add support for generating packages from a build's | 291 | The packaging classes add support for generating packages from a build's |
| 292 | output. | 292 | output. |
| 293 | The core generic functionality is in <filename>package.bbclass</filename>. | 293 | The core generic functionality is in <filename>package.bbclass</filename>. |
| 294 | The code specific to particular package types is contained in various sub-classes such as | 294 | The code specific to particular package types is contained in various sub-classes such as |
| 295 | <filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>, | 295 | <filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>, |
| 296 | and <filename>package_rpm.bbclass</filename>. | 296 | and <filename>package_rpm.bbclass</filename>. |
| 297 | Most users will want one or more of these classes. | 297 | Most users will want one or more of these classes. |
| 298 | </para> | 298 | </para> |
| 299 | 299 | ||
| 300 | <para> | 300 | <para> |
| 301 | You can control the list of resulting package formats by using the | 301 | You can control the list of resulting package formats by using the |
| 302 | <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename> | 302 | <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename> |
| 303 | variable defined in the <filename>local.conf</filename> configuration file, | 303 | variable defined in the <filename>local.conf</filename> configuration file, |
| 304 | which is located in the <filename>conf</filename> folder of the | 304 | which is located in the <filename>conf</filename> folder of the |
| 305 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. | 305 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. |
| 306 | When defining the variable, you can specify one or more package types. | 306 | When defining the variable, you can specify one or more package types. |
| 307 | Since images are generated from packages, a packaging class is | 307 | Since images are generated from packages, a packaging class is |
| 308 | needed to enable image generation. | 308 | needed to enable image generation. |
| 309 | The first class listed in this variable is used for image generation. | 309 | The first class listed in this variable is used for image generation. |
| 310 | </para> | 310 | </para> |
| 311 | 311 | ||
| 312 | <para> | 312 | <para> |
| 313 | The package class you choose can affect build-time performance and has space | 313 | The package class you choose can affect build-time performance and has space |
| 314 | ramifications. | 314 | ramifications. |
| 315 | In general, building a package with RPM takes about thirty percent more time as | 315 | In general, building a package with RPM takes about thirty percent more time as |
| 316 | compared to using IPK to build the same or similar package. | 316 | compared to using IPK to build the same or similar package. |
| 317 | This comparison takes into account a complete build of the package with all | 317 | This comparison takes into account a complete build of the package with all |
| 318 | dependencies previously built. | 318 | dependencies previously built. |
| 319 | The reason for this discrepancy is because the RPM package manager creates and | 319 | The reason for this discrepancy is because the RPM package manager creates and |
| 320 | processes more metadata than the IPK package manager. | 320 | processes more metadata than the IPK package manager. |
| 321 | Consequently, you might consider setting <filename>PACKAGE_CLASSES</filename> | 321 | Consequently, you might consider setting <filename>PACKAGE_CLASSES</filename> |
| 322 | to "package_ipk" if you are building smaller systems. | 322 | to "package_ipk" if you are building smaller systems. |
| 323 | </para> | 323 | </para> |
| 324 | 324 | ||
| 325 | <para> | 325 | <para> |
| 326 | Keep in mind, however, that RPM starts to provide more abilities than IPK due to | 326 | Keep in mind, however, that RPM starts to provide more abilities than IPK due to |
| 327 | the fact that it processes more metadata. | 327 | the fact that it processes more metadata. |
| 328 | For example, this information includes individual file types, file checksum generation | 328 | For example, this information includes individual file types, file checksum generation |
| 329 | and evaluation on install, sparse file support, conflict detection and resolution | 329 | and evaluation on install, sparse file support, conflict detection and resolution |
| @@ -332,12 +332,12 @@ | |||
| 332 | 332 | ||
| 333 | <para> | 333 | <para> |
| 334 | Another consideration for packages built using the RPM package manager is space. | 334 | Another consideration for packages built using the RPM package manager is space. |
| 335 | For smaller systems, the extra space used for the Berkley Database and the amount | 335 | For smaller systems, the extra space used for the Berkley Database and the amount |
| 336 | of metadata can affect your ability to do on-device upgrades. | 336 | of metadata can affect your ability to do on-device upgrades. |
| 337 | </para> | 337 | </para> |
| 338 | 338 | ||
| 339 | <para> | 339 | <para> |
| 340 | You can find additional information on the effects of the package class at these | 340 | You can find additional information on the effects of the package class at these |
| 341 | two Yocto Project mailing list links: | 341 | two Yocto Project mailing list links: |
| 342 | <itemizedlist> | 342 | <itemizedlist> |
| 343 | <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'> | 343 | <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'> |
| @@ -352,24 +352,24 @@ | |||
| 352 | <title>Building kernels - <filename>kernel.bbclass</filename></title> | 352 | <title>Building kernels - <filename>kernel.bbclass</filename></title> |
| 353 | 353 | ||
| 354 | <para> | 354 | <para> |
| 355 | This class handles building Linux kernels. | 355 | This class handles building Linux kernels. |
| 356 | The class contains code to build all kernel trees. | 356 | The class contains code to build all kernel trees. |
| 357 | All needed headers are staged into the | 357 | All needed headers are staged into the |
| 358 | <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename> | 358 | <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename> |
| 359 | directory to allow out-of-tree module builds using <filename>module.bbclass</filename>. | 359 | directory to allow out-of-tree module builds using <filename>module.bbclass</filename>. |
| 360 | </para> | 360 | </para> |
| 361 | 361 | ||
| 362 | <para> | 362 | <para> |
| 363 | This means that each built kernel module is packaged separately and inter-module | 363 | This means that each built kernel module is packaged separately and inter-module |
| 364 | dependencies are created by parsing the <filename>modinfo</filename> output. | 364 | dependencies are created by parsing the <filename>modinfo</filename> output. |
| 365 | If all modules are required, then installing the <filename>kernel-modules</filename> | 365 | If all modules are required, then installing the <filename>kernel-modules</filename> |
| 366 | package installs all packages with modules and various other kernel packages | 366 | package installs all packages with modules and various other kernel packages |
| 367 | such as <filename>kernel-vmlinux</filename>. | 367 | such as <filename>kernel-vmlinux</filename>. |
| 368 | </para> | 368 | </para> |
| 369 | 369 | ||
| 370 | <para> | 370 | <para> |
| 371 | Various other classes are used by the kernel and module classes internally including | 371 | Various other classes are used by the kernel and module classes internally including |
| 372 | <filename>kernel-arch.bbclass</filename>, <filename>module_strip.bbclass</filename>, | 372 | <filename>kernel-arch.bbclass</filename>, <filename>module_strip.bbclass</filename>, |
| 373 | <filename>module-base.bbclass</filename>, and <filename>linux-kernel-base.bbclass</filename>. | 373 | <filename>module-base.bbclass</filename>, and <filename>linux-kernel-base.bbclass</filename>. |
| 374 | </para> | 374 | </para> |
| 375 | </section> | 375 | </section> |
| @@ -378,9 +378,9 @@ | |||
| 378 | <title>Creating images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title> | 378 | <title>Creating images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title> |
| 379 | 379 | ||
| 380 | <para> | 380 | <para> |
| 381 | These classes add support for creating images in several formats. | 381 | These classes add support for creating images in several formats. |
| 382 | First, the root filesystem is created from packages using | 382 | First, the root filesystem is created from packages using |
| 383 | one of the <filename>rootfs_*.bbclass</filename> | 383 | one of the <filename>rootfs_*.bbclass</filename> |
| 384 | files (depending on the package format used) and then the image is created. | 384 | files (depending on the package format used) and then the image is created. |
| 385 | </para> | 385 | </para> |
| 386 | 386 | ||
| @@ -389,7 +389,7 @@ | |||
| 389 | variable controls the types of images to generate. | 389 | variable controls the types of images to generate. |
| 390 | </para> | 390 | </para> |
| 391 | 391 | ||
| 392 | <para> | 392 | <para> |
| 393 | The <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename> | 393 | The <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename> |
| 394 | variable controls the list of packages to install into the image. | 394 | variable controls the list of packages to install into the image. |
| 395 | </para> | 395 | </para> |
| @@ -399,11 +399,11 @@ | |||
| 399 | <title>Host System sanity checks - <filename>sanity.bbclass</filename></title> | 399 | <title>Host System sanity checks - <filename>sanity.bbclass</filename></title> |
| 400 | 400 | ||
| 401 | <para> | 401 | <para> |
| 402 | This class checks to see if prerequisite software is present so that | 402 | This class checks to see if prerequisite software is present so that |
| 403 | users can be notified of potential problems that might affect their build. | 403 | users can be notified of potential problems that might affect their build. |
| 404 | The class also performs basic user configuration checks from | 404 | The class also performs basic user configuration checks from |
| 405 | the <filename>local.conf</filename> configuration file to | 405 | the <filename>local.conf</filename> configuration file to |
| 406 | prevent common mistakes that cause build failures. | 406 | prevent common mistakes that cause build failures. |
| 407 | Distribution policy usually determines whether to include this class. | 407 | Distribution policy usually determines whether to include this class. |
| 408 | </para> | 408 | </para> |
| 409 | </section> | 409 | </section> |
| @@ -420,14 +420,14 @@ | |||
| 420 | </para> | 420 | </para> |
| 421 | 421 | ||
| 422 | <para> | 422 | <para> |
| 423 | You can configure the sanity checks so that specific test failures either raise a warning or | 423 | You can configure the sanity checks so that specific test failures either raise a warning or |
| 424 | an error message. | 424 | an error message. |
| 425 | Typically, failures for new tests generate a warning. | 425 | Typically, failures for new tests generate a warning. |
| 426 | Subsequent failures for the same test would then generate an error message | 426 | Subsequent failures for the same test would then generate an error message |
| 427 | once the metadata is in a known and good condition. | 427 | once the metadata is in a known and good condition. |
| 428 | You use the <filename>WARN_QA</filename> variable to specify tests for which you | 428 | You use the <filename>WARN_QA</filename> variable to specify tests for which you |
| 429 | want to generate a warning message on failure. | 429 | want to generate a warning message on failure. |
| 430 | You use the <filename>ERROR_QA</filename> variable to specify tests for which you | 430 | You use the <filename>ERROR_QA</filename> variable to specify tests for which you |
| 431 | want to generate an error message on failure. | 431 | want to generate an error message on failure. |
| 432 | </para> | 432 | </para> |
| 433 | 433 | ||
| @@ -436,41 +436,41 @@ | |||
| 436 | and <filename>ERROR_QA</filename> variables: | 436 | and <filename>ERROR_QA</filename> variables: |
| 437 | <itemizedlist> | 437 | <itemizedlist> |
| 438 | <listitem><para><emphasis><filename>ldflags:</filename></emphasis> | 438 | <listitem><para><emphasis><filename>ldflags:</filename></emphasis> |
| 439 | Ensures that the binaries were linked with the | 439 | Ensures that the binaries were linked with the |
| 440 | <filename>LDFLAGS</filename> options provided by the build system. | 440 | <filename>LDFLAGS</filename> options provided by the build system. |
| 441 | If this test fails, check that the <filename>LDFLAGS</filename> variable | 441 | If this test fails, check that the <filename>LDFLAGS</filename> variable |
| 442 | is being passed to the linker command.</para></listitem> | 442 | is being passed to the linker command.</para></listitem> |
| 443 | <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis> | 443 | <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis> |
| 444 | Checks for dynamic library load paths (rpaths) in the binaries that | 444 | Checks for dynamic library load paths (rpaths) in the binaries that |
| 445 | by default on a standard system are searched by the linker (e.g. | 445 | by default on a standard system are searched by the linker (e.g. |
| 446 | <filename>/lib</filename> and <filename>/usr/lib</filename>). | 446 | <filename>/lib</filename> and <filename>/usr/lib</filename>). |
| 447 | While these paths will not cause any breakage, they do waste space and | 447 | While these paths will not cause any breakage, they do waste space and |
| 448 | are unnecessary.</para></listitem> | 448 | are unnecessary.</para></listitem> |
| 449 | <listitem><para><emphasis><filename>rpaths:</filename></emphasis> | 449 | <listitem><para><emphasis><filename>rpaths:</filename></emphasis> |
| 450 | Checks for rpaths in the binaries that contain build system paths such | 450 | Checks for rpaths in the binaries that contain build system paths such |
| 451 | as <filename>TMPDIR</filename>. | 451 | as <filename>TMPDIR</filename>. |
| 452 | If this test fails, bad <filename>-rpath</filename> options are being | 452 | If this test fails, bad <filename>-rpath</filename> options are being |
| 453 | passed to the linker commands and your binaries have potential security | 453 | passed to the linker commands and your binaries have potential security |
| 454 | issues.</para></listitem> | 454 | issues.</para></listitem> |
| 455 | <listitem><para><emphasis><filename>dev-so:</filename></emphasis> | 455 | <listitem><para><emphasis><filename>dev-so:</filename></emphasis> |
| 456 | Checks that the <filename>.so</filename> symbolic links are in the | 456 | Checks that the <filename>.so</filename> symbolic links are in the |
| 457 | <filename>-dev</filename> package and not in any of the other packages. | 457 | <filename>-dev</filename> package and not in any of the other packages. |
| 458 | In general, these symlinks are only useful for development purposes. | 458 | In general, these symlinks are only useful for development purposes. |
| 459 | Thus, the <filename>-dev</filename> package is the correct location for | 459 | Thus, the <filename>-dev</filename> package is the correct location for |
| 460 | them. | 460 | them. |
| 461 | Some very rare cases do exist for dynamically loaded modules where | 461 | Some very rare cases do exist for dynamically loaded modules where |
| 462 | these symlinks are needed instead in the main package. | 462 | these symlinks are needed instead in the main package. |
| 463 | </para></listitem> | 463 | </para></listitem> |
| 464 | <listitem><para><emphasis><filename>debug-files:</filename></emphasis> | 464 | <listitem><para><emphasis><filename>debug-files:</filename></emphasis> |
| 465 | Checks for <filename>.debug</filename> directories in anything but the | 465 | Checks for <filename>.debug</filename> directories in anything but the |
| 466 | <filename>-dbg</filename> package. | 466 | <filename>-dbg</filename> package. |
| 467 | The debug files should all be in the <filename>-dbg</filename> package. | 467 | The debug files should all be in the <filename>-dbg</filename> package. |
| 468 | Thus, anything packaged elsewhere is incorrect packaging.</para></listitem> | 468 | Thus, anything packaged elsewhere is incorrect packaging.</para></listitem> |
| 469 | <listitem><para><emphasis><filename>arch:</filename></emphasis> | 469 | <listitem><para><emphasis><filename>arch:</filename></emphasis> |
| 470 | Checks the Executable and Linkable Format (ELF) type, bit size and endianness | 470 | Checks the Executable and Linkable Format (ELF) type, bit size and endianness |
| 471 | of any binaries to ensure it matches the target architecture. | 471 | of any binaries to ensure it matches the target architecture. |
| 472 | This test fails if any binaries don't match the type since there would be an | 472 | This test fails if any binaries don't match the type since there would be an |
| 473 | incompatibility. | 473 | incompatibility. |
| 474 | Sometimes software, like bootloaders, might need to bypass this check. | 474 | Sometimes software, like bootloaders, might need to bypass this check. |
| 475 | </para></listitem> | 475 | </para></listitem> |
| 476 | <listitem><para><emphasis><filename>debug-deps:</filename></emphasis> | 476 | <listitem><para><emphasis><filename>debug-deps:</filename></emphasis> |
| @@ -478,24 +478,24 @@ | |||
| 478 | <filename>-dbg</filename> packages and not on any other types of packages, | 478 | <filename>-dbg</filename> packages and not on any other types of packages, |
| 479 | which would cause a packaging bug.</para></listitem> | 479 | which would cause a packaging bug.</para></listitem> |
| 480 | <listitem><para><emphasis><filename>dev-deps:</filename></emphasis> | 480 | <listitem><para><emphasis><filename>dev-deps:</filename></emphasis> |
| 481 | Checks that <filename>-dev</filename> packages only depend on other | 481 | Checks that <filename>-dev</filename> packages only depend on other |
| 482 | <filename>-dev</filename> packages and not on any other types of packages, | 482 | <filename>-dev</filename> packages and not on any other types of packages, |
| 483 | which would be a packaging bug.</para></listitem> | 483 | which would be a packaging bug.</para></listitem> |
| 484 | <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis> | 484 | <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis> |
| 485 | Checks <filename>.pc</filename> files for any | 485 | Checks <filename>.pc</filename> files for any |
| 486 | <filename>TMPDIR/WORKDIR</filename> paths. | 486 | <filename>TMPDIR/WORKDIR</filename> paths. |
| 487 | Any <filename>.pc</filename> file containing these paths is incorrect | 487 | Any <filename>.pc</filename> file containing these paths is incorrect |
| 488 | since <filename>pkg-config</filename> itself adds the correct sysroot prefix | 488 | since <filename>pkg-config</filename> itself adds the correct sysroot prefix |
| 489 | when the files are accessed.</para></listitem> | 489 | when the files are accessed.</para></listitem> |
| 490 | <listitem><para><emphasis><filename>la:</filename></emphasis> | 490 | <listitem><para><emphasis><filename>la:</filename></emphasis> |
| 491 | Checks <filename>.la</filename> files for any <filename>TMPDIR</filename> | 491 | Checks <filename>.la</filename> files for any <filename>TMPDIR</filename> |
| 492 | paths. | 492 | paths. |
| 493 | Any <filename>.la</filename> file continaing these paths is incorrect since | 493 | Any <filename>.la</filename> file continaing these paths is incorrect since |
| 494 | <filename>libtool</filename> adds the correct sysroot prefix when using the | 494 | <filename>libtool</filename> adds the correct sysroot prefix when using the |
| 495 | files automatically itself.</para></listitem> | 495 | files automatically itself.</para></listitem> |
| 496 | <listitem><para><emphasis><filename>desktop:</filename></emphasis> | 496 | <listitem><para><emphasis><filename>desktop:</filename></emphasis> |
| 497 | Runs the <filename>desktop-file-validate</filename> program against any | 497 | Runs the <filename>desktop-file-validate</filename> program against any |
| 498 | <filename>.desktop</filename> files to validate their contents against | 498 | <filename>.desktop</filename> files to validate their contents against |
| 499 | the specification for <filename>.desktop</filename> files.</para></listitem> | 499 | the specification for <filename>.desktop</filename> files.</para></listitem> |
| 500 | </itemizedlist> | 500 | </itemizedlist> |
| 501 | </para> | 501 | </para> |
| @@ -511,17 +511,17 @@ | |||
| 511 | still make the correct values available. | 511 | still make the correct values available. |
| 512 | The <filename><link linkend='structure-meta-site'>meta/site directory</link></filename> | 512 | The <filename><link linkend='structure-meta-site'>meta/site directory</link></filename> |
| 513 | contains test results sorted into different categories such as architecture, endianness, and | 513 | contains test results sorted into different categories such as architecture, endianness, and |
| 514 | the <filename>libc</filename> used. | 514 | the <filename>libc</filename> used. |
| 515 | Site information provides a list of files containing data relevant to | 515 | Site information provides a list of files containing data relevant to |
| 516 | the current build in the | 516 | the current build in the |
| 517 | <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable | 517 | <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable |
| 518 | that Autotools automatically picks up. | 518 | that Autotools automatically picks up. |
| 519 | </para> | 519 | </para> |
| 520 | 520 | ||
| 521 | <para> | 521 | <para> |
| 522 | The class also provides variables like | 522 | The class also provides variables like |
| 523 | <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename> | 523 | <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename> |
| 524 | and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename> | 524 | and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename> |
| 525 | that can be used elsewhere in the metadata. | 525 | that can be used elsewhere in the metadata. |
| 526 | </para> | 526 | </para> |
| 527 | 527 | ||
| @@ -534,14 +534,14 @@ | |||
| 534 | <title>Adding Users - <filename>useradd.bbclass</filename></title> | 534 | <title>Adding Users - <filename>useradd.bbclass</filename></title> |
| 535 | 535 | ||
| 536 | <para> | 536 | <para> |
| 537 | If you have packages that install files that are owned by custom users or groups, | 537 | If you have packages that install files that are owned by custom users or groups, |
| 538 | you can use this class to specify those packages and associate the users and groups | 538 | you can use this class to specify those packages and associate the users and groups |
| 539 | with those packages. | 539 | with those packages. |
| 540 | The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename> | 540 | The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename> |
| 541 | recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> | 541 | recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> |
| 542 | provides a simple exmample that shows how to add three | 542 | provides a simple exmample that shows how to add three |
| 543 | users and groups to two packages. | 543 | users and groups to two packages. |
| 544 | See the <filename>useradd-example.bb</filename> for more information on how to | 544 | See the <filename>useradd-example.bb</filename> for more information on how to |
| 545 | use this class. | 545 | use this class. |
| 546 | </para> | 546 | </para> |
| 547 | </section> | 547 | </section> |
| @@ -550,33 +550,33 @@ | |||
| 550 | <title>Using External Source - <filename>externalsrc.bbclass</filename></title> | 550 | <title>Using External Source - <filename>externalsrc.bbclass</filename></title> |
| 551 | 551 | ||
| 552 | <para> | 552 | <para> |
| 553 | You can use this class to build software from source code that is external to the | 553 | You can use this class to build software from source code that is external to the |
| 554 | OpenEmbedded build system. | 554 | OpenEmbedded build system. |
| 555 | In other words, your source code resides in an external tree outside of the Yocto Project. | 555 | In other words, your source code resides in an external tree outside of the Yocto Project. |
| 556 | Building software from an external source tree means that the normal fetch, unpack, and | 556 | Building software from an external source tree means that the normal fetch, unpack, and |
| 557 | patch process is not used. | 557 | patch process is not used. |
| 558 | </para> | 558 | </para> |
| 559 | 559 | ||
| 560 | <para> | 560 | <para> |
| 561 | To use the class, you need to define the | 561 | To use the class, you need to define the |
| 562 | <link linkend='var-S'><filename>S</filename></link> variable to point to the directory that contains the source files. | 562 | <link linkend='var-S'><filename>S</filename></link> variable to point to the directory that contains the source files. |
| 563 | You also need to have your recipe inherit the <filename>externalsrc.bbclass</filename> class. | 563 | You also need to have your recipe inherit the <filename>externalsrc.bbclass</filename> class. |
| 564 | </para> | 564 | </para> |
| 565 | 565 | ||
| 566 | <para> | 566 | <para> |
| 567 | This class expects the source code to support recipe builds that use the | 567 | This class expects the source code to support recipe builds that use the |
| 568 | <link linkend='var-B'><filename>B</filename></link> variable to point to the directory in | 568 | <link linkend='var-B'><filename>B</filename></link> variable to point to the directory in |
| 569 | which the OpenEmbedded build system places the generated objects built from the recipes. | 569 | which the OpenEmbedded build system places the generated objects built from the recipes. |
| 570 | By default, the <filename>B</filename> directory is set to the following, which is separate from the | 570 | By default, the <filename>B</filename> directory is set to the following, which is separate from the |
| 571 | Source Directory (<filename>S</filename>): | 571 | Source Directory (<filename>S</filename>): |
| 572 | <literallayout class='monospaced'> | 572 | <literallayout class='monospaced'> |
| 573 | ${WORKDIR}/${BPN}-{PV}/ | 573 | ${WORKDIR}/${BPN}-{PV}/ |
| 574 | </literallayout> | 574 | </literallayout> |
| 575 | See the glossary entries for the | 575 | See the glossary entries for the |
| 576 | <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>, | 576 | <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>, |
| 577 | <link linkend='var-BPN'><filename>BPN</filename></link>, | 577 | <link linkend='var-BPN'><filename>BPN</filename></link>, |
| 578 | <link linkend='var-PV'><filename>PV</filename></link>, | 578 | <link linkend='var-PV'><filename>PV</filename></link>, |
| 579 | <link linkend='var-S'><filename>S</filename></link>, and | 579 | <link linkend='var-S'><filename>S</filename></link>, and |
| 580 | <link linkend='var-B'><filename>B</filename></link> for more information. | 580 | <link linkend='var-B'><filename>B</filename></link> for more information. |
| 581 | </para> | 581 | </para> |
| 582 | 582 | ||
| @@ -584,26 +584,26 @@ | |||
| 584 | You can build object files in the external tree by setting the | 584 | You can build object files in the external tree by setting the |
| 585 | <filename>B</filename> variable equal to <filename>"${S}"</filename>. | 585 | <filename>B</filename> variable equal to <filename>"${S}"</filename>. |
| 586 | However, this practice does not work well if you use the source for more than one variant | 586 | However, this practice does not work well if you use the source for more than one variant |
| 587 | (i.e., "natives" such as <filename>quilt-native</filename>, | 587 | (i.e., "natives" such as <filename>quilt-native</filename>, |
| 588 | or "crosses" such as <filename>gcc-cross</filename>). | 588 | or "crosses" such as <filename>gcc-cross</filename>). |
| 589 | So, be sure there are no "native", "cross", or "multilib" variants of the recipe. | 589 | So, be sure there are no "native", "cross", or "multilib" variants of the recipe. |
| 590 | </para> | 590 | </para> |
| 591 | 591 | ||
| 592 | <para> | 592 | <para> |
| 593 | If you do want to build different variants of a recipe, you can use the | 593 | If you do want to build different variants of a recipe, you can use the |
| 594 | <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> variable. | 594 | <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> variable. |
| 595 | When you do, the <link linkend='var-B'><filename>B</filename></link> variable must support the | 595 | When you do, the <link linkend='var-B'><filename>B</filename></link> variable must support the |
| 596 | recipe's ability to build variants in different working directories. | 596 | recipe's ability to build variants in different working directories. |
| 597 | Most autotools-based recipes support separating these directories. | 597 | Most autotools-based recipes support separating these directories. |
| 598 | The OpenEmbedded build system defaults to using separate directories for <filename>gcc</filename> | 598 | The OpenEmbedded build system defaults to using separate directories for <filename>gcc</filename> |
| 599 | and some kernel recipes. | 599 | and some kernel recipes. |
| 600 | Alternatively, you can make sure that separate recipes exist that each | 600 | Alternatively, you can make sure that separate recipes exist that each |
| 601 | use the <filename>BBCLASSEXTEND</filename> variable to build each variant. | 601 | use the <filename>BBCLASSEXTEND</filename> variable to build each variant. |
| 602 | The separate recipes can inherit a single target recipe. | 602 | The separate recipes can inherit a single target recipe. |
| 603 | </para> | 603 | </para> |
| 604 | 604 | ||
| 605 | <para> | 605 | <para> |
| 606 | For information on how to use this class, see the | 606 | For information on how to use this class, see the |
| 607 | "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building | 607 | "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building |
| 608 | Software from an External Source</ulink>" section in the Yocto Project Development Manual. | 608 | Software from an External Source</ulink>" section in the Yocto Project Development Manual. |
| 609 | </para> | 609 | </para> |
| @@ -613,12 +613,12 @@ | |||
| 613 | <title>Other Classes</title> | 613 | <title>Other Classes</title> |
| 614 | 614 | ||
| 615 | <para> | 615 | <para> |
| 616 | Thus far, this chapter has discussed only the most useful and important | 616 | Thus far, this chapter has discussed only the most useful and important |
| 617 | classes. | 617 | classes. |
| 618 | However, other classes exist within the <filename>meta/classes</filename> directory | 618 | However, other classes exist within the <filename>meta/classes</filename> directory |
| 619 | in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. | 619 | in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. |
| 620 | You can examine the <filename>.bbclass</filename> files directly for more | 620 | You can examine the <filename>.bbclass</filename> files directly for more |
| 621 | information. | 621 | information. |
| 622 | </para> | 622 | </para> |
| 623 | </section> | 623 | </section> |
| 624 | 624 | ||
| @@ -715,6 +715,6 @@ | |||
| 715 | 715 | ||
| 716 | 716 | ||
| 717 | </chapter> | 717 | </chapter> |
| 718 | <!-- | 718 | <!-- |
| 719 | vim: expandtab tw=80 ts=4 | 719 | vim: expandtab tw=80 ts=4 |
| 720 | --> | 720 | --> |
