diff options
| author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2023-11-14 17:44:01 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-11-28 05:00:32 -1000 |
| commit | a2d67684cc830181f00d4a432d10faf1c0495f25 (patch) | |
| tree | 26ab9f04d0e682a9f1ce3a4579ca331fefe92039 /documentation | |
| parent | fdd88b549fbddcfad967b9fc0d11b66e1bbd0dd1 (diff) | |
| download | poky-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.rst | 2 | ||||
| -rw-r--r-- | documentation/dev-manual/upgrading-recipes.rst | 2 | ||||
| -rw-r--r-- | documentation/migration-guides/migration-1.5.rst | 2 | ||||
| -rw-r--r-- | documentation/migration-guides/migration-2.6.rst | 2 | ||||
| -rw-r--r-- | documentation/overview-manual/concepts.rst | 2 | ||||
| -rw-r--r-- | documentation/ref-manual/classes.rst | 1694 | ||||
| -rw-r--r-- | documentation/ref-manual/release-process.rst | 2 | ||||
| -rw-r--r-- | documentation/ref-manual/variables.rst | 258 | ||||
| -rw-r--r-- | documentation/test-manual/intro.rst | 2 |
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 | ||
| 242 | A new automated image testing framework has been added through the | 242 | A new automated image testing framework has been added through the |
| 243 | :ref:`ref-classes-testimage*` classes. This | 243 | :ref:`ref-classes-testimage` classes. This |
| 244 | framework replaces the older ``imagetest-qemu`` framework. | 244 | framework replaces the older ``imagetest-qemu`` framework. |
| 245 | 245 | ||
| 246 | You can learn more about performing automated image tests in the | 246 | You 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. | |||
| 1026 | The manifest file (``.manifest``) resides in the same directory as the | 1026 | The manifest file (``.manifest``) resides in the same directory as the |
| 1027 | root filesystem image. This file lists out, line-by-line, the installed | 1027 | root filesystem image. This file lists out, line-by-line, the installed |
| 1028 | packages. The manifest file is useful for the | 1028 | packages. The manifest file is useful for the |
| 1029 | :ref:`testimage <ref-classes-testimage*>` class, | 1029 | :ref:`testimage <ref-classes-testimage>` class, |
| 1030 | for example, to determine whether or not to run specific tests. See the | 1030 | for example, to determine whether or not to run specific tests. See the |
| 1031 | :term:`IMAGE_MANIFEST` | 1031 | :term:`IMAGE_MANIFEST` |
| 1032 | variable for additional information. | 1032 | variable 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 | ||
| 34 | The ``allarch`` class is inherited by recipes that do not produce | 34 | The :ref:`ref-classes-allarch` class is inherited by recipes that do not produce |
| 35 | architecture-specific output. The class disables functionality that is | 35 | architecture-specific output. The class disables functionality that is |
| 36 | normally needed for recipes that produce executable binaries (such as | 36 | normally needed for recipes that produce executable binaries (such as |
| 37 | building the cross-compiler and a C library as pre-requisites, and | 37 | building 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 | ||
| 55 | By default, all recipes inherit the :ref:`base <ref-classes-base>` and | 55 | By 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 |
| 57 | functionality needed for recipes that produce executable output. If your | 57 | functionality needed for recipes that produce executable output. If your |
| 58 | recipe, for example, only produces packages that contain configuration | 58 | recipe, for example, only produces packages that contain configuration |
| 59 | files, media files, or scripts (e.g. Python and Perl), then it should | 59 | files, media files, or scripts (e.g. Python and Perl), then it should |
| 60 | inherit the ``allarch`` class. | 60 | inherit 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 | ||
| 67 | The ``archiver`` class supports releasing source code and other | 67 | The :ref:`ref-classes-archiver` class supports releasing source code and other |
| 68 | materials with the binaries. | 68 | materials with the binaries. |
| 69 | 69 | ||
| 70 | For more details on the source :ref:`ref-classes-archiver`, see the | 70 | For 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 | ||
| 81 | The ``autotools*`` classes support Autotooled packages. | 81 | The :ref:`autotools* <ref-classes-autotools>` classes support packages built with the |
| 82 | :wikipedia:`GNU Autotools <GNU_Autotools>`. | ||
| 82 | 83 | ||
| 83 | The ``autoconf``, ``automake``, and ``libtool`` packages bring | 84 | The ``autoconf``, ``automake``, and ``libtool`` packages bring |
| 84 | standardization. This class defines a set of tasks (e.g. ``configure``, | 85 | standardization. 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 |
| 90 | in the Yocto Project Development Tasks Manual. | 91 | in the Yocto Project Development Tasks Manual. |
| 91 | 92 | ||
| 92 | By default, the ``autotools*`` classes use out-of-tree builds (i.e. | 93 | By 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 | ||
| 95 | If the software being built by a recipe does not support using | 96 | If the software being built by a recipe does not support using |
| 96 | out-of-tree builds, you should have the recipe inherit the | 97 | out-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 |
| 98 | the same as the ``autotools`` class but builds with :term:`B` | 99 | the 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 |
| 100 | support is either not present or is broken. | 101 | support 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 | ||
| 107 | It's useful to have some idea of how the tasks defined by the | 108 | It'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 | ||
| 129 | The ``base`` class is special in that every ``.bb`` file implicitly | 130 | The :ref:`ref-classes-base` class is special in that every ``.bb`` file implicitly |
| 130 | inherits the class. This class contains definitions for standard basic | 131 | inherits the class. This class contains definitions for standard basic |
| 131 | tasks such as fetching, unpacking, configuring (empty by default), | 132 | tasks such as fetching, unpacking, configuring (empty by default), |
| 132 | compiling (runs any ``Makefile`` present), installing (empty by default) | 133 | compiling (runs any ``Makefile`` present), installing (empty by default) |
| 133 | and packaging (empty by default). These classes are often overridden or | 134 | and packaging (empty by default). These tasks are often overridden or |
| 134 | extended by other classes such as the | 135 | extended 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 | ||
| 138 | The class also contains some commonly used functions such as | 138 | The 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 | ||
| 148 | Sets up packaging and dependencies appropriate for recipes that build | 148 | Sets up packaging and dependencies appropriate for recipes that build |
| 149 | software that includes bash-completion data. | 149 | software 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 | ||
| 156 | The ``bin_package`` class is a helper class for recipes that extract the | 156 | The :ref:`ref-classes-bin-package` class is a helper class for recipes that extract the |
| 157 | contents of a binary package (e.g. an RPM) and install those contents | 157 | contents of a binary package (e.g. an RPM) and install those contents |
| 158 | rather than building the binary from source. The binary package is | 158 | rather than building the binary from source. The binary package is |
| 159 | extracted and new packages in the configured output package format are | 159 | extracted 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 | ||
| 183 | The ``binconfig`` class helps to correct paths in shell scripts. | 183 | The :ref:`ref-classes-binconfig` class helps to correct paths in shell scripts. |
| 184 | 184 | ||
| 185 | Before ``pkg-config`` had become widespread, libraries shipped shell | 185 | Before ``pkg-config`` had become widespread, libraries shipped shell |
| 186 | scripts to give information about the libraries and include paths needed | 186 | scripts 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 | ||
| 203 | An alternative version of the :ref:`binconfig <ref-classes-binconfig>` | 203 | An alternative version of the :ref:`ref-classes-binconfig` |
| 204 | class, which disables binary configuration scripts by making them return | 204 | class, which disables binary configuration scripts by making them return |
| 205 | an error in favor of using ``pkg-config`` to query the information. The | 205 | an error in favor of using ``pkg-config`` to query the information. The |
| 206 | scripts to be disabled should be specified using the | 206 | scripts to be disabled should be specified using the :term:`BINCONFIG` |
| 207 | :term:`BINCONFIG` variable within the recipe inheriting | 207 | variable within the recipe inheriting the class. |
| 208 | the class. | ||
| 209 | 208 | ||
| 210 | .. _ref-classes-buildhistory: | 209 | .. _ref-classes-buildhistory: |
| 211 | 210 | ||
| 212 | ``buildhistory.bbclass`` | 211 | ``buildhistory`` |
| 213 | ======================== | 212 | ================ |
| 214 | 213 | ||
| 215 | The ``buildhistory`` class records a history of build output metadata, | 214 | The :ref:`ref-classes-buildhistory` class records a history of build output metadata, |
| 216 | which can be used to detect possible regressions as well as used for | 215 | which can be used to detect possible regressions as well as used for |
| 217 | analysis of the build output. For more information on using Build | 216 | analysis of the build output. For more information on using Build |
| 218 | History, see the | 217 | History, 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 | ||
| 227 | The ``buildstats`` class records performance statistics about each task | 226 | The :ref:`ref-classes-buildstats` class records performance statistics about each task |
| 228 | executed during the build (e.g. elapsed time, CPU usage, and I/O usage). | 227 | executed during the build (e.g. elapsed time, CPU usage, and I/O usage). |
| 229 | 228 | ||
| 230 | When you use this class, the output goes into the | 229 | When 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 |
| 240 | enable the class. However, if you want to disable the class, simply | 239 | enable the class. However, if you want to disable the class, simply |
| 241 | remove "buildstats" from the :term:`USER_CLASSES` list. | 240 | remove ":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 | ||
| 248 | When inherited globally, prints statistics at the end of the build on | 247 | When inherited globally, prints statistics at the end of the build on |
| 249 | sstate re-use. In order to function, this class requires the | 248 | sstate 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 | |||
| 256 | The :ref:`ref-classes-cargo` class allows to compile Rust language programs | ||
| 257 | using `Cargo <https://doc.rust-lang.org/cargo/>`__. Cargo is Rust's package | ||
| 258 | manager, allowing to fetch package dependencies and build your program. | ||
| 259 | |||
| 260 | Using this class makes it very easy to build Rust programs. All you need | ||
| 261 | is to use the :term:`SRC_URI` variable to point to a source repository | ||
| 262 | which 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`` | ||
| 264 | subdirectory. | ||
| 265 | |||
| 266 | You 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>` | ||
| 268 | recipe. Another example, with only crate dependencies, is the | ||
| 269 | :oe_git:`uutils-coreutils </meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils>` | ||
| 270 | recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__ | ||
| 271 | tool. | ||
| 272 | |||
| 273 | This class inherits the :ref:`ref-classes-cargo_common` class. | ||
| 274 | |||
| 275 | .. _ref-classes-cargo_common: | ||
| 276 | |||
| 277 | ``cargo_common`` | ||
| 278 | ================ | ||
| 279 | |||
| 280 | The :ref:`ref-classes-cargo_common` class is an internal class | ||
| 281 | that is not intended to be used directly. | ||
| 282 | |||
| 283 | An exception is the "rust" recipe, to build the Rust compiler and runtime | ||
| 284 | library, which is built by Cargo but cannot use the :ref:`ref-classes-cargo` | ||
| 285 | class. 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 | ||
| 257 | The ``ccache`` class enables the C/C++ Compiler Cache for the build. | 292 | The :ref:`ref-classes-ccache` class enables the C/C++ Compiler Cache for the build. |
| 258 | This class is used to give a minor performance boost during the build. | 293 | This class is used to give a minor performance boost during the build. |
| 259 | 294 | ||
| 260 | See https://ccache.samba.org/ for information on the C/C++ Compiler | 295 | See 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 | ||
| 274 | The ``chrpath`` class is a wrapper around the "chrpath" utility, which | 309 | The :ref:`ref-classes-chrpath` class is a wrapper around the "chrpath" utility, which |
| 275 | is used during the build process for ``nativesdk``, ``cross``, and | 310 | is 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 |
| 277 | in order to make them relocatable. | 312 | in 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 | ||
| 284 | The ``cmake`` class allows for recipes that need to build software using | 319 | The :ref:`ref-classes-cmake` class allows recipes to build software using the |
| 285 | the `CMake <https://cmake.org/overview/>`__ build system. You can use | 320 | `CMake <https://cmake.org/overview/>`__ build system. You can use the |
| 286 | the :term:`EXTRA_OECMAKE` variable to specify | 321 | :term:`EXTRA_OECMAKE` variable to specify additional configuration options to |
| 287 | additional configuration options to be passed using the ``cmake`` | 322 | pass to the ``cmake`` command line. |
| 288 | command line. | 323 | |
| 324 | By default, the :ref:`ref-classes-cmake` class uses | ||
| 325 | `Ninja <https://ninja-build.org/>`__ instead of GNU make for building, which | ||
| 326 | offers better build performance. If a recipe is broken with Ninja, then the | ||
| 327 | recipe can set the :term:`OECMAKE_GENERATOR` variable to ``Unix Makefiles`` to | ||
| 328 | use GNU make instead. | ||
| 289 | 329 | ||
| 290 | On the occasion that you would be installing custom CMake toolchain | 330 | If you need to install custom CMake toolchain files supplied by the application |
| 291 | files supplied by the application being built, you should install them | 331 | being built, you should install them (during :ref:`ref-tasks-install`) to the |
| 292 | to the preferred CMake Module directory: ``${D}${datadir}/cmake/`` | 332 | preferred CMake Module directory: ``${D}${datadir}/cmake/modules/``. |
| 293 | Modules 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 | ||
| 301 | The ``cml1`` class provides basic support for the Linux kernel style | 339 | The :ref:`ref-classes-cml1` class provides basic support for the Linux kernel style |
| 302 | build configuration system. "cml" stands for "Configuration Menu Language", which | 340 | build configuration system. "cml" stands for "Configuration Menu Language", which |
| 303 | originates from the Linux kernel but is also used in other projects such as U-Boot | 341 | originates from the Linux kernel but is also used in other projects such as U-Boot |
| 304 | and BusyBox. It could have been called "kconfig" too. | 342 | and 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 | ||
| 311 | Enables compression for man pages and info pages. This class is intended | 349 | Enables compression for man pages and info pages. This class is intended |
| 312 | to be inherited globally. The default compression mechanism is gz (gzip) | 350 | to 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 | ||
| 321 | The ``copyleft_compliance`` class preserves source code for the purposes | 359 | The :ref:`ref-classes-copyleft_compliance` class preserves source code for the purposes |
| 322 | of license compliance. This class is an alternative to the ``archiver`` | 360 | of license compliance. This class is an alternative to the :ref:`ref-classes-archiver` |
| 323 | class and is still used by some users even though it has been deprecated | 361 | class and is still used by some users even though it has been deprecated |
| 324 | in favor of the :ref:`archiver <ref-classes-archiver>` class. | 362 | in 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 | ||
| 331 | A class used by the :ref:`archiver <ref-classes-archiver>` and | 369 | A 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 |
| 333 | for filtering licenses. The ``copyleft_filter`` class is an internal | 371 | for filtering licenses. The ``copyleft_filter`` class is an internal |
| 334 | class and is not intended to be used directly. | 372 | class 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 | ||
| 341 | The ``core-image`` class provides common definitions for the | 379 | The :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 | ||
| 350 | The ``cpan*`` classes support Perl modules. | 388 | The :ref:`cpan* <ref-classes-cpan>` classes support Perl modules. |
| 351 | 389 | ||
| 352 | Recipes for Perl modules are simple. These recipes usually only need to | 390 | Recipes for Perl modules are simple. These recipes usually only need to |
| 353 | point to the source's archive and then inherit the proper class file. | 391 | point 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 | ||
| 363 | Both build methods inherit the ``cpan-base`` class for basic Perl | 401 | Both build methods inherit the :ref:`cpan-base <ref-classes-cpan>` class for basic Perl |
| 364 | support. | 402 | support. |
| 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 | ||
| 371 | The :ref:`create-spdx <ref-classes-create-spdx>` class provides support for | 409 | The :ref:`ref-classes-create-spdx` class provides support for |
| 372 | automatically creating :term:`SPDX` :term:`SBOM` documents based upon image | 410 | automatically creating :term:`SPDX` :term:`SBOM` documents based upon image |
| 373 | and SDK contents. | 411 | and 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 | ||
| 397 | The ``cross`` class provides support for the recipes that build the | 435 | The :ref:`ref-classes-cross` class provides support for the recipes that build the |
| 398 | cross-compilation tools. | 436 | cross-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 | ||
| 405 | The ``cross-canadian`` class provides support for the recipes that build | 443 | The :ref:`ref-classes-cross-canadian` class provides support for the recipes that build |
| 406 | the Canadian Cross-compilation tools for SDKs. See the | 444 | the 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`" |
| 408 | section in the Yocto Project Overview and Concepts Manual for more | 446 | section 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 | ||
| 416 | The ``crosssdk`` class provides support for the recipes that build the | 454 | The :ref:`ref-classes-crosssdk` class provides support for the recipes that build the |
| 417 | cross-compilation tools used for building SDKs. See the | 455 | cross-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`" |
| 419 | section in the Yocto Project Overview and Concepts Manual for more | 457 | section 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 | ||
| 427 | The :ref:`cve-check <ref-classes-cve-check>` class looks for known CVEs (Common Vulnerabilities | 465 | The :ref:`ref-classes-cve-check` class looks for known CVEs (Common Vulnerabilities |
| 428 | and Exposures) while building with BitBake. This class is meant to be | 466 | and Exposures) while building with BitBake. This class is meant to be |
| 429 | inherited globally from a configuration file:: | 467 | inherited 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 | ||
| 491 | The ``debian`` class renames output packages so that they follow the | 529 | The :ref:`ref-classes-debian` class renames output packages so that they follow the |
| 492 | Debian naming policy (i.e. ``glibc`` becomes ``libc6`` and | 530 | Debian 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 |
| 494 | name and version as part of the package name. | 532 | name 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 | ||
| 506 | The ``deploy`` class handles deploying files to the | 544 | The :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 |
| 508 | function of this class is to allow the deploy step to be accelerated by | 546 | function of this class is to allow the deploy step to be accelerated by |
| 509 | shared state. Recipes that inherit this class should define their own | 547 | shared 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 |
| 515 | staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`. | 553 | staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`. |
| 516 | 554 | ||
| 555 | .. _ref-classes-devicetree: | ||
| 556 | |||
| 557 | ``devicetree`` | ||
| 558 | ============== | ||
| 559 | |||
| 560 | The :ref:`ref-classes-devicetree` class allows to build a recipe that compiles | ||
| 561 | device tree source files that are not in the kernel tree. | ||
| 562 | |||
| 563 | The compilation of out-of-tree device tree sources is the same as the kernel | ||
| 564 | in-tree device tree compilation process. This includes the ability to include | ||
| 565 | sources from the kernel such as SoC ``dtsi`` files as well as C header files, | ||
| 566 | such as ``gpio.h``. | ||
| 567 | |||
| 568 | The :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 | |||
| 575 | This class deploys the generated device tree binaries into | ||
| 576 | ``${``\ :term:`DEPLOY_DIR_IMAGE`\ ``}/devicetree/``. This is similar to | ||
| 577 | what the :ref:`ref-classes-kernel-devicetree` class does, with the added | ||
| 578 | ``devicetree`` subdirectory to avoid name clashes. Additionally, the device | ||
| 579 | trees are populated into the sysroot for access via the sysroot from within | ||
| 580 | other recipes. | ||
| 581 | |||
| 582 | By default, all device tree sources located in :term:`DT_FILES_PATH` directory | ||
| 583 | are compiled. | ||
| 584 | |||
| 585 | An extra padding is appended to non-overlay device trees binaries. This | ||
| 586 | can typically be used as extra space for adding extra properties at boot time. | ||
| 587 | The padding size can be modified by setting :term:`DT_PADDING_SIZE` | ||
| 588 | to the desired size, in bytes. | ||
| 589 | |||
| 590 | See :oe_git:`devicetree.bbclass sources | ||
| 591 | </openembedded-core/tree/meta/classes-recipe/devicetree.bbclass>` | ||
| 592 | for further variables controlling this class. | ||
| 593 | |||
| 594 | Here is an excerpt of an example ``recipes-kernel/linux/devicetree-acme.bb`` | ||
| 595 | recipe 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 | ||
| 522 | The :ref:`ref-classes-devshell` class adds the :ref:`ref-tasks-devshell` task. Distribution | 606 | The :ref:`ref-classes-devshell` class adds the :ref:`ref-tasks-devshell` task. Distribution |
| 523 | policy dictates whether to include this class. See the ":ref:`dev-manual/development-shell:using a development shell`" | 607 | policy 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 | ||
| 532 | The ``devupstream`` class uses | 616 | The :ref:`ref-classes-devupstream` class uses |
| 533 | :term:`BBCLASSEXTEND` to add a variant of the | 617 | :term:`BBCLASSEXTEND` to add a variant of the |
| 534 | recipe that fetches from an alternative URI (e.g. Git) instead of a | 618 | recipe that fetches from an alternative URI (e.g. Git) instead of a |
| 535 | tarball. Following is an example:: | 619 | tarball. Following is an example:: |
| @@ -551,10 +635,10 @@ Any development-specific adjustments can be done by using the | |||
| 551 | 635 | ||
| 552 | The class | 636 | The class |
| 553 | currently only supports creating a development variant of the target | 637 | currently only supports creating a development variant of the target |
| 554 | recipe, not ``native`` or ``nativesdk`` variants. | 638 | recipe, not :ref:`ref-classes-native` or :ref:`ref-classes-nativesdk` variants. |
| 555 | 639 | ||
| 556 | The :term:`BBCLASSEXTEND` syntax (i.e. ``devupstream:target``) provides | 640 | The :term:`BBCLASSEXTEND` syntax (i.e. ``devupstream:target``) provides |
| 557 | support for ``native`` and ``nativesdk`` variants. Consequently, this | 641 | support for :ref:`ref-classes-native` and :ref:`ref-classes-nativesdk` variants. Consequently, this |
| 558 | functionality can be added in a future release. | 642 | functionality can be added in a future release. |
| 559 | 643 | ||
| 560 | Support for other version control systems such as Subversion is limited | 644 | Support 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 | ||
| 569 | The ``externalsrc`` class supports building software from source code | 653 | The :ref:`ref-classes-externalsrc` class supports building software from source code |
| 570 | that is external to the OpenEmbedded build system. Building software | 654 | that is external to the OpenEmbedded build system. Building software |
| 571 | from an external source tree means that the build system's normal fetch, | 655 | from an external source tree means that the build system's normal fetch, |
| 572 | unpack, and patch process is not used. | 656 | unpack, and patch process is not used. |
| @@ -574,9 +658,8 @@ unpack, and patch process is not used. | |||
| 574 | By default, the OpenEmbedded build system uses the :term:`S` | 658 | By default, the OpenEmbedded build system uses the :term:`S` |
| 575 | and :term:`B` variables to locate unpacked recipe source code | 659 | and :term:`B` variables to locate unpacked recipe source code |
| 576 | and to build it, respectively. When your recipe inherits the | 660 | and 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 | ||
| 580 | ultimately define :term:`S` and :term:`B`. | 663 | ultimately define :term:`S` and :term:`B`. |
| 581 | 664 | ||
| 582 | By default, this class expects the source code to support recipe builds | 665 | By 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 | ||
| 594 | For more information on the ``externalsrc`` class, see the comments in | 677 | For 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`. |
| 596 | For information on how to use the :ref:`ref-classes-externalsrc` class, see the | 679 | For 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 | ||
| 605 | The ``extrausers`` class allows additional user and group configuration | 688 | The :ref:`ref-classes-extrausers` class allows additional user and group configuration |
| 606 | to be applied at the image level. Inheriting this class either globally | 689 | to be applied at the image level. Inheriting this class either globally |
| 607 | or from an image recipe allows additional user and group operations to | 690 | or from an image recipe allows additional user and group operations to |
| 608 | be performed using the | 691 | be 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 | ||
| 621 | Here is an example that uses this class in an image recipe:: | 702 | Here 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 | ||
| 667 | The ``features_check`` class allows individual recipes to check | 748 | The :ref:`ref-classes-features_check` class allows individual recipes to check |
| 668 | for required and conflicting | 749 | for required and conflicting :term:`DISTRO_FEATURES`, :term:`MACHINE_FEATURES` |
| 669 | :term:`DISTRO_FEATURES`, :term:`MACHINE_FEATURES` or :term:`COMBINED_FEATURES`. | 750 | or :term:`COMBINED_FEATURES`. |
| 670 | 751 | ||
| 671 | This class provides support for the following variables: | 752 | This 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 | ||
| 693 | The ``fontcache`` class generates the proper post-install and | 774 | The :ref:`ref-classes-fontcache` class generates the proper post-install and |
| 694 | post-remove (postinst and postrm) scriptlets for font packages. These | 775 | post-remove (postinst and postrm) scriptlets for font packages. These |
| 695 | scriptlets call ``fc-cache`` (part of ``Fontconfig``) to add the fonts | 776 | scriptlets call ``fc-cache`` (part of ``Fontconfig``) to add the fonts |
| 696 | to the font information cache. Since the cache files are | 777 | to 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 | ||
| 709 | The ``fs-uuid`` class extracts UUID from | 790 | The :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 |
| 711 | by the time that this function gets called. The ``fs-uuid`` class only | 792 | by the time that this function gets called. The :ref:`ref-classes-fs-uuid` class only |
| 712 | works on ``ext`` file systems and depends on ``tune2fs``. | 793 | works 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 | ||
| 719 | The ``gconf`` class provides common functionality for recipes that need | 800 | The :ref:`ref-classes-gconf` class provides common functionality for recipes that need |
| 720 | to install GConf schemas. The schemas will be put into a separate | 801 | to install GConf schemas. The schemas will be put into a separate |
| 721 | package (``${``\ :term:`PN`\ ``}-gconf``) that is created | 802 | package (``${``\ :term:`PN`\ ``}-gconf``) that is created |
| 722 | automatically when this class is inherited. This package uses the | 803 | automatically 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 | ||
| 731 | The ``gettext`` class provides support for building software that uses | 812 | The :ref:`ref-classes-gettext` class provides support for building |
| 732 | the GNU ``gettext`` internationalization and localization system. All | 813 | software that uses the GNU ``gettext`` internationalization and localization |
| 733 | recipes building software that use ``gettext`` should inherit this | 814 | system. All recipes building software that use ``gettext`` should inherit this |
| 734 | class. | 815 | class. |
| 735 | 816 | ||
| 736 | .. _ref-classes-gnomebase: | 817 | .. _ref-classes-gnomebase: |
| 737 | 818 | ||
| 738 | ``gnomebase.bbclass`` | 819 | ``gnomebase`` |
| 739 | ===================== | 820 | ============= |
| 740 | 821 | ||
| 741 | The ``gnomebase`` class is the base class for recipes that build | 822 | The :ref:`ref-classes-gnomebase` class is the base class for recipes that build |
| 742 | software from the GNOME stack. This class sets | 823 | software 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 |
| 744 | mirrors as well as extending :term:`FILES` with the typical | 825 | mirrors as well as extending :term:`FILES` with the typical |
| 745 | GNOME installation paths. | 826 | GNOME installation paths. |
| 746 | 827 | ||
| 828 | .. _ref-classes-go: | ||
| 829 | |||
| 830 | ``go`` | ||
| 831 | ====== | ||
| 832 | |||
| 833 | The :ref:`ref-classes-go` class supports building Go programs. The behavior of | ||
| 834 | this class is controlled by the mandatory :term:`GO_IMPORT` variable, and | ||
| 835 | by the optional :term:`GO_INSTALL` and :term:`GO_INSTALL_FILTEROUT` ones. | ||
| 836 | |||
| 837 | To 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>` | ||
| 839 | recipe as an example. | ||
| 840 | |||
| 841 | .. _ref-classes-go-mod: | ||
| 842 | |||
| 843 | ``go-mod`` | ||
| 844 | ========== | ||
| 845 | |||
| 846 | The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the | ||
| 847 | :ref:`ref-classes-go` class. | ||
| 848 | |||
| 849 | See 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 | ||
| 752 | Provides support for recipes building software that supports GObject | 856 | Provides support for recipes building software that supports GObject |
| 753 | introspection. This functionality is only enabled if the | 857 | introspection. 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 | ||
| 770 | The ``grub-efi`` class provides ``grub-efi``-specific functions for | 875 | The :ref:`ref-classes-grub-efi` class provides ``grub-efi``-specific functions for |
| 771 | building bootable images. | 876 | building bootable images. |
| 772 | 877 | ||
| 773 | This class supports several variables: | 878 | This 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 | ||
| 802 | The ``gsettings`` class provides common functionality for recipes that | 907 | The :ref:`ref-classes-gsettings` class provides common functionality for recipes that |
| 803 | need to install GSettings (glib) schemas. The schemas are assumed to be | 908 | need to install GSettings (glib) schemas. The schemas are assumed to be |
| 804 | part of the main package. Appropriate post-install and post-remove | 909 | part 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 | ||
| 813 | The ``gtk-doc`` class is a helper class to pull in the appropriate | 918 | The :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 | ||
| 821 | The ``gtk-icon-cache`` class generates the proper post-install and | 926 | The :ref:`ref-classes-gtk-icon-cache` class generates the proper post-install and |
| 822 | post-remove (postinst/postrm) scriptlets for packages that use GTK+ and | 927 | post-remove (postinst/postrm) scriptlets for packages that use GTK+ and |
| 823 | install icons. These scriptlets call ``gtk-update-icon-cache`` to add | 928 | install icons. These scriptlets call ``gtk-update-icon-cache`` to add |
| 824 | the fonts to GTK+'s icon cache. Since the cache files are | 929 | the 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 | ||
| 834 | The ``gtk-immodules-cache`` class generates the proper post-install and | 939 | The :ref:`ref-classes-gtk-immodules-cache` class generates the proper post-install and |
| 835 | post-remove (postinst/postrm) scriptlets for packages that install GTK+ | 940 | post-remove (postinst/postrm) scriptlets for packages that install GTK+ |
| 836 | input method modules for virtual keyboards. These scriptlets call | 941 | input 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 | ||
| 852 | The ``gzipnative`` class enables the use of different native versions of | 957 | The :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 |
| 854 | build host. | 959 | build host. |
| 855 | 960 | ||
| 856 | .. _ref-classes-icecc: | 961 | .. _ref-classes-icecc: |
| 857 | 962 | ||
| 858 | ``icecc.bbclass`` | 963 | ``icecc`` |
| 859 | ================= | 964 | ========= |
| 860 | 965 | ||
| 861 | The ``icecc`` class supports | 966 | The :ref:`ref-classes-icecc` class supports |
| 862 | `Icecream <https://github.com/icecc/icecream>`__, which facilitates | 967 | `Icecream <https://github.com/icecc/icecream>`__, which facilitates |
| 863 | taking compile jobs and distributing them among remote machines. | 968 | taking 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 |
| 867 | configure or compile, the OpenEmbedded build system adds the directories | 972 | configure or compile, the OpenEmbedded build system adds the directories |
| 868 | at the head of the ``PATH`` list and then sets the ``ICECC_CXX`` and | 973 | at 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`` |
| 870 | compilers, respectively. | 975 | compilers, respectively. |
| 871 | 976 | ||
| 872 | For the cross compiler, the class creates a ``tar.gz`` file that | 977 | For 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 | |||
| 874 | is the version of the cross-compiler used in the cross-development | 979 | is the version of the cross-compiler used in the cross-development |
| 875 | toolchain, accordingly. | 980 | toolchain, accordingly. |
| 876 | 981 | ||
| 877 | The class handles all three different compile stages (i.e native | 982 | The class handles all three different compile stages (i.e native, |
| 878 | ,cross-kernel and target) and creates the necessary environment | 983 | cross-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 |
| 880 | supports SDK generation. | 985 | supports SDK generation. |
| 881 | 986 | ||
| @@ -885,12 +990,13 @@ using ``which``. If :term:`ICECC_ENV_EXEC` is set | |||
| 885 | in your ``local.conf`` file, the variable should point to the | 990 | in 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 |
| 887 | a user-provided script, the build system uses the default script | 992 | a user-provided script, the build system uses the default script |
| 888 | provided by the recipe ``icecc-create-env-native.bb``. | 993 | provided 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 | ||
| 895 | If you do not want the Icecream distributed compile support to apply to | 1001 | If you do not want the Icecream distributed compile support to apply to |
| 896 | specific recipes or classes, you can ask them to be ignored by Icecream | 1002 | specific recipes or classes, you can ask them to be ignored by Icecream |
| @@ -905,13 +1011,13 @@ Additionally, you can list recipes using the | |||
| 905 | your ``local.conf`` file to force ``icecc`` to be enabled for recipes | 1011 | your ``local.conf`` file to force ``icecc`` to be enabled for recipes |
| 906 | using an empty :term:`PARALLEL_MAKE` variable. | 1012 | using an empty :term:`PARALLEL_MAKE` variable. |
| 907 | 1013 | ||
| 908 | Inheriting the ``icecc`` class changes all sstate signatures. | 1014 | Inheriting the :ref:`ref-classes-icecc` class changes all sstate signatures. |
| 909 | Consequently, if a development team has a dedicated build system that | 1015 | Consequently, if a development team has a dedicated build system that |
| 910 | populates :term:`SSTATE_MIRRORS` and they want to | 1016 | populates :term:`SSTATE_MIRRORS` and they want to |
| 911 | reuse sstate from :term:`SSTATE_MIRRORS`, then all developers and the build | 1017 | reuse sstate from :term:`SSTATE_MIRRORS`, then all developers and the build |
| 912 | system need to either inherit the ``icecc`` class or nobody should. | 1018 | system need to either inherit the :ref:`ref-classes-icecc` class or nobody should. |
| 913 | 1019 | ||
| 914 | At the distribution level, you can inherit the ``icecc`` class to be | 1020 | At the distribution level, you can inherit the :ref:`ref-classes-icecc` class to be |
| 915 | sure that all builders start with the same sstate signatures. After | 1021 | sure that all builders start with the same sstate signatures. After |
| 916 | inheriting the class, you can then disable the feature by setting the | 1022 | inheriting 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 | ||
| 934 | The ``image`` class helps support creating images in different formats. | 1040 | The :ref:`ref-classes-image` class helps support creating images in different formats. |
| 935 | First, the root filesystem is created from packages using one of the | 1041 | First, 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 |
| 937 | then one or more image files are created. | 1043 | then 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 | ||
| 957 | The ``image-buildinfo`` class writes information to the target | 1063 | The :ref:`ref-classes-image-buildinfo` class writes information to the target |
| 958 | filesystem on ``/etc/build``. | 1064 | filesystem 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 | ||
| 965 | The ``image_types`` class defines all of the standard image output types | 1071 | The :ref:`ref-classes-image_types` class defines all of the standard image output types |
| 966 | that you can enable through the | 1072 | that you can enable through the |
| 967 | :term:`IMAGE_FSTYPES` variable. You can use this | 1073 | :term:`IMAGE_FSTYPES` variable. You can use this |
| 968 | class as a reference on how to add support for custom image output | 1074 | class as a reference on how to add support for custom image output |
| 969 | types. | 1075 | types. |
| 970 | 1076 | ||
| 971 | By default, the :ref:`image <ref-classes-image>` class automatically | 1077 | By default, the :ref:`ref-classes-image` class automatically |
| 972 | enables the ``image_types`` class. The ``image`` class uses the | 1078 | enables 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 | ||
| 984 | The ``image_types`` class also handles conversion and compression of images. | 1090 | The :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 | ||
| 997 | This class controls building "live" (i.e. HDDIMG and ISO) images. Live | 1103 | This class controls building "live" (i.e. HDDIMG and ISO) images. Live |
| 998 | images contain syslinux for legacy booting, as well as the bootloader | 1104 | images 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 | ||
| 1010 | The ``insane`` class adds a step to the package generation process so | 1116 | The :ref:`ref-classes-insane` class adds a step to the package generation process so |
| 1011 | that output quality assurance checks are generated by the OpenEmbedded | 1117 | that output quality assurance checks are generated by the OpenEmbedded |
| 1012 | build system. A range of checks are performed that check the build's | 1118 | build system. A range of checks are performed that check the build's |
| 1013 | output for common problems that show up during runtime. Distribution | 1119 | output 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 | ||
| 1310 | The ``insserv`` class uses the ``insserv`` utility to update the order | 1470 | The :ref:`ref-classes-insserv` class uses the ``insserv`` utility to update the order |
| 1311 | of symbolic links in ``/etc/rc?.d/`` within an image based on | 1471 | of symbolic links in ``/etc/rc?.d/`` within an image based on |
| 1312 | dependencies specified by LSB headers in the ``init.d`` scripts | 1472 | dependencies specified by LSB headers in the ``init.d`` scripts |
| 1313 | themselves. | 1473 | themselves. |
| 1314 | 1474 | ||
| 1315 | .. _ref-classes-kernel: | 1475 | .. _ref-classes-kernel: |
| 1316 | 1476 | ||
| 1317 | ``kernel.bbclass`` | 1477 | ``kernel`` |
| 1318 | ================== | 1478 | ========== |
| 1319 | 1479 | ||
| 1320 | The ``kernel`` class handles building Linux kernels. The class contains | 1480 | The :ref:`ref-classes-kernel` class handles building Linux kernels. The class contains |
| 1321 | code to build all kernel trees. All needed headers are staged into the | 1481 | code 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 |
| 1323 | using the :ref:`module <ref-classes-module>` class. | 1483 | using the :ref:`ref-classes-module` class. |
| 1324 | 1484 | ||
| 1325 | This means that each built kernel module is packaged separately and | 1485 | If a file named ``defconfig`` is listed in :term:`SRC_URI`, then by default |
| 1326 | inter-module dependencies are created by parsing the ``modinfo`` output. | 1486 | :ref:`ref-tasks-configure` copies it as ``.config`` in the build directory, |
| 1327 | If all modules are required, then installing the ``kernel-modules`` | 1487 | so it is automatically used as the kernel configuration for the build. This |
| 1328 | package installs all packages with modules and various other kernel | 1488 | copy is not performed in case ``.config`` already exists there: this allows |
| 1329 | packages such as ``kernel-vmlinux``. | 1489 | recipes to produce a configuration by other means in |
| 1330 | 1490 | ``do_configure:prepend``. | |
| 1331 | The ``kernel`` class contains logic that allows you to embed an initial | 1491 | |
| 1332 | RAM filesystem (initramfs) image when you build the kernel image. For | 1492 | Each built kernel module is packaged separately and inter-module |
| 1333 | information on how to build an initramfs, see the | 1493 | dependencies are created by parsing the ``modinfo`` output. If all modules |
| 1494 | are required, then installing the ``kernel-modules`` package installs all | ||
| 1495 | packages with modules and various other kernel packages such as | ||
| 1496 | ``kernel-vmlinux``. | ||
| 1497 | |||
| 1498 | The :ref:`ref-classes-kernel` class contains logic that allows you to embed an initial | ||
| 1499 | RAM filesystem (:term:`Initramfs`) image when you build the kernel image. For | ||
| 1500 | information 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 |
| 1335 | the Yocto Project Development Tasks Manual. | 1502 | the Yocto Project Development Tasks Manual. |
| 1336 | 1503 | ||
| 1337 | Various other classes are used by the ``kernel`` and ``module`` classes | 1504 | Various other classes are used by the :ref:`ref-classes-kernel` and :ref:`ref-classes-module` classes |
| 1338 | internally including the :ref:`kernel-arch <ref-classes-kernel-arch>`, | 1505 | internally 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 | ||
| 1347 | The ``kernel-arch`` class sets the ``ARCH`` environment variable for | 1513 | The :ref:`ref-classes-kernel-arch` class sets the ``ARCH`` environment variable for |
| 1348 | Linux kernel compilation (including modules). | 1514 | Linux 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 | |||
| 1521 | The :ref:`ref-classes-kernel-devicetree` class, which is inherited by the | ||
| 1522 | :ref:`ref-classes-kernel` class, supports device tree generation. | ||
| 1523 | |||
| 1524 | Its behavior is mainly controlled by the following variables: | ||
| 1354 | 1525 | ||
| 1355 | The ``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 |
| 1357 | generation. | 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 | ||
| 1364 | The ``kernel-fitimage`` class provides support to pack a kernel image, | 1537 | The :ref:`ref-classes-kernel-fitimage` class provides support to pack a kernel image, |
| 1365 | device trees, a U-boot script, a Initramfs bundle and a RAM disk | 1538 | device trees, a U-boot script, an :term:`Initramfs` bundle and a RAM disk |
| 1366 | into a single FIT image. In theory, a FIT image can support any number | 1539 | into a single FIT image. In theory, a FIT image can support any number |
| 1367 | of kernels, U-boot scripts, Initramfs bundles, RAM disks and device-trees. | 1540 | of kernels, U-boot scripts, :term:`Initramfs` bundles, RAM disks and device-trees. |
| 1368 | However, ``kernel-fitimage`` currently only supports | 1541 | However, :ref:`ref-classes-kernel-fitimage` currently only supports |
| 1369 | limited usescases: just one kernel image, an optional U-boot script, | 1542 | limited usecases: just one kernel image, an optional U-boot script, |
| 1370 | an optional Initramfs bundle, an optional RAM disk, and any number of | 1543 | an optional :term:`Initramfs` bundle, an optional RAM disk, and any number of |
| 1371 | device tree. | 1544 | device trees. |
| 1372 | 1545 | ||
| 1373 | To create a FIT image, it is required that :term:`KERNEL_CLASSES` | 1546 | To create a FIT image, it is required that :term:`KERNEL_CLASSES` |
| 1374 | is set to include "kernel-fitimage" and :term:`KERNEL_IMAGETYPE` | 1547 | is set to include ":ref:`ref-classes-kernel-fitimage`" and one of :term:`KERNEL_IMAGETYPE`, |
| 1375 | is set to "fitImage". | 1548 | :term:`KERNEL_ALT_IMAGETYPE` or :term:`KERNEL_IMAGETYPES` to include "fitImage". |
| 1376 | 1549 | ||
| 1377 | The options for the device tree compiler passed to ``mkimage -D`` | 1550 | The options for the device tree compiler passed to ``mkimage -D`` |
| 1378 | when creating the FIT image are specified using the | 1551 | when creating the FIT image are specified using the |
| 1379 | :term:`UBOOT_MKIMAGE_DTCOPTS` variable. | 1552 | :term:`UBOOT_MKIMAGE_DTCOPTS` variable. |
| 1380 | 1553 | ||
| 1381 | Only a single kernel can be added to the FIT image created by | 1554 | Only 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 |
| 1383 | address where the kernel image is to be loaded by U-Boot is | 1556 | address where the kernel image is to be loaded by U-Boot is |
| 1384 | specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by | 1557 | specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by |
| 1385 | :term:`UBOOT_ENTRYPOINT`. | 1558 | :term:`UBOOT_ENTRYPOINT`. |
| 1386 | 1559 | ||
| 1387 | Multiple device trees can be added to the FIT image created by | 1560 | Multiple 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. |
| 1389 | The address where the device tree is to be loaded by U-Boot is | 1562 | The address where the device tree is to be loaded by U-Boot is |
| 1390 | specified by :term:`UBOOT_DTBO_LOADADDRESS` for device tree overlays | 1563 | specified by :term:`UBOOT_DTBO_LOADADDRESS` for device tree overlays |
| 1391 | and by :term:`UBOOT_DTB_LOADADDRESS` for device tree binaries. | 1564 | and by :term:`UBOOT_DTB_LOADADDRESS` for device tree binaries. |
| 1392 | 1565 | ||
| 1393 | Only a single RAM disk can be added to the FIT image created by | 1566 | Only 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. |
| 1395 | The address where the RAM disk image is to be loaded by U-Boot | 1568 | The address where the RAM disk image is to be loaded by U-Boot |
| 1396 | is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by | 1569 | is 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` |
| 1399 | is set to 0. | 1572 | is not set to 1. |
| 1400 | 1573 | ||
| 1401 | Only a single Initramfs bundle can be added to the FIT image created by | 1574 | Only 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. |
| 1403 | In case of Initramfs, the kernel is configured to be bundled with the root filesystem | 1576 | In case of :term:`Initramfs`, the kernel is configured to be bundled with the root filesystem |
| 1404 | in the same binary (example: zImage-initramfs-:term:`MACHINE`.bin). | 1577 | in the same binary (example: zImage-initramfs-:term:`MACHINE`.bin). |
| 1405 | When the kernel is copied to RAM and executed, it unpacks the Initramfs root filesystem. | 1578 | When the kernel is copied to RAM and executed, it unpacks the :term:`Initramfs` root filesystem. |
| 1406 | The Initramfs bundle can be enabled when :term:`INITRAMFS_IMAGE` | 1579 | The :term:`Initramfs` bundle can be enabled when :term:`INITRAMFS_IMAGE` |
| 1407 | is specified and that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 1. | 1580 | is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 1. |
| 1408 | The address where the Initramfs bundle is to be loaded by U-boot is specified | 1581 | The address where the :term:`Initramfs` bundle is to be loaded by U-boot is specified |
| 1409 | by :term:`UBOOT_LOADADDRESS` and the entrypoint by :term:`UBOOT_ENTRYPOINT`. | 1582 | by :term:`UBOOT_LOADADDRESS` and the entrypoint by :term:`UBOOT_ENTRYPOINT`. |
| 1410 | 1583 | ||
| 1411 | Only a single U-boot boot script can be added to the FIT image created by | 1584 | Only 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. |
| 1413 | The boot script is specified in the ITS file as a text file containing | 1586 | The boot script is specified in the ITS file as a text file containing |
| 1414 | U-boot commands. When using a boot script the user should configure the | 1587 | U-boot commands. When using a boot script the user should configure the |
| 1415 | U-boot ``do_install`` task to copy the script to sysroot. | 1588 | U-boot :ref:`ref-tasks-install` task to copy the script to sysroot. |
| 1416 | So the script can be included in the FIT image by the ``kernel-fitimage`` | 1589 | So the script can be included in the FIT image by the :ref:`ref-classes-kernel-fitimage` |
| 1417 | class. At run-time, U-boot CONFIG_BOOTCOMMAND define can be configured to | 1590 | class. At run-time, U-boot CONFIG_BOOTCOMMAND define can be configured to |
| 1418 | load the boot script from the FIT image and executes it. | 1591 | load the boot script from the FIT image and execute it. |
| 1419 | 1592 | ||
| 1420 | The FIT image generated by ``kernel-fitimage`` class is signed when the | 1593 | The FIT image generated by the :ref:`ref-classes-kernel-fitimage` class is signed when the |
| 1421 | variables :term:`UBOOT_SIGN_ENABLE`, :term:`UBOOT_MKIMAGE_DTCOPTS`, | 1594 | variables :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 |
| 1423 | appropriately. The default values used for :term:`FIT_HASH_ALG` and | 1596 | appropriately. 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 |
| 1426 | the ``kernel-fitimage`` class when both :term:`FIT_GENERATE_KEYS` and | 1599 | the :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 | ||
| 1435 | The ``kernel-grub`` class updates the boot area and the boot menu with | 1608 | The :ref:`ref-classes-kernel-grub` class updates the boot area and the boot menu with |
| 1436 | the kernel as the priority boot mechanism while installing a RPM to | 1609 | the kernel as the priority boot mechanism while installing a RPM to |
| 1437 | update the kernel on a deployed target. | 1610 | update 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 | ||
| 1444 | The ``kernel-module-split`` class provides common functionality for | 1617 | The :ref:`ref-classes-kernel-module-split` class provides common functionality for |
| 1445 | splitting Linux kernel modules into separate packages. | 1618 | splitting 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 | ||
| 1452 | The ``kernel-uboot`` class provides support for building from | 1625 | The :ref:`ref-classes-kernel-uboot` class provides support for building from |
| 1453 | vmlinux-style kernel sources. | 1626 | vmlinux-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 | ||
| 1460 | The ``kernel-uimage`` class provides support to pack uImage. | 1633 | The :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 | ||
| 1467 | The ``kernel-yocto`` class provides common functionality for building | 1640 | The :ref:`ref-classes-kernel-yocto` class provides common functionality for building |
| 1468 | from linux-yocto style kernel source repositories. | 1641 | from 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 | ||
| 1475 | The ``kernelsrc`` class sets the Linux kernel source and version. | 1648 | The :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 | ||
| 1482 | The ``lib_package`` class supports recipes that build libraries and | 1655 | The :ref:`ref-classes-lib_package` class supports recipes that build libraries and |
| 1483 | produce executable binaries, where those binaries should not be | 1656 | produce executable binaries, where those binaries should not be |
| 1484 | installed by default along with the library. Instead, the binaries are | 1657 | installed by default along with the library. Instead, the binaries are |
| 1485 | added to a separate ``${``\ :term:`PN`\ ``}-bin`` package to | 1658 | added 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 | ||
| 1493 | The ``libc*`` classes support recipes that build packages with ``libc``: | 1666 | The :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 | ||
| 1506 | The ``license`` class provides license manifest creation and license | 1679 | The :ref:`ref-classes-license` class provides license manifest creation and license |
| 1507 | exclusion. This class is enabled by default using the default value for | 1680 | exclusion. This class is enabled by default using the default value for |
| 1508 | the :term:`INHERIT_DISTRO` variable. | 1681 | the :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 | ||
| 1515 | The ``linux-kernel-base`` class provides common functionality for | 1688 | The :ref:`ref-classes-linux-kernel-base` class provides common functionality for |
| 1516 | recipes that build out of the Linux kernel source tree. These builds | 1689 | recipes that build out of the Linux kernel source tree. These builds |
| 1517 | goes beyond the kernel itself. For example, the Perf recipe also | 1690 | goes beyond the kernel itself. For example, the Perf recipe also |
| 1518 | inherits this class. | 1691 | inherits this class. |
| 1519 | 1692 | ||
| 1520 | .. _ref-classes-linuxloader: | 1693 | .. _ref-classes-linuxloader: |
| 1521 | 1694 | ||
| 1522 | ``linuxloader.bbclass`` | 1695 | ``linuxloader`` |
| 1523 | ======================= | 1696 | =============== |
| 1524 | 1697 | ||
| 1525 | Provides the function ``linuxloader()``, which gives the value of the | 1698 | Provides the function ``linuxloader()``, which gives the value of the |
| 1526 | dynamic loader/linker provided on the platform. This value is used by a | 1699 | dynamic 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 | ||
| 1534 | The ``logging`` class provides the standard shell functions used to log | 1707 | The :ref:`ref-classes-logging` class provides the standard shell functions used to log |
| 1535 | messages for various BitBake severity levels (i.e. ``bbplain``, | 1708 | messages for various BitBake severity levels (i.e. ``bbplain``, |
| 1536 | ``bbnote``, ``bbwarn``, ``bberror``, ``bbfatal``, and ``bbdebug``). | 1709 | ``bbnote``, ``bbwarn``, ``bberror``, ``bbfatal``, and ``bbdebug``). |
| 1537 | 1710 | ||
| 1538 | This class is enabled by default since it is inherited by the ``base`` | 1711 | This class is enabled by default since it is inherited by the :ref:`ref-classes-base` |
| 1539 | class. | 1712 | class. |
| 1540 | 1713 | ||
| 1541 | .. _ref-classes-meson: | 1714 | .. _ref-classes-meson: |
| 1542 | 1715 | ||
| 1543 | ``meson.bbclass`` | 1716 | ``meson`` |
| 1544 | ================= | 1717 | ========= |
| 1545 | 1718 | ||
| 1546 | The :ref:`ref-classes-meson` class allows to create recipes that build software | 1719 | The :ref:`ref-classes-meson` class allows to create recipes that build software |
| 1547 | using the `Meson <https://mesonbuild.com/>`__ build system. You can use | 1720 | using the `Meson <https://mesonbuild.com/>`__ build system. You can use the |
| 1548 | the :term:`MESON_BUILDTYPE` and :term:`EXTRA_OEMESON` variables to specify | 1721 | :term:`MESON_BUILDTYPE` and :term:`EXTRA_OEMESON` |
| 1549 | additional configuration options to be passed using the ``meson`` command line. | 1722 | variables 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 | ||
| 1556 | The ``metadata_scm`` class provides functionality for querying the | 1730 | The :ref:`ref-classes-metadata_scm` class provides functionality for querying the |
| 1557 | branch and revision of a Source Code Manager (SCM) repository. | 1731 | branch and revision of a Source Code Manager (SCM) repository. |
| 1558 | 1732 | ||
| 1559 | The :ref:`base <ref-classes-base>` class uses this class to print the | 1733 | The :ref:`ref-classes-base` class uses this class to print the revisions of |
| 1560 | revisions of each layer before starting every build. The | 1734 | each layer before starting every build. The :ref:`ref-classes-metadata_scm` |
| 1561 | ``metadata_scm`` class is enabled by default because it is inherited by | 1735 | class is enabled by default because it is inherited by the |
| 1562 | the ``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 | ||
| 1569 | The ``migrate_localcount`` class verifies a recipe's localcount data and | 1743 | The :ref:`ref-classes-migrate_localcount` class verifies a recipe's localcount data and |
| 1570 | increments it appropriately. | 1744 | increments it appropriately. |
| 1571 | 1745 | ||
| 1572 | .. _ref-classes-mime: | 1746 | .. _ref-classes-mime: |
| 1573 | 1747 | ||
| 1574 | ``mime.bbclass`` | 1748 | ``mime`` |
| 1575 | ================ | 1749 | ======== |
| 1576 | 1750 | ||
| 1577 | The ``mime`` class generates the proper post-install and post-remove | 1751 | The :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. |
| 1579 | These scriptlets call ``update-mime-database`` to add the MIME types to | 1753 | These scriptlets call ``update-mime-database`` to add the MIME types to |
| 1580 | the shared database. | 1754 | the 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 | ||
| 1587 | The :ref:`mime-xdg <ref-classes-mime-xdg>` class generates the proper | 1761 | The :ref:`ref-classes-mime-xdg` class generates the proper |
| 1588 | post-install and post-remove (postinst/postrm) scriptlets for packages | 1762 | post-install and post-remove (postinst/postrm) scriptlets for packages |
| 1589 | that install ``.desktop`` files containing ``MimeType`` entries. | 1763 | that install ``.desktop`` files containing ``MimeType`` entries. |
| 1590 | These scriptlets call ``update-desktop-database`` to add the MIME types | 1764 | These 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 | ||
| 1608 | The ``mirrors`` class sets up some standard | 1782 | The :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 |
| 1610 | mirrors provide a fall-back path in case the upstream source specified | 1784 | mirrors provide a fall-back path in case the upstream source specified |
| 1611 | in :term:`SRC_URI` within recipes is unavailable. | 1785 | in :term:`SRC_URI` within recipes is unavailable. |
| 1612 | 1786 | ||
| 1613 | This class is enabled by default since it is inherited by the | 1787 | This 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 | ||
| 1621 | The ``module`` class provides support for building out-of-tree Linux | 1795 | The :ref:`ref-classes-module` class provides support for building out-of-tree Linux |
| 1622 | kernel modules. The class inherits the | 1796 | kernel 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 |
| 1625 | and implements the :ref:`ref-tasks-compile` and | ||
| 1626 | :ref:`ref-tasks-install` tasks. The class provides | ||
| 1627 | everything needed to build and package a kernel module. | 1799 | everything needed to build and package a kernel module. |
| 1628 | 1800 | ||
| 1629 | For general information on out-of-tree Linux kernel modules, see the | 1801 | For 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 | ||
| 1638 | The ``module-base`` class provides the base functionality for building | 1810 | The :ref:`ref-classes-module-base` class provides the base functionality for |
| 1639 | Linux kernel modules. Typically, a recipe that builds software that | 1811 | building Linux kernel modules. Typically, a recipe that builds software that |
| 1640 | includes one or more kernel modules and has its own means of building | 1812 | includes one or more kernel modules and has its own means of building the module |
| 1641 | the module inherits this class as opposed to inheriting the | 1813 | inherits this class as opposed to inheriting the :ref:`ref-classes-module` |
| 1642 | :ref:`module <ref-classes-module>` class. | 1814 | class. |
| 1643 | 1815 | ||
| 1644 | .. _ref-classes-multilib*: | 1816 | .. _ref-classes-multilib*: |
| 1645 | 1817 | ||
| 1646 | ``multilib*.bbclass`` | 1818 | ``multilib*`` |
| 1647 | ===================== | 1819 | ============= |
| 1648 | 1820 | ||
| 1649 | The ``multilib*`` classes provide support for building libraries with | 1821 | The :ref:`ref-classes-multilib*` classes provide support for building libraries with |
| 1650 | different target optimizations or target architectures and installing | 1822 | different target optimizations or target architectures and installing |
| 1651 | them side-by-side in the same image. | 1823 | them 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 | ||
| 1662 | The ``native`` class provides common functionality for recipes that | 1834 | The :ref:`ref-classes-native` class provides common functionality for recipes that |
| 1663 | build tools to run on the :term:`Build Host` (i.e. tools that use the compiler | 1835 | build tools to run on the :term:`Build Host` (i.e. tools that use the compiler |
| 1664 | or other tools from the build host). | 1836 | or other tools from the build host). |
| 1665 | 1837 | ||
| 1666 | You can create a recipe that builds tools that run natively on the host | 1838 | You can create a recipe that builds tools that run natively on the host |
| 1667 | a couple different ways: | 1839 | a 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 | ||
| 1694 | Although applied differently, the ``native`` class is used with both | 1866 | Although applied differently, the :ref:`ref-classes-native` class is used with both |
| 1695 | methods. The advantage of the second method is that you do not need to | 1867 | methods. The advantage of the second method is that you do not need to |
| 1696 | have two separate recipes (assuming you need both) for native and | 1868 | have two separate recipes (assuming you need both) for native and |
| 1697 | target. All common parts of the recipe are automatically shared. | 1869 | target. 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 | ||
| 1704 | The ``nativesdk`` class provides common functionality for recipes that | 1876 | The :ref:`ref-classes-nativesdk` class provides common functionality for recipes that |
| 1705 | wish to build tools to run as part of an SDK (i.e. tools that run on | 1877 | wish 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 | |||
| 1709 | couple different ways: | 1881 | couple 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 | ||
| 1735 | Although applied differently, the ``nativesdk`` class is used with both | 1907 | Although applied differently, the :ref:`ref-classes-nativesdk` class is used with both |
| 1736 | methods. The advantage of the second method is that you do not need to | 1908 | methods. The advantage of the second method is that you do not need to |
| 1737 | have two separate recipes (assuming you need both) for the SDK machine | 1909 | have two separate recipes (assuming you need both) for the SDK machine |
| 1738 | and the target. All common parts of the recipe are automatically shared. | 1910 | and 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 | ||
| 1745 | Disables packaging tasks for those recipes and classes where packaging | 1917 | Disables packaging tasks for those recipes and classes where packaging |
| 1746 | is not needed. | 1918 | is not needed. |
| 1747 | 1919 | ||
| 1748 | .. _ref-classes-npm: | 1920 | .. _ref-classes-npm: |
| 1749 | 1921 | ||
| 1750 | ``npm.bbclass`` | 1922 | ``npm`` |
| 1751 | =============== | 1923 | ======= |
| 1752 | 1924 | ||
| 1753 | Provides support for building Node.js software fetched using the `node | 1925 | Provides support for building Node.js software fetched using the |
| 1754 | package 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 | ||
| 1770 | The ``oelint`` class is an obsolete lint checking tool available in | 1942 | The :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 | ||
| 1773 | There are some classes that could be generally useful in OE-Core but | 1945 | There are some classes that could be generally useful in OE-Core but |
| 1774 | are never actually used within OE-Core itself. The ``oelint`` class is | 1946 | are never actually used within OE-Core itself. The :ref:`ref-classes-oelint` class is |
| 1775 | one such example. However, being aware of this class can reduce the | 1947 | one such example. However, being aware of this class can reduce the |
| 1776 | proliferation of different versions of similar classes across multiple | 1948 | proliferation of different versions of similar classes across multiple |
| 1777 | layers. | 1949 | layers. |
| 1778 | 1950 | ||
| 1779 | .. _ref-classes-overlayfs: | 1951 | .. _ref-classes-overlayfs: |
| 1780 | 1952 | ||
| 1781 | ``overlayfs.bbclass`` | 1953 | ``overlayfs`` |
| 1782 | ======================= | 1954 | ============= |
| 1783 | 1955 | ||
| 1784 | It's often desired in Embedded System design to have a read-only root filesystem. | 1956 | It's often desired in Embedded System design to have a read-only root filesystem. |
| 1785 | But a lot of different applications might want to have read-write access to | 1957 | But 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 | ||
| 1805 | The class assumes you have a ``data.mount`` systemd unit defined elsewhere in your BSP | 1977 | The 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:: | |||
| 1825 | On a practical note, your application recipe might require multiple | 1997 | On a practical note, your application recipe might require multiple |
| 1826 | overlays to be mounted before running to avoid writing to the underlying | 1998 | overlays to be mounted before running to avoid writing to the underlying |
| 1827 | file system (which can be forbidden in case of read-only file system) | 1999 | file system (which can be forbidden in case of read-only file system) |
| 1828 | To achieve that :ref:`overlayfs <ref-classes-overlayfs>` provides a ``systemd`` | 2000 | To achieve that :ref:`ref-classes-overlayfs` provides a ``systemd`` |
| 1829 | helper service for mounting overlays. This helper service is named | 2001 | helper 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 | ||
| 1848 | In order to have the ``/etc`` directory in overlayfs a special handling at early | 2020 | In order to have the ``/etc`` directory in overlayfs a special handling at early |
| 1849 | boot stage is required. The idea is to supply a custom init script that mounts | 2021 | boot 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 | ||
| 1893 | The ``own-mirrors`` class makes it easier to set up your own | 2065 | The :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 |
| 1895 | before attempting to fetch it from the upstream specified in | 2067 | before 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 | ||
| 1912 | The ``package`` class supports generating packages from a build's | 2084 | The :ref:`ref-classes-package` class supports generating packages from a build's |
| 1913 | output. The core generic functionality is in ``package.bbclass``. The | 2085 | output. The core generic functionality is in ``package.bbclass``. The |
| 1914 | code specific to particular package types resides in these | 2086 | code specific to particular package types resides in these |
| 1915 | package-specific classes: | 2087 | package-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 | ||
| 1928 | You can control the list of resulting package formats by using the | 2090 | You 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`` |
| 1930 | configuration file, which is located in the :term:`Build Directory`. | 2092 | configuration file, which is located in the :term:`Build Directory`. |
| 1931 | When defining the variable, you can | 2093 | When defining the variable, you can specify one or more package types. |
| 1932 | specify one or more package types. Since images are generated from | 2094 | Since images are generated from packages, a packaging class is needed |
| 1933 | packages, a packaging class is needed to enable image generation. The | 2095 | to enable image generation. The first class listed in this variable is |
| 1934 | first class listed in this variable is used for image generation. | 2096 | used for image generation. |
| 1935 | 2097 | ||
| 1936 | If you take the optional step to set up a repository (package feed) on | 2098 | If you take the optional step to set up a repository (package feed) on |
| 1937 | the development host that can be used by DNF, you can install packages | 2099 | the 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. | |||
| 1948 | The reason for this discrepancy is because the RPM package manager | 2110 | The reason for this discrepancy is because the RPM package manager |
| 1949 | creates and processes more :term:`Metadata` than the IPK package | 2111 | creates and processes more :term:`Metadata` than the IPK package |
| 1950 | manager. Consequently, you might consider setting :term:`PACKAGE_CLASSES` to | 2112 | manager. 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 | ||
| 1953 | Before making your package manager decision, however, you should | 2115 | Before making your package manager decision, however, you should |
| 1954 | consider some further things about using RPM: | 2116 | consider 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 | ||
| 1979 | The ``package_deb`` class provides support for creating packages that | 2141 | The :ref:`ref-classes-package_deb` class provides support for creating packages that |
| 1980 | use the Debian (i.e. ``.deb``) file format. The class ensures the | 2142 | use the Debian (i.e. ``.deb``) file format. The class ensures the |
| 1981 | packages are written out in a ``.deb`` file format to the | 2143 | packages are written out in a ``.deb`` file format to the |
| 1982 | ``${``\ :term:`DEPLOY_DIR_DEB`\ ``}`` directory. | 2144 | ``${``\ :term:`DEPLOY_DIR_DEB`\ ``}`` directory. |
| 1983 | 2145 | ||
| 1984 | This class inherits the :ref:`package <ref-classes-package>` class and | 2146 | This class inherits the :ref:`ref-classes-package` class and |
| 1985 | is enabled through the :term:`PACKAGE_CLASSES` | 2147 | is enabled through the :term:`PACKAGE_CLASSES` |
| 1986 | variable in the ``local.conf`` file. | 2148 | variable 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 | ||
| 1993 | The ``package_ipk`` class provides support for creating packages that | 2155 | The :ref:`ref-classes-package_ipk` class provides support for creating packages that |
| 1994 | use the IPK (i.e. ``.ipk``) file format. The class ensures the packages | 2156 | use the IPK (i.e. ``.ipk``) file format. The class ensures the packages |
| 1995 | are written out in a ``.ipk`` file format to the | 2157 | are written out in a ``.ipk`` file format to the |
| 1996 | ``${``\ :term:`DEPLOY_DIR_IPK`\ ``}`` directory. | 2158 | ``${``\ :term:`DEPLOY_DIR_IPK`\ ``}`` directory. |
| 1997 | 2159 | ||
| 1998 | This class inherits the :ref:`package <ref-classes-package>` class and | 2160 | This class inherits the :ref:`ref-classes-package` class and |
| 1999 | is enabled through the :term:`PACKAGE_CLASSES` | 2161 | is enabled through the :term:`PACKAGE_CLASSES` |
| 2000 | variable in the ``local.conf`` file. | 2162 | variable 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 | ||
| 2007 | The ``package_rpm`` class provides support for creating packages that | 2169 | The :ref:`ref-classes-package_rpm` class provides support for creating packages that |
| 2008 | use the RPM (i.e. ``.rpm``) file format. The class ensures the packages | 2170 | use the RPM (i.e. ``.rpm``) file format. The class ensures the packages |
| 2009 | are written out in a ``.rpm`` file format to the | 2171 | are written out in a ``.rpm`` file format to the |
| 2010 | ``${``\ :term:`DEPLOY_DIR_RPM`\ ``}`` directory. | 2172 | ``${``\ :term:`DEPLOY_DIR_RPM`\ ``}`` directory. |
| 2011 | 2173 | ||
| 2012 | This class inherits the :ref:`package <ref-classes-package>` class and | 2174 | This class inherits the :ref:`ref-classes-package` class and |
| 2013 | is enabled through the :term:`PACKAGE_CLASSES` | 2175 | is enabled through the :term:`PACKAGE_CLASSES` |
| 2014 | variable in the ``local.conf`` file. | 2176 | variable 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 | ||
| 2021 | The ``package_tar`` class provides support for creating tarballs. The | 2183 | The :ref:`ref-classes-package_tar` class provides support for creating tarballs. The |
| 2022 | class ensures the packages are written out in a tarball format to the | 2184 | class 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 | ||
| 2025 | This class inherits the :ref:`package <ref-classes-package>` class and | 2187 | This class inherits the :ref:`ref-classes-package` class and |
| 2026 | is enabled through the :term:`PACKAGE_CLASSES` | 2188 | is enabled through the :term:`PACKAGE_CLASSES` |
| 2027 | variable in the ``local.conf`` file. | 2189 | variable 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 | ||
| 2040 | The ``packagedata`` class provides common functionality for reading | 2202 | The :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 |
| 2042 | files contain information about each output package produced by the | 2204 | files contain information about each output package produced by the |
| 2043 | OpenEmbedded build system. | 2205 | OpenEmbedded build system. |
| 2044 | 2206 | ||
| 2045 | This class is enabled by default because it is inherited by the | 2207 | This 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 | ||
| 2053 | The ``packagegroup`` class sets default values appropriate for package | 2215 | The :ref:`ref-classes-packagegroup` class sets default values appropriate for package |
| 2054 | group recipes (e.g. :term:`PACKAGES`, :term:`PACKAGE_ARCH`, :term:`ALLOW_EMPTY`, and | 2216 | group recipes (e.g. :term:`PACKAGES`, :term:`PACKAGE_ARCH`, :term:`ALLOW_EMPTY`, and |
| 2055 | so forth). It is highly recommended that all package group recipes | 2217 | so forth). It is highly recommended that all package group recipes |
| 2056 | inherit this class. | 2218 | inherit 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 | ||
| 2069 | The ``patch`` class provides all functionality for applying patches | 2231 | The :ref:`ref-classes-patch` class provides all functionality for applying patches |
| 2070 | during the :ref:`ref-tasks-patch` task. | 2232 | during the :ref:`ref-tasks-patch` task. |
| 2071 | 2233 | ||
| 2072 | This class is enabled by default because it is inherited by the | 2234 | This 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 | ||
| 2080 | When inherited by a recipe, the ``perlnative`` class supports using the | 2242 | When inherited by a recipe, the :ref:`ref-classes-perlnative` class supports using the |
| 2081 | native version of Perl built by the build system rather than using the | 2243 | native version of Perl built by the build system rather than using the |
| 2082 | version provided by the build host. | 2244 | version 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 | ||
| 2089 | The :ref:`pypi <ref-classes-pypi>` class sets variables appropriately for recipes that build | 2251 | The :ref:`ref-classes-pypi` class sets variables appropriately for recipes that build |
| 2090 | Python modules from `PyPI <https://pypi.org/>`__, the Python Package Index. | 2252 | Python modules from `PyPI <https://pypi.org/>`__, the Python Package Index. |
| 2091 | By default it determines the PyPI package name based upon :term:`BPN` | 2253 | By 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 |
| 2093 | some cases you may need to set it manually in the recipe by setting | 2255 | some cases you may need to set it manually in the recipe by setting |
| 2094 | :term:`PYPI_PACKAGE`. | 2256 | :term:`PYPI_PACKAGE`. |
| 2095 | 2257 | ||
| 2096 | Variables set by the :ref:`pypi <ref-classes-pypi>` class include :term:`SRC_URI`, :term:`SECTION`, | 2258 | Variables 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` |
| 2098 | and :term:`CVE_PRODUCT`. | 2260 | and :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 | ||
| 2105 | The ``python_flit_core`` class enables building Python modules which declare | 2267 | The :ref:`ref-classes-python_flit_core` class enables building Python modules which declare |
| 2106 | the `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant | 2268 | the `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]`` |
| 2108 | section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__). | 2270 | section 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 | |||
| 2110 | Python modules built with ``flit_core.buildapi`` are pure Python (no | 2272 | Python modules built with ``flit_core.buildapi`` are pure Python (no |
| 2111 | ``C`` or ``Rust`` extensions). | 2273 | ``C`` or ``Rust`` extensions). |
| 2112 | 2274 | ||
| 2113 | Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class. | 2275 | Internally 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 | ||
| 2120 | The ``python_pep517`` class builds and installs a Python ``wheel`` binary | 2282 | The :ref:`ref-classes-python_pep517` class builds and installs a Python ``wheel`` binary |
| 2121 | archive (see `PEP-517 <https://peps.python.org/pep-0517/>`__). | 2283 | archive (see `PEP-517 <https://peps.python.org/pep-0517/>`__). |
| 2122 | 2284 | ||
| 2123 | Recipes wouldn't inherit this directly, instead typically another class will | 2285 | Recipes wouldn't inherit this directly, instead typically another class will |
| 2124 | inherit this, add the relevant native dependencies, and set | 2286 | inherit this and add the relevant native dependencies. |
| 2125 | :term:`PEP517_BUILD_API` to the Python class which implements the PEP-517 build | ||
| 2126 | API. | ||
| 2127 | 2287 | ||
| 2128 | Examples of classes which do this are :ref:`python_flit_core | 2288 | Examples 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 | ||
| 2138 | The ``python_poetry_core`` class enables building Python modules which use the | 2297 | The :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 | ||
| 2141 | Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class. | 2300 | Internally this uses the :ref:`ref-classes-python_pep517` class. |
| 2301 | |||
| 2302 | .. _ref-classes-python_pyo3: | ||
| 2303 | |||
| 2304 | ``python_pyo3`` | ||
| 2305 | =============== | ||
| 2306 | |||
| 2307 | The :ref:`ref-classes-python_pyo3` class helps make sure that Python extensions | ||
| 2308 | written in Rust and built with `PyO3 <https://pyo3.rs/>`__, properly set up the | ||
| 2309 | environment for cross compilation. | ||
| 2310 | |||
| 2311 | This class is internal to the :ref:`ref-classes-python-setuptools3_rust` class | ||
| 2312 | and is not meant to be used directly in recipes. | ||
| 2313 | |||
| 2314 | .. _ref-classes-python-setuptools3_rust: | ||
| 2315 | |||
| 2316 | ``python-setuptools3_rust`` | ||
| 2317 | =========================== | ||
| 2318 | |||
| 2319 | The :ref:`ref-classes-python-setuptools3_rust` class enables building Python | ||
| 2320 | extensions implemented in Rust with `PyO3 <https://pyo3.rs/>`__, which allows | ||
| 2321 | to compile and distribute Python extensions written in Rust as easily | ||
| 2322 | as if they were written in C. | ||
| 2323 | |||
| 2324 | This 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 | ||
| 2148 | The ``pixbufcache`` class generates the proper post-install and | 2332 | The :ref:`ref-classes-pixbufcache` class generates the proper post-install and |
| 2149 | post-remove (postinst/postrm) scriptlets for packages that install | 2333 | post-remove (postinst/postrm) scriptlets for packages that install |
| 2150 | pixbuf loaders, which are used with ``gdk-pixbuf``. These scriptlets | 2334 | pixbuf loaders, which are used with ``gdk-pixbuf``. These scriptlets |
| 2151 | call ``update_pixbuf_cache`` to add the pixbuf loaders to the cache. | 2335 | call ``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 | ||
| 2166 | The ``pkgconfig`` class provides a standard way to get header and | 2350 | The :ref:`ref-classes-pkgconfig` class provides a standard way to get header and |
| 2167 | library information by using ``pkg-config``. This class aims to smooth | 2351 | library information by using ``pkg-config``. This class aims to smooth |
| 2168 | integration of ``pkg-config`` into libraries that use it. | 2352 | integration of ``pkg-config`` into libraries that use it. |
| 2169 | 2353 | ||
| 2170 | During staging, BitBake installs ``pkg-config`` data into the | 2354 | During 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 |
| 2173 | files. | 2357 | files. |
| 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 | ||
| 2180 | The ``populate_sdk`` class provides support for SDK-only recipes. For | 2364 | The :ref:`ref-classes-populate-sdk` class provides support for SDK-only recipes. For |
| 2181 | information on advantages gained when building a cross-development | 2365 | information on advantages gained when building a cross-development |
| 2182 | toolchain using the :ref:`ref-tasks-populate_sdk` | 2366 | toolchain using the :ref:`ref-tasks-populate_sdk` |
| 2183 | task, see the ":ref:`sdk-manual/appendix-obtain:building an sdk installer`" | 2367 | task, 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 | ||
| 2192 | The ``populate_sdk_*`` classes support SDK creation and consist of the | 2376 | The :ref:`ref-classes-populate-sdk-*` classes support SDK creation and consist of the |
| 2193 | following classes: | 2377 | following 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 | ||
| 2210 | The ``populate_sdk_base`` class inherits the appropriate | 2394 | The :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 | ||
| 2214 | The base class ensures all source and destination directories are | 2398 | The base class ensures all source and destination directories are |
| 2215 | established and then populates the SDK. After populating the SDK, the | 2399 | established 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 |
| 2218 | contains the cross-compiler and associated tooling, and the target, | 2402 | contains the cross-compiler and associated tooling, and the target, |
| 2219 | which contains a target root filesystem that is configured for the SDK | 2403 | which contains a target root filesystem that is configured for the SDK |
| @@ -2226,9 +2410,9 @@ which consists of the following:: | |||
| 2226 | Finally, the base populate SDK class creates the toolchain environment | 2410 | Finally, the base populate SDK class creates the toolchain environment |
| 2227 | setup script, the tarball of the SDK, and the installer. | 2411 | setup script, the tarball of the SDK, and the installer. |
| 2228 | 2412 | ||
| 2229 | The respective ``populate_sdk_deb``, ``populate_sdk_rpm``, and | 2413 | The 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. |
| 2231 | These classes are inherited by and used with the ``populate_sdk_base`` | 2415 | These classes are inherited by and used with the :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
| 2232 | class. | 2416 | class. |
| 2233 | 2417 | ||
| 2234 | For more information on the cross-development toolchain generation, see | 2418 | For 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 | ||
| 2249 | The ``prexport`` class provides functionality for exporting | 2433 | The :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 | ||
| 2262 | The ``primport`` class provides functionality for importing | 2446 | The :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 | ||
| 2275 | The :ref:`ref-classes-prserv` class provides functionality for using a :ref:`PR | 2459 | The :ref:`ref-classes-prserv` class provides functionality for using a :ref:`PR |
| 2276 | service <dev-manual/packages:working with a pr service>` in order to | 2460 | service <dev-manual/packages:working with a pr service>` in order to |
| @@ -2278,14 +2462,14 @@ automatically manage the incrementing of the :term:`PR` | |||
| 2278 | variable for each recipe. | 2462 | variable for each recipe. |
| 2279 | 2463 | ||
| 2280 | This class is enabled by default because it is inherited by the | 2464 | This 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 |
| 2282 | build system will not enable the functionality of this class unless | 2466 | build 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 | ||
| 2290 | The ``ptest`` class provides functionality for packaging and installing | 2474 | The ``ptest`` class provides functionality for packaging and installing |
| 2291 | runtime tests for recipes that build software that provides these tests. | 2475 | runtime 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 | ||
| 2305 | Enables package tests (ptests) specifically for GNOME packages, which | 2489 | Enables package tests (ptests) specifically for GNOME packages, which |
| 2306 | have tests intended to be executed with ``gnome-desktop-testing``. | 2490 | have 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 | ||
| 2317 | The ``python3-dir`` class provides the base version, location, and site | 2501 | The :ref:`ref-classes-python3-dir` class provides the base version, location, and site |
| 2318 | package location for Python 3. | 2502 | package 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 | ||
| 2325 | The ``python3native`` class supports using the native version of Python | 2509 | The :ref:`ref-classes-python3native` class supports using the native version of Python |
| 2326 | 3 built by the build system rather than support of the version provided | 2510 | 3 built by the build system rather than support of the version provided |
| 2327 | by the build host. | 2511 | by the build host. |
| 2328 | 2512 | ||
| 2329 | .. _ref-classes-python3targetconfig: | 2513 | .. _ref-classes-python3targetconfig: |
| 2330 | 2514 | ||
| 2331 | ``python3targetconfig.bbclass`` | 2515 | ``python3targetconfig`` |
| 2332 | =============================== | 2516 | ======================= |
| 2333 | 2517 | ||
| 2334 | The ``python3targetconfig`` class supports using the native version of Python | 2518 | The :ref:`ref-classes-python3targetconfig` class supports using the native version of Python |
| 2335 | 3 built by the build system rather than support of the version provided | 2519 | 3 built by the build system rather than support of the version provided |
| 2336 | by the build host, except that the configuration for the target machine | 2520 | by the build host, except that the configuration for the target machine |
| 2337 | is accessible (such as correct installation directories). This also adds a | 2521 | is 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 | ||
| 2346 | The ``qemu`` class provides functionality for recipes that either need | 2530 | The :ref:`ref-classes-qemu` class provides functionality for recipes that either need |
| 2347 | QEMU or test for the existence of QEMU. Typically, this class is used to | 2531 | QEMU or test for the existence of QEMU. Typically, this class is used to |
| 2348 | run programs for a target system on the build host using QEMU's | 2532 | run programs for a target system on the build host using QEMU's |
| 2349 | application emulation mode. | 2533 | application 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 | ||
| 2356 | The ``recipe_sanity`` class checks for the presence of any host system | 2540 | The :ref:`ref-classes-recipe_sanity` class checks for the presence of any host system |
| 2357 | recipe prerequisites that might affect the build (e.g. variables that | 2541 | recipe prerequisites that might affect the build (e.g. variables that |
| 2358 | are set or software that is present). | 2542 | are 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 | ||
| 2365 | The ``relocatable`` class enables relocation of binaries when they are | 2549 | The :ref:`ref-classes-relocatable` class enables relocation of binaries when they are |
| 2366 | installed into the sysroot. | 2550 | installed into the sysroot. |
| 2367 | 2551 | ||
| 2368 | This class makes use of the :ref:`chrpath <ref-classes-chrpath>` class | 2552 | This class makes use of the :ref:`ref-classes-chrpath` class and is used by |
| 2369 | and is used by both the :ref:`cross <ref-classes-cross>` and | 2553 | both 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 | ||
| 2377 | The ``remove-libtool`` class adds a post function to the | 2560 | The :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 |
| 2379 | installed by ``libtool``. Removing these files results in them being | 2562 | installed by ``libtool``. Removing these files results in them being |
| 2380 | absent from both the sysroot and target packages. | 2563 | absent 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 | ||
| 2396 | The :ref:`ref-classes-report-error` class supports enabling the :ref:`error reporting | 2579 | The :ref:`ref-classes-report-error` class supports enabling the :ref:`error reporting |
| 2397 | tool <dev-manual/error-reporting-tool:using the error reporting tool>`", | 2580 | tool <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 | ||
| 2411 | The ``rm_work`` class supports deletion of temporary workspace, which | 2594 | The :ref:`ref-classes-rm-work` class supports deletion of temporary workspace, which |
| 2412 | can ease your hard drive demands during builds. | 2595 | can ease your hard drive demands during builds. |
| 2413 | 2596 | ||
| 2414 | The OpenEmbedded build system can use a substantial amount of disk space | 2597 | The 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 | |||
| 2417 | system generates the packages for a recipe, the work files for that | 2600 | system generates the packages for a recipe, the work files for that |
| 2418 | recipe are no longer needed. However, by default, the build system | 2601 | recipe are no longer needed. However, by default, the build system |
| 2419 | preserves these files for inspection and possible debugging purposes. If | 2602 | preserves these files for inspection and possible debugging purposes. If |
| 2420 | you would rather have these files deleted to save disk space as the | 2603 | you would rather have these files deleted to save disk space as the build |
| 2421 | build progresses, you can enable ``rm_work`` by adding the following to | 2604 | progresses, you can enable :ref:`ref-classes-rm-work` by adding the following to |
| 2422 | your ``local.conf`` file, which is found in the :term:`Build Directory`. | 2605 | your ``local.conf`` file, which is found in the :term:`Build Directory`:: |
| 2423 | :: | ||
| 2424 | 2606 | ||
| 2425 | INHERIT += "rm_work" | 2607 | INHERIT += "rm_work" |
| 2426 | 2608 | ||
| 2427 | If you are | 2609 | If you are modifying and building source code out of the work directory for a |
| 2428 | modifying and building source code out of the work directory for a | 2610 | recipe, enabling :ref:`ref-classes-rm-work` will potentially result in your |
| 2429 | recipe, enabling ``rm_work`` will potentially result in your changes to | 2611 | changes to the source being lost. To exclude some recipes from having their work |
| 2430 | the source being lost. To exclude some recipes from having their work | 2612 | directories deleted by :ref:`ref-classes-rm-work`, you can add the names of the |
| 2431 | directories deleted by ``rm_work``, you can add the names of the recipe | 2613 | recipe or recipes you are working on to the :term:`RM_WORK_EXCLUDE` variable, |
| 2432 | or recipes you are working on to the :term:`RM_WORK_EXCLUDE` variable, which | 2614 | which can also be set in your ``local.conf`` file. Here is an example:: |
| 2433 | can 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 | ||
| 2442 | The ``rootfs*`` classes support creating the root filesystem for an | 2623 | The :ref:`ref-classes-rootfs*` classes support creating the root filesystem for an |
| 2443 | image and consist of the following classes: | 2624 | image 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 | ||
| 2460 | The root filesystem is created from packages using one of the | 2641 | The 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. | 2643 | variable. |
| 2463 | 2644 | ||
| 2464 | For information on how root filesystem images are created, see the | 2645 | For information on how root filesystem images are created, see the |
| 2465 | ":ref:`overview-manual/concepts:image generation`" | 2646 | ":ref:`overview-manual/concepts:image generation`" |
| 2466 | section in the Yocto Project Overview and Concepts Manual. | 2647 | section in the Yocto Project Overview and Concepts Manual. |
| 2467 | 2648 | ||
| 2649 | .. _ref-classes-rust: | ||
| 2650 | |||
| 2651 | ``rust`` | ||
| 2652 | ======== | ||
| 2653 | |||
| 2654 | The :ref:`ref-classes-rust` class is an internal class which is just used | ||
| 2655 | in the "rust" recipe, to build the Rust compiler and runtime | ||
| 2656 | library. Except for this recipe, it is not intended to be used directly. | ||
| 2657 | |||
| 2658 | .. _ref-classes-rust-common: | ||
| 2659 | |||
| 2660 | ``rust-common`` | ||
| 2661 | =============== | ||
| 2662 | |||
| 2663 | The :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 | ||
| 2665 | intended to be used directly. | ||
| 2666 | |||
| 2468 | .. _ref-classes-sanity: | 2667 | .. _ref-classes-sanity: |
| 2469 | 2668 | ||
| 2470 | ``sanity.bbclass`` | 2669 | ``sanity`` |
| 2471 | ================== | 2670 | ========== |
| 2472 | 2671 | ||
| 2473 | The ``sanity`` class checks to see if prerequisite software is present | 2672 | The :ref:`ref-classes-sanity` class checks to see if prerequisite software is present |
| 2474 | on the host system so that users can be notified of potential problems | 2673 | on the host system so that users can be notified of potential problems |
| 2475 | that might affect their build. The class also performs basic user | 2674 | that might affect their build. The class also performs basic user |
| 2476 | configuration checks from the ``local.conf`` configuration file to | 2675 | configuration 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 | ||
| 2485 | The ``scons`` class supports recipes that need to build software that | 2684 | The :ref:`ref-classes-scons` class supports recipes that need to build software |
| 2486 | uses the SCons build system. You can use the | 2685 | that uses the SCons build system. You can use the :term:`EXTRA_OESCONS` |
| 2487 | :term:`EXTRA_OESCONS` variable to specify | 2686 | variable to specify additional configuration options you want to pass SCons |
| 2488 | additional configuration options you want to pass SCons command line. | 2687 | command line. |
| 2489 | 2688 | ||
| 2490 | .. _ref-classes-sdl: | 2689 | .. _ref-classes-sdl: |
| 2491 | 2690 | ||
| 2492 | ``sdl.bbclass`` | 2691 | ``sdl`` |
| 2493 | =============== | 2692 | ======= |
| 2494 | 2693 | ||
| 2495 | The ``sdl`` class supports recipes that need to build software that uses | 2694 | The :ref:`ref-classes-sdl` class supports recipes that need to build software that uses |
| 2496 | the Simple DirectMedia Layer (SDL) library. | 2695 | the 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 | ||
| 2503 | The ``python_setuptools_build_meta`` class enables building Python modules which | 2702 | The :ref:`ref-classes-python_setuptools_build_meta` class enables building |
| 2504 | declare the | 2703 | Python 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]`` |
| 2507 | section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__). | 2706 | section 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 | |||
| 2509 | Python modules built with ``setuptools.build_meta`` can be pure Python or | 2708 | Python modules built with ``setuptools.build_meta`` can be pure Python or |
| 2510 | include ``C`` or ``Rust`` extensions). | 2709 | include ``C`` or ``Rust`` extensions). |
| 2511 | 2710 | ||
| 2512 | Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class. | 2711 | Internally 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 | ||
| 2519 | The ``setuptools3`` class supports Python version 3.x extensions that | 2718 | The :ref:`ref-classes-setuptools3` class supports Python version 3.x extensions |
| 2520 | use build systems based on ``setuptools`` (e.g. only have a ``setup.py`` and | 2719 | that use build systems based on ``setuptools`` (e.g. only have a ``setup.py`` |
| 2521 | have not migrated to the official ``pyproject.toml`` format). If your recipe | 2720 | and have not migrated to the official ``pyproject.toml`` format). If your recipe |
| 2522 | uses these build systems, the recipe needs to inherit the ``setuptools3`` class. | 2721 | uses 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 | ||
| 2549 | The ``setuptools3_legacy`` class supports Python version 3.x extensions that use | 2749 | The :ref:`ref-classes-setuptools3_legacy` class supports |
| 2550 | build systems based on ``setuptools`` (e.g. only have a ``setup.py`` and have | 2750 | Python version 3.x extensions that use build systems based on ``setuptools`` |
| 2551 | not 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 | 2753 | this uses the traditional ``setup.py`` ``build`` and ``install`` commands and |
| 2554 | `deprecated <https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v5830>`_ | 2754 | not wheels. This use of ``setuptools`` like this is |
| 2755 | `deprecated <https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v5830>`__ | ||
| 2555 | but still relatively common. | 2756 | but 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 | |||
| 2562 | The ``setuptools3-base`` class provides a reusable base for other classes | ||
| 2563 | that support building Python version 3.x extensions. If you need | ||
| 2564 | functionality that is not provided by the :ref:`setuptools3 <ref-classes-setuptools3>` class, you may | ||
| 2565 | want to ``inherit setuptools3-base``. Some recipes do not need the tasks | ||
| 2566 | in 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 | ||
| 2573 | The ``sign_rpm`` class supports generating signed RPM packages. | 2763 | The :ref:`ref-classes-setuptools3-base` class provides a reusable base for |
| 2764 | other classes that support building Python version 3.x extensions. If you need | ||
| 2765 | functionality that is not provided by the :ref:`ref-classes-setuptools3` class, | ||
| 2766 | you may want to ``inherit setuptools3-base``. Some recipes do not need the tasks | ||
| 2767 | in 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 | ||
| 2580 | The ``sip`` class supports recipes that build or package SIP-based | 2774 | The :ref:`ref-classes-sign_rpm` class supports generating signed RPM packages. |
| 2581 | Python bindings. | ||
| 2582 | 2775 | ||
| 2583 | .. _ref-classes-siteconfig: | 2776 | .. _ref-classes-siteconfig: |
| 2584 | 2777 | ||
| 2585 | ``siteconfig.bbclass`` | 2778 | ``siteconfig`` |
| 2586 | ====================== | 2779 | ============== |
| 2587 | 2780 | ||
| 2588 | The ``siteconfig`` class provides functionality for handling site | 2781 | The :ref:`ref-classes-siteconfig` class provides functionality for handling site |
| 2589 | configuration. The class is used by the | 2782 | configuration. The class is used by the :ref:`ref-classes-autotools` class to |
| 2590 | :ref:`autotools <ref-classes-autotools>` class to accelerate the | 2783 | accelerate 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 | ||
| 2598 | The ``siteinfo`` class provides information about the targets that might | 2790 | The :ref:`ref-classes-siteinfo` class provides information about the targets |
| 2599 | be needed by other classes or recipes. | 2791 | that might be needed by other classes or recipes. |
| 2600 | 2792 | ||
| 2601 | As an example, consider Autotools, which can require tests that must | 2793 | As an example, consider Autotools, which can require tests that must |
| 2602 | execute on the target hardware. Since this is not possible in general | 2794 | execute 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 | ||
| 2619 | The ``sstate`` class provides support for Shared State (sstate). By | 2811 | The :ref:`ref-classes-sstate` class provides support for Shared State (sstate). |
| 2620 | default, the class is enabled through the | 2812 | By default, the class is enabled through the :term:`INHERIT_DISTRO` variable's |
| 2621 | :term:`INHERIT_DISTRO` variable's default value. | 2813 | default value. |
| 2622 | 2814 | ||
| 2623 | For more information on sstate, see the | 2815 | For 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 | ||
| 2632 | The ``staging`` class installs files into individual recipe work | 2824 | The :ref:`ref-classes-staging` class installs files into individual recipe work |
| 2633 | directories for sysroots. The class contains the following key tasks: | 2825 | directories 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 | ||
| 2645 | The code in the ``staging`` class is complex and basically works in two | 2837 | The code in the :ref:`ref-classes-staging` class is complex and basically works |
| 2646 | stages: | 2838 | in 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 | ||
| 2732 | The ``syslinux`` class provides syslinux-specific functions for building | 2923 | The :ref:`ref-classes-syslinux` class provides syslinux-specific functions for |
| 2733 | bootable images. | 2924 | building bootable images. |
| 2734 | 2925 | ||
| 2735 | The class supports the following variables: | 2926 | The 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 | ||
| 2775 | The ``systemd`` class provides support for recipes that install systemd | 2966 | The :ref:`ref-classes-systemd` class provides support for recipes that install |
| 2776 | unit files. | 2967 | systemd unit files. |
| 2777 | 2968 | ||
| 2778 | The functionality for this class is disabled unless you have "systemd" | 2969 | The functionality for this class is disabled unless you have "systemd" |
| 2779 | in :term:`DISTRO_FEATURES`. | 2970 | in :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 | ||
| 2810 | The ``systemd-boot`` class provides functions specific to the | 3001 | The :ref:`ref-classes-systemd-boot` class provides functions specific to the |
| 2811 | systemd-boot bootloader for building bootable images. This is an | 3002 | systemd-boot bootloader for building bootable images. This is an |
| 2812 | internal class and is not intended to be used directly. | 3003 | internal 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 | ||
| 2819 | Set the :term:`EFI_PROVIDER` variable to | 3010 | Set 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 | 3011 | use this class. Doing so creates a standalone EFI bootloader that is not |
| 2821 | bootloader that is not dependent on systemd. | 3012 | dependent on systemd. |
| 2822 | 3013 | ||
| 2823 | For information on more variables used and supported in this class, see | 3014 | For information on more variables used and supported in this class, see |
| 2824 | the :term:`SYSTEMD_BOOT_CFG`, | 3015 | the :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 | ||
| 2837 | The ``terminal`` class provides support for starting a terminal session. | 3028 | The :ref:`ref-classes-terminal` class provides support for starting a terminal |
| 2838 | The :term:`OE_TERMINAL` variable controls which | 3029 | session. The :term:`OE_TERMINAL` variable controls which terminal emulator is |
| 2839 | terminal emulator is used for the session. | 3030 | used for the session. |
| 2840 | 3031 | ||
| 2841 | Other classes use the ``terminal`` class anywhere a separate terminal | 3032 | Other classes use the :ref:`ref-classes-terminal` class anywhere a separate |
| 2842 | session needs to be started. For example, the | 3033 | terminal session needs to be started. For example, the :ref:`ref-classes-patch` |
| 2843 | :ref:`patch <ref-classes-patch>` class assuming | 3034 | class 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 | 3036 | use the :ref:`ref-classes-terminal` class. |
| 2846 | :ref:`devshell <ref-classes-devshell>` class all use the ``terminal`` | ||
| 2847 | class. | ||
| 2848 | 3037 | ||
| 2849 | .. _ref-classes-testimage*: | 3038 | .. _ref-classes-testimage: |
| 2850 | 3039 | ||
| 2851 | ``testimage*.bbclass`` | 3040 | ``testimage`` |
| 2852 | ====================== | 3041 | ============= |
| 2853 | 3042 | ||
| 2854 | The ``testimage*`` classes support running automated tests against | 3043 | The :ref:`ref-classes-testimage` class supports running automated tests against |
| 2855 | images using QEMU and on actual hardware. The classes handle loading the | 3044 | images using QEMU and on actual hardware. The classes handle loading the |
| 2856 | tests and starting the image. To use the classes, you need to perform | 3045 | tests and starting the image. To use the classes, you need to perform |
| 2857 | steps to set up the environment. | 3046 | steps to set up the environment. |
| 2858 | 3047 | ||
| 2859 | .. note:: | 3048 | To 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 | ||
| 2865 | The tests are commands that run on the target system over ``ssh``. Each | 3052 | The tests are commands that run on the target system over ``ssh``. Each |
| 2866 | test is written in Python and makes use of the ``unittest`` module. | 3053 | test is written in Python and makes use of the ``unittest`` module. |
| 2867 | 3054 | ||
| 2868 | The ``testimage.bbclass`` runs tests on an image when called using the | 3055 | The :ref:`ref-classes-testimage` class runs tests on an image when called using the |
| 2869 | following:: | 3056 | following:: |
| 2870 | 3057 | ||
| 2871 | $ bitbake -c testimage image | 3058 | $ bitbake -c testimage image |
| 2872 | 3059 | ||
| 2873 | The ``testimage-auto`` class | 3060 | Alternatively, if you wish to have tests automatically run for each image |
| 2874 | runs tests on an image after the image is constructed (i.e. | 3061 | after 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 | ||
| 2877 | For information on how to enable, run, and create new tests, see the | 3065 | For 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 | ||
| 2886 | This class supports running automated tests against software development | 3074 | This class supports running automated tests against software development |
| 2887 | kits (SDKs). The ``testsdk`` class runs tests on an SDK when called | 3075 | kits (SDKs). The :ref:`ref-classes-testsdk` class runs tests on an SDK when called |
| 2888 | using the following:: | 3076 | using 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 | ||
| 2903 | This class should be inherited by recipes whose upstream packages invoke | 3091 | This class should be inherited by recipes whose upstream packages invoke |
| 2904 | the ``texinfo`` utilities at build-time. Native and cross recipes are | 3092 | the ``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 | ||
| 2921 | The ``toaster`` class collects information about packages and images and | 3109 | The :ref:`ref-classes-toaster` class collects information about packages and images and |
| 2922 | sends them as events that the BitBake user interface can receive. The | 3110 | sends them as events that the BitBake user interface can receive. The |
| 2923 | class is enabled when the Toaster user interface is running. | 3111 | class 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 | ||
| 2932 | The ``toolchain-scripts`` class provides the scripts used for setting up | 3120 | The :ref:`ref-classes-toolchain-scripts` class provides the scripts used for setting up |
| 2933 | the environment for installed SDKs. | 3121 | the 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 | ||
| 2940 | The ``typecheck`` class provides support for validating the values of | 3128 | The :ref:`ref-classes-typecheck` class provides support for validating the values of |
| 2941 | variables set at the configuration level against their defined types. | 3129 | variables set at the configuration level against their defined types. |
| 2942 | The OpenEmbedded build system allows you to define the type of a | 3130 | The OpenEmbedded build system allows you to define the type of a |
| 2943 | variable using the "type" varflag. Here is an example:: | 3131 | variable 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 | ||
| 2952 | The ``uboot-config`` class provides support for U-Boot configuration for | 3140 | The :ref:`ref-classes-uboot-config` class provides support for U-Boot configuration for |
| 2953 | a machine. Specify the machine in your recipe as follows:: | 3141 | a 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:: | |||
| 2962 | See the :term:`UBOOT_CONFIG` and :term:`UBOOT_MACHINE` variables for additional | 3150 | See the :term:`UBOOT_CONFIG` and :term:`UBOOT_MACHINE` variables for additional |
| 2963 | information. | 3151 | information. |
| 2964 | 3152 | ||
| 3153 | .. _ref-classes-uboot-sign: | ||
| 3154 | |||
| 3155 | ``uboot-sign`` | ||
| 3156 | ============== | ||
| 3157 | |||
| 3158 | The :ref:`ref-classes-uboot-sign` class provides support for U-Boot verified boot. | ||
| 3159 | It is intended to be inherited from U-Boot recipes. | ||
| 3160 | |||
| 3161 | Here 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 | |||
| 3182 | See 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>`__ | ||
| 3184 | and the `signature process | ||
| 3185 | <https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/signature.txt>`__. | ||
| 3186 | |||
| 3187 | See also the description of :ref:`ref-classes-kernel-fitimage` class, which this class | ||
| 3188 | imitates. | ||
| 3189 | |||
| 2965 | .. _ref-classes-uninative: | 3190 | .. _ref-classes-uninative: |
| 2966 | 3191 | ||
| 2967 | ``uninative.bbclass`` | 3192 | ``uninative`` |
| 2968 | ===================== | 3193 | ============= |
| 2969 | 3194 | ||
| 2970 | Attempts to isolate the build system from the host distribution's C | 3195 | Attempts to isolate the build system from the host distribution's C |
| 2971 | library in order to make re-use of native shared state artifacts across | 3196 | library 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 |
| 2981 | example, see the ``meta/conf/distro/include/yocto-uninative.inc``. | 3206 | example, see the ``meta/conf/distro/include/yocto-uninative.inc``. |
| 2982 | 3207 | ||
| 2983 | The ``uninative`` class is also used unconditionally by the extensible | 3208 | The :ref:`ref-classes-uninative` class is also used unconditionally by the extensible |
| 2984 | SDK. When building the extensible SDK, ``uninative-tarball`` is built | 3209 | SDK. When building the extensible SDK, ``uninative-tarball`` is built |
| 2985 | and the resulting tarball is included within the SDK. | 3210 | and 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 | ||
| 2992 | The ``update-alternatives`` class helps the alternatives system when | 3217 | The :ref:`ref-classes-update-alternatives` class helps the alternatives system when |
| 2993 | multiple sources provide the same command. This situation occurs when | 3218 | multiple sources provide the same command. This situation occurs when |
| 2994 | several programs that have the same or similar function are installed | 3219 | several programs that have the same or similar function are installed |
| 2995 | with the same name. For example, the ``ar`` command is available from | 3220 | with the same name. For example, the ``ar`` command is available from |
| 2996 | the ``busybox``, ``binutils`` and ``elfutils`` packages. The | 3221 | the ``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 |
| 2998 | multiple packages can be installed without conflicts. The ``ar`` command | 3223 | multiple packages can be installed without conflicts. The ``ar`` command |
| 2999 | still works regardless of which packages are installed or subsequently | 3224 | still works regardless of which packages are installed or subsequently |
| 3000 | removed. The class renames the conflicting binary in each package and | 3225 | removed. 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: | |||
| 3014 | These variables list alternative commands needed by a package, provide | 3239 | These variables list alternative commands needed by a package, provide |
| 3015 | pathnames for links, default links for targets, and so forth. For | 3240 | pathnames for links, default links for targets, and so forth. For |
| 3016 | details on how to use this class, see the comments in the | 3241 | details 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>` |
| 3018 | file. | 3243 | file. |
| 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 | ||
| 3030 | The ``update-rc.d`` class uses ``update-rc.d`` to safely install an | 3255 | The :ref:`ref-classes-update-rc.d` class uses ``update-rc.d`` to safely install an |
| 3031 | initialization script on behalf of the package. The OpenEmbedded build | 3256 | initialization script on behalf of the package. The OpenEmbedded build |
| 3032 | system takes care of details such as making sure the script is stopped | 3257 | system takes care of details such as making sure the script is stopped |
| 3033 | before a package is removed and started when the package is installed. | 3258 | before 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 | ||
| 3044 | The ``useradd*`` classes support the addition of users or groups for | 3269 | The :ref:`useradd* <ref-classes-useradd>` classes support the addition of users or groups for |
| 3045 | usage by the package on the target. For example, if you have packages | 3270 | usage by the package on the target. For example, if you have packages |
| 3046 | that contain system services that should be run under their own user or | 3271 | that contain system services that should be run under their own user or |
| 3047 | group, you can use these classes to enable creation of the user or | 3272 | group, 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 | |||
| 3050 | recipe in the :term:`Source Directory` provides a simple | 3275 | recipe in the :term:`Source Directory` provides a simple |
| 3051 | example that shows how to add three users and groups to two packages. | 3276 | example that shows how to add three users and groups to two packages. |
| 3052 | 3277 | ||
| 3053 | The ``useradd_base`` class provides basic functionality for user or | 3278 | The :ref:`useradd_base <ref-classes-useradd>` class provides basic functionality for user or |
| 3054 | groups settings. | 3279 | groups settings. |
| 3055 | 3280 | ||
| 3056 | The ``useradd*`` classes support the | 3281 | The :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 | ||
| 3062 | The ``useradd-staticids`` class supports the addition of users or groups | 3287 | The :ref:`useradd-staticids <ref-classes-useradd>` class supports the addition of users or groups |
| 3063 | that have static user identification (``uid``) and group identification | 3288 | that 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`` |
| 3076 | files for the values. | 3301 | files for the values. |
| 3077 | 3302 | ||
| 3078 | To use static ``uid`` and ``gid`` values, you need to set some | 3303 | To use static ``uid`` and ``gid`` values, you need to set some variables. See |
| 3079 | variables. See the :term:`USERADDEXTENSION`, | 3304 | the :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 | 3306 | You can also see the :ref:`ref-classes-useradd` class for additional |
| 3082 | :term:`USERADD_ERROR_DYNAMIC` variables. | 3307 | information. |
| 3083 | You can also see the :ref:`useradd <ref-classes-useradd>` class for | ||
| 3084 | additional 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 | ||
| 3099 | The ``utility-tasks`` class provides support for various "utility" type | 3322 | The :ref:`ref-classes-utility-tasks` class provides support for various |
| 3100 | tasks 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 | ||
| 3104 | This class is enabled by default because it is inherited by the | 3326 | This 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 | ||
| 3112 | The ``utils`` class provides some useful Python functions that are | 3334 | The :ref:`ref-classes-utils` class provides some useful Python functions that are |
| 3113 | typically used in inline Python expressions (e.g. ``${@...}``). One | 3335 | typically used in inline Python expressions (e.g. ``${@...}``). One |
| 3114 | example use is for ``bb.utils.contains()``. | 3336 | example use is for ``bb.utils.contains()``. |
| 3115 | 3337 | ||
| 3116 | This class is enabled by default because it is inherited by the | 3338 | This 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 | ||
| 3124 | The ``vala`` class supports recipes that need to build software written | 3346 | The :ref:`ref-classes-vala` class supports recipes that need to build software written |
| 3125 | using the Vala programming language. | 3347 | using 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 | ||
| 3132 | The ``waf`` class supports recipes that need to build software that uses | 3354 | The :ref:`ref-classes-waf` class supports recipes that need to build software that uses |
| 3133 | the Waf build system. You can use the | 3355 | the 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 |
