summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2023-11-14 17:44:01 +0100
committerSteve Sakoman <steve@sakoman.com>2023-11-28 05:00:32 -1000
commita2d67684cc830181f00d4a432d10faf1c0495f25 (patch)
tree26ab9f04d0e682a9f1ce3a4579ca331fefe92039 /documentation
parentfdd88b549fbddcfad967b9fc0d11b66e1bbd0dd1 (diff)
downloadpoky-a2d67684cc830181f00d4a432d10faf1c0495f25.tar.gz
manuals: update class references
Synchronizing with master whenever possible, to make the branch easier to maintain. (From yocto-docs rev: 825b1292ab08770b2d8cfdc1e11358a2790c1a1b) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/runtime-testing.rst2
-rw-r--r--documentation/dev-manual/upgrading-recipes.rst2
-rw-r--r--documentation/migration-guides/migration-1.5.rst2
-rw-r--r--documentation/migration-guides/migration-2.6.rst2
-rw-r--r--documentation/overview-manual/concepts.rst2
-rw-r--r--documentation/ref-manual/classes.rst1694
-rw-r--r--documentation/ref-manual/release-process.rst2
-rw-r--r--documentation/ref-manual/variables.rst258
-rw-r--r--documentation/test-manual/intro.rst2
9 files changed, 1204 insertions, 762 deletions
diff --git a/documentation/dev-manual/runtime-testing.rst b/documentation/dev-manual/runtime-testing.rst
index 177f781b62..af3fe2c1dd 100644
--- a/documentation/dev-manual/runtime-testing.rst
+++ b/documentation/dev-manual/runtime-testing.rst
@@ -332,7 +332,7 @@ You can start the tests automatically or manually:
332 bitbake core-image-sato 332 bitbake core-image-sato
333 333
334- *Manually running tests:* To manually run the tests, first globally 334- *Manually running tests:* To manually run the tests, first globally
335 inherit the :ref:`ref-classes-testimage*` class by editing your 335 inherit the :ref:`ref-classes-testimage` class by editing your
336 ``local.conf`` file:: 336 ``local.conf`` file::
337 337
338 IMAGE_CLASSES += "testimage" 338 IMAGE_CLASSES += "testimage"
diff --git a/documentation/dev-manual/upgrading-recipes.rst b/documentation/dev-manual/upgrading-recipes.rst
index dc8e3c6f52..4fac78bdfb 100644
--- a/documentation/dev-manual/upgrading-recipes.rst
+++ b/documentation/dev-manual/upgrading-recipes.rst
@@ -113,7 +113,7 @@ The following steps describe how to set up the AUH utility:
113 ``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in 113 ``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in
114 your :term:`Build Directory`. 114 your :term:`Build Directory`.
115 115
116 - If you want to enable testing through the :ref:`ref-classes-testimage*` 116 - If you want to enable testing through the :ref:`ref-classes-testimage`
117 class, which is optional, you need to have the following set in 117 class, which is optional, you need to have the following set in
118 your ``conf/local.conf`` file:: 118 your ``conf/local.conf`` file::
119 119
diff --git a/documentation/migration-guides/migration-1.5.rst b/documentation/migration-guides/migration-1.5.rst
index 31943fc701..6affe68b58 100644
--- a/documentation/migration-guides/migration-1.5.rst
+++ b/documentation/migration-guides/migration-1.5.rst
@@ -240,7 +240,7 @@ Automated Image Testing
240----------------------- 240-----------------------
241 241
242A new automated image testing framework has been added through the 242A new automated image testing framework has been added through the
243:ref:`ref-classes-testimage*` classes. This 243:ref:`ref-classes-testimage` classes. This
244framework replaces the older ``imagetest-qemu`` framework. 244framework replaces the older ``imagetest-qemu`` framework.
245 245
246You can learn more about performing automated image tests in the 246You can learn more about performing automated image tests in the
diff --git a/documentation/migration-guides/migration-2.6.rst b/documentation/migration-guides/migration-2.6.rst
index 647ef83bc6..ffac097a05 100644
--- a/documentation/migration-guides/migration-2.6.rst
+++ b/documentation/migration-guides/migration-2.6.rst
@@ -319,7 +319,7 @@ This section provides information about automatic testing changes:
319 practices now dictate that you use the 319 practices now dictate that you use the
320 :term:`IMAGE_CLASSES` variable rather than the 320 :term:`IMAGE_CLASSES` variable rather than the
321 :term:`INHERIT` variable when you inherit the 321 :term:`INHERIT` variable when you inherit the
322 :ref:`testimage <ref-classes-testimage*>` and 322 :ref:`testimage <ref-classes-testimage>` and
323 :ref:`testsdk <ref-classes-testsdk>` classes used for automatic 323 :ref:`testsdk <ref-classes-testsdk>` classes used for automatic
324 testing. 324 testing.
325 325
diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst
index 4a8ea0f611..371c73418a 100644
--- a/documentation/overview-manual/concepts.rst
+++ b/documentation/overview-manual/concepts.rst
@@ -1026,7 +1026,7 @@ processing includes creation of a manifest file and optimizations.
1026The manifest file (``.manifest``) resides in the same directory as the 1026The manifest file (``.manifest``) resides in the same directory as the
1027root filesystem image. This file lists out, line-by-line, the installed 1027root filesystem image. This file lists out, line-by-line, the installed
1028packages. The manifest file is useful for the 1028packages. The manifest file is useful for the
1029:ref:`testimage <ref-classes-testimage*>` class, 1029:ref:`testimage <ref-classes-testimage>` class,
1030for example, to determine whether or not to run specific tests. See the 1030for example, to determine whether or not to run specific tests. See the
1031:term:`IMAGE_MANIFEST` 1031:term:`IMAGE_MANIFEST`
1032variable for additional information. 1032variable for additional information.
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 53e47ab5a7..6074ea0f52 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -28,10 +28,10 @@ information.
28 28
29.. _ref-classes-allarch: 29.. _ref-classes-allarch:
30 30
31``allarch.bbclass`` 31``allarch``
32=================== 32===========
33 33
34The ``allarch`` class is inherited by recipes that do not produce 34The :ref:`ref-classes-allarch` class is inherited by recipes that do not produce
35architecture-specific output. The class disables functionality that is 35architecture-specific output. The class disables functionality that is
36normally needed for recipes that produce executable binaries (such as 36normally needed for recipes that produce executable binaries (such as
37building the cross-compiler and a C library as pre-requisites, and 37building the cross-compiler and a C library as pre-requisites, and
@@ -43,28 +43,28 @@ splitting out of debug symbols during packaging).
43 produce packages that depend on tunings through use of the 43 produce packages that depend on tunings through use of the
44 :term:`RDEPENDS` and 44 :term:`RDEPENDS` and
45 :term:`TUNE_PKGARCH` variables, should never be 45 :term:`TUNE_PKGARCH` variables, should never be
46 configured for all architectures using ``allarch``. This is the case 46 configured for all architectures using :ref:`ref-classes-allarch`. This is the case
47 even if the recipes do not produce architecture-specific output. 47 even if the recipes do not produce architecture-specific output.
48 48
49 Configuring such recipes for all architectures causes the 49 Configuring such recipes for all architectures causes the
50 ``do_package_write_*`` tasks to 50 :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks to
51 have different signatures for the machines with different tunings. 51 have different signatures for the machines with different tunings.
52 Additionally, unnecessary rebuilds occur every time an image for a 52 Additionally, unnecessary rebuilds occur every time an image for a
53 different :term:`MACHINE` is built even when the recipe never changes. 53 different :term:`MACHINE` is built even when the recipe never changes.
54 54
55By default, all recipes inherit the :ref:`base <ref-classes-base>` and 55By default, all recipes inherit the :ref:`ref-classes-base` and
56:ref:`package <ref-classes-package>` classes, which enable 56:ref:`ref-classes-package` classes, which enable
57functionality needed for recipes that produce executable output. If your 57functionality needed for recipes that produce executable output. If your
58recipe, for example, only produces packages that contain configuration 58recipe, for example, only produces packages that contain configuration
59files, media files, or scripts (e.g. Python and Perl), then it should 59files, media files, or scripts (e.g. Python and Perl), then it should
60inherit the ``allarch`` class. 60inherit the :ref:`ref-classes-allarch` class.
61 61
62.. _ref-classes-archiver: 62.. _ref-classes-archiver:
63 63
64``archiver.bbclass`` 64``archiver``
65==================== 65============
66 66
67The ``archiver`` class supports releasing source code and other 67The :ref:`ref-classes-archiver` class supports releasing source code and other
68materials with the binaries. 68materials with the binaries.
69 69
70For more details on the source :ref:`ref-classes-archiver`, see the 70For more details on the source :ref:`ref-classes-archiver`, see the
@@ -75,10 +75,11 @@ about the variable flags (varflags) that help control archive creation.
75 75
76.. _ref-classes-autotools: 76.. _ref-classes-autotools:
77 77
78``autotools*.bbclass`` 78``autotools*``
79====================== 79==============
80 80
81The ``autotools*`` classes support Autotooled packages. 81The :ref:`autotools* <ref-classes-autotools>` classes support packages built with the
82:wikipedia:`GNU Autotools <GNU_Autotools>`.
82 83
83The ``autoconf``, ``automake``, and ``libtool`` packages bring 84The ``autoconf``, ``automake``, and ``libtool`` packages bring
84standardization. This class defines a set of tasks (e.g. ``configure``, 85standardization. This class defines a set of tasks (e.g. ``configure``,
@@ -89,13 +90,13 @@ that emulates Autotools. For more information, see the
89":ref:`dev-manual/new-recipe:building an autotooled package`" section 90":ref:`dev-manual/new-recipe:building an autotooled package`" section
90in the Yocto Project Development Tasks Manual. 91in the Yocto Project Development Tasks Manual.
91 92
92By default, the ``autotools*`` classes use out-of-tree builds (i.e. 93By default, the :ref:`autotools* <ref-classes-autotools>` classes use out-of-tree builds (i.e.
93``autotools.bbclass`` building with ``B != S``). 94``autotools.bbclass`` building with ``B != S``).
94 95
95If the software being built by a recipe does not support using 96If the software being built by a recipe does not support using
96out-of-tree builds, you should have the recipe inherit the 97out-of-tree builds, you should have the recipe inherit the
97``autotools-brokensep`` class. The ``autotools-brokensep`` class behaves 98:ref:`autotools-brokensep <ref-classes-autotools>` class. The :ref:`autotools-brokensep <ref-classes-autotools>` class behaves
98the same as the ``autotools`` class but builds with :term:`B` 99the same as the :ref:`ref-classes-autotools` class but builds with :term:`B`
99== :term:`S`. This method is useful when out-of-tree build 100== :term:`S`. This method is useful when out-of-tree build
100support is either not present or is broken. 101support is either not present or is broken.
101 102
@@ -105,35 +106,34 @@ support is either not present or is broken.
105 all possible. 106 all possible.
106 107
107It's useful to have some idea of how the tasks defined by the 108It's useful to have some idea of how the tasks defined by the
108``autotools*`` classes work and what they do behind the scenes. 109:ref:`autotools* <ref-classes-autotools>` classes work and what they do behind the scenes.
109 110
110- :ref:`ref-tasks-configure` - Regenerates the 111- :ref:`ref-tasks-configure` --- regenerates the
111 configure script (using ``autoreconf``) and then launches it with a 112 configure script (using ``autoreconf``) and then launches it with a
112 standard set of arguments used during cross-compilation. You can pass 113 standard set of arguments used during cross-compilation. You can pass
113 additional parameters to ``configure`` through the :term:`EXTRA_OECONF` 114 additional parameters to ``configure`` through the :term:`EXTRA_OECONF`
114 or :term:`PACKAGECONFIG_CONFARGS` 115 or :term:`PACKAGECONFIG_CONFARGS`
115 variables. 116 variables.
116 117
117- :ref:`ref-tasks-compile` - Runs ``make`` with 118- :ref:`ref-tasks-compile` --- runs ``make`` with
118 arguments that specify the compiler and linker. You can pass 119 arguments that specify the compiler and linker. You can pass
119 additional arguments through the :term:`EXTRA_OEMAKE` variable. 120 additional arguments through the :term:`EXTRA_OEMAKE` variable.
120 121
121- :ref:`ref-tasks-install` - Runs ``make install`` and 122- :ref:`ref-tasks-install` --- runs ``make install`` and
122 passes in ``${``\ :term:`D`\ ``}`` as ``DESTDIR``. 123 passes in ``${``\ :term:`D`\ ``}`` as ``DESTDIR``.
123 124
124.. _ref-classes-base: 125.. _ref-classes-base:
125 126
126``base.bbclass`` 127``base``
127================ 128========
128 129
129The ``base`` class is special in that every ``.bb`` file implicitly 130The :ref:`ref-classes-base` class is special in that every ``.bb`` file implicitly
130inherits the class. This class contains definitions for standard basic 131inherits the class. This class contains definitions for standard basic
131tasks such as fetching, unpacking, configuring (empty by default), 132tasks such as fetching, unpacking, configuring (empty by default),
132compiling (runs any ``Makefile`` present), installing (empty by default) 133compiling (runs any ``Makefile`` present), installing (empty by default)
133and packaging (empty by default). These classes are often overridden or 134and packaging (empty by default). These tasks are often overridden or
134extended by other classes such as the 135extended by other classes such as the :ref:`ref-classes-autotools` class or the
135:ref:`autotools <ref-classes-autotools>` class or the 136:ref:`ref-classes-package` class.
136:ref:`package <ref-classes-package>` class.
137 137
138The class also contains some commonly used functions such as 138The class also contains some commonly used functions such as
139``oe_runmake``, which runs ``make`` with the arguments specified in 139``oe_runmake``, which runs ``make`` with the arguments specified in
@@ -142,18 +142,18 @@ arguments passed directly to ``oe_runmake``.
142 142
143.. _ref-classes-bash-completion: 143.. _ref-classes-bash-completion:
144 144
145``bash-completion.bbclass`` 145``bash-completion``
146=========================== 146===================
147 147
148Sets up packaging and dependencies appropriate for recipes that build 148Sets up packaging and dependencies appropriate for recipes that build
149software that includes bash-completion data. 149software that includes bash-completion data.
150 150
151.. _ref-classes-bin-package: 151.. _ref-classes-bin-package:
152 152
153``bin_package.bbclass`` 153``bin_package``
154======================= 154===============
155 155
156The ``bin_package`` class is a helper class for recipes that extract the 156The :ref:`ref-classes-bin-package` class is a helper class for recipes that extract the
157contents of a binary package (e.g. an RPM) and install those contents 157contents of a binary package (e.g. an RPM) and install those contents
158rather than building the binary from source. The binary package is 158rather than building the binary from source. The binary package is
159extracted and new packages in the configured output package format are 159extracted and new packages in the configured output package format are
@@ -177,10 +177,10 @@ example use for this class.
177 177
178.. _ref-classes-binconfig: 178.. _ref-classes-binconfig:
179 179
180``binconfig.bbclass`` 180``binconfig``
181===================== 181=============
182 182
183The ``binconfig`` class helps to correct paths in shell scripts. 183The :ref:`ref-classes-binconfig` class helps to correct paths in shell scripts.
184 184
185Before ``pkg-config`` had become widespread, libraries shipped shell 185Before ``pkg-config`` had become widespread, libraries shipped shell
186scripts to give information about the libraries and include paths needed 186scripts to give information about the libraries and include paths needed
@@ -197,22 +197,21 @@ information.
197 197
198.. _ref-classes-binconfig-disabled: 198.. _ref-classes-binconfig-disabled:
199 199
200``binconfig-disabled.bbclass`` 200``binconfig-disabled``
201============================== 201======================
202 202
203An alternative version of the :ref:`binconfig <ref-classes-binconfig>` 203An alternative version of the :ref:`ref-classes-binconfig`
204class, which disables binary configuration scripts by making them return 204class, which disables binary configuration scripts by making them return
205an error in favor of using ``pkg-config`` to query the information. The 205an error in favor of using ``pkg-config`` to query the information. The
206scripts to be disabled should be specified using the 206scripts to be disabled should be specified using the :term:`BINCONFIG`
207:term:`BINCONFIG` variable within the recipe inheriting 207variable within the recipe inheriting the class.
208the class.
209 208
210.. _ref-classes-buildhistory: 209.. _ref-classes-buildhistory:
211 210
212``buildhistory.bbclass`` 211``buildhistory``
213======================== 212================
214 213
215The ``buildhistory`` class records a history of build output metadata, 214The :ref:`ref-classes-buildhistory` class records a history of build output metadata,
216which can be used to detect possible regressions as well as used for 215which can be used to detect possible regressions as well as used for
217analysis of the build output. For more information on using Build 216analysis of the build output. For more information on using Build
218History, see the 217History, see the
@@ -221,10 +220,10 @@ section in the Yocto Project Development Tasks Manual.
221 220
222.. _ref-classes-buildstats: 221.. _ref-classes-buildstats:
223 222
224``buildstats.bbclass`` 223``buildstats``
225====================== 224==============
226 225
227The ``buildstats`` class records performance statistics about each task 226The :ref:`ref-classes-buildstats` class records performance statistics about each task
228executed during the build (e.g. elapsed time, CPU usage, and I/O usage). 227executed during the build (e.g. elapsed time, CPU usage, and I/O usage).
229 228
230When you use this class, the output goes into the 229When you use this class, the output goes into the
@@ -238,23 +237,59 @@ Collecting build statistics is enabled by default through the
238:term:`USER_CLASSES` variable from your 237:term:`USER_CLASSES` variable from your
239``local.conf`` file. Consequently, you do not have to do anything to 238``local.conf`` file. Consequently, you do not have to do anything to
240enable the class. However, if you want to disable the class, simply 239enable the class. However, if you want to disable the class, simply
241remove "buildstats" from the :term:`USER_CLASSES` list. 240remove ":ref:`ref-classes-buildstats`" from the :term:`USER_CLASSES` list.
242 241
243.. _ref-classes-buildstats-summary: 242.. _ref-classes-buildstats-summary:
244 243
245``buildstats-summary.bbclass`` 244``buildstats-summary``
246============================== 245======================
247 246
248When inherited globally, prints statistics at the end of the build on 247When inherited globally, prints statistics at the end of the build on
249sstate re-use. In order to function, this class requires the 248sstate re-use. In order to function, this class requires the
250:ref:`buildstats <ref-classes-buildstats>` class be enabled. 249:ref:`ref-classes-buildstats` class be enabled.
250
251.. _ref-classes-cargo:
252
253``cargo``
254=========
255
256The :ref:`ref-classes-cargo` class allows to compile Rust language programs
257using `Cargo <https://doc.rust-lang.org/cargo/>`__. Cargo is Rust's package
258manager, allowing to fetch package dependencies and build your program.
259
260Using this class makes it very easy to build Rust programs. All you need
261is to use the :term:`SRC_URI` variable to point to a source repository
262which can be built by Cargo, typically one that was created by the
263``cargo new`` command, containing a ``Cargo.toml`` file, a ``Cargo.lock`` file and a ``src``
264subdirectory.
265
266You will find an example (that show also how to handle possible git source dependencies) in the
267:oe_git:`zvariant_3.12.0.bb </openembedded-core/tree/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb>`
268recipe. Another example, with only crate dependencies, is the
269:oe_git:`uutils-coreutils </meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils>`
270recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__
271tool.
272
273This class inherits the :ref:`ref-classes-cargo_common` class.
274
275.. _ref-classes-cargo_common:
276
277``cargo_common``
278================
279
280The :ref:`ref-classes-cargo_common` class is an internal class
281that is not intended to be used directly.
282
283An exception is the "rust" recipe, to build the Rust compiler and runtime
284library, which is built by Cargo but cannot use the :ref:`ref-classes-cargo`
285class. This is why this class was introduced.
251 286
252.. _ref-classes-ccache: 287.. _ref-classes-ccache:
253 288
254``ccache.bbclass`` 289``ccache``
255================== 290==========
256 291
257The ``ccache`` class enables the C/C++ Compiler Cache for the build. 292The :ref:`ref-classes-ccache` class enables the C/C++ Compiler Cache for the build.
258This class is used to give a minor performance boost during the build. 293This class is used to give a minor performance boost during the build.
259 294
260See https://ccache.samba.org/ for information on the C/C++ Compiler 295See https://ccache.samba.org/ for information on the C/C++ Compiler
@@ -268,45 +303,48 @@ this class is not recommended.
268 303
269.. _ref-classes-chrpath: 304.. _ref-classes-chrpath:
270 305
271``chrpath.bbclass`` 306``chrpath``
272=================== 307===========
273 308
274The ``chrpath`` class is a wrapper around the "chrpath" utility, which 309The :ref:`ref-classes-chrpath` class is a wrapper around the "chrpath" utility, which
275is used during the build process for ``nativesdk``, ``cross``, and 310is used during the build process for :ref:`ref-classes-nativesdk`, :ref:`ref-classes-cross`, and
276``cross-canadian`` recipes to change ``RPATH`` records within binaries 311:ref:`ref-classes-cross-canadian` recipes to change ``RPATH`` records within binaries
277in order to make them relocatable. 312in order to make them relocatable.
278 313
279.. _ref-classes-cmake: 314.. _ref-classes-cmake:
280 315
281``cmake.bbclass`` 316``cmake``
282================= 317=========
283 318
284The ``cmake`` class allows for recipes that need to build software using 319The :ref:`ref-classes-cmake` class allows recipes to build software using the
285the `CMake <https://cmake.org/overview/>`__ build system. You can use 320`CMake <https://cmake.org/overview/>`__ build system. You can use the
286the :term:`EXTRA_OECMAKE` variable to specify 321:term:`EXTRA_OECMAKE` variable to specify additional configuration options to
287additional configuration options to be passed using the ``cmake`` 322pass to the ``cmake`` command line.
288command line. 323
324By default, the :ref:`ref-classes-cmake` class uses
325`Ninja <https://ninja-build.org/>`__ instead of GNU make for building, which
326offers better build performance. If a recipe is broken with Ninja, then the
327recipe can set the :term:`OECMAKE_GENERATOR` variable to ``Unix Makefiles`` to
328use GNU make instead.
289 329
290On the occasion that you would be installing custom CMake toolchain 330If you need to install custom CMake toolchain files supplied by the application
291files supplied by the application being built, you should install them 331being built, you should install them (during :ref:`ref-tasks-install`) to the
292to the preferred CMake Module directory: ``${D}${datadir}/cmake/`` 332preferred CMake Module directory: ``${D}${datadir}/cmake/modules/``.
293Modules during
294:ref:`ref-tasks-install`.
295 333
296.. _ref-classes-cml1: 334.. _ref-classes-cml1:
297 335
298``cml1.bbclass`` 336``cml1``
299================ 337========
300 338
301The ``cml1`` class provides basic support for the Linux kernel style 339The :ref:`ref-classes-cml1` class provides basic support for the Linux kernel style
302build configuration system. "cml" stands for "Configuration Menu Language", which 340build configuration system. "cml" stands for "Configuration Menu Language", which
303originates from the Linux kernel but is also used in other projects such as U-Boot 341originates from the Linux kernel but is also used in other projects such as U-Boot
304and BusyBox. It could have been called "kconfig" too. 342and BusyBox. It could have been called "kconfig" too.
305 343
306.. _ref-classes-compress_doc: 344.. _ref-classes-compress_doc:
307 345
308``compress_doc.bbclass`` 346``compress_doc``
309======================== 347================
310 348
311Enables compression for man pages and info pages. This class is intended 349Enables compression for man pages and info pages. This class is intended
312to be inherited globally. The default compression mechanism is gz (gzip) 350to be inherited globally. The default compression mechanism is gz (gzip)
@@ -315,39 +353,39 @@ but you can select an alternative mechanism by setting the
315 353
316.. _ref-classes-copyleft_compliance: 354.. _ref-classes-copyleft_compliance:
317 355
318``copyleft_compliance.bbclass`` 356``copyleft_compliance``
319=============================== 357=======================
320 358
321The ``copyleft_compliance`` class preserves source code for the purposes 359The :ref:`ref-classes-copyleft_compliance` class preserves source code for the purposes
322of license compliance. This class is an alternative to the ``archiver`` 360of license compliance. This class is an alternative to the :ref:`ref-classes-archiver`
323class and is still used by some users even though it has been deprecated 361class and is still used by some users even though it has been deprecated
324in favor of the :ref:`archiver <ref-classes-archiver>` class. 362in favor of the :ref:`ref-classes-archiver` class.
325 363
326.. _ref-classes-copyleft_filter: 364.. _ref-classes-copyleft_filter:
327 365
328``copyleft_filter.bbclass`` 366``copyleft_filter``
329=========================== 367===================
330 368
331A class used by the :ref:`archiver <ref-classes-archiver>` and 369A class used by the :ref:`ref-classes-archiver` and
332:ref:`copyleft_compliance <ref-classes-copyleft_compliance>` classes 370:ref:`ref-classes-copyleft_compliance` classes
333for filtering licenses. The ``copyleft_filter`` class is an internal 371for filtering licenses. The ``copyleft_filter`` class is an internal
334class and is not intended to be used directly. 372class and is not intended to be used directly.
335 373
336.. _ref-classes-core-image: 374.. _ref-classes-core-image:
337 375
338``core-image.bbclass`` 376``core-image``
339====================== 377==============
340 378
341The ``core-image`` class provides common definitions for the 379The :ref:`ref-classes-core-image` class provides common definitions for the
342``core-image-*`` image recipes, such as support for additional 380``core-image-*`` image recipes, such as support for additional
343:term:`IMAGE_FEATURES`. 381:term:`IMAGE_FEATURES`.
344 382
345.. _ref-classes-cpan: 383.. _ref-classes-cpan:
346 384
347``cpan*.bbclass`` 385``cpan*``
348================= 386=========
349 387
350The ``cpan*`` classes support Perl modules. 388The :ref:`cpan* <ref-classes-cpan>` classes support Perl modules.
351 389
352Recipes for Perl modules are simple. These recipes usually only need to 390Recipes for Perl modules are simple. These recipes usually only need to
353point to the source's archive and then inherit the proper class file. 391point to the source's archive and then inherit the proper class file.
@@ -360,15 +398,15 @@ authors used.
360- Modules that use ``Build.PL``-based build system require using 398- Modules that use ``Build.PL``-based build system require using
361 ``cpan_build.bbclass`` in their recipes. 399 ``cpan_build.bbclass`` in their recipes.
362 400
363Both build methods inherit the ``cpan-base`` class for basic Perl 401Both build methods inherit the :ref:`cpan-base <ref-classes-cpan>` class for basic Perl
364support. 402support.
365 403
366.. _ref-classes-create-spdx: 404.. _ref-classes-create-spdx:
367 405
368``create-spdx.bbclass`` 406``create-spdx``
369======================= 407===============
370 408
371The :ref:`create-spdx <ref-classes-create-spdx>` class provides support for 409The :ref:`ref-classes-create-spdx` class provides support for
372automatically creating :term:`SPDX` :term:`SBOM` documents based upon image 410automatically creating :term:`SPDX` :term:`SBOM` documents based upon image
373and SDK contents. 411and SDK contents.
374 412
@@ -391,18 +429,18 @@ section in the Yocto Project Development Manual for more details.
391 429
392.. _ref-classes-cross: 430.. _ref-classes-cross:
393 431
394``cross.bbclass`` 432``cross``
395================= 433=========
396 434
397The ``cross`` class provides support for the recipes that build the 435The :ref:`ref-classes-cross` class provides support for the recipes that build the
398cross-compilation tools. 436cross-compilation tools.
399 437
400.. _ref-classes-cross-canadian: 438.. _ref-classes-cross-canadian:
401 439
402``cross-canadian.bbclass`` 440``cross-canadian``
403========================== 441==================
404 442
405The ``cross-canadian`` class provides support for the recipes that build 443The :ref:`ref-classes-cross-canadian` class provides support for the recipes that build
406the Canadian Cross-compilation tools for SDKs. See the 444the Canadian Cross-compilation tools for SDKs. See the
407":ref:`overview-manual/concepts:cross-development toolchain generation`" 445":ref:`overview-manual/concepts:cross-development toolchain generation`"
408section in the Yocto Project Overview and Concepts Manual for more 446section in the Yocto Project Overview and Concepts Manual for more
@@ -410,10 +448,10 @@ discussion on these cross-compilation tools.
410 448
411.. _ref-classes-crosssdk: 449.. _ref-classes-crosssdk:
412 450
413``crosssdk.bbclass`` 451``crosssdk``
414==================== 452============
415 453
416The ``crosssdk`` class provides support for the recipes that build the 454The :ref:`ref-classes-crosssdk` class provides support for the recipes that build the
417cross-compilation tools used for building SDKs. See the 455cross-compilation tools used for building SDKs. See the
418":ref:`overview-manual/concepts:cross-development toolchain generation`" 456":ref:`overview-manual/concepts:cross-development toolchain generation`"
419section in the Yocto Project Overview and Concepts Manual for more 457section in the Yocto Project Overview and Concepts Manual for more
@@ -421,10 +459,10 @@ discussion on these cross-compilation tools.
421 459
422.. _ref-classes-cve-check: 460.. _ref-classes-cve-check:
423 461
424``cve-check.bbclass`` 462``cve-check``
425===================== 463=============
426 464
427The :ref:`cve-check <ref-classes-cve-check>` class looks for known CVEs (Common Vulnerabilities 465The :ref:`ref-classes-cve-check` class looks for known CVEs (Common Vulnerabilities
428and Exposures) while building with BitBake. This class is meant to be 466and Exposures) while building with BitBake. This class is meant to be
429inherited globally from a configuration file:: 467inherited globally from a configuration file::
430 468
@@ -485,10 +523,10 @@ section in the Development Tasks Manual.
485 523
486.. _ref-classes-debian: 524.. _ref-classes-debian:
487 525
488``debian.bbclass`` 526``debian``
489================== 527==========
490 528
491The ``debian`` class renames output packages so that they follow the 529The :ref:`ref-classes-debian` class renames output packages so that they follow the
492Debian naming policy (i.e. ``glibc`` becomes ``libc6`` and 530Debian naming policy (i.e. ``glibc`` becomes ``libc6`` and
493``glibc-devel`` becomes ``libc6-dev``.) Renaming includes the library 531``glibc-devel`` becomes ``libc6-dev``.) Renaming includes the library
494name and version as part of the package name. 532name and version as part of the package name.
@@ -500,10 +538,10 @@ naming scheme.
500 538
501.. _ref-classes-deploy: 539.. _ref-classes-deploy:
502 540
503``deploy.bbclass`` 541``deploy``
504================== 542==========
505 543
506The ``deploy`` class handles deploying files to the 544The :ref:`ref-classes-deploy` class handles deploying files to the
507:term:`DEPLOY_DIR_IMAGE` directory. The main 545:term:`DEPLOY_DIR_IMAGE` directory. The main
508function of this class is to allow the deploy step to be accelerated by 546function of this class is to allow the deploy step to be accelerated by
509shared state. Recipes that inherit this class should define their own 547shared state. Recipes that inherit this class should define their own
@@ -514,10 +552,56 @@ add the task at the appropriate place, which is usually after
514:ref:`ref-tasks-install`. The class then takes care of 552:ref:`ref-tasks-install`. The class then takes care of
515staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`. 553staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`.
516 554
555.. _ref-classes-devicetree:
556
557``devicetree``
558==============
559
560The :ref:`ref-classes-devicetree` class allows to build a recipe that compiles
561device tree source files that are not in the kernel tree.
562
563The compilation of out-of-tree device tree sources is the same as the kernel
564in-tree device tree compilation process. This includes the ability to include
565sources from the kernel such as SoC ``dtsi`` files as well as C header files,
566such as ``gpio.h``.
567
568The :ref:`ref-tasks-compile` task will compile two kinds of files:
569
570- Regular device tree sources with a ``.dts`` extension.
571
572- Device tree overlays, detected from the presence of the ``/plugin/;``
573 string in the file contents.
574
575This class deploys the generated device tree binaries into
576``${``\ :term:`DEPLOY_DIR_IMAGE`\ ``}/devicetree/``. This is similar to
577what the :ref:`ref-classes-kernel-devicetree` class does, with the added
578``devicetree`` subdirectory to avoid name clashes. Additionally, the device
579trees are populated into the sysroot for access via the sysroot from within
580other recipes.
581
582By default, all device tree sources located in :term:`DT_FILES_PATH` directory
583are compiled.
584
585An extra padding is appended to non-overlay device trees binaries. This
586can typically be used as extra space for adding extra properties at boot time.
587The padding size can be modified by setting :term:`DT_PADDING_SIZE`
588to the desired size, in bytes.
589
590See :oe_git:`devicetree.bbclass sources
591</openembedded-core/tree/meta/classes-recipe/devicetree.bbclass>`
592for further variables controlling this class.
593
594Here is an excerpt of an example ``recipes-kernel/linux/devicetree-acme.bb``
595recipe inheriting this class::
596
597 inherit devicetree
598 COMPATIBLE_MACHINE = "^mymachine$"
599 SRC_URI:mymachine = "file://mymachine.dts"
600
517.. _ref-classes-devshell: 601.. _ref-classes-devshell:
518 602
519``devshell.bbclass`` 603``devshell``
520==================== 604============
521 605
522The :ref:`ref-classes-devshell` class adds the :ref:`ref-tasks-devshell` task. Distribution 606The :ref:`ref-classes-devshell` class adds the :ref:`ref-tasks-devshell` task. Distribution
523policy dictates whether to include this class. See the ":ref:`dev-manual/development-shell:using a development shell`" 607policy dictates whether to include this class. See the ":ref:`dev-manual/development-shell:using a development shell`"
@@ -526,10 +610,10 @@ information about using :ref:`ref-classes-devshell`.
526 610
527.. _ref-classes-devupstream: 611.. _ref-classes-devupstream:
528 612
529``devupstream.bbclass`` 613``devupstream``
530======================= 614===============
531 615
532The ``devupstream`` class uses 616The :ref:`ref-classes-devupstream` class uses
533:term:`BBCLASSEXTEND` to add a variant of the 617:term:`BBCLASSEXTEND` to add a variant of the
534recipe that fetches from an alternative URI (e.g. Git) instead of a 618recipe that fetches from an alternative URI (e.g. Git) instead of a
535tarball. Following is an example:: 619tarball. Following is an example::
@@ -551,10 +635,10 @@ Any development-specific adjustments can be done by using the
551 635
552The class 636The class
553currently only supports creating a development variant of the target 637currently only supports creating a development variant of the target
554recipe, not ``native`` or ``nativesdk`` variants. 638recipe, not :ref:`ref-classes-native` or :ref:`ref-classes-nativesdk` variants.
555 639
556The :term:`BBCLASSEXTEND` syntax (i.e. ``devupstream:target``) provides 640The :term:`BBCLASSEXTEND` syntax (i.e. ``devupstream:target``) provides
557support for ``native`` and ``nativesdk`` variants. Consequently, this 641support for :ref:`ref-classes-native` and :ref:`ref-classes-nativesdk` variants. Consequently, this
558functionality can be added in a future release. 642functionality can be added in a future release.
559 643
560Support for other version control systems such as Subversion is limited 644Support for other version control systems such as Subversion is limited
@@ -563,10 +647,10 @@ due to BitBake's automatic fetch dependencies (e.g.
563 647
564.. _ref-classes-externalsrc: 648.. _ref-classes-externalsrc:
565 649
566``externalsrc.bbclass`` 650``externalsrc``
567======================= 651===============
568 652
569The ``externalsrc`` class supports building software from source code 653The :ref:`ref-classes-externalsrc` class supports building software from source code
570that is external to the OpenEmbedded build system. Building software 654that is external to the OpenEmbedded build system. Building software
571from an external source tree means that the build system's normal fetch, 655from an external source tree means that the build system's normal fetch,
572unpack, and patch process is not used. 656unpack, and patch process is not used.
@@ -574,9 +658,8 @@ unpack, and patch process is not used.
574By default, the OpenEmbedded build system uses the :term:`S` 658By default, the OpenEmbedded build system uses the :term:`S`
575and :term:`B` variables to locate unpacked recipe source code 659and :term:`B` variables to locate unpacked recipe source code
576and to build it, respectively. When your recipe inherits the 660and to build it, respectively. When your recipe inherits the
577``externalsrc`` class, you use the 661:ref:`ref-classes-externalsrc` class, you use the
578:term:`EXTERNALSRC` and 662:term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` variables to
579:term:`EXTERNALSRC_BUILD` variables to
580ultimately define :term:`S` and :term:`B`. 663ultimately define :term:`S` and :term:`B`.
581 664
582By default, this class expects the source code to support recipe builds 665By default, this class expects the source code to support recipe builds
@@ -591,7 +674,7 @@ See these variables for more information:
591:term:`WORKDIR`, :term:`BPN`, and 674:term:`WORKDIR`, :term:`BPN`, and
592:term:`PV`, 675:term:`PV`,
593 676
594For more information on the ``externalsrc`` class, see the comments in 677For more information on the :ref:`ref-classes-externalsrc` class, see the comments in
595``meta/classes/externalsrc.bbclass`` in the :term:`Source Directory`. 678``meta/classes/externalsrc.bbclass`` in the :term:`Source Directory`.
596For information on how to use the :ref:`ref-classes-externalsrc` class, see the 679For information on how to use the :ref:`ref-classes-externalsrc` class, see the
597":ref:`dev-manual/building:building software from an external source`" 680":ref:`dev-manual/building:building software from an external source`"
@@ -599,10 +682,10 @@ section in the Yocto Project Development Tasks Manual.
599 682
600.. _ref-classes-extrausers: 683.. _ref-classes-extrausers:
601 684
602``extrausers.bbclass`` 685``extrausers``
603====================== 686==============
604 687
605The ``extrausers`` class allows additional user and group configuration 688The :ref:`ref-classes-extrausers` class allows additional user and group configuration
606to be applied at the image level. Inheriting this class either globally 689to be applied at the image level. Inheriting this class either globally
607or from an image recipe allows additional user and group operations to 690or from an image recipe allows additional user and group operations to
608be performed using the 691be performed using the
@@ -610,13 +693,11 @@ be performed using the
610 693
611.. note:: 694.. note::
612 695
613 The user and group operations added using the 696 The user and group operations added using the :ref:`ref-classes-extrausers`
614 :ref:`extrausers <ref-classes-extrausers>`
615 class are not tied to a specific recipe outside of the recipe for the 697 class are not tied to a specific recipe outside of the recipe for the
616 image. Thus, the operations can be performed across the image as a 698 image. Thus, the operations can be performed across the image as a
617 whole. Use the 699 whole. Use the :ref:`ref-classes-useradd` class to add user and group
618 :ref:`useradd <ref-classes-useradd>` 700 configuration to a specific recipe.
619 class to add user and group configuration to a specific recipe.
620 701
621Here is an example that uses this class in an image recipe:: 702Here is an example that uses this class in an image recipe::
622 703
@@ -654,19 +735,19 @@ Finally, here is an example that sets the root password::
654.. note:: 735.. note::
655 736
656 From a security perspective, hardcoding a default password is not 737 From a security perspective, hardcoding a default password is not
657 generally a good idea or even legal in some jurisdictions. It is 738 generally a good idea or even legal in some jurisdictions. It is
658 recommended that you do not do this if you are building a production 739 recommended that you do not do this if you are building a production
659 image. 740 image.
660 741
661 742
662.. _ref-classes-features_check: 743.. _ref-classes-features_check:
663 744
664``features_check.bbclass`` 745``features_check``
665================================= 746==================
666 747
667The ``features_check`` class allows individual recipes to check 748The :ref:`ref-classes-features_check` class allows individual recipes to check
668for required and conflicting 749for required and conflicting :term:`DISTRO_FEATURES`, :term:`MACHINE_FEATURES`
669:term:`DISTRO_FEATURES`, :term:`MACHINE_FEATURES` or :term:`COMBINED_FEATURES`. 750or :term:`COMBINED_FEATURES`.
670 751
671This class provides support for the following variables: 752This class provides support for the following variables:
672 753
@@ -687,10 +768,10 @@ triggered.
687 768
688.. _ref-classes-fontcache: 769.. _ref-classes-fontcache:
689 770
690``fontcache.bbclass`` 771``fontcache``
691===================== 772=============
692 773
693The ``fontcache`` class generates the proper post-install and 774The :ref:`ref-classes-fontcache` class generates the proper post-install and
694post-remove (postinst and postrm) scriptlets for font packages. These 775post-remove (postinst and postrm) scriptlets for font packages. These
695scriptlets call ``fc-cache`` (part of ``Fontconfig``) to add the fonts 776scriptlets call ``fc-cache`` (part of ``Fontconfig``) to add the fonts
696to the font information cache. Since the cache files are 777to the font information cache. Since the cache files are
@@ -703,20 +784,20 @@ packages containing the fonts.
703 784
704.. _ref-classes-fs-uuid: 785.. _ref-classes-fs-uuid:
705 786
706``fs-uuid.bbclass`` 787``fs-uuid``
707=================== 788===========
708 789
709The ``fs-uuid`` class extracts UUID from 790The :ref:`ref-classes-fs-uuid` class extracts UUID from
710``${``\ :term:`ROOTFS`\ ``}``, which must have been built 791``${``\ :term:`ROOTFS`\ ``}``, which must have been built
711by the time that this function gets called. The ``fs-uuid`` class only 792by the time that this function gets called. The :ref:`ref-classes-fs-uuid` class only
712works on ``ext`` file systems and depends on ``tune2fs``. 793works on ``ext`` file systems and depends on ``tune2fs``.
713 794
714.. _ref-classes-gconf: 795.. _ref-classes-gconf:
715 796
716``gconf.bbclass`` 797``gconf``
717================= 798=========
718 799
719The ``gconf`` class provides common functionality for recipes that need 800The :ref:`ref-classes-gconf` class provides common functionality for recipes that need
720to install GConf schemas. The schemas will be put into a separate 801to install GConf schemas. The schemas will be put into a separate
721package (``${``\ :term:`PN`\ ``}-gconf``) that is created 802package (``${``\ :term:`PN`\ ``}-gconf``) that is created
722automatically when this class is inherited. This package uses the 803automatically when this class is inherited. This package uses the
@@ -725,29 +806,52 @@ register and unregister the schemas in the target image.
725 806
726.. _ref-classes-gettext: 807.. _ref-classes-gettext:
727 808
728``gettext.bbclass`` 809``gettext``
729=================== 810===========
730 811
731The ``gettext`` class provides support for building software that uses 812The :ref:`ref-classes-gettext` class provides support for building
732the GNU ``gettext`` internationalization and localization system. All 813software that uses the GNU ``gettext`` internationalization and localization
733recipes building software that use ``gettext`` should inherit this 814system. All recipes building software that use ``gettext`` should inherit this
734class. 815class.
735 816
736.. _ref-classes-gnomebase: 817.. _ref-classes-gnomebase:
737 818
738``gnomebase.bbclass`` 819``gnomebase``
739===================== 820=============
740 821
741The ``gnomebase`` class is the base class for recipes that build 822The :ref:`ref-classes-gnomebase` class is the base class for recipes that build
742software from the GNOME stack. This class sets 823software from the GNOME stack. This class sets
743:term:`SRC_URI` to download the source from the GNOME 824:term:`SRC_URI` to download the source from the GNOME
744mirrors as well as extending :term:`FILES` with the typical 825mirrors as well as extending :term:`FILES` with the typical
745GNOME installation paths. 826GNOME installation paths.
746 827
828.. _ref-classes-go:
829
830``go``
831======
832
833The :ref:`ref-classes-go` class supports building Go programs. The behavior of
834this class is controlled by the mandatory :term:`GO_IMPORT` variable, and
835by the optional :term:`GO_INSTALL` and :term:`GO_INSTALL_FILTEROUT` ones.
836
837To build a Go program with the Yocto Project, you can use the
838:yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
839recipe as an example.
840
841.. _ref-classes-go-mod:
842
843``go-mod``
844==========
845
846The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the
847:ref:`ref-classes-go` class.
848
849See the associated :term:`GO_WORKDIR` variable.
850
747.. _ref-classes-gobject-introspection: 851.. _ref-classes-gobject-introspection:
748 852
749``gobject-introspection.bbclass`` 853``gobject-introspection``
750================================= 854=========================
751 855
752Provides support for recipes building software that supports GObject 856Provides support for recipes building software that supports GObject
753introspection. This functionality is only enabled if the 857introspection. This functionality is only enabled if the
@@ -758,16 +862,17 @@ introspection. This functionality is only enabled if the
758 862
759.. note:: 863.. note::
760 864
761 This functionality is backfilled by default and, if not applicable, 865 This functionality is :ref:`backfilled <ref-features-backfill>` by default
762 should be disabled through :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` or 866 and, if not applicable, should be disabled through
867 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` or
763 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`, respectively. 868 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`, respectively.
764 869
765.. _ref-classes-grub-efi: 870.. _ref-classes-grub-efi:
766 871
767``grub-efi.bbclass`` 872``grub-efi``
768==================== 873============
769 874
770The ``grub-efi`` class provides ``grub-efi``-specific functions for 875The :ref:`ref-classes-grub-efi` class provides ``grub-efi``-specific functions for
771building bootable images. 876building bootable images.
772 877
773This class supports several variables: 878This class supports several variables:
@@ -796,10 +901,10 @@ This class supports several variables:
796 901
797.. _ref-classes-gsettings: 902.. _ref-classes-gsettings:
798 903
799``gsettings.bbclass`` 904``gsettings``
800===================== 905=============
801 906
802The ``gsettings`` class provides common functionality for recipes that 907The :ref:`ref-classes-gsettings` class provides common functionality for recipes that
803need to install GSettings (glib) schemas. The schemas are assumed to be 908need to install GSettings (glib) schemas. The schemas are assumed to be
804part of the main package. Appropriate post-install and post-remove 909part of the main package. Appropriate post-install and post-remove
805(postinst/postrm) scriptlets are added to register and unregister the 910(postinst/postrm) scriptlets are added to register and unregister the
@@ -807,18 +912,18 @@ schemas in the target image.
807 912
808.. _ref-classes-gtk-doc: 913.. _ref-classes-gtk-doc:
809 914
810``gtk-doc.bbclass`` 915``gtk-doc``
811=================== 916===========
812 917
813The ``gtk-doc`` class is a helper class to pull in the appropriate 918The :ref:`ref-classes-gtk-doc` class is a helper class to pull in the appropriate
814``gtk-doc`` dependencies and disable ``gtk-doc``. 919``gtk-doc`` dependencies and disable ``gtk-doc``.
815 920
816.. _ref-classes-gtk-icon-cache: 921.. _ref-classes-gtk-icon-cache:
817 922
818``gtk-icon-cache.bbclass`` 923``gtk-icon-cache``
819========================== 924==================
820 925
821The ``gtk-icon-cache`` class generates the proper post-install and 926The :ref:`ref-classes-gtk-icon-cache` class generates the proper post-install and
822post-remove (postinst/postrm) scriptlets for packages that use GTK+ and 927post-remove (postinst/postrm) scriptlets for packages that use GTK+ and
823install icons. These scriptlets call ``gtk-update-icon-cache`` to add 928install icons. These scriptlets call ``gtk-update-icon-cache`` to add
824the fonts to GTK+'s icon cache. Since the cache files are 929the fonts to GTK+'s icon cache. Since the cache files are
@@ -828,10 +933,10 @@ creation.
828 933
829.. _ref-classes-gtk-immodules-cache: 934.. _ref-classes-gtk-immodules-cache:
830 935
831``gtk-immodules-cache.bbclass`` 936``gtk-immodules-cache``
832=============================== 937=======================
833 938
834The ``gtk-immodules-cache`` class generates the proper post-install and 939The :ref:`ref-classes-gtk-immodules-cache` class generates the proper post-install and
835post-remove (postinst/postrm) scriptlets for packages that install GTK+ 940post-remove (postinst/postrm) scriptlets for packages that install GTK+
836input method modules for virtual keyboards. These scriptlets call 941input method modules for virtual keyboards. These scriptlets call
837``gtk-update-icon-cache`` to add the input method modules to the cache. 942``gtk-update-icon-cache`` to add the input method modules to the cache.
@@ -846,19 +951,19 @@ the packages containing the modules.
846 951
847.. _ref-classes-gzipnative: 952.. _ref-classes-gzipnative:
848 953
849``gzipnative.bbclass`` 954``gzipnative``
850====================== 955==============
851 956
852The ``gzipnative`` class enables the use of different native versions of 957The :ref:`ref-classes-gzipnative` class enables the use of different native versions of
853``gzip`` and ``pigz`` rather than the versions of these tools from the 958``gzip`` and ``pigz`` rather than the versions of these tools from the
854build host. 959build host.
855 960
856.. _ref-classes-icecc: 961.. _ref-classes-icecc:
857 962
858``icecc.bbclass`` 963``icecc``
859================= 964=========
860 965
861The ``icecc`` class supports 966The :ref:`ref-classes-icecc` class supports
862`Icecream <https://github.com/icecc/icecream>`__, which facilitates 967`Icecream <https://github.com/icecc/icecream>`__, which facilitates
863taking compile jobs and distributing them among remote machines. 968taking compile jobs and distributing them among remote machines.
864 969
@@ -866,7 +971,7 @@ The class stages directories with symlinks from ``gcc`` and ``g++`` to
866``icecc``, for both native and cross compilers. Depending on each 971``icecc``, for both native and cross compilers. Depending on each
867configure or compile, the OpenEmbedded build system adds the directories 972configure or compile, the OpenEmbedded build system adds the directories
868at the head of the ``PATH`` list and then sets the ``ICECC_CXX`` and 973at the head of the ``PATH`` list and then sets the ``ICECC_CXX`` and
869``ICEC_CC`` variables, which are the paths to the ``g++`` and ``gcc`` 974``ICECC_CC`` variables, which are the paths to the ``g++`` and ``gcc``
870compilers, respectively. 975compilers, respectively.
871 976
872For the cross compiler, the class creates a ``tar.gz`` file that 977For the cross compiler, the class creates a ``tar.gz`` file that
@@ -874,8 +979,8 @@ contains the Yocto Project toolchain and sets ``ICECC_VERSION``, which
874is the version of the cross-compiler used in the cross-development 979is the version of the cross-compiler used in the cross-development
875toolchain, accordingly. 980toolchain, accordingly.
876 981
877The class handles all three different compile stages (i.e native 982The class handles all three different compile stages (i.e native,
878,cross-kernel and target) and creates the necessary environment 983cross-kernel and target) and creates the necessary environment
879``tar.gz`` file to be used by the remote machines. The class also 984``tar.gz`` file to be used by the remote machines. The class also
880supports SDK generation. 985supports SDK generation.
881 986
@@ -885,12 +990,13 @@ using ``which``. If :term:`ICECC_ENV_EXEC` is set
885in your ``local.conf`` file, the variable should point to the 990in your ``local.conf`` file, the variable should point to the
886``icecc-create-env`` script provided by the user. If you do not point to 991``icecc-create-env`` script provided by the user. If you do not point to
887a user-provided script, the build system uses the default script 992a user-provided script, the build system uses the default script
888provided by the recipe ``icecc-create-env-native.bb``. 993provided by the recipe :oe_git:`icecc-create-env_0.1.bb
994</openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>`.
889 995
890.. note:: 996.. note::
891 997
892 This script is a modified version and not the one that comes with 998 This script is a modified version and not the one that comes with
893 icecc. 999 ``icecream``.
894 1000
895If you do not want the Icecream distributed compile support to apply to 1001If you do not want the Icecream distributed compile support to apply to
896specific recipes or classes, you can ask them to be ignored by Icecream 1002specific recipes or classes, you can ask them to be ignored by Icecream
@@ -905,13 +1011,13 @@ Additionally, you can list recipes using the
905your ``local.conf`` file to force ``icecc`` to be enabled for recipes 1011your ``local.conf`` file to force ``icecc`` to be enabled for recipes
906using an empty :term:`PARALLEL_MAKE` variable. 1012using an empty :term:`PARALLEL_MAKE` variable.
907 1013
908Inheriting the ``icecc`` class changes all sstate signatures. 1014Inheriting the :ref:`ref-classes-icecc` class changes all sstate signatures.
909Consequently, if a development team has a dedicated build system that 1015Consequently, if a development team has a dedicated build system that
910populates :term:`SSTATE_MIRRORS` and they want to 1016populates :term:`SSTATE_MIRRORS` and they want to
911reuse sstate from :term:`SSTATE_MIRRORS`, then all developers and the build 1017reuse sstate from :term:`SSTATE_MIRRORS`, then all developers and the build
912system need to either inherit the ``icecc`` class or nobody should. 1018system need to either inherit the :ref:`ref-classes-icecc` class or nobody should.
913 1019
914At the distribution level, you can inherit the ``icecc`` class to be 1020At the distribution level, you can inherit the :ref:`ref-classes-icecc` class to be
915sure that all builders start with the same sstate signatures. After 1021sure that all builders start with the same sstate signatures. After
916inheriting the class, you can then disable the feature by setting the 1022inheriting the class, you can then disable the feature by setting the
917:term:`ICECC_DISABLED` variable to "1" as follows:: 1023:term:`ICECC_DISABLED` variable to "1" as follows::
@@ -928,10 +1034,10 @@ individually as follows in your ``local.conf`` file::
928 1034
929.. _ref-classes-image: 1035.. _ref-classes-image:
930 1036
931``image.bbclass`` 1037``image``
932================= 1038=========
933 1039
934The ``image`` class helps support creating images in different formats. 1040The :ref:`ref-classes-image` class helps support creating images in different formats.
935First, the root filesystem is created from packages using one of the 1041First, the root filesystem is created from packages using one of the
936``rootfs*.bbclass`` files (depending on the package format used) and 1042``rootfs*.bbclass`` files (depending on the package format used) and
937then one or more image files are created. 1043then one or more image files are created.
@@ -951,25 +1057,25 @@ Yocto Project Overview and Concepts Manual.
951 1057
952.. _ref-classes-image-buildinfo: 1058.. _ref-classes-image-buildinfo:
953 1059
954``image-buildinfo.bbclass`` 1060``image-buildinfo``
955=========================== 1061===================
956 1062
957The ``image-buildinfo`` class writes information to the target 1063The :ref:`ref-classes-image-buildinfo` class writes information to the target
958filesystem on ``/etc/build``. 1064filesystem on ``/etc/build``.
959 1065
960.. _ref-classes-image_types: 1066.. _ref-classes-image_types:
961 1067
962``image_types.bbclass`` 1068``image_types``
963======================= 1069===============
964 1070
965The ``image_types`` class defines all of the standard image output types 1071The :ref:`ref-classes-image_types` class defines all of the standard image output types
966that you can enable through the 1072that you can enable through the
967:term:`IMAGE_FSTYPES` variable. You can use this 1073:term:`IMAGE_FSTYPES` variable. You can use this
968class as a reference on how to add support for custom image output 1074class as a reference on how to add support for custom image output
969types. 1075types.
970 1076
971By default, the :ref:`image <ref-classes-image>` class automatically 1077By default, the :ref:`ref-classes-image` class automatically
972enables the ``image_types`` class. The ``image`` class uses the 1078enables the :ref:`ref-classes-image_types` class. The :ref:`ref-classes-image` class uses the
973``IMGCLASSES`` variable as follows:: 1079``IMGCLASSES`` variable as follows::
974 1080
975 IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" 1081 IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}"
@@ -981,7 +1087,7 @@ enables the ``image_types`` class. The ``image`` class uses the
981 IMGCLASSES += "image-postinst-intercepts" 1087 IMGCLASSES += "image-postinst-intercepts"
982 inherit ${IMGCLASSES} 1088 inherit ${IMGCLASSES}
983 1089
984The ``image_types`` class also handles conversion and compression of images. 1090The :ref:`ref-classes-image_types` class also handles conversion and compression of images.
985 1091
986.. note:: 1092.. note::
987 1093
@@ -991,8 +1097,8 @@ The ``image_types`` class also handles conversion and compression of images.
991 1097
992.. _ref-classes-image-live: 1098.. _ref-classes-image-live:
993 1099
994``image-live.bbclass`` 1100``image-live``
995====================== 1101==============
996 1102
997This class controls building "live" (i.e. HDDIMG and ISO) images. Live 1103This class controls building "live" (i.e. HDDIMG and ISO) images. Live
998images contain syslinux for legacy booting, as well as the bootloader 1104images contain syslinux for legacy booting, as well as the bootloader
@@ -1004,10 +1110,10 @@ Normally, you do not use this class directly. Instead, you add "live" to
1004 1110
1005.. _ref-classes-insane: 1111.. _ref-classes-insane:
1006 1112
1007``insane.bbclass`` 1113``insane``
1008================== 1114==========
1009 1115
1010The ``insane`` class adds a step to the package generation process so 1116The :ref:`ref-classes-insane` class adds a step to the package generation process so
1011that output quality assurance checks are generated by the OpenEmbedded 1117that output quality assurance checks are generated by the OpenEmbedded
1012build system. A range of checks are performed that check the build's 1118build system. A range of checks are performed that check the build's
1013output for common problems that show up during runtime. Distribution 1119output for common problems that show up during runtime. Distribution
@@ -1053,8 +1159,8 @@ Here are the tests you can list with the :term:`WARN_QA` and
1053 software, like bootloaders, might need to bypass this check. 1159 software, like bootloaders, might need to bypass this check.
1054 1160
1055- ``buildpaths:`` Checks for paths to locations on the build host 1161- ``buildpaths:`` Checks for paths to locations on the build host
1056 inside the output files. Currently, this test triggers too many false 1162 inside the output files. Not only can these leak information about
1057 positives and thus is not normally enabled. 1163 the build environment, they also hinder binary reproducibility.
1058 1164
1059- ``build-deps:`` Determines if a build-time dependency that is 1165- ``build-deps:`` Determines if a build-time dependency that is
1060 specified through :term:`DEPENDS`, explicit 1166 specified through :term:`DEPENDS`, explicit
@@ -1067,7 +1173,7 @@ Here are the tests you can list with the :term:`WARN_QA` and
1067 the package is installed into the image during the 1173 the package is installed into the image during the
1068 :ref:`ref-tasks-rootfs` task because the auto-detected 1174 :ref:`ref-tasks-rootfs` task because the auto-detected
1069 dependency was not satisfied. An example of this would be where the 1175 dependency was not satisfied. An example of this would be where the
1070 :ref:`update-rc.d <ref-classes-update-rc.d>` class automatically 1176 :ref:`ref-classes-update-rc.d` class automatically
1071 adds a dependency on the ``initscripts-functions`` package to 1177 adds a dependency on the ``initscripts-functions`` package to
1072 packages that install an initscript that refers to 1178 packages that install an initscript that refers to
1073 ``/etc/init.d/functions``. The recipe should really have an explicit 1179 ``/etc/init.d/functions``. The recipe should really have an explicit
@@ -1076,6 +1182,11 @@ Here are the tests you can list with the :term:`WARN_QA` and
1076 ``initscripts`` recipe is actually built and thus the 1182 ``initscripts`` recipe is actually built and thus the
1077 ``initscripts-functions`` package is made available. 1183 ``initscripts-functions`` package is made available.
1078 1184
1185- ``configure-gettext:`` Checks that if a recipe is building something
1186 that uses automake and the automake files contain an ``AM_GNU_GETTEXT``
1187 directive, that the recipe also inherits the :ref:`ref-classes-gettext`
1188 class to ensure that gettext is available during the build.
1189
1079- ``compile-host-path:`` Checks the 1190- ``compile-host-path:`` Checks the
1080 :ref:`ref-tasks-compile` log for indications that 1191 :ref:`ref-tasks-compile` log for indications that
1081 paths to locations on the build host were used. Using such paths 1192 paths to locations on the build host were used. Using such paths
@@ -1154,12 +1265,12 @@ Here are the tests you can list with the :term:`WARN_QA` and
1154 might result in host contamination of the build output. 1265 might result in host contamination of the build output.
1155 1266
1156- ``installed-vs-shipped:`` Reports when files have been installed 1267- ``installed-vs-shipped:`` Reports when files have been installed
1157 within ``do_install`` but have not been included in any package by 1268 within :ref:`ref-tasks-install` but have not been included in any package by
1158 way of the :term:`FILES` variable. Files that do not 1269 way of the :term:`FILES` variable. Files that do not
1159 appear in any package cannot be present in an image later on in the 1270 appear in any package cannot be present in an image later on in the
1160 build process. Ideally, all installed files should be packaged or not 1271 build process. Ideally, all installed files should be packaged or not
1161 installed at all. These files can be deleted at the end of 1272 installed at all. These files can be deleted at the end of
1162 ``do_install`` if the files are not needed in any package. 1273 :ref:`ref-tasks-install` if the files are not needed in any package.
1163 1274
1164- ``invalid-chars:`` Checks that the recipe metadata variables 1275- ``invalid-chars:`` Checks that the recipe metadata variables
1165 :term:`DESCRIPTION`, 1276 :term:`DESCRIPTION`,
@@ -1192,11 +1303,39 @@ Here are the tests you can list with the :term:`WARN_QA` and
1192 ``/usr/libexec``. This check is not performed if the ``libexecdir`` 1303 ``/usr/libexec``. This check is not performed if the ``libexecdir``
1193 variable has been set explicitly to ``/usr/libexec``. 1304 variable has been set explicitly to ``/usr/libexec``.
1194 1305
1306- ``mime:`` Check that if a package contains mime type files (``.xml``
1307 files in ``${datadir}/mime/packages``) that the recipe also inherits
1308 the :ref:`ref-classes-mime` class in order to ensure that these get
1309 properly installed.
1310
1311- ``mime-xdg:`` Checks that if a package contains a .desktop file with a
1312 'MimeType' key present, that the recipe inherits the
1313 :ref:`ref-classes-mime-xdg` class that is required in order for that
1314 to be activated.
1315
1316- ``missing-update-alternatives:`` Check that if a recipe sets the
1317 :term:`ALTERNATIVE` variable that the recipe also inherits
1318 :ref:`ref-classes-update-alternatives` such that the alternative will
1319 be correctly set up.
1320
1195- ``packages-list:`` Checks for the same package being listed 1321- ``packages-list:`` Checks for the same package being listed
1196 multiple times through the :term:`PACKAGES` variable 1322 multiple times through the :term:`PACKAGES` variable
1197 value. Installing the package in this manner can cause errors during 1323 value. Installing the package in this manner can cause errors during
1198 packaging. 1324 packaging.
1199 1325
1326- ``patch-fuzz:`` Checks for fuzz in patch files that may allow
1327 them to apply incorrectly if the underlying code changes.
1328
1329- ``patch-status-core:`` Checks that the Upstream-Status is specified
1330 and valid in the headers of patches for recipes in the OE-Core layer.
1331
1332- ``patch-status-noncore:`` Checks that the Upstream-Status is specified
1333 and valid in the headers of patches for recipes in layers other than
1334 OE-Core.
1335
1336- ``perllocalpod:`` Checks for ``perllocal.pod`` being erroneously
1337 installed and packaged by a recipe.
1338
1200- ``perm-config:`` Reports lines in ``fs-perms.txt`` that have an 1339- ``perm-config:`` Reports lines in ``fs-perms.txt`` that have an
1201 invalid format. 1340 invalid format.
1202 1341
@@ -1250,12 +1389,20 @@ Here are the tests you can list with the :term:`WARN_QA` and
1250 options are being passed to the linker commands and your binaries 1389 options are being passed to the linker commands and your binaries
1251 have potential security issues. 1390 have potential security issues.
1252 1391
1392- ``shebang-size:`` Check that the shebang line (``#!`` in the first line)
1393 in a packaged script is not longer than 128 characters, which can cause
1394 an error at runtime depending on the operating system.
1395
1253- ``split-strip:`` Reports that splitting or stripping debug symbols 1396- ``split-strip:`` Reports that splitting or stripping debug symbols
1254 from binaries has failed. 1397 from binaries has failed.
1255 1398
1256- ``staticdev:`` Checks for static library files (``*.a``) in 1399- ``staticdev:`` Checks for static library files (``*.a``) in
1257 non-``staticdev`` packages. 1400 non-``staticdev`` packages.
1258 1401
1402- ``src-uri-bad:`` Checks that the :term:`SRC_URI` value set by a recipe
1403 does not contain a reference to ``${PN}`` (instead of the correct
1404 ``${BPN}``) nor refers to unstable Github archive tarballs.
1405
1259- ``symlink-to-sysroot:`` Checks for symlinks in packages that point 1406- ``symlink-to-sysroot:`` Checks for symlinks in packages that point
1260 into :term:`TMPDIR` on the host. Such symlinks will 1407 into :term:`TMPDIR` on the host. Such symlinks will
1261 work on the host, but are clearly invalid when running on the target. 1408 work on the host, but are clearly invalid when running on the target.
@@ -1266,6 +1413,15 @@ Here are the tests you can list with the :term:`WARN_QA` and
1266 ":doc:`/ref-manual/qa-checks`" for more information regarding runtime performance 1413 ":doc:`/ref-manual/qa-checks`" for more information regarding runtime performance
1267 issues. 1414 issues.
1268 1415
1416- ``unhandled-features-check:`` check that if one of the variables that
1417 the :ref:`ref-classes-features_check` class supports (e.g.
1418 :term:`REQUIRED_DISTRO_FEATURES`) is set by a recipe, then the recipe
1419 also inherits :ref:`ref-classes-features_check` in order for the
1420 requirement to actually work.
1421
1422- ``unimplemented-ptest:`` Checks that ptests are implemented for upstream
1423 tests.
1424
1269- ``unlisted-pkg-lics:`` Checks that all declared licenses applying 1425- ``unlisted-pkg-lics:`` Checks that all declared licenses applying
1270 for a package are also declared on the recipe level (i.e. any license 1426 for a package are also declared on the recipe level (i.e. any license
1271 in ``LICENSE:*`` should appear in :term:`LICENSE`). 1427 in ``LICENSE:*`` should appear in :term:`LICENSE`).
@@ -1275,19 +1431,23 @@ Here are the tests you can list with the :term:`WARN_QA` and
1275 the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will 1431 the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will
1276 not cause any breakage, they do waste space and are unnecessary. 1432 not cause any breakage, they do waste space and are unnecessary.
1277 1433
1434- ``usrmerge:`` If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this
1435 check will ensure that no package installs files to root (``/bin``,
1436 ``/sbin``, ``/lib``, ``/lib64``) directories.
1437
1278- ``var-undefined:`` Reports when variables fundamental to packaging 1438- ``var-undefined:`` Reports when variables fundamental to packaging
1279 (i.e. :term:`WORKDIR`, 1439 (i.e. :term:`WORKDIR`,
1280 :term:`DEPLOY_DIR`, :term:`D`, 1440 :term:`DEPLOY_DIR`, :term:`D`,
1281 :term:`PN`, and :term:`PKGD`) are undefined 1441 :term:`PN`, and :term:`PKGD`) are undefined
1282 during :ref:`ref-tasks-package`. 1442 during :ref:`ref-tasks-package`.
1283 1443
1284- ``version-going-backwards:`` If Build History is enabled, reports 1444- ``version-going-backwards:`` If the :ref:`ref-classes-buildhistory`
1285 when a package being written out has a lower version than the 1445 class is enabled, reports when a package being written out has a lower
1286 previously written package under the same name. If you are placing 1446 version than the previously written package under the same name. If
1287 output packages into a feed and upgrading packages on a target system 1447 you are placing output packages into a feed and upgrading packages on
1288 using that feed, the version of a package going backwards can result 1448 a target system using that feed, the version of a package going
1289 in the target system not correctly upgrading to the "new" version of 1449 backwards can result in the target system not correctly upgrading to
1290 the package. 1450 the "new" version of the package.
1291 1451
1292 .. note:: 1452 .. note::
1293 1453
@@ -1304,182 +1464,195 @@ Here are the tests you can list with the :term:`WARN_QA` and
1304 1464
1305.. _ref-classes-insserv: 1465.. _ref-classes-insserv:
1306 1466
1307``insserv.bbclass`` 1467``insserv``
1308=================== 1468===========
1309 1469
1310The ``insserv`` class uses the ``insserv`` utility to update the order 1470The :ref:`ref-classes-insserv` class uses the ``insserv`` utility to update the order
1311of symbolic links in ``/etc/rc?.d/`` within an image based on 1471of symbolic links in ``/etc/rc?.d/`` within an image based on
1312dependencies specified by LSB headers in the ``init.d`` scripts 1472dependencies specified by LSB headers in the ``init.d`` scripts
1313themselves. 1473themselves.
1314 1474
1315.. _ref-classes-kernel: 1475.. _ref-classes-kernel:
1316 1476
1317``kernel.bbclass`` 1477``kernel``
1318================== 1478==========
1319 1479
1320The ``kernel`` class handles building Linux kernels. The class contains 1480The :ref:`ref-classes-kernel` class handles building Linux kernels. The class contains
1321code to build all kernel trees. All needed headers are staged into the 1481code to build all kernel trees. All needed headers are staged into the
1322:term:`STAGING_KERNEL_DIR` directory to allow out-of-tree module builds 1482:term:`STAGING_KERNEL_DIR` directory to allow out-of-tree module builds
1323using the :ref:`module <ref-classes-module>` class. 1483using the :ref:`ref-classes-module` class.
1324 1484
1325This means that each built kernel module is packaged separately and 1485If a file named ``defconfig`` is listed in :term:`SRC_URI`, then by default
1326inter-module dependencies are created by parsing the ``modinfo`` output. 1486:ref:`ref-tasks-configure` copies it as ``.config`` in the build directory,
1327If all modules are required, then installing the ``kernel-modules`` 1487so it is automatically used as the kernel configuration for the build. This
1328package installs all packages with modules and various other kernel 1488copy is not performed in case ``.config`` already exists there: this allows
1329packages such as ``kernel-vmlinux``. 1489recipes to produce a configuration by other means in
1330 1490``do_configure:prepend``.
1331The ``kernel`` class contains logic that allows you to embed an initial 1491
1332RAM filesystem (initramfs) image when you build the kernel image. For 1492Each built kernel module is packaged separately and inter-module
1333information on how to build an initramfs, see the 1493dependencies are created by parsing the ``modinfo`` output. If all modules
1494are required, then installing the ``kernel-modules`` package installs all
1495packages with modules and various other kernel packages such as
1496``kernel-vmlinux``.
1497
1498The :ref:`ref-classes-kernel` class contains logic that allows you to embed an initial
1499RAM filesystem (:term:`Initramfs`) image when you build the kernel image. For
1500information on how to build an :term:`Initramfs`, see the
1334":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section in 1501":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section in
1335the Yocto Project Development Tasks Manual. 1502the Yocto Project Development Tasks Manual.
1336 1503
1337Various other classes are used by the ``kernel`` and ``module`` classes 1504Various other classes are used by the :ref:`ref-classes-kernel` and :ref:`ref-classes-module` classes
1338internally including the :ref:`kernel-arch <ref-classes-kernel-arch>`, 1505internally including the :ref:`ref-classes-kernel-arch`, :ref:`ref-classes-module-base`, and
1339:ref:`module-base <ref-classes-module-base>`, and 1506:ref:`ref-classes-linux-kernel-base` classes.
1340:ref:`linux-kernel-base <ref-classes-linux-kernel-base>` classes.
1341 1507
1342.. _ref-classes-kernel-arch: 1508.. _ref-classes-kernel-arch:
1343 1509
1344``kernel-arch.bbclass`` 1510``kernel-arch``
1345======================= 1511===============
1346 1512
1347The ``kernel-arch`` class sets the ``ARCH`` environment variable for 1513The :ref:`ref-classes-kernel-arch` class sets the ``ARCH`` environment variable for
1348Linux kernel compilation (including modules). 1514Linux kernel compilation (including modules).
1349 1515
1350.. _ref-classes-kernel-devicetree: 1516.. _ref-classes-kernel-devicetree:
1351 1517
1352``kernel-devicetree.bbclass`` 1518``kernel-devicetree``
1353============================= 1519=====================
1520
1521The :ref:`ref-classes-kernel-devicetree` class, which is inherited by the
1522:ref:`ref-classes-kernel` class, supports device tree generation.
1523
1524Its behavior is mainly controlled by the following variables:
1354 1525
1355The ``kernel-devicetree`` class, which is inherited by the 1526- :term:`KERNEL_DEVICETREE_BUNDLE`: whether to bundle the kernel and device tree
1356:ref:`kernel <ref-classes-kernel>` class, supports device tree 1527- :term:`KERNEL_DTBDEST`: directory where to install DTB files
1357generation. 1528- :term:`KERNEL_DTBVENDORED`: whether to keep vendor subdirectories
1529- :term:`KERNEL_DTC_FLAGS`: flags for ``dtc``, the Device Tree Compiler
1530- :term:`KERNEL_PACKAGE_NAME`: base name of the kernel packages
1358 1531
1359.. _ref-classes-kernel-fitimage: 1532.. _ref-classes-kernel-fitimage:
1360 1533
1361``kernel-fitimage.bbclass`` 1534``kernel-fitimage``
1362=========================== 1535===================
1363 1536
1364The ``kernel-fitimage`` class provides support to pack a kernel image, 1537The :ref:`ref-classes-kernel-fitimage` class provides support to pack a kernel image,
1365device trees, a U-boot script, a Initramfs bundle and a RAM disk 1538device trees, a U-boot script, an :term:`Initramfs` bundle and a RAM disk
1366into a single FIT image. In theory, a FIT image can support any number 1539into a single FIT image. In theory, a FIT image can support any number
1367of kernels, U-boot scripts, Initramfs bundles, RAM disks and device-trees. 1540of kernels, U-boot scripts, :term:`Initramfs` bundles, RAM disks and device-trees.
1368However, ``kernel-fitimage`` currently only supports 1541However, :ref:`ref-classes-kernel-fitimage` currently only supports
1369limited usescases: just one kernel image, an optional U-boot script, 1542limited usecases: just one kernel image, an optional U-boot script,
1370an optional Initramfs bundle, an optional RAM disk, and any number of 1543an optional :term:`Initramfs` bundle, an optional RAM disk, and any number of
1371device tree. 1544device trees.
1372 1545
1373To create a FIT image, it is required that :term:`KERNEL_CLASSES` 1546To create a FIT image, it is required that :term:`KERNEL_CLASSES`
1374is set to include "kernel-fitimage" and :term:`KERNEL_IMAGETYPE` 1547is set to include ":ref:`ref-classes-kernel-fitimage`" and one of :term:`KERNEL_IMAGETYPE`,
1375is set to "fitImage". 1548:term:`KERNEL_ALT_IMAGETYPE` or :term:`KERNEL_IMAGETYPES` to include "fitImage".
1376 1549
1377The options for the device tree compiler passed to ``mkimage -D`` 1550The options for the device tree compiler passed to ``mkimage -D``
1378when creating the FIT image are specified using the 1551when creating the FIT image are specified using the
1379:term:`UBOOT_MKIMAGE_DTCOPTS` variable. 1552:term:`UBOOT_MKIMAGE_DTCOPTS` variable.
1380 1553
1381Only a single kernel can be added to the FIT image created by 1554Only a single kernel can be added to the FIT image created by
1382``kernel-fitimage`` and the kernel image in FIT is mandatory. The 1555:ref:`ref-classes-kernel-fitimage` and the kernel image in FIT is mandatory. The
1383address where the kernel image is to be loaded by U-Boot is 1556address where the kernel image is to be loaded by U-Boot is
1384specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by 1557specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by
1385:term:`UBOOT_ENTRYPOINT`. 1558:term:`UBOOT_ENTRYPOINT`.
1386 1559
1387Multiple device trees can be added to the FIT image created by 1560Multiple device trees can be added to the FIT image created by
1388``kernel-fitimage`` and the device tree is optional. 1561:ref:`ref-classes-kernel-fitimage` and the device tree is optional.
1389The address where the device tree is to be loaded by U-Boot is 1562The address where the device tree is to be loaded by U-Boot is
1390specified by :term:`UBOOT_DTBO_LOADADDRESS` for device tree overlays 1563specified by :term:`UBOOT_DTBO_LOADADDRESS` for device tree overlays
1391and by :term:`UBOOT_DTB_LOADADDRESS` for device tree binaries. 1564and by :term:`UBOOT_DTB_LOADADDRESS` for device tree binaries.
1392 1565
1393Only a single RAM disk can be added to the FIT image created by 1566Only a single RAM disk can be added to the FIT image created by
1394``kernel-fitimage`` and the RAM disk in FIT is optional. 1567:ref:`ref-classes-kernel-fitimage` and the RAM disk in FIT is optional.
1395The address where the RAM disk image is to be loaded by U-Boot 1568The address where the RAM disk image is to be loaded by U-Boot
1396is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by 1569is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by
1397:term:`UBOOT_RD_ENTRYPOINT`. The ramdisk is added to FIT image when 1570:term:`UBOOT_RD_ENTRYPOINT`. The ramdisk is added to the FIT image when
1398:term:`INITRAMFS_IMAGE` is specified and that :term:`INITRAMFS_IMAGE_BUNDLE` 1571:term:`INITRAMFS_IMAGE` is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE`
1399is set to 0. 1572is not set to 1.
1400 1573
1401Only a single Initramfs bundle can be added to the FIT image created by 1574Only a single :term:`Initramfs` bundle can be added to the FIT image created by
1402``kernel-fitimage`` and the Initramfs bundle in FIT is optional. 1575:ref:`ref-classes-kernel-fitimage` and the :term:`Initramfs` bundle in FIT is optional.
1403In case of Initramfs, the kernel is configured to be bundled with the root filesystem 1576In case of :term:`Initramfs`, the kernel is configured to be bundled with the root filesystem
1404in the same binary (example: zImage-initramfs-:term:`MACHINE`.bin). 1577in the same binary (example: zImage-initramfs-:term:`MACHINE`.bin).
1405When the kernel is copied to RAM and executed, it unpacks the Initramfs root filesystem. 1578When the kernel is copied to RAM and executed, it unpacks the :term:`Initramfs` root filesystem.
1406The Initramfs bundle can be enabled when :term:`INITRAMFS_IMAGE` 1579The :term:`Initramfs` bundle can be enabled when :term:`INITRAMFS_IMAGE`
1407is specified and that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 1. 1580is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 1.
1408The address where the Initramfs bundle is to be loaded by U-boot is specified 1581The address where the :term:`Initramfs` bundle is to be loaded by U-boot is specified
1409by :term:`UBOOT_LOADADDRESS` and the entrypoint by :term:`UBOOT_ENTRYPOINT`. 1582by :term:`UBOOT_LOADADDRESS` and the entrypoint by :term:`UBOOT_ENTRYPOINT`.
1410 1583
1411Only a single U-boot boot script can be added to the FIT image created by 1584Only a single U-boot boot script can be added to the FIT image created by
1412``kernel-fitimage`` and the boot script is optional. 1585:ref:`ref-classes-kernel-fitimage` and the boot script is optional.
1413The boot script is specified in the ITS file as a text file containing 1586The boot script is specified in the ITS file as a text file containing
1414U-boot commands. When using a boot script the user should configure the 1587U-boot commands. When using a boot script the user should configure the
1415U-boot ``do_install`` task to copy the script to sysroot. 1588U-boot :ref:`ref-tasks-install` task to copy the script to sysroot.
1416So the script can be included in the FIT image by the ``kernel-fitimage`` 1589So the script can be included in the FIT image by the :ref:`ref-classes-kernel-fitimage`
1417class. At run-time, U-boot CONFIG_BOOTCOMMAND define can be configured to 1590class. At run-time, U-boot CONFIG_BOOTCOMMAND define can be configured to
1418load the boot script from the FIT image and executes it. 1591load the boot script from the FIT image and execute it.
1419 1592
1420The FIT image generated by ``kernel-fitimage`` class is signed when the 1593The FIT image generated by the :ref:`ref-classes-kernel-fitimage` class is signed when the
1421variables :term:`UBOOT_SIGN_ENABLE`, :term:`UBOOT_MKIMAGE_DTCOPTS`, 1594variables :term:`UBOOT_SIGN_ENABLE`, :term:`UBOOT_MKIMAGE_DTCOPTS`,
1422:term:`UBOOT_SIGN_KEYDIR` and :term:`UBOOT_SIGN_KEYNAME` are set 1595:term:`UBOOT_SIGN_KEYDIR` and :term:`UBOOT_SIGN_KEYNAME` are set
1423appropriately. The default values used for :term:`FIT_HASH_ALG` and 1596appropriately. The default values used for :term:`FIT_HASH_ALG` and
1424:term:`FIT_SIGN_ALG` in ``kernel-fitimage`` are "sha256" and 1597:term:`FIT_SIGN_ALG` in :ref:`ref-classes-kernel-fitimage` are "sha256" and
1425"rsa2048" respectively. The keys for signing fitImage can be generated using 1598"rsa2048" respectively. The keys for signing the FIT image can be generated using
1426the ``kernel-fitimage`` class when both :term:`FIT_GENERATE_KEYS` and 1599the :ref:`ref-classes-kernel-fitimage` class when both :term:`FIT_GENERATE_KEYS` and
1427:term:`UBOOT_SIGN_ENABLE` are set to "1". 1600:term:`UBOOT_SIGN_ENABLE` are set to "1".
1428 1601
1429 1602
1430.. _ref-classes-kernel-grub: 1603.. _ref-classes-kernel-grub:
1431 1604
1432``kernel-grub.bbclass`` 1605``kernel-grub``
1433======================= 1606===============
1434 1607
1435The ``kernel-grub`` class updates the boot area and the boot menu with 1608The :ref:`ref-classes-kernel-grub` class updates the boot area and the boot menu with
1436the kernel as the priority boot mechanism while installing a RPM to 1609the kernel as the priority boot mechanism while installing a RPM to
1437update the kernel on a deployed target. 1610update the kernel on a deployed target.
1438 1611
1439.. _ref-classes-kernel-module-split: 1612.. _ref-classes-kernel-module-split:
1440 1613
1441``kernel-module-split.bbclass`` 1614``kernel-module-split``
1442=============================== 1615=======================
1443 1616
1444The ``kernel-module-split`` class provides common functionality for 1617The :ref:`ref-classes-kernel-module-split` class provides common functionality for
1445splitting Linux kernel modules into separate packages. 1618splitting Linux kernel modules into separate packages.
1446 1619
1447.. _ref-classes-kernel-uboot: 1620.. _ref-classes-kernel-uboot:
1448 1621
1449``kernel-uboot.bbclass`` 1622``kernel-uboot``
1450======================== 1623================
1451 1624
1452The ``kernel-uboot`` class provides support for building from 1625The :ref:`ref-classes-kernel-uboot` class provides support for building from
1453vmlinux-style kernel sources. 1626vmlinux-style kernel sources.
1454 1627
1455.. _ref-classes-kernel-uimage: 1628.. _ref-classes-kernel-uimage:
1456 1629
1457``kernel-uimage.bbclass`` 1630``kernel-uimage``
1458========================= 1631=================
1459 1632
1460The ``kernel-uimage`` class provides support to pack uImage. 1633The :ref:`ref-classes-kernel-uimage` class provides support to pack uImage.
1461 1634
1462.. _ref-classes-kernel-yocto: 1635.. _ref-classes-kernel-yocto:
1463 1636
1464``kernel-yocto.bbclass`` 1637``kernel-yocto``
1465======================== 1638================
1466 1639
1467The ``kernel-yocto`` class provides common functionality for building 1640The :ref:`ref-classes-kernel-yocto` class provides common functionality for building
1468from linux-yocto style kernel source repositories. 1641from linux-yocto style kernel source repositories.
1469 1642
1470.. _ref-classes-kernelsrc: 1643.. _ref-classes-kernelsrc:
1471 1644
1472``kernelsrc.bbclass`` 1645``kernelsrc``
1473===================== 1646=============
1474 1647
1475The ``kernelsrc`` class sets the Linux kernel source and version. 1648The :ref:`ref-classes-kernelsrc` class sets the Linux kernel source and version.
1476 1649
1477.. _ref-classes-lib_package: 1650.. _ref-classes-lib_package:
1478 1651
1479``lib_package.bbclass`` 1652``lib_package``
1480======================= 1653===============
1481 1654
1482The ``lib_package`` class supports recipes that build libraries and 1655The :ref:`ref-classes-lib_package` class supports recipes that build libraries and
1483produce executable binaries, where those binaries should not be 1656produce executable binaries, where those binaries should not be
1484installed by default along with the library. Instead, the binaries are 1657installed by default along with the library. Instead, the binaries are
1485added to a separate ``${``\ :term:`PN`\ ``}-bin`` package to 1658added to a separate ``${``\ :term:`PN`\ ``}-bin`` package to
@@ -1487,40 +1660,40 @@ make their installation optional.
1487 1660
1488.. _ref-classes-libc*: 1661.. _ref-classes-libc*:
1489 1662
1490``libc*.bbclass`` 1663``libc*``
1491================= 1664=========
1492 1665
1493The ``libc*`` classes support recipes that build packages with ``libc``: 1666The :ref:`ref-classes-libc*` classes support recipes that build packages with ``libc``:
1494 1667
1495- The ``libc-common`` class provides common support for building with 1668- The :ref:`libc-common <ref-classes-libc*>` class provides common support for building with
1496 ``libc``. 1669 ``libc``.
1497 1670
1498- The ``libc-package`` class supports packaging up ``glibc`` and 1671- The :ref:`libc-package <ref-classes-libc*>` class supports packaging up ``glibc`` and
1499 ``eglibc``. 1672 ``eglibc``.
1500 1673
1501.. _ref-classes-license: 1674.. _ref-classes-license:
1502 1675
1503``license.bbclass`` 1676``license``
1504=================== 1677===========
1505 1678
1506The ``license`` class provides license manifest creation and license 1679The :ref:`ref-classes-license` class provides license manifest creation and license
1507exclusion. This class is enabled by default using the default value for 1680exclusion. This class is enabled by default using the default value for
1508the :term:`INHERIT_DISTRO` variable. 1681the :term:`INHERIT_DISTRO` variable.
1509 1682
1510.. _ref-classes-linux-kernel-base: 1683.. _ref-classes-linux-kernel-base:
1511 1684
1512``linux-kernel-base.bbclass`` 1685``linux-kernel-base``
1513============================= 1686=====================
1514 1687
1515The ``linux-kernel-base`` class provides common functionality for 1688The :ref:`ref-classes-linux-kernel-base` class provides common functionality for
1516recipes that build out of the Linux kernel source tree. These builds 1689recipes that build out of the Linux kernel source tree. These builds
1517goes beyond the kernel itself. For example, the Perf recipe also 1690goes beyond the kernel itself. For example, the Perf recipe also
1518inherits this class. 1691inherits this class.
1519 1692
1520.. _ref-classes-linuxloader: 1693.. _ref-classes-linuxloader:
1521 1694
1522``linuxloader.bbclass`` 1695``linuxloader``
1523======================= 1696===============
1524 1697
1525Provides the function ``linuxloader()``, which gives the value of the 1698Provides the function ``linuxloader()``, which gives the value of the
1526dynamic loader/linker provided on the platform. This value is used by a 1699dynamic loader/linker provided on the platform. This value is used by a
@@ -1528,63 +1701,64 @@ number of other classes.
1528 1701
1529.. _ref-classes-logging: 1702.. _ref-classes-logging:
1530 1703
1531``logging.bbclass`` 1704``logging``
1532=================== 1705===========
1533 1706
1534The ``logging`` class provides the standard shell functions used to log 1707The :ref:`ref-classes-logging` class provides the standard shell functions used to log
1535messages for various BitBake severity levels (i.e. ``bbplain``, 1708messages for various BitBake severity levels (i.e. ``bbplain``,
1536``bbnote``, ``bbwarn``, ``bberror``, ``bbfatal``, and ``bbdebug``). 1709``bbnote``, ``bbwarn``, ``bberror``, ``bbfatal``, and ``bbdebug``).
1537 1710
1538This class is enabled by default since it is inherited by the ``base`` 1711This class is enabled by default since it is inherited by the :ref:`ref-classes-base`
1539class. 1712class.
1540 1713
1541.. _ref-classes-meson: 1714.. _ref-classes-meson:
1542 1715
1543``meson.bbclass`` 1716``meson``
1544================= 1717=========
1545 1718
1546The :ref:`ref-classes-meson` class allows to create recipes that build software 1719The :ref:`ref-classes-meson` class allows to create recipes that build software
1547using the `Meson <https://mesonbuild.com/>`__ build system. You can use 1720using the `Meson <https://mesonbuild.com/>`__ build system. You can use the
1548the :term:`MESON_BUILDTYPE` and :term:`EXTRA_OEMESON` variables to specify 1721:term:`MESON_BUILDTYPE` and :term:`EXTRA_OEMESON`
1549additional configuration options to be passed using the ``meson`` command line. 1722variables to specify additional configuration options to be passed using the
1723``meson`` command line.
1550 1724
1551.. _ref-classes-metadata_scm: 1725.. _ref-classes-metadata_scm:
1552 1726
1553``metadata_scm.bbclass`` 1727``metadata_scm``
1554======================== 1728================
1555 1729
1556The ``metadata_scm`` class provides functionality for querying the 1730The :ref:`ref-classes-metadata_scm` class provides functionality for querying the
1557branch and revision of a Source Code Manager (SCM) repository. 1731branch and revision of a Source Code Manager (SCM) repository.
1558 1732
1559The :ref:`base <ref-classes-base>` class uses this class to print the 1733The :ref:`ref-classes-base` class uses this class to print the revisions of
1560revisions of each layer before starting every build. The 1734each layer before starting every build. The :ref:`ref-classes-metadata_scm`
1561``metadata_scm`` class is enabled by default because it is inherited by 1735class is enabled by default because it is inherited by the
1562the ``base`` class. 1736:ref:`ref-classes-base` class.
1563 1737
1564.. _ref-classes-migrate_localcount: 1738.. _ref-classes-migrate_localcount:
1565 1739
1566``migrate_localcount.bbclass`` 1740``migrate_localcount``
1567============================== 1741======================
1568 1742
1569The ``migrate_localcount`` class verifies a recipe's localcount data and 1743The :ref:`ref-classes-migrate_localcount` class verifies a recipe's localcount data and
1570increments it appropriately. 1744increments it appropriately.
1571 1745
1572.. _ref-classes-mime: 1746.. _ref-classes-mime:
1573 1747
1574``mime.bbclass`` 1748``mime``
1575================ 1749========
1576 1750
1577The ``mime`` class generates the proper post-install and post-remove 1751The :ref:`ref-classes-mime` class generates the proper post-install and post-remove
1578(postinst/postrm) scriptlets for packages that install MIME type files. 1752(postinst/postrm) scriptlets for packages that install MIME type files.
1579These scriptlets call ``update-mime-database`` to add the MIME types to 1753These scriptlets call ``update-mime-database`` to add the MIME types to
1580the shared database. 1754the shared database.
1581 1755
1582.. _ref-classes-mime-xdg: 1756.. _ref-classes-mime-xdg:
1583 1757
1584``mime-xdg.bbclass`` 1758``mime-xdg``
1585==================== 1759============
1586 1760
1587The :ref:`mime-xdg <ref-classes-mime-xdg>` class generates the proper 1761The :ref:`ref-classes-mime-xdg` class generates the proper
1588post-install and post-remove (postinst/postrm) scriptlets for packages 1762post-install and post-remove (postinst/postrm) scriptlets for packages
1589that install ``.desktop`` files containing ``MimeType`` entries. 1763that install ``.desktop`` files containing ``MimeType`` entries.
1590These scriptlets call ``update-desktop-database`` to add the MIME types 1764These scriptlets call ``update-desktop-database`` to add the MIME types
@@ -1602,28 +1776,26 @@ package names to the :term:`MIME_XDG_PACKAGES` variable.
1602 1776
1603.. _ref-classes-mirrors: 1777.. _ref-classes-mirrors:
1604 1778
1605``mirrors.bbclass`` 1779``mirrors``
1606=================== 1780===========
1607 1781
1608The ``mirrors`` class sets up some standard 1782The :ref:`ref-classes-mirrors` class sets up some standard
1609:term:`MIRRORS` entries for source code mirrors. These 1783:term:`MIRRORS` entries for source code mirrors. These
1610mirrors provide a fall-back path in case the upstream source specified 1784mirrors provide a fall-back path in case the upstream source specified
1611in :term:`SRC_URI` within recipes is unavailable. 1785in :term:`SRC_URI` within recipes is unavailable.
1612 1786
1613This class is enabled by default since it is inherited by the 1787This class is enabled by default since it is inherited by the
1614:ref:`base <ref-classes-base>` class. 1788:ref:`ref-classes-base` class.
1615 1789
1616.. _ref-classes-module: 1790.. _ref-classes-module:
1617 1791
1618``module.bbclass`` 1792``module``
1619================== 1793==========
1620 1794
1621The ``module`` class provides support for building out-of-tree Linux 1795The :ref:`ref-classes-module` class provides support for building out-of-tree Linux
1622kernel modules. The class inherits the 1796kernel modules. The class inherits the :ref:`ref-classes-module-base` and
1623:ref:`module-base <ref-classes-module-base>` and 1797:ref:`ref-classes-kernel-module-split` classes, and implements the
1624:ref:`kernel-module-split <ref-classes-kernel-module-split>` classes, 1798:ref:`ref-tasks-compile` and :ref:`ref-tasks-install` tasks. The class provides
1625and implements the :ref:`ref-tasks-compile` and
1626:ref:`ref-tasks-install` tasks. The class provides
1627everything needed to build and package a kernel module. 1799everything needed to build and package a kernel module.
1628 1800
1629For general information on out-of-tree Linux kernel modules, see the 1801For general information on out-of-tree Linux kernel modules, see the
@@ -1632,21 +1804,21 @@ section in the Yocto Project Linux Kernel Development Manual.
1632 1804
1633.. _ref-classes-module-base: 1805.. _ref-classes-module-base:
1634 1806
1635``module-base.bbclass`` 1807``module-base``
1636======================= 1808===============
1637 1809
1638The ``module-base`` class provides the base functionality for building 1810The :ref:`ref-classes-module-base` class provides the base functionality for
1639Linux kernel modules. Typically, a recipe that builds software that 1811building Linux kernel modules. Typically, a recipe that builds software that
1640includes one or more kernel modules and has its own means of building 1812includes one or more kernel modules and has its own means of building the module
1641the module inherits this class as opposed to inheriting the 1813inherits this class as opposed to inheriting the :ref:`ref-classes-module`
1642:ref:`module <ref-classes-module>` class. 1814class.
1643 1815
1644.. _ref-classes-multilib*: 1816.. _ref-classes-multilib*:
1645 1817
1646``multilib*.bbclass`` 1818``multilib*``
1647===================== 1819=============
1648 1820
1649The ``multilib*`` classes provide support for building libraries with 1821The :ref:`ref-classes-multilib*` classes provide support for building libraries with
1650different target optimizations or target architectures and installing 1822different target optimizations or target architectures and installing
1651them side-by-side in the same image. 1823them side-by-side in the same image.
1652 1824
@@ -1656,20 +1828,20 @@ section in the Yocto Project Development Tasks Manual.
1656 1828
1657.. _ref-classes-native: 1829.. _ref-classes-native:
1658 1830
1659``native.bbclass`` 1831``native``
1660================== 1832==========
1661 1833
1662The ``native`` class provides common functionality for recipes that 1834The :ref:`ref-classes-native` class provides common functionality for recipes that
1663build tools to run on the :term:`Build Host` (i.e. tools that use the compiler 1835build tools to run on the :term:`Build Host` (i.e. tools that use the compiler
1664or other tools from the build host). 1836or other tools from the build host).
1665 1837
1666You can create a recipe that builds tools that run natively on the host 1838You can create a recipe that builds tools that run natively on the host
1667a couple different ways: 1839a couple different ways:
1668 1840
1669- Create a ``myrecipe-native.bb`` recipe that inherits the ``native`` 1841- Create a ``myrecipe-native.bb`` recipe that inherits the :ref:`ref-classes-native`
1670 class. If you use this method, you must order the inherit statement 1842 class. If you use this method, you must order the inherit statement
1671 in the recipe after all other inherit statements so that the 1843 in the recipe after all other inherit statements so that the
1672 ``native`` class is inherited last. 1844 :ref:`ref-classes-native` class is inherited last.
1673 1845
1674 .. note:: 1846 .. note::
1675 1847
@@ -1691,17 +1863,17 @@ a couple different ways:
1691 specify any functionality specific to the respective native or target 1863 specify any functionality specific to the respective native or target
1692 case. 1864 case.
1693 1865
1694Although applied differently, the ``native`` class is used with both 1866Although applied differently, the :ref:`ref-classes-native` class is used with both
1695methods. The advantage of the second method is that you do not need to 1867methods. The advantage of the second method is that you do not need to
1696have two separate recipes (assuming you need both) for native and 1868have two separate recipes (assuming you need both) for native and
1697target. All common parts of the recipe are automatically shared. 1869target. All common parts of the recipe are automatically shared.
1698 1870
1699.. _ref-classes-nativesdk: 1871.. _ref-classes-nativesdk:
1700 1872
1701``nativesdk.bbclass`` 1873``nativesdk``
1702===================== 1874=============
1703 1875
1704The ``nativesdk`` class provides common functionality for recipes that 1876The :ref:`ref-classes-nativesdk` class provides common functionality for recipes that
1705wish to build tools to run as part of an SDK (i.e. tools that run on 1877wish to build tools to run as part of an SDK (i.e. tools that run on
1706:term:`SDKMACHINE`). 1878:term:`SDKMACHINE`).
1707 1879
@@ -1709,11 +1881,11 @@ You can create a recipe that builds tools that run on the SDK machine a
1709couple different ways: 1881couple different ways:
1710 1882
1711- Create a ``nativesdk-myrecipe.bb`` recipe that inherits the 1883- Create a ``nativesdk-myrecipe.bb`` recipe that inherits the
1712 ``nativesdk`` class. If you use this method, you must order the 1884 :ref:`ref-classes-nativesdk` class. If you use this method, you must order the
1713 inherit statement in the recipe after all other inherit statements so 1885 inherit statement in the recipe after all other inherit statements so
1714 that the ``nativesdk`` class is inherited last. 1886 that the :ref:`ref-classes-nativesdk` class is inherited last.
1715 1887
1716- Create a ``nativesdk`` variant of any recipe by adding the following:: 1888- Create a :ref:`ref-classes-nativesdk` variant of any recipe by adding the following::
1717 1889
1718 BBCLASSEXTEND = "nativesdk" 1890 BBCLASSEXTEND = "nativesdk"
1719 1891
@@ -1732,26 +1904,26 @@ couple different ways:
1732 Not doing so can lead to subtle problems because there is code that 1904 Not doing so can lead to subtle problems because there is code that
1733 depends on the naming convention. 1905 depends on the naming convention.
1734 1906
1735Although applied differently, the ``nativesdk`` class is used with both 1907Although applied differently, the :ref:`ref-classes-nativesdk` class is used with both
1736methods. The advantage of the second method is that you do not need to 1908methods. The advantage of the second method is that you do not need to
1737have two separate recipes (assuming you need both) for the SDK machine 1909have two separate recipes (assuming you need both) for the SDK machine
1738and the target. All common parts of the recipe are automatically shared. 1910and the target. All common parts of the recipe are automatically shared.
1739 1911
1740.. _ref-classes-nopackages: 1912.. _ref-classes-nopackages:
1741 1913
1742``nopackages.bbclass`` 1914``nopackages``
1743====================== 1915==============
1744 1916
1745Disables packaging tasks for those recipes and classes where packaging 1917Disables packaging tasks for those recipes and classes where packaging
1746is not needed. 1918is not needed.
1747 1919
1748.. _ref-classes-npm: 1920.. _ref-classes-npm:
1749 1921
1750``npm.bbclass`` 1922``npm``
1751=============== 1923=======
1752 1924
1753Provides support for building Node.js software fetched using the `node 1925Provides support for building Node.js software fetched using the
1754package manager (NPM) <https://en.wikipedia.org/wiki/Npm_(software)>`__. 1926:wikipedia:`node package manager (NPM) <Npm_(software)>`.
1755 1927
1756.. note:: 1928.. note::
1757 1929
@@ -1764,22 +1936,22 @@ section in the Yocto Project Development Tasks Manual.
1764 1936
1765.. _ref-classes-oelint: 1937.. _ref-classes-oelint:
1766 1938
1767``oelint.bbclass`` 1939``oelint``
1768================== 1940==========
1769 1941
1770The ``oelint`` class is an obsolete lint checking tool available in 1942The :ref:`ref-classes-oelint` class is an obsolete lint checking tool available in
1771``meta/classes`` in the :term:`Source Directory`. 1943``meta/classes`` in the :term:`Source Directory`.
1772 1944
1773There are some classes that could be generally useful in OE-Core but 1945There are some classes that could be generally useful in OE-Core but
1774are never actually used within OE-Core itself. The ``oelint`` class is 1946are never actually used within OE-Core itself. The :ref:`ref-classes-oelint` class is
1775one such example. However, being aware of this class can reduce the 1947one such example. However, being aware of this class can reduce the
1776proliferation of different versions of similar classes across multiple 1948proliferation of different versions of similar classes across multiple
1777layers. 1949layers.
1778 1950
1779.. _ref-classes-overlayfs: 1951.. _ref-classes-overlayfs:
1780 1952
1781``overlayfs.bbclass`` 1953``overlayfs``
1782======================= 1954=============
1783 1955
1784It's often desired in Embedded System design to have a read-only root filesystem. 1956It's often desired in Embedded System design to have a read-only root filesystem.
1785But a lot of different applications might want to have read-write access to 1957But a lot of different applications might want to have read-write access to
@@ -1800,7 +1972,7 @@ is supported by ``overlayfs``. This has to be done in your machine configuration
1800 * QA checks fail to catch file existence if you redefine this variable in your recipe! 1972 * QA checks fail to catch file existence if you redefine this variable in your recipe!
1801 * Only the existence of the systemd mount unit file is checked, not its contents. 1973 * Only the existence of the systemd mount unit file is checked, not its contents.
1802 * To get more details on ``overlayfs``, its internals and supported operations, please refer 1974 * To get more details on ``overlayfs``, its internals and supported operations, please refer
1803 to the official documentation of the `Linux kernel <https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html>`_. 1975 to the official documentation of the `Linux kernel <https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html>`__.
1804 1976
1805The class assumes you have a ``data.mount`` systemd unit defined elsewhere in your BSP 1977The class assumes you have a ``data.mount`` systemd unit defined elsewhere in your BSP
1806(e.g. in ``systemd-machine-units`` recipe) and it's installed into the image. 1978(e.g. in ``systemd-machine-units`` recipe) and it's installed into the image.
@@ -1825,7 +1997,7 @@ and then in your recipe::
1825On a practical note, your application recipe might require multiple 1997On a practical note, your application recipe might require multiple
1826overlays to be mounted before running to avoid writing to the underlying 1998overlays to be mounted before running to avoid writing to the underlying
1827file system (which can be forbidden in case of read-only file system) 1999file system (which can be forbidden in case of read-only file system)
1828To achieve that :ref:`overlayfs <ref-classes-overlayfs>` provides a ``systemd`` 2000To achieve that :ref:`ref-classes-overlayfs` provides a ``systemd``
1829helper service for mounting overlays. This helper service is named 2001helper service for mounting overlays. This helper service is named
1830``${PN}-overlays.service`` and can be depended on in your application recipe 2002``${PN}-overlays.service`` and can be depended on in your application recipe
1831(named ``application`` in the following example) ``systemd`` unit by adding 2003(named ``application`` in the following example) ``systemd`` unit by adding
@@ -1838,12 +2010,12 @@ to the unit the following::
1838.. note:: 2010.. note::
1839 2011
1840 The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it. 2012 The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it.
1841 In order to get ``/etc`` in overlayfs, see :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`. 2013 In order to get ``/etc`` in overlayfs, see :ref:`ref-classes-overlayfs-etc`.
1842 2014
1843.. _ref-classes-overlayfs-etc: 2015.. _ref-classes-overlayfs-etc:
1844 2016
1845``overlayfs-etc.bbclass`` 2017``overlayfs-etc``
1846========================= 2018=================
1847 2019
1848In order to have the ``/etc`` directory in overlayfs a special handling at early 2020In order to have the ``/etc`` directory in overlayfs a special handling at early
1849boot stage is required. The idea is to supply a custom init script that mounts 2021boot stage is required. The idea is to supply a custom init script that mounts
@@ -1887,10 +2059,10 @@ The class provides two options for ``/sbin/init`` generation:
1887 2059
1888.. _ref-classes-own-mirrors: 2060.. _ref-classes-own-mirrors:
1889 2061
1890``own-mirrors.bbclass`` 2062``own-mirrors``
1891======================= 2063===============
1892 2064
1893The ``own-mirrors`` class makes it easier to set up your own 2065The :ref:`ref-classes-own-mirrors` class makes it easier to set up your own
1894:term:`PREMIRRORS` from which to first fetch source 2066:term:`PREMIRRORS` from which to first fetch source
1895before attempting to fetch it from the upstream specified in 2067before attempting to fetch it from the upstream specified in
1896:term:`SRC_URI` within each recipe. 2068:term:`SRC_URI` within each recipe.
@@ -1906,32 +2078,22 @@ in :term:`SOURCE_MIRROR_URL`.
1906 2078
1907.. _ref-classes-package: 2079.. _ref-classes-package:
1908 2080
1909``package.bbclass`` 2081``package``
1910=================== 2082===========
1911 2083
1912The ``package`` class supports generating packages from a build's 2084The :ref:`ref-classes-package` class supports generating packages from a build's
1913output. The core generic functionality is in ``package.bbclass``. The 2085output. The core generic functionality is in ``package.bbclass``. The
1914code specific to particular package types resides in these 2086code specific to particular package types resides in these
1915package-specific classes: 2087package-specific classes: :ref:`ref-classes-package_deb`,
1916:ref:`package_deb <ref-classes-package_deb>`, 2088:ref:`ref-classes-package_rpm`, :ref:`ref-classes-package_ipk`.
1917:ref:`package_rpm <ref-classes-package_rpm>`,
1918:ref:`package_ipk <ref-classes-package_ipk>`, and
1919:ref:`package_tar <ref-classes-package_tar>`.
1920
1921.. note::
1922
1923 The
1924 package_tar
1925 class is broken and not supported. It is recommended that you do not
1926 use this class.
1927 2089
1928You can control the list of resulting package formats by using the 2090You can control the list of resulting package formats by using the
1929:term:`PACKAGE_CLASSES` variable defined in your ``conf/local.conf`` 2091:term:`PACKAGE_CLASSES` variable defined in your ``conf/local.conf``
1930configuration file, which is located in the :term:`Build Directory`. 2092configuration file, which is located in the :term:`Build Directory`.
1931When defining the variable, you can 2093When defining the variable, you can specify one or more package types.
1932specify one or more package types. Since images are generated from 2094Since images are generated from packages, a packaging class is needed
1933packages, a packaging class is needed to enable image generation. The 2095to enable image generation. The first class listed in this variable is
1934first class listed in this variable is used for image generation. 2096used for image generation.
1935 2097
1936If you take the optional step to set up a repository (package feed) on 2098If you take the optional step to set up a repository (package feed) on
1937the development host that can be used by DNF, you can install packages 2099the development host that can be used by DNF, you can install packages
@@ -1948,7 +2110,7 @@ complete build of the package with all dependencies previously built.
1948The reason for this discrepancy is because the RPM package manager 2110The reason for this discrepancy is because the RPM package manager
1949creates and processes more :term:`Metadata` than the IPK package 2111creates and processes more :term:`Metadata` than the IPK package
1950manager. Consequently, you might consider setting :term:`PACKAGE_CLASSES` to 2112manager. Consequently, you might consider setting :term:`PACKAGE_CLASSES` to
1951"package_ipk" if you are building smaller systems. 2113":ref:`ref-classes-package_ipk`" if you are building smaller systems.
1952 2114
1953Before making your package manager decision, however, you should 2115Before making your package manager decision, however, you should
1954consider some further things about using RPM: 2116consider some further things about using RPM:
@@ -1973,84 +2135,84 @@ at these two Yocto Project mailing list links:
1973 2135
1974.. _ref-classes-package_deb: 2136.. _ref-classes-package_deb:
1975 2137
1976``package_deb.bbclass`` 2138``package_deb``
1977======================= 2139===============
1978 2140
1979The ``package_deb`` class provides support for creating packages that 2141The :ref:`ref-classes-package_deb` class provides support for creating packages that
1980use the Debian (i.e. ``.deb``) file format. The class ensures the 2142use the Debian (i.e. ``.deb``) file format. The class ensures the
1981packages are written out in a ``.deb`` file format to the 2143packages are written out in a ``.deb`` file format to the
1982``${``\ :term:`DEPLOY_DIR_DEB`\ ``}`` directory. 2144``${``\ :term:`DEPLOY_DIR_DEB`\ ``}`` directory.
1983 2145
1984This class inherits the :ref:`package <ref-classes-package>` class and 2146This class inherits the :ref:`ref-classes-package` class and
1985is enabled through the :term:`PACKAGE_CLASSES` 2147is enabled through the :term:`PACKAGE_CLASSES`
1986variable in the ``local.conf`` file. 2148variable in the ``local.conf`` file.
1987 2149
1988.. _ref-classes-package_ipk: 2150.. _ref-classes-package_ipk:
1989 2151
1990``package_ipk.bbclass`` 2152``package_ipk``
1991======================= 2153===============
1992 2154
1993The ``package_ipk`` class provides support for creating packages that 2155The :ref:`ref-classes-package_ipk` class provides support for creating packages that
1994use the IPK (i.e. ``.ipk``) file format. The class ensures the packages 2156use the IPK (i.e. ``.ipk``) file format. The class ensures the packages
1995are written out in a ``.ipk`` file format to the 2157are written out in a ``.ipk`` file format to the
1996``${``\ :term:`DEPLOY_DIR_IPK`\ ``}`` directory. 2158``${``\ :term:`DEPLOY_DIR_IPK`\ ``}`` directory.
1997 2159
1998This class inherits the :ref:`package <ref-classes-package>` class and 2160This class inherits the :ref:`ref-classes-package` class and
1999is enabled through the :term:`PACKAGE_CLASSES` 2161is enabled through the :term:`PACKAGE_CLASSES`
2000variable in the ``local.conf`` file. 2162variable in the ``local.conf`` file.
2001 2163
2002.. _ref-classes-package_rpm: 2164.. _ref-classes-package_rpm:
2003 2165
2004``package_rpm.bbclass`` 2166``package_rpm``
2005======================= 2167===============
2006 2168
2007The ``package_rpm`` class provides support for creating packages that 2169The :ref:`ref-classes-package_rpm` class provides support for creating packages that
2008use the RPM (i.e. ``.rpm``) file format. The class ensures the packages 2170use the RPM (i.e. ``.rpm``) file format. The class ensures the packages
2009are written out in a ``.rpm`` file format to the 2171are written out in a ``.rpm`` file format to the
2010``${``\ :term:`DEPLOY_DIR_RPM`\ ``}`` directory. 2172``${``\ :term:`DEPLOY_DIR_RPM`\ ``}`` directory.
2011 2173
2012This class inherits the :ref:`package <ref-classes-package>` class and 2174This class inherits the :ref:`ref-classes-package` class and
2013is enabled through the :term:`PACKAGE_CLASSES` 2175is enabled through the :term:`PACKAGE_CLASSES`
2014variable in the ``local.conf`` file. 2176variable in the ``local.conf`` file.
2015 2177
2016.. _ref-classes-package_tar: 2178.. _ref-classes-package_tar:
2017 2179
2018``package_tar.bbclass`` 2180``package_tar``
2019======================= 2181===============
2020 2182
2021The ``package_tar`` class provides support for creating tarballs. The 2183The :ref:`ref-classes-package_tar` class provides support for creating tarballs. The
2022class ensures the packages are written out in a tarball format to the 2184class ensures the packages are written out in a tarball format to the
2023``${``\ :term:`DEPLOY_DIR_TAR`\ ``}`` directory. 2185``${``\ :term:`DEPLOY_DIR_TAR`\ ``}`` directory.
2024 2186
2025This class inherits the :ref:`package <ref-classes-package>` class and 2187This class inherits the :ref:`ref-classes-package` class and
2026is enabled through the :term:`PACKAGE_CLASSES` 2188is enabled through the :term:`PACKAGE_CLASSES`
2027variable in the ``local.conf`` file. 2189variable in the ``local.conf`` file.
2028 2190
2029.. note:: 2191.. note::
2030 2192
2031 You cannot specify the ``package_tar`` class first using the 2193 You cannot specify the :ref:`ref-classes-package_tar` class first using the
2032 :term:`PACKAGE_CLASSES` variable. You must use ``.deb``, ``.ipk``, or ``.rpm`` 2194 :term:`PACKAGE_CLASSES` variable. You must use ``.deb``, ``.ipk``, or ``.rpm``
2033 file formats for your image or SDK. 2195 file formats for your image or SDK.
2034 2196
2035.. _ref-classes-packagedata: 2197.. _ref-classes-packagedata:
2036 2198
2037``packagedata.bbclass`` 2199``packagedata``
2038======================= 2200===============
2039 2201
2040The ``packagedata`` class provides common functionality for reading 2202The :ref:`ref-classes-packagedata` class provides common functionality for reading
2041``pkgdata`` files found in :term:`PKGDATA_DIR`. These 2203``pkgdata`` files found in :term:`PKGDATA_DIR`. These
2042files contain information about each output package produced by the 2204files contain information about each output package produced by the
2043OpenEmbedded build system. 2205OpenEmbedded build system.
2044 2206
2045This class is enabled by default because it is inherited by the 2207This class is enabled by default because it is inherited by the
2046:ref:`package <ref-classes-package>` class. 2208:ref:`ref-classes-package` class.
2047 2209
2048.. _ref-classes-packagegroup: 2210.. _ref-classes-packagegroup:
2049 2211
2050``packagegroup.bbclass`` 2212``packagegroup``
2051======================== 2213================
2052 2214
2053The ``packagegroup`` class sets default values appropriate for package 2215The :ref:`ref-classes-packagegroup` class sets default values appropriate for package
2054group recipes (e.g. :term:`PACKAGES`, :term:`PACKAGE_ARCH`, :term:`ALLOW_EMPTY`, and 2216group recipes (e.g. :term:`PACKAGES`, :term:`PACKAGE_ARCH`, :term:`ALLOW_EMPTY`, and
2055so forth). It is highly recommended that all package group recipes 2217so forth). It is highly recommended that all package group recipes
2056inherit this class. 2218inherit this class.
@@ -2063,46 +2225,46 @@ Previously, this class was called the ``task`` class.
2063 2225
2064.. _ref-classes-patch: 2226.. _ref-classes-patch:
2065 2227
2066``patch.bbclass`` 2228``patch``
2067================= 2229=========
2068 2230
2069The ``patch`` class provides all functionality for applying patches 2231The :ref:`ref-classes-patch` class provides all functionality for applying patches
2070during the :ref:`ref-tasks-patch` task. 2232during the :ref:`ref-tasks-patch` task.
2071 2233
2072This class is enabled by default because it is inherited by the 2234This class is enabled by default because it is inherited by the
2073:ref:`base <ref-classes-base>` class. 2235:ref:`ref-classes-base` class.
2074 2236
2075.. _ref-classes-perlnative: 2237.. _ref-classes-perlnative:
2076 2238
2077``perlnative.bbclass`` 2239``perlnative``
2078====================== 2240==============
2079 2241
2080When inherited by a recipe, the ``perlnative`` class supports using the 2242When inherited by a recipe, the :ref:`ref-classes-perlnative` class supports using the
2081native version of Perl built by the build system rather than using the 2243native version of Perl built by the build system rather than using the
2082version provided by the build host. 2244version provided by the build host.
2083 2245
2084.. _ref-classes-pypi: 2246.. _ref-classes-pypi:
2085 2247
2086``pypi.bbclass`` 2248``pypi``
2087================ 2249========
2088 2250
2089The :ref:`pypi <ref-classes-pypi>` class sets variables appropriately for recipes that build 2251The :ref:`ref-classes-pypi` class sets variables appropriately for recipes that build
2090Python modules from `PyPI <https://pypi.org/>`__, the Python Package Index. 2252Python modules from `PyPI <https://pypi.org/>`__, the Python Package Index.
2091By default it determines the PyPI package name based upon :term:`BPN` 2253By default it determines the PyPI package name based upon :term:`BPN`
2092(stripping the "python-" or "python3-" prefix off if present), however in 2254(stripping the "python-" or "python3-" prefix off if present), however in
2093some cases you may need to set it manually in the recipe by setting 2255some cases you may need to set it manually in the recipe by setting
2094:term:`PYPI_PACKAGE`. 2256:term:`PYPI_PACKAGE`.
2095 2257
2096Variables set by the :ref:`pypi <ref-classes-pypi>` class include :term:`SRC_URI`, :term:`SECTION`, 2258Variables set by the :ref:`ref-classes-pypi` class include :term:`SRC_URI`, :term:`SECTION`,
2097:term:`HOMEPAGE`, :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX` 2259:term:`HOMEPAGE`, :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`
2098and :term:`CVE_PRODUCT`. 2260and :term:`CVE_PRODUCT`.
2099 2261
2100.. _ref-classes-python_flit_core: 2262.. _ref-classes-python_flit_core:
2101 2263
2102``python_flit_core.bbclass`` 2264``python_flit_core``
2103============================ 2265====================
2104 2266
2105The ``python_flit_core`` class enables building Python modules which declare 2267The :ref:`ref-classes-python_flit_core` class enables building Python modules which declare
2106the `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant 2268the `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant
2107``flit_core.buildapi`` ``build-backend`` in the ``[build-system]`` 2269``flit_core.buildapi`` ``build-backend`` in the ``[build-system]``
2108section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__). 2270section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__).
@@ -2110,42 +2272,64 @@ section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep
2110Python modules built with ``flit_core.buildapi`` are pure Python (no 2272Python modules built with ``flit_core.buildapi`` are pure Python (no
2111``C`` or ``Rust`` extensions). 2273``C`` or ``Rust`` extensions).
2112 2274
2113Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class. 2275Internally this uses the :ref:`ref-classes-python_pep517` class.
2114 2276
2115.. _ref-classes-python_pep517: 2277.. _ref-classes-python_pep517:
2116 2278
2117``python_pep517.bbclass`` 2279``python_pep517``
2118========================= 2280=================
2119 2281
2120The ``python_pep517`` class builds and installs a Python ``wheel`` binary 2282The :ref:`ref-classes-python_pep517` class builds and installs a Python ``wheel`` binary
2121archive (see `PEP-517 <https://peps.python.org/pep-0517/>`__). 2283archive (see `PEP-517 <https://peps.python.org/pep-0517/>`__).
2122 2284
2123Recipes wouldn't inherit this directly, instead typically another class will 2285Recipes wouldn't inherit this directly, instead typically another class will
2124inherit this, add the relevant native dependencies, and set 2286inherit this and add the relevant native dependencies.
2125:term:`PEP517_BUILD_API` to the Python class which implements the PEP-517 build
2126API.
2127 2287
2128Examples of classes which do this are :ref:`python_flit_core 2288Examples of classes which do this are :ref:`ref-classes-python_flit_core`,
2129<ref-classes-python_flit_core>`, :ref:`python_setuptools_build_meta 2289:ref:`ref-classes-python_setuptools_build_meta`, and
2130<ref-classes-python_setuptools_build_meta>`, and :ref:`python_poetry_core 2290:ref:`ref-classes-python_poetry_core`.
2131<ref-classes-python_poetry_core>`.
2132 2291
2133.. _ref-classes-python_poetry_core: 2292.. _ref-classes-python_poetry_core:
2134 2293
2135``python_poetry_core.bbclass`` 2294``python_poetry_core``
2136============================== 2295======================
2137 2296
2138The ``python_poetry_core`` class enables building Python modules which use the 2297The :ref:`ref-classes-python_poetry_core` class enables building Python modules which use the
2139`Poetry Core <https://python-poetry.org>`__ build system. 2298`Poetry Core <https://python-poetry.org>`__ build system.
2140 2299
2141Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class. 2300Internally this uses the :ref:`ref-classes-python_pep517` class.
2301
2302.. _ref-classes-python_pyo3:
2303
2304``python_pyo3``
2305===============
2306
2307The :ref:`ref-classes-python_pyo3` class helps make sure that Python extensions
2308written in Rust and built with `PyO3 <https://pyo3.rs/>`__, properly set up the
2309environment for cross compilation.
2310
2311This class is internal to the :ref:`ref-classes-python-setuptools3_rust` class
2312and is not meant to be used directly in recipes.
2313
2314.. _ref-classes-python-setuptools3_rust:
2315
2316``python-setuptools3_rust``
2317===========================
2318
2319The :ref:`ref-classes-python-setuptools3_rust` class enables building Python
2320extensions implemented in Rust with `PyO3 <https://pyo3.rs/>`__, which allows
2321to compile and distribute Python extensions written in Rust as easily
2322as if they were written in C.
2323
2324This class inherits the :ref:`ref-classes-setuptools3` and
2325:ref:`ref-classes-python_pyo3` classes.
2142 2326
2143.. _ref-classes-pixbufcache: 2327.. _ref-classes-pixbufcache:
2144 2328
2145``pixbufcache.bbclass`` 2329``pixbufcache``
2146======================= 2330===============
2147 2331
2148The ``pixbufcache`` class generates the proper post-install and 2332The :ref:`ref-classes-pixbufcache` class generates the proper post-install and
2149post-remove (postinst/postrm) scriptlets for packages that install 2333post-remove (postinst/postrm) scriptlets for packages that install
2150pixbuf loaders, which are used with ``gdk-pixbuf``. These scriptlets 2334pixbuf loaders, which are used with ``gdk-pixbuf``. These scriptlets
2151call ``update_pixbuf_cache`` to add the pixbuf loaders to the cache. 2335call ``update_pixbuf_cache`` to add the pixbuf loaders to the cache.
@@ -2160,24 +2344,24 @@ containing the loaders.
2160 2344
2161.. _ref-classes-pkgconfig: 2345.. _ref-classes-pkgconfig:
2162 2346
2163``pkgconfig.bbclass`` 2347``pkgconfig``
2164===================== 2348=============
2165 2349
2166The ``pkgconfig`` class provides a standard way to get header and 2350The :ref:`ref-classes-pkgconfig` class provides a standard way to get header and
2167library information by using ``pkg-config``. This class aims to smooth 2351library information by using ``pkg-config``. This class aims to smooth
2168integration of ``pkg-config`` into libraries that use it. 2352integration of ``pkg-config`` into libraries that use it.
2169 2353
2170During staging, BitBake installs ``pkg-config`` data into the 2354During staging, BitBake installs ``pkg-config`` data into the
2171``sysroots/`` directory. By making use of sysroot functionality within 2355``sysroots/`` directory. By making use of sysroot functionality within
2172``pkg-config``, the ``pkgconfig`` class no longer has to manipulate the 2356``pkg-config``, the :ref:`ref-classes-pkgconfig` class no longer has to manipulate the
2173files. 2357files.
2174 2358
2175.. _ref-classes-populate-sdk: 2359.. _ref-classes-populate-sdk:
2176 2360
2177``populate_sdk.bbclass`` 2361``populate_sdk``
2178======================== 2362================
2179 2363
2180The ``populate_sdk`` class provides support for SDK-only recipes. For 2364The :ref:`ref-classes-populate-sdk` class provides support for SDK-only recipes. For
2181information on advantages gained when building a cross-development 2365information on advantages gained when building a cross-development
2182toolchain using the :ref:`ref-tasks-populate_sdk` 2366toolchain using the :ref:`ref-tasks-populate_sdk`
2183task, see the ":ref:`sdk-manual/appendix-obtain:building an sdk installer`" 2367task, see the ":ref:`sdk-manual/appendix-obtain:building an sdk installer`"
@@ -2186,34 +2370,34 @@ Software Development Kit (eSDK) manual.
2186 2370
2187.. _ref-classes-populate-sdk-*: 2371.. _ref-classes-populate-sdk-*:
2188 2372
2189``populate_sdk_*.bbclass`` 2373``populate_sdk_*``
2190========================== 2374==================
2191 2375
2192The ``populate_sdk_*`` classes support SDK creation and consist of the 2376The :ref:`ref-classes-populate-sdk-*` classes support SDK creation and consist of the
2193following classes: 2377following classes:
2194 2378
2195- ``populate_sdk_base``: The base class supporting SDK creation under 2379- :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`: The base class supporting SDK creation under
2196 all package managers (i.e. DEB, RPM, and opkg). 2380 all package managers (i.e. DEB, RPM, and opkg).
2197 2381
2198- ``populate_sdk_deb``: Supports creation of the SDK given the Debian 2382- :ref:`populate_sdk_deb <ref-classes-populate-sdk-*>`: Supports creation of the SDK given the Debian
2199 package manager. 2383 package manager.
2200 2384
2201- ``populate_sdk_rpm``: Supports creation of the SDK given the RPM 2385- :ref:`populate_sdk_rpm <ref-classes-populate-sdk-*>`: Supports creation of the SDK given the RPM
2202 package manager. 2386 package manager.
2203 2387
2204- ``populate_sdk_ipk``: Supports creation of the SDK given the opkg 2388- :ref:`populate_sdk_ipk <ref-classes-populate-sdk-*>`: Supports creation of the SDK given the opkg
2205 (IPK format) package manager. 2389 (IPK format) package manager.
2206 2390
2207- ``populate_sdk_ext``: Supports extensible SDK creation under all 2391- :ref:`populate_sdk_ext <ref-classes-populate-sdk-*>`: Supports extensible SDK creation under all
2208 package managers. 2392 package managers.
2209 2393
2210The ``populate_sdk_base`` class inherits the appropriate 2394The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class inherits the appropriate
2211``populate_sdk_*`` (i.e. ``deb``, ``rpm``, and ``ipk``) based on 2395``populate_sdk_*`` (i.e. ``deb``, ``rpm``, and ``ipk``) based on
2212:term:`IMAGE_PKGTYPE`. 2396:term:`IMAGE_PKGTYPE`.
2213 2397
2214The base class ensures all source and destination directories are 2398The base class ensures all source and destination directories are
2215established and then populates the SDK. After populating the SDK, the 2399established and then populates the SDK. After populating the SDK, the
2216``populate_sdk_base`` class constructs two sysroots: 2400:ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class constructs two sysroots:
2217``${``\ :term:`SDK_ARCH`\ ``}-nativesdk``, which 2401``${``\ :term:`SDK_ARCH`\ ``}-nativesdk``, which
2218contains the cross-compiler and associated tooling, and the target, 2402contains the cross-compiler and associated tooling, and the target,
2219which contains a target root filesystem that is configured for the SDK 2403which contains a target root filesystem that is configured for the SDK
@@ -2226,9 +2410,9 @@ which consists of the following::
2226Finally, the base populate SDK class creates the toolchain environment 2410Finally, the base populate SDK class creates the toolchain environment
2227setup script, the tarball of the SDK, and the installer. 2411setup script, the tarball of the SDK, and the installer.
2228 2412
2229The respective ``populate_sdk_deb``, ``populate_sdk_rpm``, and 2413The respective :ref:`populate_sdk_deb <ref-classes-populate-sdk-*>`, :ref:`populate_sdk_rpm <ref-classes-populate-sdk-*>`, and
2230``populate_sdk_ipk`` classes each support the specific type of SDK. 2414:ref:`populate_sdk_ipk <ref-classes-populate-sdk-*>` classes each support the specific type of SDK.
2231These classes are inherited by and used with the ``populate_sdk_base`` 2415These classes are inherited by and used with the :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
2232class. 2416class.
2233 2417
2234For more information on the cross-development toolchain generation, see 2418For more information on the cross-development toolchain generation, see
@@ -2243,10 +2427,10 @@ Software Development Kit (eSDK) manual.
2243 2427
2244.. _ref-classes-prexport: 2428.. _ref-classes-prexport:
2245 2429
2246``prexport.bbclass`` 2430``prexport``
2247==================== 2431============
2248 2432
2249The ``prexport`` class provides functionality for exporting 2433The :ref:`ref-classes-prexport` class provides functionality for exporting
2250:term:`PR` values. 2434:term:`PR` values.
2251 2435
2252.. note:: 2436.. note::
@@ -2256,10 +2440,10 @@ The ``prexport`` class provides functionality for exporting
2256 2440
2257.. _ref-classes-primport: 2441.. _ref-classes-primport:
2258 2442
2259``primport.bbclass`` 2443``primport``
2260==================== 2444============
2261 2445
2262The ``primport`` class provides functionality for importing 2446The :ref:`ref-classes-primport` class provides functionality for importing
2263:term:`PR` values. 2447:term:`PR` values.
2264 2448
2265.. note:: 2449.. note::
@@ -2269,8 +2453,8 @@ The ``primport`` class provides functionality for importing
2269 2453
2270.. _ref-classes-prserv: 2454.. _ref-classes-prserv:
2271 2455
2272``prserv.bbclass`` 2456``prserv``
2273================== 2457==========
2274 2458
2275The :ref:`ref-classes-prserv` class provides functionality for using a :ref:`PR 2459The :ref:`ref-classes-prserv` class provides functionality for using a :ref:`PR
2276service <dev-manual/packages:working with a pr service>` in order to 2460service <dev-manual/packages:working with a pr service>` in order to
@@ -2278,14 +2462,14 @@ automatically manage the incrementing of the :term:`PR`
2278variable for each recipe. 2462variable for each recipe.
2279 2463
2280This class is enabled by default because it is inherited by the 2464This class is enabled by default because it is inherited by the
2281:ref:`package <ref-classes-package>` class. However, the OpenEmbedded 2465:ref:`ref-classes-package` class. However, the OpenEmbedded
2282build system will not enable the functionality of this class unless 2466build system will not enable the functionality of this class unless
2283:term:`PRSERV_HOST` has been set. 2467:term:`PRSERV_HOST` has been set.
2284 2468
2285.. _ref-classes-ptest: 2469.. _ref-classes-ptest:
2286 2470
2287``ptest.bbclass`` 2471``ptest``
2288================= 2472=========
2289 2473
2290The ``ptest`` class provides functionality for packaging and installing 2474The ``ptest`` class provides functionality for packaging and installing
2291runtime tests for recipes that build software that provides these tests. 2475runtime tests for recipes that build software that provides these tests.
@@ -2299,8 +2483,8 @@ on ptest.
2299 2483
2300.. _ref-classes-ptest-gnome: 2484.. _ref-classes-ptest-gnome:
2301 2485
2302``ptest-gnome.bbclass`` 2486``ptest-gnome``
2303======================= 2487===============
2304 2488
2305Enables package tests (ptests) specifically for GNOME packages, which 2489Enables package tests (ptests) specifically for GNOME packages, which
2306have tests intended to be executed with ``gnome-desktop-testing``. 2490have tests intended to be executed with ``gnome-desktop-testing``.
@@ -2311,27 +2495,27 @@ section in the Yocto Project Development Tasks Manual.
2311 2495
2312.. _ref-classes-python3-dir: 2496.. _ref-classes-python3-dir:
2313 2497
2314``python3-dir.bbclass`` 2498``python3-dir``
2315======================= 2499===============
2316 2500
2317The ``python3-dir`` class provides the base version, location, and site 2501The :ref:`ref-classes-python3-dir` class provides the base version, location, and site
2318package location for Python 3. 2502package location for Python 3.
2319 2503
2320.. _ref-classes-python3native: 2504.. _ref-classes-python3native:
2321 2505
2322``python3native.bbclass`` 2506``python3native``
2323========================= 2507=================
2324 2508
2325The ``python3native`` class supports using the native version of Python 2509The :ref:`ref-classes-python3native` class supports using the native version of Python
23263 built by the build system rather than support of the version provided 25103 built by the build system rather than support of the version provided
2327by the build host. 2511by the build host.
2328 2512
2329.. _ref-classes-python3targetconfig: 2513.. _ref-classes-python3targetconfig:
2330 2514
2331``python3targetconfig.bbclass`` 2515``python3targetconfig``
2332=============================== 2516=======================
2333 2517
2334The ``python3targetconfig`` class supports using the native version of Python 2518The :ref:`ref-classes-python3targetconfig` class supports using the native version of Python
23353 built by the build system rather than support of the version provided 25193 built by the build system rather than support of the version provided
2336by the build host, except that the configuration for the target machine 2520by the build host, except that the configuration for the target machine
2337is accessible (such as correct installation directories). This also adds a 2521is accessible (such as correct installation directories). This also adds a
@@ -2340,41 +2524,40 @@ in order to avoid unnecessarily lengthening builds.
2340 2524
2341.. _ref-classes-qemu: 2525.. _ref-classes-qemu:
2342 2526
2343``qemu.bbclass`` 2527``qemu``
2344================ 2528========
2345 2529
2346The ``qemu`` class provides functionality for recipes that either need 2530The :ref:`ref-classes-qemu` class provides functionality for recipes that either need
2347QEMU or test for the existence of QEMU. Typically, this class is used to 2531QEMU or test for the existence of QEMU. Typically, this class is used to
2348run programs for a target system on the build host using QEMU's 2532run programs for a target system on the build host using QEMU's
2349application emulation mode. 2533application emulation mode.
2350 2534
2351.. _ref-classes-recipe_sanity: 2535.. _ref-classes-recipe_sanity:
2352 2536
2353``recipe_sanity.bbclass`` 2537``recipe_sanity``
2354========================= 2538=================
2355 2539
2356The ``recipe_sanity`` class checks for the presence of any host system 2540The :ref:`ref-classes-recipe_sanity` class checks for the presence of any host system
2357recipe prerequisites that might affect the build (e.g. variables that 2541recipe prerequisites that might affect the build (e.g. variables that
2358are set or software that is present). 2542are set or software that is present).
2359 2543
2360.. _ref-classes-relocatable: 2544.. _ref-classes-relocatable:
2361 2545
2362``relocatable.bbclass`` 2546``relocatable``
2363======================= 2547===============
2364 2548
2365The ``relocatable`` class enables relocation of binaries when they are 2549The :ref:`ref-classes-relocatable` class enables relocation of binaries when they are
2366installed into the sysroot. 2550installed into the sysroot.
2367 2551
2368This class makes use of the :ref:`chrpath <ref-classes-chrpath>` class 2552This class makes use of the :ref:`ref-classes-chrpath` class and is used by
2369and is used by both the :ref:`cross <ref-classes-cross>` and 2553both the :ref:`ref-classes-cross` and :ref:`ref-classes-native` classes.
2370:ref:`native <ref-classes-native>` classes.
2371 2554
2372.. _ref-classes-remove-libtool: 2555.. _ref-classes-remove-libtool:
2373 2556
2374``remove-libtool.bbclass`` 2557``remove-libtool``
2375========================== 2558==================
2376 2559
2377The ``remove-libtool`` class adds a post function to the 2560The :ref:`ref-classes-remove-libtool` class adds a post function to the
2378:ref:`ref-tasks-install` task to remove all ``.la`` files 2561:ref:`ref-tasks-install` task to remove all ``.la`` files
2379installed by ``libtool``. Removing these files results in them being 2562installed by ``libtool``. Removing these files results in them being
2380absent from both the sysroot and target packages. 2563absent from both the sysroot and target packages.
@@ -2386,12 +2569,12 @@ override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows::
2386 2569
2387.. note:: 2570.. note::
2388 2571
2389 The ``remove-libtool`` class is not enabled by default. 2572 The :ref:`ref-classes-remove-libtool` class is not enabled by default.
2390 2573
2391.. _ref-classes-report-error: 2574.. _ref-classes-report-error:
2392 2575
2393``report-error.bbclass`` 2576``report-error``
2394======================== 2577================
2395 2578
2396The :ref:`ref-classes-report-error` class supports enabling the :ref:`error reporting 2579The :ref:`ref-classes-report-error` class supports enabling the :ref:`error reporting
2397tool <dev-manual/error-reporting-tool:using the error reporting tool>`", 2580tool <dev-manual/error-reporting-tool:using the error reporting tool>`",
@@ -2405,10 +2588,10 @@ are created and stored in
2405 2588
2406.. _ref-classes-rm-work: 2589.. _ref-classes-rm-work:
2407 2590
2408``rm_work.bbclass`` 2591``rm_work``
2409=================== 2592===========
2410 2593
2411The ``rm_work`` class supports deletion of temporary workspace, which 2594The :ref:`ref-classes-rm-work` class supports deletion of temporary workspace, which
2412can ease your hard drive demands during builds. 2595can ease your hard drive demands during builds.
2413 2596
2414The OpenEmbedded build system can use a substantial amount of disk space 2597The OpenEmbedded build system can use a substantial amount of disk space
@@ -2417,60 +2600,76 @@ under the ``${TMPDIR}/work`` directory for each recipe. Once the build
2417system generates the packages for a recipe, the work files for that 2600system generates the packages for a recipe, the work files for that
2418recipe are no longer needed. However, by default, the build system 2601recipe are no longer needed. However, by default, the build system
2419preserves these files for inspection and possible debugging purposes. If 2602preserves these files for inspection and possible debugging purposes. If
2420you would rather have these files deleted to save disk space as the 2603you would rather have these files deleted to save disk space as the build
2421build progresses, you can enable ``rm_work`` by adding the following to 2604progresses, you can enable :ref:`ref-classes-rm-work` by adding the following to
2422your ``local.conf`` file, which is found in the :term:`Build Directory`. 2605your ``local.conf`` file, which is found in the :term:`Build Directory`::
2423::
2424 2606
2425 INHERIT += "rm_work" 2607 INHERIT += "rm_work"
2426 2608
2427If you are 2609If you are modifying and building source code out of the work directory for a
2428modifying and building source code out of the work directory for a 2610recipe, enabling :ref:`ref-classes-rm-work` will potentially result in your
2429recipe, enabling ``rm_work`` will potentially result in your changes to 2611changes to the source being lost. To exclude some recipes from having their work
2430the source being lost. To exclude some recipes from having their work 2612directories deleted by :ref:`ref-classes-rm-work`, you can add the names of the
2431directories deleted by ``rm_work``, you can add the names of the recipe 2613recipe or recipes you are working on to the :term:`RM_WORK_EXCLUDE` variable,
2432or recipes you are working on to the :term:`RM_WORK_EXCLUDE` variable, which 2614which can also be set in your ``local.conf`` file. Here is an example::
2433can also be set in your ``local.conf`` file. Here is an example::
2434 2615
2435 RM_WORK_EXCLUDE += "busybox glibc" 2616 RM_WORK_EXCLUDE += "busybox glibc"
2436 2617
2437.. _ref-classes-rootfs*: 2618.. _ref-classes-rootfs*:
2438 2619
2439``rootfs*.bbclass`` 2620``rootfs*``
2440=================== 2621===========
2441 2622
2442The ``rootfs*`` classes support creating the root filesystem for an 2623The :ref:`ref-classes-rootfs*` classes support creating the root filesystem for an
2443image and consist of the following classes: 2624image and consist of the following classes:
2444 2625
2445- The ``rootfs-postcommands`` class, which defines filesystem 2626- The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class, which defines filesystem
2446 post-processing functions for image recipes. 2627 post-processing functions for image recipes.
2447 2628
2448- The ``rootfs_deb`` class, which supports creation of root filesystems 2629- The :ref:`rootfs_deb <ref-classes-rootfs*>` class, which supports creation of root filesystems
2449 for images built using ``.deb`` packages. 2630 for images built using ``.deb`` packages.
2450 2631
2451- The ``rootfs_rpm`` class, which supports creation of root filesystems 2632- The :ref:`rootfs_rpm <ref-classes-rootfs*>` class, which supports creation of root filesystems
2452 for images built using ``.rpm`` packages. 2633 for images built using ``.rpm`` packages.
2453 2634
2454- The ``rootfs_ipk`` class, which supports creation of root filesystems 2635- The :ref:`rootfs_ipk <ref-classes-rootfs*>` class, which supports creation of root filesystems
2455 for images built using ``.ipk`` packages. 2636 for images built using ``.ipk`` packages.
2456 2637
2457- The ``rootfsdebugfiles`` class, which installs additional files found 2638- The :ref:`rootfsdebugfiles <ref-classes-rootfs*>` class, which installs additional files found
2458 on the build host directly into the root filesystem. 2639 on the build host directly into the root filesystem.
2459 2640
2460The root filesystem is created from packages using one of the 2641The root filesystem is created from packages using one of the
2461``rootfs*.bbclass`` files as determined by the 2642:ref:`ref-classes-rootfs*` files as determined by the :term:`PACKAGE_CLASSES`
2462:term:`PACKAGE_CLASSES` variable. 2643variable.
2463 2644
2464For information on how root filesystem images are created, see the 2645For information on how root filesystem images are created, see the
2465":ref:`overview-manual/concepts:image generation`" 2646":ref:`overview-manual/concepts:image generation`"
2466section in the Yocto Project Overview and Concepts Manual. 2647section in the Yocto Project Overview and Concepts Manual.
2467 2648
2649.. _ref-classes-rust:
2650
2651``rust``
2652========
2653
2654The :ref:`ref-classes-rust` class is an internal class which is just used
2655in the "rust" recipe, to build the Rust compiler and runtime
2656library. Except for this recipe, it is not intended to be used directly.
2657
2658.. _ref-classes-rust-common:
2659
2660``rust-common``
2661===============
2662
2663The :ref:`ref-classes-rust-common` class is an internal class to the
2664:ref:`ref-classes-cargo_common` and :ref:`ref-classes-rust` classes and is not
2665intended to be used directly.
2666
2468.. _ref-classes-sanity: 2667.. _ref-classes-sanity:
2469 2668
2470``sanity.bbclass`` 2669``sanity``
2471================== 2670==========
2472 2671
2473The ``sanity`` class checks to see if prerequisite software is present 2672The :ref:`ref-classes-sanity` class checks to see if prerequisite software is present
2474on the host system so that users can be notified of potential problems 2673on the host system so that users can be notified of potential problems
2475that might affect their build. The class also performs basic user 2674that might affect their build. The class also performs basic user
2476configuration checks from the ``local.conf`` configuration file to 2675configuration checks from the ``local.conf`` configuration file to
@@ -2479,29 +2678,29 @@ usually determines whether to include this class.
2479 2678
2480.. _ref-classes-scons: 2679.. _ref-classes-scons:
2481 2680
2482``scons.bbclass`` 2681``scons``
2483================= 2682=========
2484 2683
2485The ``scons`` class supports recipes that need to build software that 2684The :ref:`ref-classes-scons` class supports recipes that need to build software
2486uses the SCons build system. You can use the 2685that uses the SCons build system. You can use the :term:`EXTRA_OESCONS`
2487:term:`EXTRA_OESCONS` variable to specify 2686variable to specify additional configuration options you want to pass SCons
2488additional configuration options you want to pass SCons command line. 2687command line.
2489 2688
2490.. _ref-classes-sdl: 2689.. _ref-classes-sdl:
2491 2690
2492``sdl.bbclass`` 2691``sdl``
2493=============== 2692=======
2494 2693
2495The ``sdl`` class supports recipes that need to build software that uses 2694The :ref:`ref-classes-sdl` class supports recipes that need to build software that uses
2496the Simple DirectMedia Layer (SDL) library. 2695the Simple DirectMedia Layer (SDL) library.
2497 2696
2498.. _ref-classes-python_setuptools_build_meta: 2697.. _ref-classes-python_setuptools_build_meta:
2499 2698
2500``python_setuptools_build_meta.bbclass`` 2699``python_setuptools_build_meta``
2501======================================== 2700================================
2502 2701
2503The ``python_setuptools_build_meta`` class enables building Python modules which 2702The :ref:`ref-classes-python_setuptools_build_meta` class enables building
2504declare the 2703Python modules which declare the
2505`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant 2704`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant
2506``setuptools.build_meta`` ``build-backend`` in the ``[build-system]`` 2705``setuptools.build_meta`` ``build-backend`` in the ``[build-system]``
2507section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__). 2706section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__).
@@ -2509,21 +2708,22 @@ section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep
2509Python modules built with ``setuptools.build_meta`` can be pure Python or 2708Python modules built with ``setuptools.build_meta`` can be pure Python or
2510include ``C`` or ``Rust`` extensions). 2709include ``C`` or ``Rust`` extensions).
2511 2710
2512Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class. 2711Internally this uses the :ref:`ref-classes-python_pep517` class.
2513 2712
2514.. _ref-classes-setuptools3: 2713.. _ref-classes-setuptools3:
2515 2714
2516``setuptools3.bbclass`` 2715``setuptools3``
2517======================= 2716===============
2518 2717
2519The ``setuptools3`` class supports Python version 3.x extensions that 2718The :ref:`ref-classes-setuptools3` class supports Python version 3.x extensions
2520use build systems based on ``setuptools`` (e.g. only have a ``setup.py`` and 2719that use build systems based on ``setuptools`` (e.g. only have a ``setup.py``
2521have not migrated to the official ``pyproject.toml`` format). If your recipe 2720and have not migrated to the official ``pyproject.toml`` format). If your recipe
2522uses these build systems, the recipe needs to inherit the ``setuptools3`` class. 2721uses these build systems, the recipe needs to inherit the
2722:ref:`ref-classes-setuptools3` class.
2523 2723
2524 .. note:: 2724 .. note::
2525 2725
2526 The ``setuptools3`` class ``do_compile()`` task now calls 2726 The :ref:`ref-classes-setuptools3` class :ref:`ref-tasks-compile` task now calls
2527 ``setup.py bdist_wheel`` to build the ``wheel`` binary archive format 2727 ``setup.py bdist_wheel`` to build the ``wheel`` binary archive format
2528 (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__). 2728 (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__).
2529 2729
@@ -2534,69 +2734,61 @@ uses these build systems, the recipe needs to inherit the ``setuptools3`` class.
2534 2734
2535 .. note:: 2735 .. note::
2536 2736
2537 The ``setuptools3`` class ``do_install()`` task now installs the ``wheel`` 2737 The :ref:`ref-classes-setuptools3` class :ref:`ref-tasks-install` task now
2538 binary archive. In current versions of ``setuptools`` the legacy ``setup.py 2738 installs the ``wheel`` binary archive. In current versions of
2539 install`` method is deprecated. If the ``setup.py`` cannot be used with 2739 ``setuptools`` the legacy ``setup.py install`` method is deprecated. If
2540 wheels, for example it creates files outside of the Python module or 2740 the ``setup.py`` cannot be used with wheels, for example it creates files
2541 standard entry points, then :ref:`setuptools3_legacy 2741 outside of the Python module or standard entry points, then
2542 <ref-classes-setuptools3_legacy>` should be used. 2742 :ref:`ref-classes-setuptools3_legacy` should be used.
2543 2743
2544.. _ref-classes-setuptools3_legacy: 2744.. _ref-classes-setuptools3_legacy:
2545 2745
2546``setuptools3_legacy.bbclass`` 2746``setuptools3_legacy``
2547============================== 2747======================
2548 2748
2549The ``setuptools3_legacy`` class supports Python version 3.x extensions that use 2749The :ref:`ref-classes-setuptools3_legacy` class supports
2550build systems based on ``setuptools`` (e.g. only have a ``setup.py`` and have 2750Python version 3.x extensions that use build systems based on ``setuptools``
2551not migrated to the official ``pyproject.toml`` format). Unlike 2751(e.g. only have a ``setup.py`` and have not migrated to the official
2552``setuptools3.bbclass``, this uses the traditional ``setup.py`` ``build`` and 2752``pyproject.toml`` format). Unlike :ref:`ref-classes-setuptools3`,
2553``install`` commands and not wheels. This use of ``setuptools`` like this is 2753this uses the traditional ``setup.py`` ``build`` and ``install`` commands and
2554`deprecated <https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v5830>`_ 2754not wheels. This use of ``setuptools`` like this is
2755`deprecated <https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v5830>`__
2555but still relatively common. 2756but still relatively common.
2556 2757
2557.. _ref-classes-setuptools3-base: 2758.. _ref-classes-setuptools3-base:
2558 2759
2559``setuptools3-base.bbclass`` 2760``setuptools3-base``
2560============================
2561
2562The ``setuptools3-base`` class provides a reusable base for other classes
2563that support building Python version 3.x extensions. If you need
2564functionality that is not provided by the :ref:`setuptools3 <ref-classes-setuptools3>` class, you may
2565want to ``inherit setuptools3-base``. Some recipes do not need the tasks
2566in the :ref:`setuptools3 <ref-classes-setuptools3>` class and inherit this class instead.
2567
2568.. _ref-classes-sign_rpm:
2569
2570``sign_rpm.bbclass``
2571==================== 2761====================
2572 2762
2573The ``sign_rpm`` class supports generating signed RPM packages. 2763The :ref:`ref-classes-setuptools3-base` class provides a reusable base for
2764other classes that support building Python version 3.x extensions. If you need
2765functionality that is not provided by the :ref:`ref-classes-setuptools3` class,
2766you may want to ``inherit setuptools3-base``. Some recipes do not need the tasks
2767in the :ref:`ref-classes-setuptools3` class and inherit this class instead.
2574 2768
2575.. _ref-classes-sip: 2769.. _ref-classes-sign_rpm:
2576 2770
2577``sip.bbclass`` 2771``sign_rpm``
2578=============== 2772============
2579 2773
2580The ``sip`` class supports recipes that build or package SIP-based 2774The :ref:`ref-classes-sign_rpm` class supports generating signed RPM packages.
2581Python bindings.
2582 2775
2583.. _ref-classes-siteconfig: 2776.. _ref-classes-siteconfig:
2584 2777
2585``siteconfig.bbclass`` 2778``siteconfig``
2586====================== 2779==============
2587 2780
2588The ``siteconfig`` class provides functionality for handling site 2781The :ref:`ref-classes-siteconfig` class provides functionality for handling site
2589configuration. The class is used by the 2782configuration. The class is used by the :ref:`ref-classes-autotools` class to
2590:ref:`autotools <ref-classes-autotools>` class to accelerate the 2783accelerate the :ref:`ref-tasks-configure` task.
2591:ref:`ref-tasks-configure` task.
2592 2784
2593.. _ref-classes-siteinfo: 2785.. _ref-classes-siteinfo:
2594 2786
2595``siteinfo.bbclass`` 2787``siteinfo``
2596==================== 2788============
2597 2789
2598The ``siteinfo`` class provides information about the targets that might 2790The :ref:`ref-classes-siteinfo` class provides information about the targets
2599be needed by other classes or recipes. 2791that might be needed by other classes or recipes.
2600 2792
2601As an example, consider Autotools, which can require tests that must 2793As an example, consider Autotools, which can require tests that must
2602execute on the target hardware. Since this is not possible in general 2794execute on the target hardware. Since this is not possible in general
@@ -2613,12 +2805,12 @@ The class also provides variables like :term:`SITEINFO_ENDIANNESS` and
2613 2805
2614.. _ref-classes-sstate: 2806.. _ref-classes-sstate:
2615 2807
2616``sstate.bbclass`` 2808``sstate``
2617================== 2809==========
2618 2810
2619The ``sstate`` class provides support for Shared State (sstate). By 2811The :ref:`ref-classes-sstate` class provides support for Shared State (sstate).
2620default, the class is enabled through the 2812By default, the class is enabled through the :term:`INHERIT_DISTRO` variable's
2621:term:`INHERIT_DISTRO` variable's default value. 2813default value.
2622 2814
2623For more information on sstate, see the 2815For more information on sstate, see the
2624":ref:`overview-manual/concepts:shared state cache`" 2816":ref:`overview-manual/concepts:shared state cache`"
@@ -2626,10 +2818,10 @@ section in the Yocto Project Overview and Concepts Manual.
2626 2818
2627.. _ref-classes-staging: 2819.. _ref-classes-staging:
2628 2820
2629``staging.bbclass`` 2821``staging``
2630=================== 2822===========
2631 2823
2632The ``staging`` class installs files into individual recipe work 2824The :ref:`ref-classes-staging` class installs files into individual recipe work
2633directories for sysroots. The class contains the following key tasks: 2825directories for sysroots. The class contains the following key tasks:
2634 2826
2635- The :ref:`ref-tasks-populate_sysroot` task, 2827- The :ref:`ref-tasks-populate_sysroot` task,
@@ -2642,14 +2834,14 @@ directories for sysroots. The class contains the following key tasks:
2642 installs the files into the individual recipe work directories (i.e. 2834 installs the files into the individual recipe work directories (i.e.
2643 :term:`WORKDIR`). 2835 :term:`WORKDIR`).
2644 2836
2645The code in the ``staging`` class is complex and basically works in two 2837The code in the :ref:`ref-classes-staging` class is complex and basically works
2646stages: 2838in two stages:
2647 2839
2648- *Stage One:* The first stage addresses recipes that have files they 2840- *Stage One:* The first stage addresses recipes that have files they
2649 want to share with other recipes that have dependencies on the 2841 want to share with other recipes that have dependencies on the
2650 originating recipe. Normally these dependencies are installed through 2842 originating recipe. Normally these dependencies are installed through
2651 the :ref:`ref-tasks-install` task into 2843 the :ref:`ref-tasks-install` task into
2652 ``${``\ :term:`D`\ ``}``. The ``do_populate_sysroot`` task 2844 ``${``\ :term:`D`\ ``}``. The :ref:`ref-tasks-populate_sysroot` task
2653 copies a subset of these files into ``${SYSROOT_DESTDIR}``. This 2845 copies a subset of these files into ``${SYSROOT_DESTDIR}``. This
2654 subset of files is controlled by the 2846 subset of files is controlled by the
2655 :term:`SYSROOT_DIRS`, 2847 :term:`SYSROOT_DIRS`,
@@ -2716,8 +2908,7 @@ stages:
2716 dependencies traversed or installed. The same sstate dependency code 2908 dependencies traversed or installed. The same sstate dependency code
2717 is used so that builds should be identical regardless of whether 2909 is used so that builds should be identical regardless of whether
2718 sstate was used or not. For a closer look, see the 2910 sstate was used or not. For a closer look, see the
2719 ``setscene_depvalid()`` function in the 2911 ``setscene_depvalid()`` function in the :ref:`ref-classes-sstate` class.
2720 :ref:`sstate <ref-classes-sstate>` class.
2721 2912
2722 The build system is careful to maintain manifests of the files it 2913 The build system is careful to maintain manifests of the files it
2723 installs so that any given dependency can be installed as needed. The 2914 installs so that any given dependency can be installed as needed. The
@@ -2726,11 +2917,11 @@ stages:
2726 2917
2727.. _ref-classes-syslinux: 2918.. _ref-classes-syslinux:
2728 2919
2729``syslinux.bbclass`` 2920``syslinux``
2730==================== 2921============
2731 2922
2732The ``syslinux`` class provides syslinux-specific functions for building 2923The :ref:`ref-classes-syslinux` class provides syslinux-specific functions for
2733bootable images. 2924building bootable images.
2734 2925
2735The class supports the following variables: 2926The class supports the following variables:
2736 2927
@@ -2769,11 +2960,11 @@ The class supports the following variables:
2769 2960
2770.. _ref-classes-systemd: 2961.. _ref-classes-systemd:
2771 2962
2772``systemd.bbclass`` 2963``systemd``
2773=================== 2964===========
2774 2965
2775The ``systemd`` class provides support for recipes that install systemd 2966The :ref:`ref-classes-systemd` class provides support for recipes that install
2776unit files. 2967systemd unit files.
2777 2968
2778The functionality for this class is disabled unless you have "systemd" 2969The functionality for this class is disabled unless you have "systemd"
2779in :term:`DISTRO_FEATURES`. 2970in :term:`DISTRO_FEATURES`.
@@ -2804,21 +2995,21 @@ section in the Yocto Project Development Tasks Manual.
2804 2995
2805.. _ref-classes-systemd-boot: 2996.. _ref-classes-systemd-boot:
2806 2997
2807``systemd-boot.bbclass`` 2998``systemd-boot``
2808======================== 2999================
2809 3000
2810The ``systemd-boot`` class provides functions specific to the 3001The :ref:`ref-classes-systemd-boot` class provides functions specific to the
2811systemd-boot bootloader for building bootable images. This is an 3002systemd-boot bootloader for building bootable images. This is an
2812internal class and is not intended to be used directly. 3003internal class and is not intended to be used directly.
2813 3004
2814.. note:: 3005.. note::
2815 3006
2816 The ``systemd-boot`` class is a result from merging the ``gummiboot`` class 3007 The :ref:`ref-classes-systemd-boot` class is a result from merging the ``gummiboot`` class
2817 used in previous Yocto Project releases with the ``systemd`` project. 3008 used in previous Yocto Project releases with the ``systemd`` project.
2818 3009
2819Set the :term:`EFI_PROVIDER` variable to 3010Set the :term:`EFI_PROVIDER` variable to ":ref:`ref-classes-systemd-boot`" to
2820"systemd-boot" to use this class. Doing so creates a standalone EFI 3011use this class. Doing so creates a standalone EFI bootloader that is not
2821bootloader that is not dependent on systemd. 3012dependent on systemd.
2822 3013
2823For information on more variables used and supported in this class, see 3014For information on more variables used and supported in this class, see
2824the :term:`SYSTEMD_BOOT_CFG`, 3015the :term:`SYSTEMD_BOOT_CFG`,
@@ -2831,48 +3022,45 @@ for more information.
2831 3022
2832.. _ref-classes-terminal: 3023.. _ref-classes-terminal:
2833 3024
2834``terminal.bbclass`` 3025``terminal``
2835==================== 3026============
2836 3027
2837The ``terminal`` class provides support for starting a terminal session. 3028The :ref:`ref-classes-terminal` class provides support for starting a terminal
2838The :term:`OE_TERMINAL` variable controls which 3029session. The :term:`OE_TERMINAL` variable controls which terminal emulator is
2839terminal emulator is used for the session. 3030used for the session.
2840 3031
2841Other classes use the ``terminal`` class anywhere a separate terminal 3032Other classes use the :ref:`ref-classes-terminal` class anywhere a separate
2842session needs to be started. For example, the 3033terminal session needs to be started. For example, the :ref:`ref-classes-patch`
2843:ref:`patch <ref-classes-patch>` class assuming 3034class assuming :term:`PATCHRESOLVE` is set to "user", the
2844:term:`PATCHRESOLVE` is set to "user", the 3035:ref:`ref-classes-cml1` class, and the :ref:`ref-classes-devshell` class all
2845:ref:`cml1 <ref-classes-cml1>` class, and the 3036use the :ref:`ref-classes-terminal` class.
2846:ref:`devshell <ref-classes-devshell>` class all use the ``terminal``
2847class.
2848 3037
2849.. _ref-classes-testimage*: 3038.. _ref-classes-testimage:
2850 3039
2851``testimage*.bbclass`` 3040``testimage``
2852====================== 3041=============
2853 3042
2854The ``testimage*`` classes support running automated tests against 3043The :ref:`ref-classes-testimage` class supports running automated tests against
2855images using QEMU and on actual hardware. The classes handle loading the 3044images using QEMU and on actual hardware. The classes handle loading the
2856tests and starting the image. To use the classes, you need to perform 3045tests and starting the image. To use the classes, you need to perform
2857steps to set up the environment. 3046steps to set up the environment.
2858 3047
2859.. note:: 3048To enable this class, add the following to your configuration::
2860 3049
2861 Best practices include using :term:`IMAGE_CLASSES` rather than 3050 IMAGE_CLASSES += "testimage"
2862 :term:`INHERIT` to inherit the ``testimage`` class for automated image
2863 testing.
2864 3051
2865The tests are commands that run on the target system over ``ssh``. Each 3052The tests are commands that run on the target system over ``ssh``. Each
2866test is written in Python and makes use of the ``unittest`` module. 3053test is written in Python and makes use of the ``unittest`` module.
2867 3054
2868The ``testimage.bbclass`` runs tests on an image when called using the 3055The :ref:`ref-classes-testimage` class runs tests on an image when called using the
2869following:: 3056following::
2870 3057
2871 $ bitbake -c testimage image 3058 $ bitbake -c testimage image
2872 3059
2873The ``testimage-auto`` class 3060Alternatively, if you wish to have tests automatically run for each image
2874runs tests on an image after the image is constructed (i.e. 3061after it is built, you can set :term:`TESTIMAGE_AUTO`::
2875:term:`TESTIMAGE_AUTO` must be set to "1"). 3062
3063 TESTIMAGE_AUTO = "1"
2876 3064
2877For information on how to enable, run, and create new tests, see the 3065For information on how to enable, run, and create new tests, see the
2878":ref:`dev-manual/runtime-testing:performing automated runtime testing`" 3066":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
@@ -2880,11 +3068,11 @@ section in the Yocto Project Development Tasks Manual.
2880 3068
2881.. _ref-classes-testsdk: 3069.. _ref-classes-testsdk:
2882 3070
2883``testsdk.bbclass`` 3071``testsdk``
2884=================== 3072===========
2885 3073
2886This class supports running automated tests against software development 3074This class supports running automated tests against software development
2887kits (SDKs). The ``testsdk`` class runs tests on an SDK when called 3075kits (SDKs). The :ref:`ref-classes-testsdk` class runs tests on an SDK when called
2888using the following:: 3076using the following::
2889 3077
2890 $ bitbake -c testsdk image 3078 $ bitbake -c testsdk image
@@ -2892,13 +3080,13 @@ using the following::
2892.. note:: 3080.. note::
2893 3081
2894 Best practices include using :term:`IMAGE_CLASSES` rather than 3082 Best practices include using :term:`IMAGE_CLASSES` rather than
2895 :term:`INHERIT` to inherit the ``testsdk`` class for automated SDK 3083 :term:`INHERIT` to inherit the :ref:`ref-classes-testsdk` class for automated SDK
2896 testing. 3084 testing.
2897 3085
2898.. _ref-classes-texinfo: 3086.. _ref-classes-texinfo:
2899 3087
2900``texinfo.bbclass`` 3088``texinfo``
2901=================== 3089===========
2902 3090
2903This class should be inherited by recipes whose upstream packages invoke 3091This class should be inherited by recipes whose upstream packages invoke
2904the ``texinfo`` utilities at build-time. Native and cross recipes are 3092the ``texinfo`` utilities at build-time. Native and cross recipes are
@@ -2915,10 +3103,10 @@ host system.
2915 3103
2916.. _ref-classes-toaster: 3104.. _ref-classes-toaster:
2917 3105
2918``toaster.bbclass`` 3106``toaster``
2919=================== 3107===========
2920 3108
2921The ``toaster`` class collects information about packages and images and 3109The :ref:`ref-classes-toaster` class collects information about packages and images and
2922sends them as events that the BitBake user interface can receive. The 3110sends them as events that the BitBake user interface can receive. The
2923class is enabled when the Toaster user interface is running. 3111class is enabled when the Toaster user interface is running.
2924 3112
@@ -2926,18 +3114,18 @@ This class is not intended to be used directly.
2926 3114
2927.. _ref-classes-toolchain-scripts: 3115.. _ref-classes-toolchain-scripts:
2928 3116
2929``toolchain-scripts.bbclass`` 3117``toolchain-scripts``
2930============================= 3118=====================
2931 3119
2932The ``toolchain-scripts`` class provides the scripts used for setting up 3120The :ref:`ref-classes-toolchain-scripts` class provides the scripts used for setting up
2933the environment for installed SDKs. 3121the environment for installed SDKs.
2934 3122
2935.. _ref-classes-typecheck: 3123.. _ref-classes-typecheck:
2936 3124
2937``typecheck.bbclass`` 3125``typecheck``
2938===================== 3126=============
2939 3127
2940The ``typecheck`` class provides support for validating the values of 3128The :ref:`ref-classes-typecheck` class provides support for validating the values of
2941variables set at the configuration level against their defined types. 3129variables set at the configuration level against their defined types.
2942The OpenEmbedded build system allows you to define the type of a 3130The OpenEmbedded build system allows you to define the type of a
2943variable using the "type" varflag. Here is an example:: 3131variable using the "type" varflag. Here is an example::
@@ -2946,10 +3134,10 @@ variable using the "type" varflag. Here is an example::
2946 3134
2947.. _ref-classes-uboot-config: 3135.. _ref-classes-uboot-config:
2948 3136
2949``uboot-config.bbclass`` 3137``uboot-config``
2950======================== 3138================
2951 3139
2952The ``uboot-config`` class provides support for U-Boot configuration for 3140The :ref:`ref-classes-uboot-config` class provides support for U-Boot configuration for
2953a machine. Specify the machine in your recipe as follows:: 3141a machine. Specify the machine in your recipe as follows::
2954 3142
2955 UBOOT_CONFIG ??= <default> 3143 UBOOT_CONFIG ??= <default>
@@ -2962,10 +3150,47 @@ You can also specify the machine using this method::
2962See the :term:`UBOOT_CONFIG` and :term:`UBOOT_MACHINE` variables for additional 3150See the :term:`UBOOT_CONFIG` and :term:`UBOOT_MACHINE` variables for additional
2963information. 3151information.
2964 3152
3153.. _ref-classes-uboot-sign:
3154
3155``uboot-sign``
3156==============
3157
3158The :ref:`ref-classes-uboot-sign` class provides support for U-Boot verified boot.
3159It is intended to be inherited from U-Boot recipes.
3160
3161Here are variables used by this class:
3162
3163- :term:`SPL_MKIMAGE_DTCOPTS`: DTC options for U-Boot ``mkimage`` when
3164 building the FIT image.
3165- :term:`SPL_SIGN_ENABLE`: enable signing the FIT image.
3166- :term:`SPL_SIGN_KEYDIR`: directory containing the signing keys.
3167- :term:`SPL_SIGN_KEYNAME`: base filename of the signing keys.
3168- :term:`UBOOT_FIT_DESC`: description string encoded into the FIT image.
3169- :term:`UBOOT_FIT_GENERATE_KEYS`: generate the keys if they don't exist yet.
3170- :term:`UBOOT_FIT_HASH_ALG`: hash algorithm for the FIT image.
3171- :term:`UBOOT_FIT_KEY_GENRSA_ARGS`: ``openssl genrsa`` arguments.
3172- :term:`UBOOT_FIT_KEY_REQ_ARGS`: ``openssl req`` arguments.
3173- :term:`UBOOT_FIT_SIGN_ALG`: signature algorithm for the FIT image.
3174- :term:`UBOOT_FIT_SIGN_NUMBITS`: size of the private key for FIT image
3175 signing.
3176- :term:`UBOOT_FIT_KEY_SIGN_PKCS`: algorithm for the public key certificate
3177 for FIT image signing.
3178- :term:`UBOOT_FITIMAGE_ENABLE`: enable the generation of a U-Boot FIT image.
3179- :term:`UBOOT_MKIMAGE_DTCOPTS`: DTC options for U-Boot ``mkimage`` when
3180 rebuilding the FIT image containing the kernel.
3181
3182See U-Boot's documentation for details about `verified boot
3183<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/verified-boot.txt>`__
3184and the `signature process
3185<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/signature.txt>`__.
3186
3187See also the description of :ref:`ref-classes-kernel-fitimage` class, which this class
3188imitates.
3189
2965.. _ref-classes-uninative: 3190.. _ref-classes-uninative:
2966 3191
2967``uninative.bbclass`` 3192``uninative``
2968===================== 3193=============
2969 3194
2970Attempts to isolate the build system from the host distribution's C 3195Attempts to isolate the build system from the host distribution's C
2971library in order to make re-use of native shared state artifacts across 3196library in order to make re-use of native shared state artifacts across
@@ -2980,21 +3205,21 @@ yourself, publish the resulting tarball (e.g. via HTTP) and set
2980``UNINATIVE_URL`` and ``UNINATIVE_CHECKSUM`` appropriately. For an 3205``UNINATIVE_URL`` and ``UNINATIVE_CHECKSUM`` appropriately. For an
2981example, see the ``meta/conf/distro/include/yocto-uninative.inc``. 3206example, see the ``meta/conf/distro/include/yocto-uninative.inc``.
2982 3207
2983The ``uninative`` class is also used unconditionally by the extensible 3208The :ref:`ref-classes-uninative` class is also used unconditionally by the extensible
2984SDK. When building the extensible SDK, ``uninative-tarball`` is built 3209SDK. When building the extensible SDK, ``uninative-tarball`` is built
2985and the resulting tarball is included within the SDK. 3210and the resulting tarball is included within the SDK.
2986 3211
2987.. _ref-classes-update-alternatives: 3212.. _ref-classes-update-alternatives:
2988 3213
2989``update-alternatives.bbclass`` 3214``update-alternatives``
2990=============================== 3215=======================
2991 3216
2992The ``update-alternatives`` class helps the alternatives system when 3217The :ref:`ref-classes-update-alternatives` class helps the alternatives system when
2993multiple sources provide the same command. This situation occurs when 3218multiple sources provide the same command. This situation occurs when
2994several programs that have the same or similar function are installed 3219several programs that have the same or similar function are installed
2995with the same name. For example, the ``ar`` command is available from 3220with the same name. For example, the ``ar`` command is available from
2996the ``busybox``, ``binutils`` and ``elfutils`` packages. The 3221the ``busybox``, ``binutils`` and ``elfutils`` packages. The
2997``update-alternatives`` class handles renaming the binaries so that 3222:ref:`ref-classes-update-alternatives` class handles renaming the binaries so that
2998multiple packages can be installed without conflicts. The ``ar`` command 3223multiple packages can be installed without conflicts. The ``ar`` command
2999still works regardless of which packages are installed or subsequently 3224still works regardless of which packages are installed or subsequently
3000removed. The class renames the conflicting binary in each package and 3225removed. The class renames the conflicting binary in each package and
@@ -3014,7 +3239,7 @@ To use this class, you need to define a number of variables:
3014These variables list alternative commands needed by a package, provide 3239These variables list alternative commands needed by a package, provide
3015pathnames for links, default links for targets, and so forth. For 3240pathnames for links, default links for targets, and so forth. For
3016details on how to use this class, see the comments in the 3241details on how to use this class, see the comments in the
3017:yocto_git:`update-alternatives.bbclass </poky/tree/meta/classes/update-alternatives.bbclass>` 3242:yocto_git:`update-alternatives.bbclass </poky/tree/meta/classes-recipe/update-alternatives.bbclass>`
3018file. 3243file.
3019 3244
3020.. note:: 3245.. note::
@@ -3024,10 +3249,10 @@ file.
3024 3249
3025.. _ref-classes-update-rc.d: 3250.. _ref-classes-update-rc.d:
3026 3251
3027``update-rc.d.bbclass`` 3252``update-rc.d``
3028======================= 3253===============
3029 3254
3030The ``update-rc.d`` class uses ``update-rc.d`` to safely install an 3255The :ref:`ref-classes-update-rc.d` class uses ``update-rc.d`` to safely install an
3031initialization script on behalf of the package. The OpenEmbedded build 3256initialization script on behalf of the package. The OpenEmbedded build
3032system takes care of details such as making sure the script is stopped 3257system takes care of details such as making sure the script is stopped
3033before a package is removed and started when the package is installed. 3258before a package is removed and started when the package is installed.
@@ -3038,10 +3263,10 @@ for details.
3038 3263
3039.. _ref-classes-useradd: 3264.. _ref-classes-useradd:
3040 3265
3041``useradd*.bbclass`` 3266``useradd*``
3042==================== 3267============
3043 3268
3044The ``useradd*`` classes support the addition of users or groups for 3269The :ref:`useradd* <ref-classes-useradd>` classes support the addition of users or groups for
3045usage by the package on the target. For example, if you have packages 3270usage by the package on the target. For example, if you have packages
3046that contain system services that should be run under their own user or 3271that contain system services that should be run under their own user or
3047group, you can use these classes to enable creation of the user or 3272group, you can use these classes to enable creation of the user or
@@ -3050,16 +3275,16 @@ group. The :oe_git:`meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
3050recipe in the :term:`Source Directory` provides a simple 3275recipe in the :term:`Source Directory` provides a simple
3051example that shows how to add three users and groups to two packages. 3276example that shows how to add three users and groups to two packages.
3052 3277
3053The ``useradd_base`` class provides basic functionality for user or 3278The :ref:`useradd_base <ref-classes-useradd>` class provides basic functionality for user or
3054groups settings. 3279groups settings.
3055 3280
3056The ``useradd*`` classes support the 3281The :ref:`useradd* <ref-classes-useradd>` classes support the
3057:term:`USERADD_PACKAGES`, 3282:term:`USERADD_PACKAGES`,
3058:term:`USERADD_PARAM`, 3283:term:`USERADD_PARAM`,
3059:term:`GROUPADD_PARAM`, and 3284:term:`GROUPADD_PARAM`, and
3060:term:`GROUPMEMS_PARAM` variables. 3285:term:`GROUPMEMS_PARAM` variables.
3061 3286
3062The ``useradd-staticids`` class supports the addition of users or groups 3287The :ref:`useradd-staticids <ref-classes-useradd>` class supports the addition of users or groups
3063that have static user identification (``uid``) and group identification 3288that have static user identification (``uid``) and group identification
3064(``gid``) values. 3289(``gid``) values.
3065 3290
@@ -3075,17 +3300,15 @@ set static values, the OpenEmbedded build system looks in
3075:term:`BBPATH` for ``files/passwd`` and ``files/group`` 3300:term:`BBPATH` for ``files/passwd`` and ``files/group``
3076files for the values. 3301files for the values.
3077 3302
3078To use static ``uid`` and ``gid`` values, you need to set some 3303To use static ``uid`` and ``gid`` values, you need to set some variables. See
3079variables. See the :term:`USERADDEXTENSION`, 3304the :term:`USERADDEXTENSION`, :term:`USERADD_UID_TABLES`,
3080:term:`USERADD_UID_TABLES`, 3305:term:`USERADD_GID_TABLES`, and :term:`USERADD_ERROR_DYNAMIC` variables.
3081:term:`USERADD_GID_TABLES`, and 3306You can also see the :ref:`ref-classes-useradd` class for additional
3082:term:`USERADD_ERROR_DYNAMIC` variables. 3307information.
3083You can also see the :ref:`useradd <ref-classes-useradd>` class for
3084additional information.
3085 3308
3086.. note:: 3309.. note::
3087 3310
3088 You do not use the ``useradd-staticids`` class directly. You either enable 3311 You do not use the :ref:`useradd-staticids <ref-classes-useradd>` class directly. You either enable
3089 or disable the class by setting the :term:`USERADDEXTENSION` variable. If you 3312 or disable the class by setting the :term:`USERADDEXTENSION` variable. If you
3090 enable or disable the class in a configured system, :term:`TMPDIR` might 3313 enable or disable the class in a configured system, :term:`TMPDIR` might
3091 contain incorrect ``uid`` and ``gid`` values. Deleting the :term:`TMPDIR` 3314 contain incorrect ``uid`` and ``gid`` values. Deleting the :term:`TMPDIR`
@@ -3093,43 +3316,42 @@ additional information.
3093 3316
3094.. _ref-classes-utility-tasks: 3317.. _ref-classes-utility-tasks:
3095 3318
3096``utility-tasks.bbclass`` 3319``utility-tasks``
3097========================= 3320=================
3098 3321
3099The ``utility-tasks`` class provides support for various "utility" type 3322The :ref:`ref-classes-utility-tasks` class provides support for various
3100tasks that are applicable to all recipes, such as 3323"utility" type tasks that are applicable to all recipes, such as
3101:ref:`ref-tasks-clean` and 3324:ref:`ref-tasks-clean` and :ref:`ref-tasks-listtasks`.
3102:ref:`ref-tasks-listtasks`.
3103 3325
3104This class is enabled by default because it is inherited by the 3326This class is enabled by default because it is inherited by the
3105:ref:`base <ref-classes-base>` class. 3327:ref:`ref-classes-base` class.
3106 3328
3107.. _ref-classes-utils: 3329.. _ref-classes-utils:
3108 3330
3109``utils.bbclass`` 3331``utils``
3110================= 3332=========
3111 3333
3112The ``utils`` class provides some useful Python functions that are 3334The :ref:`ref-classes-utils` class provides some useful Python functions that are
3113typically used in inline Python expressions (e.g. ``${@...}``). One 3335typically used in inline Python expressions (e.g. ``${@...}``). One
3114example use is for ``bb.utils.contains()``. 3336example use is for ``bb.utils.contains()``.
3115 3337
3116This class is enabled by default because it is inherited by the 3338This class is enabled by default because it is inherited by the
3117:ref:`base <ref-classes-base>` class. 3339:ref:`ref-classes-base` class.
3118 3340
3119.. _ref-classes-vala: 3341.. _ref-classes-vala:
3120 3342
3121``vala.bbclass`` 3343``vala``
3122================ 3344========
3123 3345
3124The ``vala`` class supports recipes that need to build software written 3346The :ref:`ref-classes-vala` class supports recipes that need to build software written
3125using the Vala programming language. 3347using the Vala programming language.
3126 3348
3127.. _ref-classes-waf: 3349.. _ref-classes-waf:
3128 3350
3129``waf.bbclass`` 3351``waf``
3130=============== 3352=======
3131 3353
3132The ``waf`` class supports recipes that need to build software that uses 3354The :ref:`ref-classes-waf` class supports recipes that need to build software that uses
3133the Waf build system. You can use the 3355the Waf build system. You can use the
3134:term:`EXTRA_OECONF` or 3356:term:`EXTRA_OECONF` or
3135:term:`PACKAGECONFIG_CONFARGS` variables 3357:term:`PACKAGECONFIG_CONFARGS` variables
diff --git a/documentation/ref-manual/release-process.rst b/documentation/ref-manual/release-process.rst
index bf803a3db1..daa28308ce 100644
--- a/documentation/ref-manual/release-process.rst
+++ b/documentation/ref-manual/release-process.rst
@@ -163,7 +163,7 @@ consists of the following pieces:
163 an ARM target, did the build produce ARM binaries. If, for example, 163 an ARM target, did the build produce ARM binaries. If, for example,
164 the build produced PPC binaries then there is a problem. 164 the build produced PPC binaries then there is a problem.
165 165
166- :ref:`ref-classes-testimage*`: This class 166- :ref:`ref-classes-testimage`: This class
167 performs runtime testing of images after they are built. The tests 167 performs runtime testing of images after they are built. The tests
168 are usually used with :doc:`QEMU </dev-manual/qemu>` 168 are usually used with :doc:`QEMU </dev-manual/qemu>`
169 to boot the images and check the combined runtime result boot 169 to boot the images and check the combined runtime result boot
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 5163abf559..e8028b328b 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -2101,6 +2101,18 @@ system and gives an overview of their function and contents.
2101 For information on policies and on how to use this variable, see the 2101 For information on policies and on how to use this variable, see the
2102 comments in the ``meta/classes/compress_doc.bbclass`` file. 2102 comments in the ``meta/classes/compress_doc.bbclass`` file.
2103 2103
2104 :term:`DT_FILES_PATH`
2105 When compiling out-of-tree device tree sources using a recipe that
2106 inherits the :ref:`ref-classes-devicetree` class, this variable specifies
2107 the path to the directory containing dts files to build.
2108
2109 Defaults to the :term:`S` directory.
2110
2111 :term:`DT_PADDING_SIZE`
2112 When inheriting the :ref:`ref-classes-devicetree` class, this variable
2113 specifies the size of padding appended to the device tree blob, used as
2114 extra space typically for additional properties during boot.
2115
2104 :term:`EFI_PROVIDER` 2116 :term:`EFI_PROVIDER`
2105 When building bootable images (i.e. where ``hddimg``, ``iso``, or 2117 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2106 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the 2118 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
@@ -2860,6 +2872,73 @@ system and gives an overview of their function and contents.
2860 2872
2861 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" 2873 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2862 2874
2875 :term:`GO_IMPORT`
2876 When inheriting the :ref:`ref-classes-go` class, this mandatory variable
2877 sets the import path for the Go package that will be created for the code
2878 to build. If you have a ``go.mod`` file in the source directory, this
2879 typically matches the path in the ``module`` line in this file.
2880
2881 Other Go programs importing this package will use this path.
2882
2883 Here is an example setting from the
2884 :yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
2885 recipe::
2886
2887 GO_IMPORT = "golang.org/x/example"
2888
2889 :term:`GO_INSTALL`
2890 When inheriting the :ref:`ref-classes-go` class, this optional variable
2891 specifies which packages in the sources should be compiled and
2892 installed in the Go build space by the
2893 `go install <https://go.dev/ref/mod#go-install>`__ command.
2894
2895 Here is an example setting from the
2896 :oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>`
2897 recipe::
2898
2899 GO_INSTALL = "\
2900 ${GO_IMPORT}/cmd/crucible \
2901 ${GO_IMPORT}/cmd/habtool \
2902 "
2903
2904 By default, :term:`GO_INSTALL` is defined as::
2905
2906 GO_INSTALL ?= "${GO_IMPORT}/..."
2907
2908 The ``...`` wildcard means that it will catch all
2909 packages found in the sources.
2910
2911 See the :term:`GO_INSTALL_FILTEROUT` variable for
2912 filtering out unwanted packages from the ones
2913 found from the :term:`GO_INSTALL` value.
2914
2915 :term:`GO_INSTALL_FILTEROUT`
2916 When using the Go "vendor" mechanism to bring in dependencies for a Go
2917 package, the default :term:`GO_INSTALL` setting, which uses the ``...``
2918 wildcard, will include the vendored packages in the build, which produces
2919 incorrect results.
2920
2921 There are also some Go packages that are structured poorly, so that the
2922 ``...`` wildcard results in building example or test code that should not
2923 be included in the build, or could fail to build.
2924
2925 This optional variable allows for filtering out a subset of the sources.
2926 It defaults to excluding everything under the ``vendor`` subdirectory
2927 under package's main directory. This is the normal location for vendored
2928 packages, but it can be overridden by a recipe to filter out other
2929 subdirectories if needed.
2930
2931 :term:`GO_WORKDIR`
2932 When using Go Modules, the current working directory must be the directory
2933 containing the ``go.mod`` file, or one of its subdirectories. When the
2934 ``go`` tool is used, it will automatically look for the ``go.mod`` file
2935 in the Go working directory or in any parent directory, but not in
2936 subdirectories.
2937
2938 When using the :ref:`ref-classes-go-mod` class to use Go modules,
2939 the optional :term:`GO_WORKDIR` variable, defaulting to the value
2940 of :term:`GO_IMPORT`, allows to specify a different Go working directory.
2941
2863 :term:`GROUPADD_PARAM` 2942 :term:`GROUPADD_PARAM`
2864 When inheriting the :ref:`useradd <ref-classes-useradd>` class, 2943 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2865 this variable specifies for a package what parameters should be 2944 this variable specifies for a package what parameters should be
@@ -3128,17 +3207,23 @@ system and gives an overview of their function and contents.
3128 material for Wic is located in the 3207 material for Wic is located in the
3129 ":doc:`/ref-manual/kickstart`" chapter. 3208 ":doc:`/ref-manual/kickstart`" chapter.
3130 3209
3131 :term:`IMAGE_CLASSES` 3210 :term:`IMAGE_BUILDINFO_FILE`
3132 A list of classes that all images should inherit. You typically use 3211 When using the :ref:`ref-classes-image-buildinfo` class,
3133 this variable to specify the list of classes that register the 3212 specifies the file in the image to write the build information into. The
3134 different types of images the OpenEmbedded build system creates. 3213 default value is "``${sysconfdir}/buildinfo``".
3135 3214
3136 The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can 3215 :term:`IMAGE_BUILDINFO_VARS`
3137 set this variable in your ``local.conf`` or in a distribution 3216 When using the :ref:`ref-classes-image-buildinfo` class,
3138 configuration file. 3217 specifies the list of variables to include in the `Build Configuration`
3218 section of the output file (as a space-separated list). Defaults to
3219 ":term:`DISTRO` :term:`DISTRO_VERSION`".
3139 3220
3140 For more information, see ``meta/classes/image_types.bbclass`` in the 3221 :term:`IMAGE_CLASSES`
3141 :term:`Source Directory`. 3222 A list of classes that all images should inherit. This is typically used
3223 to enable functionality across all image recipes.
3224
3225 Classes specified in :term:`IMAGE_CLASSES` must be located in the
3226 ``classes-recipe/`` or ``classes/`` subdirectories.
3142 3227
3143 :term:`IMAGE_CMD` 3228 :term:`IMAGE_CMD`
3144 Specifies the command to create the image file for a specific image 3229 Specifies the command to create the image file for a specific image
@@ -4115,9 +4200,18 @@ system and gives an overview of their function and contents.
4115 There is legacy support for specifying the full path to the device 4200 There is legacy support for specifying the full path to the device
4116 tree. However, providing just the ``.dtb`` file is preferred. 4201 tree. However, providing just the ``.dtb`` file is preferred.
4117 4202
4118 In order to use this variable, the 4203 In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
4119 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must 4204 class must be inherited.
4120 be inherited. 4205
4206 :term:`KERNEL_DEVICETREE_BUNDLE`
4207 When set to "1", this variable allows to bundle the Linux kernel
4208 and the Device Tree Binary together in a single file.
4209
4210 This feature is currently only supported on the "arm" (32 bit)
4211 architecture.
4212
4213 This variable is set to "0" by default by the
4214 :ref:`ref-classes-kernel-devicetree` class.
4121 4215
4122 :term:`KERNEL_DTB_LINK_NAME` 4216 :term:`KERNEL_DTB_LINK_NAME`
4123 The link name of the kernel device tree binary (DTB). This variable 4217 The link name of the kernel device tree binary (DTB). This variable
@@ -4142,10 +4236,25 @@ system and gives an overview of their function and contents.
4142 4236
4143 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" 4237 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4144 4238
4145 The value of the :term:`KERNEL_ARTIFACT_NAME` 4239 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
4146 variable, which is set in the same file, has the following value::
4147 4240
4148 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 4241
4242 :term:`KERNEL_DTBDEST`
4243 This variable, used by the :ref:`ref-classes-kernel-devicetree`
4244 class, allows to change the installation directory of the DTB
4245 (Device Tree Binary) files.
4246
4247 It is set by default to "${KERNEL_IMAGEDEST}" by the
4248 :ref:`ref-classes-kernel` class.
4249
4250 :term:`KERNEL_DTBVENDORED`
4251 This variable, used by the :ref:`ref-classes-kernel-devicetree`,
4252 allows to ignore vendor subdirectories when installing DTB
4253 (Device Tree Binary) files, when it is set to "false".
4254
4255 To keep vendor subdirectories, set this variable to "true".
4256
4257 It is set by default to "false" by the :ref:`ref-classes-kernel` class.
4149 4258
4150 :term:`KERNEL_DTC_FLAGS` 4259 :term:`KERNEL_DTC_FLAGS`
4151 Specifies the ``dtc`` flags that are passed to the Linux kernel build 4260 Specifies the ``dtc`` flags that are passed to the Linux kernel build
@@ -4260,9 +4369,12 @@ system and gives an overview of their function and contents.
4260 when building the kernel and is passed to ``make`` as the target to 4369 when building the kernel and is passed to ``make`` as the target to
4261 build. 4370 build.
4262 4371
4263 If you want to build an alternate kernel image type in addition to that 4372 To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
4264 specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE` 4373
4265 variable. 4374 :term:`KERNEL_IMAGETYPES`
4375 Lists additional types of kernel images to build for a device in addition
4376 to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
4377 machine configuration files.
4266 4378
4267 :term:`KERNEL_MODULE_AUTOLOAD` 4379 :term:`KERNEL_MODULE_AUTOLOAD`
4268 Lists kernel modules that need to be auto-loaded during boot. 4380 Lists kernel modules that need to be auto-loaded during boot.
@@ -4300,6 +4412,14 @@ system and gives an overview of their function and contents.
4300 provide those module configurations, see the 4412 provide those module configurations, see the
4301 :term:`module_conf_* <module_conf>` variable. 4413 :term:`module_conf_* <module_conf>` variable.
4302 4414
4415 :term:`KERNEL_PACKAGE_NAME`
4416 Specifies the base name of the kernel packages, such as "kernel"
4417 in the kernel packages such as "kernel-modules", "kernel-image" and
4418 "kernel-dbg".
4419
4420 The default value for this variable is set to "kernel" by the
4421 :ref:`ref-classes-kernel` class.
4422
4303 :term:`KERNEL_PATH` 4423 :term:`KERNEL_PATH`
4304 The location of the kernel sources. This variable is set to the value 4424 The location of the kernel sources. This variable is set to the value
4305 of the :term:`STAGING_KERNEL_DIR` within 4425 of the :term:`STAGING_KERNEL_DIR` within
@@ -5142,6 +5262,16 @@ system and gives an overview of their function and contents.
5142 :term:`Source Directory` for details on how this class 5262 :term:`Source Directory` for details on how this class
5143 applies these additional sed command arguments. 5263 applies these additional sed command arguments.
5144 5264
5265 :term:`OECMAKE_GENERATOR`
5266 A variable for the :ref:`ref-classes-cmake` class, allowing to choose
5267 which back-end will be generated by CMake to build an application.
5268
5269 By default, this variable is set to ``Ninja``, which is faster than GNU
5270 make, but if building is broken with Ninja, a recipe can use this
5271 variable to use GNU make instead::
5272
5273 OECMAKE_GENERATOR = "Unix Makefiles"
5274
5145 :term:`OE_IMPORTS` 5275 :term:`OE_IMPORTS`
5146 An internal variable used to tell the OpenEmbedded build system what 5276 An internal variable used to tell the OpenEmbedded build system what
5147 Python modules to import for every Python function run by the system. 5277 Python modules to import for every Python function run by the system.
@@ -7420,6 +7550,38 @@ system and gives an overview of their function and contents.
7420 section in the Yocto Project Board Support Package Developer's Guide 7550 section in the Yocto Project Board Support Package Developer's Guide
7421 for additional information. 7551 for additional information.
7422 7552
7553 :term:`SPL_MKIMAGE_DTCOPTS`
7554 Options for the device tree compiler passed to ``mkimage -D`` feature
7555 while creating a FIT image with the :ref:`ref-classes-uboot-sign`
7556 class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the
7557 :ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option
7558 to ``mkimage``.
7559
7560 The default value is set to "" by the :ref:`ref-classes-uboot-config`
7561 class.
7562
7563 :term:`SPL_SIGN_ENABLE`
7564 Enable signing of the U-Boot FIT image. The default value is "0".
7565 This variable is used by the :ref:`ref-classes-uboot-sign` class.
7566
7567 :term:`SPL_SIGN_KEYDIR`
7568 Location of the directory containing the RSA key and certificate used for
7569 signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign`
7570 class.
7571
7572 :term:`SPL_SIGN_KEYNAME`
7573 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
7574 for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR`
7575 directory. If we have for example a ``dev.key`` key and a ``dev.crt``
7576 certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will
7577 have to set :term:`SPL_SIGN_KEYNAME` to ``dev``.
7578
7579 :term:`SPLASH`
7580 This variable, used by the :ref:`ref-classes-image` class, allows
7581 to choose splashscreen applications. Set it to the names of packages
7582 for such applications to use. This variable is set by default to
7583 ``psplash``.
7584
7423 :term:`SPLASH_IMAGES` 7585 :term:`SPLASH_IMAGES`
7424 This variable, used by the ``psplash`` recipe, allows to customize 7586 This variable, used by the ``psplash`` recipe, allows to customize
7425 the default splashscreen image. 7587 the default splashscreen image.
@@ -8515,7 +8677,7 @@ system and gives an overview of their function and contents.
8515 on enabling, running, and writing these tests, see the 8677 on enabling, running, and writing these tests, see the
8516 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" 8678 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
8517 section in the Yocto Project Development Tasks Manual and the 8679 section in the Yocto Project Development Tasks Manual and the
8518 ":ref:`ref-classes-testimage*`" section. 8680 ":ref:`ref-classes-testimage`" section.
8519 8681
8520 :term:`THISDIR` 8682 :term:`THISDIR`
8521 The directory in which the file BitBake is currently parsing is 8683 The directory in which the file BitBake is currently parsing is
@@ -8799,6 +8961,64 @@ system and gives an overview of their function and contents.
8799 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a 8961 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
8800 command-line parameter to the ``uboot-mkimage`` utility. 8962 command-line parameter to the ``uboot-mkimage`` utility.
8801 8963
8964 :term:`UBOOT_FIT_DESC`
8965 Specifies the description string encoded into a U-Boot fitImage. The default
8966 value is set by the :ref:`ref-classes-uboot-sign` class as follows::
8967
8968 UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
8969
8970 :term:`UBOOT_FIT_GENERATE_KEYS`
8971 Decides whether to generate the keys for signing the U-Boot fitImage if
8972 they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`.
8973 The default value is "0".
8974
8975 Enable this as follows::
8976
8977 UBOOT_FIT_GENERATE_KEYS = "1"
8978
8979 This variable is used in the :ref:`ref-classes-uboot-sign` class.
8980
8981 :term:`UBOOT_FIT_HASH_ALG`
8982 Specifies the hash algorithm used in creating the U-Boot FIT Image.
8983 It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign`
8984 class.
8985
8986 :term:`UBOOT_FIT_KEY_GENRSA_ARGS`
8987 Arguments to ``openssl genrsa`` for generating a RSA private key for
8988 signing the U-Boot FIT image. The default value of this variable
8989 is set to "-F4" by the :ref:`ref-classes-uboot-sign` class.
8990
8991 :term:`UBOOT_FIT_KEY_REQ_ARGS`
8992 Arguments to ``openssl req`` for generating a certificate for signing
8993 the U-Boot FIT image. The default value is "-batch -new" by the
8994 :ref:`ref-classes-uboot-sign` class, "batch" for
8995 non interactive mode and "new" for generating new keys.
8996
8997 :term:`UBOOT_FIT_KEY_SIGN_PKCS`
8998 Format for the public key certificate used for signing the U-Boot FIT
8999 image. The default value is set to "x509" by the
9000 :ref:`ref-classes-uboot-sign` class.
9001
9002 :term:`UBOOT_FIT_SIGN_ALG`
9003 Specifies the signature algorithm used in creating the U-Boot FIT Image.
9004 This variable is set by default to "rsa2048" by the
9005 :ref:`ref-classes-uboot-sign` class.
9006
9007 :term:`UBOOT_FIT_SIGN_NUMBITS`
9008 Size of the private key used in signing the U-Boot FIT image, in number
9009 of bits. The default value for this variable is set to "2048"
9010 by the :ref:`ref-classes-uboot-sign` class.
9011
9012 :term:`UBOOT_FITIMAGE_ENABLE`
9013 This variable allows to generate a FIT image for U-Boot, which is one
9014 of the ways to implement a verified boot process.
9015
9016 Its default value is "0", so set it to "1" to enable this functionality::
9017
9018 UBOOT_FITIMAGE_ENABLE = "1"
9019
9020 See the :ref:`ref-classes-uboot-sign` class for details.
9021
8802 :term:`UBOOT_LOADADDRESS` 9022 :term:`UBOOT_LOADADDRESS`
8803 Specifies the load address for the U-Boot image. During U-Boot image 9023 Specifies the load address for the U-Boot image. During U-Boot image
8804 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a 9024 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
diff --git a/documentation/test-manual/intro.rst b/documentation/test-manual/intro.rst
index 2180eb939c..8cfd6be87d 100644
--- a/documentation/test-manual/intro.rst
+++ b/documentation/test-manual/intro.rst
@@ -131,7 +131,7 @@ the following types of tests:
131 131
132 $ bitbake image -c testimage 132 $ bitbake image -c testimage
133 133
134 The tests utilize the :ref:`testimage* <ref-classes-testimage*>` 134 The tests utilize the :ref:`testimage* <ref-classes-testimage>`
135 classes and the :ref:`ref-tasks-testimage` task. 135 classes and the :ref:`ref-tasks-testimage` task.
136 136
137- *Layer Testing:* The Autobuilder has the possibility to test whether 137- *Layer Testing:* The Autobuilder has the possibility to test whether