diff options
| -rw-r--r-- | documentation/poky-ref-manual/ref-classes.xml | 87 |
1 files changed, 32 insertions, 55 deletions
diff --git a/documentation/poky-ref-manual/ref-classes.xml b/documentation/poky-ref-manual/ref-classes.xml index 64cff65426..f4a509c62b 100644 --- a/documentation/poky-ref-manual/ref-classes.xml +++ b/documentation/poky-ref-manual/ref-classes.xml | |||
| @@ -6,14 +6,14 @@ | |||
| 6 | 6 | ||
| 7 | <para> | 7 | <para> |
| 8 | Class files are used to abstract common functionality and share it amongst multiple | 8 | Class files are used to abstract common functionality and share it amongst multiple |
| 9 | <filename class="extension">.bb</filename> files. Any metadata usually found in a | 9 | <filename>.bb</filename> files. Any metadata usually found in a |
| 10 | <filename class="extension">.bb</filename> file can also be placed in a class | 10 | <filename>.bb</filename> file can also be placed in a class |
| 11 | file. Class files are identified by the extension | 11 | file. Class files are identified by the extension |
| 12 | <filename class="extension">.bbclass</filename> and are usually placed | 12 | <filename>.bbclass</filename> and are usually placed |
| 13 | in a <filename class="directory">classes/</filename> directory beneath the | 13 | in a <filename>classes/</filename> directory beneath the |
| 14 | <filename class="directory">meta*/</filename> directory or the directory pointed | 14 | <filename>meta*/</filename> directory or the directory pointed |
| 15 | by BUILDDIR (e.g. <filename class="directory">build/</filename>)in the same way as | 15 | by BUILDDIR (e.g. <filename>build/</filename>)in the same way as |
| 16 | <filename class="extension">.conf</filename> files in the <filename | 16 | <filename>.conf</filename> files in the <filename |
| 17 | class="directory">conf</filename> directory. Class files are searched for | 17 | class="directory">conf</filename> directory. Class files are searched for |
| 18 | in BBPATH in the same was as <filename>.conf</filename> files too. | 18 | in BBPATH in the same was as <filename>.conf</filename> files too. |
| 19 | </para> | 19 | </para> |
| @@ -28,7 +28,7 @@ | |||
| 28 | <title>The base class - <filename>base.bbclass</filename></title> | 28 | <title>The base class - <filename>base.bbclass</filename></title> |
| 29 | 29 | ||
| 30 | <para> | 30 | <para> |
| 31 | The base class is special in that every <filename class="extension">.bb</filename> | 31 | The base class is special in that every <filename>.bb</filename> |
| 32 | file inherits it automatically. It contains definitions of standard basic | 32 | file inherits it automatically. It contains definitions of standard basic |
| 33 | tasks such as fetching, unpacking, configuring (empty by default), compiling | 33 | tasks such as fetching, unpacking, configuring (empty by default), compiling |
| 34 | (runs any Makefile present), installing (empty by default) and packaging | 34 | (runs any Makefile present), installing (empty by default) and packaging |
| @@ -95,54 +95,31 @@ | |||
| 95 | 95 | ||
| 96 | <para> | 96 | <para> |
| 97 | Several programs can fulfill the same or similar function and | 97 | Several programs can fulfill the same or similar function and |
| 98 | they can be installed with the same name. For example the <command>ar</command> | 98 | be installed with the same name. |
| 99 | For example, the <filename>ar</filename> | ||
| 99 | command is available from the "busybox", "binutils" and "elfutils" packages. | 100 | command is available from the "busybox", "binutils" and "elfutils" packages. |
| 100 | This class handles the renaming of the binaries so multiple packages | 101 | The <filename>update-alternatives.bbclass</filename> class handles renaming the |
| 101 | can be installed which would otherwise conflict and yet the | 102 | binaries so that multiple packages can be installed without conflicts. |
| 102 | <command>ar</command> command still works regardless of which are installed | 103 | The <filename>ar</filename> command still works regardless of which packages are installed |
| 103 | or subsequently removed. It renames the conflicting binary in each package | 104 | or subsequently removed. |
| 105 | The class renames the conflicting binary in each package | ||
| 104 | and symlinks the highest priority binary during installation or removal | 106 | and symlinks the highest priority binary during installation or removal |
| 105 | of packages. | 107 | of packages. |
| 106 | 108 | </para> | |
| 109 | <para> | ||
| 107 | Four variables control this class: | 110 | Four variables control this class: |
| 108 | </para> | 111 | </para> |
| 109 | 112 | <itemizedlist> | |
| 110 | 113 | <listitem><para><filename>ALTERNATIVE_NAME</filename> ‐ The name of the | |
| 111 | <variablelist> | 114 | binary that is replaced (<filename>ar</filename> in this example).</para></listitem> |
| 112 | <varlistentry> | 115 | <listitem><para><filename>ALTERNATIVE_LINK</filename> ‐ The path to |
| 113 | <term>ALTERNATIVE_NAME</term> | 116 | the resulting binary (<filename>/bin/ar</filename> in this example).</para></listitem> |
| 114 | <listitem> | 117 | <listitem><para><filename>ALTERNATIVE_PATH</filename> ‐ The path to the |
| 115 | <para> | 118 | real binary (<filename>/usr/bin/ar.binutils</filename> in this example).</para></listitem> |
| 116 | Name of binary which will be replaced (<command>ar</command> in this example) | 119 | <listitem><para><filename>ALTERNATIVE_PRIORITY</filename> ‐ The priority of |
| 117 | </para> | 120 | the binary. |
| 118 | </listitem> | 121 | The version with the most features should have the highest priority.</para></listitem> |
| 119 | </varlistentry> | 122 | </itemizedlist> |
| 120 | <varlistentry> | ||
| 121 | <term>ALTERNATIVE_LINK</term> | ||
| 122 | <listitem> | ||
| 123 | <para> | ||
| 124 | Path to resulting binary ("/bin/ar" in this example) | ||
| 125 | </para> | ||
| 126 | </listitem> | ||
| 127 | </varlistentry> | ||
| 128 | <varlistentry> | ||
| 129 | <term>ALTERNATIVE_PATH</term> | ||
| 130 | <listitem> | ||
| 131 | <para> | ||
| 132 | Path to real binary ("/usr/bin/ar.binutils" in this example) | ||
| 133 | </para> | ||
| 134 | </listitem> | ||
| 135 | </varlistentry> | ||
| 136 | <varlistentry> | ||
| 137 | <term>ALTERNATIVE_PRIORITY</term> | ||
| 138 | <listitem> | ||
| 139 | <para> | ||
| 140 | Priority of binary, the version with the most features should have the highest priority | ||
| 141 | </para> | ||
| 142 | </listitem> | ||
| 143 | </varlistentry> | ||
| 144 | </variablelist> | ||
| 145 | |||
| 146 | <para> | 123 | <para> |
| 147 | Currently, only one binary per package is supported. | 124 | Currently, only one binary per package is supported. |
| 148 | </para> | 125 | </para> |
| @@ -176,7 +153,7 @@ | |||
| 176 | <para> | 153 | <para> |
| 177 | During staging Bitbake installs such scripts into the <filename | 154 | During staging Bitbake installs such scripts into the <filename |
| 178 | class="directory">sysroots/</filename> directory. It also changes all | 155 | class="directory">sysroots/</filename> directory. It also changes all |
| 179 | paths to point into the <filename class="directory">sysroots/</filename> | 156 | paths to point into the <filename>sysroots/</filename> |
| 180 | directory so all builds which use the script will use the correct | 157 | directory so all builds which use the script will use the correct |
| 181 | directories for the cross compiling layout. | 158 | directories for the cross compiling layout. |
| 182 | </para> | 159 | </para> |
| @@ -219,7 +196,7 @@ | |||
| 219 | </para> | 196 | </para> |
| 220 | 197 | ||
| 221 | <para> | 198 | <para> |
| 222 | Result of their work are <filename class="directory">tmp/deploy/source/</filename> | 199 | Result of their work are <filename>tmp/deploy/source/</filename> |
| 223 | subdirs with sources sorted by <glossterm><link linkend='var-LICENSE'>LICENSE</link> | 200 | subdirs with sources sorted by <glossterm><link linkend='var-LICENSE'>LICENSE</link> |
| 224 | </glossterm> field. If recipe lists few licenses (or has entries like "Bitstream Vera") source archive is put in each | 201 | </glossterm> field. If recipe lists few licenses (or has entries like "Bitstream Vera") source archive is put in each |
| 225 | license dir. | 202 | license dir. |
| @@ -323,7 +300,7 @@ | |||
| 323 | </para> | 300 | </para> |
| 324 | <para> | 301 | <para> |
| 325 | This means that each kernel module built is packaged separately and inter-module dependencies are | 302 | This means that each kernel module built is packaged separately and inter-module dependencies are |
| 326 | created by parsing the <command>modinfo</command> output. If all modules are | 303 | created by parsing the <filename>modinfo</filename> output. If all modules are |
| 327 | required then installing the "kernel-modules" package will install all | 304 | required then installing the "kernel-modules" package will install all |
| 328 | packages with modules and various other kernel packages such as "kernel-vmlinux". | 305 | packages with modules and various other kernel packages such as "kernel-vmlinux". |
| 329 | </para> | 306 | </para> |
| @@ -407,7 +384,7 @@ | |||
| 407 | 384 | ||
| 408 | <para> | 385 | <para> |
| 409 | Only the most useful/important classes are covered here but there are | 386 | Only the most useful/important classes are covered here but there are |
| 410 | others, see the <filename class="directory">meta/classes</filename> directory for the rest. | 387 | others, see the <filename>meta/classes</filename> directory for the rest. |
| 411 | </para> | 388 | </para> |
| 412 | </section> | 389 | </section> |
| 413 | 390 | ||
