Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2 | |
| 3 | ****************** |
| 4 | Variables Glossary |
| 5 | ****************** |
| 6 | |
| 7 | This chapter lists common variables used in the OpenEmbedded build |
| 8 | system and gives an overview of their function and contents. |
| 9 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 10 | :term:`A <ABIEXTENSION>` :term:`B` :term:`C <CACHE>` |
| 11 | :term:`D` :term:`E <EFI_PROVIDER>` :term:`F <FEATURE_PACKAGES>` |
| 12 | :term:`G <GCCPIE>` :term:`H <HOMEPAGE>` :term:`I <ICECC_DISABLED>` |
| 13 | :term:`K <KARCH>` :term:`L <LABELS>` :term:`M <MACHINE>` |
| 14 | :term:`N <NATIVELSBSTRING>` :term:`O <OBJCOPY>` :term:`P` |
| 15 | :term:`R <RANLIB>` :term:`S` :term:`T` |
| 16 | :term:`U <UBOOT_CONFIG>` :term:`V <VOLATILE_LOG_DIR>` |
| 17 | :term:`W <WARN_QA>` :term:`X <XSERVER>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 18 | |
| 19 | .. glossary:: |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 20 | :sorted: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 21 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 22 | :term:`ABIEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 23 | Extension to the Application Binary Interface (ABI) field of the GNU |
| 24 | canonical architecture name (e.g. "eabi"). |
| 25 | |
| 26 | ABI extensions are set in the machine include files. For example, the |
| 27 | ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 28 | following extension:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 29 | |
| 30 | ABIEXTENSION = "eabi" |
| 31 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 32 | :term:`ALLOW_EMPTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 33 | Specifies whether to produce an output package even if it is empty. |
| 34 | By default, BitBake does not produce empty packages. This default |
| 35 | behavior can cause issues when there is an |
| 36 | :term:`RDEPENDS` or some other hard runtime |
| 37 | requirement on the existence of the package. |
| 38 | |
| 39 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 40 | conjunction with a package name override, as in:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 41 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 42 | ALLOW_EMPTY:${PN} = "1" |
| 43 | ALLOW_EMPTY:${PN}-dev = "1" |
| 44 | ALLOW_EMPTY:${PN}-staticdev = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 45 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 46 | :term:`ALTERNATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 47 | Lists commands in a package that need an alternative binary naming |
| 48 | scheme. Sometimes the same command is provided in multiple packages. |
| 49 | When this occurs, the OpenEmbedded build system needs to use the |
| 50 | alternatives system to create a different binary naming scheme so the |
| 51 | commands can co-exist. |
| 52 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 53 | To use the variable, list out the package's commands that are also |
| 54 | provided by another package. For example, if the ``busybox`` package |
| 55 | has four such commands, you identify them as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 56 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 57 | ALTERNATIVE:busybox = "sh sed test bracket" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 58 | |
| 59 | For more information on the alternatives system, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 60 | ":ref:`ref-classes-update-alternatives`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 61 | section. |
| 62 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 63 | :term:`ALTERNATIVE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 64 | Used by the alternatives system to map duplicated commands to actual |
| 65 | locations. For example, if the ``bracket`` command provided by the |
| 66 | ``busybox`` package is duplicated through another package, you must |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 67 | use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 68 | location:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 69 | |
| 70 | ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/[" |
| 71 | |
| 72 | In this example, the binary for the ``bracket`` command (i.e. ``[``) |
| 73 | from the ``busybox`` package resides in ``/usr/bin/``. |
| 74 | |
| 75 | .. note:: |
| 76 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 77 | If :term:`ALTERNATIVE_LINK_NAME` is not defined, it defaults to ``${bindir}/name``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 78 | |
| 79 | For more information on the alternatives system, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 80 | ":ref:`ref-classes-update-alternatives`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 81 | section. |
| 82 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 83 | :term:`ALTERNATIVE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 84 | Used by the alternatives system to create default priorities for |
| 85 | duplicated commands. You can use the variable to create a single |
| 86 | default regardless of the command name or package, a default for |
| 87 | specific duplicated commands regardless of the package, or a default |
| 88 | for specific commands tied to particular packages. Here are the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 89 | available syntax forms:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 90 | |
| 91 | ALTERNATIVE_PRIORITY = "priority" |
| 92 | ALTERNATIVE_PRIORITY[name] = "priority" |
| 93 | ALTERNATIVE_PRIORITY_pkg[name] = "priority" |
| 94 | |
| 95 | For more information on the alternatives system, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 96 | ":ref:`ref-classes-update-alternatives`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 97 | section. |
| 98 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 99 | :term:`ALTERNATIVE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 100 | Used by the alternatives system to create default link locations for |
| 101 | duplicated commands. You can use the variable to create a single |
| 102 | default location for all duplicated commands regardless of the |
| 103 | command name or package, a default for specific duplicated commands |
| 104 | regardless of the package, or a default for specific commands tied to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 105 | particular packages. Here are the available syntax forms:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 106 | |
| 107 | ALTERNATIVE_TARGET = "target" |
| 108 | ALTERNATIVE_TARGET[name] = "target" |
| 109 | ALTERNATIVE_TARGET_pkg[name] = "target" |
| 110 | |
| 111 | .. note:: |
| 112 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 113 | If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 114 | from the :term:`ALTERNATIVE_LINK_NAME` variable. |
| 115 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 116 | If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the |
| 117 | same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 118 | appended to it. |
| 119 | |
| 120 | Finally, if the file referenced has not been renamed, the |
| 121 | alternatives system will rename it to avoid the need to rename |
| 122 | alternative files in the :ref:`ref-tasks-install` |
| 123 | task while retaining support for the command if necessary. |
| 124 | |
| 125 | For more information on the alternatives system, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 126 | ":ref:`ref-classes-update-alternatives`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 127 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 128 | :term:`ANY_OF_DISTRO_FEATURES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 129 | When inheriting the :ref:`ref-classes-features_check` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 130 | class, this variable identifies a list of distribution features where |
| 131 | at least one must be enabled in the current configuration in order |
| 132 | for the OpenEmbedded build system to build the recipe. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 133 | if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES` |
| 134 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 135 | the recipe will be skipped, and if the build system attempts to build |
| 136 | the recipe then an error will be triggered. |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 137 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 138 | :term:`APPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 139 | An override list of append strings for each target specified with |
| 140 | :term:`LABELS`. |
| 141 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 142 | See the :ref:`ref-classes-grub-efi` class for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 143 | information on how this variable is used. |
| 144 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 145 | :term:`AR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 146 | The minimal command and arguments used to run ``ar``. |
| 147 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 148 | :term:`ARCHIVER_MODE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 149 | When used with the :ref:`ref-classes-archiver` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 150 | determines the type of information used to create a released archive. |
| 151 | You can use this variable to create archives of patched source, |
| 152 | original source, configured source, and so forth by employing the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 153 | following variable flags (varflags):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 154 | |
| 155 | ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. |
| 156 | ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. |
| 157 | ARCHIVER_MODE[src] = "configured" # Uses configured source files. |
| 158 | ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch. |
| 159 | ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff. |
| 160 | ARCHIVER_MODE[dumpdata] = "1" # Uses environment data. |
| 161 | ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files. |
| 162 | ARCHIVER_MODE[srpm] = "1" # Uses RPM package files. |
| 163 | |
| 164 | For information on how the variable works, see the |
| 165 | ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`. |
| 166 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 167 | :term:`AS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 168 | Minimal command and arguments needed to run the assembler. |
| 169 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 170 | :term:`ASSUME_PROVIDED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 171 | Lists recipe names (:term:`PN` values) BitBake does not |
| 172 | attempt to build. Instead, BitBake assumes these recipes have already |
| 173 | been built. |
| 174 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 175 | In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 176 | tools that should not be built. An example is ``git-native``, which |
| 177 | when specified, allows for the Git binary from the host to be used |
| 178 | rather than building ``git-native``. |
| 179 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 180 | :term:`ASSUME_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 181 | Provides additional ``shlibs`` provider mapping information, which |
| 182 | adds to or overwrites the information provided automatically by the |
| 183 | system. Separate multiple entries using spaces. |
| 184 | |
| 185 | As an example, use the following form to add an ``shlib`` provider of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 186 | shlibname in packagename with the optional version:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 187 | |
| 188 | shlibname:packagename[_version] |
| 189 | |
| 190 | Here is an example that adds a shared library named ``libEGL.so.1`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 191 | as being provided by the ``libegl-implementation`` package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 192 | |
| 193 | ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" |
| 194 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 195 | :term:`AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 196 | The email address used to contact the original author or authors in |
| 197 | order to send patches and forward bugs. |
| 198 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 199 | :term:`AUTO_LIBNAME_PKGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 200 | When the :ref:`ref-classes-debian` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 201 | which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 202 | packages should be checked for libraries and renamed according to |
| 203 | Debian library package naming. |
| 204 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 205 | The default value is "${PACKAGES}", which causes the |
| 206 | :ref:`ref-classes-debian` class to act on all packages that are |
| 207 | explicitly generated by the recipe. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 209 | :term:`AUTOREV` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 210 | When :term:`SRCREV` is set to the value of this variable, it specifies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 211 | use the latest source revision in the repository. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 212 | |
| 213 | SRCREV = "${AUTOREV}" |
| 214 | |
| 215 | If you use the previous statement to retrieve the latest version of |
| 216 | software, you need to be sure :term:`PV` contains |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 217 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel |
| 218 | recipe that inherits the :ref:`ref-classes-kernel` class and you |
| 219 | use the previous statement. In this example, ``${SRCPV}`` does not |
| 220 | automatically get into :term:`PV`. Consequently, you need to change |
| 221 | :term:`PV` in your recipe so that it does contain ``${SRCPV}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 222 | |
| 223 | For more information see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 224 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 225 | section in the Yocto Project Development Tasks Manual. |
| 226 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 227 | :term:`AUTO_SYSLINUXMENU` |
| 228 | Enables creating an automatic menu for the syslinux bootloader. You |
| 229 | must set this variable in your recipe. The |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 230 | :ref:`ref-classes-syslinux` class checks this variable. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 231 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 232 | :term:`AVAILTUNES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 233 | The list of defined CPU and Application Binary Interface (ABI) |
| 234 | tunings (i.e. "tunes") available for use by the OpenEmbedded build |
| 235 | system. |
| 236 | |
| 237 | The list simply presents the tunes that are available. Not all tunes |
| 238 | may be compatible with a particular machine configuration, or with |
| 239 | each other in a |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 240 | :ref:`Multilib <dev-manual/libraries:combining multiple versions of library files into one image>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 241 | configuration. |
| 242 | |
| 243 | To add a tune to the list, be sure to append it with spaces using the |
| 244 | "+=" BitBake operator. Do not simply replace the list by using the |
| 245 | "=" operator. See the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 246 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 247 | User Manual for more information. |
| 248 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 249 | :term:`AZ_SAS` |
| 250 | Azure Storage Shared Access Signature, when using the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 251 | :ref:`Azure Storage fetcher (az://) <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 252 | This variable can be defined to be used by the fetcher to authenticate |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 253 | and gain access to non-public artifacts:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 254 | |
| 255 | AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" |
| 256 | |
| 257 | For more information see Microsoft's Azure Storage documentation at |
| 258 | https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview |
| 259 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 260 | :term:`B` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 261 | The directory within the :term:`Build Directory` in which the |
| 262 | OpenEmbedded build system places generated objects during a recipe's |
| 263 | build process. By default, this directory is the same as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 264 | :term:`S` directory, which is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 265 | |
| 266 | S = "${WORKDIR}/${BP}" |
| 267 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 268 | You can separate the (:term:`S`) directory and the directory pointed to |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 269 | by the :term:`B` variable. Most Autotools-based recipes support |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 270 | separating these directories. The build system defaults to using |
| 271 | separate directories for ``gcc`` and some kernel recipes. |
| 272 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 273 | :term:`BAD_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 274 | Lists "recommended-only" packages to not install. Recommended-only |
| 275 | packages are packages installed only through the |
| 276 | :term:`RRECOMMENDS` variable. You can prevent any |
| 277 | of these "recommended" packages from being installed by listing them |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 278 | with the :term:`BAD_RECOMMENDATIONS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 279 | |
| 280 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." |
| 281 | |
| 282 | You can set this variable globally in your ``local.conf`` file or you |
| 283 | can attach it to a specific image recipe by using the recipe name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 284 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 285 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 286 | BAD_RECOMMENDATIONS:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 287 | |
| 288 | It is important to realize that if you choose to not install packages |
| 289 | using this variable and some other packages are dependent on them |
| 290 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 291 | variable), the OpenEmbedded build system ignores your request and |
| 292 | will install the packages to avoid dependency errors. |
| 293 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 294 | This variable is supported only when using the IPK and RPM |
| 295 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 296 | |
| 297 | See the :term:`NO_RECOMMENDATIONS` and the |
| 298 | :term:`PACKAGE_EXCLUDE` variables for related |
| 299 | information. |
| 300 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 301 | :term:`BASE_LIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 302 | The library directory name for the CPU or Application Binary |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 303 | Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 304 | context. See the ":ref:`dev-manual/libraries:combining multiple versions of library files into one image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 305 | section in the Yocto Project Development Tasks Manual for information |
| 306 | on Multilib. |
| 307 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 308 | The :term:`BASE_LIB` variable is defined in the machine include files in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 309 | the :term:`Source Directory`. If Multilib is not |
| 310 | being used, the value defaults to "lib". |
| 311 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 312 | :term:`BASE_WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 313 | Points to the base of the work directory for all recipes. The default |
| 314 | value is "${TMPDIR}/work". |
| 315 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 316 | :term:`BB_ALLOWED_NETWORKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 317 | Specifies a space-delimited list of hosts that the fetcher is allowed |
| 318 | to use to obtain the required source code. Following are |
| 319 | considerations surrounding this variable: |
| 320 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 321 | - This host list is only used if :term:`BB_NO_NETWORK` is either not set |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 322 | or set to "0". |
| 323 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 324 | - There is limited support for wildcard matching against the beginning of |
| 325 | host names. For example, the following setting matches |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 326 | ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 327 | |
| 328 | BB_ALLOWED_NETWORKS = "*.gnu.org" |
| 329 | |
| 330 | .. note:: |
| 331 | |
| 332 | The use of the "``*``" character only works at the beginning of |
| 333 | a host name and it must be isolated from the remainder of the |
| 334 | host name. You cannot use the wildcard character in any other |
| 335 | location of the name or combined with the front part of the |
| 336 | name. |
| 337 | |
| 338 | For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` |
| 339 | is not. |
| 340 | |
| 341 | - Mirrors not in the host list are skipped and logged in debug. |
| 342 | |
| 343 | - Attempts to access networks not in the host list cause a failure. |
| 344 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 345 | Using :term:`BB_ALLOWED_NETWORKS` in conjunction with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 346 | :term:`PREMIRRORS` is very useful. Adding the host |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 347 | you want to use to :term:`PREMIRRORS` results in the source code being |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 348 | fetched from an allowed location and avoids raising an error when a |
| 349 | host that is not allowed is in a :term:`SRC_URI` |
| 350 | statement. This is because the fetcher does not attempt to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 351 | host listed in :term:`SRC_URI` after a successful fetch from the |
| 352 | :term:`PREMIRRORS` occurs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 353 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 354 | :term:`BB_BASEHASH_IGNORE_VARS` |
| 355 | See :term:`bitbake:BB_BASEHASH_IGNORE_VARS` in the BitBake manual. |
| 356 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 357 | :term:`BB_CACHEDIR` |
| 358 | See :term:`bitbake:BB_CACHEDIR` in the BitBake manual. |
| 359 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 360 | :term:`BB_CHECK_SSL_CERTS` |
| 361 | See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual. |
| 362 | |
| 363 | :term:`BB_CONSOLELOG` |
| 364 | See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual. |
| 365 | |
| 366 | :term:`BB_CURRENTTASK` |
| 367 | See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual. |
| 368 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 369 | :term:`BB_DANGLINGAPPENDS_WARNONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 370 | Defines how BitBake handles situations where an append file |
| 371 | (``.bbappend``) has no corresponding recipe file (``.bb``). This |
| 372 | condition often occurs when layers get out of sync (e.g. ``oe-core`` |
| 373 | bumps a recipe version and the old recipe no longer exists and the |
| 374 | other layer has not been updated to the new version of the recipe |
| 375 | yet). |
| 376 | |
| 377 | The default fatal behavior is safest because it is the sane reaction |
| 378 | given something is out of sync. It is important to realize when your |
| 379 | changes are no longer being applied. |
| 380 | |
| 381 | You can change the default behavior by setting this variable to "1", |
| 382 | "yes", or "true" in your ``local.conf`` file, which is located in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 383 | :term:`Build Directory`: Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 384 | |
| 385 | BB_DANGLINGAPPENDS_WARNONLY = "1" |
| 386 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 387 | :term:`BB_DEFAULT_TASK` |
| 388 | See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual. |
| 389 | |
| 390 | :term:`BB_DEFAULT_UMASK` |
| 391 | See :term:`bitbake:BB_DEFAULT_UMASK` in the BitBake manual. |
| 392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 393 | :term:`BB_DISKMON_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 394 | Monitors disk space and available inodes during the build and allows |
| 395 | you to control the build based on these parameters. |
| 396 | |
| 397 | Disk space monitoring is disabled by default. To enable monitoring, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 398 | add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 399 | found in the :term:`Build Directory`. Use the |
| 400 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 401 | |
| 402 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 403 | |
| 404 | BB_DISKMON_DIRS = "action,dir,threshold [...]" |
| 405 | |
| 406 | where: |
| 407 | |
| 408 | action is: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 409 | ABORT: Immediately stop the build when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 410 | a threshold is broken. |
| 411 | STOPTASKS: Stop the build after the currently |
| 412 | executing tasks have finished when |
| 413 | a threshold is broken. |
| 414 | WARN: Issue a warning but continue the |
| 415 | build when a threshold is broken. |
| 416 | Subsequent warnings are issued as |
| 417 | defined by the BB_DISKMON_WARNINTERVAL |
| 418 | variable, which must be defined in |
| 419 | the conf/local.conf file. |
| 420 | |
| 421 | dir is: |
| 422 | Any directory you choose. You can specify one or |
| 423 | more directories to monitor by separating the |
| 424 | groupings with a space. If two directories are |
| 425 | on the same device, only the first directory |
| 426 | is monitored. |
| 427 | |
| 428 | threshold is: |
| 429 | Either the minimum available disk space, |
| 430 | the minimum number of free inodes, or |
| 431 | both. You must specify at least one. To |
| 432 | omit one or the other, simply omit the value. |
| 433 | Specify the threshold using G, M, K for Gbytes, |
| 434 | Mbytes, and Kbytes, respectively. If you do |
| 435 | not specify G, M, or K, Kbytes is assumed by |
| 436 | default. Do not use GB, MB, or KB. |
| 437 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 438 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 439 | |
| 440 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
| 441 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
| 442 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" |
| 443 | |
| 444 | The first example works only if you also provide the |
| 445 | :term:`BB_DISKMON_WARNINTERVAL` |
| 446 | variable in the ``conf/local.conf``. This example causes the build |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 447 | system to immediately stop when either the disk space in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 448 | ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops |
| 449 | below 100 Kbytes. Because two directories are provided with the |
| 450 | variable, the build system also issue a warning when the disk space |
| 451 | in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number |
| 452 | of free inodes drops below 100 Kbytes. Subsequent warnings are issued |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 453 | during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 454 | variable. |
| 455 | |
| 456 | The second example stops the build after all currently executing |
| 457 | tasks complete when the minimum disk space in the ``${TMPDIR}`` |
| 458 | directory drops below 1 Gbyte. No disk monitoring occurs for the free |
| 459 | inodes in this case. |
| 460 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 461 | The final example immediately stops the build when the number of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 462 | free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No |
| 463 | disk space monitoring for the directory itself occurs in this case. |
| 464 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 465 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 466 | Defines the disk space and free inode warning intervals. To set these |
| 467 | intervals, define the variable in your ``conf/local.conf`` file in |
| 468 | the :term:`Build Directory`. |
| 469 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 470 | If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 471 | must also use the :term:`BB_DISKMON_DIRS` |
| 472 | variable and define its action as "WARN". During the build, |
| 473 | subsequent warnings are issued each time disk space or number of free |
| 474 | inodes further reduces by the respective interval. |
| 475 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 476 | If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you |
| 477 | do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 478 | monitoring interval defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 479 | |
| 480 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 481 | |
| 482 | When specifying the variable in your configuration file, use the |
| 483 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 484 | |
| 485 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 486 | |
| 487 | BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" |
| 488 | |
| 489 | where: |
| 490 | |
| 491 | disk_space_interval is: |
| 492 | An interval of memory expressed in either |
| 493 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 494 | respectively. You cannot use GB, MB, or KB. |
| 495 | |
| 496 | disk_inode_interval is: |
| 497 | An interval of free inodes expressed in either |
| 498 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 499 | respectively. You cannot use GB, MB, or KB. |
| 500 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 501 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 502 | |
| 503 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
| 504 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 505 | |
| 506 | These variables cause the |
| 507 | OpenEmbedded build system to issue subsequent warnings each time the |
| 508 | available disk space further reduces by 50 Mbytes or the number of |
| 509 | free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` |
| 510 | directory. Subsequent warnings based on the interval occur each time |
| 511 | a respective interval is reached beyond the initial warning (i.e. 1 |
| 512 | Gbytes and 100 Kbytes). |
| 513 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 514 | :term:`BB_ENV_PASSTHROUGH` |
| 515 | See :term:`bitbake:BB_ENV_PASSTHROUGH` in the BitBake manual. |
| 516 | |
| 517 | :term:`BB_ENV_PASSTHROUGH_ADDITIONS` |
| 518 | See :term:`bitbake:BB_ENV_PASSTHROUGH_ADDITIONS` in the BitBake manual. |
| 519 | |
| 520 | :term:`BB_FETCH_PREMIRRORONLY` |
| 521 | See :term:`bitbake:BB_FETCH_PREMIRRORONLY` in the BitBake manual. |
| 522 | |
| 523 | :term:`BB_FILENAME` |
| 524 | See :term:`bitbake:BB_FILENAME` in the BitBake manual. |
| 525 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 526 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 527 | Causes tarballs of the source control repositories (e.g. Git |
| 528 | repositories), including metadata, to be placed in the |
| 529 | :term:`DL_DIR` directory. |
| 530 | |
| 531 | For performance reasons, creating and placing tarballs of these |
| 532 | repositories is not the default action by the OpenEmbedded build |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 533 | system:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 534 | |
| 535 | BB_GENERATE_MIRROR_TARBALLS = "1" |
| 536 | |
| 537 | Set this variable in your |
| 538 | ``local.conf`` file in the :term:`Build Directory`. |
| 539 | |
| 540 | Once you have the tarballs containing your source files, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 541 | clean up your :term:`DL_DIR` directory by deleting any Git or other |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 542 | source control work directories. |
| 543 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 544 | :term:`BB_GENERATE_SHALLOW_TARBALLS` |
| 545 | See :term:`bitbake:BB_GENERATE_SHALLOW_TARBALLS` in the BitBake manual. |
| 546 | |
| 547 | :term:`BB_GIT_SHALLOW` |
| 548 | See :term:`bitbake:BB_GIT_SHALLOW` in the BitBake manual. |
| 549 | |
| 550 | :term:`BB_GIT_SHALLOW_DEPTH` |
| 551 | See :term:`bitbake:BB_GIT_SHALLOW_DEPTH` in the BitBake manual. |
| 552 | |
| 553 | :term:`BB_HASHCHECK_FUNCTION` |
| 554 | See :term:`bitbake:BB_HASHCHECK_FUNCTION` in the BitBake manual. |
| 555 | |
| 556 | :term:`BB_HASHCONFIG_IGNORE_VARS` |
| 557 | See :term:`bitbake:BB_HASHCONFIG_IGNORE_VARS` in the BitBake manual. |
| 558 | |
| 559 | :term:`BB_HASHSERVE` |
| 560 | See :term:`bitbake:BB_HASHSERVE` in the BitBake manual. |
| 561 | |
| 562 | :term:`BB_HASHSERVE_UPSTREAM` |
| 563 | See :term:`bitbake:BB_HASHSERVE_UPSTREAM` in the BitBake manual. |
| 564 | |
| 565 | :term:`BB_INVALIDCONF` |
| 566 | See :term:`bitbake:BB_INVALIDCONF` in the BitBake manual. |
| 567 | |
| 568 | :term:`BB_LOGCONFIG` |
| 569 | See :term:`bitbake:BB_LOGCONFIG` in the BitBake manual. |
| 570 | |
| 571 | :term:`BB_LOGFMT` |
| 572 | See :term:`bitbake:BB_LOGFMT` in the BitBake manual. |
| 573 | |
| 574 | :term:`BB_MULTI_PROVIDER_ALLOWED` |
| 575 | See :term:`bitbake:BB_MULTI_PROVIDER_ALLOWED` in the BitBake manual. |
| 576 | |
| 577 | :term:`BB_NICE_LEVEL` |
| 578 | See :term:`bitbake:BB_NICE_LEVEL` in the BitBake manual. |
| 579 | |
| 580 | :term:`BB_NO_NETWORK` |
| 581 | See :term:`bitbake:BB_NO_NETWORK` in the BitBake manual. |
| 582 | |
| 583 | :term:`BB_NUMBER_PARSE_THREADS` |
| 584 | See :term:`bitbake:BB_NUMBER_PARSE_THREADS` in the BitBake manual. |
| 585 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 586 | :term:`BB_NUMBER_THREADS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 587 | The maximum number of tasks BitBake should run in parallel at any one |
| 588 | time. The OpenEmbedded build system automatically configures this |
| 589 | variable to be equal to the number of cores on the build system. For |
| 590 | example, a system with a dual core processor that also uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 591 | hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 592 | to "4". |
| 593 | |
| 594 | For single socket systems (i.e. one CPU), you should not have to |
| 595 | override this variable to gain optimal parallelism during builds. |
| 596 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 597 | CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 598 | is not set higher than "20". |
| 599 | |
| 600 | For more information on speeding up builds, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 601 | ":ref:`dev-manual/speeding-up-build:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 602 | section in the Yocto Project Development Tasks Manual. |
| 603 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 604 | On the other hand, if your goal is to limit the amount of system |
| 605 | resources consumed by BitBake tasks, setting :term:`BB_NUMBER_THREADS` |
| 606 | to a number lower than the number of CPU threads in your machine |
| 607 | won't be sufficient. That's because each package will still be built |
| 608 | and installed through a number of parallel jobs specified by the |
| 609 | :term:`PARALLEL_MAKE` variable, which is by default the number of CPU |
| 610 | threads in your system, and is not impacted by the |
| 611 | :term:`BB_NUMBER_THREADS` value. |
| 612 | |
| 613 | So, if you set :term:`BB_NUMBER_THREADS` to "1" but don't set |
| 614 | :term:`PARALLEL_MAKE`, most of your system resources will be consumed |
| 615 | anyway. |
| 616 | |
| 617 | Therefore, if you intend to reduce the load of your build system by |
| 618 | setting :term:`BB_NUMBER_THREADS` to a relatively low value compared |
| 619 | to the number of CPU threads on your system, you should also set |
| 620 | :term:`PARALLEL_MAKE` to a similarly low value. |
| 621 | |
| 622 | An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage |
| 623 | of build system resources under control is to use the smarter |
| 624 | :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or |
| 625 | :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake |
| 626 | from starting new tasks as long as thresholds are exceeded. Anyway, |
| 627 | as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the |
| 628 | tasks already being run from using all CPU threads on the system |
| 629 | if :term:`PARALLEL_MAKE` is not set to a low value. |
| 630 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 631 | :term:`BB_ORIGENV` |
| 632 | See :term:`bitbake:BB_ORIGENV` in the BitBake manual. |
| 633 | |
| 634 | :term:`BB_PRESERVE_ENV` |
| 635 | See :term:`bitbake:BB_PRESERVE_ENV` in the BitBake manual. |
| 636 | |
| 637 | :term:`BB_PRESSURE_MAX_CPU` |
| 638 | See :term:`bitbake:BB_PRESSURE_MAX_CPU` in the BitBake manual. |
| 639 | |
| 640 | :term:`BB_PRESSURE_MAX_IO` |
| 641 | See :term:`bitbake:BB_PRESSURE_MAX_IO` in the BitBake manual. |
| 642 | |
| 643 | :term:`BB_PRESSURE_MAX_MEMORY` |
| 644 | See :term:`bitbake:BB_PRESSURE_MAX_MEMORY` in the BitBake manual. |
| 645 | |
| 646 | :term:`BB_RUNFMT` |
| 647 | See :term:`bitbake:BB_RUNFMT` in the BitBake manual. |
| 648 | |
| 649 | :term:`BB_RUNTASK` |
| 650 | See :term:`bitbake:BB_RUNTASK` in the BitBake manual. |
| 651 | |
| 652 | :term:`BB_SCHEDULER` |
| 653 | See :term:`bitbake:BB_SCHEDULER` in the BitBake manual. |
| 654 | |
| 655 | :term:`BB_SCHEDULERS` |
| 656 | See :term:`bitbake:BB_SCHEDULERS` in the BitBake manual. |
| 657 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 658 | :term:`BB_SERVER_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 659 | Specifies the time (in seconds) after which to unload the BitBake |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 660 | server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 661 | long the BitBake server stays resident between invocations. |
| 662 | |
| 663 | For example, the following statement in your ``local.conf`` file |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 664 | instructs the server to be unloaded after 20 seconds of inactivity:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 665 | |
| 666 | BB_SERVER_TIMEOUT = "20" |
| 667 | |
| 668 | If you want the server to never be unloaded, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 669 | set :term:`BB_SERVER_TIMEOUT` to "-1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 670 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 671 | :term:`BB_SETSCENE_DEPVALID` |
| 672 | See :term:`bitbake:BB_SETSCENE_DEPVALID` in the BitBake manual. |
| 673 | |
| 674 | :term:`BB_SIGNATURE_EXCLUDE_FLAGS` |
| 675 | See :term:`bitbake:BB_SIGNATURE_EXCLUDE_FLAGS` in the BitBake manual. |
| 676 | |
| 677 | :term:`BB_SIGNATURE_HANDLER` |
| 678 | See :term:`bitbake:BB_SIGNATURE_HANDLER` in the BitBake manual. |
| 679 | |
| 680 | :term:`BB_SRCREV_POLICY` |
| 681 | See :term:`bitbake:BB_SRCREV_POLICY` in the BitBake manual. |
| 682 | |
| 683 | :term:`BB_STRICT_CHECKSUM` |
| 684 | See :term:`bitbake:BB_STRICT_CHECKSUM` in the BitBake manual. |
| 685 | |
| 686 | :term:`BB_TASK_IONICE_LEVEL` |
| 687 | See :term:`bitbake:BB_TASK_IONICE_LEVEL` in the BitBake manual. |
| 688 | |
| 689 | :term:`BB_TASK_NICE_LEVEL` |
| 690 | See :term:`bitbake:BB_TASK_NICE_LEVEL` in the BitBake manual. |
| 691 | |
| 692 | :term:`BB_TASKHASH` |
| 693 | See :term:`bitbake:BB_TASKHASH` in the BitBake manual. |
| 694 | |
| 695 | :term:`BB_VERBOSE_LOGS` |
| 696 | See :term:`bitbake:BB_VERBOSE_LOGS` in the BitBake manual. |
| 697 | |
| 698 | :term:`BB_WORKERCONTEXT` |
| 699 | See :term:`bitbake:BB_WORKERCONTEXT` in the BitBake manual. |
| 700 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 701 | :term:`BBCLASSEXTEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 702 | Allows you to extend a recipe so that it builds variants of the |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 703 | software. There are common variants for recipes as "natives" like |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 704 | ``quilt-native``, which is a copy of Quilt built to run on the build |
| 705 | system; "crosses" such as ``gcc-cross``, which is a compiler built to |
| 706 | run on the build machine but produces binaries that run on the target |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 707 | :term:`MACHINE`; ":ref:`ref-classes-nativesdk`", which |
| 708 | targets the SDK machine instead of :term:`MACHINE`; and "mulitlibs" in |
| 709 | the form "``multilib:``\ multilib_name". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 710 | |
| 711 | To build a different variant of the recipe with a minimal amount of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 712 | code, it usually is as simple as adding the following to your recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 713 | |
| 714 | BBCLASSEXTEND =+ "native nativesdk" |
| 715 | BBCLASSEXTEND =+ "multilib:multilib_name" |
| 716 | |
| 717 | .. note:: |
| 718 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 719 | Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 720 | variants by rewriting variable values and applying overrides such |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 721 | as ``:class-native``. For example, to generate a native version of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 722 | a recipe, a :term:`DEPENDS` on "foo" is rewritten |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 723 | to a :term:`DEPENDS` on "foo-native". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 724 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 725 | Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 726 | Parsing once adds some limitations. For example, it is not |
| 727 | possible to include a different file depending on the variant, |
| 728 | since ``include`` statements are processed when the recipe is |
| 729 | parsed. |
| 730 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 731 | :term:`BBDEBUG` |
| 732 | See :term:`bitbake:BBDEBUG` in the BitBake manual. |
| 733 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 734 | :term:`BBFILE_COLLECTIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 735 | Lists the names of configured layers. These names are used to find |
| 736 | the other ``BBFILE_*`` variables. Typically, each layer will append |
| 737 | its name to this variable in its ``conf/layer.conf`` file. |
| 738 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 739 | :term:`BBFILE_PATTERN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 740 | Variable that expands to match files from |
| 741 | :term:`BBFILES` in a particular layer. This variable |
| 742 | is used in the ``conf/layer.conf`` file and must be suffixed with the |
| 743 | name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``). |
| 744 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 745 | :term:`BBFILE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 746 | Assigns the priority for recipe files in each layer. |
| 747 | |
| 748 | This variable is useful in situations where the same recipe appears |
| 749 | in more than one layer. Setting this variable allows you to |
| 750 | prioritize a layer against other layers that contain the same recipe |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 751 | --- effectively letting you control the precedence for the multiple |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 752 | layers. The precedence established through this variable stands |
| 753 | regardless of a recipe's version (:term:`PV` variable). For |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 754 | example, a layer that has a recipe with a higher :term:`PV` value but for |
| 755 | which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 756 | has a lower precedence. |
| 757 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 758 | A larger value for the :term:`BBFILE_PRIORITY` variable results in a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 759 | higher precedence. For example, the value 6 has a higher precedence |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 760 | than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable |
| 761 | is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 762 | for more information. The default priority, if unspecified for a |
| 763 | layer with no dependencies, is the lowest defined priority + 1 (or 1 |
| 764 | if no priorities are defined). |
| 765 | |
| 766 | .. tip:: |
| 767 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 768 | You can use the command ``bitbake-layers show-layers`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 769 | to list all configured layers along with their priorities. |
| 770 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 771 | :term:`BBFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 772 | A space-separated list of recipe files BitBake uses to build |
| 773 | software. |
| 774 | |
| 775 | When specifying recipe files, you can pattern match using Python's |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 776 | `glob <https://docs.python.org/3/library/glob.html>`__ syntax. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 777 | For details on the syntax, see the documentation by following the |
| 778 | previous link. |
| 779 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 780 | :term:`BBFILES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 781 | Activates content when identified layers are present. You identify |
| 782 | the layers by the collections that the layers define. |
| 783 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 784 | Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 785 | whose corresponding ``.bb`` file is in a layer that attempts to |
| 786 | modify other layers through ``.bbappend`` but does not want to |
| 787 | introduce a hard dependency on those other layers. |
| 788 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 789 | Use the following form for :term:`BBFILES_DYNAMIC`: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 790 | ``collection_name:filename_pattern``. |
| 791 | |
| 792 | The following example identifies two collection names and two |
| 793 | filename patterns:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 794 | |
| 795 | BBFILES_DYNAMIC += " \ |
| 796 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
| 797 | core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ |
| 798 | " |
| 799 | |
| 800 | This next example shows an error message that occurs because invalid |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 801 | entries are found, which cause parsing to fail: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 802 | |
| 803 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 804 | |
| 805 | ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: |
| 806 | /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend |
| 807 | /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend |
| 808 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 809 | :term:`BBINCLUDED` |
| 810 | See :term:`bitbake:BBINCLUDED` in the BitBake manual. |
| 811 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 812 | :term:`BBINCLUDELOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 813 | Variable that controls how BitBake displays logs on build failure. |
| 814 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 815 | :term:`BBINCLUDELOGS_LINES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 816 | If :term:`BBINCLUDELOGS` is set, specifies the |
| 817 | maximum number of lines from the task log file to print when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 818 | reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 819 | the entire log is printed. |
| 820 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 821 | :term:`BBLAYERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 822 | Lists the layers to enable during the build. This variable is defined |
| 823 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 824 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 825 | |
| 826 | BBLAYERS = " \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 827 | /home/scottrif/poky/meta \ |
| 828 | /home/scottrif/poky/meta-poky \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 829 | /home/scottrif/poky/meta-yocto-bsp \ |
| 830 | /home/scottrif/poky/meta-mykernel \ |
| 831 | " |
| 832 | |
| 833 | This example enables four layers, one of which is a custom, |
| 834 | user-defined layer named ``meta-mykernel``. |
| 835 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 836 | :term:`BBLAYERS_FETCH_DIR` |
| 837 | See :term:`bitbake:BBLAYERS_FETCH_DIR` in the BitBake manual. |
| 838 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 839 | :term:`BBMASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 840 | Prevents BitBake from processing recipes and recipe append files. |
| 841 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 842 | You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 843 | ``.bbappend`` files. BitBake ignores any recipe or recipe append |
| 844 | files that match any of the expressions. It is as if BitBake does not |
| 845 | see them at all. Consequently, matching files are not parsed or |
| 846 | otherwise used by BitBake. |
| 847 | |
| 848 | The values you provide are passed to Python's regular expression |
| 849 | compiler. Consequently, the syntax follows Python's Regular |
| 850 | Expression (re) syntax. The expressions are compared against the full |
| 851 | paths to the files. For complete syntax information, see Python's |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 852 | documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 853 | |
| 854 | The following example uses a complete regular expression to tell |
| 855 | BitBake to ignore all recipe and recipe append files in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 856 | ``meta-ti/recipes-misc/`` directory:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 857 | |
| 858 | BBMASK = "meta-ti/recipes-misc/" |
| 859 | |
| 860 | If you want to mask out multiple directories or recipes, you can |
| 861 | specify multiple regular expression fragments. This next example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 862 | masks out multiple directories and individual recipes:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 863 | |
| 864 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
| 865 | BBMASK += "/meta-oe/recipes-support/" |
| 866 | BBMASK += "/meta-foo/.*/openldap" |
| 867 | BBMASK += "opencv.*\.bbappend" |
| 868 | BBMASK += "lzma" |
| 869 | |
| 870 | .. note:: |
| 871 | |
| 872 | When specifying a directory name, use the trailing slash character |
| 873 | to ensure you match just that directory name. |
| 874 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 875 | :term:`BBMULTICONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 876 | Specifies each additional separate configuration when you are |
| 877 | building targets with multiple configurations. Use this variable in |
| 878 | your ``conf/local.conf`` configuration file. Specify a |
| 879 | multiconfigname for each configuration file you are using. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 880 | example, the following line specifies three configuration files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 881 | |
| 882 | BBMULTICONFIG = "configA configB configC" |
| 883 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 884 | Each configuration file you use must reside in a ``multiconfig`` |
| 885 | subdirectory of a configuration directory within a layer, or |
| 886 | within the :term:`Build Directory` (e.g. |
| 887 | ``build_directory/conf/multiconfig/configA.conf`` or |
| 888 | ``mylayer/conf/multiconfig/configB.conf``). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 889 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 890 | For information on how to use :term:`BBMULTICONFIG` in an environment |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 891 | that supports building targets with multiple configurations, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 892 | ":ref:`dev-manual/building:building images for multiple targets using multiple configurations`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 893 | section in the Yocto Project Development Tasks Manual. |
| 894 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 895 | :term:`BBPATH` |
| 896 | See :term:`bitbake:BBPATH` in the BitBake manual. |
| 897 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 898 | :term:`BBSERVER` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 899 | If defined in the BitBake environment, :term:`BBSERVER` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 900 | BitBake remote server. |
| 901 | |
| 902 | Use the following format to export the variable to the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 903 | environment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 904 | |
| 905 | export BBSERVER=localhost:$port |
| 906 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 907 | By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 908 | Consequently, :term:`BBSERVER` is excluded from checksum and dependency |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 909 | data. |
| 910 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 911 | :term:`BBTARGETS` |
| 912 | See :term:`bitbake:BBTARGETS` in the BitBake manual. |
| 913 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 914 | :term:`BINCONFIG` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 915 | When inheriting the :ref:`ref-classes-binconfig-disabled` class, this |
| 916 | variable specifies binary configuration scripts to disable in favor of |
| 917 | using ``pkg-config`` to query the information. The |
| 918 | :ref:`ref-classes-binconfig-disabled` class will modify the specified |
| 919 | scripts to return an error so that calls to them can be easily found |
| 920 | and replaced. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 921 | |
| 922 | To add multiple scripts, separate them by spaces. Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 923 | from the ``libpng`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 924 | |
| 925 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
| 926 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 927 | :term:`BINCONFIG_GLOB` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 928 | When inheriting the :ref:`ref-classes-binconfig` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 929 | this variable specifies a wildcard for configuration scripts that |
| 930 | need editing. The scripts are edited to correct any paths that have |
| 931 | been set up during compilation so that they are correct for use when |
| 932 | installed into the sysroot and called by the build processes of other |
| 933 | recipes. |
| 934 | |
| 935 | .. note:: |
| 936 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 937 | The :term:`BINCONFIG_GLOB` variable uses |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 938 | `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, |
| 939 | which is recognition and expansion of wildcards during pattern |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 940 | matching. Shell globbing is very similar to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 941 | `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ |
| 942 | and `glob <https://docs.python.org/3/library/glob.html>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 943 | |
| 944 | For more information on how this variable works, see |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 945 | ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 946 | You can also find general |
| 947 | information on the class in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 948 | ":ref:`ref-classes-binconfig`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 949 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 950 | :term:`BITBAKE_UI` |
| 951 | See :term:`bitbake:BITBAKE_UI` in the BitBake manual. |
| 952 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 953 | :term:`BP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 954 | The base recipe name and version but without any special recipe name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 955 | suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 956 | comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 957 | |
| 958 | ${BPN}-${PV} |
| 959 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 960 | :term:`BPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 961 | This variable is a version of the :term:`PN` variable with |
| 962 | common prefixes and suffixes removed, such as ``nativesdk-``, |
| 963 | ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. |
| 964 | The exact lists of prefixes and suffixes removed are specified by the |
| 965 | :term:`MLPREFIX` and |
| 966 | :term:`SPECIAL_PKGSUFFIX` variables, |
| 967 | respectively. |
| 968 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 969 | :term:`BUGTRACKER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 970 | Specifies a URL for an upstream bug tracking website for a recipe. |
| 971 | The OpenEmbedded build system does not use this variable. Rather, the |
| 972 | variable is a useful pointer in case a bug in the software being |
| 973 | built needs to be manually reported. |
| 974 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 975 | :term:`BUILD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 976 | Specifies the architecture of the build host (e.g. ``i686``). The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 977 | OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 978 | machine name reported by the ``uname`` command. |
| 979 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 980 | :term:`BUILD_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 981 | Specifies the architecture-specific assembler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 982 | host. By default, the value of :term:`BUILD_AS_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 983 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 984 | :term:`BUILD_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 985 | Specifies the architecture-specific C compiler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 986 | host. By default, the value of :term:`BUILD_CC_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 987 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 988 | :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 989 | Specifies the linker command to be used for the build host when the C |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 990 | compiler is being used as the linker. By default, :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 991 | points to GCC and passes as arguments the value of |
| 992 | :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 993 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 994 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 995 | :term:`BUILD_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 996 | Specifies the flags to pass to the C compiler when building for the |
| 997 | build host. When building in the ``-native`` context, |
| 998 | :term:`CFLAGS` is set to the value of this variable by |
| 999 | default. |
| 1000 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1001 | :term:`BUILD_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1002 | Specifies the flags to pass to the C preprocessor (i.e. to both the C |
| 1003 | and the C++ compilers) when building for the build host. When |
| 1004 | building in the ``-native`` context, :term:`CPPFLAGS` |
| 1005 | is set to the value of this variable by default. |
| 1006 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1007 | :term:`BUILD_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1008 | Specifies the flags to pass to the C++ compiler when building for the |
| 1009 | build host. When building in the ``-native`` context, |
| 1010 | :term:`CXXFLAGS` is set to the value of this variable |
| 1011 | by default. |
| 1012 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1013 | :term:`BUILD_FC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1014 | Specifies the Fortran compiler command for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1015 | default, :term:`BUILD_FC` points to Gfortran and passes as arguments the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1016 | value of :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1017 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1018 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1019 | :term:`BUILD_LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1020 | Specifies the linker command for the build host. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1021 | :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1022 | the value of :term:`BUILD_LD_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1023 | :term:`BUILD_LD_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1024 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1025 | :term:`BUILD_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1026 | Specifies architecture-specific linker flags for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1027 | default, the value of :term:`BUILD_LD_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1028 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1029 | :term:`BUILD_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1030 | Specifies the flags to pass to the linker when building for the build |
| 1031 | host. When building in the ``-native`` context, |
| 1032 | :term:`LDFLAGS` is set to the value of this variable |
| 1033 | by default. |
| 1034 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1035 | :term:`BUILD_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1036 | Specifies the optimization flags passed to the C compiler when |
| 1037 | building for the build host or the SDK. The flags are passed through |
| 1038 | the :term:`BUILD_CFLAGS` and |
| 1039 | :term:`BUILDSDK_CFLAGS` default values. |
| 1040 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1041 | The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1042 | -pipe". |
| 1043 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1044 | :term:`BUILD_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1045 | Specifies the operating system in use on the build host (e.g. |
| 1046 | "linux"). The OpenEmbedded build system sets the value of |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1047 | :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1048 | first word, converted to lower-case characters. |
| 1049 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1050 | :term:`BUILD_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1051 | The toolchain binary prefix used for native recipes. The OpenEmbedded |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1052 | build system uses the :term:`BUILD_PREFIX` value to set the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1053 | :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1054 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1055 | :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1056 | Specifies the command to be used to strip debugging symbols from |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1057 | binaries produced for the build host. By default, :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1058 | points to |
| 1059 | ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. |
| 1060 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1061 | :term:`BUILD_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1062 | Specifies the system, including the architecture and the operating |
| 1063 | system, to use when building for the build host (i.e. when building |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1064 | :ref:`ref-classes-native` recipes). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1065 | |
| 1066 | The OpenEmbedded build system automatically sets this variable based |
| 1067 | on :term:`BUILD_ARCH`, |
| 1068 | :term:`BUILD_VENDOR`, and |
| 1069 | :term:`BUILD_OS`. You do not need to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1070 | :term:`BUILD_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1071 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1072 | :term:`BUILD_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1073 | Specifies the vendor name to use when building for the build host. |
| 1074 | The default value is an empty string (""). |
| 1075 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1076 | :term:`BUILDDIR` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1077 | Points to the location of the :term:`Build Directory`. You can define |
| 1078 | this directory indirectly through the :ref:`structure-core-script` script |
| 1079 | by passing in a :term:`Build Directory` path when you run the script. If |
| 1080 | you run the script and do not provide a :term:`Build Directory` path, the |
| 1081 | :term:`BUILDDIR` defaults to ``build`` in the current directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1082 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1083 | :term:`BUILDHISTORY_COMMIT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1084 | When inheriting the :ref:`ref-classes-buildhistory` class, this variable |
| 1085 | specifies whether or not to commit the build history output in a local |
| 1086 | Git repository. If set to "1", this local repository will be maintained |
| 1087 | automatically by the :ref:`ref-classes-buildhistory` class and a commit |
| 1088 | will be created on every build for changes to each top-level subdirectory |
| 1089 | of the build history output (images, packages, and sdk). If you want to |
| 1090 | track changes to build history over time, you should set this value to |
| 1091 | "1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1092 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1093 | By default, the :ref:`ref-classes-buildhistory` class |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1094 | enables committing the buildhistory output in a local Git repository:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1095 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1096 | BUILDHISTORY_COMMIT ?= "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1097 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1098 | :term:`BUILDHISTORY_COMMIT_AUTHOR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1099 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1100 | class, this variable specifies the author to use for each Git commit. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1101 | In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1102 | :term:`BUILDHISTORY_COMMIT` variable must |
| 1103 | be set to "1". |
| 1104 | |
| 1105 | Git requires that the value you provide for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1106 | :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1107 | email@host". Providing an email address or host that is not valid |
| 1108 | does not produce an error. |
| 1109 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1110 | By default, the :ref:`ref-classes-buildhistory` class sets the variable |
| 1111 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1112 | |
| 1113 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
| 1114 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1115 | :term:`BUILDHISTORY_DIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1116 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1117 | class, this variable specifies the directory in which build history |
| 1118 | information is kept. For more information on how the variable works, |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 1119 | see the :ref:`ref-classes-buildhistory` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1120 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1121 | By default, the :ref:`ref-classes-buildhistory` class sets the directory |
| 1122 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1123 | |
| 1124 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" |
| 1125 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1126 | :term:`BUILDHISTORY_FEATURES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1127 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1128 | class, this variable specifies the build history features to be |
| 1129 | enabled. For more information on how build history works, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1130 | ":ref:`dev-manual/build-quality:maintaining build output quality`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1131 | section in the Yocto Project Development Tasks Manual. |
| 1132 | |
| 1133 | You can specify these features in the form of a space-separated list: |
| 1134 | |
| 1135 | - *image:* Analysis of the contents of images, which includes the |
| 1136 | list of installed packages among other things. |
| 1137 | |
| 1138 | - *package:* Analysis of the contents of individual packages. |
| 1139 | |
| 1140 | - *sdk:* Analysis of the contents of the software development kit |
| 1141 | (SDK). |
| 1142 | |
| 1143 | - *task:* Save output file signatures for |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1144 | :ref:`shared state <overview-manual/concepts:shared state cache>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1145 | (sstate) tasks. |
| 1146 | This saves one file per task and lists the SHA-256 checksums for |
| 1147 | each file staged (i.e. the output of the task). |
| 1148 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1149 | By default, the :ref:`ref-classes-buildhistory` class enables the |
| 1150 | following features:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1151 | |
| 1152 | BUILDHISTORY_FEATURES ?= "image package sdk" |
| 1153 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1154 | :term:`BUILDHISTORY_IMAGE_FILES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1155 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1156 | class, this variable specifies a list of paths to files copied from |
| 1157 | the image contents into the build history directory under an |
| 1158 | "image-files" directory in the directory for the image, so that you |
| 1159 | can track the contents of each file. The default is to copy |
| 1160 | ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for |
| 1161 | changes in user and group entries. You can modify the list to include |
| 1162 | any file. Specifying an invalid path does not produce an error. |
| 1163 | Consequently, you can include files that might not always be present. |
| 1164 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1165 | By default, the :ref:`ref-classes-buildhistory` class provides paths to |
| 1166 | the following files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1167 | |
| 1168 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" |
| 1169 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1170 | :term:`BUILDHISTORY_PATH_PREFIX_STRIP` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1171 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1172 | class, this variable specifies a common path prefix that should be |
| 1173 | stripped off the beginning of paths in the task signature list when the |
| 1174 | ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be |
| 1175 | useful when build history is populated from multiple sources that may not |
| 1176 | all use the same top level directory. |
| 1177 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1178 | By default, the :ref:`ref-classes-buildhistory` class sets the variable |
| 1179 | as follows:: |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1180 | |
| 1181 | BUILDHISTORY_PATH_PREFIX_STRIP ?= "" |
| 1182 | |
| 1183 | In this case, no prefixes will be stripped. |
| 1184 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1185 | :term:`BUILDHISTORY_PUSH_REPO` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1186 | When inheriting the :ref:`ref-classes-buildhistory` class, this variable |
| 1187 | optionally specifies a remote repository to which build history pushes |
| 1188 | Git changes. In order for :term:`BUILDHISTORY_PUSH_REPO` to work, |
| 1189 | :term:`BUILDHISTORY_COMMIT` must be set to "1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1190 | |
| 1191 | The repository should correspond to a remote address that specifies a |
| 1192 | repository as understood by Git, or alternatively to a remote name |
| 1193 | that you have set up manually using ``git remote`` within the local |
| 1194 | repository. |
| 1195 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1196 | By default, the :ref:`ref-classes-buildhistory` class sets the variable |
| 1197 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1198 | |
| 1199 | BUILDHISTORY_PUSH_REPO ?= "" |
| 1200 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1201 | :term:`BUILDNAME` |
| 1202 | See :term:`bitbake:BUILDNAME` in the BitBake manual. |
| 1203 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1204 | :term:`BUILDSDK_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1205 | Specifies the flags to pass to the C compiler when building for the |
| 1206 | SDK. When building in the ``nativesdk-`` context, |
| 1207 | :term:`CFLAGS` is set to the value of this variable by |
| 1208 | default. |
| 1209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1210 | :term:`BUILDSDK_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1211 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1212 | C and the C++ compilers) when building for the SDK. When building in |
| 1213 | the ``nativesdk-`` context, :term:`CPPFLAGS` is set |
| 1214 | to the value of this variable by default. |
| 1215 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1216 | :term:`BUILDSDK_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1217 | Specifies the flags to pass to the C++ compiler when building for the |
| 1218 | SDK. When building in the ``nativesdk-`` context, |
| 1219 | :term:`CXXFLAGS` is set to the value of this variable |
| 1220 | by default. |
| 1221 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1222 | :term:`BUILDSDK_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1223 | Specifies the flags to pass to the linker when building for the SDK. |
| 1224 | When building in the ``nativesdk-`` context, |
| 1225 | :term:`LDFLAGS` is set to the value of this variable |
| 1226 | by default. |
| 1227 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1228 | :term:`BUILDSTATS_BASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1229 | Points to the location of the directory that holds build statistics |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1230 | when you use and enable the :ref:`ref-classes-buildstats` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1231 | :term:`BUILDSTATS_BASE` directory defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1232 | ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. |
| 1233 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1234 | :term:`BUSYBOX_SPLIT_SUID` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1235 | For the BusyBox recipe, specifies whether to split the output |
| 1236 | executable file into two parts: one for features that require |
| 1237 | ``setuid root``, and one for the remaining features (i.e. those that |
| 1238 | do not require ``setuid root``). |
| 1239 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1240 | The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1241 | splitting the output executable file. Set the variable to "0" to get |
| 1242 | a single output executable file. |
| 1243 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1244 | :term:`BZRDIR` |
| 1245 | See :term:`bitbake:BZRDIR` in the BitBake manual. |
| 1246 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1247 | :term:`CACHE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1248 | Specifies the directory BitBake uses to store a cache of the |
| 1249 | :term:`Metadata` so it does not need to be parsed every time |
| 1250 | BitBake is started. |
| 1251 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1252 | :term:`CC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1253 | The minimal command and arguments used to run the C compiler. |
| 1254 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1255 | :term:`CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1256 | Specifies the flags to pass to the C compiler. This variable is |
| 1257 | exported to an environment variable and thus made visible to the |
| 1258 | software being built during the compilation step. |
| 1259 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1260 | Default initialization for :term:`CFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1261 | being built: |
| 1262 | |
| 1263 | - :term:`TARGET_CFLAGS` when building for the |
| 1264 | target |
| 1265 | |
| 1266 | - :term:`BUILD_CFLAGS` when building for the |
| 1267 | build host (i.e. ``-native``) |
| 1268 | |
| 1269 | - :term:`BUILDSDK_CFLAGS` when building for |
| 1270 | an SDK (i.e. ``nativesdk-``) |
| 1271 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1272 | :term:`CLASSOVERRIDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1273 | An internal variable specifying the special class override that |
| 1274 | should currently apply (e.g. "class-target", "class-native", and so |
| 1275 | forth). The classes that use this variable (e.g. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1276 | :ref:`ref-classes-native`, :ref:`ref-classes-nativesdk`, and so forth) |
| 1277 | set the variable to appropriate values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1278 | |
| 1279 | .. note:: |
| 1280 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1281 | :term:`CLASSOVERRIDE` gets its default "class-target" value from the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1282 | ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1283 | |
| 1284 | As an example, the following override allows you to install extra |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1285 | files, but only when building for the target:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1286 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1287 | do_install:append:class-target() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1288 | install my-extra-file ${D}${sysconfdir} |
| 1289 | } |
| 1290 | |
| 1291 | Here is an example where ``FOO`` is set to |
| 1292 | "native" when building for the build host, and to "other" when not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1293 | building for the build host:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1294 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1295 | FOO:class-native = "native" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1296 | FOO = "other" |
| 1297 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1298 | The underlying mechanism behind :term:`CLASSOVERRIDE` is simply |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1299 | that it is included in the default value of |
| 1300 | :term:`OVERRIDES`. |
| 1301 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1302 | :term:`CLEANBROKEN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1303 | If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1304 | ``make clean`` command does not work for the software being built. |
| 1305 | Consequently, the OpenEmbedded build system will not try to run |
| 1306 | ``make clean`` during the :ref:`ref-tasks-configure` |
| 1307 | task, which is the default behavior. |
| 1308 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1309 | :term:`COMBINED_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1310 | Provides a list of hardware features that are enabled in both |
| 1311 | :term:`MACHINE_FEATURES` and |
| 1312 | :term:`DISTRO_FEATURES`. This select list of |
| 1313 | features contains features that make sense to be controlled both at |
| 1314 | the machine and distribution configuration level. For example, the |
| 1315 | "bluetooth" feature requires hardware support but should also be |
| 1316 | optional at the distribution level, in case the hardware supports |
| 1317 | Bluetooth but you do not ever intend to use it. |
| 1318 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 1319 | :term:`COMMERCIAL_AUDIO_PLUGINS` |
| 1320 | This variable is specific to the :yocto_git:`GStreamer recipes |
| 1321 | </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`. |
| 1322 | It allows to build the GStreamer `"ugly" |
| 1323 | <https://github.com/GStreamer/gst-plugins-ugly>`__ and |
| 1324 | `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ audio plugins. |
| 1325 | |
| 1326 | See the :ref:`dev-manual/licenses:other variables related to commercial licenses` |
| 1327 | section for usage details. |
| 1328 | |
| 1329 | :term:`COMMERCIAL_VIDEO_PLUGINS` |
| 1330 | This variable is specific to the :yocto_git:`GStreamer recipes |
| 1331 | </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`. |
| 1332 | It allows to build the GStreamer `"ugly" |
| 1333 | <https://github.com/GStreamer/gst-plugins-ugly>`__ and |
| 1334 | `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ video plugins. |
| 1335 | |
| 1336 | See the :ref:`dev-manual/licenses:other variables related to commercial licenses` |
| 1337 | section for usage details. |
| 1338 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1339 | :term:`COMMON_LICENSE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1340 | Points to ``meta/files/common-licenses`` in the |
| 1341 | :term:`Source Directory`, which is where generic license |
| 1342 | files reside. |
| 1343 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1344 | :term:`COMPATIBLE_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1345 | A regular expression that resolves to one or more hosts (when the |
| 1346 | recipe is native) or one or more targets (when the recipe is |
| 1347 | non-native) with which a recipe is compatible. The regular expression |
| 1348 | is matched against :term:`HOST_SYS`. You can use the |
| 1349 | variable to stop recipes from being built for classes of systems with |
| 1350 | which the recipes are not compatible. Stopping these builds is |
| 1351 | particularly useful with kernels. The variable also helps to increase |
| 1352 | parsing speed since the build system skips parsing recipes not |
| 1353 | compatible with the current system. |
| 1354 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1355 | :term:`COMPATIBLE_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1356 | A regular expression that resolves to one or more target machines |
| 1357 | with which a recipe is compatible. The regular expression is matched |
| 1358 | against :term:`MACHINEOVERRIDES`. You can use |
| 1359 | the variable to stop recipes from being built for machines with which |
| 1360 | the recipes are not compatible. Stopping these builds is particularly |
| 1361 | useful with kernels. The variable also helps to increase parsing |
| 1362 | speed since the build system skips parsing recipes not compatible |
| 1363 | with the current machine. |
| 1364 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1365 | :term:`COMPLEMENTARY_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1366 | Defines wildcards to match when installing a list of complementary |
| 1367 | packages for all the packages explicitly (or implicitly) installed in |
| 1368 | an image. |
| 1369 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1370 | The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching |
| 1371 | (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), |
| 1372 | which is similar to the Unix style pathname pattern expansion |
| 1373 | (`glob <https://docs.python.org/3/library/glob.html>`__). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1374 | |
| 1375 | The resulting list of complementary packages is associated with an |
| 1376 | item that can be added to |
| 1377 | :term:`IMAGE_FEATURES`. An example usage of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1378 | this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1379 | will install -dev packages (containing headers and other development |
| 1380 | files) for every package in the image. |
| 1381 | |
| 1382 | To add a new feature item pointing to a wildcard, use a variable flag |
| 1383 | to specify the feature item name and use the value to specify the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1384 | wildcard. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1385 | |
| 1386 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' |
| 1387 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1388 | .. note:: |
| 1389 | |
| 1390 | When installing complementary packages, recommends relationships |
| 1391 | (set via :term:`RRECOMMENDS`) are always ignored. |
| 1392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1393 | :term:`COMPONENTS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1394 | Stores sysroot components for each recipe. The OpenEmbedded build |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1395 | system uses :term:`COMPONENTS_DIR` when constructing recipe-specific |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1396 | sysroots for other recipes. |
| 1397 | |
| 1398 | The default is |
| 1399 | "``${``\ :term:`STAGING_DIR`\ ``}-components``." |
| 1400 | (i.e. |
| 1401 | "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). |
| 1402 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1403 | :term:`CONF_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1404 | Tracks the version of the local configuration file (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1405 | ``local.conf``). The value for :term:`CONF_VERSION` increments each time |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1406 | ``build/conf/`` compatibility changes. |
| 1407 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1408 | :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1409 | Identifies editable or configurable files that are part of a package. |
| 1410 | If the Package Management System (PMS) is being used to update |
| 1411 | packages on the target system, it is possible that configuration |
| 1412 | files you have changed after the original installation and that you |
| 1413 | now want to remain unchanged are overwritten. In other words, |
| 1414 | editable files might exist in the package that you do not want reset |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1415 | as part of the package update process. You can use the :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1416 | variable to list the files in the package that you wish to prevent |
| 1417 | the PMS from overwriting during this update process. |
| 1418 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1419 | To use the :term:`CONFFILES` variable, provide a package name override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1420 | that identifies the resulting package. Then, provide a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1421 | space-separated list of files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1422 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1423 | CONFFILES:${PN} += "${sysconfdir}/file1 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1424 | ${sysconfdir}/file2 ${sysconfdir}/file3" |
| 1425 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1426 | There is a relationship between the :term:`CONFFILES` and :term:`FILES` |
| 1427 | variables. The files listed within :term:`CONFFILES` must be a subset of |
| 1428 | the files listed within :term:`FILES`. Because the configuration files |
| 1429 | you provide with :term:`CONFFILES` are simply being identified so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1430 | the PMS will not overwrite them, it makes sense that the files must |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1431 | already be included as part of the package through the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1432 | variable. |
| 1433 | |
| 1434 | .. note:: |
| 1435 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1436 | When specifying paths as part of the :term:`CONFFILES` variable, it is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1437 | good practice to use appropriate path variables. |
| 1438 | For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` |
| 1439 | rather than ``/usr/bin``. You can find a list of these variables at |
| 1440 | the top of the ``meta/conf/bitbake.conf`` file in the |
| 1441 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1442 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1443 | :term:`CONFIG_INITRAMFS_SOURCE` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1444 | Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1445 | OpenEmbedded build system receives and uses this kernel Kconfig |
| 1446 | variable as an environment variable. By default, the variable is set |
| 1447 | to null (""). |
| 1448 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1449 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1450 | with a ``.cpio`` suffix or a space-separated list of directories and |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1451 | files for building the :term:`Initramfs` image. A cpio archive should contain |
| 1452 | a filesystem archive to be used as an :term:`Initramfs` image. Directories |
| 1453 | should contain a filesystem layout to be included in the :term:`Initramfs` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1454 | image. Files should contain entries according to the format described |
| 1455 | by the ``usr/gen_init_cpio`` program in the kernel tree. |
| 1456 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1457 | If you specify multiple directories and files, the :term:`Initramfs` image |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1458 | will be the aggregate of all of them. |
| 1459 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1460 | For information on creating an :term:`Initramfs`, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1461 | ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1462 | in the Yocto Project Development Tasks Manual. |
| 1463 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1464 | :term:`CONFIG_SITE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1465 | A list of files that contains ``autoconf`` test results relevant to |
| 1466 | the current build. This variable is used by the Autotools utilities |
| 1467 | when running ``configure``. |
| 1468 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1469 | :term:`CONFIGURE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1470 | The minimal arguments for GNU configure. |
| 1471 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1472 | :term:`CONFLICT_DISTRO_FEATURES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1473 | When inheriting the :ref:`ref-classes-features_check` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1474 | class, this variable identifies distribution features that would be |
| 1475 | in conflict should the recipe be built. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1476 | :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also |
| 1477 | appears in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1478 | the recipe will be skipped, and if the build system attempts to build |
| 1479 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1480 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1481 | :term:`CONVERSION_CMD` |
| 1482 | This variable is used for storing image conversion commands. |
| 1483 | Image conversion can convert an image into different objects like: |
| 1484 | |
| 1485 | - Compressed version of the image |
| 1486 | |
| 1487 | - Checksums for the image |
| 1488 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1489 | An example of :term:`CONVERSION_CMD` from :ref:`ref-classes-image_types` |
| 1490 | class is:: |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1491 | |
| 1492 | CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
| 1493 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1494 | :term:`COPY_LIC_DIRS` |
| 1495 | If set to "1" along with the |
| 1496 | :term:`COPY_LIC_MANIFEST` variable, the |
| 1497 | OpenEmbedded build system copies into the image the license files, |
| 1498 | which are located in ``/usr/share/common-licenses``, for each |
| 1499 | package. The license files are placed in directories within the image |
| 1500 | itself during build time. |
| 1501 | |
| 1502 | .. note:: |
| 1503 | |
| 1504 | The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for |
| 1505 | newly installed packages to an image, which might be most suitable for |
| 1506 | read-only filesystems that cannot be upgraded. See the |
| 1507 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1508 | You can also reference the ":ref:`dev-manual/licenses:providing license text`" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1509 | section in the Yocto Project Development Tasks Manual for |
| 1510 | information on providing license text. |
| 1511 | |
| 1512 | :term:`COPY_LIC_MANIFEST` |
| 1513 | If set to "1", the OpenEmbedded build system copies the license |
| 1514 | manifest for the image to |
| 1515 | ``/usr/share/common-licenses/license.manifest`` within the image |
| 1516 | itself during build time. |
| 1517 | |
| 1518 | .. note:: |
| 1519 | |
| 1520 | The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for |
| 1521 | newly installed packages to an image, which might be most suitable for |
| 1522 | read-only filesystems that cannot be upgraded. See the |
| 1523 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1524 | You can also reference the ":ref:`dev-manual/licenses:providing license text`" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1525 | section in the Yocto Project Development Tasks Manual for |
| 1526 | information on providing license text. |
| 1527 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1528 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1529 | A space-separated list of licenses to exclude from the source archived by |
| 1530 | the :ref:`ref-classes-archiver` class. In other words, if a license in a |
| 1531 | recipe's :term:`LICENSE` value is in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1532 | :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1533 | class. |
| 1534 | |
| 1535 | .. note:: |
| 1536 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1537 | The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1538 | :term:`COPYLEFT_LICENSE_INCLUDE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1539 | |
| 1540 | The default value, which is "CLOSED Proprietary", for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1541 | :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1542 | :ref:`ref-classes-copyleft_filter` class, which |
| 1543 | is inherited by the :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1544 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1545 | :term:`COPYLEFT_LICENSE_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1546 | A space-separated list of licenses to include in the source archived |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1547 | by the :ref:`ref-classes-archiver` class. In other |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1548 | words, if a license in a recipe's :term:`LICENSE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1549 | value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1550 | source is archived by the class. |
| 1551 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1552 | The default value is set by the :ref:`ref-classes-copyleft_filter` class, |
| 1553 | which is inherited by the :ref:`ref-classes-archiver` class. The default |
| 1554 | value includes "GPL*", "LGPL*", and "AGPL*". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1555 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1556 | :term:`COPYLEFT_PN_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1557 | A list of recipes to exclude in the source archived by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1558 | :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_EXCLUDE` |
| 1559 | variable overrides the license inclusion and exclusion caused through the |
| 1560 | :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1561 | variables, respectively. |
| 1562 | |
| 1563 | The default value, which is "" indicating to not explicitly exclude |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1564 | any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1565 | :ref:`ref-classes-copyleft_filter` class, which is inherited by the |
| 1566 | :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1567 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1568 | :term:`COPYLEFT_PN_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1569 | A list of recipes to include in the source archived by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1570 | :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_INCLUDE` |
| 1571 | variable overrides the license inclusion and exclusion caused through the |
| 1572 | :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1573 | variables, respectively. |
| 1574 | |
| 1575 | The default value, which is "" indicating to not explicitly include |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1576 | any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1577 | :ref:`ref-classes-copyleft_filter` class, which is inherited by the |
| 1578 | :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1579 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1580 | :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1581 | A space-separated list of recipe types to include in the source |
| 1582 | archived by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1583 | Recipe types are ``target``, :ref:`ref-classes-native`, |
| 1584 | :ref:`ref-classes-nativesdk`, :ref:`ref-classes-cross`, |
| 1585 | :ref:`ref-classes-crosssdk`, and :ref:`ref-classes-cross-canadian`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1586 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1587 | The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1588 | is set by the :ref:`ref-classes-copyleft_filter` class, which is |
| 1589 | inherited by the :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1590 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1591 | :term:`CORE_IMAGE_EXTRA_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1592 | Specifies the list of packages to be added to the image. You should |
| 1593 | only set this variable in the ``local.conf`` configuration file found |
| 1594 | in the :term:`Build Directory`. |
| 1595 | |
| 1596 | This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer |
| 1597 | supported. |
| 1598 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1599 | :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1600 | Specifies the parent directory of the OpenEmbedded-Core Metadata |
| 1601 | layer (i.e. ``meta``). |
| 1602 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1603 | It is an important distinction that :term:`COREBASE` points to the parent |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1604 | of this layer and not the layer itself. Consider an example where you |
| 1605 | have cloned the Poky Git repository and retained the ``poky`` name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1606 | for your local copy of the repository. In this case, :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1607 | points to the ``poky`` folder because it is the parent directory of |
| 1608 | the ``poky/meta`` layer. |
| 1609 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1610 | :term:`COREBASE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1611 | Lists files from the :term:`COREBASE` directory that |
| 1612 | should be copied other than the layers listed in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1613 | ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1614 | to copy metadata from the OpenEmbedded build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1615 | into the extensible SDK. |
| 1616 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1617 | Explicitly listing files in :term:`COREBASE` is needed because it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1618 | typically contains build directories and other files that should not |
| 1619 | normally be copied into the extensible SDK. Consequently, the value |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1620 | of :term:`COREBASE_FILES` is used in order to only copy the files that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1621 | are actually needed. |
| 1622 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1623 | :term:`CPP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1624 | The minimal command and arguments used to run the C preprocessor. |
| 1625 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1626 | :term:`CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1627 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1628 | C and the C++ compilers). This variable is exported to an environment |
| 1629 | variable and thus made visible to the software being built during the |
| 1630 | compilation step. |
| 1631 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1632 | Default initialization for :term:`CPPFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1633 | being built: |
| 1634 | |
| 1635 | - :term:`TARGET_CPPFLAGS` when building for |
| 1636 | the target |
| 1637 | |
| 1638 | - :term:`BUILD_CPPFLAGS` when building for the |
| 1639 | build host (i.e. ``-native``) |
| 1640 | |
| 1641 | - :term:`BUILDSDK_CPPFLAGS` when building |
| 1642 | for an SDK (i.e. ``nativesdk-``) |
| 1643 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1644 | :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1645 | The toolchain binary prefix for the target tools. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1646 | :term:`CROSS_COMPILE` variable is the same as the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1647 | :term:`TARGET_PREFIX` variable. |
| 1648 | |
| 1649 | .. note:: |
| 1650 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1651 | The OpenEmbedded build system sets the :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1652 | variable only in certain contexts (e.g. when building for kernel |
| 1653 | and kernel module recipes). |
| 1654 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1655 | :term:`CVE_CHECK_IGNORE` |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1656 | The list of CVE IDs which are ignored. Here is |
| 1657 | an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`:: |
| 1658 | |
| 1659 | # This is windows only issue. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1660 | CVE_CHECK_IGNORE += "CVE-2020-15523" |
| 1661 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1662 | :term:`CVE_CHECK_SHOW_WARNINGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1663 | Specifies whether or not the :ref:`ref-classes-cve-check` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1664 | class should generate warning messages on the console when unpatched |
| 1665 | CVEs are found. The default is "1", but you may wish to set it to "0" if |
| 1666 | you are already examining/processing the logs after the build has |
| 1667 | completed and thus do not need the warning messages. |
| 1668 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1669 | :term:`CVE_CHECK_SKIP_RECIPE` |
| 1670 | The list of package names (:term:`PN`) for which |
| 1671 | CVEs (Common Vulnerabilities and Exposures) are ignored. |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1672 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1673 | :term:`CVE_DB_UPDATE_INTERVAL` |
| 1674 | Specifies the CVE database update interval in seconds, as used by |
| 1675 | ``cve-update-db-native``. The default value is "86400" i.e. once a day |
| 1676 | (24*60*60). If the value is set to "0" then the update will be forced |
| 1677 | every time. Alternatively, a negative value e.g. "-1" will disable |
| 1678 | updates entirely. |
| 1679 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1680 | :term:`CVE_PRODUCT` |
| 1681 | In a recipe, defines the name used to match the recipe name |
| 1682 | against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__. |
| 1683 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1684 | The default is ${:term:`BPN`} (except for recipes that inherit the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1685 | :ref:`ref-classes-pypi` class where it is set based upon |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1686 | :term:`PYPI_PACKAGE`). If it does not match the name in the NIST CVE |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1687 | database or matches with multiple entries in the database, the default |
| 1688 | value needs to be changed. |
| 1689 | |
| 1690 | Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`:: |
| 1691 | |
| 1692 | CVE_PRODUCT = "oracle_berkeley_db berkeley_db" |
| 1693 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 1694 | Sometimes the product name is not specific enough, for example |
| 1695 | "tar" has been matching CVEs for the GNU ``tar`` package and also |
| 1696 | the ``node-tar`` node.js extension. To avoid this problem, use the |
| 1697 | vendor name as a prefix. The syntax for this is:: |
| 1698 | |
| 1699 | CVE_PRODUCT = "vendor:package" |
| 1700 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1701 | :term:`CVE_VERSION` |
| 1702 | In a recipe, defines the version used to match the recipe version |
| 1703 | against the version in the `NIST CVE database <https://nvd.nist.gov/>`__ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1704 | when usign :ref:`ref-classes-cve-check`. |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1705 | |
| 1706 | The default is ${:term:`PV`} but if recipes use custom version numbers |
| 1707 | which do not map to upstream software component release versions and the versions |
| 1708 | used in the CVE database, then this variable can be used to set the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1709 | version number for :ref:`ref-classes-cve-check`. Example:: |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1710 | |
| 1711 | CVE_VERSION = "2.39" |
| 1712 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1713 | :term:`CVSDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1714 | The directory in which files checked out under the CVS system are |
| 1715 | stored. |
| 1716 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1717 | :term:`CXX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1718 | The minimal command and arguments used to run the C++ compiler. |
| 1719 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1720 | :term:`CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1721 | Specifies the flags to pass to the C++ compiler. This variable is |
| 1722 | exported to an environment variable and thus made visible to the |
| 1723 | software being built during the compilation step. |
| 1724 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1725 | Default initialization for :term:`CXXFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1726 | being built: |
| 1727 | |
| 1728 | - :term:`TARGET_CXXFLAGS` when building for |
| 1729 | the target |
| 1730 | |
| 1731 | - :term:`BUILD_CXXFLAGS` when building for the |
| 1732 | build host (i.e. ``-native``) |
| 1733 | |
| 1734 | - :term:`BUILDSDK_CXXFLAGS` when building |
| 1735 | for an SDK (i.e. ``nativesdk-``) |
| 1736 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1737 | :term:`D` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1738 | The destination directory. The location in the :term:`Build Directory` |
| 1739 | where components are installed by the |
| 1740 | :ref:`ref-tasks-install` task. This location defaults |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1741 | to:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1742 | |
| 1743 | ${WORKDIR}/image |
| 1744 | |
| 1745 | .. note:: |
| 1746 | |
| 1747 | Tasks that read from or write to this directory should run under |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1748 | :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1749 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1750 | :term:`DATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1751 | The date the build was started. Dates appear using the year, month, |
| 1752 | and day (YMD) format (e.g. "20150209" for February 9th, 2015). |
| 1753 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1754 | :term:`DATETIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1755 | The date and time on which the current build started. The format is |
| 1756 | suitable for timestamps. |
| 1757 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1758 | :term:`DEBIAN_NOAUTONAME` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1759 | When the :ref:`ref-classes-debian` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1760 | which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1761 | particular package should not be renamed according to Debian library |
| 1762 | package naming. You must use the package name as an override when you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1763 | set this variable. Here is an example from the ``fontconfig`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1764 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1765 | DEBIAN_NOAUTONAME:fontconfig-utils = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1766 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1767 | :term:`DEBIANNAME` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1768 | When the :ref:`ref-classes-debian` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1769 | which is the default behavior, :term:`DEBIANNAME` allows you to override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1770 | the library name for an individual package. Overriding the library |
| 1771 | name in these cases is rare. You must use the package name as an |
| 1772 | override when you set this variable. Here is an example from the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1773 | ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1774 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1775 | DEBIANNAME:${PN} = "dbus-1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1776 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1777 | :term:`DEBUG_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1778 | Specifies to build packages with debugging information. This |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1779 | influences the value of the :term:`SELECTED_OPTIMIZATION` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1780 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1781 | :term:`DEBUG_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1782 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1783 | compiling a system for debugging. This variable defaults to "-O |
| 1784 | -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". |
| 1785 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1786 | :term:`DEBUG_PREFIX_MAP` |
| 1787 | Allows to set C compiler options, such as ``-fdebug-prefix-map``, |
| 1788 | ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to |
| 1789 | replace build-time paths by install-time ones in the debugging sections |
| 1790 | of binaries. This makes compiler output files location independent, |
| 1791 | at the cost of having to pass an extra command to tell the debugger |
| 1792 | where source files are. |
| 1793 | |
| 1794 | This is used by the Yocto Project to guarantee |
| 1795 | :doc:`/test-manual/reproducible-builds` even when the source code of |
| 1796 | a package uses the ``__FILE__`` or ``assert()`` macros. See the |
| 1797 | `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__ |
| 1798 | website for details. |
| 1799 | |
| 1800 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1801 | not intended to be user-configurable. |
| 1802 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1803 | :term:`DEFAULT_PREFERENCE` |
| 1804 | Specifies a weak bias for recipe selection priority. |
| 1805 | |
| 1806 | The most common usage of this is variable is to set it to "-1" within |
| 1807 | a recipe for a development version of a piece of software. Using the |
| 1808 | variable in this way causes the stable version of the recipe to build |
| 1809 | by default in the absence of :term:`PREFERRED_VERSION` being used to |
| 1810 | build the development version. |
| 1811 | |
| 1812 | .. note:: |
| 1813 | |
| 1814 | The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden |
| 1815 | by :term:`BBFILE_PRIORITY` if that variable is different between two |
| 1816 | layers that contain different versions of the same recipe. |
| 1817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1818 | :term:`DEFAULTTUNE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1819 | The default CPU and Application Binary Interface (ABI) tunings (i.e. |
| 1820 | the "tune") used by the OpenEmbedded build system. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1821 | :term:`DEFAULTTUNE` helps define |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1822 | :term:`TUNE_FEATURES`. |
| 1823 | |
| 1824 | The default tune is either implicitly or explicitly set by the |
| 1825 | machine (:term:`MACHINE`). However, you can override |
| 1826 | the setting using available tunes as defined with |
| 1827 | :term:`AVAILTUNES`. |
| 1828 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1829 | :term:`DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1830 | Lists a recipe's build-time dependencies. These are dependencies on |
| 1831 | other recipes whose contents (e.g. headers and shared libraries) are |
| 1832 | needed by the recipe at build time. |
| 1833 | |
| 1834 | As an example, consider a recipe ``foo`` that contains the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1835 | assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1836 | |
| 1837 | DEPENDS = "bar" |
| 1838 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1839 | The practical effect of the previous assignment is that all files |
| 1840 | installed by bar will be available in the appropriate staging sysroot, |
| 1841 | given by the :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time |
| 1842 | the :ref:`ref-tasks-configure` task for ``foo`` runs. This mechanism is |
| 1843 | implemented by having :ref:`ref-tasks-configure` depend on the |
| 1844 | :ref:`ref-tasks-populate_sysroot` task of each recipe listed in |
| 1845 | :term:`DEPENDS`, through a |
| 1846 | ``[``\ :ref:`deptask <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1847 | declaration in the :ref:`ref-classes-base` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1848 | |
| 1849 | .. note:: |
| 1850 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1851 | It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1852 | explicitly. The standard classes and build-related variables are |
| 1853 | configured to automatically use the appropriate staging sysroots. |
| 1854 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1855 | As another example, :term:`DEPENDS` can also be used to add utilities |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1856 | that run on the build machine during the build. For example, a recipe |
| 1857 | that makes use of a code generator built by the recipe ``codegen`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1858 | might have the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1859 | |
| 1860 | DEPENDS = "codegen-native" |
| 1861 | |
| 1862 | For more |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1863 | information, see the :ref:`ref-classes-native` class and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1864 | the :term:`EXTRANATIVEPATH` variable. |
| 1865 | |
| 1866 | .. note:: |
| 1867 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1868 | - :term:`DEPENDS` is a list of recipe names. Or, to be more precise, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1869 | it is a list of :term:`PROVIDES` names, which |
| 1870 | usually match recipe names. Putting a package name such as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1871 | "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1872 | instead, as this will put files from all the packages that make |
| 1873 | up ``foo``, which includes those from ``foo-dev``, into the |
| 1874 | sysroot. |
| 1875 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1876 | - One recipe having another recipe in :term:`DEPENDS` does not by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1877 | itself add any runtime dependencies between the packages |
| 1878 | produced by the two recipes. However, as explained in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1879 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1880 | section in the Yocto Project Overview and Concepts Manual, |
| 1881 | runtime dependencies will often be added automatically, meaning |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1882 | :term:`DEPENDS` alone is sufficient for most recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1883 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1884 | - Counterintuitively, :term:`DEPENDS` is often necessary even for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1885 | recipes that install precompiled components. For example, if |
| 1886 | ``libfoo`` is a precompiled library that links against |
| 1887 | ``libbar``, then linking against ``libfoo`` requires both |
| 1888 | ``libfoo`` and ``libbar`` to be available in the sysroot. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1889 | Without a :term:`DEPENDS` from the recipe that installs ``libfoo`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1890 | to the recipe that installs ``libbar``, other recipes might |
| 1891 | fail to link against ``libfoo``. |
| 1892 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1893 | For information on runtime dependencies, see the :term:`RDEPENDS` |
| 1894 | variable. You can also see the |
| 1895 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 1896 | ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" |
| 1897 | sections in the BitBake User Manual for additional information on tasks |
| 1898 | and dependencies. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1899 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1900 | :term:`DEPLOY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1901 | Points to the general area that the OpenEmbedded build system uses to |
| 1902 | place images, packages, SDKs, and other output files that are ready |
| 1903 | to be used outside of the build system. By default, this directory |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1904 | resides within the :term:`Build Directory` as ``${TMPDIR}/deploy``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1905 | |
| 1906 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1907 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1908 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1909 | ":ref:`overview-manual/concepts:images`", |
| 1910 | ":ref:`overview-manual/concepts:package feeds`", and |
| 1911 | ":ref:`overview-manual/concepts:application development sdk`" sections all in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1912 | Yocto Project Overview and Concepts Manual. |
| 1913 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1914 | :term:`DEPLOY_DIR_DEB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1915 | Points to the area that the OpenEmbedded build system uses to place |
| 1916 | Debian packages that are ready to be used outside of the build |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1917 | system. This variable applies only when :term:`PACKAGE_CLASSES` contains |
| 1918 | ":ref:`ref-classes-package_deb`". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1919 | |
| 1920 | The BitBake configuration file initially defines the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1921 | :term:`DEPLOY_DIR_DEB` variable as a sub-folder of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1922 | :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1923 | |
| 1924 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
| 1925 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1926 | The :ref:`ref-classes-package_deb` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1927 | :term:`DEPLOY_DIR_DEB` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1928 | :ref:`ref-tasks-package_write_deb` task |
| 1929 | writes Debian packages into the appropriate folder. For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1930 | information on how packaging works, see the |
| 1931 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1932 | in the Yocto Project Overview and Concepts Manual. |
| 1933 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1934 | :term:`DEPLOY_DIR_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1935 | Points to the area that the OpenEmbedded build system uses to place |
| 1936 | images and other associated output files that are ready to be |
| 1937 | deployed onto the target machine. The directory is machine-specific |
| 1938 | as it contains the ``${MACHINE}`` name. By default, this directory |
| 1939 | resides within the :term:`Build Directory` as |
| 1940 | ``${DEPLOY_DIR}/images/${MACHINE}/``. |
| 1941 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1942 | It must not be used directly in recipes when deploying files. Instead, |
| 1943 | it's only useful when a recipe needs to "read" a file already deployed |
| 1944 | by a dependency. So, it should be filled with the contents of |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1945 | :term:`DEPLOYDIR` by the :ref:`ref-classes-deploy` class or with the |
| 1946 | contents of :term:`IMGDEPLOYDIR` by the :ref:`ref-classes-image` class. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1947 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1948 | For more information on the structure of the :term:`Build Directory`, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1949 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1950 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1951 | ":ref:`overview-manual/concepts:images`" and |
| 1952 | ":ref:`overview-manual/concepts:application development sdk`" sections both in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1953 | the Yocto Project Overview and Concepts Manual. |
| 1954 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1955 | :term:`DEPLOY_DIR_IPK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1956 | Points to the area that the OpenEmbedded build system uses to place |
| 1957 | IPK packages that are ready to be used outside of the build system. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1958 | This variable applies only when :term:`PACKAGE_CLASSES` contains |
| 1959 | ":ref:`ref-classes-package_ipk`". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1960 | |
| 1961 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1962 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1963 | |
| 1964 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
| 1965 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1966 | The :ref:`ref-classes-package_ipk` class uses the :term:`DEPLOY_DIR_IPK` |
| 1967 | variable to make sure the :ref:`ref-tasks-package_write_ipk` task |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1968 | writes IPK packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1969 | on how packaging works, see the |
| 1970 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1971 | in the Yocto Project Overview and Concepts Manual. |
| 1972 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1973 | :term:`DEPLOY_DIR_RPM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1974 | Points to the area that the OpenEmbedded build system uses to place |
| 1975 | RPM packages that are ready to be used outside of the build system. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1976 | This variable applies only when :term:`PACKAGE_CLASSES` contains |
| 1977 | ":ref:`ref-classes-package_rpm`". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1978 | |
| 1979 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1980 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1981 | |
| 1982 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
| 1983 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1984 | The :ref:`ref-classes-package_rpm` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1985 | :term:`DEPLOY_DIR_RPM` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1986 | :ref:`ref-tasks-package_write_rpm` task |
| 1987 | writes RPM packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1988 | on how packaging works, see the |
| 1989 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1990 | in the Yocto Project Overview and Concepts Manual. |
| 1991 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1992 | :term:`DEPLOYDIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1993 | When inheriting the :ref:`ref-classes-deploy` class, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1994 | :term:`DEPLOYDIR` points to a temporary work area for deployed files that |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1995 | is set in the :ref:`ref-classes-deploy` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1996 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1997 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1998 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1999 | Recipes inheriting the :ref:`ref-classes-deploy` class should copy files to be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2000 | deployed into :term:`DEPLOYDIR`, and the class will take care of copying |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2001 | them into :term:`DEPLOY_DIR_IMAGE` |
| 2002 | afterwards. |
| 2003 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2004 | :term:`DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2005 | The package description used by package managers. If not set, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2006 | :term:`DESCRIPTION` takes the value of the :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2007 | variable. |
| 2008 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2009 | :term:`DEV_PKG_DEPENDENCY` |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 2010 | Provides an easy way for recipes to disable or adjust the runtime recommendation |
| 2011 | (:term:`RRECOMMENDS`) of the ``${PN}-dev`` package on the main |
| 2012 | (``${PN}``) package. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2013 | |
| 2014 | :term:`DISABLE_STATIC` |
| 2015 | Used in order to disable static linking by default (in order to save |
| 2016 | space, since static libraries are often unused in embedded systems.) |
| 2017 | The default value is " --disable-static", however it can be set to "" |
| 2018 | in order to enable static linking if desired. Certain recipes do this |
| 2019 | individually, and also there is a |
| 2020 | ``meta/conf/distro/include/no-static-libs.inc`` include file that |
| 2021 | disables static linking for a number of recipes. Some software |
| 2022 | packages or build tools (such as CMake) have explicit support for |
| 2023 | enabling / disabling static linking, and in those cases |
| 2024 | :term:`DISABLE_STATIC` is not used. |
| 2025 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2026 | :term:`DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2027 | The short name of the distribution. For information on the long name |
| 2028 | of the distribution, see the :term:`DISTRO_NAME` |
| 2029 | variable. |
| 2030 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2031 | The :term:`DISTRO` variable corresponds to a distribution configuration |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2032 | file whose root name is the same as the variable's argument and whose |
| 2033 | filename extension is ``.conf``. For example, the distribution |
| 2034 | configuration file for the Poky distribution is named ``poky.conf`` |
| 2035 | and resides in the ``meta-poky/conf/distro`` directory of the |
| 2036 | :term:`Source Directory`. |
| 2037 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2038 | Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2039 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2040 | |
| 2041 | DISTRO = "poky" |
| 2042 | |
| 2043 | Distribution configuration files are located in a ``conf/distro`` |
| 2044 | directory within the :term:`Metadata` that contains the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2045 | distribution configuration. The value for :term:`DISTRO` must not contain |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2046 | spaces, and is typically all lower-case. |
| 2047 | |
| 2048 | .. note:: |
| 2049 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2050 | If the :term:`DISTRO` variable is blank, a set of default configurations |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2051 | are used, which are specified within |
| 2052 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2053 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2054 | :term:`DISTRO_CODENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2055 | Specifies a codename for the distribution being built. |
| 2056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2057 | :term:`DISTRO_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2058 | Specifies a list of distro-specific packages to add to all images. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2059 | This variable takes effect through ``packagegroup-base`` so the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2060 | variable only really applies to the more full-featured images that |
| 2061 | include ``packagegroup-base``. You can use this variable to keep |
| 2062 | distro policy out of generic images. As with all other distro |
| 2063 | variables, you set this variable in the distro ``.conf`` file. |
| 2064 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2065 | :term:`DISTRO_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2066 | Specifies a list of distro-specific packages to add to all images if |
| 2067 | the packages exist. The packages might not exist or be empty (e.g. |
| 2068 | kernel modules). The list of packages are automatically installed but |
| 2069 | you can remove them. |
| 2070 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2071 | :term:`DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2072 | The software support you want in your distribution for various |
| 2073 | features. You define your distribution features in the distribution |
| 2074 | configuration file. |
| 2075 | |
| 2076 | In most cases, the presence or absence of a feature in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2077 | :term:`DISTRO_FEATURES` is translated to the appropriate option supplied |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2078 | to the configure script during the |
| 2079 | :ref:`ref-tasks-configure` task for recipes that |
| 2080 | optionally support the feature. For example, specifying "x11" in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2081 | :term:`DISTRO_FEATURES`, causes every piece of software built for the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2082 | target that can optionally support X11 to have its X11 support |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 2083 | enabled. |
| 2084 | |
| 2085 | .. note:: |
| 2086 | |
| 2087 | Just enabling :term:`DISTRO_FEATURES` alone doesn't |
| 2088 | enable feature support for packages. Mechanisms such as making |
| 2089 | :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used |
| 2090 | to enable/disable package features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2091 | |
| 2092 | Two more examples are Bluetooth and NFS support. For a more complete |
| 2093 | list of features that ships with the Yocto Project and that you can |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2094 | provide with this variable, see the ":ref:`ref-features-distro`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2095 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2096 | :term:`DISTRO_FEATURES_BACKFILL` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2097 | A space-separated list of features to be added to :term:`DISTRO_FEATURES` |
| 2098 | if not also present in :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2099 | |
| 2100 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 2101 | not intended to be user-configurable. It is best to just reference |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2102 | the variable to see which distro features are being |
| 2103 | :ref:`backfilled <ref-features-backfill>` for all distro configurations. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2104 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2105 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2106 | A space-separated list of features from :term:`DISTRO_FEATURES_BACKFILL` |
| 2107 | that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added |
| 2108 | to :term:`DISTRO_FEATURES`) during the build. |
| 2109 | |
| 2110 | This corresponds to an opt-out mechanism. When new default distro |
| 2111 | features are introduced, distribution maintainers can review (`consider`) |
| 2112 | them and decide to exclude them from the |
| 2113 | :ref:`backfilled <ref-features-backfill>` features. Therefore, the |
| 2114 | combination of :term:`DISTRO_FEATURES_BACKFILL` and |
| 2115 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` makes it possible to |
| 2116 | add new default features without breaking existing distributions. |
| 2117 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2118 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2119 | :term:`DISTRO_FEATURES_DEFAULT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2120 | A convenience variable that gives you the default list of distro |
| 2121 | features with the exception of any features specific to the C library |
| 2122 | (``libc``). |
| 2123 | |
| 2124 | When creating a custom distribution, you might find it useful to be |
| 2125 | able to reuse the default |
| 2126 | :term:`DISTRO_FEATURES` options without the |
| 2127 | need to write out the full set. Here is an example that uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2128 | :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2129 | |
| 2130 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" |
| 2131 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2132 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2133 | Specifies a list of features that if present in the target |
| 2134 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2135 | included in :term:`DISTRO_FEATURES` when building native recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2136 | variable is used in addition to the features filtered using the |
| 2137 | :term:`DISTRO_FEATURES_NATIVE` |
| 2138 | variable. |
| 2139 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2140 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2141 | Specifies a list of features that if present in the target |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2142 | :term:`DISTRO_FEATURES` value should be included in |
| 2143 | :term:`DISTRO_FEATURES` when building :ref:`ref-classes-nativesdk` |
| 2144 | recipes. This variable is used in addition to the features filtered using |
| 2145 | the :term:`DISTRO_FEATURES_NATIVESDK` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2146 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2147 | :term:`DISTRO_FEATURES_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2148 | Specifies a list of features that should be included in |
| 2149 | :term:`DISTRO_FEATURES` when building native |
| 2150 | recipes. This variable is used in addition to the features filtered |
| 2151 | using the |
| 2152 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
| 2153 | variable. |
| 2154 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2155 | :term:`DISTRO_FEATURES_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2156 | Specifies a list of features that should be included in |
| 2157 | :term:`DISTRO_FEATURES` when building |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2158 | :ref:`ref-classes-nativesdk` recipes. This variable is used |
| 2159 | in addition to the features filtered using the |
| 2160 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2161 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2162 | :term:`DISTRO_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2163 | The long name of the distribution. For information on the short name |
| 2164 | of the distribution, see the :term:`DISTRO` variable. |
| 2165 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2166 | The :term:`DISTRO_NAME` variable corresponds to a distribution |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2167 | configuration file whose root name is the same as the variable's |
| 2168 | argument and whose filename extension is ``.conf``. For example, the |
| 2169 | distribution configuration file for the Poky distribution is named |
| 2170 | ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory |
| 2171 | of the :term:`Source Directory`. |
| 2172 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2173 | Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2174 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2175 | |
| 2176 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" |
| 2177 | |
| 2178 | Distribution configuration files are located in a ``conf/distro`` |
| 2179 | directory within the :term:`Metadata` that contains the |
| 2180 | distribution configuration. |
| 2181 | |
| 2182 | .. note:: |
| 2183 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2184 | If the :term:`DISTRO_NAME` variable is blank, a set of default |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2185 | configurations are used, which are specified within |
| 2186 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2187 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2188 | :term:`DISTRO_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2189 | The version of the distribution. |
| 2190 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2191 | :term:`DISTROOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2192 | A colon-separated list of overrides specific to the current |
| 2193 | distribution. By default, this list includes the value of |
| 2194 | :term:`DISTRO`. |
| 2195 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2196 | You can extend :term:`DISTROOVERRIDES` to add extra overrides that should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2197 | apply to the distribution. |
| 2198 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2199 | The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2200 | is included in the default value of |
| 2201 | :term:`OVERRIDES`. |
| 2202 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2203 | :term:`DL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2204 | The central download directory used by the build process to store |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2205 | downloads. By default, :term:`DL_DIR` gets files suitable for mirroring |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2206 | for everything except Git repositories. If you want tarballs of Git |
| 2207 | repositories, use the |
| 2208 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
| 2209 | variable. |
| 2210 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2211 | You can set this directory by defining the :term:`DL_DIR` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2212 | ``conf/local.conf`` file. This directory is self-maintaining and you |
| 2213 | should not have to touch it. By default, the directory is |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2214 | ``downloads`` in the :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2215 | |
| 2216 | #DL_DIR ?= "${TOPDIR}/downloads" |
| 2217 | |
| 2218 | To specify a different download directory, |
| 2219 | simply remove the comment from the line and provide your directory. |
| 2220 | |
| 2221 | During a first build, the system downloads many different source code |
| 2222 | tarballs from various upstream projects. Downloading can take a |
| 2223 | while, particularly if your network connection is slow. Tarballs are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2224 | all stored in the directory defined by :term:`DL_DIR` and the build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2225 | system looks there first to find source tarballs. |
| 2226 | |
| 2227 | .. note:: |
| 2228 | |
| 2229 | When wiping and rebuilding, you can preserve this directory to |
| 2230 | speed up this part of subsequent builds. |
| 2231 | |
| 2232 | You can safely share this directory between multiple builds on the |
| 2233 | same development machine. For additional information on how the build |
| 2234 | process gets source files when working behind a firewall or proxy |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2235 | server, see this specific question in the ":doc:`faq`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2236 | chapter. You can also refer to the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2237 | ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2238 | Wiki page. |
| 2239 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2240 | :term:`DOC_COMPRESS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2241 | When inheriting the :ref:`ref-classes-compress_doc` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2242 | class, this variable sets the compression policy used when the |
| 2243 | OpenEmbedded build system compresses man pages and info pages. By |
| 2244 | default, the compression method used is gz (gzip). Other policies |
| 2245 | available are xz and bz2. |
| 2246 | |
| 2247 | For information on policies and on how to use this variable, see the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2248 | comments in the ``meta/classes-recipe/compress_doc.bbclass`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2249 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2250 | :term:`EFI_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2251 | When building bootable images (i.e. where ``hddimg``, ``iso``, or |
| 2252 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2253 | :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2254 | default is "grub-efi", but "systemd-boot" can be used instead. |
| 2255 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2256 | See the :ref:`ref-classes-systemd-boot` and :ref:`ref-classes-image-live` |
| 2257 | classes for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2258 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2259 | :term:`ENABLE_BINARY_LOCALE_GENERATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2260 | Variable that controls which locales for ``glibc`` are generated |
| 2261 | during the build (useful if the target device has 64Mbytes of RAM or |
| 2262 | less). |
| 2263 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2264 | :term:`ERR_REPORT_DIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2265 | When used with the :ref:`ref-classes-report-error` class, specifies the |
| 2266 | path used for storing the debug files created by the :ref:`error reporting |
| 2267 | tool <dev-manual/error-reporting-tool:using the error reporting tool>`, |
| 2268 | which allows you to submit build errors you encounter to a central |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2269 | database. By default, the value of this variable is |
| 2270 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. |
| 2271 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2272 | You can set :term:`ERR_REPORT_DIR` to the path you want the error |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2273 | reporting tool to store the debug files as follows in your |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2274 | ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2275 | |
| 2276 | ERR_REPORT_DIR = "path" |
| 2277 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2278 | :term:`ERROR_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2279 | Specifies the quality assurance checks whose failures are reported as |
| 2280 | errors by the OpenEmbedded build system. You set this variable in |
| 2281 | your distribution configuration file. For a list of the checks you |
| 2282 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2283 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2284 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2285 | :term:`ESDK_CLASS_INHERIT_DISABLE` |
| 2286 | A list of classes to remove from the :term:`INHERIT` |
| 2287 | value globally within the extensible SDK configuration. The |
| 2288 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the |
| 2289 | default value:: |
| 2290 | |
| 2291 | ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc" |
| 2292 | |
| 2293 | Some classes are not generally applicable within the extensible SDK |
| 2294 | context. You can use this variable to disable those classes. |
| 2295 | |
| 2296 | For additional information on how to customize the extensible SDK's |
| 2297 | configuration, see the |
| 2298 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2299 | section in the Yocto Project Application Development and the |
| 2300 | Extensible Software Development Kit (eSDK) manual. |
| 2301 | |
| 2302 | :term:`ESDK_LOCALCONF_ALLOW` |
| 2303 | A list of variables allowed through from the OpenEmbedded build |
| 2304 | system configuration into the extensible SDK configuration. By |
| 2305 | default, the list of variables is empty and is set in the |
| 2306 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. |
| 2307 | |
| 2308 | This list overrides the variables specified using the |
| 2309 | :term:`ESDK_LOCALCONF_REMOVE` variable as well as |
| 2310 | other variables automatically added due to the "/" character |
| 2311 | being found at the start of the |
| 2312 | value, which is usually indicative of being a path and thus might not |
| 2313 | be valid on the system where the SDK is installed. |
| 2314 | |
| 2315 | For additional information on how to customize the extensible SDK's |
| 2316 | configuration, see the |
| 2317 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2318 | section in the Yocto Project Application Development and the |
| 2319 | Extensible Software Development Kit (eSDK) manual. |
| 2320 | |
| 2321 | :term:`ESDK_LOCALCONF_REMOVE` |
| 2322 | A list of variables not allowed through from the OpenEmbedded build |
| 2323 | system configuration into the extensible SDK configuration. Usually, |
| 2324 | these are variables that are specific to the machine on which the |
| 2325 | build system is running and thus would be potentially problematic |
| 2326 | within the extensible SDK. |
| 2327 | |
| 2328 | By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the |
| 2329 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and |
| 2330 | excludes the following variables: |
| 2331 | |
| 2332 | - :term:`CONF_VERSION` |
| 2333 | - :term:`BB_NUMBER_THREADS` |
| 2334 | - :term:`BB_NUMBER_PARSE_THREADS` |
| 2335 | - :term:`PARALLEL_MAKE` |
| 2336 | - :term:`PRSERV_HOST` |
| 2337 | - :term:`SSTATE_MIRRORS` :term:`DL_DIR` |
| 2338 | - :term:`SSTATE_DIR` :term:`TMPDIR` |
| 2339 | - :term:`BB_SERVER_TIMEOUT` |
| 2340 | |
| 2341 | For additional information on how to customize the extensible SDK's |
| 2342 | configuration, see the |
| 2343 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2344 | section in the Yocto Project Application Development and the |
| 2345 | Extensible Software Development Kit (eSDK) manual. |
| 2346 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2347 | :term:`EXCLUDE_FROM_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2348 | Triggers the OpenEmbedded build system's shared libraries resolver to |
| 2349 | exclude an entire package when scanning for shared libraries. |
| 2350 | |
| 2351 | .. note:: |
| 2352 | |
| 2353 | The shared libraries resolver's functionality results in part from |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2354 | the internal function ``package_do_shlibs``, which is part of the |
| 2355 | :ref:`ref-tasks-package` task. You should be aware that the shared |
| 2356 | libraries resolver might implicitly define some dependencies between |
| 2357 | packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2358 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2359 | The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2360 | :term:`PRIVATE_LIBS` variable, which excludes a |
| 2361 | package's particular libraries only and not the whole package. |
| 2362 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2363 | Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2364 | particular package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2365 | |
| 2366 | EXCLUDE_FROM_SHLIBS = "1" |
| 2367 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2368 | :term:`EXCLUDE_FROM_WORLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2369 | Directs BitBake to exclude a recipe from world builds (i.e. |
| 2370 | ``bitbake world``). During world builds, BitBake locates, parses and |
| 2371 | builds all recipes found in every layer exposed in the |
| 2372 | ``bblayers.conf`` configuration file. |
| 2373 | |
| 2374 | To exclude a recipe from a world build using this variable, set the |
| 2375 | variable to "1" in the recipe. |
| 2376 | |
| 2377 | .. note:: |
| 2378 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2379 | Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2380 | world build in order to satisfy dependencies of other recipes. Adding |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2381 | a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2382 | explicitly added to the list of build targets in a world build. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2383 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2384 | :term:`EXTENDPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2385 | Used with file and pathnames to create a prefix for a recipe's |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2386 | version based on the recipe's :term:`PE` value. If :term:`PE` |
| 2387 | is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that |
| 2388 | value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1"). |
| 2389 | If a recipe's :term:`PE` is not set (the default) or is equal to zero, |
| 2390 | :term:`EXTENDPE` becomes "". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2391 | |
| 2392 | See the :term:`STAMP` variable for an example. |
| 2393 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2394 | :term:`EXTENDPKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2395 | The full package version specification as it appears on the final |
| 2396 | packages produced by a recipe. The variable's value is normally used |
| 2397 | to fix a runtime dependency to the exact same version of another |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2398 | package in the same recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2399 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2400 | RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2401 | |
| 2402 | The dependency relationships are intended to force the package |
| 2403 | manager to upgrade these types of packages in lock-step. |
| 2404 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2405 | :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2406 | When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2407 | tools are not in the source tree. |
| 2408 | |
| 2409 | When kernel tools are available in the tree, they are preferred over |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2410 | any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2411 | variable tells the OpenEmbedded build system to prefer the installed |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2412 | external tools. See the :ref:`ref-classes-kernel-yocto` class in |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2413 | ``meta/classes-recipe`` to see how the variable is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2414 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2415 | :term:`EXTERNAL_TOOLCHAIN` |
| 2416 | When you intend to use an |
| 2417 | :ref:`external toolchain <dev-manual/external-toolchain:optionally using an external toolchain>`, |
| 2418 | this variable allows to specify the directory where this toolchain was |
| 2419 | installed. |
| 2420 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2421 | :term:`EXTERNALSRC` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2422 | When inheriting the :ref:`ref-classes-externalsrc` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2423 | class, this variable points to the source tree, which is outside of |
| 2424 | the OpenEmbedded build system. When set, this variable sets the |
| 2425 | :term:`S` variable, which is what the OpenEmbedded build |
| 2426 | system uses to locate unpacked recipe source code. |
| 2427 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2428 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2429 | can also find information on how to use this variable in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2430 | ":ref:`dev-manual/building:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2431 | section in the Yocto Project Development Tasks Manual. |
| 2432 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2433 | :term:`EXTERNALSRC_BUILD` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2434 | When inheriting the :ref:`ref-classes-externalsrc` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2435 | class, this variable points to the directory in which the recipe's |
| 2436 | source code is built, which is outside of the OpenEmbedded build |
| 2437 | system. When set, this variable sets the :term:`B` variable, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2438 | which is what the OpenEmbedded build system uses to locate the |
| 2439 | :term:`Build Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2440 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2441 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2442 | can also find information on how to use this variable in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2443 | ":ref:`dev-manual/building:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2444 | section in the Yocto Project Development Tasks Manual. |
| 2445 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2446 | :term:`EXTRA_AUTORECONF` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2447 | For recipes inheriting the :ref:`ref-classes-autotools` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2448 | class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2449 | pass to the ``autoreconf`` command that is executed during the |
| 2450 | :ref:`ref-tasks-configure` task. |
| 2451 | |
| 2452 | The default value is "--exclude=autopoint". |
| 2453 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2454 | :term:`EXTRA_IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2455 | A list of additional features to include in an image. When listing |
| 2456 | more than one feature, separate them with a space. |
| 2457 | |
| 2458 | Typically, you configure this variable in your ``local.conf`` file, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2459 | which is found in the :term:`Build Directory`. Although you can use this |
| 2460 | variable from within a recipe, best practices dictate that you do not. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2461 | |
| 2462 | .. note:: |
| 2463 | |
| 2464 | To enable primary features from within the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2465 | :term:`IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2466 | |
| 2467 | Here are some examples of features you can add: |
| 2468 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2469 | - "dbg-pkgs" --- adds -dbg packages for all installed packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2470 | symbol information for debugging and profiling. |
| 2471 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2472 | - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2473 | enables post-installation logging. See the 'allow-empty-password' and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2474 | 'post-install-logging' features in the ":ref:`ref-features-image`" |
| 2475 | section for more information. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2476 | - "dev-pkgs" --- adds -dev packages for all installed packages. This is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2477 | useful if you want to develop against the libraries in the image. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2478 | - "read-only-rootfs" --- creates an image whose root filesystem is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2479 | read-only. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2480 | ":ref:`dev-manual/read-only-rootfs:creating a read-only root filesystem`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2481 | section in the Yocto Project Development Tasks Manual for more |
| 2482 | information |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2483 | - "tools-debug" --- adds debugging tools such as gdb and strace. |
| 2484 | - "tools-sdk" --- adds development tools such as gcc, make, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2485 | pkgconfig and so forth. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2486 | - "tools-testapps" --- adds useful testing tools |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2487 | such as ts_print, aplay, arecord and so forth. |
| 2488 | |
| 2489 | For a complete list of image features that ships with the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2490 | Project, see the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2491 | |
| 2492 | For an example that shows how to customize your image by using this |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2493 | variable, see the ":ref:`dev-manual/customizing-images:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2494 | section in the Yocto Project Development Tasks Manual. |
| 2495 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2496 | :term:`EXTRA_IMAGECMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2497 | Specifies additional options for the image creation command that has |
| 2498 | been specified in :term:`IMAGE_CMD`. When setting |
| 2499 | this variable, use an override for the associated image type. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2500 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2501 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2502 | EXTRA_IMAGECMD:ext3 ?= "-i 4096" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2503 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2504 | :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2505 | A list of recipes to build that do not provide packages for |
| 2506 | installing into the root filesystem. |
| 2507 | |
| 2508 | Sometimes a recipe is required to build the final image but is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2509 | needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2510 | variable to list these recipes and thus specify the dependencies. A |
| 2511 | typical example is a required bootloader in a machine configuration. |
| 2512 | |
| 2513 | .. note:: |
| 2514 | |
| 2515 | To add packages to the root filesystem, see the various |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 2516 | :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2517 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2518 | :term:`EXTRA_OECMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2519 | Additional `CMake <https://cmake.org/overview/>`__ options. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2520 | :ref:`ref-classes-cmake` class for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2521 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2522 | :term:`EXTRA_OECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2523 | Additional ``configure`` script options. See |
| 2524 | :term:`PACKAGECONFIG_CONFARGS` for |
| 2525 | additional information on passing configure script options. |
| 2526 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2527 | :term:`EXTRA_OEMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2528 | Additional GNU ``make`` options. |
| 2529 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2530 | Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2531 | variable to specify any required GNU options. |
| 2532 | |
| 2533 | :term:`PARALLEL_MAKE` and |
| 2534 | :term:`PARALLEL_MAKEINST` also make use of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2535 | :term:`EXTRA_OEMAKE` to pass the required flags. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2536 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2537 | :term:`EXTRA_OESCONS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2538 | When inheriting the :ref:`ref-classes-scons` class, this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2539 | variable specifies additional configuration options you want to pass |
| 2540 | to the ``scons`` command line. |
| 2541 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 2542 | :term:`EXTRA_OEMESON` |
| 2543 | Additional `Meson <https://mesonbuild.com/>`__ options. See the |
| 2544 | :ref:`ref-classes-meson` class for additional information. |
| 2545 | |
| 2546 | In addition to standard Meson options, such options correspond to |
| 2547 | `Meson build options <https://mesonbuild.com/Build-options.html>`__ |
| 2548 | defined in the ``meson_options.txt`` file in the sources to build. |
| 2549 | Here is an example:: |
| 2550 | |
| 2551 | EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled" |
| 2552 | |
| 2553 | Note that any custom value for the Meson ``--buildtype`` option |
| 2554 | should be set through the :term:`MESON_BUILDTYPE` variable. |
| 2555 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2556 | :term:`EXTRA_USERS_PARAMS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2557 | When inheriting the :ref:`ref-classes-extrausers` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2558 | class, this variable provides image level user and group operations. |
| 2559 | This is a more global method of providing user and group |
| 2560 | configuration as compared to using the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2561 | :ref:`ref-classes-useradd` class, which ties user and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2562 | group configurations to a specific recipe. |
| 2563 | |
| 2564 | The set list of commands you can configure using the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2565 | :term:`EXTRA_USERS_PARAMS` is shown in the |
| 2566 | :ref:`ref-classes-extrausers` class. These commands map to the normal |
| 2567 | Unix commands of the same names:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2568 | |
| 2569 | # EXTRA_USERS_PARAMS = "\ |
| 2570 | # useradd -p '' tester; \ |
| 2571 | # groupadd developers; \ |
| 2572 | # userdel nobody; \ |
| 2573 | # groupdel -g video; \ |
| 2574 | # groupmod -g 1020 developers; \ |
| 2575 | # usermod -s /bin/sh tester; \ |
| 2576 | # " |
| 2577 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 2578 | Hardcoded passwords are supported via the ``-p`` parameters for |
| 2579 | ``useradd`` or ``usermod``, but only hashed. |
| 2580 | |
| 2581 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns |
| 2582 | passwords. First on host, create the (escaped) password hash:: |
| 2583 | |
| 2584 | printf "%q" $(mkpasswd -m sha256crypt tester01) |
| 2585 | |
| 2586 | The resulting hash is set to a variable and used in ``useradd`` command parameters:: |
| 2587 | |
| 2588 | inherit extrausers |
| 2589 | PASSWD = "\$X\$ABC123\$A-Long-Hash" |
| 2590 | EXTRA_USERS_PARAMS = "\ |
| 2591 | useradd -p '${PASSWD}' tester-jim; \ |
| 2592 | useradd -p '${PASSWD}' tester-sue; \ |
| 2593 | " |
| 2594 | |
| 2595 | Finally, here is an example that sets the root password:: |
| 2596 | |
| 2597 | inherit extrausers |
| 2598 | EXTRA_USERS_PARAMS = "\ |
| 2599 | usermod -p '${PASSWD}' root; \ |
| 2600 | " |
| 2601 | |
| 2602 | .. note:: |
| 2603 | |
| 2604 | From a security perspective, hardcoding a default password is not |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 2605 | generally a good idea or even legal in some jurisdictions. It is |
| 2606 | recommended that you do not do this if you are building a production |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 2607 | image. |
| 2608 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2609 | Additionally there is a special ``passwd-expire`` command that will |
| 2610 | cause the password for a user to be expired and thus force changing it |
| 2611 | on first login, for example:: |
| 2612 | |
| 2613 | EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" |
| 2614 | |
| 2615 | .. note:: |
| 2616 | |
| 2617 | At present, ``passwd-expire`` may only work for remote logins when |
| 2618 | using OpenSSH and not dropbear as an SSH server. |
| 2619 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2620 | :term:`EXTRANATIVEPATH` |
| 2621 | A list of subdirectories of |
| 2622 | ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` |
| 2623 | added to the beginning of the environment variable ``PATH``. As an |
| 2624 | example, the following prepends |
| 2625 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to |
| 2626 | ``PATH``:: |
| 2627 | |
| 2628 | EXTRANATIVEPATH = "foo bar" |
| 2629 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2630 | :term:`FAKEROOT` |
| 2631 | See :term:`bitbake:FAKEROOT` in the BitBake manual. |
| 2632 | |
| 2633 | :term:`FAKEROOTBASEENV` |
| 2634 | See :term:`bitbake:FAKEROOTBASEENV` in the BitBake manual. |
| 2635 | |
| 2636 | :term:`FAKEROOTCMD` |
| 2637 | See :term:`bitbake:FAKEROOTCMD` in the BitBake manual. |
| 2638 | |
| 2639 | :term:`FAKEROOTDIRS` |
| 2640 | See :term:`bitbake:FAKEROOTDIRS` in the BitBake manual. |
| 2641 | |
| 2642 | :term:`FAKEROOTENV` |
| 2643 | See :term:`bitbake:FAKEROOTENV` in the BitBake manual. |
| 2644 | |
| 2645 | :term:`FAKEROOTNOENV` |
| 2646 | See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual. |
| 2647 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2648 | :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2649 | Defines one or more packages to include in an image when a specific |
| 2650 | item is included in :term:`IMAGE_FEATURES`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2651 | When setting the value, :term:`FEATURE_PACKAGES` should have the name of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2652 | the feature item as an override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2653 | |
| 2654 | FEATURE_PACKAGES_widget = "package1 package2" |
| 2655 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2656 | In this example, if "widget" were added to :term:`IMAGE_FEATURES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2657 | package1 and package2 would be included in the image. |
| 2658 | |
| 2659 | .. note:: |
| 2660 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2661 | Packages installed by features defined through :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2662 | are often package groups. While similarly named, you should not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2663 | confuse the :term:`FEATURE_PACKAGES` variable with package groups, which |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2664 | are discussed elsewhere in the documentation. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2665 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2666 | :term:`FEED_DEPLOYDIR_BASE_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2667 | Points to the base URL of the server and location within the |
| 2668 | document-root that provides the metadata and packages required by |
| 2669 | OPKG to support runtime package management of IPK packages. You set |
| 2670 | this variable in your ``local.conf`` file. |
| 2671 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2672 | Consider the following example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2673 | |
| 2674 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" |
| 2675 | |
| 2676 | This example assumes you are serving |
| 2677 | your packages over HTTP and your databases are located in a directory |
| 2678 | named ``BOARD-dir``, which is underneath your HTTP server's |
| 2679 | document-root. In this case, the OpenEmbedded build system generates |
| 2680 | a set of configuration files for you in your target that work with |
| 2681 | the feed. |
| 2682 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2683 | :term:`FETCHCMD` |
| 2684 | See :term:`bitbake:FETCHCMD` in the BitBake manual. |
| 2685 | |
| 2686 | :term:`FILE` |
| 2687 | See :term:`bitbake:FILE` in the BitBake manual. |
| 2688 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2689 | :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2690 | The list of files and directories that are placed in a package. The |
| 2691 | :term:`PACKAGES` variable lists the packages |
| 2692 | generated by a recipe. |
| 2693 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2694 | To use the :term:`FILES` variable, provide a package name override that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2695 | identifies the resulting package. Then, provide a space-separated |
| 2696 | list of files or paths that identify the files you want included as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2697 | part of the resulting package. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2698 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2699 | FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2700 | |
| 2701 | .. note:: |
| 2702 | |
| 2703 | - When specifying files or paths, you can pattern match using |
| 2704 | Python's |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2705 | `glob <https://docs.python.org/3/library/glob.html>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2706 | syntax. For details on the syntax, see the documentation by |
| 2707 | following the previous link. |
| 2708 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2709 | - When specifying paths as part of the :term:`FILES` variable, it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2710 | good practice to use appropriate path variables. For example, |
| 2711 | use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` |
| 2712 | rather than ``/usr/bin``. You can find a list of these |
| 2713 | variables at the top of the ``meta/conf/bitbake.conf`` file in |
| 2714 | the :term:`Source Directory`. You will also |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2715 | find the default values of the various ``FILES:*`` variables in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2716 | this file. |
| 2717 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2718 | If some of the files you provide with the :term:`FILES` variable are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2719 | editable and you know they should not be overwritten during the |
| 2720 | package update process by the Package Management System (PMS), you |
| 2721 | can identify these files so that the PMS will not overwrite them. See |
| 2722 | the :term:`CONFFILES` variable for information on |
| 2723 | how to identify these files to the PMS. |
| 2724 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2725 | :term:`FILES_SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2726 | Defines the file specification to match |
| 2727 | :term:`SOLIBSDEV`. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2728 | :term:`FILES_SOLIBSDEV` defines the full path name of the development |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2729 | symbolic link (symlink) for shared libraries on the target platform. |
| 2730 | |
| 2731 | The following statement from the ``bitbake.conf`` shows how it is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2732 | set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2733 | |
| 2734 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
| 2735 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2736 | :term:`FILESEXTRAPATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2737 | Extends the search path the OpenEmbedded build system uses when |
| 2738 | looking for files and patches as it processes recipes and append |
| 2739 | files. The default directories BitBake uses when it processes recipes |
| 2740 | are initially defined by the :term:`FILESPATH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2741 | variable. You can extend :term:`FILESPATH` variable by using |
| 2742 | :term:`FILESEXTRAPATHS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2743 | |
| 2744 | Best practices dictate that you accomplish this by using |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2745 | :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2746 | prepend paths as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2747 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2748 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2749 | |
| 2750 | In the above example, the build system first |
| 2751 | looks for files in a directory that has the same name as the |
| 2752 | corresponding append file. |
| 2753 | |
| 2754 | .. note:: |
| 2755 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2756 | When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2757 | expansion (``:=``) operator. Immediate expansion makes sure that |
| 2758 | BitBake evaluates :term:`THISDIR` at the time the |
| 2759 | directive is encountered rather than at some later time when |
| 2760 | expansion might result in a directory that does not contain the |
| 2761 | files you need. |
| 2762 | |
| 2763 | Also, include the trailing separating colon character if you are |
| 2764 | prepending. The trailing colon character is necessary because you |
| 2765 | are directing BitBake to extend the path by prepending directories |
| 2766 | to the search path. |
| 2767 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2768 | Here is another common use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2769 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2770 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2771 | |
| 2772 | In this example, the build system extends the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2773 | :term:`FILESPATH` variable to include a directory named ``files`` that is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2774 | in the same directory as the corresponding append file. |
| 2775 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2776 | This next example specifically adds three paths:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2777 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2778 | FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2779 | |
| 2780 | A final example shows how you can extend the search path and include |
| 2781 | a :term:`MACHINE`-specific override, which is useful |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2782 | in a BSP layer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2783 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2784 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2785 | |
| 2786 | The previous statement appears in the |
| 2787 | ``linux-yocto-dev.bbappend`` file, which is found in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2788 | :ref:`overview-manual/development-environment:yocto project source repositories` in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2789 | ``meta-intel/common/recipes-kernel/linux``. Here, the machine |
| 2790 | override is a special :term:`PACKAGE_ARCH` |
| 2791 | definition for multiple ``meta-intel`` machines. |
| 2792 | |
| 2793 | .. note:: |
| 2794 | |
| 2795 | For a layer that supports a single BSP, the override could just be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2796 | the value of :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2797 | |
| 2798 | By prepending paths in ``.bbappend`` files, you allow multiple append |
| 2799 | files that reside in different layers but are used for the same |
| 2800 | recipe to correctly extend the path. |
| 2801 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2802 | :term:`FILESOVERRIDES` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2803 | A subset of :term:`OVERRIDES` used by the OpenEmbedded build system for |
| 2804 | creating :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable uses |
| 2805 | overrides to automatically extend the :term:`FILESPATH` variable. For an |
| 2806 | example of how that works, see the :term:`FILESPATH` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2807 | description. Additionally, you find more information on how overrides |
| 2808 | are handled in the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2809 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2810 | section of the BitBake User Manual. |
| 2811 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2812 | By default, the :term:`FILESOVERRIDES` variable is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2813 | |
| 2814 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
| 2815 | |
| 2816 | .. note:: |
| 2817 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2818 | Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2819 | with expected overrides and are used in an expected manner by the |
| 2820 | build system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2821 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2822 | :term:`FILESPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2823 | The default set of directories the OpenEmbedded build system uses |
| 2824 | when searching for patches and files. |
| 2825 | |
| 2826 | During the build process, BitBake searches each directory in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2827 | :term:`FILESPATH` in the specified order when looking for files and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2828 | patches specified by each ``file://`` URI in a recipe's |
| 2829 | :term:`SRC_URI` statements. |
| 2830 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2831 | The default value for the :term:`FILESPATH` variable is defined in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2832 | :ref:`ref-classes-base` class found in ``meta/classes-global`` in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2833 | :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2834 | |
| 2835 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ |
| 2836 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" |
| 2837 | |
| 2838 | The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2839 | :term:`FILESPATH` variable is automatically extended using the overrides |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2840 | from the :term:`FILESOVERRIDES` variable. |
| 2841 | |
| 2842 | .. note:: |
| 2843 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2844 | - Do not hand-edit the :term:`FILESPATH` variable. If you want the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2845 | build system to look in directories other than the defaults, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2846 | extend the :term:`FILESPATH` variable by using the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2847 | :term:`FILESEXTRAPATHS` variable. |
| 2848 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2849 | - Be aware that the default :term:`FILESPATH` directories do not map |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2850 | to directories in custom layers where append files |
| 2851 | (``.bbappend``) are used. If you want the build system to find |
| 2852 | patches or files that reside with your append files, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2853 | to extend the :term:`FILESPATH` variable by using the |
| 2854 | :term:`FILESEXTRAPATHS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2855 | |
| 2856 | You can take advantage of this searching behavior in useful ways. For |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 2857 | example, consider a case where there is the following directory structure |
| 2858 | for general and machine-specific configurations:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2859 | |
| 2860 | files/defconfig |
| 2861 | files/MACHINEA/defconfig |
| 2862 | files/MACHINEB/defconfig |
| 2863 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2864 | Also in the example, the :term:`SRC_URI` statement contains |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2865 | "file://defconfig". Given this scenario, you can set |
| 2866 | :term:`MACHINE` to "MACHINEA" and cause the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2867 | system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2868 | "MACHINEB" and the build system uses files from ``files/MACHINEB``. |
| 2869 | Finally, for any machine other than "MACHINEA" and "MACHINEB", the |
| 2870 | build system uses files from ``files/defconfig``. |
| 2871 | |
| 2872 | You can find out more about the patching process in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2873 | ":ref:`overview-manual/concepts:patching`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2874 | in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2875 | ":ref:`dev-manual/new-recipe:patching code`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2876 | the Yocto Project Development Tasks Manual. See the |
| 2877 | :ref:`ref-tasks-patch` task as well. |
| 2878 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2879 | :term:`FILESYSTEM_PERMS_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2880 | Allows you to define your own file permissions settings table as part |
| 2881 | of your configuration for the packaging process. For example, suppose |
| 2882 | you need a consistent set of custom permissions for a set of groups |
| 2883 | and users across an entire work project. It is best to do this in the |
| 2884 | packages themselves but this is not always possible. |
| 2885 | |
| 2886 | By default, the OpenEmbedded build system uses the ``fs-perms.txt``, |
| 2887 | which is located in the ``meta/files`` folder in the :term:`Source Directory`. |
| 2888 | If you create your own file |
| 2889 | permissions setting table, you should place it in your layer or the |
| 2890 | distro's layer. |
| 2891 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2892 | You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2893 | ``conf/local.conf`` file, which is found in the :term:`Build Directory`, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2894 | to point to your custom ``fs-perms.txt``. You can specify more than a |
| 2895 | single file permissions setting table. The paths you specify to these |
| 2896 | files must be defined within the :term:`BBPATH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2897 | |
| 2898 | For guidance on how to create your own file permissions settings |
| 2899 | table file, examine the existing ``fs-perms.txt``. |
| 2900 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 2901 | :term:`FIT_CONF_DEFAULT_DTB` |
| 2902 | Specifies the default device tree binary (dtb) file for a fitImage when |
| 2903 | multiple are provided. |
| 2904 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2905 | :term:`FIT_DESC` |
| 2906 | Specifies the description string encoded into a fitImage. The default |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2907 | value is set by the :ref:`ref-classes-kernel-fitimage` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2908 | class as follows:: |
| 2909 | |
| 2910 | FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" |
| 2911 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2912 | :term:`FIT_GENERATE_KEYS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2913 | Decides whether to generate the keys for signing fitImage if they |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2914 | don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2915 | The default value is 0. |
| 2916 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2917 | :term:`FIT_HASH_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2918 | Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256. |
| 2919 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2920 | :term:`FIT_KERNEL_COMP_ALG` |
| 2921 | Compression algorithm to use for the kernel image inside the FIT Image. |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 2922 | At present, the only supported values are "gzip" (default), "lzo" or "none". |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2923 | If you set this variable to anything other than "none" you may also need |
| 2924 | to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. |
| 2925 | |
| 2926 | :term:`FIT_KERNEL_COMP_ALG_EXTENSION` |
| 2927 | File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 2928 | value is ".gz". If you set :term:`FIT_KERNEL_COMP_ALG` to "lzo", |
| 2929 | you may want to set this variable to ".lzo". |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2930 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2931 | :term:`FIT_KEY_GENRSA_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2932 | Arguments to openssl genrsa for generating RSA private key for signing |
| 2933 | fitImage. The default value is "-F4". i.e. the public exponent 65537 to |
| 2934 | use. |
| 2935 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2936 | :term:`FIT_KEY_REQ_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2937 | Arguments to openssl req for generating certificate for signing fitImage. |
| 2938 | The default value is "-batch -new". batch for non interactive mode |
| 2939 | and new for generating new keys. |
| 2940 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2941 | :term:`FIT_KEY_SIGN_PKCS` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2942 | Format for public key certificate used in signing fitImage. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2943 | The default value is "x509". |
| 2944 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2945 | :term:`FIT_SIGN_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2946 | Specifies the signature algorithm used in creating the FIT Image. |
| 2947 | For e.g. rsa2048. |
| 2948 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2949 | :term:`FIT_PAD_ALG` |
| 2950 | Specifies the padding algorithm used in creating the FIT Image. |
| 2951 | The default value is "pkcs-1.5". |
| 2952 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2953 | :term:`FIT_SIGN_INDIVIDUAL` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2954 | If set to "1", then the :ref:`ref-classes-kernel-fitimage` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2955 | class will sign the kernel, dtb and ramdisk images individually in addition |
| 2956 | to signing the fitImage itself. This could be useful if you are |
| 2957 | intending to verify signatures in another context than booting via |
| 2958 | U-Boot. |
| 2959 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2960 | :term:`FIT_SIGN_NUMBITS` |
| 2961 | Size of private key in number of bits used in fitImage. The default |
| 2962 | value is "2048". |
| 2963 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2964 | :term:`FONT_EXTRA_RDEPENDS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2965 | When inheriting the :ref:`ref-classes-fontcache` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2966 | this variable specifies the runtime dependencies for font packages. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 2967 | By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2968 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2969 | :term:`FONT_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2970 | When inheriting the :ref:`ref-classes-fontcache` class, this variable |
| 2971 | identifies packages containing font files that need to be cached by |
| 2972 | Fontconfig. By default, the :ref:`ref-classes-fontcache` class assumes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2973 | that fonts are in the recipe's main package (i.e. |
| 2974 | ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you |
| 2975 | need are in a package other than that main package. |
| 2976 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2977 | :term:`FORCE_RO_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2978 | Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` |
| 2979 | during the generation of the root filesystem. |
| 2980 | |
| 2981 | Set the variable to "1" to force the removal of these packages. |
| 2982 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2983 | :term:`FULL_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 2984 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2985 | compiling an optimized system. This variable defaults to "-O2 -pipe |
| 2986 | ${DEBUG_FLAGS}". |
| 2987 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2988 | :term:`GCCPIE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2989 | Enables Position Independent Executables (PIE) within the GNU C |
| 2990 | Compiler (GCC). Enabling PIE in the GCC makes Return Oriented |
| 2991 | Programming (ROP) attacks much more difficult to execute. |
| 2992 | |
| 2993 | By default the ``security_flags.inc`` file enables PIE by setting the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2994 | variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2995 | |
| 2996 | GCCPIE ?= "--enable-default-pie" |
| 2997 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2998 | :term:`GCCVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2999 | Specifies the default version of the GNU C Compiler (GCC) used for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3000 | compilation. By default, :term:`GCCVERSION` is set to "8.x" in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3001 | ``meta/conf/distro/include/tcmode-default.inc`` include file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3002 | |
| 3003 | GCCVERSION ?= "8.%" |
| 3004 | |
| 3005 | You can override this value by setting it in a |
| 3006 | configuration file such as the ``local.conf``. |
| 3007 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3008 | :term:`GDB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3009 | The minimal command and arguments to run the GNU Debugger. |
| 3010 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3011 | :term:`GIR_EXTRA_LIBS_PATH` |
| 3012 | Allows to specify an extra search path for ``.so`` files |
| 3013 | in GLib related recipes using GObject introspection, |
| 3014 | and which do not compile without this setting. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3015 | See the ":ref:`dev-manual/gobject-introspection:enabling gobject introspection support`" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3016 | section for details. |
| 3017 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3018 | :term:`GITDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3019 | The directory in which a local copy of a Git repository is stored |
| 3020 | when it is cloned. |
| 3021 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3022 | :term:`GITHUB_BASE_URI` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3023 | When inheriting the :ref:`ref-classes-github-releases` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3024 | class, specifies the base URL for fetching releases for the github |
| 3025 | project you wish to fetch sources from. The default value is as follows:: |
| 3026 | |
| 3027 | GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/" |
| 3028 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3029 | :term:`GLIBC_GENERATE_LOCALES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3030 | Specifies the list of GLIBC locales to generate should you not wish |
| 3031 | to generate all LIBC locals, which can be time consuming. |
| 3032 | |
| 3033 | .. note:: |
| 3034 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3035 | If you specifically remove the locale ``en_US.UTF-8``, you must set |
| 3036 | :term:`IMAGE_LINGUAS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3037 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3038 | You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3039 | By default, all locales are generated:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3040 | |
| 3041 | GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" |
| 3042 | |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 3043 | :term:`GO_IMPORT` |
| 3044 | When inheriting the :ref:`ref-classes-go` class, this mandatory variable |
| 3045 | sets the import path for the Go package that will be created for the code |
| 3046 | to build. If you have a ``go.mod`` file in the source directory, this |
| 3047 | typically matches the path in the ``module`` line in this file. |
| 3048 | |
| 3049 | Other Go programs importing this package will use this path. |
| 3050 | |
| 3051 | Here is an example setting from the |
| 3052 | :yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>` |
| 3053 | recipe:: |
| 3054 | |
| 3055 | GO_IMPORT = "golang.org/x/example" |
| 3056 | |
| 3057 | :term:`GO_INSTALL` |
| 3058 | When inheriting the :ref:`ref-classes-go` class, this optional variable |
| 3059 | specifies which packages in the sources should be compiled and |
| 3060 | installed in the Go build space by the |
| 3061 | `go install <https://go.dev/ref/mod#go-install>`__ command. |
| 3062 | |
| 3063 | Here is an example setting from the |
| 3064 | :oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>` |
| 3065 | recipe:: |
| 3066 | |
| 3067 | GO_INSTALL = "\ |
| 3068 | ${GO_IMPORT}/cmd/crucible \ |
| 3069 | ${GO_IMPORT}/cmd/habtool \ |
| 3070 | " |
| 3071 | |
| 3072 | By default, :term:`GO_INSTALL` is defined as:: |
| 3073 | |
| 3074 | GO_INSTALL ?= "${GO_IMPORT}/..." |
| 3075 | |
| 3076 | The ``...`` wildcard means that it will catch all |
| 3077 | packages found in the sources. |
| 3078 | |
| 3079 | See the :term:`GO_INSTALL_FILTEROUT` variable for |
| 3080 | filtering out unwanted packages from the ones |
| 3081 | found from the :term:`GO_INSTALL` value. |
| 3082 | |
| 3083 | :term:`GO_INSTALL_FILTEROUT` |
| 3084 | When using the Go "vendor" mechanism to bring in dependencies for a Go |
| 3085 | package, the default :term:`GO_INSTALL` setting, which uses the ``...`` |
| 3086 | wildcard, will include the vendored packages in the build, which produces |
| 3087 | incorrect results. |
| 3088 | |
| 3089 | There are also some Go packages that are structured poorly, so that the |
| 3090 | ``...`` wildcard results in building example or test code that should not |
| 3091 | be included in the build, or could fail to build. |
| 3092 | |
| 3093 | This optional variable allows for filtering out a subset of the sources. |
| 3094 | It defaults to excluding everything under the ``vendor`` subdirectory |
| 3095 | under package's main directory. This is the normal location for vendored |
| 3096 | packages, but it can be overridden by a recipe to filter out other |
| 3097 | subdirectories if needed. |
| 3098 | |
| 3099 | :term:`GO_WORKDIR` |
| 3100 | When using Go Modules, the current working directory must be the directory |
| 3101 | containing the ``go.mod`` file, or one of its subdirectories. When the |
| 3102 | ``go`` tool is used, it will automatically look for the ``go.mod`` file |
| 3103 | in the Go working directory or in any parent directory, but not in |
| 3104 | subdirectories. |
| 3105 | |
| 3106 | When using the :ref:`ref-classes-go-mod` class to use Go modules, |
| 3107 | the optional :term:`GO_WORKDIR` variable, defaulting to the value |
| 3108 | of :term:`GO_IMPORT`, allows to specify a different Go working directory. |
| 3109 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3110 | :term:`GROUPADD_PARAM` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3111 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3112 | this variable specifies for a package what parameters should be |
| 3113 | passed to the ``groupadd`` command if you wish to add a group to the |
| 3114 | system when the package is installed. |
| 3115 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3116 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3117 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3118 | GROUPADD_PARAM:${PN} = "-r netdev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3119 | |
| 3120 | For information on the standard Linux shell command |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3121 | ``groupadd``, see https://linux.die.net/man/8/groupadd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3122 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3123 | :term:`GROUPMEMS_PARAM` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3124 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3125 | this variable specifies for a package what parameters should be |
| 3126 | passed to the ``groupmems`` command if you wish to modify the members |
| 3127 | of a group when the package is installed. |
| 3128 | |
| 3129 | For information on the standard Linux shell command ``groupmems``, |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3130 | see https://linux.die.net/man/8/groupmems. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3131 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3132 | :term:`GRUB_GFXSERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3133 | Configures the GNU GRand Unified Bootloader (GRUB) to have graphics |
| 3134 | and serial in the boot menu. Set this variable to "1" in your |
| 3135 | ``local.conf`` or distribution configuration file to enable graphics |
| 3136 | and serial in the menu. |
| 3137 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3138 | See the :ref:`ref-classes-grub-efi` class for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3139 | information on how this variable is used. |
| 3140 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3141 | :term:`GRUB_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3142 | Additional options to add to the GNU GRand Unified Bootloader (GRUB) |
| 3143 | configuration. Use a semi-colon character (``;``) to separate |
| 3144 | multiple options. |
| 3145 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3146 | The :term:`GRUB_OPTS` variable is optional. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3147 | :ref:`ref-classes-grub-efi` class for more information |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3148 | on how this variable is used. |
| 3149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3150 | :term:`GRUB_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3151 | Specifies the timeout before executing the default ``LABEL`` in the |
| 3152 | GNU GRand Unified Bootloader (GRUB). |
| 3153 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3154 | The :term:`GRUB_TIMEOUT` variable is optional. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3155 | :ref:`ref-classes-grub-efi` class for more information |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3156 | on how this variable is used. |
| 3157 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3158 | :term:`GTKIMMODULES_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3159 | When inheriting the :ref:`ref-classes-gtk-immodules-cache` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3160 | this variable specifies the packages that contain the GTK+ input |
| 3161 | method modules being installed when the modules are in packages other |
| 3162 | than the main package. |
| 3163 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3164 | :term:`HGDIR` |
| 3165 | See :term:`bitbake:HGDIR` in the BitBake manual. |
| 3166 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3167 | :term:`HOMEPAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3168 | Website where more information about the software the recipe is |
| 3169 | building can be found. |
| 3170 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3171 | :term:`HOST_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3172 | The name of the target architecture, which is normally the same as |
| 3173 | :term:`TARGET_ARCH`. The OpenEmbedded build system |
| 3174 | supports many architectures. Here is an example list of architectures |
| 3175 | supported. This list is by no means complete as the architecture is |
| 3176 | configurable: |
| 3177 | |
| 3178 | - arm |
| 3179 | - i586 |
| 3180 | - x86_64 |
| 3181 | - powerpc |
| 3182 | - powerpc64 |
| 3183 | - mips |
| 3184 | - mipsel |
| 3185 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3186 | :term:`HOST_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3187 | Specifies architecture-specific compiler flags that are passed to the |
| 3188 | C compiler. |
| 3189 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3190 | Default initialization for :term:`HOST_CC_ARCH` varies depending on what |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3191 | is being built: |
| 3192 | |
| 3193 | - :term:`TARGET_CC_ARCH` when building for the |
| 3194 | target |
| 3195 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3196 | - :term:`BUILD_CC_ARCH` when building for the build host (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3197 | ``-native``) |
| 3198 | |
| 3199 | - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. |
| 3200 | ``nativesdk-``) |
| 3201 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3202 | :term:`HOST_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3203 | Specifies the name of the target operating system, which is normally |
| 3204 | the same as the :term:`TARGET_OS`. The variable can |
| 3205 | be set to "linux" for ``glibc``-based systems and to "linux-musl" for |
| 3206 | ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and |
| 3207 | "linux-musleabi" values possible. |
| 3208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3209 | :term:`HOST_PREFIX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3210 | Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3211 | is normally the same as :term:`TARGET_PREFIX`. |
| 3212 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3213 | :term:`HOST_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3214 | Specifies the system, including the architecture and the operating |
| 3215 | system, for which the build is occurring in the context of the |
| 3216 | current recipe. |
| 3217 | |
| 3218 | The OpenEmbedded build system automatically sets this variable based |
| 3219 | on :term:`HOST_ARCH`, |
| 3220 | :term:`HOST_VENDOR`, and |
| 3221 | :term:`HOST_OS` variables. |
| 3222 | |
| 3223 | .. note:: |
| 3224 | |
| 3225 | You do not need to set the variable yourself. |
| 3226 | |
| 3227 | Consider these two examples: |
| 3228 | |
| 3229 | - Given a native recipe on a 32-bit x86 machine running Linux, the |
| 3230 | value is "i686-linux". |
| 3231 | |
| 3232 | - Given a recipe being built for a little-endian MIPS target running |
| 3233 | Linux, the value might be "mipsel-linux". |
| 3234 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3235 | :term:`HOST_VENDOR` |
| 3236 | Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the |
| 3237 | same as :term:`TARGET_VENDOR`. |
| 3238 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3239 | :term:`HOSTTOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3240 | A space-separated list (filter) of tools on the build host that |
| 3241 | should be allowed to be called from within build tasks. Using this |
| 3242 | filter helps reduce the possibility of host contamination. If a tool |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3243 | specified in the value of :term:`HOSTTOOLS` is not found on the build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3244 | host, the OpenEmbedded build system produces an error and the build |
| 3245 | is not started. |
| 3246 | |
| 3247 | For additional information, see |
| 3248 | :term:`HOSTTOOLS_NONFATAL`. |
| 3249 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3250 | :term:`HOSTTOOLS_NONFATAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3251 | A space-separated list (filter) of tools on the build host that |
| 3252 | should be allowed to be called from within build tasks. Using this |
| 3253 | filter helps reduce the possibility of host contamination. Unlike |
| 3254 | :term:`HOSTTOOLS`, the OpenEmbedded build system |
| 3255 | does not produce an error if a tool specified in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3256 | :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can |
| 3257 | use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3258 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3259 | :term:`ICECC_CLASS_DISABLE` |
| 3260 | Identifies user classes that you do not want the Icecream distributed |
| 3261 | compile support to consider. This variable is used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3262 | :ref:`ref-classes-icecc` class. You set this variable in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3263 | your ``local.conf`` file. |
| 3264 | |
| 3265 | When you list classes using this variable, the recipes inheriting |
| 3266 | those classes will not benefit from distributed compilation across |
| 3267 | remote hosts. Instead they will be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3268 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3269 | :term:`ICECC_DISABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3270 | Disables or enables the ``icecc`` (Icecream) function. For more |
| 3271 | information on this function and best practices for using this |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3272 | variable, see the ":ref:`ref-classes-icecc`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3273 | section. |
| 3274 | |
| 3275 | Setting this variable to "1" in your ``local.conf`` disables the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3276 | function:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3277 | |
| 3278 | ICECC_DISABLED ??= "1" |
| 3279 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3280 | To enable the function, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3281 | |
| 3282 | ICECC_DISABLED = "" |
| 3283 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3284 | :term:`ICECC_ENV_EXEC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3285 | Points to the ``icecc-create-env`` script that you provide. This |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3286 | variable is used by the :ref:`ref-classes-icecc` class. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3287 | set this variable in your ``local.conf`` file. |
| 3288 | |
| 3289 | If you do not point to a script that you provide, the OpenEmbedded |
| 3290 | build system uses the default script provided by the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 3291 | :oe_git:`icecc-create-env_0.1.bb |
| 3292 | </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>` |
| 3293 | recipe, which is a modified version and not the one that comes with |
| 3294 | ``icecream``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3295 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3296 | :term:`ICECC_PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3297 | Extra options passed to the ``make`` command during the |
| 3298 | :ref:`ref-tasks-compile` task that specify parallel |
| 3299 | compilation. This variable usually takes the form of "-j x", where x |
| 3300 | represents the maximum number of parallel threads ``make`` can run. |
| 3301 | |
| 3302 | .. note:: |
| 3303 | |
| 3304 | The options passed affect builds on all enabled machines on the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3305 | network, which are machines running the ``iceccd`` daemon. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3306 | |
| 3307 | If your enabled machines support multiple cores, coming up with the |
| 3308 | maximum number of parallel threads that gives you the best |
| 3309 | performance could take some experimentation since machine speed, |
| 3310 | network lag, available memory, and existing machine loads can all |
| 3311 | affect build time. Consequently, unlike the |
| 3312 | :term:`PARALLEL_MAKE` variable, there is no |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3313 | rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3314 | performance. |
| 3315 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3316 | If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3317 | use it (i.e. the system does not detect and assign the number of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3318 | cores as is done with :term:`PARALLEL_MAKE`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3319 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3320 | :term:`ICECC_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3321 | The location of the ``icecc`` binary. You can set this variable in |
| 3322 | your ``local.conf`` file. If your ``local.conf`` file does not define |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3323 | this variable, the :ref:`ref-classes-icecc` class attempts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3324 | to define it by locating ``icecc`` using ``which``. |
| 3325 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3326 | :term:`ICECC_RECIPE_DISABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3327 | Identifies user recipes that you do not want the Icecream distributed |
| 3328 | compile support to consider. This variable is used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3329 | :ref:`ref-classes-icecc` class. You set this variable in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3330 | your ``local.conf`` file. |
| 3331 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3332 | When you list recipes using this variable, you are excluding them |
| 3333 | from distributed compilation across remote hosts. Instead they will |
| 3334 | be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3335 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3336 | :term:`ICECC_RECIPE_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3337 | Identifies user recipes that use an empty |
| 3338 | :term:`PARALLEL_MAKE` variable that you want to |
| 3339 | force remote distributed compilation on using the Icecream |
| 3340 | distributed compile support. This variable is used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3341 | :ref:`ref-classes-icecc` class. You set this variable in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3342 | your ``local.conf`` file. |
| 3343 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3344 | :term:`IMAGE_BASENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3345 | The base name of image output files. This variable defaults to the |
| 3346 | recipe name (``${``\ :term:`PN`\ ``}``). |
| 3347 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3348 | :term:`IMAGE_BOOT_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3349 | A space-separated list of files installed into the boot partition |
| 3350 | when preparing an image using the Wic tool with the |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3351 | ``bootimg-partition`` source plugin. By default, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3352 | the files are |
| 3353 | installed under the same name as the source files. To change the |
| 3354 | installed name, separate it from the original name with a semi-colon |
| 3355 | (;). Source files need to be located in |
| 3356 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3357 | examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3358 | |
| 3359 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" |
| 3360 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" |
| 3361 | |
| 3362 | Alternatively, source files can be picked up using a glob pattern. In |
| 3363 | this case, the destination file must have the same name as the base |
| 3364 | name of the source file path. To install files into a directory |
| 3365 | within the target location, pass its name after a semi-colon (;). |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3366 | Here are two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3367 | |
| 3368 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" |
| 3369 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" |
| 3370 | |
| 3371 | The first example |
| 3372 | installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` |
| 3373 | into the root of the target partition. The second example installs |
| 3374 | the same files into a ``boot`` directory within the target partition. |
| 3375 | |
| 3376 | You can find information on how to use the Wic tool in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3377 | ":ref:`dev-manual/wic:creating partitioned images using wic`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3378 | section of the Yocto Project Development Tasks Manual. Reference |
| 3379 | material for Wic is located in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3380 | ":doc:`/ref-manual/kickstart`" chapter. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3381 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3382 | :term:`IMAGE_BUILDINFO_FILE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3383 | When using the :ref:`ref-classes-image-buildinfo` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3384 | specifies the file in the image to write the build information into. The |
| 3385 | default value is "``${sysconfdir}/buildinfo``". |
| 3386 | |
| 3387 | :term:`IMAGE_BUILDINFO_VARS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3388 | When using the :ref:`ref-classes-image-buildinfo` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3389 | specifies the list of variables to include in the `Build Configuration` |
| 3390 | section of the output file (as a space-separated list). Defaults to |
| 3391 | ":term:`DISTRO` :term:`DISTRO_VERSION`". |
| 3392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3393 | :term:`IMAGE_CLASSES` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3394 | A list of classes that all images should inherit. This is typically used |
| 3395 | to enable functionality across all image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3396 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3397 | Classes specified in :term:`IMAGE_CLASSES` must be located in the |
| 3398 | ``classes-recipe/`` or ``classes/`` subdirectories. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3399 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3400 | :term:`IMAGE_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3401 | Specifies the command to create the image file for a specific image |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3402 | type, which corresponds to the value set in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3403 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, |
| 3404 | ``btrfs``, and so forth). When setting this variable, you should use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3405 | an override for the associated type. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3406 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3407 | IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3408 | --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3409 | ${EXTRA_IMAGECMD}" |
| 3410 | |
| 3411 | You typically do not need to set this variable unless you are adding |
| 3412 | support for a new image type. For more examples on how to set this |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3413 | variable, see the :ref:`ref-classes-image_types` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3414 | class file, which is ``meta/classes-recipe/image_types.bbclass``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3415 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3416 | :term:`IMAGE_DEVICE_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3417 | Specifies one or more files that contain custom device tables that |
| 3418 | are passed to the ``makedevs`` command as part of creating an image. |
| 3419 | These files list basic device nodes that should be created under |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3420 | ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3421 | ``files/device_table-minimal.txt`` is used, which is located by |
| 3422 | :term:`BBPATH`. For details on how you should write |
| 3423 | device table files, see ``meta/files/device_table-minimal.txt`` as an |
| 3424 | example. |
| 3425 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3426 | :term:`IMAGE_EFI_BOOT_FILES` |
| 3427 | A space-separated list of files installed into the boot partition |
| 3428 | when preparing an image using the Wic tool with the |
| 3429 | ``bootimg-efi`` source plugin. By default, |
| 3430 | the files are |
| 3431 | installed under the same name as the source files. To change the |
| 3432 | installed name, separate it from the original name with a semi-colon |
| 3433 | (;). Source files need to be located in |
| 3434 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
| 3435 | examples:: |
| 3436 | |
| 3437 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" |
| 3438 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" |
| 3439 | |
| 3440 | Alternatively, source files can be picked up using a glob pattern. In |
| 3441 | this case, the destination file must have the same name as the base |
| 3442 | name of the source file path. To install files into a directory |
| 3443 | within the target location, pass its name after a semi-colon (;). |
| 3444 | Here are two examples:: |
| 3445 | |
| 3446 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" |
| 3447 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" |
| 3448 | |
| 3449 | The first example |
| 3450 | installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` |
| 3451 | into the root of the target partition. The second example installs |
| 3452 | the same files into a ``boot`` directory within the target partition. |
| 3453 | |
| 3454 | You can find information on how to use the Wic tool in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3455 | ":ref:`dev-manual/wic:creating partitioned images using wic`" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3456 | section of the Yocto Project Development Tasks Manual. Reference |
| 3457 | material for Wic is located in the |
| 3458 | ":doc:`/ref-manual/kickstart`" chapter. |
| 3459 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3460 | :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3461 | The primary list of features to include in an image. Typically, you |
| 3462 | configure this variable in an image recipe. Although you can use this |
| 3463 | variable from your ``local.conf`` file, which is found in the |
| 3464 | :term:`Build Directory`, best practices dictate that you do |
| 3465 | not. |
| 3466 | |
| 3467 | .. note:: |
| 3468 | |
| 3469 | To enable extra features from outside the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3470 | :term:`EXTRA_IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3471 | |
| 3472 | For a list of image features that ships with the Yocto Project, see |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3473 | the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3474 | |
| 3475 | For an example that shows how to customize your image by using this |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3476 | variable, see the ":ref:`dev-manual/customizing-images:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3477 | section in the Yocto Project Development Tasks Manual. |
| 3478 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3479 | :term:`IMAGE_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3480 | Specifies the formats the OpenEmbedded build system uses during the |
| 3481 | build when creating the root filesystem. For example, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3482 | :term:`IMAGE_FSTYPES` as follows causes the build system to create root |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3483 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3484 | |
| 3485 | IMAGE_FSTYPES = "ext3 tar.bz2" |
| 3486 | |
| 3487 | For the complete list of supported image formats from which you can |
| 3488 | choose, see :term:`IMAGE_TYPES`. |
| 3489 | |
| 3490 | .. note:: |
| 3491 | |
| 3492 | - If an image recipe uses the "inherit image" line and you are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3493 | setting :term:`IMAGE_FSTYPES` inside the recipe, you must set |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3494 | :term:`IMAGE_FSTYPES` prior to using the "inherit image" line. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3495 | |
| 3496 | - Due to the way the OpenEmbedded build system processes this |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3497 | variable, you cannot update its contents by using ``:append`` |
| 3498 | or ``:prepend``. You must use the ``+=`` operator to add one or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3499 | more options to the :term:`IMAGE_FSTYPES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3500 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3501 | :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3502 | Used by recipes to specify the packages to install into an image |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3503 | through the :ref:`ref-classes-image` class. Use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3504 | :term:`IMAGE_INSTALL` variable with care to avoid ordering issues. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3505 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3506 | Image recipes set :term:`IMAGE_INSTALL` to specify the packages to |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3507 | install into an image through :ref:`ref-classes-image`. Additionally, |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3508 | there are "helper" classes such as the :ref:`ref-classes-core-image` |
| 3509 | class which can take lists used with :term:`IMAGE_FEATURES` and turn |
| 3510 | them into auto-generated entries in :term:`IMAGE_INSTALL` in addition |
| 3511 | to its default contents. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3512 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3513 | When you use this variable, it is best to use it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3514 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3515 | IMAGE_INSTALL:append = " package-name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3516 | |
| 3517 | Be sure to include the space |
| 3518 | between the quotation character and the start of the package name or |
| 3519 | names. |
| 3520 | |
| 3521 | .. note:: |
| 3522 | |
| 3523 | - When working with a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3524 | :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3525 | image, do not use the :term:`IMAGE_INSTALL` variable to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3526 | packages for installation. Instead, use the |
| 3527 | :term:`PACKAGE_INSTALL` variable, which |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3528 | allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3529 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3530 | For information on creating an :term:`Initramfs`, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3531 | ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3532 | section in the Yocto Project Development Tasks Manual. |
| 3533 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3534 | - Using :term:`IMAGE_INSTALL` with the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3535 | :ref:`+= <bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3536 | BitBake operator within the ``/conf/local.conf`` file or from |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3537 | within an image recipe is not recommended. Use of this operator in |
| 3538 | these ways can cause ordering issues. Since |
| 3539 | :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a |
| 3540 | default value using the |
| 3541 | :ref:`?= <bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3542 | operator, using a ``+=`` operation against :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3543 | results in unexpected behavior when used within |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3544 | ``conf/local.conf``. Furthermore, the same operation from within an |
| 3545 | image recipe may or may not succeed depending on the specific |
| 3546 | situation. In both these cases, the behavior is contrary to how |
| 3547 | most users expect the ``+=`` operator to work. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3548 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3549 | :term:`IMAGE_LINGUAS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3550 | Specifies the list of locales to install into the image during the |
| 3551 | root filesystem construction process. The OpenEmbedded build system |
| 3552 | automatically splits locale files, which are used for localization, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3553 | into separate packages. Setting the :term:`IMAGE_LINGUAS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3554 | ensures that any locale packages that correspond to packages already |
| 3555 | selected for installation into the image are also installed. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3556 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3557 | |
| 3558 | IMAGE_LINGUAS = "pt-br de-de" |
| 3559 | |
| 3560 | In this example, the build system ensures any Brazilian Portuguese |
| 3561 | and German locale files that correspond to packages in the image are |
| 3562 | installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as |
| 3563 | ``*-locale-pt`` and ``*-locale-de``, since some software packages |
| 3564 | only provide locale files by language and not by country-specific |
| 3565 | language). |
| 3566 | |
| 3567 | See the :term:`GLIBC_GENERATE_LOCALES` |
| 3568 | variable for information on generating GLIBC locales. |
| 3569 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3570 | |
| 3571 | :term:`IMAGE_LINK_NAME` |
| 3572 | The name of the output image symlink (which does not include |
| 3573 | the version part as :term:`IMAGE_NAME` does). The default value |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3574 | is derived using the :term:`IMAGE_BASENAME` and |
| 3575 | :term:`IMAGE_MACHINE_SUFFIX` variables:: |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3576 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3577 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3578 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3579 | .. note:: |
| 3580 | |
| 3581 | It is possible to set this to "" to disable symlink creation, |
| 3582 | however, you also need to set :term:`IMAGE_NAME` to still have |
| 3583 | a reasonable value e.g.:: |
| 3584 | |
| 3585 | IMAGE_LINK_NAME = "" |
| 3586 | IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" |
| 3587 | |
| 3588 | :term:`IMAGE_MACHINE_SUFFIX` |
| 3589 | Specifies the by default machine-specific suffix for image file names |
| 3590 | (before the extension). The default value is set as follows:: |
| 3591 | |
| 3592 | IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}" |
| 3593 | |
| 3594 | The default :term:`DEPLOY_DIR_IMAGE` already has a :term:`MACHINE` |
| 3595 | subdirectory, so you may find it unnecessary to also include this suffix |
| 3596 | in the name of every image file. If you prefer to remove the suffix you |
| 3597 | can set this variable to an empty string:: |
| 3598 | |
| 3599 | IMAGE_MACHINE_SUFFIX = "" |
| 3600 | |
| 3601 | (Not to be confused with :term:`IMAGE_NAME_SUFFIX`.) |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3603 | :term:`IMAGE_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3604 | The manifest file for the image. This file lists all the installed |
| 3605 | packages that make up the image. The file contains package |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3606 | information on a line-per-package basis as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3607 | |
| 3608 | packagename packagearch version |
| 3609 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3610 | The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3611 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3612 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3613 | IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3614 | |
| 3615 | The location is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3616 | derived using the :term:`IMGDEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3617 | and :term:`IMAGE_NAME` variables. You can find |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3618 | information on how the image is created in the ":ref:`overview-manual/concepts:image generation`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3619 | section in the Yocto Project Overview and Concepts Manual. |
| 3620 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3621 | :term:`IMAGE_NAME` |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3622 | The name of the output image files minus the extension. By default |
| 3623 | this variable is set using the :term:`IMAGE_LINK_NAME`, and |
| 3624 | :term:`IMAGE_VERSION_SUFFIX` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3625 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3626 | IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3627 | |
| 3628 | :term:`IMAGE_NAME_SUFFIX` |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3629 | Suffix used for the image output filename --- defaults to ``".rootfs"`` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3630 | to distinguish the image file from other files created during image |
| 3631 | building; however if this suffix is redundant or not desired you can |
| 3632 | clear the value of this variable (set the value to ""). For example, |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3633 | this is typically cleared in :term:`Initramfs` image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3634 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3635 | :term:`IMAGE_OVERHEAD_FACTOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3636 | Defines a multiplier that the build system applies to the initial |
| 3637 | image size for cases when the multiplier times the returned disk |
| 3638 | usage value for the image is greater than the sum of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3639 | :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3640 | the multiplier applied to the initial image size creates free disk |
| 3641 | space in the image as overhead. By default, the build process uses a |
| 3642 | multiplier of 1.3 for this variable. This default value results in |
| 3643 | 30% free disk space added to the image when this method is used to |
| 3644 | determine the final generated image size. You should be aware that |
| 3645 | post install scripts and the package management system uses disk |
| 3646 | space inside this overhead area. Consequently, the multiplier does |
| 3647 | not produce an image with all the theoretical free disk space. See |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3648 | :term:`IMAGE_ROOTFS_SIZE` for information on how the build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3649 | determines the overall image size. |
| 3650 | |
| 3651 | The default 30% free disk space typically gives the image enough room |
| 3652 | to boot and allows for basic post installs while still leaving a |
| 3653 | small amount of free disk space. If 30% free space is inadequate, you |
| 3654 | can increase the default value. For example, the following setting |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3655 | gives you 50% free space added to the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3656 | |
| 3657 | IMAGE_OVERHEAD_FACTOR = "1.5" |
| 3658 | |
| 3659 | Alternatively, you can ensure a specific amount of free disk space is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3660 | added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3661 | variable. |
| 3662 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3663 | :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3664 | Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the |
| 3665 | OpenEmbedded build system. The variable is defined appropriately by |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3666 | the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`, |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3667 | or :ref:`ref-classes-package_ipk` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3668 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3669 | The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image` |
| 3670 | classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3671 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3672 | You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3673 | variable is set indirectly through the appropriate |
| 3674 | :ref:`package_* <ref-classes-package>` class using the |
| 3675 | :term:`PACKAGE_CLASSES` variable. The |
| 3676 | OpenEmbedded build system uses the first package type (e.g. DEB, RPM, |
| 3677 | or IPK) that appears with the variable |
| 3678 | |
| 3679 | .. note:: |
| 3680 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3681 | Files using the ``.tar`` format are never used as a substitute |
| 3682 | packaging format for DEB, RPM, and IPK formatted files for your image |
| 3683 | or SDK. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3684 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3685 | :term:`IMAGE_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3686 | Specifies a list of functions to call once the OpenEmbedded build |
| 3687 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3688 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3689 | |
| 3690 | IMAGE_POSTPROCESS_COMMAND += "function; ... " |
| 3691 | |
| 3692 | If you need to pass the root filesystem path to a command within the |
| 3693 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3694 | directory that becomes the root filesystem image. See the |
| 3695 | :term:`IMAGE_ROOTFS` variable for more |
| 3696 | information. |
| 3697 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3698 | :term:`IMAGE_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3699 | Specifies a list of functions to call before the OpenEmbedded build |
| 3700 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3701 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3702 | |
| 3703 | IMAGE_PREPROCESS_COMMAND += "function; ... " |
| 3704 | |
| 3705 | If you need to pass the root filesystem path to a command within the |
| 3706 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3707 | directory that becomes the root filesystem image. See the |
| 3708 | :term:`IMAGE_ROOTFS` variable for more |
| 3709 | information. |
| 3710 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3711 | :term:`IMAGE_ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3712 | The location of the root filesystem while it is under construction |
| 3713 | (i.e. during the :ref:`ref-tasks-rootfs` task). This |
| 3714 | variable is not configurable. Do not change it. |
| 3715 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3716 | :term:`IMAGE_ROOTFS_ALIGNMENT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3717 | Specifies the alignment for the output image file in Kbytes. If the |
| 3718 | size of the image is not a multiple of this value, then the size is |
| 3719 | rounded up to the nearest multiple of the value. The default value is |
| 3720 | "1". See :term:`IMAGE_ROOTFS_SIZE` for |
| 3721 | additional information. |
| 3722 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3723 | :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3724 | Defines additional free disk space created in the image in Kbytes. By |
| 3725 | default, this variable is set to "0". This free disk space is added |
| 3726 | to the image after the build system determines the image size as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3727 | described in :term:`IMAGE_ROOTFS_SIZE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3728 | |
| 3729 | This variable is particularly useful when you want to ensure that a |
| 3730 | specific amount of free disk space is available on a device after an |
| 3731 | image is installed and running. For example, to be sure 5 Gbytes of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3732 | free disk space is available, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3733 | |
| 3734 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" |
| 3735 | |
| 3736 | For example, the Yocto Project Build Appliance specifically requests |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3737 | 40 Gbytes of extra space with the line:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3738 | |
| 3739 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" |
| 3740 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3741 | :term:`IMAGE_ROOTFS_SIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3742 | Defines the size in Kbytes for the generated image. The OpenEmbedded |
| 3743 | build system determines the final size for the generated image using |
| 3744 | an algorithm that takes into account the initial disk space used for |
| 3745 | the generated image, a requested size for the image, and requested |
| 3746 | additional free disk space to be added to the image. Programatically, |
| 3747 | the build system determines the final size of the generated image as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3748 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3749 | |
| 3750 | if (image-du * overhead) < rootfs-size: |
| 3751 | internal-rootfs-size = rootfs-size + xspace |
| 3752 | else: |
| 3753 | internal-rootfs-size = (image-du * overhead) + xspace |
| 3754 | where: |
| 3755 | image-du = Returned value of the du command on the image. |
| 3756 | overhead = IMAGE_OVERHEAD_FACTOR |
| 3757 | rootfs-size = IMAGE_ROOTFS_SIZE |
| 3758 | internal-rootfs-size = Initial root filesystem size before any modifications. |
| 3759 | xspace = IMAGE_ROOTFS_EXTRA_SPACE |
| 3760 | |
| 3761 | See the :term:`IMAGE_OVERHEAD_FACTOR` |
| 3762 | and :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
| 3763 | variables for related information. |
| 3764 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3765 | :term:`IMAGE_TYPEDEP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3766 | Specifies a dependency from one image type on another. Here is an |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3767 | example from the :ref:`ref-classes-image-live` class:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3768 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3769 | IMAGE_TYPEDEP:live = "ext3" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3770 | |
| 3771 | In the previous example, the variable ensures that when "live" is |
| 3772 | listed with the :term:`IMAGE_FSTYPES` variable, |
| 3773 | the OpenEmbedded build system produces an ``ext3`` image first since |
| 3774 | one of the components of the live image is an ``ext3`` formatted |
| 3775 | partition containing the root filesystem. |
| 3776 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3777 | :term:`IMAGE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3778 | Specifies the complete list of supported image types by default: |
| 3779 | |
| 3780 | - btrfs |
| 3781 | - container |
| 3782 | - cpio |
| 3783 | - cpio.gz |
| 3784 | - cpio.lz4 |
| 3785 | - cpio.lzma |
| 3786 | - cpio.xz |
| 3787 | - cramfs |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3788 | - erofs |
| 3789 | - erofs-lz4 |
| 3790 | - erofs-lz4hc |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3791 | - ext2 |
| 3792 | - ext2.bz2 |
| 3793 | - ext2.gz |
| 3794 | - ext2.lzma |
| 3795 | - ext3 |
| 3796 | - ext3.gz |
| 3797 | - ext4 |
| 3798 | - ext4.gz |
| 3799 | - f2fs |
| 3800 | - hddimg |
| 3801 | - iso |
| 3802 | - jffs2 |
| 3803 | - jffs2.sum |
| 3804 | - multiubi |
| 3805 | - squashfs |
| 3806 | - squashfs-lz4 |
| 3807 | - squashfs-lzo |
| 3808 | - squashfs-xz |
| 3809 | - tar |
| 3810 | - tar.bz2 |
| 3811 | - tar.gz |
| 3812 | - tar.lz4 |
| 3813 | - tar.xz |
| 3814 | - tar.zst |
| 3815 | - ubi |
| 3816 | - ubifs |
| 3817 | - wic |
| 3818 | - wic.bz2 |
| 3819 | - wic.gz |
| 3820 | - wic.lzma |
| 3821 | |
| 3822 | For more information about these types of images, see |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3823 | ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3824 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3825 | :term:`IMAGE_VERSION_SUFFIX` |
| 3826 | Version suffix that is part of the default :term:`IMAGE_NAME` and |
| 3827 | :term:`KERNEL_ARTIFACT_NAME` values. |
| 3828 | Defaults to ``"-${DATETIME}"``, however you could set this to a |
| 3829 | version string that comes from your external build environment if |
| 3830 | desired, and this suffix would then be used consistently across |
| 3831 | the build artifacts. |
| 3832 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3833 | :term:`IMGDEPLOYDIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3834 | When inheriting the :ref:`ref-classes-image` class directly or |
| 3835 | through the :ref:`ref-classes-core-image` class, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3836 | :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3837 | that is set in the ``image`` class as follows:: |
| 3838 | |
| 3839 | IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" |
| 3840 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3841 | Recipes inheriting the :ref:`ref-classes-image` class should copy |
| 3842 | files to be deployed into :term:`IMGDEPLOYDIR`, and the class will take |
| 3843 | care of copying them into :term:`DEPLOY_DIR_IMAGE` afterwards. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3844 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3845 | :term:`INCOMPATIBLE_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3846 | Specifies a space-separated list of license names (as they would |
| 3847 | appear in :term:`LICENSE`) that should be excluded |
| 3848 | from the build. Recipes that provide no alternatives to listed |
| 3849 | incompatible licenses are not built. Packages that are individually |
| 3850 | licensed with the specified incompatible licenses will be deleted. |
| 3851 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 3852 | There is some support for wildcards in this variable's value, |
| 3853 | however it is restricted to specific licenses. Currently only |
| 3854 | these wildcards are allowed and expand as follows: |
| 3855 | |
| 3856 | - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later`` |
| 3857 | - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later`` |
| 3858 | - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later`` |
| 3859 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3860 | .. note:: |
| 3861 | |
| 3862 | This functionality is only regularly tested using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3863 | setting:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3864 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3865 | INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3866 | |
| 3867 | |
| 3868 | Although you can use other settings, you might be required to |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3869 | remove dependencies on (or provide alternatives to) components that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3870 | are required to produce a functional system image. |
| 3871 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3872 | :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS` |
| 3873 | Specifies a space-separated list of package and license pairs that |
| 3874 | are allowed to be used even if the license is specified in |
| 3875 | :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are |
| 3876 | separated using a colon. Example:: |
| 3877 | |
| 3878 | INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only" |
| 3879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3880 | :term:`INHERIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3881 | Causes the named class or classes to be inherited globally. Anonymous |
| 3882 | functions in the class or classes are not executed for the base |
| 3883 | configuration and in each individual recipe. The OpenEmbedded build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3884 | system ignores changes to :term:`INHERIT` in individual recipes. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3885 | Classes inherited using :term:`INHERIT` must be located in the |
| 3886 | ``classes-global/`` or ``classes/`` subdirectories. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3887 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3888 | For more information on :term:`INHERIT`, see the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3889 | :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 3890 | section in the BitBake User Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3891 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3892 | :term:`INHERIT_DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3893 | Lists classes that will be inherited at the distribution level. It is |
| 3894 | unlikely that you want to edit this variable. |
| 3895 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3896 | Classes specified in :term:`INHERIT_DISTRO` must be located in the |
| 3897 | ``classes-global/`` or ``classes/`` subdirectories. |
| 3898 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3899 | The default value of the variable is set as follows in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3900 | ``meta/conf/distro/defaultsetup.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3901 | |
| 3902 | INHERIT_DISTRO ?= "debian devshell sstate license" |
| 3903 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3904 | :term:`INHIBIT_DEFAULT_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3905 | Prevents the default dependencies, namely the C compiler and standard |
| 3906 | C library (libc), from being added to :term:`DEPENDS`. |
| 3907 | This variable is usually used within recipes that do not require any |
| 3908 | compilation using the C compiler. |
| 3909 | |
| 3910 | Set the variable to "1" to prevent the default dependencies from |
| 3911 | being added. |
| 3912 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3913 | :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3914 | Prevents the OpenEmbedded build system from splitting out debug |
| 3915 | information during packaging. By default, the build system splits out |
| 3916 | debugging information during the |
| 3917 | :ref:`ref-tasks-package` task. For more information on |
| 3918 | how debug information is split out, see the |
| 3919 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
| 3920 | variable. |
| 3921 | |
| 3922 | To prevent the build system from splitting out debug information |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3923 | during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3924 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3925 | |
| 3926 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
| 3927 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3928 | :term:`INHIBIT_PACKAGE_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3929 | If set to "1", causes the build to not strip binaries in resulting |
| 3930 | packages and prevents the ``-dbg`` package from containing the source |
| 3931 | files. |
| 3932 | |
| 3933 | By default, the OpenEmbedded build system strips binaries and puts |
| 3934 | the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3935 | Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3936 | plan to debug in general. |
| 3937 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3938 | :term:`INHIBIT_SYSROOT_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3939 | If set to "1", causes the build to not strip binaries in the |
| 3940 | resulting sysroot. |
| 3941 | |
| 3942 | By default, the OpenEmbedded build system strips binaries in the |
| 3943 | resulting sysroot. When you specifically set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3944 | :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3945 | this stripping. |
| 3946 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3947 | If you want to use this variable, include the :ref:`ref-classes-staging` |
| 3948 | class. This class uses a ``sys_strip()`` function to test for the variable |
| 3949 | and acts accordingly. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3950 | |
| 3951 | .. note:: |
| 3952 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3953 | Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3954 | special circumstances. For example, suppose you are building |
| 3955 | bare-metal firmware by using an external GCC toolchain. Furthermore, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3956 | even if the toolchain's binaries are strippable, there are other files |
| 3957 | needed for the build that are not strippable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3958 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3959 | :term:`INIT_MANAGER` |
| 3960 | Specifies the system init manager to use. Available options are: |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3961 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3962 | - ``sysvinit`` |
| 3963 | - ``systemd`` |
| 3964 | - ``mdev-busybox`` |
| 3965 | - ``none`` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3966 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3967 | With ``sysvinit``, the init manager is set to |
| 3968 | :wikipedia:`SysVinit <Init#SysV-style>`, the traditional UNIX init |
| 3969 | system. This is the default choice in the Poky distribution, together with |
| 3970 | the Udev device manager (see the ":ref:`device-manager`" section). |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3971 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3972 | With ``systemd``, the init manager becomes :wikipedia:`systemd <Systemd>`, |
| 3973 | which comes with the :wikipedia:`udev <Udev>` device manager. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3974 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3975 | With ``mdev-busybox``, the init manager becomes the much simpler BusyBox |
| 3976 | init, together with the BusyBox mdev device manager. This is the simplest |
| 3977 | and lightest solution, and probably the best choice for low-end systems |
| 3978 | with a rather slow CPU and a limited amount of RAM. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3979 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3980 | With ``none``, the init manager is also set to ``sysvinit``. This is the |
| 3981 | default setting in OpenEmbedded-Core. This option also selects the |
| 3982 | :wikipedia:`udev <Udev>` device manager. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3983 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3984 | More concretely, this is used to include |
| 3985 | ``conf/distro/include/init-manager-${INIT_MANAGER}.inc`` into the global |
| 3986 | configuration. You can have a look at the |
| 3987 | :yocto_git:`meta/conf/distro/include/init-manager-*.inc </poky/tree/meta/conf/distro/include>` |
| 3988 | files for more information, and also the ":ref:`init-manager`" |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3989 | section in the Yocto Project Development Tasks Manual. |
| 3990 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3991 | :term:`INITRAMFS_DEPLOY_DIR_IMAGE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3992 | Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs` |
| 3993 | where the :term:`INITRAMFS_IMAGE` will be fetched from. This variable is |
| 3994 | set by default to ``${DEPLOY_DIR_IMAGE}`` in the |
| 3995 | :ref:`ref-classes-kernel` class and it's only meant to be changed when |
| 3996 | building an :term:`Initramfs` image from a separate multiconfig via |
| 3997 | :term:`INITRAMFS_MULTICONFIG`. |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3999 | :term:`INITRAMFS_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4000 | Defines the format for the output image of an initial RAM filesystem |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4001 | (:term:`Initramfs`), which is used during boot. Supported formats are the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4002 | same as those supported by the |
| 4003 | :term:`IMAGE_FSTYPES` variable. |
| 4004 | |
| 4005 | The default value of this variable, which is set in the |
| 4006 | ``meta/conf/bitbake.conf`` configuration file in the |
| 4007 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4008 | :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 4009 | :wikipedia:`initrd <Initrd>` mechanism, expects |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4010 | an optionally compressed cpio archive. |
| 4011 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4012 | :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4013 | Specifies the :term:`PROVIDES` name of an image |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4014 | recipe that is used to build an initial RAM filesystem (:term:`Initramfs`) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4015 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4016 | additional recipe to be built as a dependency to whatever root |
| 4017 | filesystem recipe you might be using (e.g. ``core-image-sato``). The |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4018 | :term:`Initramfs` image recipe you provide should set |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4019 | :term:`IMAGE_FSTYPES` to |
| 4020 | :term:`INITRAMFS_FSTYPES`. |
| 4021 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4022 | An :term:`Initramfs` image provides a temporary root filesystem used for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4023 | early system initialization (e.g. loading of modules needed to locate |
| 4024 | and mount the "real" root filesystem). |
| 4025 | |
| 4026 | .. note:: |
| 4027 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4028 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` |
| 4029 | recipe in the :term:`Source Directory` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4030 | for an example :term:`Initramfs` recipe. To select this sample recipe as |
| 4031 | the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4032 | to "core-image-minimal-initramfs". |
| 4033 | |
| 4034 | You can also find more information by referencing the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4035 | ``meta-poky/conf/templates/default/local.conf.sample.extended`` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4036 | configuration file in the Source Directory, the :ref:`ref-classes-image` |
| 4037 | class, and the :ref:`ref-classes-kernel` class to see how to use the |
| 4038 | :term:`INITRAMFS_IMAGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4039 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4040 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4041 | :term:`Initramfs` image is built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4042 | |
| 4043 | For more information, you can also see the |
| 4044 | :term:`INITRAMFS_IMAGE_BUNDLE` |
| 4045 | variable, which allows the generated image to be bundled inside the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4046 | kernel image. Additionally, for information on creating an :term:`Initramfs` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4047 | image, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4048 | in the Yocto Project Development Tasks Manual. |
| 4049 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4050 | :term:`INITRAMFS_IMAGE_BUNDLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4051 | Controls whether or not the image recipe specified by |
| 4052 | :term:`INITRAMFS_IMAGE` is run through an |
| 4053 | extra pass |
| 4054 | (:ref:`ref-tasks-bundle_initramfs`) during |
| 4055 | kernel compilation in order to build a single binary that contains |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4056 | both the kernel image and the initial RAM filesystem (:term:`Initramfs`) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4057 | image. This makes use of the |
| 4058 | :term:`CONFIG_INITRAMFS_SOURCE` kernel |
| 4059 | feature. |
| 4060 | |
| 4061 | .. note:: |
| 4062 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4063 | Bundling the :term:`Initramfs` with the kernel conflates the code in the |
| 4064 | :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 |
| 4065 | compatible software may be part of a bundled :term:`Initramfs`. |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 4066 | |
| 4067 | .. note:: |
| 4068 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4069 | Using an extra compilation pass to bundle the :term:`Initramfs` avoids a |
| 4070 | circular dependency between the kernel recipe and the :term:`Initramfs` |
| 4071 | recipe should the :term:`Initramfs` include kernel modules. Should that be |
| 4072 | the case, the :term:`Initramfs` recipe depends on the kernel for the |
| 4073 | kernel modules, and the kernel depends on the :term:`Initramfs` recipe |
| 4074 | since the :term:`Initramfs` is bundled inside the kernel image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4075 | |
| 4076 | The combined binary is deposited into the ``tmp/deploy`` directory, |
| 4077 | which is part of the :term:`Build Directory`. |
| 4078 | |
| 4079 | Setting the variable to "1" in a configuration file causes the |
| 4080 | OpenEmbedded build system to generate a kernel image with the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4081 | :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4082 | |
| 4083 | INITRAMFS_IMAGE_BUNDLE = "1" |
| 4084 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4085 | By default, the :ref:`ref-classes-kernel` class sets this variable to a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4086 | null string as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4087 | |
| 4088 | INITRAMFS_IMAGE_BUNDLE ?= "" |
| 4089 | |
| 4090 | .. note:: |
| 4091 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4092 | You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4093 | configuration file. You cannot set the variable in a recipe file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4094 | |
| 4095 | See the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4096 | :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4097 | file for additional information. Also, for information on creating an |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4098 | :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4099 | in the Yocto Project Development Tasks Manual. |
| 4100 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4101 | :term:`INITRAMFS_IMAGE_NAME` |
| 4102 | |
| 4103 | This value needs to stay in sync with :term:`IMAGE_LINK_NAME`, but with |
| 4104 | :term:`INITRAMFS_IMAGE` instead of :term:`IMAGE_BASENAME`. The default value |
| 4105 | is set as follows: |
| 4106 | |
| 4107 | INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}" |
| 4108 | |
| 4109 | That is, if :term:`INITRAMFS_IMAGE` is set, the value of |
| 4110 | :term:`INITRAMFS_IMAGE_NAME` will be set based upon |
| 4111 | :term:`INITRAMFS_IMAGE` and :term:`IMAGE_MACHINE_SUFFIX`. |
| 4112 | |
| 4113 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4114 | :term:`INITRAMFS_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4115 | The link name of the initial RAM filesystem image. This variable is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4116 | set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4117 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4118 | |
| 4119 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" |
| 4120 | |
| 4121 | The value of the |
| 4122 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4123 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4124 | |
| 4125 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4126 | |
| 4127 | See the :term:`MACHINE` variable for additional |
| 4128 | information. |
| 4129 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4130 | :term:`INITRAMFS_MULTICONFIG` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4131 | Defines the multiconfig to create a multiconfig dependency to be used by |
| 4132 | the :ref:`ref-classes-kernel` class. |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4133 | |
| 4134 | This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from |
| 4135 | a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. |
| 4136 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4137 | For more information on how to bundle an :term:`Initramfs` image from a separate |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4138 | multiconfig see the ":ref:`dev-manual/building:Bundling an Initramfs Image From a Separate Multiconfig`" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4139 | section in the Yocto Project Development Tasks Manual. |
| 4140 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4141 | :term:`INITRAMFS_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4142 | The base name of the initial RAM filesystem image. This variable is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4143 | set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4144 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4145 | |
| 4146 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" |
| 4147 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4148 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4150 | :term:`INITRD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4151 | Indicates list of filesystem images to concatenate and use as an |
| 4152 | initial RAM disk (``initrd``). |
| 4153 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4154 | The :term:`INITRD` variable is an optional variable used with the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4155 | :ref:`ref-classes-image-live` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4156 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4157 | :term:`INITRD_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4158 | When building a "live" bootable image (i.e. when |
| 4159 | :term:`IMAGE_FSTYPES` contains "live"), |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4160 | :term:`INITRD_IMAGE` specifies the image recipe that should be built to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4161 | provide the initial RAM disk image. The default value is |
| 4162 | "core-image-minimal-initramfs". |
| 4163 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4164 | See the :ref:`ref-classes-image-live` class for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4165 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4166 | :term:`INITSCRIPT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4167 | The filename of the initialization script as installed to |
| 4168 | ``${sysconfdir}/init.d``. |
| 4169 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4170 | This variable is used in recipes when using :ref:`ref-classes-update-rc.d`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4171 | The variable is mandatory. |
| 4172 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4173 | :term:`INITSCRIPT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4174 | A list of the packages that contain initscripts. If multiple packages |
| 4175 | are specified, you need to append the package name to the other |
| 4176 | ``INITSCRIPT_*`` as an override. |
| 4177 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4178 | This variable is used in recipes when using :ref:`ref-classes-update-rc.d`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4179 | The variable is optional and defaults to the :term:`PN` |
| 4180 | variable. |
| 4181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4182 | :term:`INITSCRIPT_PARAMS` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4183 | Specifies the options to pass to ``update-rc.d``. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4184 | |
| 4185 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." |
| 4186 | |
| 4187 | In this example, the script has a runlevel of 99, starts the script |
| 4188 | in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. |
| 4189 | |
| 4190 | The variable's default value is "defaults", which is set in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4191 | :ref:`ref-classes-update-rc.d` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4192 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4193 | The value in :term:`INITSCRIPT_PARAMS` is passed through to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4194 | ``update-rc.d`` command. For more information on valid parameters, |
| 4195 | please see the ``update-rc.d`` manual page at |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 4196 | https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4197 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4198 | :term:`INSANE_SKIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4199 | Specifies the QA checks to skip for a specific package within a |
| 4200 | recipe. For example, to skip the check for symbolic link ``.so`` |
| 4201 | files in the main package of a recipe, add the following to the |
| 4202 | recipe. The package name override must be used, which in this example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4203 | is ``${PN}``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4204 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4205 | INSANE_SKIP:${PN} += "dev-so" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4206 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4207 | See the ":ref:`ref-classes-insane`" section for a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4208 | list of the valid QA checks you can specify using this variable. |
| 4209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4210 | :term:`INSTALL_TIMEZONE_FILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4211 | By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4212 | Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4213 | configuration level to disable this behavior. |
| 4214 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4215 | :term:`IPK_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4216 | When the IPK backend is in use and package management is enabled on |
| 4217 | the target, you can use this variable to set up ``opkg`` in the |
| 4218 | target image to point to package feeds on a nominated server. Once |
| 4219 | the feed is established, you can perform installations or upgrades |
| 4220 | using the package manager at runtime. |
| 4221 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4222 | :term:`KARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4223 | Defines the kernel architecture used when assembling the |
| 4224 | configuration. Architectures supported for this release are: |
| 4225 | |
| 4226 | - powerpc |
| 4227 | - i386 |
| 4228 | - x86_64 |
| 4229 | - arm |
| 4230 | - qemu |
| 4231 | - mips |
| 4232 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4233 | You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4234 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4235 | :term:`KBRANCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4236 | A regular expression used by the build process to explicitly identify |
| 4237 | the kernel branch that is validated, patched, and configured during a |
| 4238 | build. You must set this variable to ensure the exact kernel branch |
| 4239 | you want is being used by the build process. |
| 4240 | |
| 4241 | Values for this variable are set in the kernel's recipe file and the |
| 4242 | kernel's append file. For example, if you are using the |
| 4243 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4244 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4245 | is set as follows in that kernel recipe file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4246 | |
| 4247 | KBRANCH ?= "standard/base" |
| 4248 | |
| 4249 | This variable is also used from the kernel's append file to identify |
| 4250 | the kernel branch specific to a particular machine or target |
| 4251 | hardware. Continuing with the previous kernel example, the kernel's |
| 4252 | append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the |
| 4253 | BSP layer for a given machine. For example, the append file for the |
| 4254 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA |
| 4255 | machines (``meta-yocto-bsp``) is named |
| 4256 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4257 | Here are the related statements from that append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4258 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4259 | KBRANCH:genericx86 = "standard/base" |
| 4260 | KBRANCH:genericx86-64 = "standard/base" |
| 4261 | KBRANCH:edgerouter = "standard/edgerouter" |
| 4262 | KBRANCH:beaglebone = "standard/beaglebone" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4263 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4264 | The :term:`KBRANCH` statements |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4265 | identify the kernel branch to use when building for each supported |
| 4266 | BSP. |
| 4267 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4268 | :term:`KBUILD_DEFCONFIG` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4269 | When used with the :ref:`ref-classes-kernel-yocto` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4270 | class, specifies an "in-tree" kernel configuration file for use |
| 4271 | during a kernel build. |
| 4272 | |
| 4273 | Typically, when using a ``defconfig`` to configure a kernel during a |
| 4274 | build, you place the file in your layer in the same manner as you |
| 4275 | would place patch files and configuration fragment files (i.e. |
| 4276 | "out-of-tree"). However, if you want to use a ``defconfig`` file that |
| 4277 | is part of the kernel tree (i.e. "in-tree"), you can use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4278 | :term:`KBUILD_DEFCONFIG` variable and append the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4279 | :term:`KMACHINE` variable to point to the |
| 4280 | ``defconfig`` file. |
| 4281 | |
| 4282 | To use the variable, set it in the append file for your kernel recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4283 | using the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4284 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 4285 | KBUILD_DEFCONFIG:<machine> ?= "defconfig_file" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4286 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 4287 | Here is an example from a "raspberrypi2" :term:`MACHINE` build that uses |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4288 | a ``defconfig`` file named "bcm2709_defconfig":: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4289 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4290 | KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4291 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4292 | As an alternative, you can use the following within your append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4293 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4294 | KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4295 | |
| 4296 | For more |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4297 | information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4298 | ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4299 | section in the Yocto Project Linux Kernel Development Manual. |
| 4300 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4301 | :term:`KCONFIG_MODE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4302 | When used with the :ref:`ref-classes-kernel-yocto` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4303 | class, specifies the kernel configuration values to use for options |
| 4304 | not specified in the provided ``defconfig`` file. Valid options are:: |
| 4305 | |
| 4306 | KCONFIG_MODE = "alldefconfig" |
| 4307 | KCONFIG_MODE = "allnoconfig" |
| 4308 | |
| 4309 | In ``alldefconfig`` mode the options not explicitly specified will be |
| 4310 | assigned their Kconfig default value. In ``allnoconfig`` mode the |
| 4311 | options not explicitly specified will be disabled in the kernel |
| 4312 | config. |
| 4313 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4314 | In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4315 | the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file |
| 4316 | will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed |
| 4317 | in ``${WORKDIR}`` through a meta-layer will be handled in |
| 4318 | ``allnoconfig`` mode. |
| 4319 | |
| 4320 | An "in-tree" ``defconfig`` file can be selected via the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4321 | :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4322 | be explicitly set. |
| 4323 | |
| 4324 | A ``defconfig`` file compatible with ``allnoconfig`` mode can be |
| 4325 | generated by copying the ``.config`` file from a working Linux kernel |
| 4326 | build, renaming it to ``defconfig`` and placing it into the Linux |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4327 | kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4328 | not need to be explicitly set. |
| 4329 | |
| 4330 | A ``defconfig`` file compatible with ``alldefconfig`` mode can be |
| 4331 | generated using the |
| 4332 | :ref:`ref-tasks-savedefconfig` |
| 4333 | task and placed into the Linux kernel ``${WORKDIR}`` through your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4334 | meta-layer. Explicitely set :term:`KCONFIG_MODE`:: |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4335 | |
| 4336 | KCONFIG_MODE = "alldefconfig" |
| 4337 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4338 | :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4339 | Specifies an alternate kernel image type for creation in addition to |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4340 | the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and |
| 4341 | :term:`KERNEL_IMAGETYPES` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4342 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4343 | :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4344 | Specifies the name of all of the build artifacts. You can change the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4345 | name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4346 | variable. |
| 4347 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4348 | The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4349 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4350 | following default value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4351 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4352 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4353 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4354 | See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`IMAGE_MACHINE_SUFFIX` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 4355 | and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4356 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4357 | :term:`KERNEL_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4358 | A list of classes defining kernel image types that the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4359 | :ref:`ref-classes-kernel` class should inherit. You typically |
| 4360 | append this variable to enable extended image types. An example is |
| 4361 | ":ref:`ref-classes-kernel-fitimage`", which enables |
| 4362 | fitImage support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``. |
| 4363 | You can register custom kernel image types with the |
| 4364 | :ref:`ref-classes-kernel` class using this variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4365 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4366 | :term:`KERNEL_DANGLING_FEATURES_WARN_ONLY` |
| 4367 | When kernel configuration fragments are missing for some |
| 4368 | :term:`KERNEL_FEATURES` specified by layers or BSPs, |
| 4369 | building and configuring the kernel stops with an error. |
| 4370 | |
| 4371 | You can turn these errors into warnings by setting the |
| 4372 | following in ``conf/local.conf``:: |
| 4373 | |
| 4374 | KERNEL_DANGLING_FEATURES_WARN_ONLY = "1" |
| 4375 | |
| 4376 | You will still be warned that runtime issues may occur, |
| 4377 | but at least the kernel configuration and build process will |
| 4378 | be allowed to continue. |
| 4379 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 4380 | :term:`KERNEL_DEBUG_TIMESTAMPS` |
| 4381 | If set to "1", enables timestamping functionality during building |
| 4382 | the kernel. The default is "0" to disable this for reproducibility |
| 4383 | reasons. |
| 4384 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4385 | :term:`KERNEL_DEPLOY_DEPEND` |
| 4386 | Provides a means of controlling the dependency of an image recipe |
| 4387 | on the kernel. The default value is "virtual/kernel:do_deploy", |
| 4388 | however for a small initramfs image or other images that do not |
| 4389 | need the kernel, this can be set to "" in the image recipe. |
| 4390 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4391 | :term:`KERNEL_DEVICETREE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4392 | Specifies the name of the generated Linux kernel device tree (i.e. |
| 4393 | the ``.dtb``) file. |
| 4394 | |
| 4395 | .. note:: |
| 4396 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4397 | There is legacy support for specifying the full path to the device |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4398 | tree. However, providing just the ``.dtb`` file is preferred. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4399 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4400 | In order to use this variable, the :ref:`ref-classes-kernel-devicetree` |
| 4401 | class must be inherited. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4402 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4403 | :term:`KERNEL_DTB_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4404 | The link name of the kernel device tree binary (DTB). This variable |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4405 | is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4406 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4407 | |
| 4408 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4409 | |
| 4410 | The |
| 4411 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4412 | the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4413 | |
| 4414 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4415 | |
| 4416 | See the :term:`MACHINE` variable for additional |
| 4417 | information. |
| 4418 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4419 | :term:`KERNEL_DTB_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4420 | The base name of the kernel device tree binary (DTB). This variable |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4421 | is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4422 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4423 | |
| 4424 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4425 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4426 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4427 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4428 | :term:`KERNEL_DTC_FLAGS` |
| 4429 | Specifies the ``dtc`` flags that are passed to the Linux kernel build |
| 4430 | system when generating the device trees (via ``DTC_FLAGS`` environment |
| 4431 | variable). |
| 4432 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4433 | In order to use this variable, the :ref:`ref-classes-kernel-devicetree` |
| 4434 | class must be inherited. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4435 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4436 | :term:`KERNEL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4437 | Specifies additional ``make`` command-line arguments the OpenEmbedded |
| 4438 | build system passes on when compiling the kernel. |
| 4439 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4440 | :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4441 | Includes additional kernel metadata. In the OpenEmbedded build |
| 4442 | system, the default Board Support Packages (BSPs) |
| 4443 | :term:`Metadata` is provided through the |
| 4444 | :term:`KMACHINE` and :term:`KBRANCH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4445 | variables. You can use the :term:`KERNEL_FEATURES` variable from within |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4446 | the kernel recipe or kernel append file to further add metadata for |
| 4447 | all BSPs or specific BSPs. |
| 4448 | |
| 4449 | The metadata you add through this variable includes config fragments |
| 4450 | and features descriptions, which usually includes patches as well as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4451 | config fragments. You typically override the :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4452 | variable for a specific machine. In this way, you can provide |
| 4453 | validated, but optional, sets of kernel configurations and features. |
| 4454 | |
| 4455 | For example, the following example from the ``linux-yocto-rt_4.12`` |
| 4456 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs |
| 4457 | as well as "virtio" configurations to all QEMU machines. The last two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4458 | statements add specific configurations to targeted machine types:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4459 | |
| 4460 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4461 | KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" |
| 4462 | KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc" |
| 4463 | KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" |
| 4464 | KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4465 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4466 | :term:`KERNEL_FIT_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4467 | The link name of the kernel flattened image tree (FIT) image. This |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4468 | variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4469 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4470 | |
| 4471 | KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4472 | |
| 4473 | The value of the |
| 4474 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4475 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4476 | |
| 4477 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4478 | |
| 4479 | See the :term:`MACHINE` variable for additional |
| 4480 | information. |
| 4481 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4482 | :term:`KERNEL_FIT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4483 | The base name of the kernel flattened image tree (FIT) image. This |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4484 | variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4485 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4486 | |
| 4487 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4488 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4489 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4490 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4491 | :term:`KERNEL_IMAGE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4492 | The link name for the kernel image. This variable is set in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4493 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4494 | |
| 4495 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4496 | |
| 4497 | The value of |
| 4498 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4499 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4500 | |
| 4501 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4502 | |
| 4503 | See the :term:`MACHINE` variable for additional |
| 4504 | information. |
| 4505 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4506 | :term:`KERNEL_IMAGE_MAXSIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4507 | Specifies the maximum size of the kernel image file in kilobytes. If |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4508 | :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4509 | checked against the set value during the |
| 4510 | :ref:`ref-tasks-sizecheck` task. The task fails if |
| 4511 | the kernel image file is larger than the setting. |
| 4512 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4513 | :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4514 | limited amount of space in which the kernel image must be stored. |
| 4515 | |
| 4516 | By default, this variable is not set, which means the size of the |
| 4517 | kernel image is not checked. |
| 4518 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4519 | :term:`KERNEL_IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4520 | The base name of the kernel image. This variable is set in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4521 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4522 | |
| 4523 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4524 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4525 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4526 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4527 | :term:`KERNEL_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4528 | The type of kernel to build for a device, usually set by the machine |
| 4529 | configuration files and defaults to "zImage". This variable is used |
| 4530 | when building the kernel and is passed to ``make`` as the target to |
| 4531 | build. |
| 4532 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4533 | To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`. |
| 4534 | |
| 4535 | :term:`KERNEL_IMAGETYPES` |
| 4536 | Lists additional types of kernel images to build for a device in addition |
| 4537 | to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the |
| 4538 | machine configuration files. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4539 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4540 | :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4541 | Lists kernel modules that need to be auto-loaded during boot. |
| 4542 | |
| 4543 | .. note:: |
| 4544 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4545 | This variable replaces the deprecated :term:`module_autoload` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4546 | variable. |
| 4547 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4548 | You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4549 | can be recognized by the kernel recipe or by an out-of-tree kernel |
| 4550 | module recipe (e.g. a machine configuration file, a distribution |
| 4551 | configuration file, an append file for the recipe, or the recipe |
| 4552 | itself). |
| 4553 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4554 | Specify it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4555 | |
| 4556 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" |
| 4557 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4558 | Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4559 | system to populate the ``/etc/modules-load.d/modname.conf`` file with |
| 4560 | the list of modules to be auto-loaded on boot. The modules appear |
| 4561 | one-per-line in the file. Here is an example of the most common use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4562 | case:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4563 | |
| 4564 | KERNEL_MODULE_AUTOLOAD += "module_name" |
| 4565 | |
| 4566 | For information on how to populate the ``modname.conf`` file with |
| 4567 | ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. |
| 4568 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4569 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4570 | Provides a list of modules for which the OpenEmbedded build system |
| 4571 | expects to find ``module_conf_``\ modname values that specify |
| 4572 | configuration for each of the modules. For information on how to |
| 4573 | provide those module configurations, see the |
| 4574 | :term:`module_conf_* <module_conf>` variable. |
| 4575 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4576 | :term:`KERNEL_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4577 | The location of the kernel sources. This variable is set to the value |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4578 | of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module` |
| 4579 | class. For information on how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4580 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4581 | section in the Yocto Project Linux Kernel Development Manual. |
| 4582 | |
| 4583 | To help maximize compatibility with out-of-tree drivers used to build |
| 4584 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4585 | :term:`KERNEL_SRC` variable, which is identical to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4586 | the :term:`KERNEL_PATH` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4587 | used by external Makefiles to point to the kernel source directory. |
| 4588 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4589 | :term:`KERNEL_SRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4590 | The location of the kernel sources. This variable is set to the value |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4591 | of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module` |
| 4592 | class. For information on how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4593 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4594 | section in the Yocto Project Linux Kernel Development Manual. |
| 4595 | |
| 4596 | To help maximize compatibility with out-of-tree drivers used to build |
| 4597 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4598 | :term:`KERNEL_PATH` variable, which is identical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4599 | to the :term:`KERNEL_SRC` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4600 | used by external Makefiles to point to the kernel source directory. |
| 4601 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4602 | :term:`KERNEL_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4603 | Specifies the version of the kernel as extracted from ``version.h`` |
| 4604 | or ``utsrelease.h`` within the kernel sources. Effects of setting |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4605 | this variable do not take effect until the kernel has been |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4606 | configured. Consequently, attempting to refer to this variable in |
| 4607 | contexts prior to configuration will not work. |
| 4608 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4609 | :term:`KERNELDEPMODDEPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4610 | Specifies whether the data referenced through |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4611 | :term:`PKGDATA_DIR` is needed or not. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4612 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4613 | exists, but simply whether or not it is used. If you do not need to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4614 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4615 | :term:`Initramfs` recipe. Setting the variable there when the data is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4616 | needed avoids a potential dependency loop. |
| 4617 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4618 | :term:`KFEATURE_DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4619 | Provides a short description of a configuration fragment. You use |
| 4620 | this variable in the ``.scc`` file that describes a configuration |
| 4621 | fragment file. Here is the variable used in a file named ``smp.scc`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4622 | to describe SMP being enabled:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4623 | |
| 4624 | define KFEATURE_DESCRIPTION "Enable SMP" |
| 4625 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4626 | :term:`KMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4627 | The machine as known by the kernel. Sometimes the machine name used |
| 4628 | by the kernel does not match the machine name used by the |
| 4629 | OpenEmbedded build system. For example, the machine name that the |
| 4630 | OpenEmbedded build system understands as ``core2-32-intel-common`` |
| 4631 | goes by a different name in the Linux Yocto kernel. The kernel |
| 4632 | understands that machine as ``intel-core2-32``. For cases like these, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4633 | the :term:`KMACHINE` variable maps the kernel machine name to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4634 | OpenEmbedded build system machine name. |
| 4635 | |
| 4636 | These mappings between different names occur in the Yocto Linux |
| 4637 | Kernel's ``meta`` branch. As an example take a look in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4638 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4639 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4640 | LINUX_VERSION:core2-32-intel-common = "3.19.0" |
| 4641 | COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}" |
| 4642 | SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" |
| 4643 | SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" |
| 4644 | KMACHINE:core2-32-intel-common = "intel-core2-32" |
| 4645 | KBRANCH:core2-32-intel-common = "standard/base" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4646 | KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4647 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4648 | The :term:`KMACHINE` statement says |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4649 | that the kernel understands the machine name as "intel-core2-32". |
| 4650 | However, the OpenEmbedded build system understands the machine as |
| 4651 | "core2-32-intel-common". |
| 4652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4653 | :term:`KTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4654 | Defines the kernel type to be used in assembling the configuration. |
| 4655 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4656 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4657 | section in the |
| 4658 | Yocto Project Linux Kernel Development Manual for more information on |
| 4659 | kernel types. |
| 4660 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4661 | You define the :term:`KTYPE` variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4662 | :ref:`kernel-dev/advanced:bsp descriptions`. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4663 | value you use must match the value used for the |
| 4664 | :term:`LINUX_KERNEL_TYPE` value used by the |
| 4665 | kernel recipe. |
| 4666 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4667 | :term:`LABELS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4668 | Provides a list of targets for automatic configuration. |
| 4669 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4670 | See the :ref:`ref-classes-grub-efi` class for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4671 | information on how this variable is used. |
| 4672 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4673 | :term:`LAYERDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4674 | Lists the layers, separated by spaces, on which this recipe depends. |
| 4675 | Optionally, you can specify a specific layer version for a dependency |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4676 | by adding it to the end of the layer name. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4677 | |
| 4678 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" |
| 4679 | |
| 4680 | In this previous example, |
| 4681 | version 3 of "anotherlayer" is compared against |
| 4682 | :term:`LAYERVERSION`\ ``_anotherlayer``. |
| 4683 | |
| 4684 | An error is produced if any dependency is missing or the version |
| 4685 | numbers (if specified) do not match exactly. This variable is used in |
| 4686 | the ``conf/layer.conf`` file and must be suffixed with the name of |
| 4687 | the specific layer (e.g. ``LAYERDEPENDS_mylayer``). |
| 4688 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4689 | :term:`LAYERDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4690 | When used inside the ``layer.conf`` configuration file, this variable |
| 4691 | provides the path of the current layer. This variable is not |
| 4692 | available outside of ``layer.conf`` and references are expanded |
| 4693 | immediately when parsing of the file completes. |
| 4694 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4695 | :term:`LAYERDIR_RE` |
| 4696 | See :term:`bitbake:LAYERDIR_RE` in the BitBake manual. |
| 4697 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4698 | :term:`LAYERRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4699 | Lists the layers, separated by spaces, recommended for use with this |
| 4700 | layer. |
| 4701 | |
| 4702 | Optionally, you can specify a specific layer version for a |
| 4703 | recommendation by adding the version to the end of the layer name. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4704 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4705 | |
| 4706 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" |
| 4707 | |
| 4708 | In this previous example, version 3 of "anotherlayer" is compared |
| 4709 | against ``LAYERVERSION_anotherlayer``. |
| 4710 | |
| 4711 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4712 | suffixed with the name of the specific layer (e.g. |
| 4713 | ``LAYERRECOMMENDS_mylayer``). |
| 4714 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4715 | :term:`LAYERSERIES_COMPAT` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 4716 | See :term:`bitbake:LAYERSERIES_COMPAT` in the BitBake manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4717 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4718 | :term:`LAYERVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4719 | Optionally specifies the version of a layer as a single number. You |
| 4720 | can use this within :term:`LAYERDEPENDS` for |
| 4721 | another layer in order to depend on a specific version of the layer. |
| 4722 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4723 | suffixed with the name of the specific layer (e.g. |
| 4724 | ``LAYERVERSION_mylayer``). |
| 4725 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4726 | :term:`LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4727 | The minimal command and arguments used to run the linker. |
| 4728 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4729 | :term:`LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4730 | Specifies the flags to pass to the linker. This variable is exported |
| 4731 | to an environment variable and thus made visible to the software |
| 4732 | being built during the compilation step. |
| 4733 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4734 | Default initialization for :term:`LDFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4735 | being built: |
| 4736 | |
| 4737 | - :term:`TARGET_LDFLAGS` when building for the |
| 4738 | target |
| 4739 | |
| 4740 | - :term:`BUILD_LDFLAGS` when building for the |
| 4741 | build host (i.e. ``-native``) |
| 4742 | |
| 4743 | - :term:`BUILDSDK_LDFLAGS` when building for |
| 4744 | an SDK (i.e. ``nativesdk-``) |
| 4745 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4746 | :term:`LEAD_SONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4747 | Specifies the lead (or primary) compiled library file (i.e. ``.so``) |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4748 | that the :ref:`ref-classes-debian` class applies its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4749 | naming policy to given a recipe that packages multiple libraries. |
| 4750 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4751 | This variable works in conjunction with the :ref:`ref-classes-debian` |
| 4752 | class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4753 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4754 | :term:`LIC_FILES_CHKSUM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4755 | Checksums of the license text in the recipe source code. |
| 4756 | |
| 4757 | This variable tracks changes in license text of the source code |
| 4758 | files. If the license text is changed, it will trigger a build |
| 4759 | failure, which gives the developer an opportunity to review any |
| 4760 | license change. |
| 4761 | |
| 4762 | This variable must be defined for all recipes (unless |
| 4763 | :term:`LICENSE` is set to "CLOSED"). |
| 4764 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4765 | For more information, see the ":ref:`dev-manual/licenses:tracking license changes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4766 | section in the Yocto Project Development Tasks Manual. |
| 4767 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4768 | :term:`LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4769 | The list of source licenses for the recipe. Follow these rules: |
| 4770 | |
| 4771 | - Do not use spaces within individual license names. |
| 4772 | |
| 4773 | - Separate license names using \| (pipe) when there is a choice |
| 4774 | between licenses. |
| 4775 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4776 | - Separate license names using & (ampersand) when there are |
| 4777 | multiple licenses for different parts of the source. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4778 | |
| 4779 | - You can use spaces between license names. |
| 4780 | |
| 4781 | - For standard licenses, use the names of the files in |
| 4782 | ``meta/files/common-licenses/`` or the |
| 4783 | :term:`SPDXLICENSEMAP` flag names defined in |
| 4784 | ``meta/conf/licenses.conf``. |
| 4785 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4786 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4787 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4788 | LICENSE = "LGPL-2.1-only | GPL-3.0-only" |
| 4789 | LICENSE = "MPL-1.0 & LGPL-2.1-only" |
| 4790 | LICENSE = "GPL-2.0-or-later" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4791 | |
| 4792 | The first example is from the |
| 4793 | recipes for Qt, which the user may choose to distribute under either |
| 4794 | the LGPL version 2.1 or GPL version 3. The second example is from |
| 4795 | Cairo where two licenses cover different parts of the source code. |
| 4796 | The final example is from ``sysstat``, which presents a single |
| 4797 | license. |
| 4798 | |
| 4799 | You can also specify licenses on a per-package basis to handle |
| 4800 | situations where components of the output have different licenses. |
| 4801 | For example, a piece of software whose code is licensed under GPLv2 |
| 4802 | but has accompanying documentation licensed under the GNU Free |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4803 | Documentation License 1.2 could be specified as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4804 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4805 | LICENSE = "GFDL-1.2 & GPL-2.0-only" |
| 4806 | LICENSE:${PN} = "GPL-2.0.only" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4807 | LICENSE:${PN}-doc = "GFDL-1.2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4808 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4809 | :term:`LICENSE_CREATE_PACKAGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4810 | Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4811 | build system to create an extra package (i.e. |
| 4812 | ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add |
| 4813 | those packages to the |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4814 | :term:`RRECOMMENDS`\ ``:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4815 | |
| 4816 | The ``${PN}-lic`` package installs a directory in |
| 4817 | ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base |
| 4818 | name, and installs files in that directory that contain license and |
| 4819 | copyright information (i.e. copies of the appropriate license files |
| 4820 | from ``meta/common-licenses`` that match the licenses specified in |
| 4821 | the :term:`LICENSE` variable of the recipe metadata |
| 4822 | and copies of files marked in |
| 4823 | :term:`LIC_FILES_CHKSUM` as containing |
| 4824 | license text). |
| 4825 | |
| 4826 | For related information on providing license text, see the |
| 4827 | :term:`COPY_LIC_DIRS` variable, the |
| 4828 | :term:`COPY_LIC_MANIFEST` variable, and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4829 | ":ref:`dev-manual/licenses:providing license text`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4830 | section in the Yocto Project Development Tasks Manual. |
| 4831 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4832 | :term:`LICENSE_FLAGS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4833 | Specifies additional flags for a recipe you must allow through |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4834 | :term:`LICENSE_FLAGS_ACCEPTED` in |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4835 | order for the recipe to be built. When providing multiple flags, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4836 | separate them with spaces. |
| 4837 | |
| 4838 | This value is independent of :term:`LICENSE` and is |
| 4839 | typically used to mark recipes that might require additional licenses |
| 4840 | in order to be used in a commercial product. For more information, |
| 4841 | see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4842 | ":ref:`dev-manual/licenses:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4843 | section in the Yocto Project Development Tasks Manual. |
| 4844 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4845 | :term:`LICENSE_FLAGS_ACCEPTED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4846 | Lists license flags that when specified in |
| 4847 | :term:`LICENSE_FLAGS` within a recipe should not |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4848 | prevent that recipe from being built. For more information, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4849 | ":ref:`dev-manual/licenses:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4850 | section in the Yocto Project Development Tasks Manual. |
| 4851 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4852 | :term:`LICENSE_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4853 | Path to additional licenses used during the build. By default, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4854 | OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4855 | directory that holds common license text used during the build. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4856 | :term:`LICENSE_PATH` variable allows you to extend that location to other |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4857 | areas that have additional licenses:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4858 | |
| 4859 | LICENSE_PATH += "path-to-additional-common-licenses" |
| 4860 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4861 | :term:`LINUX_KERNEL_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4862 | Defines the kernel type to be used in assembling the configuration. |
| 4863 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4864 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4865 | section in the |
| 4866 | Yocto Project Linux Kernel Development Manual for more information on |
| 4867 | kernel types. |
| 4868 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4869 | If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4870 | "standard". Together with :term:`KMACHINE`, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4871 | :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4872 | the kernel tools to find the appropriate description within the |
| 4873 | kernel :term:`Metadata` with which to build out the sources |
| 4874 | and configuration. |
| 4875 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4876 | :term:`LINUX_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4877 | The Linux version from ``kernel.org`` on which the Linux kernel image |
| 4878 | being built using the OpenEmbedded build system is based. You define |
| 4879 | this variable in the kernel recipe. For example, the |
| 4880 | ``linux-yocto-3.4.bb`` kernel recipe found in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4881 | ``meta/recipes-kernel/linux`` defines the variables as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4882 | |
| 4883 | LINUX_VERSION ?= "3.4.24" |
| 4884 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4885 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4886 | for the recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4887 | |
| 4888 | PV = "${LINUX_VERSION}+git${SRCPV}" |
| 4889 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4890 | :term:`LINUX_VERSION_EXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4891 | A string extension compiled into the version string of the Linux |
| 4892 | kernel built with the OpenEmbedded build system. You define this |
| 4893 | variable in the kernel recipe. For example, the linux-yocto kernel |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4894 | recipes all define the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4895 | |
| 4896 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
| 4897 | |
| 4898 | Defining this variable essentially sets the Linux kernel |
| 4899 | configuration item ``CONFIG_LOCALVERSION``, which is visible through |
| 4900 | the ``uname`` command. Here is an example that shows the extension |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4901 | assuming it was set as previously shown:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4902 | |
| 4903 | $ uname -r |
| 4904 | 3.7.0-rc8-custom |
| 4905 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4906 | :term:`LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4907 | Specifies the directory to which the OpenEmbedded build system writes |
| 4908 | overall log files. The default directory is ``${TMPDIR}/log``. |
| 4909 | |
| 4910 | For the directory containing logs specific to each task, see the |
| 4911 | :term:`T` variable. |
| 4912 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4913 | :term:`MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4914 | Specifies the target device for which the image is built. You define |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4915 | :term:`MACHINE` in the ``local.conf`` file found in the |
| 4916 | :term:`Build Directory`. By default, :term:`MACHINE` is set to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4917 | "qemux86", which is an x86-based architecture machine to be emulated |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4918 | using QEMU:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4919 | |
| 4920 | MACHINE ?= "qemux86" |
| 4921 | |
| 4922 | The variable corresponds to a machine configuration file of the same |
| 4923 | name, through which machine-specific configurations are set. Thus, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4924 | when :term:`MACHINE` is set to "qemux86", the corresponding |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4925 | ``qemux86.conf`` machine configuration file can be found in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4926 | the :term:`Source Directory` in |
| 4927 | ``meta/conf/machine``. |
| 4928 | |
| 4929 | The list of machines supported by the Yocto Project as shipped |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4930 | include the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4931 | |
| 4932 | MACHINE ?= "qemuarm" |
| 4933 | MACHINE ?= "qemuarm64" |
| 4934 | MACHINE ?= "qemumips" |
| 4935 | MACHINE ?= "qemumips64" |
| 4936 | MACHINE ?= "qemuppc" |
| 4937 | MACHINE ?= "qemux86" |
| 4938 | MACHINE ?= "qemux86-64" |
| 4939 | MACHINE ?= "genericx86" |
| 4940 | MACHINE ?= "genericx86-64" |
| 4941 | MACHINE ?= "beaglebone" |
| 4942 | MACHINE ?= "edgerouter" |
| 4943 | |
| 4944 | The last five are Yocto Project reference hardware |
| 4945 | boards, which are provided in the ``meta-yocto-bsp`` layer. |
| 4946 | |
| 4947 | .. note:: |
| 4948 | |
| 4949 | Adding additional Board Support Package (BSP) layers to your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4950 | configuration adds new possible settings for :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4951 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4952 | :term:`MACHINE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4953 | Specifies the name of the machine-specific architecture. This |
| 4954 | variable is set automatically from :term:`MACHINE` or |
| 4955 | :term:`TUNE_PKGARCH`. You should not hand-edit |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4956 | the :term:`MACHINE_ARCH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4957 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4958 | :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4959 | A list of required machine-specific packages to install as part of |
| 4960 | the image being built. The build process depends on these packages |
| 4961 | being present. Furthermore, because this is a "machine-essential" |
| 4962 | variable, the list of packages are essential for the machine to boot. |
| 4963 | The impact of this variable affects images based on |
| 4964 | ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4965 | image. |
| 4966 | |
| 4967 | This variable is similar to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4968 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4969 | that the image being built has a build dependency on the variable's |
| 4970 | list of packages. In other words, the image will not build if a file |
| 4971 | in this list is not found. |
| 4972 | |
| 4973 | As an example, suppose the machine for which you are building |
| 4974 | requires ``example-init`` to be run during boot to initialize the |
| 4975 | hardware. In this case, you would use the following in the machine's |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4976 | ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4977 | |
| 4978 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" |
| 4979 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4980 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4981 | A list of recommended machine-specific packages to install as part of |
| 4982 | the image being built. The build process does not depend on these |
| 4983 | packages being present. However, because this is a |
| 4984 | "machine-essential" variable, the list of packages are essential for |
| 4985 | the machine to boot. The impact of this variable affects images based |
| 4986 | on ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4987 | image. |
| 4988 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4989 | This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4990 | variable with the exception that the image being built does not have |
| 4991 | a build dependency on the variable's list of packages. In other |
| 4992 | words, the image will still build if a package in this list is not |
| 4993 | found. Typically, this variable is used to handle essential kernel |
| 4994 | modules, whose functionality may be selected to be built into the |
| 4995 | kernel rather than as a module, in which case a package will not be |
| 4996 | produced. |
| 4997 | |
| 4998 | Consider an example where you have a custom kernel where a specific |
| 4999 | touchscreen driver is required for the machine to be usable. However, |
| 5000 | the driver can be built as a module or into the kernel depending on |
| 5001 | the kernel configuration. If the driver is built as a module, you |
| 5002 | want it to be installed. But, when the driver is built into the |
| 5003 | kernel, you still want the build to succeed. This variable sets up a |
| 5004 | "recommends" relationship so that in the latter case, the build will |
| 5005 | not fail due to the missing package. To accomplish this, assuming the |
| 5006 | package for the module was called ``kernel-module-ab123``, you would |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5007 | use the following in the machine's ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5008 | |
| 5009 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
| 5010 | |
| 5011 | .. note:: |
| 5012 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5013 | In this example, the ``kernel-module-ab123`` recipe needs to |
| 5014 | explicitly set its :term:`PACKAGES` variable to ensure that BitBake |
| 5015 | does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to |
| 5016 | satisfy the dependency. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5017 | |
| 5018 | Some examples of these machine essentials are flash, screen, |
| 5019 | keyboard, mouse, or touchscreen drivers (depending on the machine). |
| 5020 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5021 | :term:`MACHINE_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5022 | A list of machine-specific packages to install as part of the image |
| 5023 | being built that are not essential for the machine to boot. However, |
| 5024 | the build process for more fully-featured images depends on the |
| 5025 | packages being present. |
| 5026 | |
| 5027 | This variable affects all images based on ``packagegroup-base``, |
| 5028 | which does not include the ``core-image-minimal`` or |
| 5029 | ``core-image-full-cmdline`` images. |
| 5030 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5031 | The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5032 | with the exception that the image being built has a build dependency |
| 5033 | on the variable's list of packages. In other words, the image will |
| 5034 | not build if a file in this list is not found. |
| 5035 | |
| 5036 | An example is a machine that has WiFi capability but is not essential |
| 5037 | for the machine to boot the image. However, if you are building a |
| 5038 | more fully-featured image, you want to enable the WiFi. The package |
| 5039 | containing the firmware for the WiFi hardware is always expected to |
| 5040 | exist, so it is acceptable for the build process to depend upon |
| 5041 | finding the package. In this case, assuming the package for the |
| 5042 | firmware was called ``wifidriver-firmware``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5043 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5044 | |
| 5045 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" |
| 5046 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5047 | :term:`MACHINE_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5048 | A list of machine-specific packages to install as part of the image |
| 5049 | being built that are not essential for booting the machine. The image |
| 5050 | being built has no build dependency on this list of packages. |
| 5051 | |
| 5052 | This variable affects only images based on ``packagegroup-base``, |
| 5053 | which does not include the ``core-image-minimal`` or |
| 5054 | ``core-image-full-cmdline`` images. |
| 5055 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5056 | This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5057 | with the exception that the image being built does not have a build |
| 5058 | dependency on the variable's list of packages. In other words, the |
| 5059 | image will build if a file in this list is not found. |
| 5060 | |
| 5061 | An example is a machine that has WiFi capability but is not essential |
| 5062 | For the machine to boot the image. However, if you are building a |
| 5063 | more fully-featured image, you want to enable WiFi. In this case, the |
| 5064 | package containing the WiFi kernel module will not be produced if the |
| 5065 | WiFi driver is built into the kernel, in which case you still want |
| 5066 | the build to succeed instead of failing as a result of the package |
| 5067 | not being found. To accomplish this, assuming the package for the |
| 5068 | module was called ``kernel-module-examplewifi``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5069 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5070 | |
| 5071 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" |
| 5072 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5073 | :term:`MACHINE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5074 | Specifies the list of hardware features the |
| 5075 | :term:`MACHINE` is capable of supporting. For related |
| 5076 | information on enabling features, see the |
| 5077 | :term:`DISTRO_FEATURES`, |
| 5078 | :term:`COMBINED_FEATURES`, and |
| 5079 | :term:`IMAGE_FEATURES` variables. |
| 5080 | |
| 5081 | For a list of hardware features supported by the Yocto Project as |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5082 | shipped, see the ":ref:`ref-features-machine`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5083 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5084 | :term:`MACHINE_FEATURES_BACKFILL` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5085 | A list of space-separated features to be added to |
| 5086 | :term:`MACHINE_FEATURES` if not also present in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5087 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5088 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5089 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is not |
| 5090 | intended to be user-configurable. It is best to just reference the |
| 5091 | variable to see which machine features are being |
| 5092 | :ref:`backfilled <ref-features-backfill>` for all machine configurations. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5093 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5094 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5095 | A list of space-separated features from :term:`MACHINE_FEATURES_BACKFILL` |
| 5096 | that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added |
| 5097 | to :term:`MACHINE_FEATURES`) during the build. |
| 5098 | |
| 5099 | This corresponds to an opt-out mechanism. When new default machine |
| 5100 | features are introduced, machine definition maintainers can review |
| 5101 | (`consider`) them and decide to exclude them from the |
| 5102 | :ref:`backfilled <ref-features-backfill>` features. Therefore, the |
| 5103 | combination of :term:`MACHINE_FEATURES_BACKFILL` and |
| 5104 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` makes it possible to |
| 5105 | add new default features without breaking existing machine definitions. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5106 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5107 | :term:`MACHINEOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5108 | A colon-separated list of overrides that apply to the current |
| 5109 | machine. By default, this list includes the value of |
| 5110 | :term:`MACHINE`. |
| 5111 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5112 | You can extend :term:`MACHINEOVERRIDES` to add extra overrides that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5113 | should apply to a machine. For example, all machines emulated in QEMU |
| 5114 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named |
| 5115 | ``meta/conf/machine/include/qemu.inc`` that prepends the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5116 | override to :term:`MACHINEOVERRIDES`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5117 | |
| 5118 | MACHINEOVERRIDES =. "qemuall:" |
| 5119 | |
| 5120 | This |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5121 | override allows variables to be overridden for all machines emulated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5122 | in QEMU, like in the following example from the ``connman-conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5123 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5124 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5125 | SRC_URI:append:qemuall = " file://wired.config \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5126 | file://wired-setup \ |
| 5127 | " |
| 5128 | |
| 5129 | The underlying mechanism behind |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5130 | :term:`MACHINEOVERRIDES` is simply that it is included in the default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5131 | value of :term:`OVERRIDES`. |
| 5132 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5133 | :term:`MAINTAINER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5134 | The email address of the distribution maintainer. |
| 5135 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 5136 | :term:`MESON_BUILDTYPE` |
| 5137 | Value of the Meson ``--buildtype`` argument used by the |
| 5138 | :ref:`ref-classes-meson` class. It defaults to ``debug`` if |
| 5139 | :term:`DEBUG_BUILD` is set to "1", and ``plain`` otherwise. |
| 5140 | |
| 5141 | See `Meson build options <https://mesonbuild.com/Builtin-options.html>`__ |
| 5142 | for the values you could set in a recipe. Values such as ``plain``, |
| 5143 | ``debug``, ``debugoptimized``, ``release`` and ``minsize`` allow |
| 5144 | you to specify the inclusion of debugging symbols and the compiler |
| 5145 | optimizations (none, performance or size). |
| 5146 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5147 | :term:`METADATA_BRANCH` |
| 5148 | The branch currently checked out for the OpenEmbedded-Core layer (path |
| 5149 | determined by :term:`COREBASE`). |
| 5150 | |
| 5151 | :term:`METADATA_REVISION` |
| 5152 | The revision currently checked out for the OpenEmbedded-Core layer (path |
| 5153 | determined by :term:`COREBASE`). |
| 5154 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 5155 | :term:`MIME_XDG_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5156 | The current implementation of the :ref:`ref-classes-mime-xdg` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 5157 | class cannot detect ``.desktop`` files installed through absolute |
| 5158 | symbolic links. Use this setting to make the class create post-install |
| 5159 | and post-remove scripts for these packages anyway, to invoke the |
| 5160 | ``update-destop-database`` command. |
| 5161 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5162 | :term:`MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5163 | Specifies additional paths from which the OpenEmbedded build system |
| 5164 | gets source code. When the build system searches for source code, it |
| 5165 | first tries the local download directory. If that location fails, the |
| 5166 | build system tries locations defined by |
| 5167 | :term:`PREMIRRORS`, the upstream source, and then |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5168 | locations specified by :term:`MIRRORS` in that order. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5169 | |
| 5170 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5171 | the default value for :term:`MIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5172 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 5173 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5174 | :term:`MLPREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5175 | Specifies a prefix has been added to :term:`PN` to create a |
| 5176 | special version of a recipe or package (i.e. a Multilib version). The |
| 5177 | variable is used in places where the prefix needs to be added to or |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 5178 | removed from a name (e.g. the :term:`BPN` variable). |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5179 | :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5180 | |
| 5181 | .. note:: |
| 5182 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5183 | The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation |
| 5184 | is historical and comes from a time when ":ref:`ref-classes-nativesdk`" |
| 5185 | was a suffix rather than a prefix on the recipe name. When |
| 5186 | ":ref:`ref-classes-nativesdk`" was turned into a prefix, it made sense |
| 5187 | to set :term:`MLPREFIX` for it as well. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5188 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5189 | To help understand when :term:`MLPREFIX` might be needed, consider when |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5190 | :term:`BBCLASSEXTEND` is used to provide a :ref:`ref-classes-nativesdk` |
| 5191 | version of a recipe in addition to the target version. If that recipe |
| 5192 | declares build-time dependencies on tasks in other recipes by using |
| 5193 | :term:`DEPENDS`, then a dependency on "foo" will automatically get |
| 5194 | rewritten to a dependency on "nativesdk-foo". However, dependencies like |
| 5195 | the following will not get rewritten automatically:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5196 | |
| 5197 | do_foo[depends] += "recipe:do_foo" |
| 5198 | |
| 5199 | If you want such a dependency to also get transformed, you can do the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5200 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5201 | |
| 5202 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" |
| 5203 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5204 | :term:`module_autoload` |
| 5205 | This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5206 | variable. You should replace all occurrences of :term:`module_autoload` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5207 | with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5208 | |
| 5209 | module_autoload_rfcomm = "rfcomm" |
| 5210 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5211 | should now be replaced with:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5212 | |
| 5213 | KERNEL_MODULE_AUTOLOAD += "rfcomm" |
| 5214 | |
| 5215 | See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. |
| 5216 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5217 | :term:`module_conf` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 5218 | Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5219 | syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` |
| 5220 | file. |
| 5221 | |
| 5222 | You can use this variable anywhere that it can be recognized by the |
| 5223 | kernel recipe or out-of-tree kernel module recipe (e.g. a machine |
| 5224 | configuration file, a distribution configuration file, an append file |
| 5225 | for the recipe, or the recipe itself). If you use this variable, you |
| 5226 | must also be sure to list the module name in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5227 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5228 | variable. |
| 5229 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5230 | Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5231 | |
| 5232 | module_conf_module_name = "modprobe.d-syntax" |
| 5233 | |
| 5234 | You must use the kernel module name override. |
| 5235 | |
| 5236 | Run ``man modprobe.d`` in the shell to find out more information on |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5237 | the exact syntax you want to provide with :term:`module_conf`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5238 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5239 | Including :term:`module_conf` causes the OpenEmbedded build system to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5240 | populate the ``/etc/modprobe.d/modname.conf`` file with |
| 5241 | ``modprobe.d`` syntax lines. Here is an example that adds the options |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5242 | ``arg1`` and ``arg2`` to a module named ``mymodule``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5243 | |
| 5244 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" |
| 5245 | |
| 5246 | For information on how to specify kernel modules to auto-load on |
| 5247 | boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. |
| 5248 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5249 | :term:`MODULE_TARBALL_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5250 | Controls creation of the ``modules-*.tgz`` file. Set this variable to |
| 5251 | "0" to disable creation of this file, which contains all of the |
| 5252 | kernel modules resulting from a kernel build. |
| 5253 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5254 | :term:`MODULE_TARBALL_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5255 | The link name of the kernel module tarball. This variable is set in |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5256 | the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5257 | |
| 5258 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 5259 | |
| 5260 | The value |
| 5261 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5262 | same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5263 | |
| 5264 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 5265 | |
| 5266 | See the :term:`MACHINE` variable for additional information. |
| 5267 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5268 | :term:`MODULE_TARBALL_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5269 | The base name of the kernel module tarball. This variable is set in |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5270 | the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5271 | |
| 5272 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 5273 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 5274 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5275 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5276 | :term:`MOUNT_BASE` |
| 5277 | On non-systemd systems (where ``udev-extraconf`` is being used), |
| 5278 | specifies the base directory for auto-mounting filesystems. The |
| 5279 | default value is "/run/media". |
| 5280 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5281 | :term:`MULTIMACH_TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5282 | Uniquely identifies the type of the target system for which packages |
| 5283 | are being built. This variable allows output for different types of |
| 5284 | target systems to be put into different subdirectories of the same |
| 5285 | output directory. |
| 5286 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5287 | The default value of this variable is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5288 | |
| 5289 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} |
| 5290 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5291 | Some classes (e.g. :ref:`ref-classes-cross-canadian`) modify the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5292 | :term:`MULTIMACH_TARGET_SYS` value. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5293 | |
| 5294 | See the :term:`STAMP` variable for an example. See the |
| 5295 | :term:`STAGING_DIR_TARGET` variable for more information. |
| 5296 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5297 | :term:`NATIVELSBSTRING` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5298 | A string identifying the host distribution. Strings consist of the |
| 5299 | host distributor ID followed by the release, as reported by the |
| 5300 | ``lsb_release`` tool or as read from ``/etc/lsb-release``. For |
| 5301 | example, when running a build on Ubuntu 12.10, the value is |
| 5302 | "Ubuntu-12.10". If this information is unable to be determined, the |
| 5303 | value resolves to "Unknown". |
| 5304 | |
| 5305 | This variable is used by default to isolate native shared state |
| 5306 | packages for different distributions (e.g. to avoid problems with |
| 5307 | ``glibc`` version incompatibilities). Additionally, the variable is |
| 5308 | checked against |
| 5309 | :term:`SANITY_TESTED_DISTROS` if that |
| 5310 | variable is set. |
| 5311 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5312 | :term:`NM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5313 | The minimal command and arguments to run ``nm``. |
| 5314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5315 | :term:`NO_GENERIC_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5316 | Avoids QA errors when you use a non-common, non-CLOSED license in a |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5317 | recipe. There are packages, such as the linux-firmware package, with many |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5318 | licenses that are not in any way common. Also, new licenses are added |
| 5319 | occasionally to avoid introducing a lot of common license files, |
| 5320 | which are only applicable to a specific package. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5321 | :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5322 | not exist in common licenses. |
| 5323 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5324 | The following example shows how to add :term:`NO_GENERIC_LICENSE` to a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5325 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5326 | |
| 5327 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" |
| 5328 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5329 | Here is an example that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5330 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5331 | source:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5332 | |
| 5333 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
| 5334 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5335 | :term:`NO_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5336 | Prevents installation of all "recommended-only" packages. |
| 5337 | Recommended-only packages are packages installed only through the |
| 5338 | :term:`RRECOMMENDS` variable). Setting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5339 | :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5340 | |
| 5341 | NO_RECOMMENDATIONS = "1" |
| 5342 | |
| 5343 | You can set this variable globally in your ``local.conf`` file or you |
| 5344 | can attach it to a specific image recipe by using the recipe name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5345 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5346 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5347 | NO_RECOMMENDATIONS:pn-target_image = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5348 | |
| 5349 | It is important to realize that if you choose to not install packages |
| 5350 | using this variable and some other packages are dependent on them |
| 5351 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 5352 | variable), the OpenEmbedded build system ignores your request and |
| 5353 | will install the packages to avoid dependency errors. |
| 5354 | |
| 5355 | .. note:: |
| 5356 | |
| 5357 | Some recommended packages might be required for certain system |
| 5358 | functionality, such as kernel modules. It is up to you to add |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5359 | packages with the :term:`IMAGE_INSTALL` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5360 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5361 | This variable is only supported when using the IPK and RPM |
| 5362 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5363 | |
| 5364 | See the :term:`BAD_RECOMMENDATIONS` and |
| 5365 | the :term:`PACKAGE_EXCLUDE` variables for |
| 5366 | related information. |
| 5367 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5368 | :term:`NOAUTOPACKAGEDEBUG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5369 | Disables auto package from splitting ``.debug`` files. If a recipe |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5370 | requires ``FILES:${PN}-dbg`` to be set manually, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5371 | :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5372 | content of the debug package. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5373 | |
| 5374 | NOAUTOPACKAGEDEBUG = "1" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5375 | FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" |
| 5376 | FILES:${PN}-dbg = "/usr/src/debug/" |
| 5377 | FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5378 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5379 | :term:`NON_MULTILIB_RECIPES` |
| 5380 | A list of recipes that should not be built for multilib. OE-Core's |
| 5381 | ``multilib.conf`` file defines a reasonable starting point for this |
| 5382 | list with:: |
| 5383 | |
| 5384 | NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot" |
| 5385 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5386 | :term:`OBJCOPY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5387 | The minimal command and arguments to run ``objcopy``. |
| 5388 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5389 | :term:`OBJDUMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5390 | The minimal command and arguments to run ``objdump``. |
| 5391 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5392 | :term:`OE_BINCONFIG_EXTRA_MANGLE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5393 | When inheriting the :ref:`ref-classes-binconfig` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5394 | this variable specifies additional arguments passed to the "sed" |
| 5395 | command. The sed command alters any paths in configuration scripts |
| 5396 | that have been set up during compilation. Inheriting this class |
| 5397 | results in all paths in these scripts being changed to point into the |
| 5398 | ``sysroots/`` directory so that all builds that use the script will |
| 5399 | use the correct directories for the cross compiling layout. |
| 5400 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5401 | See the ``meta/classes-recipe/binconfig.bbclass`` in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5402 | :term:`Source Directory` for details on how this class |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5403 | applies these additional sed command arguments. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5404 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 5405 | :term:`OECMAKE_GENERATOR` |
| 5406 | A variable for the :ref:`ref-classes-cmake` class, allowing to choose |
| 5407 | which back-end will be generated by CMake to build an application. |
| 5408 | |
| 5409 | By default, this variable is set to ``Ninja``, which is faster than GNU |
| 5410 | make, but if building is broken with Ninja, a recipe can use this |
| 5411 | variable to use GNU make instead:: |
| 5412 | |
| 5413 | OECMAKE_GENERATOR = "Unix Makefiles" |
| 5414 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5415 | :term:`OE_IMPORTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5416 | An internal variable used to tell the OpenEmbedded build system what |
| 5417 | Python modules to import for every Python function run by the system. |
| 5418 | |
| 5419 | .. note:: |
| 5420 | |
| 5421 | Do not set this variable. It is for internal use only. |
| 5422 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5423 | :term:`OE_INIT_ENV_SCRIPT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5424 | The name of the build environment setup script for the purposes of |
| 5425 | setting up the environment within the extensible SDK. The default |
| 5426 | value is "oe-init-build-env". |
| 5427 | |
| 5428 | If you use a custom script to set up your build environment, set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5429 | :term:`OE_INIT_ENV_SCRIPT` variable to its name. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5430 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5431 | :term:`OE_TERMINAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5432 | Controls how the OpenEmbedded build system spawns interactive |
| 5433 | terminals on the host development system (e.g. using the BitBake |
| 5434 | command with the ``-c devshell`` command-line option). For more |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5435 | information, see the ":ref:`dev-manual/development-shell:using a development shell`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5436 | the Yocto Project Development Tasks Manual. |
| 5437 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5438 | You can use the following values for the :term:`OE_TERMINAL` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5439 | |
| 5440 | - auto |
| 5441 | - gnome |
| 5442 | - xfce |
| 5443 | - rxvt |
| 5444 | - screen |
| 5445 | - konsole |
| 5446 | - none |
| 5447 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5448 | :term:`OEROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5449 | The directory from which the top-level build environment setup script |
| 5450 | is sourced. The Yocto Project provides a top-level build environment |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5451 | setup script: :ref:`structure-core-script`. When you run this |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5452 | script, the :term:`OEROOT` variable resolves to the directory that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5453 | contains the script. |
| 5454 | |
| 5455 | For additional information on how this variable is used, see the |
| 5456 | initialization script. |
| 5457 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5458 | :term:`OLDEST_KERNEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5459 | Declares the oldest version of the Linux kernel that the produced |
| 5460 | binaries must support. This variable is passed into the build of the |
| 5461 | Embedded GNU C Library (``glibc``). |
| 5462 | |
| 5463 | The default for this variable comes from the |
| 5464 | ``meta/conf/bitbake.conf`` configuration file. You can override this |
| 5465 | default by setting the variable in a custom distribution |
| 5466 | configuration file. |
| 5467 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5468 | :term:`OVERLAYFS_ETC_DEVICE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5469 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5470 | inherited, specifies the device to be mounted for the read/write |
| 5471 | layer of ``/etc``. There is no default, so you must set this if you |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5472 | wish to enable :ref:`ref-classes-overlayfs-etc`, for |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5473 | example, assuming ``/dev/mmcblk0p2`` was the desired device:: |
| 5474 | |
| 5475 | OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2" |
| 5476 | |
| 5477 | :term:`OVERLAYFS_ETC_EXPOSE_LOWER` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5478 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5479 | inherited, if set to "1" then a read-only access to the original |
| 5480 | ``/etc`` content will be provided as a ``lower/`` subdirectory of |
| 5481 | :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0". |
| 5482 | |
| 5483 | :term:`OVERLAYFS_ETC_FSTYPE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5484 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5485 | inherited, specifies the file system type for the read/write |
| 5486 | layer of ``/etc``. There is no default, so you must set this if you |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5487 | wish to enable :ref:`ref-classes-overlayfs-etc`, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5488 | for example, assuming the file system is ext4:: |
| 5489 | |
| 5490 | OVERLAYFS_ETC_FSTYPE = "ext4" |
| 5491 | |
| 5492 | :term:`OVERLAYFS_ETC_MOUNT_OPTIONS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5493 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5494 | inherited, specifies the mount options for the read-write layer. |
| 5495 | The default value is "defaults". |
| 5496 | |
| 5497 | :term:`OVERLAYFS_ETC_MOUNT_POINT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5498 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5499 | inherited, specifies the parent mount path for the filesystem layers. |
| 5500 | There is no default, so you must set this if you wish to enable |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5501 | :ref:`ref-classes-overlayfs-etc`, for example if the desired path is |
| 5502 | "/data":: |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5503 | |
| 5504 | OVERLAYFS_ETC_MOUNT_POINT = "/data" |
| 5505 | |
| 5506 | :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5507 | When the :ref:`ref-classes-overlayfs-etc` class is inherited, controls |
| 5508 | how the generated init will be named. For more information, see the |
| 5509 | :ref:`ref-classes-overlayfs-etc` class documentation. The default value |
| 5510 | is "1". |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5511 | |
| 5512 | :term:`OVERLAYFS_MOUNT_POINT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5513 | When inheriting the :ref:`ref-classes-overlayfs` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5514 | specifies mount point(s) to be used. For example:: |
| 5515 | |
| 5516 | OVERLAYFS_MOUNT_POINT[data] = "/data" |
| 5517 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5518 | The assumes you have a ``data.mount`` systemd unit defined elsewhere in |
| 5519 | your BSP (e.g. in ``systemd-machine-units`` recipe) and it is installed |
| 5520 | into the image. For more information see :ref:`ref-classes-overlayfs`. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5521 | |
| 5522 | .. note:: |
| 5523 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5524 | Although the :ref:`ref-classes-overlayfs` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5525 | inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT` |
| 5526 | should be set in your machine configuration. |
| 5527 | |
| 5528 | :term:`OVERLAYFS_QA_SKIP` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5529 | When inheriting the :ref:`ref-classes-overlayfs` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5530 | provides the ability to disable QA checks for particular overlayfs |
| 5531 | mounts. For example:: |
| 5532 | |
| 5533 | OVERLAYFS_QA_SKIP[data] = "mount-configured" |
| 5534 | |
| 5535 | .. note:: |
| 5536 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5537 | Although the :ref:`ref-classes-overlayfs` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5538 | inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP` |
| 5539 | should be set in your machine configuration. |
| 5540 | |
| 5541 | :term:`OVERLAYFS_WRITABLE_PATHS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5542 | When inheriting the :ref:`ref-classes-overlayfs` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5543 | specifies writable paths used at runtime for the recipe. For |
| 5544 | example:: |
| 5545 | |
| 5546 | OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application" |
| 5547 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5548 | :term:`OVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5549 | A colon-separated list of overrides that currently apply. Overrides |
| 5550 | are a BitBake mechanism that allows variables to be selectively |
| 5551 | overridden at the end of parsing. The set of overrides in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5552 | :term:`OVERRIDES` represents the "state" during building, which includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5553 | the current recipe being built, the machine for which it is being |
| 5554 | built, and so forth. |
| 5555 | |
| 5556 | As an example, if the string "an-override" appears as an element in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5557 | the colon-separated list in :term:`OVERRIDES`, then the following |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5558 | assignment will override ``FOO`` with the value "overridden" at the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5559 | end of parsing:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5560 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5561 | FOO:an-override = "overridden" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5562 | |
| 5563 | See the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5564 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5565 | section in the BitBake User Manual for more information on the |
| 5566 | overrides mechanism. |
| 5567 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5568 | The default value of :term:`OVERRIDES` includes the values of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5569 | :term:`CLASSOVERRIDE`, |
| 5570 | :term:`MACHINEOVERRIDES`, and |
| 5571 | :term:`DISTROOVERRIDES` variables. Another |
| 5572 | important override included by default is ``pn-${PN}``. This override |
| 5573 | allows variables to be set for a single recipe within configuration |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5574 | (``.conf``) files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5575 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5576 | FOO:pn-myrecipe = "myrecipe-specific value" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5577 | |
| 5578 | .. note:: |
| 5579 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5580 | An easy way to see what overrides apply is to search for :term:`OVERRIDES` |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5581 | in the output of the ``bitbake -e`` command. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5582 | ":ref:`dev-manual/debugging:viewing variable values`" section in the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5583 | Project Development Tasks Manual for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5584 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5585 | :term:`P` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5586 | The recipe name and version. :term:`P` is comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5587 | |
| 5588 | ${PN}-${PV} |
| 5589 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5590 | :term:`P4DIR` |
| 5591 | See :term:`bitbake:P4DIR` in the BitBake manual. |
| 5592 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5593 | :term:`PACKAGE_ADD_METADATA` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5594 | This variable defines additional metadata to add to packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5595 | |
| 5596 | You may find you need to inject additional metadata into packages. |
| 5597 | This variable allows you to do that by setting the injected data as |
| 5598 | the value. Multiple fields can be added by splitting the content with |
| 5599 | the literal separator "\n". |
| 5600 | |
| 5601 | The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable |
| 5602 | to do package type specific settings. It can also be made package |
| 5603 | specific by using the package name as a suffix. |
| 5604 | |
| 5605 | You can find out more about applying this variable in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5606 | ":ref:`dev-manual/packages:adding custom metadata to packages`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5607 | section in the Yocto Project Development Tasks Manual. |
| 5608 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5609 | :term:`PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5610 | The architecture of the resulting package or packages. |
| 5611 | |
| 5612 | By default, the value of this variable is set to |
| 5613 | :term:`TUNE_PKGARCH` when building for the |
| 5614 | target, :term:`BUILD_ARCH` when building for the |
| 5615 | build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the |
| 5616 | SDK. |
| 5617 | |
| 5618 | .. note:: |
| 5619 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5620 | See :term:`SDK_ARCH` for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5621 | |
| 5622 | However, if your recipe's output packages are built specific to the |
| 5623 | target machine rather than generally for the architecture of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5624 | machine, you should set :term:`PACKAGE_ARCH` to the value of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5625 | :term:`MACHINE_ARCH` in the recipe as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5626 | |
| 5627 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 5628 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5629 | :term:`PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5630 | Specifies a list of architectures compatible with the target machine. |
| 5631 | This variable is set automatically and should not normally be |
| 5632 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5633 | of priority. The default value for :term:`PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5634 | noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". |
| 5635 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5636 | :term:`PACKAGE_BEFORE_PN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5637 | Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5638 | that those added packages can pick up files that would normally be |
| 5639 | included in the default package. |
| 5640 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5641 | :term:`PACKAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5642 | This variable, which is set in the ``local.conf`` configuration file |
| 5643 | found in the ``conf`` folder of the |
| 5644 | :term:`Build Directory`, specifies the package manager the |
| 5645 | OpenEmbedded build system uses when packaging data. |
| 5646 | |
| 5647 | You can provide one or more of the following arguments for the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5648 | variable:: |
| 5649 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 5650 | PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5651 | |
| 5652 | The build system uses only the first argument in the list as the |
| 5653 | package manager when creating your image or SDK. However, packages |
| 5654 | will be created using any additional packaging classes you specify. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5655 | For example, if you use the following in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5656 | |
| 5657 | PACKAGE_CLASSES ?= "package_ipk" |
| 5658 | |
| 5659 | The OpenEmbedded build system uses |
| 5660 | the IPK package manager to create your image or SDK. |
| 5661 | |
| 5662 | For information on packaging and build performance effects as a |
| 5663 | result of the package manager in use, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5664 | ":ref:`ref-classes-package`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5665 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5666 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5667 | Determines how to split up and package debug and source information |
| 5668 | when creating debugging packages to be used with the GNU Project |
| 5669 | Debugger (GDB). In general, based on the value of this variable, |
| 5670 | you can combine the source and debug info in a single package, |
| 5671 | you can break out the source into a separate package that can be |
| 5672 | installed independently, or you can choose to not have the source |
| 5673 | packaged at all. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5674 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5675 | The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5676 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5677 | - "``.debug``": All debugging and source info is placed in a single |
| 5678 | ``*-dbg`` package; debug symbol files are placed next to the |
| 5679 | binary in a ``.debug`` directory so that, if a binary is installed |
| 5680 | into ``/bin``, the corresponding debug symbol file is installed |
| 5681 | in ``/bin/.debug``. Source files are installed in the same ``*-dbg`` |
| 5682 | package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5683 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5684 | - "``debug-file-directory``": As above, all debugging and source info |
| 5685 | is placed in a single ``*-dbg`` package; debug symbol files are |
| 5686 | placed entirely under the directory ``/usr/lib/debug`` and separated |
| 5687 | by the path from where the binary is installed, so that if a binary |
| 5688 | is installed in ``/bin``, the corresponding debug symbols are installed |
| 5689 | in ``/usr/lib/debug/bin``, and so on. As above, source is installed |
| 5690 | in the same package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5691 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5692 | - "``debug-with-srcpkg``": Debugging info is placed in the standard |
| 5693 | ``*-dbg`` package as with the ``.debug`` value, while source is |
| 5694 | placed in a separate ``*-src`` package, which can be installed |
| 5695 | independently. This is the default setting for this variable, |
| 5696 | as defined in Poky's ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5697 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5698 | - "``debug-without-src``": The same behavior as with the ``.debug`` |
| 5699 | setting, but no source is packaged at all. |
| 5700 | |
| 5701 | .. note:: |
| 5702 | |
| 5703 | Much of the above package splitting can be overridden via |
| 5704 | use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5705 | |
| 5706 | You can find out more about debugging using GDB by reading the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5707 | ":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) remotely`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5708 | in the Yocto Project Development Tasks Manual. |
| 5709 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5710 | :term:`PACKAGE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5711 | Lists packages that should not be installed into an image. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5712 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5713 | |
| 5714 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." |
| 5715 | |
| 5716 | You can set this variable globally in your ``local.conf`` file or you |
| 5717 | can attach it to a specific image recipe by using the recipe name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5718 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5719 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5720 | PACKAGE_EXCLUDE:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5721 | |
| 5722 | If you choose to not install a package using this variable and some |
| 5723 | other package is dependent on it (i.e. listed in a recipe's |
| 5724 | :term:`RDEPENDS` variable), the OpenEmbedded build |
| 5725 | system generates a fatal installation error. Because the build system |
| 5726 | halts the process with a fatal error, you can use the variable with |
| 5727 | an iterative development process to remove specific components from a |
| 5728 | system. |
| 5729 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5730 | This variable is supported only when using the IPK and RPM |
| 5731 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5732 | |
| 5733 | See the :term:`NO_RECOMMENDATIONS` and the |
| 5734 | :term:`BAD_RECOMMENDATIONS` variables for |
| 5735 | related information. |
| 5736 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5737 | :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` |
| 5738 | Prevents specific packages from being installed when you are |
| 5739 | installing complementary packages. |
| 5740 | |
| 5741 | You might find that you want to prevent installing certain packages |
| 5742 | when you are installing complementary packages. For example, if you |
| 5743 | are using :term:`IMAGE_FEATURES` to install |
| 5744 | ``dev-pkgs``, you might not want to install all packages from a |
| 5745 | particular multilib. If you find yourself in this situation, you can |
| 5746 | use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular |
| 5747 | expressions to match the packages you want to exclude. |
| 5748 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5749 | :term:`PACKAGE_EXTRA_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5750 | Specifies the list of architectures compatible with the device CPU. |
| 5751 | This variable is useful when you build for several different devices |
| 5752 | that use miscellaneous processors such as XScale and ARM926-EJS. |
| 5753 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5754 | :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5755 | Optionally specifies the package architectures used as part of the |
| 5756 | package feed URIs during the build. When used, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5757 | :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5758 | URI, which is constructed using the |
| 5759 | :term:`PACKAGE_FEED_URIS` and |
| 5760 | :term:`PACKAGE_FEED_BASE_PATHS` |
| 5761 | variables. |
| 5762 | |
| 5763 | .. note:: |
| 5764 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5765 | You can use the :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5766 | variable to allow specific package architectures. If you do |
| 5767 | not need to allow specific architectures, which is a common |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5768 | case, you can omit this variable. Omitting the variable results in |
| 5769 | all available architectures for the current machine being included |
| 5770 | into remote package feeds. |
| 5771 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5772 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5773 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5774 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5775 | |
| 5776 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5777 | https://example.com/packagerepos/updates" |
| 5778 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5779 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5780 | |
| 5781 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5782 | |
| 5783 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5784 | |
| 5785 | https://example.com/packagerepos/release/rpm/all |
| 5786 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5787 | https://example.com/packagerepos/release/rpm-dev/all |
| 5788 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5789 | https://example.com/packagerepos/updates/rpm/all |
| 5790 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5791 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5792 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5793 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5794 | :term:`PACKAGE_FEED_BASE_PATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5795 | Specifies the base path used when constructing package feed URIs. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5796 | :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5797 | package feed URI used by the OpenEmbedded build system. The base path |
| 5798 | lies between the :term:`PACKAGE_FEED_URIS` |
| 5799 | and :term:`PACKAGE_FEED_ARCHS` variables. |
| 5800 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5801 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5802 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5803 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5804 | |
| 5805 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5806 | https://example.com/packagerepos/updates" |
| 5807 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5808 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5809 | |
| 5810 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5811 | |
| 5812 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5813 | |
| 5814 | https://example.com/packagerepos/release/rpm/all |
| 5815 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5816 | https://example.com/packagerepos/release/rpm-dev/all |
| 5817 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5818 | https://example.com/packagerepos/updates/rpm/all |
| 5819 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5820 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5821 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5822 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5823 | :term:`PACKAGE_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5824 | Specifies the front portion of the package feed URI used by the |
| 5825 | OpenEmbedded build system. Each final package feed URI is comprised |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5826 | of :term:`PACKAGE_FEED_URIS`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5827 | :term:`PACKAGE_FEED_BASE_PATHS`, and |
| 5828 | :term:`PACKAGE_FEED_ARCHS` variables. |
| 5829 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5830 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5831 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5832 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5833 | |
| 5834 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5835 | https://example.com/packagerepos/updates" |
| 5836 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5837 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5838 | |
| 5839 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5840 | |
| 5841 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5842 | |
| 5843 | https://example.com/packagerepos/release/rpm/all |
| 5844 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5845 | https://example.com/packagerepos/release/rpm-dev/all |
| 5846 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5847 | https://example.com/packagerepos/updates/rpm/all |
| 5848 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5849 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5850 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5851 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5852 | :term:`PACKAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5853 | The final list of packages passed to the package manager for |
| 5854 | installation into the image. |
| 5855 | |
| 5856 | Because the package manager controls actual installation of all |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5857 | packages, the list of packages passed using :term:`PACKAGE_INSTALL` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5858 | not the final list of packages that are actually installed. This |
| 5859 | variable is internal to the image construction code. Consequently, in |
| 5860 | general, you should use the |
| 5861 | :term:`IMAGE_INSTALL` variable to specify |
| 5862 | packages for installation. The exception to this is when working with |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5863 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 5864 | image. When working with an initial RAM filesystem (:term:`Initramfs`) image, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5865 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5866 | :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5867 | in the Yocto Project Development Tasks Manual. |
| 5868 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5869 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5870 | Specifies a list of packages the OpenEmbedded build system attempts |
| 5871 | to install when creating an image. If a listed package fails to |
| 5872 | install, the build system does not generate an error. This variable |
| 5873 | is generally not user-defined. |
| 5874 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5875 | :term:`PACKAGE_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5876 | Specifies a list of functions run to pre-process the |
| 5877 | :term:`PKGD` directory prior to splitting the files out |
| 5878 | to individual packages. |
| 5879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5880 | :term:`PACKAGE_WRITE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5881 | Specifies a list of dependencies for post-installation and |
| 5882 | pre-installation scripts on native/cross tools. If your |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5883 | post-installation or pre-installation script can execute at root filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5884 | creation time rather than on the target but depends on a native tool |
| 5885 | in order to execute, you need to list the tools in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5886 | :term:`PACKAGE_WRITE_DEPS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5887 | |
| 5888 | For information on running post-installation scripts, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5889 | ":ref:`dev-manual/new-recipe:post-installation scripts`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5890 | section in the Yocto Project Development Tasks Manual. |
| 5891 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5892 | :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5893 | This variable provides a means of enabling or disabling features of a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5894 | recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5895 | recipes when you specify features and then arguments that define |
| 5896 | feature behaviors. Here is the basic block structure (broken over |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5897 | multiple lines for readability):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5898 | |
| 5899 | PACKAGECONFIG ??= "f1 f2 f3 ..." |
| 5900 | PACKAGECONFIG[f1] = "\ |
| 5901 | --with-f1, \ |
| 5902 | --without-f1, \ |
| 5903 | build-deps-for-f1, \ |
| 5904 | runtime-deps-for-f1, \ |
| 5905 | runtime-recommends-for-f1, \ |
| 5906 | packageconfig-conflicts-for-f1" |
| 5907 | PACKAGECONFIG[f2] = "\ |
| 5908 | ... and so on and so on ... |
| 5909 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5910 | The :term:`PACKAGECONFIG` variable itself specifies a space-separated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5911 | list of the features to enable. Following the features, you can |
| 5912 | determine the behavior of each feature by providing up to six |
| 5913 | order-dependent arguments, which are separated by commas. You can |
| 5914 | omit any argument you like but must retain the separating commas. The |
| 5915 | order is important and specifies the following: |
| 5916 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5917 | #. Extra arguments that should be added to the configure script |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5918 | argument list (:term:`EXTRA_OECONF` or |
| 5919 | :term:`PACKAGECONFIG_CONFARGS`) if |
| 5920 | the feature is enabled. |
| 5921 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5922 | #. Extra arguments that should be added to :term:`EXTRA_OECONF` or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5923 | :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5924 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5925 | #. Additional build dependencies (:term:`DEPENDS`) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5926 | that should be added if the feature is enabled. |
| 5927 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5928 | #. Additional runtime dependencies (:term:`RDEPENDS`) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5929 | that should be added if the feature is enabled. |
| 5930 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5931 | #. Additional runtime recommendations |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5932 | (:term:`RRECOMMENDS`) that should be added if |
| 5933 | the feature is enabled. |
| 5934 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5935 | #. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5936 | settings for this feature. |
| 5937 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5938 | Consider the following :term:`PACKAGECONFIG` block taken from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5939 | ``librsvg`` recipe. In this example the feature is ``gtk``, which has |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5940 | three arguments that determine the feature's behavior:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5941 | |
| 5942 | PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" |
| 5943 | |
| 5944 | The |
| 5945 | ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is |
| 5946 | enabled. In this case, ``--with-gtk3`` is added to the configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5947 | script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5948 | other hand, if the feature is disabled say through a ``.bbappend`` |
| 5949 | file in another layer, then the second argument ``--without-gtk3`` is |
| 5950 | added to the configure script instead. |
| 5951 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5952 | The basic :term:`PACKAGECONFIG` structure previously described holds true |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5953 | regardless of whether you are creating a block or changing a block. |
| 5954 | When creating a block, use the structure inside your recipe. |
| 5955 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5956 | If you want to change an existing :term:`PACKAGECONFIG` block, you can do |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5957 | so one of two ways: |
| 5958 | |
| 5959 | - *Append file:* Create an append file named |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5960 | ``recipename.bbappend`` in your layer and override the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5961 | :term:`PACKAGECONFIG`. You can either completely override the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5962 | variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5963 | |
| 5964 | PACKAGECONFIG = "f4 f5" |
| 5965 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5966 | Or, you can just append the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5967 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5968 | PACKAGECONFIG:append = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5969 | |
| 5970 | - *Configuration file:* This method is identical to changing the |
| 5971 | block through an append file except you edit your ``local.conf`` |
| 5972 | or ``mydistro.conf`` file. As with append files previously |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5973 | described, you can either completely override the variable:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5974 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5975 | PACKAGECONFIG:pn-recipename = "f4 f5" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5976 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5977 | Or, you can just amend the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5978 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5979 | PACKAGECONFIG:append:pn-recipename = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5980 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5981 | :term:`PACKAGECONFIG_CONFARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5982 | A space-separated list of configuration options generated from the |
| 5983 | :term:`PACKAGECONFIG` setting. |
| 5984 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5985 | Classes such as :ref:`ref-classes-autotools` and :ref:`ref-classes-cmake` |
| 5986 | use :term:`PACKAGECONFIG_CONFARGS` to pass :term:`PACKAGECONFIG` options |
| 5987 | to ``configure`` and ``cmake``, respectively. If you are using |
| 5988 | :term:`PACKAGECONFIG` but not a class that handles the |
| 5989 | :ref:`ref-tasks-configure` task, then you need to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5990 | :term:`PACKAGECONFIG_CONFARGS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5991 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5992 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5993 | For recipes inheriting the :ref:`ref-classes-packagegroup` class, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5994 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5995 | normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) |
| 5996 | should not be automatically created by the ``packagegroup`` recipe, |
| 5997 | which is the default behavior. |
| 5998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5999 | :term:`PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6000 | The list of packages the recipe creates. The default value is the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6001 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6002 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 6003 | ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN} |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6004 | |
| 6005 | During packaging, the :ref:`ref-tasks-package` task |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6006 | goes through :term:`PACKAGES` and uses the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6007 | variable corresponding to each package to assign files to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6008 | package. If a file matches the :term:`FILES` variable for more than one |
| 6009 | package in :term:`PACKAGES`, it will be assigned to the earliest |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6010 | (leftmost) package. |
| 6011 | |
| 6012 | Packages in the variable's list that are empty (i.e. where none of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6013 | the patterns in ``FILES:``\ pkg match any files installed by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6014 | :ref:`ref-tasks-install` task) are not generated, |
| 6015 | unless generation is forced through the |
| 6016 | :term:`ALLOW_EMPTY` variable. |
| 6017 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6018 | :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6019 | A promise that your recipe satisfies runtime dependencies for |
| 6020 | optional modules that are found in other recipes. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6021 | :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6022 | only states that they should be satisfied. For example, if a hard, |
| 6023 | runtime dependency (:term:`RDEPENDS`) of another |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6024 | package is satisfied at build time through the :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6025 | variable, but a package with the module name is never actually |
| 6026 | produced, then the other package will be broken. Thus, if you attempt |
| 6027 | to include that package in an image, you will get a dependency |
| 6028 | failure from the packaging system during the |
| 6029 | :ref:`ref-tasks-rootfs` task. |
| 6030 | |
| 6031 | Typically, if there is a chance that such a situation can occur and |
| 6032 | the package that is not created is valid without the dependency being |
| 6033 | satisfied, then you should use :term:`RRECOMMENDS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6034 | (a soft runtime dependency) instead of :term:`RDEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6035 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6036 | For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6037 | you are splitting packages, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6038 | ":ref:`dev-manual/packages:handling optional module packaging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6039 | section in the Yocto Project Development Tasks Manual. |
| 6040 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6041 | :term:`PACKAGESPLITFUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6042 | Specifies a list of functions run to perform additional splitting of |
| 6043 | files into individual packages. Recipes can either prepend to this |
| 6044 | variable or prepend to the ``populate_packages`` function in order to |
| 6045 | perform additional package splitting. In either case, the function |
| 6046 | should set :term:`PACKAGES`, |
| 6047 | :term:`FILES`, :term:`RDEPENDS` and |
| 6048 | other packaging variables appropriately in order to perform the |
| 6049 | desired splitting. |
| 6050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6051 | :term:`PARALLEL_MAKE` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6052 | |
| 6053 | Extra options passed to the build tool command (``make``, |
| 6054 | ``ninja`` or more specific build engines, like the Go language one) |
| 6055 | during the :ref:`ref-tasks-compile` task, to specify parallel compilation |
| 6056 | on the local build host. This variable is usually in the form "-j x", |
| 6057 | where x represents the maximum number of parallel threads such engines |
| 6058 | can run. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6059 | |
| 6060 | .. note:: |
| 6061 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6062 | For software compiled by ``make``, in order for :term:`PARALLEL_MAKE` |
| 6063 | to be effective, ``make`` must be called with |
| 6064 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 6065 | way to ensure this is to use the ``oe_runmake`` function. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6066 | |
| 6067 | By default, the OpenEmbedded build system automatically sets this |
| 6068 | variable to be equal to the number of cores the build system uses. |
| 6069 | |
| 6070 | .. note:: |
| 6071 | |
| 6072 | If the software being built experiences dependency issues during |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6073 | the :ref:`ref-tasks-compile` task that result in race conditions, you can clear |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6074 | the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6075 | information on addressing race conditions, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6076 | ":ref:`dev-manual/debugging:debugging parallel make races`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6077 | section in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6078 | |
| 6079 | For single socket systems (i.e. one CPU), you should not have to |
| 6080 | override this variable to gain optimal parallelism during builds. |
| 6081 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6082 | CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6083 | not set higher than "-j 20". |
| 6084 | |
| 6085 | For more information on speeding up builds, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6086 | ":ref:`dev-manual/speeding-up-build:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6087 | section in the Yocto Project Development Tasks Manual. |
| 6088 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6089 | :term:`PARALLEL_MAKEINST` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6090 | Extra options passed to the build tool install command |
| 6091 | (``make install``, ``ninja install`` or more specific ones) |
| 6092 | during the :ref:`ref-tasks-install` task in order to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6093 | parallel installation. This variable defaults to the value of |
| 6094 | :term:`PARALLEL_MAKE`. |
| 6095 | |
| 6096 | .. note:: |
| 6097 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6098 | For software compiled by ``make``, in order for :term:`PARALLEL_MAKEINST` |
| 6099 | to be effective, ``make`` must be called with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6100 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 6101 | way to ensure this is to use the ``oe_runmake`` function. |
| 6102 | |
| 6103 | If the software being built experiences dependency issues during |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6104 | the :ref:`ref-tasks-install` task that result in race conditions, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6105 | clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6106 | workaround. For information on addressing race conditions, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6107 | ":ref:`dev-manual/debugging:debugging parallel make races`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6108 | section in the Yocto Project Development Tasks Manual. |
| 6109 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6110 | :term:`PATCHRESOLVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6111 | Determines the action to take when a patch fails. You can set this |
| 6112 | variable to one of two values: "noop" and "user". |
| 6113 | |
| 6114 | The default value of "noop" causes the build to simply fail when the |
| 6115 | OpenEmbedded build system cannot successfully apply a patch. Setting |
| 6116 | the value to "user" causes the build system to launch a shell and |
| 6117 | places you in the right location so that you can manually resolve the |
| 6118 | conflicts. |
| 6119 | |
| 6120 | Set this variable in your ``local.conf`` file. |
| 6121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6122 | :term:`PATCHTOOL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6123 | Specifies the utility used to apply patches for a recipe during the |
| 6124 | :ref:`ref-tasks-patch` task. You can specify one of |
| 6125 | three utilities: "patch", "quilt", or "git". The default utility used |
| 6126 | is "quilt" except for the quilt-native recipe itself. Because the |
| 6127 | quilt tool is not available at the time quilt-native is being |
| 6128 | patched, it uses "patch". |
| 6129 | |
| 6130 | If you wish to use an alternative patching tool, set the variable in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6131 | the recipe using one of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6132 | |
| 6133 | PATCHTOOL = "patch" |
| 6134 | PATCHTOOL = "quilt" |
| 6135 | PATCHTOOL = "git" |
| 6136 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6137 | :term:`PE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6138 | The epoch of the recipe. By default, this variable is unset. The |
| 6139 | variable is used to make upgrades possible when the versioning scheme |
| 6140 | changes in some backwards incompatible way. |
| 6141 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6142 | :term:`PE` is the default value of the :term:`PKGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6143 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6144 | :term:`PEP517_WHEEL_PATH` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6145 | When used by recipes that inherit the :ref:`ref-classes-python_pep517` |
| 6146 | class, denotes the path to ``dist/`` (short for distribution) where the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6147 | binary archive ``wheel`` is built. |
| 6148 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6149 | :term:`PERSISTENT_DIR` |
| 6150 | See :term:`bitbake:PERSISTENT_DIR` in the BitBake manual. |
| 6151 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6152 | :term:`PF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6153 | Specifies the recipe or package name and includes all version and |
| 6154 | revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and |
| 6155 | ``bash-4.2-r1/``). This variable is comprised of the following: |
| 6156 | ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} |
| 6157 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6158 | :term:`PIXBUF_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6159 | When inheriting the :ref:`ref-classes-pixbufcache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6160 | class, this variable identifies packages that contain the pixbuf |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6161 | loaders used with ``gdk-pixbuf``. By default, the |
| 6162 | :ref:`ref-classes-pixbufcache` class assumes that |
| 6163 | the loaders are in the recipe's main package (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6164 | ``${``\ :term:`PN`\ ``}``). Use this variable if the |
| 6165 | loaders you need are in a package other than that main package. |
| 6166 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6167 | :term:`PKG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6168 | The name of the resulting package created by the OpenEmbedded build |
| 6169 | system. |
| 6170 | |
| 6171 | .. note:: |
| 6172 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6173 | When using the :term:`PKG` variable, you must use a package name override. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6174 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6175 | For example, when the :ref:`ref-classes-debian` class renames the output |
| 6176 | package, it does so by setting ``PKG:packagename``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6177 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6178 | :term:`PKG_CONFIG_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6179 | The path to ``pkg-config`` files for the current build context. |
| 6180 | ``pkg-config`` reads this variable from the environment. |
| 6181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6182 | :term:`PKGD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6183 | Points to the destination directory for files to be packaged before |
| 6184 | they are split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6185 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6186 | |
| 6187 | ${WORKDIR}/package |
| 6188 | |
| 6189 | Do not change this default. |
| 6190 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6191 | :term:`PKGDATA_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6192 | Points to a shared, global-state directory that holds data generated |
| 6193 | during the packaging process. During the packaging process, the |
| 6194 | :ref:`ref-tasks-packagedata` task packages data |
| 6195 | for each recipe and installs it into this temporary, shared area. |
| 6196 | This directory defaults to the following, which you should not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6197 | change:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6198 | |
| 6199 | ${STAGING_DIR_HOST}/pkgdata |
| 6200 | |
| 6201 | For examples of how this data is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6202 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6203 | section in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6204 | ":ref:`dev-manual/debugging:viewing package information with \`\`oe-pkgdata-util\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6205 | section in the Yocto Project Development Tasks Manual. For more |
| 6206 | information on the shared, global-state directory, see |
| 6207 | :term:`STAGING_DIR_HOST`. |
| 6208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6209 | :term:`PKGDEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6210 | Points to the parent directory for files to be packaged after they |
| 6211 | have been split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6212 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6213 | |
| 6214 | ${WORKDIR}/packages-split |
| 6215 | |
| 6216 | Under this directory, the build system creates directories for each |
| 6217 | package specified in :term:`PACKAGES`. Do not change |
| 6218 | this default. |
| 6219 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6220 | :term:`PKGDESTWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6221 | Points to a temporary work area where the |
| 6222 | :ref:`ref-tasks-package` task saves package metadata. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6223 | The :term:`PKGDESTWORK` location defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6224 | |
| 6225 | ${WORKDIR}/pkgdata |
| 6226 | |
| 6227 | Do not change this default. |
| 6228 | |
| 6229 | The :ref:`ref-tasks-packagedata` task copies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6230 | package metadata from :term:`PKGDESTWORK` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6231 | :term:`PKGDATA_DIR` to make it available globally. |
| 6232 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6233 | :term:`PKGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6234 | The epoch of the package(s) built by the recipe. By default, :term:`PKGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6235 | is set to :term:`PE`. |
| 6236 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6237 | :term:`PKGR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6238 | The revision of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6239 | :term:`PKGR` is set to :term:`PR`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6240 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6241 | :term:`PKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6242 | The version of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6243 | :term:`PKGV` is set to :term:`PV`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6244 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6245 | :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6246 | This variable can have two separate functions depending on the |
| 6247 | context: a recipe name or a resulting package name. |
| 6248 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6249 | :term:`PN` refers to a recipe name in the context of a file used by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6250 | OpenEmbedded build system as input to create a package. The name is |
| 6251 | normally extracted from the recipe file name. For example, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6252 | recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6253 | will be "expat". |
| 6254 | |
| 6255 | The variable refers to a package name in the context of a file |
| 6256 | created or produced by the OpenEmbedded build system. |
| 6257 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6258 | If applicable, the :term:`PN` variable also contains any special suffix |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6259 | or prefix. For example, using ``bash`` to build packages for the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6260 | native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6261 | packages for the target and for Multilib, :term:`PN` would be ``bash`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6262 | and ``lib64-bash``, respectively. |
| 6263 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6264 | :term:`POPULATE_SDK_POST_HOST_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6265 | Specifies a list of functions to call once the OpenEmbedded build |
| 6266 | system has created the host part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6267 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6268 | |
| 6269 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " |
| 6270 | |
| 6271 | If you need to pass the SDK path to a command within a function, you |
| 6272 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6273 | the OpenEmbedded build system when creating SDK output. See the |
| 6274 | :term:`SDK_DIR` variable for more information. |
| 6275 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6276 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6277 | Specifies a list of functions to call once the OpenEmbedded build |
| 6278 | system has created the target part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6279 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6280 | |
| 6281 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " |
| 6282 | |
| 6283 | If you need to pass the SDK path to a command within a function, you |
| 6284 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6285 | the OpenEmbedded build system when creating SDK output. See the |
| 6286 | :term:`SDK_DIR` variable for more information. |
| 6287 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6288 | :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6289 | The revision of the recipe. The default value for this variable is |
| 6290 | "r0". Subsequent revisions of the recipe conventionally have the |
| 6291 | values "r1", "r2", and so forth. When :term:`PV` increases, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6292 | :term:`PR` is conventionally reset to "r0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6293 | |
| 6294 | .. note:: |
| 6295 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6296 | The OpenEmbedded build system does not need the aid of :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6297 | to know when to rebuild a recipe. The build system uses the task |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6298 | :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6299 | :ref:`stamp <structure-build-tmp-stamps>` and |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6300 | :ref:`overview-manual/concepts:shared state cache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6301 | mechanisms. |
| 6302 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6303 | The :term:`PR` variable primarily becomes significant when a package |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6304 | manager dynamically installs packages on an already built image. In |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6305 | this case, :term:`PR`, which is the default value of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6306 | :term:`PKGR`, helps the package manager distinguish which |
| 6307 | package is the most recent one in cases where many packages have the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6308 | same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with |
| 6309 | the same :term:`PV` usually means that the packages all install the same |
| 6310 | upstream version, but with later (:term:`PR`) version packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6311 | packaging fixes. |
| 6312 | |
| 6313 | .. note:: |
| 6314 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6315 | :term:`PR` does not need to be increased for changes that do not change the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6316 | package contents or metadata. |
| 6317 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6318 | Because manually managing :term:`PR` can be cumbersome and error-prone, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6319 | an automated solution exists. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6320 | ":ref:`dev-manual/packages:working with a pr service`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6321 | in the Yocto Project Development Tasks Manual for more information. |
| 6322 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6323 | :term:`PREFERRED_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6324 | If multiple recipes provide the same item, this variable determines |
| 6325 | which recipe is preferred and thus provides the item (i.e. the |
| 6326 | preferred provider). You should always suffix this variable with the |
| 6327 | name of the provided item. And, you should define the variable using |
| 6328 | the preferred recipe's name (:term:`PN`). Here is a common |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6329 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6330 | |
| 6331 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 6332 | |
| 6333 | In the previous example, multiple recipes are providing "virtual/kernel". |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6334 | The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6335 | the recipe you prefer to provide "virtual/kernel". |
| 6336 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6337 | Following are more examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6338 | |
| 6339 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
| 6340 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
| 6341 | |
| 6342 | For more |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6343 | information, see the ":ref:`dev-manual/new-recipe:using virtual providers`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6344 | section in the Yocto Project Development Tasks Manual. |
| 6345 | |
| 6346 | .. note:: |
| 6347 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6348 | If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6349 | recipe that :term:`PROVIDES` that item but is not selected (defined) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6350 | by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6351 | desirable since this mechanism is designed to select between mutually |
| 6352 | exclusive alternative providers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6353 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6354 | :term:`PREFERRED_PROVIDERS` |
| 6355 | See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual. |
| 6356 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6357 | :term:`PREFERRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6358 | If there are multiple versions of a recipe available, this variable |
| 6359 | determines which version should be given preference. You must always |
| 6360 | suffix the variable with the :term:`PN` you want to select (`python` in |
| 6361 | the first example below), and you should specify the :term:`PV` |
| 6362 | accordingly (`3.4.0` in the example). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6363 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6364 | The :term:`PREFERRED_VERSION` variable supports limited wildcard use |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6365 | through the "``%``" character. You can use the character to match any |
| 6366 | number of characters, which can be useful when specifying versions |
| 6367 | that contain long revision numbers that potentially change. Here are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6368 | two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6369 | |
| 6370 | PREFERRED_VERSION_python = "3.4.0" |
| 6371 | PREFERRED_VERSION_linux-yocto = "5.0%" |
| 6372 | |
| 6373 | .. note:: |
| 6374 | |
| 6375 | The use of the "%" character is limited in that it only works at the end of the |
| 6376 | string. You cannot use the wildcard character in any other |
| 6377 | location of the string. |
| 6378 | |
| 6379 | The specified version is matched against :term:`PV`, which |
| 6380 | does not necessarily match the version part of the recipe's filename. |
| 6381 | For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6382 | where ``foo_git.bb`` contains the following assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6383 | |
| 6384 | PV = "1.1+git${SRCPV}" |
| 6385 | |
| 6386 | In this case, the correct way to select |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6387 | ``foo_git.bb`` is by using an assignment such as the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6388 | |
| 6389 | PREFERRED_VERSION_foo = "1.1+git%" |
| 6390 | |
| 6391 | Compare that previous example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6392 | against the following incorrect example, which does not work:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6393 | |
| 6394 | PREFERRED_VERSION_foo = "git" |
| 6395 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6396 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6397 | configuration files in a way that is hard to change. You can use |
| 6398 | :term:`OVERRIDES` to set a machine-specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6399 | override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6400 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6401 | PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6402 | |
| 6403 | Although not recommended, worst case, you can also use the |
| 6404 | "forcevariable" override, which is the strongest override possible. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6405 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6406 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6407 | PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6408 | |
| 6409 | .. note:: |
| 6410 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6411 | The ``:forcevariable`` override is not handled specially. This override |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6412 | only works because the default value of :term:`OVERRIDES` includes "forcevariable". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6413 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6414 | If a recipe with the specified version is not available, a warning |
| 6415 | message will be shown. See :term:`REQUIRED_VERSION` if you want this |
| 6416 | to be an error instead. |
| 6417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6418 | :term:`PREMIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6419 | Specifies additional paths from which the OpenEmbedded build system |
| 6420 | gets source code. When the build system searches for source code, it |
| 6421 | first tries the local download directory. If that location fails, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6422 | build system tries locations defined by :term:`PREMIRRORS`, the upstream |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6423 | source, and then locations specified by |
| 6424 | :term:`MIRRORS` in that order. |
| 6425 | |
| 6426 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6427 | the default value for :term:`PREMIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6428 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 6429 | |
| 6430 | Typically, you could add a specific server for the build system to |
| 6431 | attempt before any others by adding something like the following to |
| 6432 | the ``local.conf`` configuration file in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6433 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6434 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6435 | PREMIRRORS:prepend = "\ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6436 | git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6437 | ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6438 | http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6439 | https://.*/.* &YOCTO_DL_URL;/mirror/sources/" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6440 | |
| 6441 | These changes cause the |
| 6442 | build system to intercept Git, FTP, HTTP, and HTTPS requests and |
| 6443 | direct them to the ``http://`` sources mirror. You can use |
| 6444 | ``file://`` URLs to point to local directories or network shares as |
| 6445 | well. |
| 6446 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6447 | :term:`PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6448 | Indicates the importance of a package. |
| 6449 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6450 | :term:`PRIORITY` is considered to be part of the distribution policy |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6451 | because the importance of any given recipe depends on the purpose for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6452 | which the distribution is being produced. Thus, :term:`PRIORITY` is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6453 | normally set within recipes. |
| 6454 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6455 | You can set :term:`PRIORITY` to "required", "standard", "extra", and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6456 | "optional", which is the default. |
| 6457 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6458 | :term:`PRIVATE_LIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6459 | Specifies libraries installed within a recipe that should be ignored |
| 6460 | by the OpenEmbedded build system's shared library resolver. This |
| 6461 | variable is typically used when software being built by a recipe has |
| 6462 | its own private versions of a library normally provided by another |
| 6463 | recipe. In this case, you would not want the package containing the |
| 6464 | private libraries to be set as a dependency on other unrelated |
| 6465 | packages that should instead depend on the package providing the |
| 6466 | standard version of the library. |
| 6467 | |
| 6468 | Libraries specified in this variable should be specified by their |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6469 | file name. For example, from the Firefox recipe in meta-browser:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6470 | |
| 6471 | PRIVATE_LIBS = "libmozjs.so \ |
| 6472 | libxpcom.so \ |
| 6473 | libnspr4.so \ |
| 6474 | libxul.so \ |
| 6475 | libmozalloc.so \ |
| 6476 | libplc4.so \ |
| 6477 | libplds4.so" |
| 6478 | |
| 6479 | For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6480 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6481 | section in the Yocto Project Overview and Concepts Manual. |
| 6482 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6483 | :term:`PROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6484 | A list of aliases by which a particular recipe can be known. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6485 | default, a recipe's own :term:`PN` is implicitly already in its |
| 6486 | :term:`PROVIDES` list and therefore does not need to mention that it |
| 6487 | provides itself. If a recipe uses :term:`PROVIDES`, the additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6488 | aliases are synonyms for the recipe and can be useful for satisfying |
| 6489 | dependencies of other recipes during the build as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6490 | :term:`DEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6491 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6492 | Consider the following example :term:`PROVIDES` statement from the recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6493 | file ``eudev_3.2.9.bb``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6494 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6495 | PROVIDES += "udev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6496 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6497 | The :term:`PROVIDES` statement |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6498 | results in the "eudev" recipe also being available as simply "udev". |
| 6499 | |
| 6500 | .. note:: |
| 6501 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6502 | A recipe's own recipe name (:term:`PN`) is always implicitly prepended |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6503 | to :term:`PROVIDES`, so while using "+=" in the above example may not be |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6504 | strictly necessary it is recommended to avoid confusion. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6505 | |
| 6506 | In addition to providing recipes under alternate names, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6507 | :term:`PROVIDES` mechanism is also used to implement virtual targets. A |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6508 | virtual target is a name that corresponds to some particular |
| 6509 | functionality (e.g. a Linux kernel). Recipes that provide the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6510 | functionality in question list the virtual target in :term:`PROVIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6511 | Recipes that depend on the functionality in question can include the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6512 | virtual target in :term:`DEPENDS` to leave the choice of provider open. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6513 | |
| 6514 | Conventionally, virtual targets have names on the form |
| 6515 | "virtual/function" (e.g. "virtual/kernel"). The slash is simply part |
| 6516 | of the name and has no syntactical significance. |
| 6517 | |
| 6518 | The :term:`PREFERRED_PROVIDER` variable is |
| 6519 | used to select which particular recipe provides a virtual target. |
| 6520 | |
| 6521 | .. note:: |
| 6522 | |
| 6523 | A corresponding mechanism for virtual runtime dependencies |
| 6524 | (packages) exists. However, the mechanism does not depend on any |
| 6525 | special functionality beyond ordinary variable assignments. For |
| 6526 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of |
| 6527 | the component that manages the ``/dev`` directory. |
| 6528 | |
| 6529 | Setting the "preferred provider" for runtime dependencies is as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6530 | simple as using the following assignment in a configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6531 | |
| 6532 | VIRTUAL-RUNTIME_dev_manager = "udev" |
| 6533 | |
| 6534 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6535 | :term:`PRSERV_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6536 | The network based :term:`PR` service host and port. |
| 6537 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 6538 | The ``conf/templates/default/local.conf.sample.extended`` configuration |
| 6539 | file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST` |
| 6540 | variable is set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6541 | |
| 6542 | PRSERV_HOST = "localhost:0" |
| 6543 | |
| 6544 | You must |
| 6545 | set the variable if you want to automatically start a local :ref:`PR |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6546 | service <dev-manual/packages:working with a pr service>`. You can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6547 | set :term:`PRSERV_HOST` to other values to use a remote PR service. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6548 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6549 | |
| 6550 | :term:`PSEUDO_IGNORE_PATHS` |
| 6551 | A comma-separated (without spaces) list of path prefixes that should be ignored |
| 6552 | by pseudo when monitoring and recording file operations, in order to avoid |
| 6553 | problems with files being written to outside of the pseudo context and |
| 6554 | reduce pseudo's overhead. A path is ignored if it matches any prefix in the list |
| 6555 | and can include partial directory (or file) names. |
| 6556 | |
| 6557 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6558 | :term:`PTEST_ENABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6559 | Specifies whether or not :ref:`Package |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6560 | Test <dev-manual/packages:testing packages with ptest>` (ptest) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6561 | functionality is enabled when building a recipe. You should not set |
| 6562 | this variable directly. Enabling and disabling building Package Tests |
| 6563 | at build time should be done by adding "ptest" to (or removing it |
| 6564 | from) :term:`DISTRO_FEATURES`. |
| 6565 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6566 | :term:`PV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6567 | The version of the recipe. The version is normally extracted from the |
| 6568 | recipe filename. For example, if the recipe is named |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6569 | ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1". |
| 6570 | :term:`PV` is generally not overridden within a recipe unless it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6571 | building an unstable (i.e. development) version from a source code |
| 6572 | repository (e.g. Git or Subversion). |
| 6573 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6574 | :term:`PV` is the default value of the :term:`PKGV` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6575 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 6576 | :term:`PYPI_PACKAGE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6577 | When inheriting the :ref:`ref-classes-pypi` class, specifies the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 6578 | `PyPI <https://pypi.org/>`__ package name to be built. The default value |
| 6579 | is set based upon :term:`BPN` (stripping any "python-" or "python3-" |
| 6580 | prefix off if present), however for some packages it will need to be set |
| 6581 | explicitly if that will not match the package name (e.g. where the |
| 6582 | package name has a prefix, underscores, uppercase letters etc.) |
| 6583 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6584 | :term:`PYTHON_ABI` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6585 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 6586 | class, denotes the Application Binary Interface (ABI) currently in use |
| 6587 | for Python. By default, the ABI is "m". You do not have to set this |
| 6588 | variable as the OpenEmbedded build system sets it for you. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6589 | |
| 6590 | The OpenEmbedded build system uses the ABI to construct directory |
| 6591 | names used when installing the Python headers and libraries in |
| 6592 | sysroot (e.g. ``.../python3.3m/...``). |
| 6593 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6594 | :term:`PYTHON_PN` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6595 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 6596 | class, specifies the major Python version being built. For Python 3.x, |
| 6597 | :term:`PYTHON_PN` would be "python3". You do not have to set this |
| 6598 | variable as the OpenEmbedded build system automatically sets it for you. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6599 | |
| 6600 | The variable allows recipes to use common infrastructure such as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6601 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6602 | |
| 6603 | DEPENDS += "${PYTHON_PN}-native" |
| 6604 | |
| 6605 | In the previous example, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6606 | the version of the dependency is :term:`PYTHON_PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6607 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 6608 | :term:`QA_EMPTY_DIRS` |
| 6609 | Specifies a list of directories that are expected to be empty when |
| 6610 | packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or |
| 6611 | :term:`WARN_QA` these will be checked and an error or warning |
| 6612 | (respectively) will be produced. |
| 6613 | |
| 6614 | The default :term:`QA_EMPTY_DIRS` value is set in |
| 6615 | :ref:`insane.bbclass <ref-classes-insane>`. |
| 6616 | |
| 6617 | :term:`QA_EMPTY_DIRS_RECOMMENDATION` |
| 6618 | Specifies a recommendation for why a directory must be empty, |
| 6619 | which will be included in the error message if a specific directory |
| 6620 | is found to contain files. Must be overridden with the directory |
| 6621 | path to match on. |
| 6622 | |
| 6623 | If no recommendation is specified for a directory, then the default |
| 6624 | "but it is expected to be empty" will be used. |
| 6625 | |
| 6626 | An example message shows if files were present in '/dev':: |
| 6627 | |
| 6628 | QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime" |
| 6629 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6630 | :term:`RANLIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6631 | The minimal command and arguments to run ``ranlib``. |
| 6632 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6633 | :term:`RCONFLICTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6634 | The list of packages that conflict with packages. Note that packages |
| 6635 | will not be installed if conflicting packages are not first removed. |
| 6636 | |
| 6637 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6638 | conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6639 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6640 | RCONFLICTS:${PN} = "another_conflicting_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6641 | |
| 6642 | BitBake, which the OpenEmbedded build system uses, supports |
| 6643 | specifying versioned dependencies. Although the syntax varies |
| 6644 | depending on the packaging format, BitBake hides these differences |
| 6645 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6646 | :term:`RCONFLICTS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6647 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6648 | RCONFLICTS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6649 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6650 | For ``operator``, you can specify the following: |
| 6651 | |
| 6652 | - = |
| 6653 | - < |
| 6654 | - > |
| 6655 | - <= |
| 6656 | - >= |
| 6657 | |
| 6658 | For example, the following sets up a dependency on version 1.2 or |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6659 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6660 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6661 | RCONFLICTS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6662 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6663 | :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6664 | Lists runtime dependencies of a package. These dependencies are other |
| 6665 | packages that must be installed in order for the package to function |
| 6666 | correctly. As an example, the following assignment declares that the |
| 6667 | package ``foo`` needs the packages ``bar`` and ``baz`` to be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6668 | installed:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6669 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6670 | RDEPENDS:foo = "bar baz" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6671 | |
| 6672 | The most common types of package |
| 6673 | runtime dependencies are automatically detected and added. Therefore, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6674 | most recipes do not need to set :term:`RDEPENDS`. For more information, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6675 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6676 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6677 | section in the Yocto Project Overview and Concepts Manual. |
| 6678 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6679 | The practical effect of the above :term:`RDEPENDS` assignment is that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6680 | ``bar`` and ``baz`` will be declared as dependencies inside the |
| 6681 | package ``foo`` when it is written out by one of the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6682 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6683 | Exactly how this is done depends on which package format is used, |
| 6684 | which is determined by |
| 6685 | :term:`PACKAGE_CLASSES`. When the |
| 6686 | corresponding package manager installs the package, it will know to |
| 6687 | also install the packages on which it depends. |
| 6688 | |
| 6689 | To ensure that the packages ``bar`` and ``baz`` get built, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6690 | previous :term:`RDEPENDS` assignment also causes a task dependency to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6691 | added. This dependency is from the recipe's |
| 6692 | :ref:`ref-tasks-build` (not to be confused with |
| 6693 | :ref:`ref-tasks-compile`) task to the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6694 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` task of the recipes that build ``bar`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6695 | ``baz``. |
| 6696 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6697 | The names of the packages you list within :term:`RDEPENDS` must be the |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 6698 | names of other packages --- they cannot be recipe names. Although |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6699 | package names and recipe names usually match, the important point |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6700 | here is that you are providing package names within the :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6701 | variable. For an example of the default list of packages created from |
| 6702 | a recipe, see the :term:`PACKAGES` variable. |
| 6703 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6704 | Because the :term:`RDEPENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6705 | you should always use the variable in a form with an attached package |
| 6706 | name (remember that a single recipe can build multiple packages). For |
| 6707 | example, suppose you are building a development package that depends |
| 6708 | on the ``perl`` package. In this case, you would use the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6709 | :term:`RDEPENDS` statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6710 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6711 | RDEPENDS:${PN}-dev += "perl" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6712 | |
| 6713 | In the example, |
| 6714 | the development package depends on the ``perl`` package. Thus, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6715 | :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6716 | the variable. |
| 6717 | |
| 6718 | .. note:: |
| 6719 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6720 | ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6721 | by default. This default is set in the BitBake configuration file |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6722 | (``meta/conf/bitbake.conf``). Be careful not to accidentally remove |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6723 | ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6724 | rather than the "=" operator. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6725 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6726 | The package names you use with :term:`RDEPENDS` must appear as they would |
| 6727 | in the :term:`PACKAGES` variable. The :term:`PKG` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6728 | allows a different name to be used for the final package (e.g. the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6729 | :ref:`ref-classes-debian` class uses this to rename |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6730 | packages), but this final package name cannot be used with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6731 | :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6732 | independent of the package format used. |
| 6733 | |
| 6734 | BitBake, which the OpenEmbedded build system uses, supports |
| 6735 | specifying versioned dependencies. Although the syntax varies |
| 6736 | depending on the packaging format, BitBake hides these differences |
| 6737 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6738 | :term:`RDEPENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6739 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6740 | RDEPENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6741 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6742 | For ``operator``, you can specify the following: |
| 6743 | |
| 6744 | - = |
| 6745 | - < |
| 6746 | - > |
| 6747 | - <= |
| 6748 | - >= |
| 6749 | |
| 6750 | For version, provide the version number. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6751 | |
| 6752 | .. note:: |
| 6753 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6754 | You can use :term:`EXTENDPKGV` to provide a full package version |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6755 | specification. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6756 | |
| 6757 | For example, the following sets up a dependency on version 1.2 or |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6758 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6759 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6760 | RDEPENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6761 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 6762 | For information on build-time dependencies, see the :term:`DEPENDS` |
| 6763 | variable. You can also see the |
| 6764 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 6765 | ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the |
| 6766 | BitBake User Manual for additional information on tasks and dependencies. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6767 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 6768 | :term:`RECIPE_NO_UPDATE_REASON` |
| 6769 | If a recipe should not be replaced by a more recent upstream version, |
| 6770 | putting the reason why in this variable in a recipe allows |
| 6771 | ``devtool check-upgrade-status`` command to display it, as explained |
| 6772 | in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" |
| 6773 | section. |
| 6774 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6775 | :term:`REPODIR` |
| 6776 | See :term:`bitbake:REPODIR` in the BitBake manual. |
| 6777 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6778 | :term:`REQUIRED_DISTRO_FEATURES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6779 | When inheriting the :ref:`ref-classes-features_check` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6780 | class, this variable identifies distribution features that must exist |
| 6781 | in the current configuration in order for the OpenEmbedded build |
| 6782 | system to build the recipe. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6783 | :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not |
| 6784 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6785 | the recipe will be skipped, and if the build system attempts to build |
| 6786 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6787 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6788 | :term:`REQUIRED_VERSION` |
| 6789 | If there are multiple versions of a recipe available, this variable |
| 6790 | determines which version should be given preference. |
| 6791 | :term:`REQUIRED_VERSION` works in exactly the same manner as |
| 6792 | :term:`PREFERRED_VERSION`, except that if the specified version is not |
| 6793 | available then an error message is shown and the build fails |
| 6794 | immediately. |
| 6795 | |
| 6796 | If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set |
| 6797 | for the same recipe, the :term:`REQUIRED_VERSION` value applies. |
| 6798 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6799 | :term:`RM_WORK_EXCLUDE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6800 | With :ref:`ref-classes-rm-work` enabled, this variable |
| 6801 | specifies a list of recipes whose work directories should not be removed. |
| 6802 | See the ":ref:`ref-classes-rm-work`" section for more details. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6803 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6804 | :term:`ROOT_HOME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6805 | Defines the root home directory. By default, this directory is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6806 | follows in the BitBake configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6807 | |
| 6808 | ROOT_HOME ??= "/home/root" |
| 6809 | |
| 6810 | .. note:: |
| 6811 | |
| 6812 | This default value is likely used because some embedded solutions |
| 6813 | prefer to have a read-only root filesystem and prefer to keep |
| 6814 | writeable data in one place. |
| 6815 | |
| 6816 | You can override the default by setting the variable in any layer or |
| 6817 | in the ``local.conf`` file. Because the default is set using a "weak" |
| 6818 | assignment (i.e. "??="), you can use either of the following forms to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6819 | define your override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6820 | |
| 6821 | ROOT_HOME = "/root" |
| 6822 | ROOT_HOME ?= "/root" |
| 6823 | |
| 6824 | These |
| 6825 | override examples use ``/root``, which is probably the most commonly |
| 6826 | used override. |
| 6827 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6828 | :term:`ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6829 | Indicates a filesystem image to include as the root filesystem. |
| 6830 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6831 | The :term:`ROOTFS` variable is an optional variable used with the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6832 | :ref:`ref-classes-image-live` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6833 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6834 | :term:`ROOTFS_POSTINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6835 | Specifies a list of functions to call after the OpenEmbedded build |
| 6836 | system has installed packages. You can specify functions separated by |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6837 | semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6838 | |
| 6839 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " |
| 6840 | |
| 6841 | If you need to pass the root filesystem path to a command within a |
| 6842 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6843 | directory that becomes the root filesystem image. See the |
| 6844 | :term:`IMAGE_ROOTFS` variable for more |
| 6845 | information. |
| 6846 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6847 | :term:`ROOTFS_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6848 | Specifies a list of functions to call once the OpenEmbedded build |
| 6849 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6850 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6851 | |
| 6852 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " |
| 6853 | |
| 6854 | If you need to pass the root filesystem path to a command within a |
| 6855 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6856 | directory that becomes the root filesystem image. See the |
| 6857 | :term:`IMAGE_ROOTFS` variable for more |
| 6858 | information. |
| 6859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6860 | :term:`ROOTFS_POSTUNINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6861 | Specifies a list of functions to call after the OpenEmbedded build |
| 6862 | system has removed unnecessary packages. When runtime package |
| 6863 | management is disabled in the image, several packages are removed |
| 6864 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6865 | You can specify functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6866 | |
| 6867 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " |
| 6868 | |
| 6869 | If you need to pass the root filesystem path to a command within a |
| 6870 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6871 | directory that becomes the root filesystem image. See the |
| 6872 | :term:`IMAGE_ROOTFS` variable for more |
| 6873 | information. |
| 6874 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6875 | :term:`ROOTFS_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6876 | Specifies a list of functions to call before the OpenEmbedded build |
| 6877 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6878 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6879 | |
| 6880 | ROOTFS_PREPROCESS_COMMAND += "function; ... " |
| 6881 | |
| 6882 | If you need to pass the root filesystem path to a command within a |
| 6883 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6884 | directory that becomes the root filesystem image. See the |
| 6885 | :term:`IMAGE_ROOTFS` variable for more |
| 6886 | information. |
| 6887 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6888 | :term:`RPROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6889 | A list of package name aliases that a package also provides. These |
| 6890 | aliases are useful for satisfying runtime dependencies of other |
| 6891 | packages both during the build and on the target (as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6892 | :term:`RDEPENDS`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6893 | |
| 6894 | .. note:: |
| 6895 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6896 | A package's own name is implicitly already in its :term:`RPROVIDES` list. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6897 | |
| 6898 | As with all package-controlling variables, you must always use the |
| 6899 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6900 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6901 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6902 | RPROVIDES:${PN} = "widget-abi-2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6903 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6904 | :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6905 | A list of packages that extends the usability of a package being |
| 6906 | built. The package being built does not depend on this list of |
| 6907 | packages in order to successfully build, but rather uses them for |
| 6908 | extended usability. To specify runtime dependencies for packages, see |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6909 | the :term:`RDEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6910 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6911 | The package manager will automatically install the :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6912 | list of packages when installing the built package. However, you can |
| 6913 | prevent listed packages from being installed by using the |
| 6914 | :term:`BAD_RECOMMENDATIONS`, |
| 6915 | :term:`NO_RECOMMENDATIONS`, and |
| 6916 | :term:`PACKAGE_EXCLUDE` variables. |
| 6917 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6918 | Packages specified in :term:`RRECOMMENDS` need not actually be produced. |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6919 | However, there must be a recipe providing each package, either |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6920 | through the :term:`PACKAGES` or |
| 6921 | :term:`PACKAGES_DYNAMIC` variables or the |
| 6922 | :term:`RPROVIDES` variable, or an error will occur |
| 6923 | during the build. If such a recipe does exist and the package is not |
| 6924 | produced, the build continues without error. |
| 6925 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6926 | Because the :term:`RRECOMMENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6927 | you should always attach an override to the variable to specify the |
| 6928 | particular package whose usability is being extended. For example, |
| 6929 | suppose you are building a development package that is extended to |
| 6930 | support wireless functionality. In this case, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6931 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6932 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6933 | RRECOMMENDS:${PN}-dev += "wireless_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6934 | |
| 6935 | In the |
| 6936 | example, the package name (``${PN}-dev``) must appear as it would in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6937 | the :term:`PACKAGES` namespace before any renaming of the output package |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 6938 | by classes such as :ref:`ref-classes-debian`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6939 | |
| 6940 | BitBake, which the OpenEmbedded build system uses, supports |
| 6941 | specifying versioned recommends. Although the syntax varies depending |
| 6942 | on the packaging format, BitBake hides these differences from you. |
| 6943 | Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6944 | :term:`RRECOMMENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6945 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6946 | RRECOMMENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6947 | |
| 6948 | For ``operator``, you can specify the following: |
| 6949 | |
| 6950 | - = |
| 6951 | - < |
| 6952 | - > |
| 6953 | - <= |
| 6954 | - >= |
| 6955 | |
| 6956 | For example, the following sets up a recommend on version 1.2 or |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6957 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6958 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6959 | RRECOMMENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6960 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6961 | :term:`RREPLACES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6962 | A list of packages replaced by a package. The package manager uses |
| 6963 | this variable to determine which package should be installed to |
| 6964 | replace other package(s) during an upgrade. In order to also have the |
| 6965 | other package(s) removed at the same time, you must add the name of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6966 | the other package to the :term:`RCONFLICTS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6967 | |
| 6968 | As with all package-controlling variables, you must use this variable |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6969 | in conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6970 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6971 | RREPLACES:${PN} = "other_package_being_replaced" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6972 | |
| 6973 | BitBake, which the OpenEmbedded build system uses, supports |
| 6974 | specifying versioned replacements. Although the syntax varies |
| 6975 | depending on the packaging format, BitBake hides these differences |
| 6976 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6977 | :term:`RREPLACES` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6978 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6979 | RREPLACES:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6980 | |
| 6981 | For ``operator``, you can specify the following: |
| 6982 | |
| 6983 | - = |
| 6984 | - < |
| 6985 | - > |
| 6986 | - <= |
| 6987 | - >= |
| 6988 | |
| 6989 | For example, the following sets up a replacement using version 1.2 |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6990 | or greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6991 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6992 | RREPLACES:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6993 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6994 | :term:`RSUGGESTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6995 | A list of additional packages that you can suggest for installation |
| 6996 | by the package manager at the time a package is installed. Not all |
| 6997 | package managers support this functionality. |
| 6998 | |
| 6999 | As with all package-controlling variables, you must always use this |
| 7000 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7001 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7002 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7003 | RSUGGESTS:${PN} = "useful_package another_package" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7004 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7005 | :term:`RUST_CHANNEL` |
| 7006 | Specifies which version of Rust to build - "stable", "beta" or "nightly". |
| 7007 | The default value is "stable". Set this at your own risk, as values other |
| 7008 | than "stable" are not guaranteed to work at a given time. |
| 7009 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7010 | :term:`S` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7011 | The location in the :term:`Build Directory` where |
| 7012 | unpacked recipe source code resides. By default, this directory is |
| 7013 | ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, |
| 7014 | where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe |
| 7015 | version. If the source tarball extracts the code to a directory named |
| 7016 | anything other than ``${BPN}-${PV}``, or if the source code is |
| 7017 | fetched from an SCM such as Git or Subversion, then you must set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7018 | :term:`S` in the recipe so that the OpenEmbedded build system knows where |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7019 | to find the unpacked source. |
| 7020 | |
| 7021 | As an example, assume a :term:`Source Directory` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 7022 | top-level folder named ``poky`` and a default :term:`Build Directory` at |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7023 | ``poky/build``. In this case, the work directory the build system |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7024 | uses to keep the unpacked recipe for ``db`` is the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7025 | |
| 7026 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 |
| 7027 | |
| 7028 | The unpacked source code resides in the ``db-5.1.19`` folder. |
| 7029 | |
| 7030 | This next example assumes a Git repository. By default, Git |
| 7031 | repositories are cloned to ``${WORKDIR}/git`` during |
| 7032 | :ref:`ref-tasks-fetch`. Since this path is different |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7033 | from the default value of :term:`S`, you must set it specifically so the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7034 | source can be located:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7035 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7036 | SRC_URI = "git://path/to/repo.git;branch=main" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7037 | S = "${WORKDIR}/git" |
| 7038 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7039 | :term:`SANITY_REQUIRED_UTILITIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7040 | Specifies a list of command-line utilities that should be checked for |
| 7041 | during the initial sanity checking process when running BitBake. If |
| 7042 | any of the utilities are not installed on the build host, then |
| 7043 | BitBake immediately exits with an error. |
| 7044 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7045 | :term:`SANITY_TESTED_DISTROS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7046 | A list of the host distribution identifiers that the build system has |
| 7047 | been tested against. Identifiers consist of the host distributor ID |
| 7048 | followed by the release, as reported by the ``lsb_release`` tool or |
| 7049 | as read from ``/etc/lsb-release``. Separate the list items with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7050 | explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7051 | not empty and the current value of |
| 7052 | :term:`NATIVELSBSTRING` does not appear in the |
| 7053 | list, then the build system reports a warning that indicates the |
| 7054 | current host distribution has not been tested as a build host. |
| 7055 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7056 | :term:`SDK_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7057 | The target architecture for the SDK. Typically, you do not directly |
| 7058 | set this variable. Instead, use :term:`SDKMACHINE`. |
| 7059 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7060 | :term:`SDK_ARCHIVE_TYPE` |
| 7061 | Specifies the type of archive to create for the SDK. Valid values: |
| 7062 | |
| 7063 | - ``tar.xz`` (default) |
| 7064 | - ``zip`` |
| 7065 | |
| 7066 | Only one archive type can be specified. |
| 7067 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 7068 | :term:`SDK_BUILDINFO_FILE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7069 | When using the :ref:`ref-classes-image-buildinfo` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 7070 | specifies the file in the SDK to write the build information into. The |
| 7071 | default value is "``/buildinfo``". |
| 7072 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7073 | :term:`SDK_CUSTOM_TEMPLATECONF` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7074 | When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 7075 | "1" and a ``conf/templateconf.cfg`` file exists in the :term:`Build Directory` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7076 | (:term:`TOPDIR`) then this will be copied into the SDK. |
| 7077 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7078 | :term:`SDK_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7079 | The directory set up and used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7080 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which the |
| 7081 | SDK is deployed. The :ref:`populate_sdk_base <ref-classes-populate-sdk>` |
| 7082 | class defines :term:`SDK_DEPLOY` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7083 | |
| 7084 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
| 7085 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7086 | :term:`SDK_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7087 | The parent directory used by the OpenEmbedded build system when |
| 7088 | creating SDK output. The |
| 7089 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7090 | the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7091 | |
| 7092 | SDK_DIR = "${WORKDIR}/sdk" |
| 7093 | |
| 7094 | .. note:: |
| 7095 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7096 | The :term:`SDK_DIR` directory is a temporary directory as it is part of |
| 7097 | :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7098 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7099 | :term:`SDK_EXT_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7100 | Controls whether or not shared state artifacts are copied into the |
| 7101 | extensible SDK. The default value of "full" copies all of the |
| 7102 | required shared state artifacts into the extensible SDK. The value |
| 7103 | "minimal" leaves these artifacts out of the SDK. |
| 7104 | |
| 7105 | .. note:: |
| 7106 | |
| 7107 | If you set the variable to "minimal", you need to ensure |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7108 | :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the |
| 7109 | artifacts to be fetched as needed. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7110 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7111 | :term:`SDK_HOST_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7112 | The manifest file for the host part of the SDK. This file lists all |
| 7113 | the installed packages that make up the host part of the SDK. The |
| 7114 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7115 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7116 | |
| 7117 | packagename packagearch version |
| 7118 | |
| 7119 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7120 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7121 | |
| 7122 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
| 7123 | |
| 7124 | The location is derived using the :term:`SDK_DEPLOY` and |
| 7125 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 7126 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7127 | :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7128 | When set to "1", specifies to include the packagedata for all recipes |
| 7129 | in the "world" target in the extensible SDK. Including this data |
| 7130 | allows the ``devtool search`` command to find these recipes in search |
| 7131 | results, as well as allows the ``devtool add`` command to map |
| 7132 | dependencies more effectively. |
| 7133 | |
| 7134 | .. note:: |
| 7135 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7136 | Enabling the :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7137 | variable significantly increases build time because all of world |
| 7138 | needs to be built. Enabling the variable also slightly increases |
| 7139 | the size of the extensible SDK. |
| 7140 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7141 | :term:`SDK_INCLUDE_TOOLCHAIN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7142 | When set to "1", specifies to include the toolchain in the extensible |
| 7143 | SDK. Including the toolchain is useful particularly when |
| 7144 | :term:`SDK_EXT_TYPE` is set to "minimal" to keep |
| 7145 | the SDK reasonably small but you still want to provide a usable |
| 7146 | toolchain. For example, suppose you want to use the toolchain from an |
| 7147 | IDE or from other tools and you do not want to perform additional |
| 7148 | steps to install the toolchain. |
| 7149 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7150 | The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if |
| 7151 | :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if |
| 7152 | :term:`SDK_EXT_TYPE` is set to "full". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7153 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7154 | :term:`SDK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7155 | The base name for SDK output files. The name is derived from the |
| 7156 | :term:`DISTRO`, :term:`TCLIBC`, |
| 7157 | :term:`SDK_ARCH`, |
| 7158 | :term:`IMAGE_BASENAME`, and |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7159 | :term:`TUNE_PKGARCH` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7160 | |
| 7161 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" |
| 7162 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7163 | :term:`SDK_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7164 | Specifies the operating system for which the SDK will be built. The |
| 7165 | default value is the value of :term:`BUILD_OS`. |
| 7166 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7167 | :term:`SDK_OUTPUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7168 | The location used by the OpenEmbedded build system when creating SDK |
| 7169 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7170 | class defines the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7171 | |
| 7172 | SDK_DIR = "${WORKDIR}/sdk" |
| 7173 | SDK_OUTPUT = "${SDK_DIR}/image" |
| 7174 | SDK_DEPLOY = "${DEPLOY_DIR}/sdk" |
| 7175 | |
| 7176 | .. note:: |
| 7177 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7178 | The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7179 | :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is |
| 7180 | :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7182 | :term:`SDK_PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7183 | Specifies a list of architectures compatible with the SDK machine. |
| 7184 | This variable is set automatically and should not normally be |
| 7185 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7186 | of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7187 | noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". |
| 7188 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7189 | :term:`SDK_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7190 | Specifies a list of functions to call once the OpenEmbedded build |
| 7191 | system creates the SDK. You can specify functions separated by |
| 7192 | semicolons: SDK_POSTPROCESS_COMMAND += "function; ... " |
| 7193 | |
| 7194 | If you need to pass an SDK path to a command within a function, you |
| 7195 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 7196 | the OpenEmbedded build system when creating SDK output. See the |
| 7197 | :term:`SDK_DIR` variable for more information. |
| 7198 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7199 | :term:`SDK_PREFIX` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7200 | The toolchain binary prefix used for |
| 7201 | :ref:`ref-classes-nativesdk` recipes. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7202 | OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7203 | :term:`TARGET_PREFIX` when building |
| 7204 | ``nativesdk`` recipes. The default value is "${SDK_SYS}-". |
| 7205 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7206 | :term:`SDK_RECRDEP_TASKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7207 | A list of shared state tasks added to the extensible SDK. By default, |
| 7208 | the following tasks are added: |
| 7209 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 7210 | - :ref:`ref-tasks-populate_lic` |
| 7211 | - :ref:`ref-tasks-package_qa` |
| 7212 | - :ref:`ref-tasks-populate_sysroot` |
| 7213 | - :ref:`ref-tasks-deploy` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7214 | |
| 7215 | Despite the default value of "" for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7216 | :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7217 | to the SDK. To specify tasks beyond these four, you need to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7218 | :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7219 | tasks that are needed in order to build |
| 7220 | :term:`SDK_TARGETS`). |
| 7221 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7222 | :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7223 | Specifies the system, including the architecture and the operating |
| 7224 | system, for which the SDK will be built. |
| 7225 | |
| 7226 | The OpenEmbedded build system automatically sets this variable based |
| 7227 | on :term:`SDK_ARCH`, |
| 7228 | :term:`SDK_VENDOR`, and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7229 | :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7230 | variable yourself. |
| 7231 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7232 | :term:`SDK_TARGET_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7233 | The manifest file for the target part of the SDK. This file lists all |
| 7234 | the installed packages that make up the target part of the SDK. The |
| 7235 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7236 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7237 | |
| 7238 | packagename packagearch version |
| 7239 | |
| 7240 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7241 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7242 | |
| 7243 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
| 7244 | |
| 7245 | The location is derived using the :term:`SDK_DEPLOY` and |
| 7246 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 7247 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7248 | :term:`SDK_TARGETS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7249 | A list of targets to install from shared state as part of the |
| 7250 | standard or extensible SDK installation. The default value is "${PN}" |
| 7251 | (i.e. the image from which the SDK is built). |
| 7252 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7253 | The :term:`SDK_TARGETS` variable is an internal variable and typically |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7254 | would not be changed. |
| 7255 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7256 | :term:`SDK_TITLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7257 | The title to be printed when running the SDK installer. By default, |
| 7258 | this title is based on the :term:`DISTRO_NAME` or |
| 7259 | :term:`DISTRO` variable and is set in the |
| 7260 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7261 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7262 | |
| 7263 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
| 7264 | |
| 7265 | For the default distribution "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7266 | :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7267 | |
| 7268 | For information on how to change this default title, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7269 | ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7270 | section in the Yocto Project Application Development and the |
| 7271 | Extensible Software Development Kit (eSDK) manual. |
| 7272 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 7273 | :term:`SDK_TOOLCHAIN_LANGS` |
| 7274 | Specifies programming languages to support in the SDK, as a |
| 7275 | space-separated list. Currently supported items are ``rust`` and ``go``. |
| 7276 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7277 | :term:`SDK_UPDATE_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7278 | An optional URL for an update server for the extensible SDK. If set, |
| 7279 | the value is used as the default update server when running |
| 7280 | ``devtool sdk-update`` within the extensible SDK. |
| 7281 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7282 | :term:`SDK_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7283 | Specifies the name of the SDK vendor. |
| 7284 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7285 | :term:`SDK_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7286 | Specifies the version of the SDK. The Poky distribution configuration file |
| 7287 | (``/meta-poky/conf/distro/poky.conf``) sets the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7288 | :term:`SDK_VERSION` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7289 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7290 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7291 | |
| 7292 | For additional information, see the |
| 7293 | :term:`DISTRO_VERSION` and |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7294 | :term:`METADATA_REVISION` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7295 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7296 | :term:`SDK_ZIP_OPTIONS` |
| 7297 | Specifies extra options to pass to the ``zip`` command when zipping the SDK |
| 7298 | (i.e. when :term:`SDK_ARCHIVE_TYPE` is set to "zip"). The default value is |
| 7299 | "-y". |
| 7300 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7301 | :term:`SDKEXTPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7302 | The default installation directory for the Extensible SDK. By |
| 7303 | default, this directory is based on the :term:`DISTRO` |
| 7304 | variable and is set in the |
| 7305 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7306 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7307 | |
| 7308 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
| 7309 | |
| 7310 | For the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7311 | default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7312 | |
| 7313 | For information on how to change this default directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7314 | ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7315 | section in the Yocto Project Application Development and the |
| 7316 | Extensible Software Development Kit (eSDK) manual. |
| 7317 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7318 | :term:`SDKIMAGE_FEATURES` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7319 | Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7320 | the SDK generated from an image using the following command:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7321 | |
| 7322 | $ bitbake -c populate_sdk imagename |
| 7323 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7324 | :term:`SDKMACHINE` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7325 | The machine for which the SDK is built. In other words, the SDK is built |
| 7326 | such that it runs on the target you specify with the :term:`SDKMACHINE` |
| 7327 | value. The value points to a corresponding ``.conf`` file under |
| 7328 | ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``, |
| 7329 | ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are |
| 7330 | :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7331 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7332 | The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the |
| 7333 | architecture of the build machine. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7334 | |
| 7335 | .. note:: |
| 7336 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7337 | You cannot set the :term:`SDKMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7338 | variable in your distribution configuration file. If you do, the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7339 | configuration will not take effect. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7340 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7341 | :term:`SDKPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7342 | Defines the path offered to the user for installation of the SDK that |
| 7343 | is generated by the OpenEmbedded build system. The path appears as |
| 7344 | the default location for installing the SDK when you run the SDK's |
| 7345 | installation script. You can override the offered path when you run |
| 7346 | the script. |
| 7347 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7348 | :term:`SDKTARGETSYSROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7349 | The full path to the sysroot used for cross-compilation within an SDK |
| 7350 | as it will be when installed into the default |
| 7351 | :term:`SDKPATH`. |
| 7352 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7353 | :term:`SECTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7354 | The section in which packages should be categorized. Package |
| 7355 | management utilities can make use of this variable. |
| 7356 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7357 | :term:`SELECTED_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7358 | Specifies the optimization flags passed to the C compiler when |
| 7359 | building for the target. The flags are passed through the default |
| 7360 | value of the :term:`TARGET_CFLAGS` variable. |
| 7361 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7362 | The :term:`SELECTED_OPTIMIZATION` variable takes the value of |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 7363 | :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which |
| 7364 | case the value of :term:`DEBUG_OPTIMIZATION` is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7365 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7366 | :term:`SERIAL_CONSOLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7367 | Defines a serial console (TTY) to enable using |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7368 | :wikipedia:`getty <Getty_(Unix)>`. Provide a value that specifies the |
| 7369 | baud rate followed by the TTY device name separated by a semicolon. |
| 7370 | Use spaces to separate multiple devices:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7371 | |
| 7372 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" |
| 7373 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7374 | :term:`SERIAL_CONSOLES_CHECK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7375 | Specifies serial consoles, which must be listed in |
| 7376 | :term:`SERIAL_CONSOLES`, to check against |
| 7377 | ``/proc/console`` before enabling them using getty. This variable |
| 7378 | allows aliasing in the format: <device>:<alias>. If a device was |
| 7379 | listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7380 | ``/proc/console``, you would do the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7381 | |
| 7382 | SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0" |
| 7383 | |
| 7384 | This variable is currently only supported with SysVinit (i.e. not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7385 | with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires |
| 7386 | ``/etc/inittab`` to be writable when used with SysVinit. This makes it |
| 7387 | incompatible with customizations such as the following:: |
| 7388 | |
| 7389 | EXTRA_IMAGE_FEATURES += "read-only-rootfs" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7390 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7391 | :term:`SETUPTOOLS_BUILD_ARGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7392 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 7393 | class, this variable can be used to specify additional arguments to be |
| 7394 | passed to ``setup.py build`` in the ``setuptools3_do_compile()`` task. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7395 | |
| 7396 | :term:`SETUPTOOLS_INSTALL_ARGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7397 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 7398 | class, this variable can be used to specify additional arguments to be |
| 7399 | passed to ``setup.py install`` in the ``setuptools3_do_install()`` task. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7400 | |
| 7401 | :term:`SETUPTOOLS_SETUP_PATH` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7402 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 7403 | class, this variable should be used to specify the directory in which |
| 7404 | the ``setup.py`` file is located if it is not at the root of the source |
| 7405 | tree (as specified by :term:`S`). For example, in a recipe where the |
| 7406 | sources are fetched from a Git repository and ``setup.py`` is in a |
| 7407 | ``python/pythonmodule`` subdirectory, you would have this:: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7408 | |
| 7409 | S = "${WORKDIR}/git" |
| 7410 | SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule" |
| 7411 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7412 | :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7413 | A list of recipe dependencies that should not be used to determine |
| 7414 | signatures of tasks from one recipe when they depend on tasks from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7415 | another recipe. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7416 | |
| 7417 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" |
| 7418 | |
| 7419 | In the previous example, ``intone`` depends on ``mplayer2``. |
| 7420 | |
| 7421 | You can use the special token ``"*"`` on the left-hand side of the |
| 7422 | dependency to match all recipes except the one on the right-hand |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7423 | side. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7424 | |
| 7425 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" |
| 7426 | |
| 7427 | In the previous example, all recipes except ``quilt-native`` ignore |
| 7428 | task signatures from the ``quilt-native`` recipe when determining |
| 7429 | their task signatures. |
| 7430 | |
| 7431 | Use of this variable is one mechanism to remove dependencies that |
| 7432 | affect task signatures and thus force rebuilds when a recipe changes. |
| 7433 | |
| 7434 | .. note:: |
| 7435 | |
| 7436 | If you add an inappropriate dependency for a recipe relationship, |
| 7437 | the software might break during runtime if the interface of the |
| 7438 | second recipe was changed after the first recipe had been built. |
| 7439 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7440 | :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7441 | A list of recipes that are completely stable and will never change. |
| 7442 | The ABI for the recipes in the list are presented by output from the |
| 7443 | tasks run to build the recipe. Use of this variable is one way to |
| 7444 | remove dependencies from one recipe on another that affect task |
| 7445 | signatures and thus force rebuilds when the recipe changes. |
| 7446 | |
| 7447 | .. note:: |
| 7448 | |
| 7449 | If you add an inappropriate variable to this list, the software |
| 7450 | might break at runtime if the interface of the recipe was changed |
| 7451 | after the other had been built. |
| 7452 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7453 | :term:`SITEINFO_BITS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7454 | Specifies the number of bits for the target system CPU. The value |
| 7455 | should be either "32" or "64". |
| 7456 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7457 | :term:`SITEINFO_ENDIANNESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7458 | Specifies the endian byte order of the target system. The value |
| 7459 | should be either "le" for little-endian or "be" for big-endian. |
| 7460 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7461 | :term:`SKIP_FILEDEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7462 | Enables removal of all files from the "Provides" section of an RPM |
| 7463 | package. Removal of these files is required for packages containing |
| 7464 | prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. |
| 7465 | |
| 7466 | To enable file removal, set the variable to "1" in your |
| 7467 | ``conf/local.conf`` configuration file in your: |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 7468 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7469 | |
| 7470 | SKIP_FILEDEPS = "1" |
| 7471 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7472 | :term:`SKIP_RECIPE` |
| 7473 | Used to prevent the OpenEmbedded build system from building a given |
| 7474 | recipe. Specify the :term:`PN` value as a variable flag (``varflag``) |
| 7475 | and provide a reason, which will be reported when attempting to |
| 7476 | build the recipe. |
| 7477 | |
| 7478 | To prevent a recipe from being built, use the :term:`SKIP_RECIPE` |
| 7479 | variable in your ``local.conf`` file or distribution configuration. |
| 7480 | Here is an example which prevents ``myrecipe`` from being built:: |
| 7481 | |
| 7482 | SKIP_RECIPE[myrecipe] = "Not supported by our organization." |
| 7483 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7484 | :term:`SOC_FAMILY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7485 | Groups together machines based upon the same family of SOC (System On |
| 7486 | Chip). You typically set this variable in a common ``.inc`` file that |
| 7487 | you include in the configuration files of all the machines. |
| 7488 | |
| 7489 | .. note:: |
| 7490 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7491 | You must include ``conf/machine/include/soc-family.inc`` for this |
| 7492 | variable to appear in :term:`MACHINEOVERRIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7493 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7494 | :term:`SOLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7495 | Defines the suffix for shared libraries used on the target platform. |
| 7496 | By default, this suffix is ".so.*" for all Linux-based systems and is |
| 7497 | defined in the ``meta/conf/bitbake.conf`` configuration file. |
| 7498 | |
| 7499 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7500 | ``FILES:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7501 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7502 | :term:`SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7503 | Defines the suffix for the development symbolic link (symlink) for |
| 7504 | shared libraries on the target platform. By default, this suffix is |
| 7505 | ".so" for Linux-based systems and is defined in the |
| 7506 | ``meta/conf/bitbake.conf`` configuration file. |
| 7507 | |
| 7508 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7509 | ``FILES:${PN}-dev``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7510 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 7511 | :term:`SOURCE_DATE_EPOCH` |
| 7512 | This defines a date expressed in number of seconds since |
| 7513 | the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by |
| 7514 | multiple build systems to force a timestamp in built binaries. |
| 7515 | Many upstream projects already support this variable. |
| 7516 | |
| 7517 | You will find more details in the `official specifications |
| 7518 | <https://reproducible-builds.org/specs/source-date-epoch/>`__. |
| 7519 | |
| 7520 | A value for each recipe is computed from the sources by |
| 7521 | :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`. |
| 7522 | |
| 7523 | If a recipe wishes to override the default behavior, it should set its |
| 7524 | own :term:`SOURCE_DATE_EPOCH` value:: |
| 7525 | |
| 7526 | SOURCE_DATE_EPOCH = "1613559011" |
| 7527 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7528 | :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7529 | When you are fetching files to create a mirror of sources (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7530 | creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7531 | your ``local.conf`` configuration file ensures the source for all |
| 7532 | recipes are fetched regardless of whether or not a recipe is |
| 7533 | compatible with the configuration. A recipe is considered |
| 7534 | incompatible with the currently configured machine when either or |
| 7535 | both the :term:`COMPATIBLE_MACHINE` |
| 7536 | variable and :term:`COMPATIBLE_HOST` variables |
| 7537 | specify compatibility with a machine other than that of the current |
| 7538 | machine or host. |
| 7539 | |
| 7540 | .. note:: |
| 7541 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7542 | Do not set the :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7543 | variable unless you are creating a source mirror. In other words, |
| 7544 | do not set the variable during a normal build. |
| 7545 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7546 | :term:`SOURCE_MIRROR_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7547 | Defines your own :term:`PREMIRRORS` from which to |
| 7548 | first fetch source before attempting to fetch from the upstream |
| 7549 | specified in :term:`SRC_URI`. |
| 7550 | |
| 7551 | To use this variable, you must globally inherit the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7552 | :ref:`ref-classes-own-mirrors` class and then provide |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7553 | the URL to your mirrors. Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7554 | |
| 7555 | INHERIT += "own-mirrors" |
| 7556 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" |
| 7557 | |
| 7558 | .. note:: |
| 7559 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7560 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7561 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7562 | :term:`SPDX_ARCHIVE_PACKAGED` |
| 7563 | This option allows to add to :term:`SPDX` output compressed archives |
| 7564 | of the files in the generated target packages. |
| 7565 | |
| 7566 | Such archives are available in |
| 7567 | ``tmp/deploy/spdx/MACHINE/packages/packagename.tar.zst`` |
| 7568 | under the :term:`Build Directory`. |
| 7569 | |
| 7570 | Enable this option as follows:: |
| 7571 | |
| 7572 | SPDX_ARCHIVE_PACKAGED = "1" |
| 7573 | |
| 7574 | According to our tests on release 4.1 "langdale", building |
| 7575 | ``core-image-minimal`` for the ``qemux86-64`` machine, enabling this |
| 7576 | option multiplied the size of the ``tmp/deploy/spdx`` directory by a |
| 7577 | factor of 13 (+1.6 GiB for this image), compared to just using the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7578 | :ref:`ref-classes-create-spdx` class with no option. |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7579 | |
| 7580 | Note that this option doesn't increase the size of :term:`SPDX` |
| 7581 | files in ``tmp/deploy/images/MACHINE``. |
| 7582 | |
| 7583 | :term:`SPDX_ARCHIVE_SOURCES` |
| 7584 | This option allows to add to :term:`SPDX` output compressed archives |
| 7585 | of the sources for packages installed on the target. It currently |
| 7586 | only works when :term:`SPDX_INCLUDE_SOURCES` is set. |
| 7587 | |
| 7588 | This is one way of fulfilling "source code access" license |
| 7589 | requirements. |
| 7590 | |
| 7591 | Such source archives are available in |
| 7592 | ``tmp/deploy/spdx/MACHINE/recipes/recipe-packagename.tar.zst`` |
| 7593 | under the :term:`Build Directory`. |
| 7594 | |
| 7595 | Enable this option as follows:: |
| 7596 | |
| 7597 | SPDX_INCLUDE_SOURCES = "1" |
| 7598 | SPDX_ARCHIVE_SOURCES = "1" |
| 7599 | |
| 7600 | According to our tests on release 4.1 "langdale", building |
| 7601 | ``core-image-minimal`` for the ``qemux86-64`` machine, enabling |
| 7602 | these options multiplied the size of the ``tmp/deploy/spdx`` |
| 7603 | directory by a factor of 11 (+1.4 GiB for this image), |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7604 | compared to just using the :ref:`ref-classes-create-spdx` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7605 | class with no option. |
| 7606 | |
| 7607 | Note that using this option only marginally increases the size |
| 7608 | of the :term:`SPDX` output in ``tmp/deploy/images/MACHINE/`` |
| 7609 | (+ 0.07\% with the tested image), compared to just enabling |
| 7610 | :term:`SPDX_INCLUDE_SOURCES`. |
| 7611 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7612 | :term:`SPDX_CUSTOM_ANNOTATION_VARS` |
| 7613 | This option allows to associate `SPDX annotations |
| 7614 | <https://spdx.github.io/spdx-spec/v2.3/annotations/>`__ to a recipe, |
| 7615 | using the values of variables in the recipe:: |
| 7616 | |
| 7617 | ANNOTATION1 = "First annotation for recipe" |
| 7618 | ANNOTATION2 = "Second annotation for recipe" |
| 7619 | SPDX_CUSTOM_ANNOTATION_VARS = "ANNOTATION1 ANNOTATION2" |
| 7620 | |
| 7621 | This will add a new block to the recipe ``.sdpx.json`` output:: |
| 7622 | |
| 7623 | "annotations": [ |
| 7624 | { |
| 7625 | "annotationDate": "2023-04-18T08:32:12Z", |
| 7626 | "annotationType": "OTHER", |
| 7627 | "annotator": "Tool: oe-spdx-creator - 1.0", |
| 7628 | "comment": "ANNOTATION1=First annotation for recipe" |
| 7629 | }, |
| 7630 | { |
| 7631 | "annotationDate": "2023-04-18T08:32:12Z", |
| 7632 | "annotationType": "OTHER", |
| 7633 | "annotator": "Tool: oe-spdx-creator - 1.0", |
| 7634 | "comment": "ANNOTATION2=Second annotation for recipe" |
| 7635 | } |
| 7636 | ], |
| 7637 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7638 | :term:`SPDX_INCLUDE_SOURCES` |
| 7639 | This option allows to add a description of the source files used to build |
| 7640 | the host tools and the target packages, to the ``spdx.json`` files in |
| 7641 | ``tmp/deploy/spdx/MACHINE/recipes/`` under the :term:`Build Directory`. |
| 7642 | As a consequence, the ``spdx.json`` files under the ``by-namespace`` and |
| 7643 | ``packages`` subdirectories in ``tmp/deploy/spdx/MACHINE`` are also |
| 7644 | modified to include references to such source file descriptions. |
| 7645 | |
| 7646 | Enable this option as follows:: |
| 7647 | |
| 7648 | SPDX_INCLUDE_SOURCES = "1" |
| 7649 | |
| 7650 | According to our tests on release 4.1 "langdale", building |
| 7651 | ``core-image-minimal`` for the ``qemux86-64`` machine, enabling |
| 7652 | this option multiplied the total size of the ``tmp/deploy/spdx`` |
| 7653 | directory by a factor of 3 (+291 MiB for this image), |
| 7654 | and the size of the ``IMAGE-MACHINE.spdx.tar.zst`` in |
| 7655 | ``tmp/deploy/images/MACHINE`` by a factor of 130 (+15 MiB for this |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7656 | image), compared to just using the :ref:`ref-classes-create-spdx` class |
| 7657 | with no option. |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7658 | |
| 7659 | :term:`SPDX_PRETTY` |
| 7660 | This option makes the SPDX output more human-readable, using |
| 7661 | identation and newlines, instead of the default output in a |
| 7662 | single line:: |
| 7663 | |
| 7664 | SPDX_PRETTY = "1" |
| 7665 | |
| 7666 | The generated SPDX files are approximately 20% bigger, but |
| 7667 | this option is recommended if you want to inspect the SPDX |
| 7668 | output files with a text editor. |
| 7669 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7670 | :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7671 | Maps commonly used license names to their SPDX counterparts found in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7672 | ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7673 | mappings, see the ``meta/conf/licenses.conf`` file. |
| 7674 | |
| 7675 | For additional information, see the :term:`LICENSE` |
| 7676 | variable. |
| 7677 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7678 | :term:`SPECIAL_PKGSUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7679 | A list of prefixes for :term:`PN` used by the OpenEmbedded |
| 7680 | build system to create variants of recipes or packages. The list |
| 7681 | specifies the prefixes to strip off during certain circumstances such |
| 7682 | as the generation of the :term:`BPN` variable. |
| 7683 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7684 | :term:`SPL_BINARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7685 | The file type for the Secondary Program Loader (SPL). Some devices |
| 7686 | use an SPL from which to boot (e.g. the BeagleBone development |
| 7687 | board). For such cases, you can declare the file type of the SPL |
| 7688 | binary in the ``u-boot.inc`` include file, which is used in the |
| 7689 | U-Boot recipe. |
| 7690 | |
| 7691 | The SPL file type is set to "null" by default in the ``u-boot.inc`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7692 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7693 | |
| 7694 | # Some versions of u-boot build an SPL (Second Program Loader) image that |
| 7695 | # should be packaged along with the u-boot binary as well as placed in the |
| 7696 | # deploy directory. For those versions they can set the following variables |
| 7697 | # to allow packaging the SPL. |
| 7698 | SPL_BINARY ?= "" |
| 7699 | SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" |
| 7700 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" |
| 7701 | SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" |
| 7702 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7703 | The :term:`SPL_BINARY` variable helps form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7704 | various ``SPL_*`` variables used by the OpenEmbedded build system. |
| 7705 | |
| 7706 | See the BeagleBone machine configuration example in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7707 | ":ref:`dev-manual/layers:adding a layer using the \`\`bitbake-layers\`\` script`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7708 | section in the Yocto Project Board Support Package Developer's Guide |
| 7709 | for additional information. |
| 7710 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7711 | :term:`SRCREV_FORMAT` |
| 7712 | See :term:`bitbake:SRCREV_FORMAT` in the BitBake manual. |
| 7713 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7714 | :term:`SRC_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7715 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7716 | See the BitBake manual for the initial description for this variable: |
| 7717 | :term:`bitbake:SRC_URI`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7718 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7719 | The following features are added by OpenEmbedded and the Yocto Project. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7720 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7721 | There are standard and recipe-specific options. Here are standard ones: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7722 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7723 | - ``apply`` --- whether to apply the patch or not. The default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7724 | action is to apply the patch. |
| 7725 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7726 | - ``striplevel`` --- which striplevel to use when applying the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7727 | patch. The default level is 1. |
| 7728 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7729 | - ``patchdir`` --- specifies the directory in which the patch should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7730 | be applied. The default is ``${``\ :term:`S`\ ``}``. |
| 7731 | |
| 7732 | Here are options specific to recipes building code from a revision |
| 7733 | control system: |
| 7734 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7735 | - ``mindate`` --- apply the patch only if |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7736 | :term:`SRCDATE` is equal to or greater than |
| 7737 | ``mindate``. |
| 7738 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7739 | - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7740 | than ``maxdate``. |
| 7741 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7742 | - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7743 | greater than ``minrev``. |
| 7744 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7745 | - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7746 | than ``maxrev``. |
| 7747 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7748 | - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7749 | ``rev``. |
| 7750 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7751 | - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7752 | ``rev``. |
| 7753 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7754 | .. note:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7755 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7756 | If you want the build system to pick up files specified through |
| 7757 | a :term:`SRC_URI` statement from your append file, you need to be |
| 7758 | sure to extend the :term:`FILESPATH` variable by also using the |
| 7759 | :term:`FILESEXTRAPATHS` variable from within your append file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7760 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7761 | :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7762 | By default, the OpenEmbedded build system automatically detects |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7763 | whether :term:`SRC_URI` contains files that are machine-specific. If so, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7764 | the build system automatically changes :term:`PACKAGE_ARCH`. Setting this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7765 | variable to "0" disables this behavior. |
| 7766 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7767 | :term:`SRCDATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7768 | The date of the source code used to build the package. This variable |
| 7769 | applies only if the source was fetched from a Source Code Manager |
| 7770 | (SCM). |
| 7771 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7772 | :term:`SRCPV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7773 | Returns the version string of the current package. This string is |
| 7774 | used to help define the value of :term:`PV`. |
| 7775 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7776 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7777 | configuration file in the :term:`Source Directory` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7778 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7779 | |
| 7780 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
| 7781 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7782 | Recipes that need to define :term:`PV` do so with the help of the |
| 7783 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7784 | located in ``meta/recipes-connectivity`` in the Source Directory |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7785 | defines :term:`PV` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7786 | |
| 7787 | PV = "0.12-git${SRCPV}" |
| 7788 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7789 | :term:`SRCREV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7790 | The revision of the source code used to build the package. This |
| 7791 | variable applies to Subversion, Git, Mercurial, and Bazaar only. Note |
| 7792 | that if you want to build a fixed revision and you want to avoid |
| 7793 | performing a query on the remote repository every time BitBake parses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7794 | your recipe, you should specify a :term:`SRCREV` that is a full revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7795 | identifier and not just a tag. |
| 7796 | |
| 7797 | .. note:: |
| 7798 | |
| 7799 | For information on limitations when inheriting the latest revision |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7800 | of software using :term:`SRCREV`, see the :term:`AUTOREV` variable |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7801 | description and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7802 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7803 | section, which is in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7804 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7805 | :term:`SRCTREECOVEREDTASKS` |
| 7806 | A list of tasks that are typically not relevant (and therefore skipped) |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7807 | when building using the :ref:`ref-classes-externalsrc` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7808 | class. The default value as set in that class file is the set of tasks |
| 7809 | that are rarely needed when using external source:: |
| 7810 | |
| 7811 | SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" |
| 7812 | |
| 7813 | The notable exception is when processing external kernel source as |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7814 | defined in the :ref:`ref-classes-kernel-yocto` class file (formatted for |
| 7815 | aesthetics):: |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7816 | |
| 7817 | SRCTREECOVEREDTASKS += "\ |
| 7818 | do_validate_branches \ |
| 7819 | do_kernel_configcheck \ |
| 7820 | do_kernel_checkout \ |
| 7821 | do_fetch \ |
| 7822 | do_unpack \ |
| 7823 | do_patch \ |
| 7824 | " |
| 7825 | |
| 7826 | See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` |
| 7827 | variables for more information. |
| 7828 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7829 | :term:`SSTATE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7830 | The directory for the shared state cache. |
| 7831 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7832 | :term:`SSTATE_EXCLUDEDEPS_SYSROOT` |
| 7833 | This variable allows to specify indirect dependencies to exclude |
| 7834 | from sysroots, for example to avoid the situations when a dependency on |
| 7835 | any ``-native`` recipe will pull in all dependencies of that recipe |
| 7836 | in the recipe sysroot. This behaviour might not always be wanted, |
| 7837 | for example when that ``-native`` recipe depends on build tools |
| 7838 | that are not relevant for the current recipe. |
| 7839 | |
| 7840 | This way, irrelevant dependencies are ignored, which could have |
| 7841 | prevented the reuse of prebuilt artifacts stored in the Shared |
| 7842 | State Cache. |
| 7843 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7844 | :term:`SSTATE_EXCLUDEDEPS_SYSROOT` is evaluated as two regular |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7845 | expressions of recipe and dependency to ignore. An example |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 7846 | is the rule in :oe_git:`meta/conf/layer.conf </openembedded-core/tree/meta/conf/layer.conf>`:: |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7847 | |
| 7848 | # Nothing needs to depend on libc-initial |
| 7849 | # base-passwd/shadow-sysroot don't need their dependencies |
| 7850 | SSTATE_EXCLUDEDEPS_SYSROOT += "\ |
| 7851 | .*->.*-initial.* \ |
| 7852 | .*(base-passwd|shadow-sysroot)->.* \ |
| 7853 | " |
| 7854 | |
| 7855 | The ``->`` substring represents the dependency between |
| 7856 | the two regular expressions. |
| 7857 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7858 | :term:`SSTATE_MIRROR_ALLOW_NETWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7859 | If set to "1", allows fetches from mirrors that are specified in |
| 7860 | :term:`SSTATE_MIRRORS` to work even when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7861 | fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to |
| 7862 | "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if |
| 7863 | you have set :term:`SSTATE_MIRRORS` to point to an internal server for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7864 | your shared state cache, but you want to disable any other fetching |
| 7865 | from the network. |
| 7866 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7867 | :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7868 | Configures the OpenEmbedded build system to search other mirror |
| 7869 | locations for prebuilt cache data objects before building out the |
| 7870 | data. This variable works like fetcher :term:`MIRRORS` |
| 7871 | and :term:`PREMIRRORS` and points to the cache |
| 7872 | locations to check for the shared state (sstate) objects. |
| 7873 | |
| 7874 | You can specify a filesystem directory or a remote URL such as HTTP |
| 7875 | or FTP. The locations you specify need to contain the shared state |
| 7876 | cache (sstate-cache) results from previous builds. The sstate-cache |
| 7877 | you point to can also be from builds on other machines. |
| 7878 | |
| 7879 | When pointing to sstate build artifacts on another machine that uses |
| 7880 | a different GCC version for native builds, you must configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7881 | :term:`SSTATE_MIRRORS` with a regular expression that maps local search |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7882 | paths to server paths. The paths need to take into account |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7883 | :term:`NATIVELSBSTRING` set by the :ref:`ref-classes-uninative` class. |
| 7884 | For example, the following maps the local search path ``universal-4.9`` |
| 7885 | to the server-provided path server_url_sstate_path:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7886 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7887 | SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7888 | |
| 7889 | If a mirror uses the same structure as |
| 7890 | :term:`SSTATE_DIR`, you need to add "PATH" at the |
| 7891 | end as shown in the examples below. The build system substitutes the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7892 | correct path within the directory structure:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7893 | |
| 7894 | SSTATE_MIRRORS ?= "\ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7895 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7896 | file://.* file:///some-local-dir/sstate/PATH" |
| 7897 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7898 | :term:`SSTATE_SCAN_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7899 | Controls the list of files the OpenEmbedded build system scans for |
| 7900 | hardcoded installation paths. The variable uses a space-separated |
| 7901 | list of filenames (not paths) with standard wildcard characters |
| 7902 | allowed. |
| 7903 | |
| 7904 | During a build, the OpenEmbedded build system creates a shared state |
| 7905 | (sstate) object during the first stage of preparing the sysroots. |
| 7906 | That object is scanned for hardcoded paths for original installation |
| 7907 | locations. The list of files that are scanned for paths is controlled |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7908 | by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files |
| 7909 | they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7910 | than the variable being comprehensively set. The |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7911 | :ref:`ref-classes-sstate` class specifies the default list of files. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7912 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7913 | For details on the process, see the :ref:`ref-classes-staging` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7914 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7915 | :term:`STAGING_BASE_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7916 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7917 | directory for the build host. |
| 7918 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7919 | :term:`STAGING_BASELIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7920 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7921 | directory for the target for which the current recipe is being built |
| 7922 | (:term:`STAGING_DIR_HOST`). |
| 7923 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7924 | :term:`STAGING_BINDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7925 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7926 | directory for the target for which the current recipe is being built |
| 7927 | (:term:`STAGING_DIR_HOST`). |
| 7928 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7929 | :term:`STAGING_BINDIR_CROSS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7930 | Specifies the path to the directory containing binary configuration |
| 7931 | scripts. These scripts provide configuration information for other |
| 7932 | software that wants to make use of libraries or include files |
| 7933 | provided by the software associated with the script. |
| 7934 | |
| 7935 | .. note:: |
| 7936 | |
| 7937 | This style of build configuration has been largely replaced by |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7938 | ``pkg-config``. Consequently, if ``pkg-config`` is supported by the |
| 7939 | library to which you are linking, it is recommended you use |
| 7940 | ``pkg-config`` instead of a provided configuration script. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7941 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7942 | :term:`STAGING_BINDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7943 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7944 | directory for the build host. |
| 7945 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7946 | :term:`STAGING_DATADIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7947 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7948 | directory for the target for which the current recipe is being built |
| 7949 | (:term:`STAGING_DIR_HOST`). |
| 7950 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7951 | :term:`STAGING_DATADIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7952 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7953 | directory for the build host. |
| 7954 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7955 | :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7956 | Helps construct the ``recipe-sysroots`` directory, which is used |
| 7957 | during packaging. |
| 7958 | |
| 7959 | For information on how staging for recipe-specific sysroots occurs, |
| 7960 | see the :ref:`ref-tasks-populate_sysroot` |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7961 | task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7962 | section in the Yocto Project Development Tasks Manual, the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7963 | ":ref:`overview-manual/concepts:configuration, compilation, and staging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7964 | section in the Yocto Project Overview and Concepts Manual, and the |
| 7965 | :term:`SYSROOT_DIRS` variable. |
| 7966 | |
| 7967 | .. note:: |
| 7968 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7969 | Recipes should never write files directly under the :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7970 | directory because the OpenEmbedded build system manages the |
| 7971 | directory automatically. Instead, files should be installed to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7972 | ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7973 | task and then the OpenEmbedded build system will stage a subset of |
| 7974 | those files into the sysroot. |
| 7975 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7976 | :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7977 | Specifies the path to the sysroot directory for the system on which |
| 7978 | the component is built to run (the system that hosts the component). |
| 7979 | For most recipes, this sysroot is the one in which that recipe's |
| 7980 | :ref:`ref-tasks-populate_sysroot` task copies |
| 7981 | files. Exceptions include ``-native`` recipes, where the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 7982 | :ref:`ref-tasks-populate_sysroot` task instead uses |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7983 | :term:`STAGING_DIR_NATIVE`. Depending on |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7984 | the type of recipe and the build target, :term:`STAGING_DIR_HOST` can |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7985 | have the following values: |
| 7986 | |
| 7987 | - For recipes building for the target machine, the value is |
| 7988 | "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". |
| 7989 | |
| 7990 | - For native recipes building for the build host, the value is empty |
| 7991 | given the assumption that when building for the build host, the |
| 7992 | build host's own directories should be used. |
| 7993 | |
| 7994 | .. note:: |
| 7995 | |
| 7996 | ``-native`` recipes are not installed into host paths like such |
| 7997 | as ``/usr``. Rather, these recipes are installed into |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7998 | :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7999 | standard build environment variables such as |
| 8000 | :term:`CPPFLAGS` and |
| 8001 | :term:`CFLAGS` are set up so that both host paths |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8002 | and :term:`STAGING_DIR_NATIVE` are searched for libraries and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8003 | headers using, for example, GCC's ``-isystem`` option. |
| 8004 | |
| 8005 | Thus, the emphasis is that the ``STAGING_DIR*`` variables |
| 8006 | should be viewed as input variables by tasks such as |
| 8007 | :ref:`ref-tasks-configure`, |
| 8008 | :ref:`ref-tasks-compile`, and |
| 8009 | :ref:`ref-tasks-install`. Having the real system |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8010 | root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8011 | for ``-native`` recipes, as they make use of host headers and |
| 8012 | libraries. |
| 8013 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8014 | :term:`STAGING_DIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8015 | Specifies the path to the sysroot directory used when building |
| 8016 | components that run on the build host itself. |
| 8017 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8018 | :term:`STAGING_DIR_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8019 | Specifies the path to the sysroot used for the system for which the |
| 8020 | component generates code. For components that do not generate code, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8021 | which is the majority, :term:`STAGING_DIR_TARGET` is set to match |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8022 | :term:`STAGING_DIR_HOST`. |
| 8023 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8024 | Some recipes build binaries that can run on the target system but those |
| 8025 | binaries in turn generate code for another different system (e.g. |
| 8026 | :ref:`ref-classes-cross-canadian` recipes). Using terminology from GNU, |
| 8027 | the primary system is referred to as the "HOST" and the secondary, or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8028 | different, system is referred to as the "TARGET". Thus, the binaries |
| 8029 | run on the "HOST" system and generate binaries for the "TARGET" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8030 | system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used |
| 8031 | for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8032 | sysroot used for the "TARGET" system. |
| 8033 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8034 | :term:`STAGING_ETCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8035 | Specifies the path to the ``/etc`` subdirectory of the sysroot |
| 8036 | directory for the build host. |
| 8037 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8038 | :term:`STAGING_EXECPREFIXDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8039 | Specifies the path to the ``/usr`` subdirectory of the sysroot |
| 8040 | directory for the target for which the current recipe is being built |
| 8041 | (:term:`STAGING_DIR_HOST`). |
| 8042 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8043 | :term:`STAGING_INCDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8044 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 8045 | sysroot directory for the target for which the current recipe being |
| 8046 | built (:term:`STAGING_DIR_HOST`). |
| 8047 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8048 | :term:`STAGING_INCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8049 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 8050 | sysroot directory for the build host. |
| 8051 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8052 | :term:`STAGING_KERNEL_BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8053 | Points to the directory containing the kernel build artifacts. |
| 8054 | Recipes building software that needs to access kernel build artifacts |
| 8055 | (e.g. ``systemtap-uprobes``) can look in the directory specified with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8056 | the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8057 | after the kernel has been built. |
| 8058 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8059 | :term:`STAGING_KERNEL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8060 | The directory with kernel headers that are required to build |
| 8061 | out-of-tree modules. |
| 8062 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8063 | :term:`STAGING_LIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8064 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 8065 | directory for the target for which the current recipe is being built |
| 8066 | (:term:`STAGING_DIR_HOST`). |
| 8067 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8068 | :term:`STAGING_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8069 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 8070 | directory for the build host. |
| 8071 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8072 | :term:`STAMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8073 | Specifies the base path used to create recipe stamp files. The path |
| 8074 | to an actual stamp file is constructed by evaluating this string and |
| 8075 | then appending additional information. Currently, the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8076 | assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8077 | file is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8078 | |
| 8079 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 8080 | |
| 8081 | For information on how BitBake uses stamp files to determine if a |
| 8082 | task should be rerun, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8083 | ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8084 | section in the Yocto Project Overview and Concepts Manual. |
| 8085 | |
| 8086 | See :term:`STAMPS_DIR`, |
| 8087 | :term:`MULTIMACH_TARGET_SYS`, |
| 8088 | :term:`PN`, :term:`EXTENDPE`, |
| 8089 | :term:`PV`, and :term:`PR` for related variable |
| 8090 | information. |
| 8091 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8092 | :term:`STAMPCLEAN` |
| 8093 | See :term:`bitbake:STAMPCLEAN` in the BitBake manual. |
| 8094 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8095 | :term:`STAMPS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8096 | Specifies the base directory in which the OpenEmbedded build system |
| 8097 | places stamps. The default directory is ``${TMPDIR}/stamps``. |
| 8098 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8099 | :term:`STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8100 | The minimal command and arguments to run ``strip``, which is used to |
| 8101 | strip symbols. |
| 8102 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8103 | :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8104 | The short (72 characters or less) summary of the binary package for |
| 8105 | packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8106 | :term:`SUMMARY` is used to define the |
| 8107 | :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8108 | not set in the recipe. |
| 8109 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8110 | :term:`SVNDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8111 | The directory in which files checked out of a Subversion system are |
| 8112 | stored. |
| 8113 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8114 | :term:`SYSLINUX_DEFAULT_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8115 | Specifies the kernel boot default console. If you want to use a |
| 8116 | console other than the default, set this variable in your recipe as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8117 | follows where "X" is the console number you want to use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8118 | |
| 8119 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" |
| 8120 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8121 | The :ref:`ref-classes-syslinux` class initially sets |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8122 | this variable to null but then checks for a value later. |
| 8123 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8124 | :term:`SYSLINUX_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8125 | Lists additional options to add to the syslinux file. You need to set |
| 8126 | this variable in your recipe. If you want to list multiple options, |
| 8127 | separate the options with a semicolon character (``;``). |
| 8128 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8129 | The :ref:`ref-classes-syslinux` class uses this variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8130 | to create a set of options. |
| 8131 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8132 | :term:`SYSLINUX_SERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8133 | Specifies the alternate serial port or turns it off. To turn off |
| 8134 | serial, set this variable to an empty string in your recipe. The |
| 8135 | variable's default value is set in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8136 | :ref:`ref-classes-syslinux` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8137 | |
| 8138 | SYSLINUX_SERIAL ?= "0 115200" |
| 8139 | |
| 8140 | The class checks for and uses the variable as needed. |
| 8141 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8142 | :term:`SYSLINUX_SERIAL_TTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8143 | Specifies the alternate console=tty... kernel boot argument. The |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8144 | variable's default value is set in the :ref:`ref-classes-syslinux` |
| 8145 | class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8146 | |
| 8147 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
| 8148 | |
| 8149 | The class checks for and uses the variable as needed. |
| 8150 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8151 | :term:`SYSLINUX_SPLASH` |
| 8152 | An ``.LSS`` file used as the background for the VGA boot menu when |
| 8153 | you use the boot menu. You need to set this variable in your recipe. |
| 8154 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8155 | The :ref:`ref-classes-syslinux` class checks for this |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8156 | variable and if found, the OpenEmbedded build system installs the |
| 8157 | splash screen. |
| 8158 | |
| 8159 | :term:`SYSROOT_DESTDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8160 | Points to the temporary directory under the work directory (default |
| 8161 | "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") |
| 8162 | where the files populated into the sysroot are assembled during the |
| 8163 | :ref:`ref-tasks-populate_sysroot` task. |
| 8164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8165 | :term:`SYSROOT_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8166 | Directories that are staged into the sysroot by the |
| 8167 | :ref:`ref-tasks-populate_sysroot` task. By |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8168 | default, the following directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8169 | |
| 8170 | SYSROOT_DIRS = " \ |
| 8171 | ${includedir} \ |
| 8172 | ${libdir} \ |
| 8173 | ${base_libdir} \ |
| 8174 | ${nonarch_base_libdir} \ |
| 8175 | ${datadir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8176 | /sysroot-only \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8177 | " |
| 8178 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8179 | :term:`SYSROOT_DIRS_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8180 | Directories that are not staged into the sysroot by the |
| 8181 | :ref:`ref-tasks-populate_sysroot` task. You |
| 8182 | can use this variable to exclude certain subdirectories of |
| 8183 | directories listed in :term:`SYSROOT_DIRS` from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8184 | staging. By default, the following directories are not staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8185 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8186 | SYSROOT_DIRS_IGNORE = " \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8187 | ${mandir} \ |
| 8188 | ${docdir} \ |
| 8189 | ${infodir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8190 | ${datadir}/X11/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8191 | ${datadir}/applications \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8192 | ${datadir}/bash-completion \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8193 | ${datadir}/fonts \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8194 | ${datadir}/gtk-doc/html \ |
| 8195 | ${datadir}/installed-tests \ |
| 8196 | ${datadir}/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8197 | ${datadir}/pixmaps \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8198 | ${datadir}/terminfo \ |
| 8199 | ${libdir}/${BPN}/ptest \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8200 | " |
| 8201 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8202 | :term:`SYSROOT_DIRS_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8203 | Extra directories staged into the sysroot by the |
| 8204 | :ref:`ref-tasks-populate_sysroot` task for |
| 8205 | ``-native`` recipes, in addition to those specified in |
| 8206 | :term:`SYSROOT_DIRS`. By default, the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8207 | extra directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8208 | |
| 8209 | SYSROOT_DIRS_NATIVE = " \ |
| 8210 | ${bindir} \ |
| 8211 | ${sbindir} \ |
| 8212 | ${base_bindir} \ |
| 8213 | ${base_sbindir} \ |
| 8214 | ${libexecdir} \ |
| 8215 | ${sysconfdir} \ |
| 8216 | ${localstatedir} \ |
| 8217 | " |
| 8218 | |
| 8219 | .. note:: |
| 8220 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8221 | Programs built by ``-native`` recipes run directly from the sysroot |
| 8222 | (:term:`STAGING_DIR_NATIVE`), which is why additional directories |
| 8223 | containing program executables and supporting files need to be staged. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8224 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8225 | :term:`SYSROOT_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8226 | A list of functions to execute after files are staged into the |
| 8227 | sysroot. These functions are usually used to apply additional |
| 8228 | processing on the staged files, or to stage additional files. |
| 8229 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8230 | :term:`SYSTEMD_AUTO_ENABLE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8231 | When inheriting the :ref:`ref-classes-systemd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8232 | this variable specifies whether the specified service in |
| 8233 | :term:`SYSTEMD_SERVICE` should start |
| 8234 | automatically or not. By default, the service is enabled to |
| 8235 | automatically start at boot time. The default setting is in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8236 | :ref:`ref-classes-systemd` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8237 | |
| 8238 | SYSTEMD_AUTO_ENABLE ??= "enable" |
| 8239 | |
| 8240 | You can disable the service by setting the variable to "disable". |
| 8241 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8242 | :term:`SYSTEMD_BOOT_CFG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8243 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8244 | "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8245 | configuration file that should be used. By default, the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8246 | :ref:`ref-classes-systemd-boot` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8247 | :term:`SYSTEMD_BOOT_CFG` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8248 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 8249 | SYSTEMD_BOOT_CFG ?= "${S}/loader.conf" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8250 | |
| 8251 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8252 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8253 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8254 | :term:`SYSTEMD_BOOT_ENTRIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8255 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8256 | "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8257 | list of entry files (``*.conf``) to install that contain one boot |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8258 | entry per file. By default, the :ref:`ref-classes-systemd-boot` class |
| 8259 | sets the :term:`SYSTEMD_BOOT_ENTRIES` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8260 | |
| 8261 | SYSTEMD_BOOT_ENTRIES ?= "" |
| 8262 | |
| 8263 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8264 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8266 | :term:`SYSTEMD_BOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8267 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8268 | "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8269 | boot menu timeout in seconds. By default, the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8270 | :ref:`ref-classes-systemd-boot` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8271 | :term:`SYSTEMD_BOOT_TIMEOUT` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8272 | |
| 8273 | SYSTEMD_BOOT_TIMEOUT ?= "10" |
| 8274 | |
| 8275 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8276 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8277 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8278 | :term:`SYSTEMD_DEFAULT_TARGET` |
| 8279 | |
| 8280 | This variable allows to set the default unit that systemd starts at bootup. |
| 8281 | Usually, this is either ``multi-user.target`` or ``graphical.target``. |
| 8282 | This works by creating a ``default.target`` symbolic link to the chosen systemd |
| 8283 | target file. |
| 8284 | |
| 8285 | See `systemd's documentation |
| 8286 | <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__ |
| 8287 | for details. |
| 8288 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 8289 | For example, this variable is used in the :oe_git:`core-image-minimal-xfce.bb |
| 8290 | </meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>` |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8291 | recipe:: |
| 8292 | |
| 8293 | SYSTEMD_DEFAULT_TARGET = "graphical.target" |
| 8294 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8295 | :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8296 | When inheriting the :ref:`ref-classes-systemd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8297 | this variable locates the systemd unit files when they are not found |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8298 | in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8299 | variable is set such that the systemd unit files are assumed to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8300 | reside in the recipes main package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8301 | |
| 8302 | SYSTEMD_PACKAGES ?= "${PN}" |
| 8303 | |
| 8304 | If these unit files are not in this recipe's main package, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8305 | to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8306 | the build system can find the systemd unit files. |
| 8307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8308 | :term:`SYSTEMD_SERVICE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8309 | When inheriting the :ref:`ref-classes-systemd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8310 | this variable specifies the systemd service name for a package. |
| 8311 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8312 | Multiple services can be specified, each one separated by a space. |
| 8313 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8314 | When you specify this file in your recipe, use a package name |
| 8315 | override to indicate the package to which the value applies. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8316 | an example from the connman recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8317 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8318 | SYSTEMD_SERVICE:${PN} = "connman.service" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8319 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8320 | The package overrides that can be specified are directly related to the value of |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8321 | :term:`SYSTEMD_PACKAGES`. Overrides not included in :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8322 | will be silently ignored. |
| 8323 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8324 | :term:`SYSVINIT_ENABLED_GETTYS` |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 8325 | When using :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8326 | specifies a space-separated list of the virtual terminals that should |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 8327 | run a :wikipedia:`getty <Getty_(Unix)>` (allowing login), assuming |
| 8328 | :term:`USE_VT` is not set to "0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8329 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8330 | The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8331 | run a getty on the first virtual terminal). |
| 8332 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8333 | :term:`T` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8334 | This variable points to a directory were BitBake places temporary |
| 8335 | files, which consist mostly of task logs and scripts, when building a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8336 | particular recipe. The variable is typically set as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8337 | |
| 8338 | T = "${WORKDIR}/temp" |
| 8339 | |
| 8340 | The :term:`WORKDIR` is the directory into which |
| 8341 | BitBake unpacks and builds the recipe. The default ``bitbake.conf`` |
| 8342 | file sets this variable. |
| 8343 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8344 | The :term:`T` variable is not to be confused with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8345 | :term:`TMPDIR` variable, which points to the root of |
| 8346 | the directory tree where BitBake places the output of an entire |
| 8347 | build. |
| 8348 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8349 | :term:`TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8350 | The target machine's architecture. The OpenEmbedded build system |
| 8351 | supports many architectures. Here is an example list of architectures |
| 8352 | supported. This list is by no means complete as the architecture is |
| 8353 | configurable: |
| 8354 | |
| 8355 | - arm |
| 8356 | - i586 |
| 8357 | - x86_64 |
| 8358 | - powerpc |
| 8359 | - powerpc64 |
| 8360 | - mips |
| 8361 | - mipsel |
| 8362 | |
| 8363 | For additional information on machine architectures, see the |
| 8364 | :term:`TUNE_ARCH` variable. |
| 8365 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8366 | :term:`TARGET_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8367 | Specifies architecture-specific assembler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8368 | system. :term:`TARGET_AS_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8369 | :term:`TUNE_ASARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8370 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8371 | |
| 8372 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
| 8373 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8374 | :term:`TARGET_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8375 | Specifies architecture-specific C compiler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8376 | system. :term:`TARGET_CC_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8377 | :term:`TUNE_CCARGS` by default. |
| 8378 | |
| 8379 | .. note:: |
| 8380 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8381 | It is a common workaround to append :term:`LDFLAGS` to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8382 | :term:`TARGET_CC_ARCH` in recipes that build software for the target that |
| 8383 | would not otherwise respect the exported :term:`LDFLAGS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8384 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8385 | :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8386 | This is a specific kernel compiler flag for a CPU or Application |
| 8387 | Binary Interface (ABI) tune. The flag is used rarely and only for |
| 8388 | cases where a userspace :term:`TUNE_CCARGS` is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8389 | compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8390 | variable allows the kernel (and associated modules) to use a |
| 8391 | different configuration. See the |
| 8392 | ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the |
| 8393 | :term:`Source Directory` for an example. |
| 8394 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8395 | :term:`TARGET_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8396 | Specifies the flags to pass to the C compiler when building for the |
| 8397 | target. When building in the target context, |
| 8398 | :term:`CFLAGS` is set to the value of this variable by |
| 8399 | default. |
| 8400 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8401 | Additionally, the SDK's environment setup script sets the :term:`CFLAGS` |
| 8402 | variable in the environment to the :term:`TARGET_CFLAGS` value so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8403 | executables built using the SDK also have the flags applied. |
| 8404 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8405 | :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8406 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 8407 | C and the C++ compilers) when building for the target. When building |
| 8408 | in the target context, :term:`CPPFLAGS` is set to the |
| 8409 | value of this variable by default. |
| 8410 | |
| 8411 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8412 | :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8413 | value so that executables built using the SDK also have the flags |
| 8414 | applied. |
| 8415 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8416 | :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8417 | Specifies the flags to pass to the C++ compiler when building for the |
| 8418 | target. When building in the target context, |
| 8419 | :term:`CXXFLAGS` is set to the value of this variable |
| 8420 | by default. |
| 8421 | |
| 8422 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8423 | :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8424 | value so that executables built using the SDK also have the flags |
| 8425 | applied. |
| 8426 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8427 | :term:`TARGET_FPU` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8428 | Specifies the method for handling FPU code. For FPU-less targets, |
| 8429 | which include most ARM CPUs, the variable must be set to "soft". If |
| 8430 | not, the kernel emulation gets used, which results in a performance |
| 8431 | penalty. |
| 8432 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8433 | :term:`TARGET_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8434 | Specifies architecture-specific linker flags for the target system. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8435 | :term:`TARGET_LD_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8436 | :term:`TUNE_LDARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8437 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8438 | |
| 8439 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
| 8440 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8441 | :term:`TARGET_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8442 | Specifies the flags to pass to the linker when building for the |
| 8443 | target. When building in the target context, |
| 8444 | :term:`LDFLAGS` is set to the value of this variable |
| 8445 | by default. |
| 8446 | |
| 8447 | Additionally, the SDK's environment setup script sets the |
| 8448 | :term:`LDFLAGS` variable in the environment to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8449 | :term:`TARGET_LDFLAGS` value so that executables built using the SDK also |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8450 | have the flags applied. |
| 8451 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8452 | :term:`TARGET_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8453 | Specifies the target's operating system. The variable can be set to |
| 8454 | "linux" for glibc-based systems (GNU C Library) and to "linux-musl" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 8455 | for musl libc. For ARM/EABI targets, the possible values are |
| 8456 | "linux-gnueabi" and "linux-musleabi". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8457 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8458 | :term:`TARGET_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8459 | Specifies the prefix used for the toolchain binary target tools. |
| 8460 | |
| 8461 | Depending on the type of recipe and the build target, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8462 | :term:`TARGET_PREFIX` is set as follows: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8463 | |
| 8464 | - For recipes building for the target machine, the value is |
| 8465 | "${:term:`TARGET_SYS`}-". |
| 8466 | |
| 8467 | - For native recipes, the build system sets the variable to the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8468 | value of :term:`BUILD_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8469 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8470 | - For native SDK recipes (:ref:`ref-classes-nativesdk`), |
| 8471 | the build system sets the variable to the value of :term:`SDK_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8472 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8473 | :term:`TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8474 | Specifies the system, including the architecture and the operating |
| 8475 | system, for which the build is occurring in the context of the |
| 8476 | current recipe. |
| 8477 | |
| 8478 | The OpenEmbedded build system automatically sets this variable based |
| 8479 | on :term:`TARGET_ARCH`, |
| 8480 | :term:`TARGET_VENDOR`, and |
| 8481 | :term:`TARGET_OS` variables. |
| 8482 | |
| 8483 | .. note:: |
| 8484 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8485 | You do not need to set the :term:`TARGET_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8486 | |
| 8487 | Consider these two examples: |
| 8488 | |
| 8489 | - Given a native recipe on a 32-bit, x86 machine running Linux, the |
| 8490 | value is "i686-linux". |
| 8491 | |
| 8492 | - Given a recipe being built for a little-endian, MIPS target |
| 8493 | running Linux, the value might be "mipsel-linux". |
| 8494 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8495 | :term:`TARGET_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8496 | Specifies the name of the target vendor. |
| 8497 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8498 | :term:`TCLIBC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8499 | Specifies the GNU standard C library (``libc``) variant to use during |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8500 | the build process. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8501 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8502 | You can select "glibc", "musl", "newlib", or "baremetal". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8503 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8504 | :term:`TCLIBCAPPEND` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 8505 | Specifies a suffix to be appended onto the :term:`TMPDIR` value. The |
| 8506 | suffix identifies the ``libc`` variant for building. When you are |
| 8507 | building for multiple variants with the same :term:`Build Directory`, |
| 8508 | this mechanism ensures that output for different ``libc`` variants is |
| 8509 | kept separate to avoid potential conflicts. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8510 | |
| 8511 | In the ``defaultsetup.conf`` file, the default value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8512 | :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8513 | which normally only support one ``libc`` variant, set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8514 | :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8515 | in no suffix being applied. |
| 8516 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8517 | :term:`TCMODE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8518 | Specifies the toolchain selector. :term:`TCMODE` controls the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8519 | characteristics of the generated packages and images by telling the |
| 8520 | OpenEmbedded build system which toolchain profile to use. By default, |
| 8521 | the OpenEmbedded build system builds its own internal toolchain. The |
| 8522 | variable's default value is "default", which uses that internal |
| 8523 | toolchain. |
| 8524 | |
| 8525 | .. note:: |
| 8526 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8527 | If :term:`TCMODE` is set to a value other than "default", then it is your |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8528 | responsibility to ensure that the toolchain is compatible with the |
| 8529 | default toolchain. Using older or newer versions of these |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8530 | components might cause build problems. See |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 8531 | :doc:`Release Information </migration-guides/index>` for your |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8532 | version of the Yocto Project, to find the specific components with |
| 8533 | which the toolchain must be compatible. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8534 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8535 | The :term:`TCMODE` variable is similar to :term:`TCLIBC`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8536 | which controls the variant of the GNU standard C library (``libc``) |
| 8537 | used during the build process: ``glibc`` or ``musl``. |
| 8538 | |
| 8539 | With additional layers, it is possible to use a pre-compiled external |
| 8540 | toolchain. One example is the Sourcery G++ Toolchain. The support for |
| 8541 | this toolchain resides in the separate Mentor Graphics |
| 8542 | ``meta-sourcery`` layer at |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8543 | https://github.com/MentorEmbedded/meta-sourcery/. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8544 | |
| 8545 | The layer's ``README`` file contains information on how to use the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8546 | Sourcery G++ Toolchain as an external toolchain. You will have to |
| 8547 | add the layer to your ``bblayers.conf`` file and then set the |
| 8548 | :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file to |
| 8549 | the location of the toolchain. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8550 | |
| 8551 | The fundamentals used for this example apply to any external |
| 8552 | toolchain. You can use ``meta-sourcery`` as a template for adding |
| 8553 | support for other external toolchains. |
| 8554 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8555 | In addition to toolchain configuration, you will also need a |
| 8556 | corresponding toolchain recipe file. This recipe file needs to package |
| 8557 | up any pre-built objects in the toolchain such as ``libgcc``, |
| 8558 | ``libstdcc++``, any locales, and ``libc``. |
| 8559 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 8560 | :term:`TC_CXX_RUNTIME` |
| 8561 | Specifies the C/C++ STL and runtime variant to use during |
| 8562 | the build process. Default value is 'gnu' |
| 8563 | |
| 8564 | You can select "gnu", "llvm", or "android". |
| 8565 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 8566 | :term:`TEMPLATECONF` |
| 8567 | Specifies the directory used by the build system to find templates |
| 8568 | from which to build the ``bblayers.conf`` and ``local.conf`` files. |
| 8569 | Use this variable if you wish to customize such files, and the default |
| 8570 | BitBake targets shown when sourcing the ``oe-init-build-env`` script. |
| 8571 | |
| 8572 | For details, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8573 | :ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory` |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 8574 | section in the Yocto Project Development Tasks manual. |
| 8575 | |
| 8576 | .. note:: |
| 8577 | |
| 8578 | You must set this variable in the external environment in order |
| 8579 | for it to work. |
| 8580 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8581 | :term:`TEST_EXPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8582 | The location the OpenEmbedded build system uses to export tests when |
| 8583 | the :term:`TEST_EXPORT_ONLY` variable is set |
| 8584 | to "1". |
| 8585 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8586 | The :term:`TEST_EXPORT_DIR` variable defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8587 | ``"${TMPDIR}/testimage/${PN}"``. |
| 8588 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8589 | :term:`TEST_EXPORT_ONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8590 | Specifies to export the tests only. Set this variable to "1" if you |
| 8591 | do not want to run the tests but you want them to be exported in a |
| 8592 | manner that you to run them outside of the build system. |
| 8593 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8594 | :term:`TEST_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8595 | Holds the SSH log and the boot log for QEMU machines. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8596 | :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8597 | |
| 8598 | .. note:: |
| 8599 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8600 | Actual test results reside in the task log (``log.do_testimage``), |
| 8601 | which is in the ``${WORKDIR}/temp/`` directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8603 | :term:`TEST_POWERCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8604 | For automated hardware testing, specifies the command to use to |
| 8605 | control the power of the target machine under test. Typically, this |
| 8606 | command would point to a script that performs the appropriate action |
| 8607 | (e.g. interacting with a web-enabled power strip). The specified |
| 8608 | command should expect to receive as the last argument "off", "on" or |
| 8609 | "cycle" specifying to power off, on, or cycle (power off and then |
| 8610 | power on) the device, respectively. |
| 8611 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8612 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8613 | For automated hardware testing, specifies additional arguments to |
| 8614 | pass through to the command specified in |
| 8615 | :term:`TEST_POWERCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8616 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8617 | wish, for example, to separate the machine-specific and |
| 8618 | non-machine-specific parts of the arguments. |
| 8619 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8620 | :term:`TEST_QEMUBOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8621 | The time in seconds allowed for an image to boot before automated |
| 8622 | runtime tests begin to run against an image. The default timeout |
| 8623 | period to allow the boot process to reach the login prompt is 500 |
| 8624 | seconds. You can specify a different value in the ``local.conf`` |
| 8625 | file. |
| 8626 | |
| 8627 | For more information on testing images, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8628 | ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8629 | section in the Yocto Project Development Tasks Manual. |
| 8630 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8631 | :term:`TEST_SERIALCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8632 | For automated hardware testing, specifies the command to use to |
| 8633 | connect to the serial console of the target machine under test. This |
| 8634 | command simply needs to connect to the serial console and forward |
| 8635 | that connection to standard input and output as any normal terminal |
| 8636 | program does. |
| 8637 | |
| 8638 | For example, to use the Picocom terminal program on serial device |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8639 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8640 | |
| 8641 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
| 8642 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8643 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8644 | For automated hardware testing, specifies additional arguments to |
| 8645 | pass through to the command specified in |
| 8646 | :term:`TEST_SERIALCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8647 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8648 | wish, for example, to separate the machine-specific and |
| 8649 | non-machine-specific parts of the command. |
| 8650 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8651 | :term:`TEST_SERVER_IP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8652 | The IP address of the build machine (host machine). This IP address |
| 8653 | is usually automatically detected. However, if detection fails, this |
| 8654 | variable needs to be set to the IP address of the build machine (i.e. |
| 8655 | where the build is taking place). |
| 8656 | |
| 8657 | .. note:: |
| 8658 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8659 | The :term:`TEST_SERVER_IP` variable is only used for a small number of |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8660 | tests such as the "dnf" test suite, which needs to download packages |
| 8661 | from ``WORKDIR/oe-rootfs-repo``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8662 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8663 | :term:`TEST_SUITES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8664 | An ordered list of tests (modules) to run against an image when |
| 8665 | performing automated runtime testing. |
| 8666 | |
| 8667 | The OpenEmbedded build system provides a core set of tests that can |
| 8668 | be used against images. |
| 8669 | |
| 8670 | .. note:: |
| 8671 | |
| 8672 | Currently, there is only support for running these tests under |
| 8673 | QEMU. |
| 8674 | |
| 8675 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8676 | your own tests to the list of tests by appending :term:`TEST_SUITES` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8677 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8678 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8679 | TEST_SUITES:append = " mytest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8680 | |
| 8681 | Alternatively, you can |
| 8682 | provide the "auto" option to have all applicable tests run against |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8683 | the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8684 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8685 | TEST_SUITES:append = " auto" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8686 | |
| 8687 | Using this option causes the |
| 8688 | build system to automatically run tests that are applicable to the |
| 8689 | image. Tests that are not applicable are skipped. |
| 8690 | |
| 8691 | The order in which tests are run is important. Tests that depend on |
| 8692 | another test must appear later in the list than the test on which |
| 8693 | they depend. For example, if you append the list of tests with two |
| 8694 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8695 | ``test_A``, then you must order the tests as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8696 | |
| 8697 | TEST_SUITES = "test_A test_B" |
| 8698 | |
| 8699 | For more information on testing images, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8700 | ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8701 | section in the Yocto Project Development Tasks Manual. |
| 8702 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8703 | :term:`TEST_TARGET` |
| 8704 | Specifies the target controller to use when running tests against a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8705 | test image. The default controller to use is "qemu":: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8706 | |
| 8707 | TEST_TARGET = "qemu" |
| 8708 | |
| 8709 | A target controller is a class that defines how an image gets |
| 8710 | deployed on a target and how a target is started. A layer can extend |
| 8711 | the controllers by adding a module in the layer's |
| 8712 | ``/lib/oeqa/controllers`` directory and by inheriting the |
| 8713 | ``BaseTarget`` class, which is an abstract class that cannot be used |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8714 | as a value of :term:`TEST_TARGET`. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8715 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8716 | You can provide the following arguments with :term:`TEST_TARGET`: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8717 | |
| 8718 | - *"qemu":* Boots a QEMU image and runs the tests. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8719 | ":ref:`dev-manual/runtime-testing:enabling runtime tests on qemu`" section |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8720 | in the Yocto Project Development Tasks Manual for more |
| 8721 | information. |
| 8722 | |
| 8723 | - *"simpleremote":* Runs the tests on target hardware that is |
| 8724 | already up and running. The hardware can be on the network or it |
| 8725 | can be a device running an image on QEMU. You must also set |
| 8726 | :term:`TEST_TARGET_IP` when you use |
| 8727 | "simpleremote". |
| 8728 | |
| 8729 | .. note:: |
| 8730 | |
| 8731 | This argument is defined in |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8732 | ``meta/lib/oeqa/controllers/simpleremote.py``. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8733 | |
| 8734 | For information on running tests on hardware, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8735 | ":ref:`dev-manual/runtime-testing:enabling runtime tests on hardware`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8736 | section in the Yocto Project Development Tasks Manual. |
| 8737 | |
| 8738 | :term:`TEST_TARGET_IP` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8739 | The IP address of your hardware under test. The :term:`TEST_TARGET_IP` |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8740 | variable has no effect when :term:`TEST_TARGET` is |
| 8741 | set to "qemu". |
| 8742 | |
| 8743 | When you specify the IP address, you can also include a port. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8744 | an example:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8745 | |
| 8746 | TEST_TARGET_IP = "192.168.1.4:2201" |
| 8747 | |
| 8748 | Specifying a port is |
| 8749 | useful when SSH is started on a non-standard port or in cases when |
| 8750 | your hardware under test is behind a firewall or network that is not |
| 8751 | directly accessible from your host and you need to do port address |
| 8752 | translation. |
| 8753 | |
| 8754 | :term:`TESTIMAGE_AUTO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8755 | Automatically runs the series of automated tests for images when an |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8756 | image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8757 | any image that successfully builds to automatically boot under QEMU. |
| 8758 | Using the variable also adds in dependencies so that any SDK for |
| 8759 | which testing is requested is automatically built first. |
| 8760 | |
| 8761 | These tests are written in Python making use of the ``unittest`` |
| 8762 | module, and the majority of them run commands on the target system |
| 8763 | over ``ssh``. You can set this variable to "1" in your ``local.conf`` |
| 8764 | file in the :term:`Build Directory` to have the |
| 8765 | OpenEmbedded build system automatically run these tests after an |
| 8766 | image successfully builds: |
| 8767 | |
| 8768 | TESTIMAGE_AUTO = "1" |
| 8769 | |
| 8770 | For more information |
| 8771 | on enabling, running, and writing these tests, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8772 | ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8773 | section in the Yocto Project Development Tasks Manual and the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 8774 | ":ref:`ref-classes-testimage`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8776 | :term:`THISDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8777 | The directory in which the file BitBake is currently parsing is |
| 8778 | located. Do not manually set this variable. |
| 8779 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8780 | :term:`TIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8781 | The time the build was started. Times appear using the hour, minute, |
| 8782 | and second (HMS) format (e.g. "140159" for one minute and fifty-nine |
| 8783 | seconds past 1400 hours). |
| 8784 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8785 | :term:`TMPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8786 | This variable is the base directory the OpenEmbedded build system |
| 8787 | uses for all build output and intermediate files (other than the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8788 | shared state cache). By default, the :term:`TMPDIR` variable points to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8789 | ``tmp`` within the :term:`Build Directory`. |
| 8790 | |
| 8791 | If you want to establish this directory in a location other than the |
| 8792 | default, you can uncomment and edit the following statement in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8793 | ``conf/local.conf`` file in the :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8794 | |
| 8795 | #TMPDIR = "${TOPDIR}/tmp" |
| 8796 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8797 | An example use for this scenario is to set :term:`TMPDIR` to a local disk, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 8798 | which does not use NFS, while having the :term:`Build Directory` use NFS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8799 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8800 | The filesystem used by :term:`TMPDIR` must have standard filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8801 | semantics (i.e. mixed-case files are unique, POSIX file locking, and |
| 8802 | persistent inodes). Due to various issues with NFS and bugs in some |
| 8803 | implementations, NFS does not meet this minimum requirement. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8804 | Consequently, :term:`TMPDIR` cannot be on NFS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8805 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8806 | :term:`TOOLCHAIN_HOST_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8807 | This variable lists packages the OpenEmbedded build system uses when |
| 8808 | building an SDK, which contains a cross-development environment. The |
| 8809 | packages specified by this variable are part of the toolchain set |
| 8810 | that runs on the :term:`SDKMACHINE`, and each |
| 8811 | package should usually have the prefix ``nativesdk-``. For example, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8812 | consider the following command when building an SDK:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8813 | |
| 8814 | $ bitbake -c populate_sdk imagename |
| 8815 | |
| 8816 | In this case, a default list of packages is |
| 8817 | set in this variable, but you can add additional packages to the |
| 8818 | list. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8819 | ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8820 | in the Yocto Project Application Development and the Extensible |
| 8821 | Software Development Kit (eSDK) manual for more information. |
| 8822 | |
| 8823 | For background information on cross-development toolchains in the |
| 8824 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8825 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8826 | section in the Yocto Project Overview and Concepts Manual. For |
| 8827 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8828 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8829 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8830 | Note that this variable applies to building an SDK, not an eSDK, |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8831 | in which case the :term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8832 | used instead. |
| 8833 | |
| 8834 | :term:`TOOLCHAIN_HOST_TASK_ESDK` |
| 8835 | This variable allows to extend what is installed in the host |
| 8836 | portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK` |
| 8837 | applying to SDKs. |
| 8838 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8839 | :term:`TOOLCHAIN_OUTPUTNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8840 | This variable defines the name used for the toolchain output. The |
| 8841 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8842 | the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8843 | |
| 8844 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" |
| 8845 | |
| 8846 | See |
| 8847 | the :term:`SDK_NAME` and |
| 8848 | :term:`SDK_VERSION` variables for additional |
| 8849 | information. |
| 8850 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8851 | :term:`TOOLCHAIN_TARGET_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8852 | This variable lists packages the OpenEmbedded build system uses when |
| 8853 | it creates the target part of an SDK (i.e. the part built for the |
| 8854 | target hardware), which includes libraries and headers. Use this |
| 8855 | variable to add individual packages to the part of the SDK that runs |
| 8856 | on the target. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8857 | ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8858 | in the Yocto Project Application Development and the Extensible |
| 8859 | Software Development Kit (eSDK) manual for more information. |
| 8860 | |
| 8861 | For background information on cross-development toolchains in the |
| 8862 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8863 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8864 | section in the Yocto Project Overview and Concepts Manual. For |
| 8865 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8866 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8867 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8868 | :term:`TOPDIR` |
| 8869 | See :term:`bitbake:TOPDIR` in the BitBake manual. |
| 8870 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8871 | :term:`TRANSLATED_TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8872 | A sanitized version of :term:`TARGET_ARCH`. This |
| 8873 | variable is used where the architecture is needed in a value where |
| 8874 | underscores are not allowed, for example within package filenames. In |
| 8875 | this case, dash characters replace any underscore characters used in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8876 | :term:`TARGET_ARCH`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8877 | |
| 8878 | Do not edit this variable. |
| 8879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8880 | :term:`TUNE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8881 | The GNU canonical architecture for a specific architecture (i.e. |
| 8882 | ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses |
| 8883 | this value to setup configuration. |
| 8884 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8885 | :term:`TUNE_ARCH` definitions are specific to a given architecture. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8886 | definitions can be a single static definition, or can be dynamically |
| 8887 | adjusted. You can see details for a given CPU family by looking at |
| 8888 | the architecture's ``README`` file. For example, the |
| 8889 | ``meta/conf/machine/include/mips/README`` file in the |
| 8890 | :term:`Source Directory` provides information for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8891 | :term:`TUNE_ARCH` specific to the ``mips`` architecture. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8892 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8893 | :term:`TUNE_ARCH` is tied closely to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8894 | :term:`TARGET_ARCH`, which defines the target |
| 8895 | machine's architecture. The BitBake configuration file |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8896 | (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8897 | |
| 8898 | TARGET_ARCH = "${TUNE_ARCH}" |
| 8899 | |
| 8900 | The following list, which is by no means complete since architectures |
| 8901 | are configurable, shows supported machine architectures: |
| 8902 | |
| 8903 | - arm |
| 8904 | - i586 |
| 8905 | - x86_64 |
| 8906 | - powerpc |
| 8907 | - powerpc64 |
| 8908 | - mips |
| 8909 | - mipsel |
| 8910 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8911 | :term:`TUNE_ASARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8912 | Specifies architecture-specific assembler flags for the target |
| 8913 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8914 | :term:`TUNE_ASARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8915 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8916 | through :term:`TUNE_FEATURES`. For example, the |
| 8917 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8918 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8919 | |
| 8920 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" |
| 8921 | |
| 8922 | .. note:: |
| 8923 | |
| 8924 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8925 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8926 | supply its own set of flags). |
| 8927 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8928 | :term:`TUNE_CCARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8929 | Specifies architecture-specific C compiler flags for the target |
| 8930 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8931 | :term:`TUNE_CCARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8932 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8933 | through :term:`TUNE_FEATURES`. |
| 8934 | |
| 8935 | .. note:: |
| 8936 | |
| 8937 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8938 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8939 | supply its own set of flags). |
| 8940 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8941 | :term:`TUNE_FEATURES` |
| 8942 | Features used to "tune" a compiler for optimal use given a specific |
| 8943 | processor. The features are defined within the tune files and allow |
| 8944 | arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on |
| 8945 | the features. |
| 8946 | |
| 8947 | The OpenEmbedded build system verifies the features to be sure they |
| 8948 | are not conflicting and that they are supported. |
| 8949 | |
| 8950 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8951 | :term:`TUNE_FEATURES` as follows:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8952 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8953 | TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8954 | |
| 8955 | See the :term:`DEFAULTTUNE` variable for more information. |
| 8956 | |
| 8957 | :term:`TUNE_LDARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8958 | Specifies architecture-specific linker flags for the target system. |
| 8959 | The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8960 | :term:`TUNE_LDARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8961 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8962 | through :term:`TUNE_FEATURES`. For example, the |
| 8963 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8964 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8965 | |
| 8966 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" |
| 8967 | |
| 8968 | .. note:: |
| 8969 | |
| 8970 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8971 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8972 | supply its own set of flags). |
| 8973 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8974 | :term:`TUNE_PKGARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8975 | The package architecture understood by the packaging system to define |
| 8976 | the architecture, ABI, and tuning of output packages. The specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8977 | tune is defined using the "_tune" override as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8978 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8979 | TUNE_PKGARCH:tune-tune = "tune" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8980 | |
| 8981 | These tune-specific package architectures are defined in the machine |
| 8982 | include files. Here is an example of the "core2-32" tuning as used in |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 8983 | the ``meta/conf/machine/include/x86/tune-core2.inc`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8984 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8985 | TUNE_PKGARCH:tune-core2-32 = "core2-32" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8986 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8987 | :term:`TUNECONFLICTS[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8988 | Specifies CPU or Application Binary Interface (ABI) tuning features |
| 8989 | that conflict with feature. |
| 8990 | |
| 8991 | Known tuning conflicts are specified in the machine include files in |
| 8992 | the :term:`Source Directory`. Here is an example from |
| 8993 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file |
| 8994 | that lists the "o32" and "n64" features as conflicting with the "n32" |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8995 | feature:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8996 | |
| 8997 | TUNECONFLICTS[n32] = "o32 n64" |
| 8998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8999 | :term:`TUNEVALID[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9000 | Specifies a valid CPU or Application Binary Interface (ABI) tuning |
| 9001 | feature. The specified feature is stored as a flag. Valid features |
| 9002 | are specified in the machine include files (e.g. |
| 9003 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9004 | from that file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9005 | |
| 9006 | TUNEVALID[bigendian] = "Enable big-endian mode." |
| 9007 | |
| 9008 | See the machine include files in the :term:`Source Directory` |
| 9009 | for these features. |
| 9010 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9011 | :term:`UBOOT_CONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9012 | Configures the :term:`UBOOT_MACHINE` and can |
| 9013 | also define :term:`IMAGE_FSTYPES` for individual |
| 9014 | cases. |
| 9015 | |
| 9016 | Following is an example from the ``meta-fsl-arm`` layer. :: |
| 9017 | |
| 9018 | UBOOT_CONFIG ??= "sd" |
| 9019 | UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard" |
| 9020 | UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config" |
| 9021 | UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs" |
| 9022 | UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" |
| 9023 | |
| 9024 | In this example, "sd" is selected as the configuration of the possible four for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9025 | :term:`UBOOT_MACHINE`. The "sd" configuration defines |
| 9026 | "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 9027 | "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9028 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9029 | For more information on how the :term:`UBOOT_CONFIG` is handled, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9030 | :ref:`ref-classes-uboot-config` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9031 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9032 | :term:`UBOOT_DTB_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9033 | Specifies the load address for the dtb image used by U-Boot. During FIT |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9034 | image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9035 | :ref:`ref-classes-kernel-fitimage` class to specify the load address to be |
| 9036 | used in creating the dtb sections of Image Tree Source for the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9037 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9038 | :term:`UBOOT_DTBO_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9039 | Specifies the load address for the dtbo image used by U-Boot. During FIT |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9040 | image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9041 | :ref:`ref-classes-kernel-fitimage` class to specify the load address to be |
| 9042 | used in creating the dtbo sections of Image Tree Source for the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9043 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9044 | :term:`UBOOT_ENTRYPOINT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9045 | Specifies the entry point for the U-Boot image. During U-Boot image |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9046 | creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9047 | command-line parameter to the ``uboot-mkimage`` utility. |
| 9048 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9049 | :term:`UBOOT_LOADADDRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9050 | Specifies the load address for the U-Boot image. During U-Boot image |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9051 | creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9052 | command-line parameter to the ``uboot-mkimage`` utility. |
| 9053 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9054 | :term:`UBOOT_LOCALVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9055 | Appends a string to the name of the local version of the U-Boot |
| 9056 | image. For example, assuming the version of the U-Boot image built |
| 9057 | was "2013.10", the full version string reported by U-Boot would be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9058 | "2013.10-yocto" given the following statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9059 | |
| 9060 | UBOOT_LOCALVERSION = "-yocto" |
| 9061 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9062 | :term:`UBOOT_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9063 | Specifies the value passed on the ``make`` command line when building |
| 9064 | a U-Boot image. The value indicates the target platform |
| 9065 | configuration. You typically set this variable from the machine |
| 9066 | configuration file (i.e. ``conf/machine/machine_name.conf``). |
| 9067 | |
| 9068 | Please see the "Selection of Processor Architecture and Board Type" |
| 9069 | section in the U-Boot README for valid values for this variable. |
| 9070 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9071 | :term:`UBOOT_MAKE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9072 | Specifies the target called in the ``Makefile``. The default target |
| 9073 | is "all". |
| 9074 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9075 | :term:`UBOOT_MKIMAGE` |
| 9076 | Specifies the name of the mkimage command as used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9077 | :ref:`ref-classes-kernel-fitimage` class to assemble |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9078 | the FIT image. This can be used to substitute an alternative command, wrapper |
| 9079 | script or function if desired. The default is "uboot-mkimage". |
| 9080 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9081 | :term:`UBOOT_MKIMAGE_DTCOPTS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9082 | Options for the device tree compiler passed to mkimage '-D' feature while |
| 9083 | creating FIT image in :ref:`ref-classes-kernel-fitimage` class. If |
| 9084 | :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then |
| 9085 | :ref:`ref-classes-kernel-fitimage` will not pass the ``-D`` option to |
| 9086 | mkimage. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9087 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 9088 | :term:`UBOOT_MKIMAGE_KERNEL_TYPE` |
| 9089 | Specifies the type argument for the kernel as passed to ``uboot-mkimage``. |
| 9090 | The default value is "kernel". |
| 9091 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9092 | :term:`UBOOT_MKIMAGE_SIGN` |
| 9093 | Specifies the name of the mkimage command as used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9094 | :ref:`ref-classes-kernel-fitimage` class to sign |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9095 | the FIT image after it has been assembled (if enabled). This can be used |
| 9096 | to substitute an alternative command, wrapper script or function if |
| 9097 | desired. The default is "${:term:`UBOOT_MKIMAGE`}". |
| 9098 | |
| 9099 | :term:`UBOOT_MKIMAGE_SIGN_ARGS` |
| 9100 | Optionally specifies additional arguments for the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9101 | :ref:`ref-classes-kernel-fitimage` class to pass to the |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9102 | mkimage command when signing the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9103 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9104 | :term:`UBOOT_RD_ENTRYPOINT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9105 | Specifies the entrypoint for the RAM disk image. During FIT image |
| 9106 | creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in |
| 9107 | :ref:`ref-classes-kernel-fitimage` class to specify the entrypoint to be |
| 9108 | used in creating the Image Tree Source for the FIT image. |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 9109 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9110 | :term:`UBOOT_RD_LOADADDRESS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9111 | Specifies the load address for the RAM disk image. During FIT image |
| 9112 | creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in |
| 9113 | :ref:`ref-classes-kernel-fitimage` class to specify the load address to |
| 9114 | be used in creating the Image Tree Source for the FIT image. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9115 | |
| 9116 | :term:`UBOOT_SIGN_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9117 | Enable signing of FIT image. The default value is "0". |
| 9118 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9119 | :term:`UBOOT_SIGN_KEYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9120 | Location of the directory containing the RSA key and |
| 9121 | certificate used for signing FIT image. |
| 9122 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9123 | :term:`UBOOT_SIGN_KEYNAME` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9124 | The name of keys used for signing U-Boot FIT image stored in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9125 | :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt |
| 9126 | certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have |
| 9127 | :term:`UBOOT_SIGN_KEYNAME` set to "dev". |
| 9128 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9129 | :term:`UBOOT_SUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9130 | Points to the generated U-Boot extension. For example, ``u-boot.sb`` |
| 9131 | has a ``.sb`` extension. |
| 9132 | |
| 9133 | The default U-Boot extension is ``.bin`` |
| 9134 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9135 | :term:`UBOOT_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9136 | Specifies the target used for building U-Boot. The target is passed |
| 9137 | directly as part of the "make" command (e.g. SPL and AIS). If you do |
| 9138 | not specifically set this variable, the OpenEmbedded build process |
| 9139 | passes and uses "all" for the target during the U-Boot building |
| 9140 | process. |
| 9141 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9142 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9143 | Specifies a list of options that, if reported by the configure script |
| 9144 | as being invalid, should not generate a warning during the |
| 9145 | :ref:`ref-tasks-configure` task. Normally, invalid |
| 9146 | configure options are simply not passed to the configure script (e.g. |
| 9147 | should be removed from :term:`EXTRA_OECONF` or |
| 9148 | :term:`PACKAGECONFIG_CONFARGS`). |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 9149 | However, there are common options that are passed to all |
| 9150 | configure scripts at a class level, but might not be valid for some |
| 9151 | configure scripts. Therefore warnings about these options are useless. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9152 | For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9153 | |
| 9154 | The configure arguments check that uses |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9155 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9156 | :ref:`ref-classes-insane` class and is only enabled if the |
| 9157 | recipe inherits the :ref:`ref-classes-autotools` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9158 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9159 | :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9160 | For recipes inheriting the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9161 | :ref:`ref-classes-update-rc.d` class, :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9162 | specifies the package that contains the initscript that is enabled. |
| 9163 | |
| 9164 | The default value is "${PN}". Given that almost all recipes that |
| 9165 | install initscripts package them in the main package for the recipe, |
| 9166 | you rarely need to set this variable in individual recipes. |
| 9167 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9168 | :term:`UPSTREAM_CHECK_COMMITS` |
| 9169 | You can perform a per-recipe check for what the latest upstream |
| 9170 | source code version is by calling ``devtool latest-version recipe``. If |
| 9171 | the recipe source code is provided from Git repositories, but |
| 9172 | releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS` |
| 9173 | to ``1`` in the recipe, and the OpenEmbedded build system |
| 9174 | will compare the latest commit with the one currently specified |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9175 | by the recipe (:term:`SRCREV`):: |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9176 | |
| 9177 | UPSTREAM_CHECK_COMMITS = "1" |
| 9178 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9179 | :term:`UPSTREAM_CHECK_GITTAGREGEX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9180 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9181 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9182 | the recipe source code is provided from Git repositories, the |
| 9183 | OpenEmbedded build system determines the latest upstream version by |
| 9184 | picking the latest tag from the list of all repository tags. |
| 9185 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9186 | You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9187 | regular expression to filter only the relevant tags should the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9188 | default filter not work correctly:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9189 | |
| 9190 | UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" |
| 9191 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9192 | :term:`UPSTREAM_CHECK_REGEX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9193 | Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9194 | regular expression instead of the default one when the package |
| 9195 | checking system is parsing the page found using |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9196 | :term:`UPSTREAM_CHECK_URI`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9197 | |
| 9198 | UPSTREAM_CHECK_REGEX = "package_regex" |
| 9199 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9200 | :term:`UPSTREAM_CHECK_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9201 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9202 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9203 | the source code is provided from tarballs, the latest version is |
| 9204 | determined by fetching the directory listing where the tarball is and |
| 9205 | attempting to find a later tarball. When this approach does not work, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9206 | you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9207 | contains the link to the latest tarball:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9208 | |
| 9209 | UPSTREAM_CHECK_URI = "recipe_url" |
| 9210 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9211 | :term:`UPSTREAM_VERSION_UNKNOWN` |
| 9212 | You can perform a per-recipe check for what the latest upstream |
| 9213 | source code version is by calling ``devtool latest-version recipe``. |
| 9214 | If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`, |
| 9215 | :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in |
| 9216 | the recipe allows to determine what the latest upstream version is, |
| 9217 | you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9218 | to acknowledge that the check cannot be performed:: |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9219 | |
| 9220 | UPSTREAM_VERSION_UNKNOWN = "1" |
| 9221 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9222 | :term:`USE_DEVFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9223 | Determines if ``devtmpfs`` is used for ``/dev`` population. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9224 | default value used for :term:`USE_DEVFS` is "1" when no value is |
| 9225 | specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9226 | statically populated ``/dev`` directory. |
| 9227 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9228 | See the ":ref:`dev-manual/device-manager:selecting a device manager`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9229 | the Yocto Project Development Tasks Manual for information on how to |
| 9230 | use this variable. |
| 9231 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9232 | :term:`USE_VT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9233 | When using |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9234 | :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`, |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 9235 | determines whether or not to run a :wikipedia:`getty <Getty_(Unix)>` |
| 9236 | on any virtual terminals in order to enable logging in through those |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9237 | terminals. |
| 9238 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9239 | The default value used for :term:`USE_VT` is "1" when no default value is |
| 9240 | specifically set. Typically, you would set :term:`USE_VT` to "0" in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9241 | machine configuration file for machines that do not have a graphical |
| 9242 | display attached and therefore do not need virtual terminal |
| 9243 | functionality. |
| 9244 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9245 | :term:`USER_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9246 | A list of classes to globally inherit. These classes are used by the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9247 | OpenEmbedded build system to enable extra features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9248 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 9249 | Classes inherited using :term:`USER_CLASSES` must be located in the |
| 9250 | ``classes-global/`` or ``classes/`` subdirectories. |
| 9251 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9252 | The default list is set in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9253 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9254 | USER_CLASSES ?= "buildstats" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9255 | |
| 9256 | For more information, see |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 9257 | ``meta-poky/conf/templates/default/local.conf.sample`` in the |
| 9258 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9259 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9260 | :term:`USERADD_ERROR_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9261 | If set to ``error``, forces the OpenEmbedded build system to produce |
| 9262 | an error if the user identification (``uid``) and group |
| 9263 | identification (``gid``) values are not defined in any of the files |
| 9264 | listed in :term:`USERADD_UID_TABLES` and |
| 9265 | :term:`USERADD_GID_TABLES`. If set to |
| 9266 | ``warn``, a warning will be issued instead. |
| 9267 | |
| 9268 | The default behavior for the build system is to dynamically apply |
| 9269 | ``uid`` and ``gid`` values. Consequently, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9270 | :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9271 | on using statically assigned ``gid`` and ``uid`` values, you should |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9272 | set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9273 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9274 | |
| 9275 | USERADD_ERROR_DYNAMIC = "error" |
| 9276 | |
| 9277 | Overriding the |
| 9278 | default behavior implies you are going to also take steps to set |
| 9279 | static ``uid`` and ``gid`` values through use of the |
| 9280 | :term:`USERADDEXTENSION`, |
| 9281 | :term:`USERADD_UID_TABLES`, and |
| 9282 | :term:`USERADD_GID_TABLES` variables. |
| 9283 | |
| 9284 | .. note:: |
| 9285 | |
| 9286 | There is a difference in behavior between setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9287 | :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9288 | When it is set to ``warn``, the build system will report a warning for |
| 9289 | every undefined ``uid`` and ``gid`` in any recipe. But when it is set |
| 9290 | to ``error``, it will only report errors for recipes that are actually |
| 9291 | built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9292 | This saves you from having to add static IDs for recipes that you |
| 9293 | know will never be built. |
| 9294 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9295 | :term:`USERADD_GID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9296 | Specifies a password file to use for obtaining static group |
| 9297 | identification (``gid``) values when the OpenEmbedded build system |
| 9298 | adds a group to the system during package installation. |
| 9299 | |
| 9300 | When applying static group identification (``gid``) values, the |
| 9301 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 9302 | ``files/group`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9303 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9304 | |
| 9305 | |
| 9306 | USERADD_GID_TABLES = "files/group" |
| 9307 | |
| 9308 | .. note:: |
| 9309 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9310 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 9311 | causes the build system to use static ``gid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9312 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9313 | :term:`USERADD_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9314 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9315 | this variable specifies the individual packages within the recipe |
| 9316 | that require users and/or groups to be added. |
| 9317 | |
| 9318 | You must set this variable if the recipe inherits the class. For |
| 9319 | example, the following enables adding a user for the main package in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9320 | a recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9321 | |
| 9322 | USERADD_PACKAGES = "${PN}" |
| 9323 | |
| 9324 | .. note:: |
| 9325 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9326 | It follows that if you are going to use the :term:`USERADD_PACKAGES` |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9327 | variable, you need to set one or more of the :term:`USERADD_PARAM`, |
| 9328 | :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9329 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9330 | :term:`USERADD_PARAM` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9331 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9332 | this variable specifies for a package what parameters should pass to |
| 9333 | the ``useradd`` command if you add a user to the system when the |
| 9334 | package is installed. |
| 9335 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9336 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9337 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 9338 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9339 | --no-create-home --shell /bin/false \ |
| 9340 | --user-group messagebus" |
| 9341 | |
| 9342 | For information on the |
| 9343 | standard Linux shell command ``useradd``, see |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9344 | https://linux.die.net/man/8/useradd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9345 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9346 | :term:`USERADD_UID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9347 | Specifies a password file to use for obtaining static user |
| 9348 | identification (``uid``) values when the OpenEmbedded build system |
| 9349 | adds a user to the system during package installation. |
| 9350 | |
| 9351 | When applying static user identification (``uid``) values, the |
| 9352 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 9353 | ``files/passwd`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9354 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9355 | |
| 9356 | USERADD_UID_TABLES = "files/passwd" |
| 9357 | |
| 9358 | .. note:: |
| 9359 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9360 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 9361 | causes the build system to use static ``uid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9362 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9363 | :term:`USERADDEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9364 | When set to "useradd-staticids", causes the OpenEmbedded build system |
| 9365 | to base all user and group additions on a static ``passwd`` and |
| 9366 | ``group`` files found in :term:`BBPATH`. |
| 9367 | |
| 9368 | To use static user identification (``uid``) and group identification |
| 9369 | (``gid``) values, set the variable as follows in your ``local.conf`` |
| 9370 | file: USERADDEXTENSION = "useradd-staticids" |
| 9371 | |
| 9372 | .. note:: |
| 9373 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9374 | Setting this variable to use static ``uid`` and ``gid`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9375 | values causes the OpenEmbedded build system to employ the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9376 | :ref:`ref-classes-useradd` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9377 | |
| 9378 | If you use static ``uid`` and ``gid`` information, you must also |
| 9379 | specify the ``files/passwd`` and ``files/group`` files by setting the |
| 9380 | :term:`USERADD_UID_TABLES` and |
| 9381 | :term:`USERADD_GID_TABLES` variables. |
| 9382 | Additionally, you should also set the |
| 9383 | :term:`USERADD_ERROR_DYNAMIC` variable. |
| 9384 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9385 | :term:`VOLATILE_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9386 | Specifies the persistence of the target's ``/var/log`` directory, |
| 9387 | which is used to house postinstall target log files. |
| 9388 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9389 | By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9390 | file is not persistent. You can override this setting by setting the |
| 9391 | variable to "no" to make the log directory persistent. |
| 9392 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 9393 | :term:`VOLATILE_TMP_DIR` |
| 9394 | Specifies the persistence of the target's ``/tmp`` directory. |
| 9395 | |
| 9396 | By default, :term:`VOLATILE_TMP_DIR` is set to "yes", in which case |
| 9397 | ``/tmp`` links to a directory which resides in RAM in a ``tmpfs`` |
| 9398 | filesystem. |
| 9399 | |
| 9400 | If instead, you want the ``/tmp`` directory to be persistent, set the |
| 9401 | variable to "no" to make it a regular directory in the root filesystem. |
| 9402 | |
| 9403 | This supports both sysvinit and systemd based systems. |
| 9404 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9405 | :term:`WARN_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9406 | Specifies the quality assurance checks whose failures are reported as |
| 9407 | warnings by the OpenEmbedded build system. You set this variable in |
| 9408 | your distribution configuration file. For a list of the checks you |
| 9409 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 9410 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9411 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 9412 | :term:`WATCHDOG_TIMEOUT` |
| 9413 | Specifies the timeout in seconds used by the ``watchdog`` recipe and |
| 9414 | also by ``systemd`` during reboot. The default is 60 seconds. |
| 9415 | |
| 9416 | :term:`WIRELESS_DAEMON` |
| 9417 | For ``connman`` and ``packagegroup-base``, specifies the wireless |
| 9418 | daemon to use. The default is "wpa-supplicant" (note that the value |
| 9419 | uses a dash and not an underscore). |
| 9420 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9421 | :term:`WKS_FILE` |
| 9422 | Specifies the location of the Wic kickstart file that is used by the |
| 9423 | OpenEmbedded build system to create a partitioned image |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9424 | (``image.wic``). For information on how to create a partitioned |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9425 | image, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9426 | ":ref:`dev-manual/wic:creating partitioned images using wic`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9427 | section in the Yocto Project Development Tasks Manual. For details on |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9428 | the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9429 | |
| 9430 | :term:`WKS_FILE_DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9431 | When placed in the recipe that builds your image, this variable lists |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9432 | build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9433 | applicable when Wic images are active (i.e. when |
| 9434 | :term:`IMAGE_FSTYPES` contains entries related |
| 9435 | to Wic). If your recipe does not create Wic images, the variable has |
| 9436 | no effect. |
| 9437 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9438 | The :term:`WKS_FILE_DEPENDS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9439 | :term:`DEPENDS` variable. When you use the variable in |
| 9440 | your recipe that builds the Wic image, dependencies you list in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9441 | :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9442 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9443 | With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9444 | specify a list of additional dependencies (e.g. native tools, |
| 9445 | bootloaders, and so forth), that are required to build Wic images. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9446 | Following is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9447 | |
| 9448 | WKS_FILE_DEPENDS = "some-native-tool" |
| 9449 | |
| 9450 | In the |
| 9451 | previous example, some-native-tool would be replaced with an actual |
| 9452 | native tool on which the build would depend. |
| 9453 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 9454 | :term:`WKS_FILES` |
| 9455 | Specifies a list of candidate Wic kickstart files to be used by the |
| 9456 | OpenEmbedded build system to create a partitioned image. Only the |
| 9457 | first one that is found, from left to right, will be used. |
| 9458 | |
| 9459 | This is only useful when there are multiple ``.wks`` files that can be |
| 9460 | used to produce an image. A typical case is when multiple layers are |
| 9461 | used for different hardware platforms, each supplying a different |
| 9462 | ``.wks`` file. In this case, you specify all possible ones through |
| 9463 | :term:`WKS_FILES`. |
| 9464 | |
| 9465 | If only one ``.wks`` file is used, set :term:`WKS_FILE` instead. |
| 9466 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9467 | :term:`WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9468 | The pathname of the work directory in which the OpenEmbedded build |
| 9469 | system builds a recipe. This directory is located within the |
| 9470 | :term:`TMPDIR` directory structure and is specific to |
| 9471 | the recipe being built and the system for which it is being built. |
| 9472 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9473 | The :term:`WORKDIR` directory is defined as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9474 | |
| 9475 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
| 9476 | |
| 9477 | The actual directory depends on several things: |
| 9478 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9479 | - :term:`TMPDIR`: The top-level build output directory |
| 9480 | - :term:`MULTIMACH_TARGET_SYS`: The target system identifier |
| 9481 | - :term:`PN`: The recipe name |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 9482 | - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9483 | is usually the case for most recipes, then :term:`EXTENDPE` is blank. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9484 | - :term:`PV`: The recipe version |
| 9485 | - :term:`PR`: The recipe revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9486 | |
| 9487 | As an example, assume a Source Directory top-level folder name |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 9488 | ``poky``, a default :term:`Build Directory` at ``poky/build``, and a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9489 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose |
| 9490 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work |
| 9491 | directory the build system uses to build the package would be as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9492 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9493 | |
| 9494 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
| 9495 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9496 | :term:`XSERVER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9497 | Specifies the packages that should be installed to provide an X |
| 9498 | server and drivers for the current machine, assuming your image |
| 9499 | directly includes ``packagegroup-core-x11-xserver`` or, perhaps |
| 9500 | indirectly, includes "x11-base" in |
| 9501 | :term:`IMAGE_FEATURES`. |
| 9502 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9503 | The default value of :term:`XSERVER`, if not specified in the machine |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9504 | configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 9505 | |
| 9506 | :term:`XZ_THREADS` |
| 9507 | Specifies the number of parallel threads that should be used when |
| 9508 | using xz compression. |
| 9509 | |
| 9510 | By default this scales with core count, but is never set less than 2 |
| 9511 | to ensure that multi-threaded mode is always used so that the output |
| 9512 | file contents are deterministic. Builds will work with a value of 1 |
| 9513 | but the output will differ compared to the output from the compression |
| 9514 | generated when more than one thread is used. |
| 9515 | |
| 9516 | On systems where many tasks run in parallel, setting a limit to this |
| 9517 | can be helpful in controlling system resource usage. |
| 9518 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9519 | :term:`XZ_MEMLIMIT` |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 9520 | Specifies the maximum memory the xz compression should use as a percentage |
| 9521 | of system memory. If unconstrained the xz compressor can use large amounts of |
| 9522 | memory and become problematic with parallelism elsewhere in the build. |
| 9523 | "50%" has been found to be a good value. |
| 9524 | |
| 9525 | :term:`ZSTD_THREADS` |
| 9526 | Specifies the number of parallel threads that should be used when |
| 9527 | using ZStandard compression. |
| 9528 | |
| 9529 | By default this scales with core count, but is never set less than 2 |
| 9530 | to ensure that multi-threaded mode is always used so that the output |
| 9531 | file contents are deterministic. Builds will work with a value of 1 |
| 9532 | but the output will differ compared to the output from the compression |
| 9533 | generated when more than one thread is used. |
| 9534 | |
| 9535 | On systems where many tasks run in parallel, setting a limit to this |
| 9536 | can be helpful in controlling system resource usage. |