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