Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
| 2 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" |
| 3 | [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] > |
| 4 | |
| 5 | <chapter id='ref-classes'> |
| 6 | <title>Classes</title> |
| 7 | |
| 8 | <para> |
| 9 | Class files are used to abstract common functionality and share it amongst |
| 10 | multiple recipe (<filename>.bb</filename>) files. |
| 11 | To use a class file, you simply make sure the recipe inherits the class. |
| 12 | In most cases, when a recipe inherits a class it is enough to enable its |
| 13 | features. |
| 14 | There are cases, however, where in the recipe you might need to set |
| 15 | variables or override some default behavior. |
| 16 | </para> |
| 17 | |
| 18 | <para> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | Any <link linkend='metadata'>Metadata</link> usually |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | found in a recipe can also be placed in a class file. |
| 21 | Class files are identified by the extension <filename>.bbclass</filename> |
| 22 | and are usually placed in a <filename>classes/</filename> directory beneath |
| 23 | the <filename>meta*/</filename> directory found in the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | <link linkend='source-directory'>Source Directory</link>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | Class files can also be pointed to by |
| 26 | <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link> |
| 27 | (e.g. <filename>build/</filename>) in the same way as |
| 28 | <filename>.conf</filename> files in the <filename>conf</filename> directory. |
| 29 | Class files are searched for in |
| 30 | <link linkend='var-BBPATH'><filename>BBPATH</filename></link> |
| 31 | using the same method by which <filename>.conf</filename> files are |
| 32 | searched. |
| 33 | </para> |
| 34 | |
| 35 | <para> |
| 36 | This chapter discusses only the most useful and important classes. |
| 37 | Other classes do exist within the <filename>meta/classes</filename> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 38 | directory in the Source Directory. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 39 | You can reference the <filename>.bbclass</filename> files directly |
| 40 | for more information. |
| 41 | </para> |
| 42 | |
| 43 | <section id='ref-classes-allarch'> |
| 44 | <title><filename>allarch.bbclass</filename></title> |
| 45 | |
| 46 | <para> |
| 47 | The <filename>allarch</filename> class is inherited |
| 48 | by recipes that do not produce architecture-specific output. |
| 49 | The class disables functionality that is normally needed for recipes |
| 50 | that produce executable binaries (such as building the cross-compiler |
| 51 | and a C library as pre-requisites, and splitting out of debug symbols |
| 52 | during packaging). |
| 53 | <note> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 54 | <para>Unlike some distro recipes (e.g. Debian), OpenEmbedded recipes |
| 55 | that produce packages that depend on tunings through use of the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 56 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 57 | and |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 58 | <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 59 | variables, should never be configured for all architectures |
| 60 | using <filename>allarch</filename>. |
| 61 | This is the case even if the recipes do not produce |
| 62 | architecture-specific output.</para> |
| 63 | <para>Configuring such recipes for all architectures causes the |
| 64 | <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link> |
| 65 | tasks to have different signatures for the machines with different |
| 66 | tunings. |
| 67 | Additionally, unnecessary rebuilds occur every time an |
| 68 | image for a different <filename>MACHINE</filename> is built |
| 69 | even when the recipe never changes.</para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 70 | </note> |
| 71 | </para> |
| 72 | |
| 73 | <para> |
| 74 | By default, all recipes inherit the |
| 75 | <link linkend='ref-classes-base'><filename>base</filename></link> and |
| 76 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 77 | classes, which enable functionality |
| 78 | needed for recipes that produce executable output. |
| 79 | If your recipe, for example, only produces packages that contain |
| 80 | configuration files, media files, or scripts (e.g. Python and Perl), |
| 81 | then it should inherit the <filename>allarch</filename> class. |
| 82 | </para> |
| 83 | </section> |
| 84 | |
| 85 | <section id='ref-classes-archiver'> |
| 86 | <title><filename>archiver.bbclass</filename></title> |
| 87 | |
| 88 | <para> |
| 89 | The <filename>archiver</filename> class supports releasing |
| 90 | source code and other materials with the binaries. |
| 91 | </para> |
| 92 | |
| 93 | <para> |
| 94 | For more details on the source archiver, see the |
| 95 | "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 96 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 97 | You can also see the |
| 98 | <link linkend='var-ARCHIVER_MODE'><filename>ARCHIVER_MODE</filename></link> |
| 99 | variable for information about the variable flags (varflags) |
| 100 | that help control archive creation. |
| 101 | </para> |
| 102 | </section> |
| 103 | |
| 104 | <section id='ref-classes-autotools'> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 105 | <title><filename>autotools*.bbclass</filename></title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 106 | |
| 107 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 108 | The <filename>autotools*</filename> classes support Autotooled |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 109 | packages. |
| 110 | </para> |
| 111 | |
| 112 | <para> |
| 113 | The <filename>autoconf</filename>, <filename>automake</filename>, |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 114 | and <filename>libtool</filename> packages bring standardization. |
| 115 | This class defines a set of tasks (e.g. |
| 116 | <filename>configure</filename>, <filename>compile</filename> and |
| 117 | so forth) that |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 118 | work for all Autotooled packages. |
| 119 | It should usually be enough to define a few standard variables |
| 120 | and then simply <filename>inherit autotools</filename>. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 121 | These classes can also work with software that emulates Autotools. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 122 | For more information, see the |
| 123 | "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package'>Autotooled Package</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 124 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 125 | </para> |
| 126 | |
| 127 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 128 | By default, the <filename>autotools*</filename> classes |
| 129 | use out-of-tree builds (i.e. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 130 | <filename>autotools.bbclass</filename> building with |
| 131 | <filename>B != S</filename>). |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 132 | </para> |
| 133 | |
| 134 | <para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 135 | If the software being built by a recipe does not support |
| 136 | using out-of-tree builds, you should have the recipe inherit the |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 137 | <filename>autotools-brokensep</filename> class. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 138 | The <filename>autotools-brokensep</filename> class behaves the same |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 139 | as the <filename>autotools</filename> class but builds with |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 140 | <link linkend='var-B'><filename>B</filename></link> == |
| 141 | <link linkend='var-S'><filename>S</filename></link>. |
| 142 | This method is useful when out-of-tree build support is either not |
| 143 | present or is broken. |
| 144 | <note> |
| 145 | It is recommended that out-of-tree support be fixed and used |
| 146 | if at all possible. |
| 147 | </note> |
| 148 | </para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 149 | |
| 150 | <para> |
| 151 | It's useful to have some idea of how the tasks defined by |
| 152 | the <filename>autotools*</filename> classes work and what they do |
| 153 | behind the scenes. |
| 154 | <itemizedlist> |
| 155 | <listitem><para><link linkend='ref-tasks-configure'><filename>do_configure</filename></link> - |
| 156 | Regenerates the |
| 157 | configure script (using <filename>autoreconf</filename>) and |
| 158 | then launches it with a standard set of arguments used during |
| 159 | cross-compilation. |
| 160 | You can pass additional parameters to |
| 161 | <filename>configure</filename> through the |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 162 | <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> |
| 163 | or |
| 164 | <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link> |
| 165 | variables. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 166 | </para></listitem> |
| 167 | <listitem><para><link linkend='ref-tasks-compile'><filename>do_compile</filename></link> - |
| 168 | Runs <filename>make</filename> with arguments that specify the |
| 169 | compiler and linker. |
| 170 | You can pass additional arguments through |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 171 | the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> |
| 172 | variable. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 173 | </para></listitem> |
| 174 | <listitem><para><link linkend='ref-tasks-install'><filename>do_install</filename></link> - |
| 175 | Runs <filename>make install</filename> and passes in |
| 176 | <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename> |
| 177 | as <filename>DESTDIR</filename>. |
| 178 | </para></listitem> |
| 179 | </itemizedlist> |
| 180 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 181 | </section> |
| 182 | |
| 183 | <section id='ref-classes-base'> |
| 184 | <title><filename>base.bbclass</filename></title> |
| 185 | |
| 186 | <para> |
| 187 | The <filename>base</filename> class is special in that every |
| 188 | <filename>.bb</filename> file implicitly inherits the class. |
| 189 | This class contains definitions for standard basic |
| 190 | tasks such as fetching, unpacking, configuring (empty by default), |
| 191 | compiling (runs any <filename>Makefile</filename> present), installing |
| 192 | (empty by default) and packaging (empty by default). |
| 193 | These classes are often overridden or extended by other classes |
| 194 | such as the |
| 195 | <link linkend='ref-classes-autotools'><filename>autotools</filename></link> |
| 196 | class or the |
| 197 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 198 | class. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 199 | </para> |
| 200 | |
| 201 | <para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 202 | The class also contains some commonly used functions such as |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 203 | <filename>oe_runmake</filename>, which runs |
| 204 | <filename>make</filename> with the arguments specified in |
| 205 | <link linkend='var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></link> |
| 206 | variable as well as the arguments passed directly to |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 207 | <filename>oe_runmake</filename>. |
| 208 | </para> |
| 209 | </section> |
| 210 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 211 | <section id='ref-classes-bash-completion'> |
| 212 | <title><filename>bash-completion.bbclass</filename></title> |
| 213 | |
| 214 | <para> |
| 215 | Sets up packaging and dependencies appropriate for recipes that |
| 216 | build software that includes bash-completion data. |
| 217 | </para> |
| 218 | </section> |
| 219 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 220 | <section id='ref-classes-bin-package'> |
| 221 | <title><filename>bin_package.bbclass</filename></title> |
| 222 | |
| 223 | <para> |
| 224 | The <filename>bin_package</filename> class is a |
| 225 | helper class for recipes that extract the contents of a binary package |
| 226 | (e.g. an RPM) and install those contents rather than building the |
| 227 | binary from source. |
| 228 | The binary package is extracted and new packages in the configured |
| 229 | output package format are created. |
| 230 | Extraction and installation of proprietary binaries is a good example |
| 231 | use for this class. |
| 232 | <note> |
| 233 | For RPMs and other packages that do not contain a subdirectory, |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 234 | you should specify an appropriate fetcher parameter to point to |
| 235 | the subdirectory. |
| 236 | For example, if BitBake is using the Git fetcher |
| 237 | (<filename>git://</filename>), the "subpath" parameter limits |
| 238 | the checkout to a specific subpath of the tree. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 239 | Here is an example where <filename>${BP}</filename> is used so that |
| 240 | the files are extracted into the subdirectory expected by the |
| 241 | default value of |
| 242 | <link linkend='var-S'><filename>S</filename></link>: |
| 243 | <literallayout class='monospaced'> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 244 | SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 245 | </literallayout> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 246 | See the |
| 247 | "<ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>Fetchers</ulink>" |
| 248 | section in the BitBake User Manual for more information on |
| 249 | supported BitBake Fetchers. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 250 | </note> |
| 251 | </para> |
| 252 | </section> |
| 253 | |
| 254 | <section id='ref-classes-binconfig'> |
| 255 | <title><filename>binconfig.bbclass</filename></title> |
| 256 | |
| 257 | <para> |
| 258 | The <filename>binconfig</filename> class helps to correct paths in |
| 259 | shell scripts. |
| 260 | </para> |
| 261 | |
| 262 | <para> |
| 263 | Before <filename>pkg-config</filename> had become widespread, libraries |
| 264 | shipped shell scripts to give information about the libraries and |
| 265 | include paths needed to build software (usually named |
| 266 | <filename>LIBNAME-config</filename>). |
| 267 | This class assists any recipe using such scripts. |
| 268 | </para> |
| 269 | |
| 270 | <para> |
| 271 | During staging, the OpenEmbedded build system installs such scripts |
| 272 | into the <filename>sysroots/</filename> directory. |
| 273 | Inheriting this class results in all paths in these scripts being |
| 274 | changed to point into the <filename>sysroots/</filename> directory so |
| 275 | that all builds that use the script use the correct directories |
| 276 | for the cross compiling layout. |
| 277 | See the |
| 278 | <link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link> |
| 279 | variable for more information. |
| 280 | </para> |
| 281 | </section> |
| 282 | |
| 283 | <section id='ref-classes-binconfig-disabled'> |
| 284 | <title><filename>binconfig-disabled.bbclass</filename></title> |
| 285 | |
| 286 | <para> |
| 287 | An alternative version of the |
| 288 | <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link> |
| 289 | class, which disables binary configuration scripts by making them |
| 290 | return an error in favor of using <filename>pkg-config</filename> |
| 291 | to query the information. |
| 292 | The scripts to be disabled should be specified using the |
| 293 | <link linkend='var-BINCONFIG'><filename>BINCONFIG</filename></link> |
| 294 | variable within the recipe inheriting the class. |
| 295 | </para> |
| 296 | </section> |
| 297 | |
| 298 | <section id='ref-classes-blacklist'> |
| 299 | <title><filename>blacklist.bbclass</filename></title> |
| 300 | |
| 301 | <para> |
| 302 | The <filename>blacklist</filename> class prevents |
| 303 | the OpenEmbedded build system from building specific recipes |
| 304 | (blacklists them). |
| 305 | To use this class, inherit the class globally and set |
| 306 | <link linkend='var-PNBLACKLIST'><filename>PNBLACKLIST</filename></link> |
| 307 | for each recipe you wish to blacklist. |
| 308 | Specify the <link linkend='var-PN'><filename>PN</filename></link> |
| 309 | value as a variable flag (varflag) and provide a reason, which is |
| 310 | reported, if the package is requested to be built as the value. |
| 311 | For example, if you want to blacklist a recipe called "exoticware", |
| 312 | you add the following to your <filename>local.conf</filename> |
| 313 | or distribution configuration: |
| 314 | <literallayout class='monospaced'> |
| 315 | INHERIT += "blacklist" |
| 316 | PNBLACKLIST[exoticware] = "Not supported by our organization." |
| 317 | </literallayout> |
| 318 | </para> |
| 319 | </section> |
| 320 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 321 | <section id='ref-classes-buildhistory'> |
| 322 | <title><filename>buildhistory.bbclass</filename></title> |
| 323 | |
| 324 | <para> |
| 325 | The <filename>buildhistory</filename> class records a |
| 326 | history of build output metadata, which can be used to detect possible |
| 327 | regressions as well as used for analysis of the build output. |
| 328 | For more information on using Build History, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 329 | "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>" |
| 330 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 331 | </para> |
| 332 | </section> |
| 333 | |
| 334 | <section id='ref-classes-buildstats'> |
| 335 | <title><filename>buildstats.bbclass</filename></title> |
| 336 | |
| 337 | <para> |
| 338 | The <filename>buildstats</filename> class records |
| 339 | performance statistics about each task executed during the build |
| 340 | (e.g. elapsed time, CPU usage, and I/O usage). |
| 341 | </para> |
| 342 | |
| 343 | <para> |
| 344 | When you use this class, the output goes into the |
| 345 | <link linkend='var-BUILDSTATS_BASE'><filename>BUILDSTATS_BASE</filename></link> |
| 346 | directory, which defaults to <filename>${TMPDIR}/buildstats/</filename>. |
| 347 | You can analyze the elapsed time using |
| 348 | <filename>scripts/pybootchartgui/pybootchartgui.py</filename>, which |
| 349 | produces a cascading chart of the entire build process and can be |
| 350 | useful for highlighting bottlenecks. |
| 351 | </para> |
| 352 | |
| 353 | <para> |
| 354 | Collecting build statistics is enabled by default through the |
| 355 | <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link> |
| 356 | variable from your <filename>local.conf</filename> file. |
| 357 | Consequently, you do not have to do anything to enable the class. |
| 358 | However, if you want to disable the class, simply remove "buildstats" |
| 359 | from the <filename>USER_CLASSES</filename> list. |
| 360 | </para> |
| 361 | </section> |
| 362 | |
| 363 | <section id='ref-classes-buildstats-summary'> |
| 364 | <title><filename>buildstats-summary.bbclass</filename></title> |
| 365 | |
| 366 | <para> |
| 367 | When inherited globally, prints statistics at the end of the build |
| 368 | on sstate re-use. |
| 369 | In order to function, this class requires the |
| 370 | <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link> |
| 371 | class be enabled. |
| 372 | </para> |
| 373 | </section> |
| 374 | |
| 375 | <section id='ref-classes-ccache'> |
| 376 | <title><filename>ccache.bbclass</filename></title> |
| 377 | |
| 378 | <para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 379 | The <filename>ccache</filename> class enables the C/C++ Compiler Cache |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 380 | for the build. |
| 381 | This class is used to give a minor performance boost during the build. |
| 382 | However, using the class can lead to unexpected side-effects. |
| 383 | Thus, it is recommended that you do not use this class. |
| 384 | See <ulink url='http://ccache.samba.org/'></ulink> for information on |
| 385 | the C/C++ Compiler Cache. |
| 386 | </para> |
| 387 | </section> |
| 388 | |
| 389 | <section id='ref-classes-chrpath'> |
| 390 | <title><filename>chrpath.bbclass</filename></title> |
| 391 | |
| 392 | <para> |
| 393 | The <filename>chrpath</filename> class |
| 394 | is a wrapper around the "chrpath" utility, which is used during the |
| 395 | build process for <filename>nativesdk</filename>, |
| 396 | <filename>cross</filename>, and |
| 397 | <filename>cross-canadian</filename> recipes to change |
| 398 | <filename>RPATH</filename> records within binaries in order to make |
| 399 | them relocatable. |
| 400 | </para> |
| 401 | </section> |
| 402 | |
| 403 | <section id='ref-classes-clutter'> |
| 404 | <title><filename>clutter.bbclass</filename></title> |
| 405 | |
| 406 | <para> |
| 407 | The <filename>clutter</filename> class consolidates the |
| 408 | major and minor version naming and other common items used by Clutter |
| 409 | and related recipes. |
| 410 | <note> |
| 411 | Unlike some other classes related to specific libraries, recipes |
| 412 | building other software that uses Clutter do not need to |
| 413 | inherit this class unless they use the same recipe versioning |
| 414 | scheme that the Clutter and related recipes do. |
| 415 | </note> |
| 416 | </para> |
| 417 | </section> |
| 418 | |
| 419 | <section id='ref-classes-cmake'> |
| 420 | <title><filename>cmake.bbclass</filename></title> |
| 421 | |
| 422 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 423 | The <filename>cmake</filename> class allows for recipes that need to |
| 424 | build software using the |
| 425 | <ulink url='https://cmake.org/overview/'>CMake</ulink> build system. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 426 | You can use the |
| 427 | <link linkend='var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></link> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 428 | variable to specify additional configuration options to be passed |
| 429 | using the <filename>cmake</filename> command line. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 430 | </para> |
| 431 | </section> |
| 432 | |
| 433 | <section id='ref-classes-cml1'> |
| 434 | <title><filename>cml1.bbclass</filename></title> |
| 435 | |
| 436 | <para> |
| 437 | The <filename>cml1</filename> class provides basic support for the |
| 438 | Linux kernel style build configuration system. |
| 439 | </para> |
| 440 | </section> |
| 441 | |
| 442 | <section id='ref-classes-compress_doc'> |
| 443 | <title><filename>compress_doc.bbclass</filename></title> |
| 444 | |
| 445 | <para> |
| 446 | Enables compression for man pages and info pages. |
| 447 | This class is intended to be inherited globally. |
| 448 | The default compression mechanism is gz (gzip) but you can |
| 449 | select an alternative mechanism by setting the |
| 450 | <link linkend='var-DOC_COMPRESS'><filename>DOC_COMPRESS</filename></link> |
| 451 | variable. |
| 452 | </para> |
| 453 | </section> |
| 454 | |
| 455 | <section id='ref-classes-copyleft_compliance'> |
| 456 | <title><filename>copyleft_compliance.bbclass</filename></title> |
| 457 | |
| 458 | <para> |
| 459 | The <filename>copyleft_compliance</filename> class |
| 460 | preserves source code for the purposes of license compliance. |
| 461 | This class is an alternative to the <filename>archiver</filename> |
| 462 | class and is still used by some users even though it has been |
| 463 | deprecated in favor of the |
| 464 | <link linkend='ref-classes-archiver'><filename>archiver</filename></link> |
| 465 | class. |
| 466 | </para> |
| 467 | </section> |
| 468 | |
| 469 | <section id='ref-classes-copyleft_filter'> |
| 470 | <title><filename>copyleft_filter.bbclass</filename></title> |
| 471 | |
| 472 | <para> |
| 473 | A class used by the |
| 474 | <link linkend='ref-classes-archiver'><filename>archiver</filename></link> |
| 475 | and |
| 476 | <link linkend='ref-classes-copyleft_compliance'><filename>copyleft_compliance</filename></link> |
| 477 | classes for filtering licenses. |
| 478 | The <filename>copyleft_filter</filename> class is an internal class |
| 479 | and is not intended to be used directly. |
| 480 | </para> |
| 481 | </section> |
| 482 | |
| 483 | <section id='ref-classes-core-image'> |
| 484 | <title><filename>core-image.bbclass</filename></title> |
| 485 | |
| 486 | <para> |
| 487 | The <filename>core-image</filename> class |
| 488 | provides common definitions for the |
| 489 | <filename>core-image-*</filename> image recipes, such as support for |
| 490 | additional |
| 491 | <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>. |
| 492 | </para> |
| 493 | </section> |
| 494 | |
| 495 | <section id='ref-classes-cpan'> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 496 | <title><filename>cpan*.bbclass</filename></title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 497 | |
| 498 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 499 | The <filename>cpan*</filename> classes support Perl modules. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 500 | </para> |
| 501 | |
| 502 | <para> |
| 503 | Recipes for Perl modules are simple. |
| 504 | These recipes usually only need to point to the source's archive and |
| 505 | then inherit the proper class file. |
| 506 | Building is split into two methods depending on which method the module |
| 507 | authors used. |
| 508 | <itemizedlist> |
| 509 | <listitem><para>Modules that use old |
| 510 | <filename>Makefile.PL</filename>-based build system require |
| 511 | <filename>cpan.bbclass</filename> in their recipes. |
| 512 | </para></listitem> |
| 513 | <listitem><para>Modules that use |
| 514 | <filename>Build.PL</filename>-based build system require |
| 515 | using <filename>cpan_build.bbclass</filename> in their recipes. |
| 516 | </para></listitem> |
| 517 | </itemizedlist> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 518 | Both build methods inherit the <filename>cpan-base</filename> class |
| 519 | for basic Perl support. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 520 | </para> |
| 521 | </section> |
| 522 | |
| 523 | <section id='ref-classes-cross'> |
| 524 | <title><filename>cross.bbclass</filename></title> |
| 525 | |
| 526 | <para> |
| 527 | The <filename>cross</filename> class provides support for the recipes |
| 528 | that build the cross-compilation tools. |
| 529 | </para> |
| 530 | </section> |
| 531 | |
| 532 | <section id='ref-classes-cross-canadian'> |
| 533 | <title><filename>cross-canadian.bbclass</filename></title> |
| 534 | |
| 535 | <para> |
| 536 | The <filename>cross-canadian</filename> class |
| 537 | provides support for the recipes that build the Canadian |
| 538 | Cross-compilation tools for SDKs. |
| 539 | See the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 540 | "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>" |
| 541 | section in the Yocto Project Overview and Concepts Manual for more |
| 542 | discussion on these cross-compilation tools. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 543 | </para> |
| 544 | </section> |
| 545 | |
| 546 | <section id='ref-classes-crosssdk'> |
| 547 | <title><filename>crosssdk.bbclass</filename></title> |
| 548 | |
| 549 | <para> |
| 550 | The <filename>crosssdk</filename> class |
| 551 | provides support for the recipes that build the cross-compilation |
| 552 | tools used for building SDKs. |
| 553 | See the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 554 | "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>" |
| 555 | section in the Yocto Project Overview and Concepts Manual for more |
| 556 | discussion on these cross-compilation tools. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 557 | </para> |
| 558 | </section> |
| 559 | |
| 560 | <section id='ref-classes-debian'> |
| 561 | <title><filename>debian.bbclass</filename></title> |
| 562 | |
| 563 | <para> |
| 564 | The <filename>debian</filename> class renames output packages so that |
| 565 | they follow the Debian naming policy (i.e. <filename>glibc</filename> |
| 566 | becomes <filename>libc6</filename> and <filename>glibc-devel</filename> |
| 567 | becomes <filename>libc6-dev</filename>.) |
| 568 | Renaming includes the library name and version as part of the package |
| 569 | name. |
| 570 | </para> |
| 571 | |
| 572 | <para> |
| 573 | If a recipe creates packages for multiple libraries |
| 574 | (shared object files of <filename>.so</filename> type), use the |
| 575 | <link linkend='var-LEAD_SONAME'><filename>LEAD_SONAME</filename></link> |
| 576 | variable in the recipe to specify the library on which to apply the |
| 577 | naming scheme. |
| 578 | </para> |
| 579 | </section> |
| 580 | |
| 581 | <section id='ref-classes-deploy'> |
| 582 | <title><filename>deploy.bbclass</filename></title> |
| 583 | |
| 584 | <para> |
| 585 | The <filename>deploy</filename> class handles deploying files |
| 586 | to the |
| 587 | <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link> |
| 588 | directory. |
| 589 | The main function of this class is to allow the deploy step to be |
| 590 | accelerated by shared state. |
| 591 | Recipes that inherit this class should define their own |
| 592 | <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link> |
| 593 | function to copy the files to be deployed to |
| 594 | <link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link>, |
| 595 | and use <filename>addtask</filename> to add the task at the appropriate |
| 596 | place, which is usually after |
| 597 | <link linkend='ref-tasks-compile'><filename>do_compile</filename></link> |
| 598 | or |
| 599 | <link linkend='ref-tasks-install'><filename>do_install</filename></link>. |
| 600 | The class then takes care of staging the files from |
| 601 | <filename>DEPLOYDIR</filename> to |
| 602 | <filename>DEPLOY_DIR_IMAGE</filename>. |
| 603 | </para> |
| 604 | </section> |
| 605 | |
| 606 | <section id='ref-classes-devshell'> |
| 607 | <title><filename>devshell.bbclass</filename></title> |
| 608 | |
| 609 | <para> |
| 610 | The <filename>devshell</filename> class adds the |
| 611 | <filename>do_devshell</filename> task. |
| 612 | Distribution policy dictates whether to include this class. |
| 613 | See the |
| 614 | "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 615 | in the Yocto Project Development Tasks Manual for more information about |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 616 | using <filename>devshell</filename>. |
| 617 | </para> |
| 618 | </section> |
| 619 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 620 | <section id='ref-classes-devupstream'> |
| 621 | <title><filename>devupstream.bbclass</filename></title> |
| 622 | |
| 623 | <para> |
| 624 | The <filename>devupstream</filename> class uses |
| 625 | <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> |
| 626 | to add a variant of the recipe that fetches from an alternative URI |
| 627 | (e.g. Git) instead of a tarball. |
| 628 | Following is an example: |
| 629 | <literallayout class='monospaced'> |
| 630 | BBCLASSEXTEND = "devupstream:target" |
| 631 | SRC_URI_class-devupstream = "git://git.example.com/example" |
| 632 | SRCREV_class-devupstream = "abcd1234" |
| 633 | </literallayout> |
| 634 | Adding the above statements to your recipe creates a variant that has |
| 635 | <link linkend='var-DEFAULT_PREFERENCE'><filename>DEFAULT_PREFERENCE</filename></link> |
| 636 | set to "-1". |
| 637 | Consequently, you need to select the variant of the recipe to use it. |
| 638 | Any development-specific adjustments can be done by using the |
| 639 | <filename>class-devupstream</filename> override. |
| 640 | Here is an example: |
| 641 | <literallayout class='monospaced'> |
| 642 | DEPENDS_append_class-devupstream = " gperf-native" |
| 643 | |
| 644 | do_configure_prepend_class-devupstream() { |
| 645 | touch ${S}/README |
| 646 | } |
| 647 | </literallayout> |
| 648 | The class currently only supports creating a development variant of |
| 649 | the target recipe, not <filename>native</filename> or |
| 650 | <filename>nativesdk</filename> variants. |
| 651 | </para> |
| 652 | |
| 653 | <para> |
| 654 | The <filename>BBCLASSEXTEND</filename> syntax |
| 655 | (i.e. <filename>devupstream:target</filename>) provides support for |
| 656 | <filename>native</filename> and <filename>nativesdk</filename> |
| 657 | variants. |
| 658 | Consequently, this functionality can be added in a future release. |
| 659 | </para> |
| 660 | |
| 661 | <para> |
| 662 | Support for other version control systems such as Subversion is |
| 663 | limited due to BitBake's automatic fetch dependencies (e.g. |
| 664 | <filename>subversion-native</filename>). |
| 665 | </para> |
| 666 | </section> |
| 667 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 668 | <section id='ref-classes-distro_features_check'> |
| 669 | <title><filename>distro_features_check.bbclass</filename></title> |
| 670 | |
| 671 | <para> |
| 672 | The <filename>distro_features_check</filename> class |
| 673 | allows individual recipes to check for required and conflicting |
| 674 | <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>. |
| 675 | </para> |
| 676 | |
| 677 | <para> |
| 678 | This class provides support for the |
| 679 | <link linkend='var-REQUIRED_DISTRO_FEATURES'><filename>REQUIRED_DISTRO_FEATURES</filename></link> |
| 680 | and |
| 681 | <link linkend='var-CONFLICT_DISTRO_FEATURES'><filename>CONFLICT_DISTRO_FEATURES</filename></link> |
| 682 | variables. |
| 683 | If any conditions specified in the recipe using the above variables are |
| 684 | not met, the recipe will be skipped. |
| 685 | </para> |
| 686 | </section> |
| 687 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 688 | <section id='ref-classes-distutils'> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 689 | <title><filename>distutils*.bbclass</filename></title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 690 | |
| 691 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 692 | The <filename>distutils*</filename> classes support recipes for Python |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 693 | version 2.x extensions, which are simple. |
| 694 | These recipes usually only need to point to the source's archive and |
| 695 | then inherit the proper class. |
| 696 | Building is split into two methods depending on which method the |
| 697 | module authors used. |
| 698 | <itemizedlist> |
| 699 | <listitem><para>Extensions that use an Autotools-based build system |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 700 | require Autotools and the classes based on |
| 701 | <filename>distutils</filename> in their recipes. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 702 | </para></listitem> |
| 703 | <listitem><para>Extensions that use build systems based on |
| 704 | <filename>distutils</filename> require |
| 705 | the <filename>distutils</filename> class in their recipes. |
| 706 | </para></listitem> |
| 707 | <listitem><para>Extensions that use build systems based on |
| 708 | <filename>setuptools</filename> require the |
| 709 | <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link> |
| 710 | class in their recipes. |
| 711 | </para></listitem> |
| 712 | </itemizedlist> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 713 | The <filename>distutils-common-base</filename> class is required by |
| 714 | some of the <filename>distutils*</filename> classes to provide common |
| 715 | Python2 support. |
| 716 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 717 | </section> |
| 718 | |
| 719 | <section id='ref-classes-distutils3'> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 720 | <title><filename>distutils3*.bbclass</filename></title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 721 | |
| 722 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 723 | The <filename>distutils3*</filename> classes support recipes for Python |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 724 | version 3.x extensions, which are simple. |
| 725 | These recipes usually only need to point to the source's archive and |
| 726 | then inherit the proper class. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 727 | Building is split into three methods depending on which method the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 728 | module authors used. |
| 729 | <itemizedlist> |
| 730 | <listitem><para>Extensions that use an Autotools-based build system |
| 731 | require Autotools and |
| 732 | <filename>distutils</filename>-based classes in their recipes. |
| 733 | </para></listitem> |
| 734 | <listitem><para>Extensions that use |
| 735 | <filename>distutils</filename>-based build systems require |
| 736 | the <filename>distutils</filename> class in their recipes. |
| 737 | </para></listitem> |
| 738 | <listitem><para>Extensions that use build systems based on |
| 739 | <filename>setuptools3</filename> require the |
| 740 | <link linkend='ref-classes-setuptools'><filename>setuptools3</filename></link> |
| 741 | class in their recipes. |
| 742 | </para></listitem> |
| 743 | </itemizedlist> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 744 | The <filename>distutils3*</filename> classes either inherit their |
| 745 | corresponding <filename>distutils*</filename> class or replicate them |
| 746 | using a Python3 version instead (e.g. |
| 747 | <filename>distutils3-base</filename> inherits |
| 748 | <filename>distutils-common-base</filename>, which is the same as |
| 749 | <filename>distutils-base</filename> but inherits |
| 750 | <filename>python3native</filename> instead of |
| 751 | <filename>pythonnative</filename>). |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 752 | </para> |
| 753 | </section> |
| 754 | |
| 755 | <section id='ref-classes-externalsrc'> |
| 756 | <title><filename>externalsrc.bbclass</filename></title> |
| 757 | |
| 758 | <para> |
| 759 | The <filename>externalsrc</filename> class supports building software |
| 760 | from source code that is external to the OpenEmbedded build system. |
| 761 | Building software from an external source tree means that the build |
| 762 | system's normal fetch, unpack, and patch process is not used. |
| 763 | </para> |
| 764 | |
| 765 | <para> |
| 766 | By default, the OpenEmbedded build system uses the |
| 767 | <link linkend='var-S'><filename>S</filename></link> and |
| 768 | <link linkend='var-B'><filename>B</filename></link> variables to |
| 769 | locate unpacked recipe source code and to build it, respectively. |
| 770 | When your recipe inherits the <filename>externalsrc</filename> class, |
| 771 | you use the |
| 772 | <link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link> |
| 773 | and |
| 774 | <link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link> |
| 775 | variables to ultimately define <filename>S</filename> and |
| 776 | <filename>B</filename>. |
| 777 | </para> |
| 778 | |
| 779 | <para> |
| 780 | By default, this class expects the source code to support recipe builds |
| 781 | that use the <link linkend='var-B'><filename>B</filename></link> |
| 782 | variable to point to the directory in which the OpenEmbedded build |
| 783 | system places the generated objects built from the recipes. |
| 784 | By default, the <filename>B</filename> directory is set to the |
| 785 | following, which is separate from the source directory |
| 786 | (<filename>S</filename>): |
| 787 | <literallayout class='monospaced'> |
| 788 | ${WORKDIR}/${BPN}/{PV}/ |
| 789 | </literallayout> |
| 790 | See these variables for more information: |
| 791 | <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>, |
| 792 | <link linkend='var-BPN'><filename>BPN</filename></link>, and |
| 793 | <link linkend='var-PV'><filename>PV</filename></link>, |
| 794 | </para> |
| 795 | |
| 796 | <para> |
| 797 | For more information on the |
| 798 | <filename>externalsrc</filename> class, see the comments in |
| 799 | <filename>meta/classes/externalsrc.bbclass</filename> in the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 800 | <link linkend='source-directory'>Source Directory</link>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 801 | For information on how to use the <filename>externalsrc</filename> |
| 802 | class, see the |
| 803 | "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 804 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 805 | </para> |
| 806 | </section> |
| 807 | |
| 808 | <section id='ref-classes-extrausers'> |
| 809 | <title><filename>extrausers.bbclass</filename></title> |
| 810 | |
| 811 | <para> |
| 812 | The <filename>extrausers</filename> class allows |
| 813 | additional user and group configuration to be applied at the image |
| 814 | level. |
| 815 | Inheriting this class either globally or from an image recipe allows |
| 816 | additional user and group operations to be performed using the |
| 817 | <link linkend='var-EXTRA_USERS_PARAMS'><filename>EXTRA_USERS_PARAMS</filename></link> |
| 818 | variable. |
| 819 | <note> |
| 820 | The user and group operations added using the |
| 821 | <filename>extrausers</filename> class are not tied to a specific |
| 822 | recipe outside of the recipe for the image. |
| 823 | Thus, the operations can be performed across the image as a whole. |
| 824 | Use the |
| 825 | <link linkend='ref-classes-useradd'><filename>useradd</filename></link> |
| 826 | class to add user and group configuration to a specific recipe. |
| 827 | </note> |
| 828 | Here is an example that uses this class in an image recipe: |
| 829 | <literallayout class='monospaced'> |
| 830 | inherit extrausers |
| 831 | EXTRA_USERS_PARAMS = "\ |
| 832 | useradd -p '' tester; \ |
| 833 | groupadd developers; \ |
| 834 | userdel nobody; \ |
| 835 | groupdel -g video; \ |
| 836 | groupmod -g 1020 developers; \ |
| 837 | usermod -s /bin/sh tester; \ |
| 838 | " |
| 839 | </literallayout> |
| 840 | Here is an example that adds two users named "tester-jim" and |
| 841 | "tester-sue" and assigns passwords: |
| 842 | <literallayout class='monospaced'> |
| 843 | inherit extrausers |
| 844 | EXTRA_USERS_PARAMS = "\ |
| 845 | useradd -P tester01 tester-jim; \ |
| 846 | useradd -P tester01 tester-sue; \ |
| 847 | " |
| 848 | </literallayout> |
| 849 | Finally, here is an example that sets the root password to |
| 850 | "1876*18": |
| 851 | <literallayout class='monospaced'> |
| 852 | inherit extrausers |
| 853 | EXTRA_USERS_PARAMS = "\ |
| 854 | usermod -P 1876*18 root; \ |
| 855 | " |
| 856 | </literallayout> |
| 857 | </para> |
| 858 | </section> |
| 859 | |
| 860 | <section id='ref-classes-fontcache'> |
| 861 | <title><filename>fontcache.bbclass</filename></title> |
| 862 | |
| 863 | <para> |
| 864 | The <filename>fontcache</filename> class generates the |
| 865 | proper post-install and post-remove (postinst and postrm) |
| 866 | scriptlets for font packages. |
| 867 | These scriptlets call <filename>fc-cache</filename> (part of |
| 868 | <filename>Fontconfig</filename>) to add the fonts to the font |
| 869 | information cache. |
| 870 | Since the cache files are architecture-specific, |
| 871 | <filename>fc-cache</filename> runs using QEMU if the postinst |
| 872 | scriptlets need to be run on the build host during image creation. |
| 873 | </para> |
| 874 | |
| 875 | <para> |
| 876 | If the fonts being installed are in packages other than the main |
| 877 | package, set |
| 878 | <link linkend='var-FONT_PACKAGES'><filename>FONT_PACKAGES</filename></link> |
| 879 | to specify the packages containing the fonts. |
| 880 | </para> |
| 881 | </section> |
| 882 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 883 | <section id='ref-classes-fs-uuid'> |
| 884 | <title><filename>fs-uuid.bbclass</filename></title> |
| 885 | |
| 886 | <para> |
| 887 | The <filename>fs-uuid</filename> class extracts UUID from |
| 888 | <filename>${</filename><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link><filename>}</filename>, |
| 889 | which must have been built by the time that this function gets called. |
| 890 | The <filename>fs-uuid</filename> class only works on |
| 891 | <filename>ext</filename> file systems and depends on |
| 892 | <filename>tune2fs</filename>. |
| 893 | </para> |
| 894 | </section> |
| 895 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 896 | <section id='ref-classes-gconf'> |
| 897 | <title><filename>gconf.bbclass</filename></title> |
| 898 | |
| 899 | <para> |
| 900 | The <filename>gconf</filename> class provides common |
| 901 | functionality for recipes that need to install GConf schemas. |
| 902 | The schemas will be put into a separate package |
| 903 | (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-gconf</filename>) |
| 904 | that is created automatically when this class is inherited. |
| 905 | This package uses the appropriate post-install and post-remove |
| 906 | (postinst/postrm) scriptlets to register and unregister the schemas |
| 907 | in the target image. |
| 908 | </para> |
| 909 | </section> |
| 910 | |
| 911 | <section id='ref-classes-gettext'> |
| 912 | <title><filename>gettext.bbclass</filename></title> |
| 913 | |
| 914 | <para> |
| 915 | The <filename>gettext</filename> class provides support for |
| 916 | building software that uses the GNU <filename>gettext</filename> |
| 917 | internationalization and localization system. |
| 918 | All recipes building software that use |
| 919 | <filename>gettext</filename> should inherit this class. |
| 920 | </para> |
| 921 | </section> |
| 922 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 923 | <section id='ref-classes-gnomebase'> |
| 924 | <title><filename>gnomebase.bbclass</filename></title> |
| 925 | |
| 926 | <para> |
| 927 | The <filename>gnomebase</filename> class is the base |
| 928 | class for recipes that build software from the GNOME stack. |
| 929 | This class sets |
| 930 | <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> to |
| 931 | download the source from the GNOME mirrors as well as extending |
| 932 | <link linkend='var-FILES'><filename>FILES</filename></link> |
| 933 | with the typical GNOME installation paths. |
| 934 | </para> |
| 935 | </section> |
| 936 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 937 | <section id='ref-classes-gobject-introspection'> |
| 938 | <title><filename>gobject-introspection.bbclass</filename></title> |
| 939 | |
| 940 | <para> |
| 941 | Provides support for recipes building software that |
| 942 | supports GObject introspection. |
| 943 | This functionality is only enabled if the |
| 944 | "gobject-introspection-data" feature is in |
| 945 | <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link> |
| 946 | as well as "qemu-usermode" being in |
| 947 | <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>. |
| 948 | <note> |
| 949 | This functionality is backfilled by default and, |
| 950 | if not applicable, should be disabled through |
| 951 | <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link> |
| 952 | or |
| 953 | <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>, |
| 954 | respectively. |
| 955 | </note> |
| 956 | </para> |
| 957 | </section> |
| 958 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 959 | <section id='ref-classes-grub-efi'> |
| 960 | <title><filename>grub-efi.bbclass</filename></title> |
| 961 | |
| 962 | <para> |
| 963 | The <filename>grub-efi</filename> |
| 964 | class provides <filename>grub-efi</filename>-specific functions for |
| 965 | building bootable images. |
| 966 | </para> |
| 967 | |
| 968 | <para> |
| 969 | This class supports several variables: |
| 970 | <itemizedlist> |
| 971 | <listitem><para> |
| 972 | <link linkend='var-INITRD'><filename>INITRD</filename></link>: |
| 973 | Indicates list of filesystem images to concatenate and use |
| 974 | as an initial RAM disk (initrd) (optional). |
| 975 | </para></listitem> |
| 976 | <listitem><para> |
| 977 | <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>: |
| 978 | Indicates a filesystem image to include as the root filesystem |
| 979 | (optional).</para></listitem> |
| 980 | <listitem><para> |
| 981 | <link linkend='var-GRUB_GFXSERIAL'><filename>GRUB_GFXSERIAL</filename></link>: |
| 982 | Set this to "1" to have graphics and serial in the boot menu. |
| 983 | </para></listitem> |
| 984 | <listitem><para> |
| 985 | <link linkend='var-LABELS'><filename>LABELS</filename></link>: |
| 986 | A list of targets for the automatic configuration. |
| 987 | </para></listitem> |
| 988 | <listitem><para> |
| 989 | <link linkend='var-APPEND'><filename>APPEND</filename></link>: |
| 990 | An override list of append strings for each |
| 991 | <filename>LABEL</filename>. |
| 992 | </para></listitem> |
| 993 | <listitem><para> |
| 994 | <link linkend='var-GRUB_OPTS'><filename>GRUB_OPTS</filename></link>: |
| 995 | Additional options to add to the configuration (optional). |
| 996 | Options are delimited using semi-colon characters |
| 997 | (<filename>;</filename>).</para></listitem> |
| 998 | <listitem><para> |
| 999 | <link linkend='var-GRUB_TIMEOUT'><filename>GRUB_TIMEOUT</filename></link>: |
| 1000 | Timeout before executing the default <filename>LABEL</filename> |
| 1001 | (optional). |
| 1002 | </para></listitem> |
| 1003 | </itemizedlist> |
| 1004 | </para> |
| 1005 | </section> |
| 1006 | |
| 1007 | <section id='ref-classes-gsettings'> |
| 1008 | <title><filename>gsettings.bbclass</filename></title> |
| 1009 | |
| 1010 | <para> |
| 1011 | The <filename>gsettings</filename> class |
| 1012 | provides common functionality for recipes that need to install |
| 1013 | GSettings (glib) schemas. |
| 1014 | The schemas are assumed to be part of the main package. |
| 1015 | Appropriate post-install and post-remove (postinst/postrm) |
| 1016 | scriptlets are added to register and unregister the schemas in the |
| 1017 | target image. |
| 1018 | </para> |
| 1019 | </section> |
| 1020 | |
| 1021 | <section id='ref-classes-gtk-doc'> |
| 1022 | <title><filename>gtk-doc.bbclass</filename></title> |
| 1023 | |
| 1024 | <para> |
| 1025 | The <filename>gtk-doc</filename> class |
| 1026 | is a helper class to pull in the appropriate |
| 1027 | <filename>gtk-doc</filename> dependencies and disable |
| 1028 | <filename>gtk-doc</filename>. |
| 1029 | </para> |
| 1030 | </section> |
| 1031 | |
| 1032 | <section id='ref-classes-gtk-icon-cache'> |
| 1033 | <title><filename>gtk-icon-cache.bbclass</filename></title> |
| 1034 | |
| 1035 | <para> |
| 1036 | The <filename>gtk-icon-cache</filename> class |
| 1037 | generates the proper post-install and post-remove (postinst/postrm) |
| 1038 | scriptlets for packages that use GTK+ and install icons. |
| 1039 | These scriptlets call <filename>gtk-update-icon-cache</filename> to add |
| 1040 | the fonts to GTK+'s icon cache. |
| 1041 | Since the cache files are architecture-specific, |
| 1042 | <filename>gtk-update-icon-cache</filename> is run using QEMU if the |
| 1043 | postinst scriptlets need to be run on the build host during image |
| 1044 | creation. |
| 1045 | </para> |
| 1046 | </section> |
| 1047 | |
| 1048 | <section id='ref-classes-gtk-immodules-cache'> |
| 1049 | <title><filename>gtk-immodules-cache.bbclass</filename></title> |
| 1050 | |
| 1051 | <para> |
| 1052 | The <filename>gtk-immodules-cache</filename> class |
| 1053 | generates the proper post-install and post-remove (postinst/postrm) |
| 1054 | scriptlets for packages that install GTK+ input method modules for |
| 1055 | virtual keyboards. |
| 1056 | These scriptlets call <filename>gtk-update-icon-cache</filename> to add |
| 1057 | the input method modules to the cache. |
| 1058 | Since the cache files are architecture-specific, |
| 1059 | <filename>gtk-update-icon-cache</filename> is run using QEMU if the |
| 1060 | postinst scriptlets need to be run on the build host during image |
| 1061 | creation. |
| 1062 | </para> |
| 1063 | |
| 1064 | <para> |
| 1065 | If the input method modules being installed are in packages other than |
| 1066 | the main package, set |
| 1067 | <link linkend='var-GTKIMMODULES_PACKAGES'><filename>GTKIMMODULES_PACKAGES</filename></link> |
| 1068 | to specify the packages containing the modules. |
| 1069 | </para> |
| 1070 | </section> |
| 1071 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1072 | <section id='ref-classes-gzipnative'> |
| 1073 | <title><filename>gzipnative.bbclass</filename></title> |
| 1074 | |
| 1075 | <para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1076 | The <filename>gzipnative</filename> class enables the use of |
| 1077 | different native versions of <filename>gzip</filename> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1078 | and <filename>pigz</filename> rather than the versions of these tools |
| 1079 | from the build host. |
| 1080 | </para> |
| 1081 | </section> |
| 1082 | |
| 1083 | <section id='ref-classes-icecc'> |
| 1084 | <title><filename>icecc.bbclass</filename></title> |
| 1085 | |
| 1086 | <para> |
| 1087 | The <filename>icecc</filename> class supports |
| 1088 | <ulink url='https://github.com/icecc/icecream'>Icecream</ulink>, which |
| 1089 | facilitates taking compile jobs and distributing them among remote |
| 1090 | machines. |
| 1091 | </para> |
| 1092 | |
| 1093 | <para> |
| 1094 | The class stages directories with symlinks from <filename>gcc</filename> |
| 1095 | and <filename>g++</filename> to <filename>icecc</filename>, for both |
| 1096 | native and cross compilers. |
| 1097 | Depending on each configure or compile, the OpenEmbedded build system |
| 1098 | adds the directories at the head of the <filename>PATH</filename> list |
| 1099 | and then sets the <filename>ICECC_CXX</filename> and |
| 1100 | <filename>ICEC_CC</filename> variables, which are the paths to the |
| 1101 | <filename>g++</filename> and <filename>gcc</filename> compilers, |
| 1102 | respectively. |
| 1103 | </para> |
| 1104 | |
| 1105 | <para> |
| 1106 | For the cross compiler, the class creates a <filename>tar.gz</filename> |
| 1107 | file that contains the Yocto Project toolchain and sets |
| 1108 | <filename>ICECC_VERSION</filename>, which is the version of the |
| 1109 | cross-compiler used in the cross-development toolchain, accordingly. |
| 1110 | </para> |
| 1111 | |
| 1112 | <para> |
| 1113 | The class handles all three different compile stages |
| 1114 | (i.e native ,cross-kernel and target) and creates the necessary |
| 1115 | environment <filename>tar.gz</filename> file to be used by the remote |
| 1116 | machines. |
| 1117 | The class also supports SDK generation. |
| 1118 | </para> |
| 1119 | |
| 1120 | <para> |
| 1121 | If <link linkend='var-ICECC_PATH'><filename>ICECC_PATH</filename></link> |
| 1122 | is not set in your <filename>local.conf</filename> file, then the |
| 1123 | class tries to locate the <filename>icecc</filename> binary |
| 1124 | using <filename>which</filename>. |
| 1125 | |
| 1126 | If |
| 1127 | <link linkend='var-ICECC_ENV_EXEC'><filename>ICECC_ENV_EXEC</filename></link> |
| 1128 | is set in your <filename>local.conf</filename> file, the variable should |
| 1129 | point to the <filename>icecc-create-env</filename> script |
| 1130 | provided by the user. |
| 1131 | If you do not point to a user-provided script, the build system |
| 1132 | uses the default script provided by the recipe |
| 1133 | <filename>icecc-create-env-native.bb</filename>. |
| 1134 | <note> |
| 1135 | This script is a modified version and not the one that comes with |
| 1136 | <filename>icecc</filename>. |
| 1137 | </note> |
| 1138 | </para> |
| 1139 | |
| 1140 | <para> |
| 1141 | If you do not want the Icecream distributed compile support to apply |
| 1142 | to specific recipes or classes, you can effectively "blacklist" them |
| 1143 | by listing the recipes and classes using the |
| 1144 | <link linkend='var-ICECC_USER_PACKAGE_BL'><filename>ICECC_USER_PACKAGE_BL</filename></link> |
| 1145 | and |
| 1146 | <link linkend='var-ICECC_USER_CLASS_BL'><filename>ICECC_USER_CLASS_BL</filename></link>, |
| 1147 | variables, respectively, in your <filename>local.conf</filename> file. |
| 1148 | Doing so causes the OpenEmbedded build system to handle these |
| 1149 | compilations locally. |
| 1150 | </para> |
| 1151 | |
| 1152 | <para> |
| 1153 | Additionally, you can list recipes using the |
| 1154 | <link linkend='var-ICECC_USER_PACKAGE_WL'><filename>ICECC_USER_PACKAGE_WL</filename></link> |
| 1155 | variable in your <filename>local.conf</filename> file to force |
| 1156 | <filename>icecc</filename> to be enabled for recipes using an empty |
| 1157 | <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link> |
| 1158 | variable. |
| 1159 | </para> |
| 1160 | |
| 1161 | <para> |
| 1162 | Inheriting the <filename>icecc</filename> class changes all sstate |
| 1163 | signatures. |
| 1164 | Consequently, if a development team has a dedicated build system |
| 1165 | that populates |
| 1166 | <link linkend='var-SSTATE_MIRRORS'><filename>STATE_MIRRORS</filename></link> |
| 1167 | and they want to reuse sstate from |
| 1168 | <filename>STATE_MIRRORS</filename>, then all developers and the |
| 1169 | build system need to either inherit the <filename>icecc</filename> |
| 1170 | class or nobody should. |
| 1171 | </para> |
| 1172 | |
| 1173 | <para> |
| 1174 | At the distribution level, you can inherit the |
| 1175 | <filename>icecc</filename> class to be sure that all builders start |
| 1176 | with the same sstate signatures. |
| 1177 | After inheriting the class, you can then disable the feature by setting |
| 1178 | the |
| 1179 | <link linkend='var-ICECC_DISABLED'><filename>ICECC_DISABLED</filename></link> |
| 1180 | variable to "1" as follows: |
| 1181 | <literallayout class='monospaced'> |
| 1182 | INHERIT_DISTRO_append = " icecc" |
| 1183 | ICECC_DISABLED ??= "1" |
| 1184 | </literallayout> |
| 1185 | This practice makes sure everyone is using the same signatures but also |
| 1186 | requires individuals that do want to use Icecream to enable the feature |
| 1187 | individually as follows in your <filename>local.conf</filename> file: |
| 1188 | <literallayout class='monospaced'> |
| 1189 | ICECC_DISABLED = "" |
| 1190 | </literallayout> |
| 1191 | </para> |
| 1192 | </section> |
| 1193 | |
| 1194 | <section id='ref-classes-image'> |
| 1195 | <title><filename>image.bbclass</filename></title> |
| 1196 | |
| 1197 | <para> |
| 1198 | The <filename>image</filename> class helps support creating images |
| 1199 | in different formats. |
| 1200 | First, the root filesystem is created from packages using |
| 1201 | one of the <filename>rootfs*.bbclass</filename> |
| 1202 | files (depending on the package format used) and then one or more image |
| 1203 | files are created. |
| 1204 | <itemizedlist> |
| 1205 | <listitem><para>The |
| 1206 | <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename> |
| 1207 | variable controls the types of images to generate. |
| 1208 | </para></listitem> |
| 1209 | <listitem><para>The |
| 1210 | <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename> |
| 1211 | variable controls the list of packages to install into the |
| 1212 | image.</para></listitem> |
| 1213 | </itemizedlist> |
| 1214 | For information on customizing images, see the |
| 1215 | "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage'>Customizing Images</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1216 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1217 | For information on how images are created, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1218 | "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>" |
| 1219 | section in the Yocto Project Overview and Concpets Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1220 | </para> |
| 1221 | </section> |
| 1222 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1223 | <section id='ref-classes-image-buildinfo'> |
| 1224 | <title><filename>image-buildinfo.bbclass</filename></title> |
| 1225 | |
| 1226 | <para> |
| 1227 | The <filename>image-buildinfo</filename> class writes information |
| 1228 | to the target filesystem on <filename>/etc/build</filename>. |
| 1229 | </para> |
| 1230 | </section> |
| 1231 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1232 | <section id='ref-classes-image_types'> |
| 1233 | <title><filename>image_types.bbclass</filename></title> |
| 1234 | |
| 1235 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1236 | The <filename>image_types</filename> class defines all of the |
| 1237 | standard image output types that you can enable through the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1238 | <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link> |
| 1239 | variable. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1240 | You can use this class as a reference on how to add support for |
| 1241 | custom image output types. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1242 | </para> |
| 1243 | |
| 1244 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1245 | By default, the |
| 1246 | <link linkend='ref-classes-image'><filename>image</filename></link> |
| 1247 | class automatically enables the <filename>image_types</filename> class. |
| 1248 | The <filename>image</filename> class uses the |
| 1249 | <filename>IMGCLASSES</filename> variable as follows: |
| 1250 | <literallayout class='monospaced'> |
| 1251 | IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" |
| 1252 | IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}" |
| 1253 | IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}" |
| 1254 | IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}" |
| 1255 | IMGCLASSES += "image_types_wic" |
| 1256 | IMGCLASSES += "rootfs-postcommands" |
| 1257 | IMGCLASSES += "image-postinst-intercepts" |
| 1258 | inherit ${IMGCLASSES} |
| 1259 | </literallayout> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1260 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1261 | |
| 1262 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1263 | The <filename>image_types</filename> class also handles conversion and |
| 1264 | compression of images. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1265 | <note> |
| 1266 | To build a VMware VMDK image, you need to add "wic.vmdk" to |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1267 | <filename>IMAGE_FSTYPES</filename>. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1268 | This would also be similar for Virtual Box Virtual Disk Image |
| 1269 | ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images. |
| 1270 | </note> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1271 | </para> |
| 1272 | </section> |
| 1273 | |
| 1274 | <section id='ref-classes-image-live'> |
| 1275 | <title><filename>image-live.bbclass</filename></title> |
| 1276 | |
| 1277 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1278 | This class controls building "live" (i.e. HDDIMG and ISO) images. |
| 1279 | Live images contain syslinux for legacy booting, as well as the |
| 1280 | bootloader specified by |
| 1281 | <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link> |
| 1282 | if |
| 1283 | <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link> |
| 1284 | contains "efi". |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1285 | </para> |
| 1286 | |
| 1287 | <para> |
| 1288 | Normally, you do not use this class directly. |
| 1289 | Instead, you add "live" to |
| 1290 | <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1291 | </para> |
| 1292 | </section> |
| 1293 | |
| 1294 | <section id='ref-classes-image-mklibs'> |
| 1295 | <title><filename>image-mklibs.bbclass</filename></title> |
| 1296 | |
| 1297 | <para> |
| 1298 | The <filename>image-mklibs</filename> class |
| 1299 | enables the use of the <filename>mklibs</filename> utility during the |
| 1300 | <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link> |
| 1301 | task, which optimizes the size of |
| 1302 | libraries contained in the image. |
| 1303 | </para> |
| 1304 | |
| 1305 | <para> |
| 1306 | By default, the class is enabled in the |
| 1307 | <filename>local.conf.template</filename> using the |
| 1308 | <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link> |
| 1309 | variable as follows: |
| 1310 | <literallayout class='monospaced'> |
| 1311 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" |
| 1312 | </literallayout> |
| 1313 | </para> |
| 1314 | </section> |
| 1315 | |
| 1316 | <section id='ref-classes-image-prelink'> |
| 1317 | <title><filename>image-prelink.bbclass</filename></title> |
| 1318 | |
| 1319 | <para> |
| 1320 | The <filename>image-prelink</filename> class |
| 1321 | enables the use of the <filename>prelink</filename> utility during |
| 1322 | the |
| 1323 | <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link> |
| 1324 | task, which optimizes the dynamic |
| 1325 | linking of shared libraries to reduce executable startup time. |
| 1326 | </para> |
| 1327 | |
| 1328 | <para> |
| 1329 | By default, the class is enabled in the |
| 1330 | <filename>local.conf.template</filename> using the |
| 1331 | <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link> |
| 1332 | variable as follows: |
| 1333 | <literallayout class='monospaced'> |
| 1334 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" |
| 1335 | </literallayout> |
| 1336 | </para> |
| 1337 | </section> |
| 1338 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1339 | <section id='ref-classes-insane'> |
| 1340 | <title><filename>insane.bbclass</filename></title> |
| 1341 | |
| 1342 | <para> |
| 1343 | The <filename>insane</filename> class adds a step to the package |
| 1344 | generation process so that output quality assurance checks are |
| 1345 | generated by the OpenEmbedded build system. |
| 1346 | A range of checks are performed that check the build's output |
| 1347 | for common problems that show up during runtime. |
| 1348 | Distribution policy usually dictates whether to include this class. |
| 1349 | </para> |
| 1350 | |
| 1351 | <para> |
| 1352 | You can configure the sanity checks so that specific test failures |
| 1353 | either raise a warning or an error message. |
| 1354 | Typically, failures for new tests generate a warning. |
| 1355 | Subsequent failures for the same test would then generate an error |
| 1356 | message once the metadata is in a known and good condition. |
| 1357 | See the |
| 1358 | "<link linkend='ref-qa-checks'>QA Error and Warning Messages</link>" |
| 1359 | Chapter for a list of all the warning and error messages |
| 1360 | you might encounter using a default configuration. |
| 1361 | </para> |
| 1362 | |
| 1363 | <para> |
| 1364 | Use the |
| 1365 | <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and |
| 1366 | <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link> |
| 1367 | variables to control the behavior of |
| 1368 | these checks at the global level (i.e. in your custom distro |
| 1369 | configuration). |
| 1370 | However, to skip one or more checks in recipes, you should use |
| 1371 | <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>. |
| 1372 | For example, to skip the check for symbolic link |
| 1373 | <filename>.so</filename> files in the main package of a recipe, |
| 1374 | add the following to the recipe. |
| 1375 | You need to realize that the package name override, in this example |
| 1376 | <filename>${PN}</filename>, must be used: |
| 1377 | <literallayout class='monospaced'> |
| 1378 | INSANE_SKIP_${PN} += "dev-so" |
| 1379 | </literallayout> |
| 1380 | Please keep in mind that the QA checks exist in order to detect real |
| 1381 | or potential problems in the packaged output. |
| 1382 | So exercise caution when disabling these checks. |
| 1383 | </para> |
| 1384 | |
| 1385 | <para> |
| 1386 | The following list shows the tests you can list with the |
| 1387 | <filename>WARN_QA</filename> and <filename>ERROR_QA</filename> |
| 1388 | variables: |
| 1389 | <itemizedlist> |
| 1390 | <listitem><para><emphasis><filename>already-stripped:</filename></emphasis> |
| 1391 | Checks that produced binaries have not already been |
| 1392 | stripped prior to the build system extracting debug symbols. |
| 1393 | It is common for upstream software projects to default to |
| 1394 | stripping debug symbols for output binaries. |
| 1395 | In order for debugging to work on the target using |
| 1396 | <filename>-dbg</filename> packages, this stripping must be |
| 1397 | disabled. |
| 1398 | </para></listitem> |
| 1399 | <listitem><para><emphasis><filename>arch:</filename></emphasis> |
| 1400 | Checks the Executable and Linkable Format (ELF) type, bit size, |
| 1401 | and endianness of any binaries to ensure they match the target |
| 1402 | architecture. |
| 1403 | This test fails if any binaries do not match the type since |
| 1404 | there would be an incompatibility. |
| 1405 | The test could indicate that the |
| 1406 | wrong compiler or compiler options have been used. |
| 1407 | Sometimes software, like bootloaders, might need to bypass |
| 1408 | this check. |
| 1409 | </para></listitem> |
| 1410 | <listitem><para><emphasis><filename>buildpaths:</filename></emphasis> |
| 1411 | Checks for paths to locations on the build host inside the |
| 1412 | output files. |
| 1413 | Currently, this test triggers too many false positives and |
| 1414 | thus is not normally enabled. |
| 1415 | </para></listitem> |
| 1416 | <listitem><para><emphasis><filename>build-deps:</filename></emphasis> |
| 1417 | Determines if a build-time dependency that is specified through |
| 1418 | <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>, |
| 1419 | explicit |
| 1420 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>, |
| 1421 | or task-level dependencies exists to match any runtime |
| 1422 | dependency. |
| 1423 | This determination is particularly useful to discover where |
| 1424 | runtime dependencies are detected and added during packaging. |
| 1425 | If no explicit dependency has been specified within the |
| 1426 | metadata, at the packaging stage it is too late to ensure that |
| 1427 | the dependency is built, and thus you can end up with an |
| 1428 | error when the package is installed into the image during the |
| 1429 | <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link> |
| 1430 | task because the auto-detected dependency was not satisfied. |
| 1431 | An example of this would be where the |
| 1432 | <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link> |
| 1433 | class automatically adds a dependency on the |
| 1434 | <filename>initscripts-functions</filename> package to packages |
| 1435 | that install an initscript that refers to |
| 1436 | <filename>/etc/init.d/functions</filename>. |
| 1437 | The recipe should really have an explicit |
| 1438 | <filename>RDEPENDS</filename> for the package in question on |
| 1439 | <filename>initscripts-functions</filename> so that the |
| 1440 | OpenEmbedded build system is able to ensure that the |
| 1441 | <filename>initscripts</filename> recipe is actually built and |
| 1442 | thus the <filename>initscripts-functions</filename> package is |
| 1443 | made available. |
| 1444 | </para></listitem> |
| 1445 | <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis> |
| 1446 | Checks the |
| 1447 | <link linkend='ref-tasks-compile'><filename>do_compile</filename></link> |
| 1448 | log for indications |
| 1449 | that paths to locations on the build host were used. |
| 1450 | Using such paths might result in host contamination of the |
| 1451 | build output. |
| 1452 | </para></listitem> |
| 1453 | <listitem><para><emphasis><filename>debug-deps:</filename></emphasis> |
| 1454 | Checks that all packages except <filename>-dbg</filename> |
| 1455 | packages do not depend on <filename>-dbg</filename> |
| 1456 | packages, which would cause a packaging bug. |
| 1457 | </para></listitem> |
| 1458 | <listitem><para><emphasis><filename>debug-files:</filename></emphasis> |
| 1459 | Checks for <filename>.debug</filename> directories in anything but the |
| 1460 | <filename>-dbg</filename> package. |
| 1461 | The debug files should all be in the <filename>-dbg</filename> package. |
| 1462 | Thus, anything packaged elsewhere is incorrect packaging.</para></listitem> |
| 1463 | <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis> |
| 1464 | Checks for invalid version comparison statements in runtime |
| 1465 | dependency relationships between packages (i.e. in |
| 1466 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>, |
| 1467 | <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>, |
| 1468 | <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>, |
| 1469 | <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>, |
| 1470 | <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>, |
| 1471 | and |
| 1472 | <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link> |
| 1473 | variable values). |
| 1474 | Any invalid comparisons might trigger failures or undesirable |
| 1475 | behavior when passed to the package manager. |
| 1476 | </para></listitem> |
| 1477 | <listitem><para><emphasis><filename>desktop:</filename></emphasis> |
| 1478 | Runs the <filename>desktop-file-validate</filename> program |
| 1479 | against any <filename>.desktop</filename> files to validate |
| 1480 | their contents against the specification for |
| 1481 | <filename>.desktop</filename> files.</para></listitem> |
| 1482 | <listitem><para><emphasis><filename>dev-deps:</filename></emphasis> |
| 1483 | Checks that all packages except <filename>-dev</filename> |
| 1484 | or <filename>-staticdev</filename> packages do not depend on |
| 1485 | <filename>-dev</filename> packages, which would be a |
| 1486 | packaging bug.</para></listitem> |
| 1487 | <listitem><para><emphasis><filename>dev-so:</filename></emphasis> |
| 1488 | Checks that the <filename>.so</filename> symbolic links are in the |
| 1489 | <filename>-dev</filename> package and not in any of the other packages. |
| 1490 | In general, these symlinks are only useful for development purposes. |
| 1491 | Thus, the <filename>-dev</filename> package is the correct location for |
| 1492 | them. |
| 1493 | Some very rare cases do exist for dynamically loaded modules where |
| 1494 | these symlinks are needed instead in the main package. |
| 1495 | </para></listitem> |
| 1496 | <listitem><para><emphasis><filename>file-rdeps:</filename></emphasis> |
| 1497 | Checks that file-level dependencies identified by the |
| 1498 | OpenEmbedded build system at packaging time are satisfied. |
| 1499 | For example, a shell script might start with the line |
| 1500 | <filename>#!/bin/bash</filename>. |
| 1501 | This line would translate to a file dependency on |
| 1502 | <filename>/bin/bash</filename>. |
| 1503 | Of the three package managers that the OpenEmbedded build |
| 1504 | system supports, only RPM directly handles file-level |
| 1505 | dependencies, resolving them automatically to packages |
| 1506 | providing the files. |
| 1507 | However, the lack of that functionality in the other two |
| 1508 | package managers does not mean the dependencies do not still |
| 1509 | need resolving. |
| 1510 | This QA check attempts to ensure that explicitly declared |
| 1511 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> |
| 1512 | exist to handle any file-level dependency detected in |
| 1513 | packaged files. |
| 1514 | </para></listitem> |
| 1515 | <listitem><para><emphasis><filename>files-invalid:</filename></emphasis> |
| 1516 | Checks for |
| 1517 | <link linkend='var-FILES'><filename>FILES</filename></link> |
| 1518 | variable values that contain "//", which is invalid. |
| 1519 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1520 | <listitem><para id='insane-host-user-contaminated'> |
| 1521 | <emphasis><filename>host-user-contaminated:</filename></emphasis> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1522 | Checks that no package produced by the recipe contains any |
| 1523 | files outside of <filename>/home</filename> with a user or |
| 1524 | group ID that matches the user running BitBake. |
| 1525 | A match usually indicates that the files are being installed |
| 1526 | with an incorrect UID/GID, since target IDs are independent |
| 1527 | from host IDs. |
| 1528 | For additional information, see the section describing the |
| 1529 | <link linkend='ref-tasks-install'><filename>do_install</filename></link> |
| 1530 | task. |
| 1531 | </para></listitem> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1532 | <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis> |
| 1533 | Report when packages are excluded from being created due to |
| 1534 | being marked with a license that is in |
| 1535 | <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>. |
| 1536 | </para></listitem> |
| 1537 | <listitem><para><emphasis><filename>install-host-path:</filename></emphasis> |
| 1538 | Checks the |
| 1539 | <link linkend='ref-tasks-install'><filename>do_install</filename></link> |
| 1540 | log for indications |
| 1541 | that paths to locations on the build host were used. |
| 1542 | Using such paths might result in host contamination of the |
| 1543 | build output. |
| 1544 | </para></listitem> |
| 1545 | <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis> |
| 1546 | Reports when files have been installed within |
| 1547 | <filename>do_install</filename> but have not been included in |
| 1548 | any package by way of the |
| 1549 | <link linkend='var-FILES'><filename>FILES</filename></link> |
| 1550 | variable. |
| 1551 | Files that do not appear in any package cannot be present in |
| 1552 | an image later on in the build process. |
| 1553 | Ideally, all installed files should be packaged or not |
| 1554 | installed at all. |
| 1555 | These files can be deleted at the end of |
| 1556 | <filename>do_install</filename> if the files are not |
| 1557 | needed in any package. |
| 1558 | </para></listitem> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1559 | <listitem><para><emphasis><filename>invalid-chars:</filename></emphasis> |
| 1560 | Checks that the recipe metadata variables |
| 1561 | <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>, |
| 1562 | <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>, |
| 1563 | <link linkend='var-LICENSE'><filename>LICENSE</filename></link>, |
| 1564 | and |
| 1565 | <link linkend='var-SECTION'><filename>SECTION</filename></link> |
| 1566 | do not contain non-UTF-8 characters. |
| 1567 | Some package managers do not support such characters. |
| 1568 | </para></listitem> |
| 1569 | <listitem><para><emphasis><filename>invalid-packageconfig:</filename></emphasis> |
| 1570 | Checks that no undefined features are being added to |
| 1571 | <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>. |
| 1572 | For example, any name "foo" for which the following form |
| 1573 | does not exist: |
| 1574 | <literallayout class='monospaced'> |
| 1575 | PACKAGECONFIG[foo] = "..." |
| 1576 | </literallayout> |
| 1577 | </para></listitem> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1578 | <listitem><para><emphasis><filename>la:</filename></emphasis> |
| 1579 | Checks <filename>.la</filename> files for any <filename>TMPDIR</filename> |
| 1580 | paths. |
| 1581 | Any <filename>.la</filename> file containing these paths is incorrect since |
| 1582 | <filename>libtool</filename> adds the correct sysroot prefix when using the |
| 1583 | files automatically itself.</para></listitem> |
| 1584 | <listitem><para><emphasis><filename>ldflags:</filename></emphasis> |
| 1585 | Ensures that the binaries were linked with the |
| 1586 | <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link> |
| 1587 | options provided by the build system. |
| 1588 | If this test fails, check that the <filename>LDFLAGS</filename> variable |
| 1589 | is being passed to the linker command.</para></listitem> |
| 1590 | <listitem><para><emphasis><filename>libdir:</filename></emphasis> |
| 1591 | Checks for libraries being installed into incorrect |
| 1592 | (possibly hardcoded) installation paths. |
| 1593 | For example, this test will catch recipes that install |
| 1594 | <filename>/lib/bar.so</filename> when |
| 1595 | <filename>${base_libdir}</filename> is "lib32". |
| 1596 | Another example is when recipes install |
| 1597 | <filename>/usr/lib64/foo.so</filename> when |
| 1598 | <filename>${libdir}</filename> is "/usr/lib". |
| 1599 | </para></listitem> |
| 1600 | <listitem><para><emphasis><filename>libexec:</filename></emphasis> |
| 1601 | Checks if a package contains files in |
| 1602 | <filename>/usr/libexec</filename>. |
| 1603 | This check is not performed if the |
| 1604 | <filename>libexecdir</filename> variable has been set |
| 1605 | explicitly to <filename>/usr/libexec</filename>. |
| 1606 | </para></listitem> |
| 1607 | <listitem><para><emphasis><filename>packages-list:</filename></emphasis> |
| 1608 | Checks for the same package being listed multiple times through |
| 1609 | the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link> |
| 1610 | variable value. |
| 1611 | Installing the package in this manner can cause errors during |
| 1612 | packaging. |
| 1613 | </para></listitem> |
| 1614 | <listitem><para><emphasis><filename>perm-config:</filename></emphasis> |
| 1615 | Reports lines in <filename>fs-perms.txt</filename> that have |
| 1616 | an invalid format. |
| 1617 | </para></listitem> |
| 1618 | <listitem><para><emphasis><filename>perm-line:</filename></emphasis> |
| 1619 | Reports lines in <filename>fs-perms.txt</filename> that have |
| 1620 | an invalid format. |
| 1621 | </para></listitem> |
| 1622 | <listitem><para><emphasis><filename>perm-link:</filename></emphasis> |
| 1623 | Reports lines in <filename>fs-perms.txt</filename> that |
| 1624 | specify 'link' where the specified target already exists. |
| 1625 | </para></listitem> |
| 1626 | <listitem><para><emphasis><filename>perms:</filename></emphasis> |
| 1627 | Currently, this check is unused but reserved. |
| 1628 | </para></listitem> |
| 1629 | <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis> |
| 1630 | Checks <filename>.pc</filename> files for any |
| 1631 | <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link> |
| 1632 | paths. |
| 1633 | Any <filename>.pc</filename> file containing these paths is incorrect |
| 1634 | since <filename>pkg-config</filename> itself adds the correct sysroot prefix |
| 1635 | when the files are accessed.</para></listitem> |
| 1636 | <listitem><para><emphasis><filename>pkgname:</filename></emphasis> |
| 1637 | Checks that all packages in |
| 1638 | <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link> |
| 1639 | have names that do not contain invalid characters (i.e. |
| 1640 | characters other than 0-9, a-z, ., +, and -). |
| 1641 | </para></listitem> |
| 1642 | <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis> |
| 1643 | Checks to see if the <filename>PKGV</filename> variable |
| 1644 | is undefined during |
| 1645 | <link linkend='ref-tasks-package'><filename>do_package</filename></link>. |
| 1646 | </para></listitem> |
| 1647 | <listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis> |
| 1648 | Checks through the variables |
| 1649 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>, |
| 1650 | <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>, |
| 1651 | <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>, |
| 1652 | <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>, |
| 1653 | <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>, |
| 1654 | <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>, |
| 1655 | <link linkend='var-FILES'><filename>FILES</filename></link>, |
| 1656 | <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>, |
| 1657 | <filename>pkg_preinst</filename>, |
| 1658 | <filename>pkg_postinst</filename>, |
| 1659 | <filename>pkg_prerm</filename> |
| 1660 | and <filename>pkg_postrm</filename>, and reports if there are |
| 1661 | variable sets that are not package-specific. |
| 1662 | Using these variables without a package suffix is bad practice, |
| 1663 | and might unnecessarily complicate dependencies of other packages |
| 1664 | within the same recipe or have other unintended consequences. |
| 1665 | </para></listitem> |
| 1666 | <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis> |
| 1667 | Checks that a recipe does not have a name |
| 1668 | (<link linkend='var-PN'><filename>PN</filename></link>) value |
| 1669 | that appears in |
| 1670 | <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>. |
| 1671 | If a recipe is named such that its <filename>PN</filename> |
| 1672 | value matches something already in |
| 1673 | <filename>OVERRIDES</filename> (e.g. <filename>PN</filename> |
| 1674 | happens to be the same as |
| 1675 | <link linkend='var-MACHINE'><filename>MACHINE</filename></link> |
| 1676 | or |
| 1677 | <link linkend='var-DISTRO'><filename>DISTRO</filename></link>), |
| 1678 | it can have unexpected consequences. |
| 1679 | For example, assignments such as |
| 1680 | <filename>FILES_${PN} = "xyz"</filename> effectively turn into |
| 1681 | <filename>FILES = "xyz"</filename>. |
| 1682 | </para></listitem> |
| 1683 | <listitem><para><emphasis><filename>rpaths:</filename></emphasis> |
| 1684 | Checks for rpaths in the binaries that contain build system paths such |
| 1685 | as <filename>TMPDIR</filename>. |
| 1686 | If this test fails, bad <filename>-rpath</filename> options are being |
| 1687 | passed to the linker commands and your binaries have potential security |
| 1688 | issues.</para></listitem> |
| 1689 | <listitem><para><emphasis><filename>split-strip:</filename></emphasis> |
| 1690 | Reports that splitting or stripping debug symbols from binaries |
| 1691 | has failed. |
| 1692 | </para></listitem> |
| 1693 | <listitem><para><emphasis><filename>staticdev:</filename></emphasis> |
| 1694 | Checks for static library files (<filename>*.a</filename>) in |
| 1695 | non-<filename>staticdev</filename> packages. |
| 1696 | </para></listitem> |
| 1697 | <listitem><para><emphasis><filename>symlink-to-sysroot:</filename></emphasis> |
| 1698 | Checks for symlinks in packages that point into |
| 1699 | <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> |
| 1700 | on the host. |
| 1701 | Such symlinks will work on the host, but are clearly invalid |
| 1702 | when running on the target. |
| 1703 | </para></listitem> |
| 1704 | <listitem><para><emphasis><filename>textrel:</filename></emphasis> |
| 1705 | Checks for ELF binaries that contain relocations in their |
| 1706 | <filename>.text</filename> sections, which can result in a |
| 1707 | performance impact at runtime. |
| 1708 | See the explanation for the |
| 1709 | <link linkend='qa-issue-textrel'><filename>ELF binary</filename></link> |
| 1710 | message for more information regarding runtime performance issues. |
| 1711 | </para></listitem> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1712 | <!-- |
| 1713 | This check was removed for YP 2.3 release |
| 1714 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1715 | <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis> |
| 1716 | Reports when a binary installed in |
| 1717 | <filename>${base_libdir}</filename>, |
| 1718 | <filename>${base_bindir}</filename>, or |
| 1719 | <filename>${base_sbindir}</filename>, depends on another |
| 1720 | binary installed under <filename>${exec_prefix}</filename>. |
| 1721 | This dependency is a concern if you want the system to remain |
| 1722 | basically operable if <filename>/usr</filename> is mounted |
| 1723 | separately and is not mounted. |
| 1724 | <note> |
| 1725 | Defaults for binaries installed in |
| 1726 | <filename>${base_libdir}</filename>, |
| 1727 | <filename>${base_bindir}</filename>, and |
| 1728 | <filename>${base_sbindir}</filename> are |
| 1729 | <filename>/lib</filename>, <filename>/bin</filename>, and |
| 1730 | <filename>/sbin</filename>, respectively. |
| 1731 | The default for a binary installed |
| 1732 | under <filename>${exec_prefix}</filename> is |
| 1733 | <filename>/usr</filename>. |
| 1734 | </note> |
| 1735 | </para></listitem> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1736 | --> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1737 | <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis> |
| 1738 | Checks for dynamic library load paths (rpaths) in the binaries that |
| 1739 | by default on a standard system are searched by the linker (e.g. |
| 1740 | <filename>/lib</filename> and <filename>/usr/lib</filename>). |
| 1741 | While these paths will not cause any breakage, they do waste space and |
| 1742 | are unnecessary.</para></listitem> |
| 1743 | <listitem><para><emphasis><filename>var-undefined:</filename></emphasis> |
| 1744 | Reports when variables fundamental to packaging (i.e. |
| 1745 | <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>, |
| 1746 | <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>, |
| 1747 | <link linkend='var-D'><filename>D</filename></link>, |
| 1748 | <link linkend='var-PN'><filename>PN</filename></link>, and |
| 1749 | <link linkend='var-PKGD'><filename>PKGD</filename></link>) are |
| 1750 | undefined during |
| 1751 | <link linkend='ref-tasks-package'><filename>do_package</filename></link>. |
| 1752 | </para></listitem> |
| 1753 | <listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis> |
| 1754 | If Build History is enabled, reports when a package |
| 1755 | being written out has a lower version than the previously |
| 1756 | written package under the same name. |
| 1757 | If you are placing output packages into a feed and |
| 1758 | upgrading packages on a target system using that feed, the |
| 1759 | version of a package going backwards can result in the target |
| 1760 | system not correctly upgrading to the "new" version of the |
| 1761 | package. |
| 1762 | <note> |
| 1763 | If you are not using runtime package management on your |
| 1764 | target system, then you do not need to worry about |
| 1765 | this situation. |
| 1766 | </note> |
| 1767 | </para></listitem> |
| 1768 | <listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis> |
| 1769 | Checks that all packages containing Xorg drivers have ABI |
| 1770 | dependencies. |
| 1771 | The <filename>xserver-xorg</filename> recipe provides driver |
| 1772 | ABI names. |
| 1773 | All drivers should depend on the ABI versions that they have |
| 1774 | been built against. |
| 1775 | Driver recipes that include |
| 1776 | <filename>xorg-driver-input.inc</filename> |
| 1777 | or <filename>xorg-driver-video.inc</filename> will |
| 1778 | automatically get these versions. |
| 1779 | Consequently, you should only need to explicitly add |
| 1780 | dependencies to binary driver recipes. |
| 1781 | </para></listitem> |
| 1782 | </itemizedlist> |
| 1783 | </para> |
| 1784 | </section> |
| 1785 | |
| 1786 | <section id='ref-classes-insserv'> |
| 1787 | <title><filename>insserv.bbclass</filename></title> |
| 1788 | |
| 1789 | <para> |
| 1790 | The <filename>insserv</filename> class |
| 1791 | uses the <filename>insserv</filename> utility to update the order of |
| 1792 | symbolic links in <filename>/etc/rc?.d/</filename> within an image |
| 1793 | based on dependencies specified by LSB headers in the |
| 1794 | <filename>init.d</filename> scripts themselves. |
| 1795 | </para> |
| 1796 | </section> |
| 1797 | |
| 1798 | <section id='ref-classes-kernel'> |
| 1799 | <title><filename>kernel.bbclass</filename></title> |
| 1800 | |
| 1801 | <para> |
| 1802 | The <filename>kernel</filename> class handles building Linux kernels. |
| 1803 | The class contains code to build all kernel trees. |
| 1804 | All needed headers are staged into the |
| 1805 | <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename> |
| 1806 | directory to allow out-of-tree module builds using |
| 1807 | the |
| 1808 | <link linkend='ref-classes-module'><filename>module</filename></link> |
| 1809 | class. |
| 1810 | </para> |
| 1811 | |
| 1812 | <para> |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 1813 | This means that each built kernel module is packaged separately and |
| 1814 | inter-module dependencies are created by parsing the |
| 1815 | <filename>modinfo</filename> output. |
| 1816 | If all modules are required, then installing the |
| 1817 | <filename>kernel-modules</filename> package installs all packages with |
| 1818 | modules and various other kernel packages such as |
| 1819 | <filename>kernel-vmlinux</filename>. |
| 1820 | </para> |
| 1821 | |
| 1822 | <para> |
| 1823 | The <filename>kernel</filename> class contains logic that allows |
| 1824 | you to embed an initial RAM filesystem (initramfs) image when |
| 1825 | you build the kernel image. |
| 1826 | For information on how to build an initramfs, see the |
| 1827 | "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1828 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1829 | </para> |
| 1830 | |
| 1831 | <para> |
| 1832 | Various other classes are used by the <filename>kernel</filename> |
| 1833 | and <filename>module</filename> classes internally including the |
| 1834 | <link linkend='ref-classes-kernel-arch'><filename>kernel-arch</filename></link>, |
| 1835 | <link linkend='ref-classes-module-base'><filename>module-base</filename></link>, |
| 1836 | and |
| 1837 | <link linkend='ref-classes-linux-kernel-base'><filename>linux-kernel-base</filename></link> |
| 1838 | classes. |
| 1839 | </para> |
| 1840 | </section> |
| 1841 | |
| 1842 | <section id='ref-classes-kernel-arch'> |
| 1843 | <title><filename>kernel-arch.bbclass</filename></title> |
| 1844 | |
| 1845 | <para> |
| 1846 | The <filename>kernel-arch</filename> class |
| 1847 | sets the <filename>ARCH</filename> environment variable for Linux |
| 1848 | kernel compilation (including modules). |
| 1849 | </para> |
| 1850 | </section> |
| 1851 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1852 | <section id='ref-classes-kernel-devicetree'> |
| 1853 | <title><filename>kernel-devicetree.bbclass</filename></title> |
| 1854 | |
| 1855 | <para> |
| 1856 | The <filename>kernel-devicetree</filename> class, which is inherited by |
| 1857 | the |
| 1858 | <link linkend='ref-classes-kernel'><filename>kernel</filename></link> |
| 1859 | class, supports device tree generation. |
| 1860 | </para> |
| 1861 | </section> |
| 1862 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1863 | <section id='ref-classes-kernel-fitimage'> |
| 1864 | <title><filename>kernel-fitimage.bbclass</filename></title> |
| 1865 | |
| 1866 | <para> |
| 1867 | The <filename>kernel-fitimage</filename> class provides support to |
| 1868 | pack zImages. |
| 1869 | </para> |
| 1870 | </section> |
| 1871 | |
| 1872 | <section id='ref-classes-kernel-grub'> |
| 1873 | <title><filename>kernel-grub.bbclass</filename></title> |
| 1874 | |
| 1875 | <para> |
| 1876 | The <filename>kernel-grub</filename> class updates the boot area and |
| 1877 | the boot menu with the kernel as the priority boot mechanism while |
| 1878 | installing a RPM to update the kernel on a deployed target. |
| 1879 | </para> |
| 1880 | </section> |
| 1881 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1882 | <section id='ref-classes-kernel-module-split'> |
| 1883 | <title><filename>kernel-module-split.bbclass</filename></title> |
| 1884 | |
| 1885 | <para> |
| 1886 | The <filename>kernel-module-split</filename> class |
| 1887 | provides common functionality for splitting Linux kernel modules into |
| 1888 | separate packages. |
| 1889 | </para> |
| 1890 | </section> |
| 1891 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1892 | <section id='ref-classes-kernel-uboot'> |
| 1893 | <title><filename>kernel-uboot.bbclass</filename></title> |
| 1894 | |
| 1895 | <para> |
| 1896 | The <filename>kernel-uboot</filename> class provides support for |
| 1897 | building from vmlinux-style kernel sources. |
| 1898 | </para> |
| 1899 | </section> |
| 1900 | |
| 1901 | <section id='ref-classes-kernel-uimage'> |
| 1902 | <title><filename>kernel-uimage.bbclass</filename></title> |
| 1903 | |
| 1904 | <para> |
| 1905 | The <filename>kernel-uimage</filename> class provides support to |
| 1906 | pack uImage. |
| 1907 | </para> |
| 1908 | </section> |
| 1909 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1910 | <section id='ref-classes-kernel-yocto'> |
| 1911 | <title><filename>kernel-yocto.bbclass</filename></title> |
| 1912 | |
| 1913 | <para> |
| 1914 | The <filename>kernel-yocto</filename> class |
| 1915 | provides common functionality for building from linux-yocto style |
| 1916 | kernel source repositories. |
| 1917 | </para> |
| 1918 | </section> |
| 1919 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1920 | <section id='ref-classes-kernelsrc'> |
| 1921 | <title><filename>kernelsrc.bbclass</filename></title> |
| 1922 | |
| 1923 | <para> |
| 1924 | The <filename>kernelsrc</filename> class sets the Linux kernel |
| 1925 | source and version. |
| 1926 | </para> |
| 1927 | </section> |
| 1928 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1929 | <section id='ref-classes-lib_package'> |
| 1930 | <title><filename>lib_package.bbclass</filename></title> |
| 1931 | |
| 1932 | <para> |
| 1933 | The <filename>lib_package</filename> class |
| 1934 | supports recipes that build libraries and produce executable |
| 1935 | binaries, where those binaries should not be installed by default |
| 1936 | along with the library. |
| 1937 | Instead, the binaries are added to a separate |
| 1938 | <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-bin</filename> |
| 1939 | package to make their installation optional. |
| 1940 | </para> |
| 1941 | </section> |
| 1942 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1943 | <section id='ref-classes-libc*'> |
| 1944 | <title><filename>libc*.bbclass</filename></title> |
| 1945 | |
| 1946 | <para> |
| 1947 | The <filename>libc*</filename> classes support recipes that build |
| 1948 | packages with <filename>libc</filename>: |
| 1949 | <itemizedlist> |
| 1950 | <listitem><para>The <filename>libc-common</filename> class |
| 1951 | provides common support for building with |
| 1952 | <filename>libc</filename>. |
| 1953 | </para></listitem> |
| 1954 | <listitem><para>The <filename>libc-package</filename> class |
| 1955 | supports packaging up <filename>glibc</filename> and |
| 1956 | <filename>eglibc</filename>. |
| 1957 | </para></listitem> |
| 1958 | </itemizedlist> |
| 1959 | </para> |
| 1960 | </section> |
| 1961 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1962 | <section id='ref-classes-license'> |
| 1963 | <title><filename>license.bbclass</filename></title> |
| 1964 | |
| 1965 | <para> |
| 1966 | The <filename>license</filename> class provides license |
| 1967 | manifest creation and license exclusion. |
| 1968 | This class is enabled by default using the default value for the |
| 1969 | <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link> |
| 1970 | variable. |
| 1971 | </para> |
| 1972 | </section> |
| 1973 | |
| 1974 | <section id='ref-classes-linux-kernel-base'> |
| 1975 | <title><filename>linux-kernel-base.bbclass</filename></title> |
| 1976 | |
| 1977 | <para> |
| 1978 | The <filename>linux-kernel-base</filename> class |
| 1979 | provides common functionality for recipes that build out of the Linux |
| 1980 | kernel source tree. |
| 1981 | These builds goes beyond the kernel itself. |
| 1982 | For example, the Perf recipe also inherits this class. |
| 1983 | </para> |
| 1984 | </section> |
| 1985 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1986 | <section id='ref-classes-linuxloader'> |
| 1987 | <title><filename>linuxloader.bbclass</filename></title> |
| 1988 | |
| 1989 | <para> |
| 1990 | Provides the function <filename>linuxloader()</filename>, which gives |
| 1991 | the value of the dynamic loader/linker provided on the platform. |
| 1992 | This value is used by a number of other classes. |
| 1993 | </para> |
| 1994 | </section> |
| 1995 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1996 | <section id='ref-classes-logging'> |
| 1997 | <title><filename>logging.bbclass</filename></title> |
| 1998 | |
| 1999 | <para> |
| 2000 | The <filename>logging</filename> class provides the standard |
| 2001 | shell functions used to log messages for various BitBake severity levels |
| 2002 | (i.e. <filename>bbplain</filename>, <filename>bbnote</filename>, |
| 2003 | <filename>bbwarn</filename>, <filename>bberror</filename>, |
| 2004 | <filename>bbfatal</filename>, and <filename>bbdebug</filename>). |
| 2005 | </para> |
| 2006 | |
| 2007 | <para> |
| 2008 | This class is enabled by default since it is inherited by |
| 2009 | the <filename>base</filename> class. |
| 2010 | </para> |
| 2011 | </section> |
| 2012 | |
| 2013 | <section id='ref-classes-meta'> |
| 2014 | <title><filename>meta.bbclass</filename></title> |
| 2015 | |
| 2016 | <para> |
| 2017 | The <filename>meta</filename> class is inherited by recipes |
| 2018 | that do not build any output packages themselves, but act as a "meta" |
| 2019 | target for building other recipes. |
| 2020 | </para> |
| 2021 | </section> |
| 2022 | |
| 2023 | <section id='ref-classes-metadata_scm'> |
| 2024 | <title><filename>metadata_scm.bbclass</filename></title> |
| 2025 | |
| 2026 | <para> |
| 2027 | The <filename>metadata_scm</filename> class provides functionality for |
| 2028 | querying the branch and revision of a Source Code Manager (SCM) |
| 2029 | repository. |
| 2030 | </para> |
| 2031 | |
| 2032 | <para> |
| 2033 | The <link linkend='ref-classes-base'><filename>base</filename></link> |
| 2034 | class uses this class to print the revisions of each layer before |
| 2035 | starting every build. |
| 2036 | The <filename>metadata_scm</filename> class is enabled by default |
| 2037 | because it is inherited by the <filename>base</filename> class. |
| 2038 | </para> |
| 2039 | </section> |
| 2040 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 2041 | <section id='ref-classes-migrate_localcount'> |
| 2042 | <title><filename>migrate_localcount.bbclass</filename></title> |
| 2043 | |
| 2044 | <para> |
| 2045 | The <filename>migrate_localcount</filename> class verifies a recipe's |
| 2046 | localcount data and increments it appropriately. |
| 2047 | </para> |
| 2048 | </section> |
| 2049 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2050 | <section id='ref-classes-mime'> |
| 2051 | <title><filename>mime.bbclass</filename></title> |
| 2052 | |
| 2053 | <para> |
| 2054 | The <filename>mime</filename> class generates the proper |
| 2055 | post-install and post-remove (postinst/postrm) scriptlets for packages |
| 2056 | that install MIME type files. |
| 2057 | These scriptlets call <filename>update-mime-database</filename> to add |
| 2058 | the MIME types to the shared database. |
| 2059 | </para> |
| 2060 | </section> |
| 2061 | |
| 2062 | <section id='ref-classes-mirrors'> |
| 2063 | <title><filename>mirrors.bbclass</filename></title> |
| 2064 | |
| 2065 | <para> |
| 2066 | The <filename>mirrors</filename> class sets up some standard |
| 2067 | <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link> entries |
| 2068 | for source code mirrors. |
| 2069 | These mirrors provide a fall-back path in case the upstream source |
| 2070 | specified in |
| 2071 | <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> |
| 2072 | within recipes is unavailable. |
| 2073 | </para> |
| 2074 | |
| 2075 | <para> |
| 2076 | This class is enabled by default since it is inherited by the |
| 2077 | <link linkend='ref-classes-base'><filename>base</filename></link> class. |
| 2078 | </para> |
| 2079 | </section> |
| 2080 | |
| 2081 | <section id='ref-classes-module'> |
| 2082 | <title><filename>module.bbclass</filename></title> |
| 2083 | |
| 2084 | <para> |
| 2085 | The <filename>module</filename> class provides support for building |
| 2086 | out-of-tree Linux kernel modules. |
| 2087 | The class inherits the |
| 2088 | <link linkend='ref-classes-module-base'><filename>module-base</filename></link> |
| 2089 | and |
| 2090 | <link linkend='ref-classes-kernel-module-split'><filename>kernel-module-split</filename></link> |
| 2091 | classes, and implements the |
| 2092 | <link linkend='ref-tasks-compile'><filename>do_compile</filename></link> |
| 2093 | and |
| 2094 | <link linkend='ref-tasks-install'><filename>do_install</filename></link> |
| 2095 | tasks. |
| 2096 | The class provides everything needed to build and package a kernel |
| 2097 | module. |
| 2098 | </para> |
| 2099 | |
| 2100 | <para> |
| 2101 | For general information on out-of-tree Linux kernel modules, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 2102 | "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2103 | section in the Yocto Project Linux Kernel Development Manual. |
| 2104 | </para> |
| 2105 | </section> |
| 2106 | |
| 2107 | <section id='ref-classes-module-base'> |
| 2108 | <title><filename>module-base.bbclass</filename></title> |
| 2109 | |
| 2110 | <para> |
| 2111 | The <filename>module-base</filename> class provides the base |
| 2112 | functionality for building Linux kernel modules. |
| 2113 | Typically, a recipe that builds software that includes one or |
| 2114 | more kernel modules and has its own means of building |
| 2115 | the module inherits this class as opposed to inheriting the |
| 2116 | <link linkend='ref-classes-module'><filename>module</filename></link> |
| 2117 | class. |
| 2118 | </para> |
| 2119 | </section> |
| 2120 | |
| 2121 | <section id='ref-classes-multilib*'> |
| 2122 | <title><filename>multilib*.bbclass</filename></title> |
| 2123 | |
| 2124 | <para> |
| 2125 | The <filename>multilib*</filename> classes provide support |
| 2126 | for building libraries with different target optimizations or target |
| 2127 | architectures and installing them side-by-side in the same image. |
| 2128 | </para> |
| 2129 | |
| 2130 | <para> |
| 2131 | For more information on using the Multilib feature, see the |
| 2132 | "<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2133 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2134 | </para> |
| 2135 | </section> |
| 2136 | |
| 2137 | <section id='ref-classes-native'> |
| 2138 | <title><filename>native.bbclass</filename></title> |
| 2139 | |
| 2140 | <para> |
| 2141 | The <filename>native</filename> class provides common |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2142 | functionality for recipes that build tools to run on the |
| 2143 | <link linkend='hardware-build-system-term'>build host</link> |
| 2144 | (i.e. tools that use the compiler or other tools from the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2145 | build host). |
| 2146 | </para> |
| 2147 | |
| 2148 | <para> |
| 2149 | You can create a recipe that builds tools that run natively on the |
| 2150 | host a couple different ways: |
| 2151 | <itemizedlist> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2152 | <listitem><para> |
| 2153 | Create a |
| 2154 | <replaceable>myrecipe</replaceable><filename>-native.bb</filename> |
| 2155 | recipe that inherits the <filename>native</filename> class. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2156 | If you use this method, you must order the inherit statement |
| 2157 | in the recipe after all other inherit statements so that the |
| 2158 | <filename>native</filename> class is inherited last. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2159 | <note><title>Warning</title> |
| 2160 | When creating a recipe this way, the recipe name must |
| 2161 | follow this naming convention: |
| 2162 | <literallayout class='monospaced'> |
| 2163 | <replaceable>myrecipe</replaceable>-native.bb |
| 2164 | </literallayout> |
| 2165 | Not using this naming convention can lead to subtle |
| 2166 | problems caused by existing code that depends on that |
| 2167 | naming convention. |
| 2168 | </note> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2169 | </para></listitem> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2170 | <listitem><para> |
| 2171 | Create or modify a target recipe that contains the following: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2172 | <literallayout class='monospaced'> |
| 2173 | <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "native" |
| 2174 | </literallayout> |
| 2175 | Inside the recipe, use <filename>_class-native</filename> and |
| 2176 | <filename>_class-target</filename> overrides to specify any |
| 2177 | functionality specific to the respective native or target |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2178 | case. |
| 2179 | </para></listitem> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2180 | </itemizedlist> |
| 2181 | </para> |
| 2182 | |
| 2183 | <para> |
| 2184 | Although applied differently, the <filename>native</filename> class is |
| 2185 | used with both methods. |
| 2186 | The advantage of the second method is that you do not need to have two |
| 2187 | separate recipes (assuming you need both) for native and target. |
| 2188 | All common parts of the recipe are automatically shared. |
| 2189 | </para> |
| 2190 | </section> |
| 2191 | |
| 2192 | <section id='ref-classes-nativesdk'> |
| 2193 | <title><filename>nativesdk.bbclass</filename></title> |
| 2194 | |
| 2195 | <para> |
| 2196 | The <filename>nativesdk</filename> class provides common |
| 2197 | functionality for recipes that wish to build tools to run as part of |
| 2198 | an SDK (i.e. tools that run on |
| 2199 | <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>). |
| 2200 | </para> |
| 2201 | |
| 2202 | <para> |
| 2203 | You can create a recipe that builds tools that run on the SDK machine |
| 2204 | a couple different ways: |
| 2205 | <itemizedlist> |
| 2206 | <listitem><para>Create a |
| 2207 | <filename>nativesdk-</filename><replaceable>myrecipe</replaceable><filename>.bb</filename> |
| 2208 | recipe that inherits the <filename>nativesdk</filename> class. |
| 2209 | If you use this method, you must order the inherit statement |
| 2210 | in the recipe after all other inherit statements so that the |
| 2211 | <filename>nativesdk</filename> class is inherited last. |
| 2212 | </para></listitem> |
| 2213 | <listitem><para>Create a <filename>nativesdk</filename> variant |
| 2214 | of any recipe by adding the following: |
| 2215 | <literallayout class='monospaced'> |
| 2216 | <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "nativesdk" |
| 2217 | </literallayout> |
| 2218 | Inside the recipe, use <filename>_class-nativesdk</filename> and |
| 2219 | <filename>_class-target</filename> overrides to specify any |
| 2220 | functionality specific to the respective SDK machine or target |
| 2221 | case.</para></listitem> |
| 2222 | </itemizedlist> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2223 | <note><title>Warning</title> |
| 2224 | When creating a recipe, you must follow this naming convention: |
| 2225 | <literallayout class='monospaced'> |
| 2226 | nativesdk-<replaceable>myrecipe</replaceable>.bb |
| 2227 | </literallayout> |
| 2228 | Not doing so can lead to subtle problems because code exists |
| 2229 | that depends on the naming convention. |
| 2230 | </note> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2231 | </para> |
| 2232 | |
| 2233 | <para> |
| 2234 | Although applied differently, the <filename>nativesdk</filename> class |
| 2235 | is used with both methods. |
| 2236 | The advantage of the second method is that you do not need to have two |
| 2237 | separate recipes (assuming you need both) for the SDK machine and the |
| 2238 | target. |
| 2239 | All common parts of the recipe are automatically shared. |
| 2240 | </para> |
| 2241 | </section> |
| 2242 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2243 | <section id='ref-classes-nopackages'> |
| 2244 | <title><filename>nopackages.bbclass</filename></title> |
| 2245 | |
| 2246 | <para> |
| 2247 | Disables packaging tasks for those recipes and classes where |
| 2248 | packaging is not needed. |
| 2249 | </para> |
| 2250 | </section> |
| 2251 | |
| 2252 | <section id='ref-classes-npm'> |
| 2253 | <title><filename>npm.bbclass</filename></title> |
| 2254 | |
| 2255 | <para> |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 2256 | Provides support for building Node.js software fetched using the |
| 2257 | <ulink url='https://en.wikipedia.org/wiki/Npm_(software)'>node package manager (NPM)</ulink>. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2258 | <note> |
| 2259 | Currently, recipes inheriting this class must use the |
| 2260 | <filename>npm://</filename> fetcher to have dependencies fetched |
| 2261 | and packaged automatically. |
| 2262 | </note> |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 2263 | For information on how to create NPM packages, see the |
| 2264 | "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-node-package-manager-npm-packages'>Creating Node Package Manager (NPM) Packages</ulink>" |
| 2265 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2266 | </para> |
| 2267 | </section> |
| 2268 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2269 | <section id='ref-classes-oelint'> |
| 2270 | <title><filename>oelint.bbclass</filename></title> |
| 2271 | |
| 2272 | <para> |
| 2273 | The <filename>oelint</filename> class is an |
| 2274 | obsolete lint checking tool that exists in |
| 2275 | <filename>meta/classes</filename> in the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2276 | <link linkend='source-directory'>Source Directory</link>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2277 | </para> |
| 2278 | |
| 2279 | <para> |
| 2280 | A number of classes exist that could be generally useful in |
| 2281 | OE-Core but are never actually used within OE-Core itself. |
| 2282 | The <filename>oelint</filename> class is one such example. |
| 2283 | However, being aware of this class can reduce the proliferation of |
| 2284 | different versions of similar classes across multiple layers. |
| 2285 | </para> |
| 2286 | </section> |
| 2287 | |
| 2288 | <section id='ref-classes-own-mirrors'> |
| 2289 | <title><filename>own-mirrors.bbclass</filename></title> |
| 2290 | |
| 2291 | <para> |
| 2292 | The <filename>own-mirrors</filename> class makes it |
| 2293 | easier to set up your own |
| 2294 | <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link> |
| 2295 | from which to first fetch source before attempting to fetch it from the |
| 2296 | upstream specified in |
| 2297 | <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> |
| 2298 | within each recipe. |
| 2299 | </para> |
| 2300 | |
| 2301 | <para> |
| 2302 | To use this class, inherit it globally and specify |
| 2303 | <link linkend='var-SOURCE_MIRROR_URL'><filename>SOURCE_MIRROR_URL</filename></link>. |
| 2304 | Here is an example: |
| 2305 | <literallayout class='monospaced'> |
| 2306 | INHERIT += "own-mirrors" |
| 2307 | SOURCE_MIRROR_URL = "http://example.com/my-source-mirror" |
| 2308 | </literallayout> |
| 2309 | You can specify only a single URL in |
| 2310 | <filename>SOURCE_MIRROR_URL</filename>. |
| 2311 | </para> |
| 2312 | </section> |
| 2313 | |
| 2314 | <section id='ref-classes-package'> |
| 2315 | <title><filename>package.bbclass</filename></title> |
| 2316 | |
| 2317 | <para> |
| 2318 | The <filename>package</filename> class supports generating |
| 2319 | packages from a build's output. |
| 2320 | The core generic functionality is in |
| 2321 | <filename>package.bbclass</filename>. |
| 2322 | The code specific to particular package types resides in these |
| 2323 | package-specific classes: |
| 2324 | <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>, |
| 2325 | <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>, |
| 2326 | <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>, |
| 2327 | and |
| 2328 | <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>. |
| 2329 | <note><title>Warning</title> |
| 2330 | The <filename>package_tar</filename> class is broken and not |
| 2331 | supported. |
| 2332 | It is recommended that you do not use this class. |
| 2333 | </note> |
| 2334 | </para> |
| 2335 | |
| 2336 | <para> |
| 2337 | You can control the list of resulting package formats by using the |
| 2338 | <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename> |
| 2339 | variable defined in your <filename>conf/local.conf</filename> |
| 2340 | configuration file, which is located in the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2341 | <link linkend='build-directory'>Build Directory</link>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2342 | When defining the variable, you can specify one or more package types. |
| 2343 | Since images are generated from packages, a packaging class is |
| 2344 | needed to enable image generation. |
| 2345 | The first class listed in this variable is used for image generation. |
| 2346 | </para> |
| 2347 | |
| 2348 | <para> |
| 2349 | If you take the optional step to set up a repository (package feed) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2350 | on the development host that can be used by DNF, you can |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2351 | install packages from the feed while you are running the image |
| 2352 | on the target (i.e. runtime installation of packages). |
| 2353 | For more information, see the |
| 2354 | "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2355 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2356 | </para> |
| 2357 | |
| 2358 | <para> |
| 2359 | The package-specific class you choose can affect build-time performance |
| 2360 | and has space ramifications. |
| 2361 | In general, building a package with IPK takes about thirty percent less |
| 2362 | time as compared to using RPM to build the same or similar package. |
| 2363 | This comparison takes into account a complete build of the package with |
| 2364 | all dependencies previously built. |
| 2365 | The reason for this discrepancy is because the RPM package manager |
| 2366 | creates and processes more |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2367 | <link linkend='metadata'>Metadata</link> than the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2368 | IPK package manager. |
| 2369 | Consequently, you might consider setting |
| 2370 | <filename>PACKAGE_CLASSES</filename> to "package_ipk" if you are |
| 2371 | building smaller systems. |
| 2372 | </para> |
| 2373 | |
| 2374 | <para> |
| 2375 | Before making your package manager decision, however, you should |
| 2376 | consider some further things about using RPM: |
| 2377 | <itemizedlist> |
| 2378 | <listitem><para> |
| 2379 | RPM starts to provide more abilities than IPK due to |
| 2380 | the fact that it processes more Metadata. |
| 2381 | For example, this information includes individual file types, |
| 2382 | file checksum generation and evaluation on install, sparse file |
| 2383 | support, conflict detection and resolution for Multilib systems, |
| 2384 | ACID style upgrade, and repackaging abilities for rollbacks. |
| 2385 | </para></listitem> |
| 2386 | <listitem><para> |
| 2387 | For smaller systems, the extra space used for the Berkeley |
| 2388 | Database and the amount of metadata when using RPM can affect |
| 2389 | your ability to perform on-device upgrades. |
| 2390 | </para></listitem> |
| 2391 | </itemizedlist> |
| 2392 | </para> |
| 2393 | |
| 2394 | <para> |
| 2395 | You can find additional information on the effects of the package |
| 2396 | class at these two Yocto Project mailing list links: |
| 2397 | <itemizedlist> |
| 2398 | <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'> |
| 2399 | https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem> |
| 2400 | <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'> |
| 2401 | https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem> |
| 2402 | </itemizedlist> |
| 2403 | </para> |
| 2404 | </section> |
| 2405 | |
| 2406 | <section id='ref-classes-package_deb'> |
| 2407 | <title><filename>package_deb.bbclass</filename></title> |
| 2408 | |
| 2409 | <para> |
| 2410 | The <filename>package_deb</filename> class |
| 2411 | provides support for creating packages that use the Debian |
| 2412 | (i.e. <filename>.deb</filename>) file format. |
| 2413 | The class ensures the packages are written out in a |
| 2414 | <filename>.deb</filename> file format to the |
| 2415 | <filename>${</filename><link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link><filename>}</filename> |
| 2416 | directory. |
| 2417 | </para> |
| 2418 | |
| 2419 | <para> |
| 2420 | This class inherits the |
| 2421 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 2422 | class and is enabled through the |
| 2423 | <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link> |
| 2424 | variable in the <filename>local.conf</filename> file. |
| 2425 | </para> |
| 2426 | </section> |
| 2427 | |
| 2428 | <section id='ref-classes-package_ipk'> |
| 2429 | <title><filename>package_ipk.bbclass</filename></title> |
| 2430 | |
| 2431 | <para> |
| 2432 | The <filename>package_ipk</filename> class |
| 2433 | provides support for creating packages that use the IPK |
| 2434 | (i.e. <filename>.ipk</filename>) file format. |
| 2435 | The class ensures the packages are written out in a |
| 2436 | <filename>.ipk</filename> file format to the |
| 2437 | <filename>${</filename><link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link><filename>}</filename> |
| 2438 | directory. |
| 2439 | </para> |
| 2440 | |
| 2441 | <para> |
| 2442 | This class inherits the |
| 2443 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 2444 | class and is enabled through the |
| 2445 | <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link> |
| 2446 | variable in the <filename>local.conf</filename> file. |
| 2447 | </para> |
| 2448 | </section> |
| 2449 | |
| 2450 | <section id='ref-classes-package_rpm'> |
| 2451 | <title><filename>package_rpm.bbclass</filename></title> |
| 2452 | |
| 2453 | <para> |
| 2454 | The <filename>package_rpm</filename> class |
| 2455 | provides support for creating packages that use the RPM |
| 2456 | (i.e. <filename>.rpm</filename>) file format. |
| 2457 | The class ensures the packages are written out in a |
| 2458 | <filename>.rpm</filename> file format to the |
| 2459 | <filename>${</filename><link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link><filename>}</filename> |
| 2460 | directory. |
| 2461 | </para> |
| 2462 | |
| 2463 | <para> |
| 2464 | This class inherits the |
| 2465 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 2466 | class and is enabled through the |
| 2467 | <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link> |
| 2468 | variable in the <filename>local.conf</filename> file. |
| 2469 | </para> |
| 2470 | </section> |
| 2471 | |
| 2472 | <section id='ref-classes-package_tar'> |
| 2473 | <title><filename>package_tar.bbclass</filename></title> |
| 2474 | |
| 2475 | <para> |
| 2476 | The <filename>package_tar</filename> class |
| 2477 | provides support for creating tarballs. |
| 2478 | The class ensures the packages are written out in a |
| 2479 | tarball format to the |
| 2480 | <filename>${</filename><link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link><filename>}</filename> |
| 2481 | directory. |
| 2482 | </para> |
| 2483 | |
| 2484 | <para> |
| 2485 | This class inherits the |
| 2486 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 2487 | class and is enabled through the |
| 2488 | <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link> |
| 2489 | variable in the <filename>local.conf</filename> file. |
| 2490 | <note> |
| 2491 | You cannot specify the <filename>package_tar</filename> class |
| 2492 | first using the <filename>PACKAGE_CLASSES</filename> variable. |
| 2493 | You must use <filename>.deb</filename>, |
| 2494 | <filename>.ipk</filename>, or <filename>.rpm</filename> file |
| 2495 | formats for your image or SDK. |
| 2496 | </note> |
| 2497 | </para> |
| 2498 | </section> |
| 2499 | |
| 2500 | <section id='ref-classes-packagedata'> |
| 2501 | <title><filename>packagedata.bbclass</filename></title> |
| 2502 | |
| 2503 | <para> |
| 2504 | The <filename>packagedata</filename> class provides |
| 2505 | common functionality for reading <filename>pkgdata</filename> files |
| 2506 | found in |
| 2507 | <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>. |
| 2508 | These files contain information about each output package produced by |
| 2509 | the OpenEmbedded build system. |
| 2510 | </para> |
| 2511 | |
| 2512 | <para> |
| 2513 | This class is enabled by default because it is inherited by the |
| 2514 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 2515 | class. |
| 2516 | </para> |
| 2517 | </section> |
| 2518 | |
| 2519 | <section id='ref-classes-packagegroup'> |
| 2520 | <title><filename>packagegroup.bbclass</filename></title> |
| 2521 | |
| 2522 | <para> |
| 2523 | The <filename>packagegroup</filename> class sets default values |
| 2524 | appropriate for package group recipes (e.g. |
| 2525 | <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>, |
| 2526 | <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>, |
| 2527 | <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>, |
| 2528 | and so forth). |
| 2529 | It is highly recommended that all package group recipes inherit this class. |
| 2530 | </para> |
| 2531 | |
| 2532 | <para> |
| 2533 | For information on how to use this class, see the |
| 2534 | "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2535 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2536 | </para> |
| 2537 | |
| 2538 | <para> |
| 2539 | Previously, this class was called the <filename>task</filename> class. |
| 2540 | </para> |
| 2541 | </section> |
| 2542 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2543 | <section id='ref-classes-patch'> |
| 2544 | <title><filename>patch.bbclass</filename></title> |
| 2545 | |
| 2546 | <para> |
| 2547 | The <filename>patch</filename> class provides all functionality for |
| 2548 | applying patches during the |
| 2549 | <link linkend='ref-tasks-patch'><filename>do_patch</filename></link> |
| 2550 | task. |
| 2551 | </para> |
| 2552 | |
| 2553 | <para> |
| 2554 | This class is enabled by default because it is inherited by the |
| 2555 | <link linkend='ref-classes-base'><filename>base</filename></link> |
| 2556 | class. |
| 2557 | </para> |
| 2558 | </section> |
| 2559 | |
| 2560 | <section id='ref-classes-perlnative'> |
| 2561 | <title><filename>perlnative.bbclass</filename></title> |
| 2562 | |
| 2563 | <para> |
| 2564 | When inherited by a recipe, the <filename>perlnative</filename> class |
| 2565 | supports using the native version of Perl built by the build system |
| 2566 | rather than using the version provided by the build host. |
| 2567 | </para> |
| 2568 | </section> |
| 2569 | |
| 2570 | <section id='ref-classes-pixbufcache'> |
| 2571 | <title><filename>pixbufcache.bbclass</filename></title> |
| 2572 | |
| 2573 | <para> |
| 2574 | The <filename>pixbufcache</filename> class generates the proper |
| 2575 | post-install and post-remove (postinst/postrm) scriptlets for packages |
| 2576 | that install pixbuf loaders, which are used with |
| 2577 | <filename>gdk-pixbuf</filename>. |
| 2578 | These scriptlets call <filename>update_pixbuf_cache</filename> |
| 2579 | to add the pixbuf loaders to the cache. |
| 2580 | Since the cache files are architecture-specific, |
| 2581 | <filename>update_pixbuf_cache</filename> is run using QEMU if the |
| 2582 | postinst scriptlets need to be run on the build host during image |
| 2583 | creation. |
| 2584 | </para> |
| 2585 | |
| 2586 | <para> |
| 2587 | If the pixbuf loaders being installed are in packages other |
| 2588 | than the recipe's main package, set |
| 2589 | <link linkend='var-PIXBUF_PACKAGES'><filename>PIXBUF_PACKAGES</filename></link> |
| 2590 | to specify the packages containing the loaders. |
| 2591 | </para> |
| 2592 | </section> |
| 2593 | |
| 2594 | <section id='ref-classes-pkgconfig'> |
| 2595 | <title><filename>pkgconfig.bbclass</filename></title> |
| 2596 | |
| 2597 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 2598 | The <filename>pkgconfig</filename> class provides a standard way to get |
| 2599 | header and library information by using <filename>pkg-config</filename>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2600 | This class aims to smooth integration of |
| 2601 | <filename>pkg-config</filename> into libraries that use it. |
| 2602 | </para> |
| 2603 | |
| 2604 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 2605 | During staging, BitBake installs <filename>pkg-config</filename> |
| 2606 | data into the <filename>sysroots/</filename> directory. |
| 2607 | By making use of sysroot functionality within |
| 2608 | <filename>pkg-config</filename>, the <filename>pkgconfig</filename> |
| 2609 | class no longer has to manipulate the files. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2610 | </para> |
| 2611 | </section> |
| 2612 | |
| 2613 | <section id='ref-classes-populate-sdk'> |
| 2614 | <title><filename>populate_sdk.bbclass</filename></title> |
| 2615 | |
| 2616 | <para> |
| 2617 | The <filename>populate_sdk</filename> class provides support for |
| 2618 | SDK-only recipes. |
| 2619 | For information on advantages gained when building a cross-development |
| 2620 | toolchain using the |
| 2621 | <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link> |
| 2622 | task, see the |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2623 | "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2624 | section in the Yocto Project Application Development and the |
| 2625 | Extensible Software Development Kit (eSDK) manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2626 | </para> |
| 2627 | </section> |
| 2628 | |
| 2629 | <section id='ref-classes-populate-sdk-*'> |
| 2630 | <title><filename>populate_sdk_*.bbclass</filename></title> |
| 2631 | |
| 2632 | <para> |
| 2633 | The <filename>populate_sdk_*</filename> classes support SDK creation |
| 2634 | and consist of the following classes: |
| 2635 | <itemizedlist> |
| 2636 | <listitem><para><emphasis><filename>populate_sdk_base</filename>:</emphasis> |
| 2637 | The base class supporting SDK creation under all package |
| 2638 | managers (i.e. DEB, RPM, and opkg).</para></listitem> |
| 2639 | <listitem><para><emphasis><filename>populate_sdk_deb</filename>:</emphasis> |
| 2640 | Supports creation of the SDK given the Debian package manager. |
| 2641 | </para></listitem> |
| 2642 | <listitem><para><emphasis><filename>populate_sdk_rpm</filename>:</emphasis> |
| 2643 | Supports creation of the SDK given the RPM package manager. |
| 2644 | </para></listitem> |
| 2645 | <listitem><para><emphasis><filename>populate_sdk_ipk</filename>:</emphasis> |
| 2646 | Supports creation of the SDK given the opkg (IPK format) |
| 2647 | package manager. |
| 2648 | </para></listitem> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 2649 | <listitem><para><emphasis><filename>populate_sdk_ext</filename>:</emphasis> |
| 2650 | Supports extensible SDK creation under all package managers. |
| 2651 | </para></listitem> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2652 | </itemizedlist> |
| 2653 | </para> |
| 2654 | |
| 2655 | <para> |
| 2656 | The <filename>populate_sdk_base</filename> class inherits the |
| 2657 | appropriate <filename>populate_sdk_*</filename> (i.e. |
| 2658 | <filename>deb</filename>, <filename>rpm</filename>, and |
| 2659 | <filename>ipk</filename>) based on |
| 2660 | <link linkend='var-IMAGE_PKGTYPE'><filename>IMAGE_PKGTYPE</filename></link>. |
| 2661 | </para> |
| 2662 | |
| 2663 | <para> |
| 2664 | The base class ensures all source and destination directories are |
| 2665 | established and then populates the SDK. |
| 2666 | After populating the SDK, the <filename>populate_sdk_base</filename> |
| 2667 | class constructs two sysroots: |
| 2668 | <filename>${</filename><link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>}-nativesdk</filename>, |
| 2669 | which contains the cross-compiler and associated tooling, and the |
| 2670 | target, which contains a target root filesystem that is configured for |
| 2671 | the SDK usage. |
| 2672 | These two images reside in |
| 2673 | <link linkend='var-SDK_OUTPUT'><filename>SDK_OUTPUT</filename></link>, |
| 2674 | which consists of the following: |
| 2675 | <literallayout class='monospaced'> |
| 2676 | ${SDK_OUTPUT}/${SDK_ARCH}<replaceable>-nativesdk-pkgs</replaceable> |
| 2677 | ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/<replaceable>target-pkgs</replaceable> |
| 2678 | </literallayout> |
| 2679 | </para> |
| 2680 | |
| 2681 | <para> |
| 2682 | Finally, the base populate SDK class creates the toolchain |
| 2683 | environment setup script, the tarball of the SDK, and the installer. |
| 2684 | </para> |
| 2685 | |
| 2686 | <para> |
| 2687 | The respective <filename>populate_sdk_deb</filename>, |
| 2688 | <filename>populate_sdk_rpm</filename>, and |
| 2689 | <filename>populate_sdk_ipk</filename> classes each support the |
| 2690 | specific type of SDK. |
| 2691 | These classes are inherited by and used with the |
| 2692 | <filename>populate_sdk_base</filename> class. |
| 2693 | </para> |
| 2694 | |
| 2695 | <para> |
| 2696 | For more information on the cross-development toolchain |
| 2697 | generation, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 2698 | "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>" |
| 2699 | section in the Yocto Project Overview and Concepts Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2700 | For information on advantages gained when building a |
| 2701 | cross-development toolchain using the |
| 2702 | <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link> |
| 2703 | task, see the |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2704 | "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2705 | section in the Yocto Project Application Development and the |
| 2706 | Extensible Software Development Kit (eSDK) manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2707 | </para> |
| 2708 | </section> |
| 2709 | |
| 2710 | <section id='ref-classes-prexport'> |
| 2711 | <title><filename>prexport.bbclass</filename></title> |
| 2712 | |
| 2713 | <para> |
| 2714 | The <filename>prexport</filename> class provides functionality for |
| 2715 | exporting |
| 2716 | <link linkend='var-PR'><filename>PR</filename></link> values. |
| 2717 | <note> |
| 2718 | This class is not intended to be used directly. |
| 2719 | Rather, it is enabled when using |
| 2720 | "<filename>bitbake-prserv-tool export</filename>". |
| 2721 | </note> |
| 2722 | </para> |
| 2723 | </section> |
| 2724 | |
| 2725 | <section id='ref-classes-primport'> |
| 2726 | <title><filename>primport.bbclass</filename></title> |
| 2727 | |
| 2728 | <para> |
| 2729 | The <filename>primport</filename> class provides functionality for |
| 2730 | importing |
| 2731 | <link linkend='var-PR'><filename>PR</filename></link> values. |
| 2732 | <note> |
| 2733 | This class is not intended to be used directly. |
| 2734 | Rather, it is enabled when using |
| 2735 | "<filename>bitbake-prserv-tool import</filename>". |
| 2736 | </note> |
| 2737 | </para> |
| 2738 | </section> |
| 2739 | |
| 2740 | <section id='ref-classes-prserv'> |
| 2741 | <title><filename>prserv.bbclass</filename></title> |
| 2742 | |
| 2743 | <para> |
| 2744 | The <filename>prserv</filename> class provides functionality for |
| 2745 | using a |
| 2746 | <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink> |
| 2747 | in order to automatically manage the incrementing of the |
| 2748 | <link linkend='var-PR'><filename>PR</filename></link> variable for |
| 2749 | each recipe. |
| 2750 | </para> |
| 2751 | |
| 2752 | <para> |
| 2753 | This class is enabled by default because it is inherited by the |
| 2754 | <link linkend='ref-classes-package'><filename>package</filename></link> |
| 2755 | class. |
| 2756 | However, the OpenEmbedded build system will not enable the |
| 2757 | functionality of this class unless |
| 2758 | <link linkend='var-PRSERV_HOST'><filename>PRSERV_HOST</filename></link> |
| 2759 | has been set. |
| 2760 | </para> |
| 2761 | </section> |
| 2762 | |
| 2763 | <section id='ref-classes-ptest'> |
| 2764 | <title><filename>ptest.bbclass</filename></title> |
| 2765 | |
| 2766 | <para> |
| 2767 | The <filename>ptest</filename> class provides functionality for |
| 2768 | packaging and installing runtime tests for recipes that build software |
| 2769 | that provides these tests. |
| 2770 | </para> |
| 2771 | |
| 2772 | <para> |
| 2773 | This class is intended to be inherited by individual recipes. |
| 2774 | However, the class' functionality is largely disabled unless "ptest" |
| 2775 | appears in |
| 2776 | <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>. |
| 2777 | See the |
| 2778 | "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2779 | section in the Yocto Project Development Tasks Manual for more |
| 2780 | information on ptest. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2781 | </para> |
| 2782 | </section> |
| 2783 | |
| 2784 | <section id='ref-classes-ptest-gnome'> |
| 2785 | <title><filename>ptest-gnome.bbclass</filename></title> |
| 2786 | |
| 2787 | <para> |
| 2788 | Enables package tests (ptests) specifically for GNOME packages, |
| 2789 | which have tests intended to be executed with |
| 2790 | <filename>gnome-desktop-testing</filename>. |
| 2791 | </para> |
| 2792 | |
| 2793 | <para> |
| 2794 | For information on setting up and running ptests, see the |
| 2795 | "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2796 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2797 | </para> |
| 2798 | </section> |
| 2799 | |
| 2800 | <section id='ref-classes-python-dir'> |
| 2801 | <title><filename>python-dir.bbclass</filename></title> |
| 2802 | |
| 2803 | <para> |
| 2804 | The <filename>python-dir</filename> class provides the base version, |
| 2805 | location, and site package location for Python. |
| 2806 | </para> |
| 2807 | </section> |
| 2808 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 2809 | <section id='ref-classes-python3native'> |
| 2810 | <title><filename>python3native.bbclass</filename></title> |
| 2811 | |
| 2812 | <para> |
| 2813 | The <filename>python3native</filename> class supports using the |
| 2814 | native version of Python 3 built by the build system rather than |
| 2815 | support of the version provided by the build host. |
| 2816 | </para> |
| 2817 | </section> |
| 2818 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2819 | <section id='ref-classes-pythonnative'> |
| 2820 | <title><filename>pythonnative.bbclass</filename></title> |
| 2821 | |
| 2822 | <para> |
| 2823 | When inherited by a recipe, the <filename>pythonnative</filename> class |
| 2824 | supports using the native version of Python built by the build system |
| 2825 | rather than using the version provided by the build host. |
| 2826 | </para> |
| 2827 | </section> |
| 2828 | |
| 2829 | <section id='ref-classes-qemu'> |
| 2830 | <title><filename>qemu.bbclass</filename></title> |
| 2831 | |
| 2832 | <para> |
| 2833 | The <filename>qemu</filename> class provides functionality for recipes |
| 2834 | that either need QEMU or test for the existence of QEMU. |
| 2835 | Typically, this class is used to run programs for a target system on |
| 2836 | the build host using QEMU's application emulation mode. |
| 2837 | </para> |
| 2838 | </section> |
| 2839 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 2840 | <section id='ref-classes-recipe_sanity'> |
| 2841 | <title><filename>recipe_sanity.bbclass</filename></title> |
| 2842 | |
| 2843 | <para> |
| 2844 | The <filename>recipe_sanity</filename> class checks for the presence |
| 2845 | of any host system recipe prerequisites that might affect the |
| 2846 | build (e.g. variables that are set or software that is present). |
| 2847 | </para> |
| 2848 | </section> |
| 2849 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2850 | <section id='ref-classes-relocatable'> |
| 2851 | <title><filename>relocatable.bbclass</filename></title> |
| 2852 | |
| 2853 | <para> |
| 2854 | The <filename>relocatable</filename> class enables relocation of |
| 2855 | binaries when they are installed into the sysroot. |
| 2856 | </para> |
| 2857 | |
| 2858 | <para> |
| 2859 | This class makes use of the |
| 2860 | <link linkend='ref-classes-chrpath'><filename>chrpath</filename></link> |
| 2861 | class and is used by both the |
| 2862 | <link linkend='ref-classes-cross'><filename>cross</filename></link> |
| 2863 | and |
| 2864 | <link linkend='ref-classes-native'><filename>native</filename></link> |
| 2865 | classes. |
| 2866 | </para> |
| 2867 | </section> |
| 2868 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2869 | <section id='ref-classes-remove-libtool'> |
| 2870 | <title><filename>remove-libtool.bbclass</filename></title> |
| 2871 | |
| 2872 | <para> |
| 2873 | The <filename>remove-libtool</filename> class adds a post function |
| 2874 | to the |
| 2875 | <link linkend='ref-tasks-install'><filename>do_install</filename></link> |
| 2876 | task to remove all <filename>.la</filename> files installed by |
| 2877 | <filename>libtool</filename>. |
| 2878 | Removing these files results in them being absent from both the |
| 2879 | sysroot and target packages. |
| 2880 | </para> |
| 2881 | |
| 2882 | <para> |
| 2883 | If a recipe needs the <filename>.la</filename> files to be installed, |
| 2884 | then the recipe can override the removal by setting |
| 2885 | <filename>REMOVE_LIBTOOL_LA</filename> to "0" as follows: |
| 2886 | <literallayout class='monospaced'> |
| 2887 | REMOVE_LIBTOOL_LA = "0" |
| 2888 | </literallayout> |
| 2889 | <note> |
| 2890 | The <filename>remove-libtool</filename> class is not enabled by |
| 2891 | default. |
| 2892 | </note> |
| 2893 | </para> |
| 2894 | </section> |
| 2895 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2896 | <section id='ref-classes-report-error'> |
| 2897 | <title><filename>report-error.bbclass</filename></title> |
| 2898 | |
| 2899 | <para> |
| 2900 | The <filename>report-error</filename> class supports enabling the |
| 2901 | <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>, |
| 2902 | which allows you to submit build error information to a central |
| 2903 | database. |
| 2904 | </para> |
| 2905 | |
| 2906 | <para> |
| 2907 | The class collects debug information for recipe, recipe version, task, |
| 2908 | machine, distro, build system, target system, host distro, branch, |
| 2909 | commit, and log. |
| 2910 | From the information, report files using a JSON format are created and |
| 2911 | stored in |
| 2912 | <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>. |
| 2913 | </para> |
| 2914 | </section> |
| 2915 | |
| 2916 | <section id='ref-classes-rm-work'> |
| 2917 | <title><filename>rm_work.bbclass</filename></title> |
| 2918 | |
| 2919 | <para> |
| 2920 | The <filename>rm_work</filename> class supports deletion of temporary |
| 2921 | workspace, which can ease your hard drive demands during builds. |
| 2922 | </para> |
| 2923 | |
| 2924 | <para> |
| 2925 | The OpenEmbedded build system can use a substantial amount of disk |
| 2926 | space during the build process. |
| 2927 | A portion of this space is the work files under the |
| 2928 | <filename>${TMPDIR}/work</filename> directory for each recipe. |
| 2929 | Once the build system generates the packages for a recipe, the work |
| 2930 | files for that recipe are no longer needed. |
| 2931 | However, by default, the build system preserves these files |
| 2932 | for inspection and possible debugging purposes. |
| 2933 | If you would rather have these files deleted to save disk space |
| 2934 | as the build progresses, you can enable <filename>rm_work</filename> |
| 2935 | by adding the following to your <filename>local.conf</filename> file, |
| 2936 | which is found in the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2937 | <link linkend='build-directory'>Build Directory</link>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2938 | <literallayout class='monospaced'> |
| 2939 | INHERIT += "rm_work" |
| 2940 | </literallayout> |
| 2941 | If you are modifying and building source code out of the work directory |
| 2942 | for a recipe, enabling <filename>rm_work</filename> will potentially |
| 2943 | result in your changes to the source being lost. |
| 2944 | To exclude some recipes from having their work directories deleted by |
| 2945 | <filename>rm_work</filename>, you can add the names of the recipe or |
| 2946 | recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename> |
| 2947 | variable, which can also be set in your <filename>local.conf</filename> |
| 2948 | file. |
| 2949 | Here is an example: |
| 2950 | <literallayout class='monospaced'> |
| 2951 | RM_WORK_EXCLUDE += "busybox glibc" |
| 2952 | </literallayout> |
| 2953 | </para> |
| 2954 | </section> |
| 2955 | |
| 2956 | <section id='ref-classes-rootfs*'> |
| 2957 | <title><filename>rootfs*.bbclass</filename></title> |
| 2958 | |
| 2959 | <para> |
| 2960 | The <filename>rootfs*</filename> classes support creating |
| 2961 | the root filesystem for an image and consist of the following classes: |
| 2962 | <itemizedlist> |
| 2963 | <listitem><para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2964 | The <filename>rootfs-postcommands</filename> class, which |
| 2965 | defines filesystem post-processing functions for image recipes. |
| 2966 | </para></listitem> |
| 2967 | <listitem><para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2968 | The <filename>rootfs_deb</filename> class, which supports |
| 2969 | creation of root filesystems for images built using |
| 2970 | <filename>.deb</filename> packages.</para></listitem> |
| 2971 | <listitem><para> |
| 2972 | The <filename>rootfs_rpm</filename> class, which supports |
| 2973 | creation of root filesystems for images built using |
| 2974 | <filename>.rpm</filename> packages.</para></listitem> |
| 2975 | <listitem><para> |
| 2976 | The <filename>rootfs_ipk</filename> class, which supports |
| 2977 | creation of root filesystems for images built using |
| 2978 | <filename>.ipk</filename> packages.</para></listitem> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 2979 | <listitem><para> |
| 2980 | The <filename>rootfsdebugfiles</filename> class, which installs |
| 2981 | additional files found on the build host directly into the |
| 2982 | root filesystem. |
| 2983 | </para></listitem> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2984 | </itemizedlist> |
| 2985 | </para> |
| 2986 | |
| 2987 | <para> |
| 2988 | The root filesystem is created from packages using one of the |
| 2989 | <filename>rootfs*.bbclass</filename> files as determined by the |
| 2990 | <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link> |
| 2991 | variable. |
| 2992 | </para> |
| 2993 | |
| 2994 | <para> |
| 2995 | For information on how root filesystem images are created, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 2996 | "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>" |
| 2997 | section in the Yocto Project Overview and Concepts Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2998 | </para> |
| 2999 | </section> |
| 3000 | |
| 3001 | <section id='ref-classes-sanity'> |
| 3002 | <title><filename>sanity.bbclass</filename></title> |
| 3003 | |
| 3004 | <para> |
| 3005 | The <filename>sanity</filename> class checks to see if prerequisite |
| 3006 | software is present on the host system so that users can be notified |
| 3007 | of potential problems that might affect their build. |
| 3008 | The class also performs basic user configuration checks from |
| 3009 | the <filename>local.conf</filename> configuration file to |
| 3010 | prevent common mistakes that cause build failures. |
| 3011 | Distribution policy usually determines whether to include this class. |
| 3012 | </para> |
| 3013 | </section> |
| 3014 | |
| 3015 | <section id='ref-classes-scons'> |
| 3016 | <title><filename>scons.bbclass</filename></title> |
| 3017 | |
| 3018 | <para> |
| 3019 | The <filename>scons</filename> class supports recipes that need to |
| 3020 | build software that uses the SCons build system. |
| 3021 | You can use the |
| 3022 | <link linkend='var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></link> |
| 3023 | variable to specify additional configuration options you want to pass |
| 3024 | SCons command line. |
| 3025 | </para> |
| 3026 | </section> |
| 3027 | |
| 3028 | <section id='ref-classes-sdl'> |
| 3029 | <title><filename>sdl.bbclass</filename></title> |
| 3030 | |
| 3031 | <para> |
| 3032 | The <filename>sdl</filename> class supports recipes that need to build |
| 3033 | software that uses the Simple DirectMedia Layer (SDL) library. |
| 3034 | </para> |
| 3035 | </section> |
| 3036 | |
| 3037 | <section id='ref-classes-setuptools'> |
| 3038 | <title><filename>setuptools.bbclass</filename></title> |
| 3039 | |
| 3040 | <para> |
| 3041 | The <filename>setuptools</filename> class supports Python |
| 3042 | version 2.x extensions that use build systems based on |
| 3043 | <filename>setuptools</filename>. |
| 3044 | If your recipe uses these build systems, the recipe needs to |
| 3045 | inherit the <filename>setuptools</filename> class. |
| 3046 | </para> |
| 3047 | </section> |
| 3048 | |
| 3049 | <section id='ref-classes-setuptools3'> |
| 3050 | <title><filename>setuptools3.bbclass</filename></title> |
| 3051 | |
| 3052 | <para> |
| 3053 | The <filename>setuptools3</filename> class supports Python |
| 3054 | version 3.x extensions that use build systems based on |
| 3055 | <filename>setuptools3</filename>. |
| 3056 | If your recipe uses these build systems, the recipe needs to |
| 3057 | inherit the <filename>setuptools3</filename> class. |
| 3058 | </para> |
| 3059 | </section> |
| 3060 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3061 | <section id='ref-classes-sign_rpm'> |
| 3062 | <title><filename>sign_rpm.bbclass</filename></title> |
| 3063 | |
| 3064 | <para> |
| 3065 | The <filename>sign_rpm</filename> class supports generating signed |
| 3066 | RPM packages. |
| 3067 | </para> |
| 3068 | </section> |
| 3069 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3070 | <section id='ref-classes-sip'> |
| 3071 | <title><filename>sip.bbclass</filename></title> |
| 3072 | |
| 3073 | <para> |
| 3074 | The <filename>sip</filename> class |
| 3075 | supports recipes that build or package SIP-based Python bindings. |
| 3076 | </para> |
| 3077 | </section> |
| 3078 | |
| 3079 | <section id='ref-classes-siteconfig'> |
| 3080 | <title><filename>siteconfig.bbclass</filename></title> |
| 3081 | |
| 3082 | <para> |
| 3083 | The <filename>siteconfig</filename> class |
| 3084 | provides functionality for handling site configuration. |
| 3085 | The class is used by the |
| 3086 | <link linkend='ref-classes-autotools'><filename>autotools</filename></link> |
| 3087 | class to accelerate the |
| 3088 | <link linkend='ref-tasks-configure'><filename>do_configure</filename></link> |
| 3089 | task. |
| 3090 | </para> |
| 3091 | </section> |
| 3092 | |
| 3093 | <section id='ref-classes-siteinfo'> |
| 3094 | <title><filename>siteinfo.bbclass</filename></title> |
| 3095 | |
| 3096 | <para> |
| 3097 | The <filename>siteinfo</filename> class provides information about |
| 3098 | the targets that might be needed by other classes or recipes. |
| 3099 | </para> |
| 3100 | |
| 3101 | <para> |
| 3102 | As an example, consider Autotools, which can require tests that must |
| 3103 | execute on the target hardware. |
| 3104 | Since this is not possible in general when cross compiling, site |
| 3105 | information is used to provide cached test results so these tests can |
| 3106 | be skipped over but still make the correct values available. |
| 3107 | The |
| 3108 | <filename><link linkend='structure-meta-site'>meta/site directory</link></filename> |
| 3109 | contains test results sorted into different categories such as |
| 3110 | architecture, endianness, and the <filename>libc</filename> used. |
| 3111 | Site information provides a list of files containing data relevant to |
| 3112 | the current build in the |
| 3113 | <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable |
| 3114 | that Autotools automatically picks up. |
| 3115 | </para> |
| 3116 | |
| 3117 | <para> |
| 3118 | The class also provides variables like |
| 3119 | <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename> |
| 3120 | and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename> |
| 3121 | that can be used elsewhere in the metadata. |
| 3122 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3123 | </section> |
| 3124 | |
| 3125 | <section id='ref-classes-spdx'> |
| 3126 | <title><filename>spdx.bbclass</filename></title> |
| 3127 | |
| 3128 | <para> |
| 3129 | The <filename>spdx</filename> class integrates real-time license |
| 3130 | scanning, generation of SPDX standard output, and verification |
| 3131 | of license information during the build. |
| 3132 | <note> |
| 3133 | This class is currently at the prototype stage in the 1.6 |
| 3134 | release. |
| 3135 | </note> |
| 3136 | </para> |
| 3137 | </section> |
| 3138 | |
| 3139 | <section id='ref-classes-sstate'> |
| 3140 | <title><filename>sstate.bbclass</filename></title> |
| 3141 | |
| 3142 | <para> |
| 3143 | The <filename>sstate</filename> class provides support for Shared |
| 3144 | State (sstate). |
| 3145 | By default, the class is enabled through the |
| 3146 | <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link> |
| 3147 | variable's default value. |
| 3148 | </para> |
| 3149 | |
| 3150 | <para> |
| 3151 | For more information on sstate, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 3152 | "<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>Shared State Cache</ulink>" |
| 3153 | section in the Yocto Project Overview and Concepts Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3154 | </para> |
| 3155 | </section> |
| 3156 | |
| 3157 | <section id='ref-classes-staging'> |
| 3158 | <title><filename>staging.bbclass</filename></title> |
| 3159 | |
| 3160 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 3161 | The <filename>staging</filename> class installs files into individual |
| 3162 | recipe work directories for sysroots. |
| 3163 | The class contains the following key tasks: |
| 3164 | <itemizedlist> |
| 3165 | <listitem><para> |
| 3166 | The |
| 3167 | <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link> |
| 3168 | task, which is responsible for handing the files that end up |
| 3169 | in the recipe sysroots. |
| 3170 | </para></listitem> |
| 3171 | <listitem><para> |
| 3172 | The |
| 3173 | <link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link> |
| 3174 | task (a "partner" task to the |
| 3175 | <filename>populate_sysroot</filename> task), which installs |
| 3176 | the files into the individual recipe work directories (i.e. |
| 3177 | <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>). |
| 3178 | </para></listitem> |
| 3179 | </itemizedlist> |
| 3180 | </para> |
| 3181 | |
| 3182 | <para> |
| 3183 | The code in the <filename>staging</filename> class is complex and |
| 3184 | basically works in two stages: |
| 3185 | <itemizedlist> |
| 3186 | <listitem><para> |
| 3187 | <emphasis>Stage One:</emphasis> |
| 3188 | The first stage addresses recipes that have files they want |
| 3189 | to share with other recipes that have dependencies on the |
| 3190 | originating recipe. |
| 3191 | Normally these dependencies are installed through the |
| 3192 | <link linkend='ref-tasks-install'><filename>do_install</filename></link> |
| 3193 | task into |
| 3194 | <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>. |
| 3195 | The <filename>do_populate_sysroot</filename> task copies |
| 3196 | a subset of these files into |
| 3197 | <filename>${SYSROOT_DESTDIR}</filename>. |
| 3198 | This subset of files is controlled by the |
| 3199 | <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>, |
| 3200 | <link linkend='var-SYSROOT_DIRS_NATIVE'><filename>SYSROOT_DIRS_NATIVE</filename></link>, |
| 3201 | and |
| 3202 | <link linkend='var-SYSROOT_DIRS_BLACKLIST'><filename>SYSROOT_DIRS_BLACKLIST</filename></link> |
| 3203 | variables. |
| 3204 | <note> |
| 3205 | Additionally, a recipe can customize the files further by |
| 3206 | declaring a processing function in the |
| 3207 | <link linkend='var-SYSROOT_PREPROCESS_FUNCS'><filename>SYSROOT_PREPROCESS_FUNCS</filename></link> |
| 3208 | variable. |
| 3209 | </note> |
| 3210 | </para> |
| 3211 | |
| 3212 | <para> |
| 3213 | A shared state (sstate) object is built from these files |
| 3214 | and the files are placed into a subdirectory of |
| 3215 | <link linkend='structure-build-tmp-sysroots-components'><filename>tmp/sysroots-components/</filename></link>. |
| 3216 | The files are scanned for hardcoded paths to the original |
| 3217 | installation location. |
| 3218 | If the location is found in text files, the hardcoded |
| 3219 | locations are replaced by tokens and a list of the files |
| 3220 | needing such replacements is created. |
| 3221 | These adjustments are referred to as "FIXMEs". |
| 3222 | The list of files that are scanned for paths is controlled by |
| 3223 | the |
| 3224 | <link linkend='var-SSTATE_SCAN_FILES'><filename>SSTATE_SCAN_FILES</filename></link> |
| 3225 | variable. |
| 3226 | </para></listitem> |
| 3227 | <listitem><para> |
| 3228 | <emphasis>Stage Two:</emphasis> |
| 3229 | The second stage addresses recipes that want to use something |
| 3230 | from another recipe and declare a dependency on that recipe |
| 3231 | through the |
| 3232 | <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link> |
| 3233 | variable. |
| 3234 | The recipe will have a |
| 3235 | <link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link> |
| 3236 | task and when |
| 3237 | this task executes, it creates the |
| 3238 | <filename>recipe-sysroot</filename> and |
| 3239 | <filename>recipe-sysroot-native</filename> in the recipe |
| 3240 | work directory (i.e. |
| 3241 | <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>). |
| 3242 | The OpenEmbedded build system creates hard links to copies of the |
| 3243 | relevant files from <filename>sysroots-components</filename> |
| 3244 | into the recipe work directory. |
| 3245 | <note> |
| 3246 | If hard links are not possible, the build system uses |
| 3247 | actual copies. |
| 3248 | </note> |
| 3249 | The build system then addresses any "FIXMEs" to paths as |
| 3250 | defined from the list created in the first stage. |
| 3251 | </para> |
| 3252 | |
| 3253 | <para> |
| 3254 | Finally, any files in <filename>${bindir}</filename> |
| 3255 | within the sysroot that have the prefix |
| 3256 | "<filename>postinst-</filename>" are executed. |
| 3257 | <note> |
| 3258 | Although such sysroot post installation scripts are not |
| 3259 | recommended for general use, the files do allow some issues |
| 3260 | such as user creation and module indexes to be addressed. |
| 3261 | </note> |
| 3262 | </para> |
| 3263 | |
| 3264 | <para> |
| 3265 | Because recipes can have other dependencies outside of |
| 3266 | <filename>DEPENDS</filename> (e.g. |
| 3267 | <filename>do_unpack[depends] += "tar-native:do_populate_sysroot"</filename>), |
| 3268 | the sysroot creation function |
| 3269 | <filename>extend_recipe_sysroot</filename> is also added as |
| 3270 | a pre-function for those tasks whose dependencies are not |
| 3271 | through <filename>DEPENDS</filename> but operate similarly. |
| 3272 | </para> |
| 3273 | |
| 3274 | <para> |
| 3275 | When installing dependencies into the sysroot, the code |
| 3276 | traverses the dependency graph and processes dependencies |
| 3277 | in exactly the same way as the dependencies would or would not |
| 3278 | be when installed from sstate. |
| 3279 | This processing means, for example, a native tool would have |
| 3280 | its native dependencies added but a target library would not |
| 3281 | have its dependencies traversed or installed. |
| 3282 | The same sstate dependency code is used so that |
| 3283 | builds should be identical regardless of whether sstate |
| 3284 | was used or not. |
| 3285 | For a closer look, see the |
| 3286 | <filename>setscene_depvalid()</filename> function in the |
| 3287 | <link linkend='ref-classes-sstate'><filename>sstate</filename></link> |
| 3288 | class. |
| 3289 | </para> |
| 3290 | |
| 3291 | <para> |
| 3292 | The build system is careful to maintain manifests of the files |
| 3293 | it installs so that any given dependency can be installed as |
| 3294 | needed. |
| 3295 | The sstate hash of the installed item is also stored so that |
| 3296 | if it changes, the build system can reinstall it. |
| 3297 | </para></listitem> |
| 3298 | </itemizedlist> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3299 | </para> |
| 3300 | </section> |
| 3301 | |
| 3302 | <section id='ref-classes-syslinux'> |
| 3303 | <title><filename>syslinux.bbclass</filename></title> |
| 3304 | |
| 3305 | <para> |
| 3306 | The <filename>syslinux</filename> class provides syslinux-specific |
| 3307 | functions for building bootable images. |
| 3308 | </para> |
| 3309 | |
| 3310 | <para> |
| 3311 | The class supports the following variables: |
| 3312 | <itemizedlist> |
| 3313 | <listitem><para><link linkend='var-INITRD'><filename>INITRD</filename></link>: |
| 3314 | Indicates list of filesystem images to concatenate and use as |
| 3315 | an initial RAM disk (initrd). |
| 3316 | This variable is optional.</para></listitem> |
| 3317 | <listitem><para><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>: |
| 3318 | Indicates a filesystem image to include as the root filesystem. |
| 3319 | This variable is optional.</para></listitem> |
| 3320 | <listitem><para><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>: |
| 3321 | Enables creating an automatic menu when set to "1". |
| 3322 | </para></listitem> |
| 3323 | <listitem><para><link linkend='var-LABELS'><filename>LABELS</filename></link>: |
| 3324 | Lists targets for automatic configuration. |
| 3325 | </para></listitem> |
| 3326 | <listitem><para><link linkend='var-APPEND'><filename>APPEND</filename></link>: |
| 3327 | Lists append string overrides for each label. |
| 3328 | </para></listitem> |
| 3329 | <listitem><para><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>: |
| 3330 | Lists additional options to add to the syslinux file. |
| 3331 | Semicolon characters separate multiple options. |
| 3332 | </para></listitem> |
| 3333 | <listitem><para><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>: |
| 3334 | Lists a background for the VGA boot menu when you are using the |
| 3335 | boot menu.</para></listitem> |
| 3336 | <listitem><para><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>: |
| 3337 | Set to "console=ttyX" to change kernel boot default console. |
| 3338 | </para></listitem> |
| 3339 | <listitem><para><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>: |
| 3340 | Sets an alternate serial port. |
| 3341 | Or, turns off serial when the variable is set with an |
| 3342 | empty string.</para></listitem> |
| 3343 | <listitem><para><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>: |
| 3344 | Sets an alternate "console=tty..." kernel boot argument. |
| 3345 | </para></listitem> |
| 3346 | </itemizedlist> |
| 3347 | </para> |
| 3348 | </section> |
| 3349 | |
| 3350 | <section id='ref-classes-systemd'> |
| 3351 | <title><filename>systemd.bbclass</filename></title> |
| 3352 | |
| 3353 | <para> |
| 3354 | The <filename>systemd</filename> class provides support for recipes |
| 3355 | that install systemd unit files. |
| 3356 | </para> |
| 3357 | |
| 3358 | <para> |
| 3359 | The functionality for this class is disabled unless you have "systemd" |
| 3360 | in |
| 3361 | <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>. |
| 3362 | </para> |
| 3363 | |
| 3364 | <para> |
| 3365 | Under this class, the recipe or Makefile (i.e. whatever the recipe is |
| 3366 | calling during the |
| 3367 | <link linkend='ref-tasks-install'><filename>do_install</filename></link> |
| 3368 | task) installs unit files into |
| 3369 | <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}${systemd_unitdir}/system</filename>. |
| 3370 | If the unit files being installed go into packages other than the |
| 3371 | main package, you need to set |
| 3372 | <link linkend='var-SYSTEMD_PACKAGES'><filename>SYSTEMD_PACKAGES</filename></link> |
| 3373 | in your recipe to identify the packages in which the files will be |
| 3374 | installed. |
| 3375 | </para> |
| 3376 | |
| 3377 | <para> |
| 3378 | You should set |
| 3379 | <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link> |
| 3380 | to the name of the service file. |
| 3381 | You should also use a package name override to indicate the package |
| 3382 | to which the value applies. |
| 3383 | If the value applies to the recipe's main package, use |
| 3384 | <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>. |
| 3385 | Here is an example from the connman recipe: |
| 3386 | <literallayout class='monospaced'> |
| 3387 | SYSTEMD_SERVICE_${PN} = "connman.service" |
| 3388 | </literallayout> |
| 3389 | Services are set up to start on boot automatically unless |
| 3390 | you have set |
| 3391 | <link linkend='var-SYSTEMD_AUTO_ENABLE'><filename>SYSTEMD_AUTO_ENABLE</filename></link> |
| 3392 | to "disable". |
| 3393 | </para> |
| 3394 | |
| 3395 | <para> |
| 3396 | For more information on <filename>systemd</filename>, see the |
| 3397 | "<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager'>Selecting an Initialization Manager</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3398 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3399 | </para> |
| 3400 | </section> |
| 3401 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 3402 | <section id='ref-classes-systemd-boot'> |
| 3403 | <title><filename>systemd-boot.bbclass</filename></title> |
| 3404 | |
| 3405 | <para> |
| 3406 | The <filename>systemd-boot</filename> class provides functions specific |
| 3407 | to the systemd-boot bootloader for building bootable images. |
| 3408 | This is an internal class and is not intended to be used directly. |
| 3409 | <note> |
| 3410 | The <filename>systemd-boot</filename> class is a result from |
| 3411 | merging the <filename>gummiboot</filename> class used in previous |
| 3412 | Yocto Project releases with the <filename>systemd</filename> |
| 3413 | project. |
| 3414 | </note> |
| 3415 | Set the |
| 3416 | <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link> |
| 3417 | variable to "systemd-boot" to use this class. |
| 3418 | Doing so creates a standalone EFI bootloader that is not dependent |
| 3419 | on systemd. |
| 3420 | </para> |
| 3421 | |
| 3422 | <para> |
| 3423 | For information on more variables used and supported in this class, |
| 3424 | see the |
| 3425 | <link linkend='var-SYSTEMD_BOOT_CFG'><filename>SYSTEMD_BOOT_CFG</filename></link>, |
| 3426 | <link linkend='var-SYSTEMD_BOOT_ENTRIES'><filename>SYSTEMD_BOOT_ENTRIES</filename></link>, |
| 3427 | and |
| 3428 | <link linkend='var-SYSTEMD_BOOT_TIMEOUT'><filename>SYSTEMD_BOOT_TIMEOUT</filename></link> |
| 3429 | variables. |
| 3430 | </para> |
| 3431 | |
| 3432 | <para> |
| 3433 | You can also see the |
| 3434 | <ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink> |
| 3435 | for more information. |
| 3436 | </para> |
| 3437 | </section> |
| 3438 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3439 | <section id='ref-classes-terminal'> |
| 3440 | <title><filename>terminal.bbclass</filename></title> |
| 3441 | |
| 3442 | <para> |
| 3443 | The <filename>terminal</filename> class provides support for starting |
| 3444 | a terminal session. |
| 3445 | The |
| 3446 | <link linkend='var-OE_TERMINAL'><filename>OE_TERMINAL</filename></link> |
| 3447 | variable controls which terminal emulator is used for the session. |
| 3448 | </para> |
| 3449 | |
| 3450 | <para> |
| 3451 | Other classes use the <filename>terminal</filename> class anywhere a |
| 3452 | separate terminal session needs to be started. |
| 3453 | For example, the |
| 3454 | <link linkend='ref-classes-patch'><filename>patch</filename></link> |
| 3455 | class assuming |
| 3456 | <link linkend='var-PATCHRESOLVE'><filename>PATCHRESOLVE</filename></link> |
| 3457 | is set to "user", the |
| 3458 | <link linkend='ref-classes-cml1'><filename>cml1</filename></link> |
| 3459 | class, and the |
| 3460 | <link linkend='ref-classes-devshell'><filename>devshell</filename></link> |
| 3461 | class all use the <filename>terminal</filename> class. |
| 3462 | </para> |
| 3463 | </section> |
| 3464 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3465 | <section id='ref-classes-testimage*'> |
| 3466 | <title><filename>testimage*.bbclass</filename></title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3467 | |
| 3468 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3469 | The <filename>testimage*</filename> classes support running |
| 3470 | automated tests against images using QEMU and on actual hardware. |
| 3471 | The classes handle loading the tests and starting the image. |
| 3472 | To use the classes, you need to perform steps to set up the |
| 3473 | environment. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 3474 | <note><title>Tip</title> |
| 3475 | Best practices include using |
| 3476 | <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link> |
| 3477 | rather than |
| 3478 | <link linkend='var-INHERIT'><filename>INHERIT</filename></link> to |
| 3479 | inherit the <filename>testimage</filename> class for automated |
| 3480 | image testing. |
| 3481 | </note> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3482 | </para> |
| 3483 | |
| 3484 | <para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3485 | The tests are commands that run on the target system over |
| 3486 | <filename>ssh</filename>. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3487 | Each test is written in Python and makes use of the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3488 | <filename>unittest</filename> module. |
| 3489 | </para> |
| 3490 | |
| 3491 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3492 | The <filename>testimage.bbclass</filename> runs tests on an image |
| 3493 | when called using the following: |
| 3494 | <literallayout class='monospaced'> |
| 3495 | $ bitbake -c testimage <replaceable>image</replaceable> |
| 3496 | </literallayout> |
| 3497 | The <filename>testimage-auto</filename> class runs tests on an image |
| 3498 | after the image is constructed (i.e. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 3499 | <link linkend='var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></link> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3500 | must be set to "1"). |
| 3501 | </para> |
| 3502 | |
| 3503 | <para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3504 | For information on how to enable, run, and create new tests, see the |
| 3505 | "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3506 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3507 | </para> |
| 3508 | </section> |
| 3509 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 3510 | <section id='ref-classes-testsdk'> |
| 3511 | <title><filename>testsdk.bbclass</filename></title> |
| 3512 | |
| 3513 | <para> |
| 3514 | This class supports running automated tests against |
| 3515 | software development kits (SDKs). |
| 3516 | The <filename>testsdk</filename> class runs tests on an SDK when |
| 3517 | called using the following: |
| 3518 | <literallayout class='monospaced'> |
| 3519 | $ bitbake -c testsdk image |
| 3520 | </literallayout> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 3521 | <note><title>Tip</title> |
| 3522 | Best practices include using |
| 3523 | <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link> |
| 3524 | rather than |
| 3525 | <link linkend='var-INHERIT'><filename>INHERIT</filename></link> to |
| 3526 | inherit the <filename>testsdk</filename> class for automated |
| 3527 | SDK testing. |
| 3528 | </note> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 3529 | </para> |
| 3530 | </section> |
| 3531 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3532 | <section id='ref-classes-texinfo'> |
| 3533 | <title><filename>texinfo.bbclass</filename></title> |
| 3534 | |
| 3535 | <para> |
| 3536 | This class should be inherited by recipes whose upstream packages |
| 3537 | invoke the <filename>texinfo</filename> utilities at build-time. |
| 3538 | Native and cross recipes are made to use the dummy scripts provided |
| 3539 | by <filename>texinfo-dummy-native</filename>, for improved performance. |
| 3540 | Target architecture recipes use the genuine |
| 3541 | Texinfo utilities. |
| 3542 | By default, they use the Texinfo utilities on the host system. |
| 3543 | <note> |
| 3544 | If you want to use the Texinfo recipe shipped with the build |
| 3545 | system, you can remove "texinfo-native" from |
| 3546 | <link linkend='var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></link> |
| 3547 | and makeinfo from |
| 3548 | <link linkend='var-SANITY_REQUIRED_UTILITIES'><filename>SANITY_REQUIRED_UTILITIES</filename></link>. |
| 3549 | </note> |
| 3550 | </para> |
| 3551 | </section> |
| 3552 | |
| 3553 | <section id='ref-classes-tinderclient'> |
| 3554 | <title><filename>tinderclient.bbclass</filename></title> |
| 3555 | |
| 3556 | <para> |
| 3557 | The <filename>tinderclient</filename> class submits build results to |
| 3558 | an external Tinderbox instance. |
| 3559 | <note> |
| 3560 | This class is currently unmaintained. |
| 3561 | </note> |
| 3562 | </para> |
| 3563 | </section> |
| 3564 | |
| 3565 | <section id='ref-classes-toaster'> |
| 3566 | <title><filename>toaster.bbclass</filename></title> |
| 3567 | |
| 3568 | <para> |
| 3569 | The <filename>toaster</filename> class collects information about |
| 3570 | packages and images and sends them as events that the BitBake |
| 3571 | user interface can receive. |
| 3572 | The class is enabled when the Toaster user interface is running. |
| 3573 | </para> |
| 3574 | |
| 3575 | <para> |
| 3576 | This class is not intended to be used directly. |
| 3577 | </para> |
| 3578 | </section> |
| 3579 | |
| 3580 | <section id='ref-classes-toolchain-scripts'> |
| 3581 | <title><filename>toolchain-scripts.bbclass</filename></title> |
| 3582 | |
| 3583 | <para> |
| 3584 | The <filename>toolchain-scripts</filename> class provides the scripts |
| 3585 | used for setting up the environment for installed SDKs. |
| 3586 | </para> |
| 3587 | </section> |
| 3588 | |
| 3589 | <section id='ref-classes-typecheck'> |
| 3590 | <title><filename>typecheck.bbclass</filename></title> |
| 3591 | |
| 3592 | <para> |
| 3593 | The <filename>typecheck</filename> class provides support for |
| 3594 | validating the values of variables set at the configuration level |
| 3595 | against their defined types. |
| 3596 | The OpenEmbedded build system allows you to define the type of a |
| 3597 | variable using the "type" varflag. |
| 3598 | Here is an example: |
| 3599 | <literallayout class='monospaced'> |
| 3600 | IMAGE_FEATURES[type] = "list" |
| 3601 | </literallayout> |
| 3602 | </para> |
| 3603 | </section> |
| 3604 | |
| 3605 | <section id='ref-classes-uboot-config'> |
| 3606 | <title><filename>uboot-config.bbclass</filename></title> |
| 3607 | |
| 3608 | <para> |
| 3609 | The <filename>uboot-config</filename> class provides support for |
| 3610 | U-Boot configuration for a machine. |
| 3611 | Specify the machine in your recipe as follows: |
| 3612 | <literallayout class='monospaced'> |
| 3613 | UBOOT_CONFIG ??= <default> |
| 3614 | UBOOT_CONFIG[foo] = "config,images" |
| 3615 | </literallayout> |
| 3616 | You can also specify the machine using this method: |
| 3617 | <literallayout class='monospaced'> |
| 3618 | UBOOT_MACHINE = "config" |
| 3619 | </literallayout> |
| 3620 | See the |
| 3621 | <link linkend='var-UBOOT_CONFIG'><filename>UBOOT_CONFIG</filename></link> |
| 3622 | and |
| 3623 | <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link> |
| 3624 | variables for additional information. |
| 3625 | </para> |
| 3626 | </section> |
| 3627 | |
| 3628 | <section id='ref-classes-uninative'> |
| 3629 | <title><filename>uninative.bbclass</filename></title> |
| 3630 | |
| 3631 | <para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 3632 | Attempts to isolate the build system from the host |
| 3633 | distribution's C library in order to make re-use of native shared state |
| 3634 | artifacts across different host distributions practical. |
| 3635 | With this class enabled, a tarball containing a pre-built C library |
| 3636 | is downloaded at the start of the build. |
| 3637 | In the Poky reference distribution this is enabled by default |
| 3638 | through |
| 3639 | <filename>meta/conf/distro/include/yocto-uninative.inc</filename>. |
| 3640 | Other distributions that do not derive from poky can also |
| 3641 | "<filename>require conf/distro/include/yocto-uninative.inc</filename>" |
| 3642 | to use this. |
| 3643 | Alternatively if you prefer, you can build the uninative-tarball recipe |
| 3644 | yourself, publish the resulting tarball (e.g. via HTTP) and set |
| 3645 | <filename>UNINATIVE_URL</filename> and |
| 3646 | <filename>UNINATIVE_CHECKSUM</filename> appropriately. |
| 3647 | For an example, see the |
| 3648 | <filename>meta/conf/distro/include/yocto-uninative.inc</filename>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3649 | </para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 3650 | |
| 3651 | <para> |
| 3652 | The <filename>uninative</filename> class is also used unconditionally |
| 3653 | by the extensible SDK. |
| 3654 | When building the extensible SDK, |
| 3655 | <filename>uninative-tarball</filename> is built and the resulting |
| 3656 | tarball is included within the SDK. |
| 3657 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3658 | </section> |
| 3659 | |
| 3660 | <section id='ref-classes-update-alternatives'> |
| 3661 | <title><filename>update-alternatives.bbclass</filename></title> |
| 3662 | |
| 3663 | <para> |
| 3664 | The <filename>update-alternatives</filename> class helps the |
| 3665 | alternatives system when multiple sources provide the same command. |
| 3666 | This situation occurs when several programs that have the same or |
| 3667 | similar function are installed with the same name. |
| 3668 | For example, the <filename>ar</filename> command is available from the |
| 3669 | <filename>busybox</filename>, <filename>binutils</filename> and |
| 3670 | <filename>elfutils</filename> packages. |
| 3671 | The <filename>update-alternatives</filename> class handles |
| 3672 | renaming the binaries so that multiple packages can be installed |
| 3673 | without conflicts. |
| 3674 | The <filename>ar</filename> command still works regardless of which |
| 3675 | packages are installed or subsequently removed. |
| 3676 | The class renames the conflicting binary in each package and symlinks |
| 3677 | the highest priority binary during installation or removal of packages. |
| 3678 | </para> |
| 3679 | |
| 3680 | <para> |
| 3681 | To use this class, you need to define a number of variables: |
| 3682 | <itemizedlist> |
| 3683 | <listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link> |
| 3684 | </para></listitem> |
| 3685 | <listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link> |
| 3686 | </para></listitem> |
| 3687 | <listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link> |
| 3688 | </para></listitem> |
| 3689 | <listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link> |
| 3690 | </para></listitem> |
| 3691 | </itemizedlist> |
| 3692 | These variables list alternative commands needed by a package, |
| 3693 | provide pathnames for links, default links for targets, and |
| 3694 | so forth. |
| 3695 | For details on how to use this class, see the comments in the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3696 | <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink> |
| 3697 | file. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3698 | </para> |
| 3699 | |
| 3700 | <note> |
| 3701 | You can use the <filename>update-alternatives</filename> command |
| 3702 | directly in your recipes. |
| 3703 | However, this class simplifies things in most cases. |
| 3704 | </note> |
| 3705 | </section> |
| 3706 | |
| 3707 | <section id='ref-classes-update-rc.d'> |
| 3708 | <title><filename>update-rc.d.bbclass</filename></title> |
| 3709 | |
| 3710 | <para> |
| 3711 | The <filename>update-rc.d</filename> class uses |
| 3712 | <filename>update-rc.d</filename> to safely install an |
| 3713 | initialization script on behalf of the package. |
| 3714 | The OpenEmbedded build system takes care of details such as making |
| 3715 | sure the script is stopped before a package is removed and started when |
| 3716 | the package is installed. |
| 3717 | </para> |
| 3718 | |
| 3719 | <para> |
| 3720 | Three variables control this class: |
| 3721 | <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>, |
| 3722 | <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and |
| 3723 | <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>. |
| 3724 | See the variable links for details. |
| 3725 | </para> |
| 3726 | </section> |
| 3727 | |
| 3728 | <section id='ref-classes-useradd'> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3729 | <title><filename>useradd*.bbclass</filename></title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3730 | |
| 3731 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3732 | The <filename>useradd*</filename> classes support the addition of users |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3733 | or groups for usage by the package on the target. |
| 3734 | For example, if you have packages that contain system services that |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3735 | should be run under their own user or group, you can use these classes |
| 3736 | to enable creation of the user or group. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3737 | The |
| 3738 | <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename> |
| 3739 | recipe in the <link linkend='source-directory'>Source Directory</link> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3740 | provides a simple example that shows how to add three |
| 3741 | users and groups to two packages. |
| 3742 | See the <filename>useradd-example.bb</filename> recipe for more |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3743 | information on how to use these classes. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3744 | </para> |
| 3745 | |
| 3746 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3747 | The <filename>useradd_base</filename> class provides basic |
| 3748 | functionality for user or groups settings. |
| 3749 | </para> |
| 3750 | |
| 3751 | <para> |
| 3752 | The <filename>useradd*</filename> classes support the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3753 | <link linkend='var-USERADD_PACKAGES'><filename>USERADD_PACKAGES</filename></link>, |
| 3754 | <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>, |
| 3755 | <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>, |
| 3756 | and |
| 3757 | <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link> |
| 3758 | variables. |
| 3759 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3760 | |
| 3761 | <para> |
| 3762 | The <filename>useradd-staticids</filename> class supports the addition |
| 3763 | of users or groups that have static user identification |
| 3764 | (<filename>uid</filename>) and group identification |
| 3765 | (<filename>gid</filename>) values. |
| 3766 | </para> |
| 3767 | |
| 3768 | <para> |
| 3769 | The default behavior of the OpenEmbedded build system for assigning |
| 3770 | <filename>uid</filename> and <filename>gid</filename> values when |
| 3771 | packages add users and groups during package install time is to |
| 3772 | add them dynamically. |
| 3773 | This works fine for programs that do not care what the values of the |
| 3774 | resulting users and groups become. |
| 3775 | In these cases, the order of the installation determines the final |
| 3776 | <filename>uid</filename> and <filename>gid</filename> values. |
| 3777 | However, if non-deterministic |
| 3778 | <filename>uid</filename> and <filename>gid</filename> values are a |
| 3779 | problem, you can override the default, dynamic application of these |
| 3780 | values by setting static values. |
| 3781 | When you set static values, the OpenEmbedded build system looks in |
| 3782 | <link linkend='var-BBPATH'><filename>BBPATH</filename></link> for |
| 3783 | <filename>files/passwd</filename> and <filename>files/group</filename> |
| 3784 | files for the values. |
| 3785 | </para> |
| 3786 | |
| 3787 | <para> |
| 3788 | To use static <filename>uid</filename> and <filename>gid</filename> |
| 3789 | values, you need to set some variables. |
| 3790 | See the |
| 3791 | <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>, |
| 3792 | <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>, |
| 3793 | <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>, |
| 3794 | and |
| 3795 | <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link> |
| 3796 | variables. |
| 3797 | You can also see the |
| 3798 | <link linkend='ref-classes-useradd'><filename>useradd</filename></link> |
| 3799 | class for additional information. |
| 3800 | </para> |
| 3801 | |
| 3802 | <note><title>Notes</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3803 | You do not use the <filename>useradd-staticids</filename> |
| 3804 | class directly. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3805 | You either enable or disable the class by setting the |
| 3806 | <filename>USERADDEXTENSION</filename> variable. |
| 3807 | If you enable or disable the class in a configured system, |
| 3808 | <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> |
| 3809 | might contain incorrect <filename>uid</filename> and |
| 3810 | <filename>gid</filename> values. |
| 3811 | Deleting the <filename>TMPDIR</filename> directory |
| 3812 | will correct this condition. |
| 3813 | </note> |
| 3814 | </section> |
| 3815 | |
| 3816 | <section id='ref-classes-utility-tasks'> |
| 3817 | <title><filename>utility-tasks.bbclass</filename></title> |
| 3818 | |
| 3819 | <para> |
| 3820 | The <filename>utility-tasks</filename> class provides support for |
| 3821 | various "utility" type tasks that are applicable to all recipes, |
| 3822 | such as |
| 3823 | <link linkend='ref-tasks-clean'><filename>do_clean</filename></link> and |
| 3824 | <link linkend='ref-tasks-listtasks'><filename>do_listtasks</filename></link>. |
| 3825 | </para> |
| 3826 | |
| 3827 | <para> |
| 3828 | This class is enabled by default because it is inherited by |
| 3829 | the |
| 3830 | <link linkend='ref-classes-base'><filename>base</filename></link> |
| 3831 | class. |
| 3832 | </para> |
| 3833 | </section> |
| 3834 | |
| 3835 | <section id='ref-classes-utils'> |
| 3836 | <title><filename>utils.bbclass</filename></title> |
| 3837 | |
| 3838 | <para> |
| 3839 | The <filename>utils</filename> class provides some useful Python |
| 3840 | functions that are typically used in inline Python expressions |
| 3841 | (e.g. <filename>${@...}</filename>). |
| 3842 | One example use is for <filename>bb.utils.contains()</filename>. |
| 3843 | </para> |
| 3844 | |
| 3845 | <para> |
| 3846 | This class is enabled by default because it is inherited by the |
| 3847 | <link linkend='ref-classes-base'><filename>base</filename></link> |
| 3848 | class. |
| 3849 | </para> |
| 3850 | </section> |
| 3851 | |
| 3852 | <section id='ref-classes-vala'> |
| 3853 | <title><filename>vala.bbclass</filename></title> |
| 3854 | |
| 3855 | <para> |
| 3856 | The <filename>vala</filename> class supports recipes that need to |
| 3857 | build software written using the Vala programming language. |
| 3858 | </para> |
| 3859 | </section> |
| 3860 | |
| 3861 | <section id='ref-classes-waf'> |
| 3862 | <title><filename>waf.bbclass</filename></title> |
| 3863 | |
| 3864 | <para> |
| 3865 | The <filename>waf</filename> class supports recipes that need to build |
| 3866 | software that uses the Waf build system. |
| 3867 | You can use the |
| 3868 | <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 3869 | or |
| 3870 | <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link> |
| 3871 | variables to specify additional configuration options to be passed on |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3872 | the Waf command line. |
| 3873 | </para> |
| 3874 | </section> |
| 3875 | |
| 3876 | <!-- Undocumented classes are: |
| 3877 | image-empty.bbclass (possibly being dropped) |
| 3878 | migrate_localcount.bbclass (still need a description) |
| 3879 | --> |
| 3880 | |
| 3881 | |
| 3882 | </chapter> |
| 3883 | <!-- |
| 3884 | vim: expandtab tw=80 ts=4 |
| 3885 | --> |