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:`AUTO_LIBNAME_PKGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 196 | When the :ref:`ref-classes-debian` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 197 | which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 198 | packages should be checked for libraries and renamed according to |
| 199 | Debian library package naming. |
| 200 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 201 | The default value is "${PACKAGES}", which causes the |
| 202 | :ref:`ref-classes-debian` class to act on all packages that are |
| 203 | explicitly generated by the recipe. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 204 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 205 | :term:`AUTOREV` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 206 | 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] | 207 | use the latest source revision in the repository. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 208 | |
| 209 | SRCREV = "${AUTOREV}" |
| 210 | |
| 211 | If you use the previous statement to retrieve the latest version of |
| 212 | software, you need to be sure :term:`PV` contains |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 213 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel |
| 214 | recipe that inherits the :ref:`ref-classes-kernel` class and you |
| 215 | use the previous statement. In this example, ``${SRCPV}`` does not |
| 216 | automatically get into :term:`PV`. Consequently, you need to change |
| 217 | :term:`PV` in your recipe so that it does contain ``${SRCPV}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 218 | |
| 219 | For more information see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 220 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 221 | section in the Yocto Project Development Tasks Manual. |
| 222 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 223 | :term:`AUTO_SYSLINUXMENU` |
| 224 | Enables creating an automatic menu for the syslinux bootloader. You |
| 225 | must set this variable in your recipe. The |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 226 | :ref:`ref-classes-syslinux` class checks this variable. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 227 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 228 | :term:`AVAILTUNES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 229 | The list of defined CPU and Application Binary Interface (ABI) |
| 230 | tunings (i.e. "tunes") available for use by the OpenEmbedded build |
| 231 | system. |
| 232 | |
| 233 | The list simply presents the tunes that are available. Not all tunes |
| 234 | may be compatible with a particular machine configuration, or with |
| 235 | each other in a |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 236 | :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] | 237 | configuration. |
| 238 | |
| 239 | To add a tune to the list, be sure to append it with spaces using the |
| 240 | "+=" BitBake operator. Do not simply replace the list by using the |
| 241 | "=" operator. See the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 242 | ":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] | 243 | User Manual for more information. |
| 244 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 245 | :term:`AZ_SAS` |
| 246 | Azure Storage Shared Access Signature, when using the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 247 | :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] | 248 | 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] | 249 | and gain access to non-public artifacts:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 250 | |
| 251 | AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" |
| 252 | |
| 253 | For more information see Microsoft's Azure Storage documentation at |
| 254 | https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview |
| 255 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 256 | :term:`B` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 257 | The directory within the :term:`Build Directory` in which the |
| 258 | OpenEmbedded build system places generated objects during a recipe's |
| 259 | build process. By default, this directory is the same as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 260 | :term:`S` directory, which is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 261 | |
| 262 | S = "${WORKDIR}/${BP}" |
| 263 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 264 | You can separate the (:term:`S`) directory and the directory pointed to |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 265 | by the :term:`B` variable. Most Autotools-based recipes support |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 266 | separating these directories. The build system defaults to using |
| 267 | separate directories for ``gcc`` and some kernel recipes. |
| 268 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 269 | :term:`BAD_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 270 | Lists "recommended-only" packages to not install. Recommended-only |
| 271 | packages are packages installed only through the |
| 272 | :term:`RRECOMMENDS` variable. You can prevent any |
| 273 | of these "recommended" packages from being installed by listing them |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 274 | with the :term:`BAD_RECOMMENDATIONS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 275 | |
| 276 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." |
| 277 | |
| 278 | You can set this variable globally in your ``local.conf`` file or you |
| 279 | 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] | 280 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 281 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 282 | BAD_RECOMMENDATIONS:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 283 | |
| 284 | It is important to realize that if you choose to not install packages |
| 285 | using this variable and some other packages are dependent on them |
| 286 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 287 | variable), the OpenEmbedded build system ignores your request and |
| 288 | will install the packages to avoid dependency errors. |
| 289 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 290 | This variable is supported only when using the IPK and RPM |
| 291 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 292 | |
| 293 | See the :term:`NO_RECOMMENDATIONS` and the |
| 294 | :term:`PACKAGE_EXCLUDE` variables for related |
| 295 | information. |
| 296 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 297 | :term:`BASE_LIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 298 | The library directory name for the CPU or Application Binary |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 299 | Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 300 | 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] | 301 | section in the Yocto Project Development Tasks Manual for information |
| 302 | on Multilib. |
| 303 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 304 | 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] | 305 | the :term:`Source Directory`. If Multilib is not |
| 306 | being used, the value defaults to "lib". |
| 307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 308 | :term:`BASE_WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 309 | Points to the base of the work directory for all recipes. The default |
| 310 | value is "${TMPDIR}/work". |
| 311 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 312 | :term:`BB_ALLOWED_NETWORKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 313 | Specifies a space-delimited list of hosts that the fetcher is allowed |
| 314 | to use to obtain the required source code. Following are |
| 315 | considerations surrounding this variable: |
| 316 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 317 | - 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] | 318 | or set to "0". |
| 319 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 320 | - There is limited support for wildcard matching against the beginning of |
| 321 | host names. For example, the following setting matches |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 322 | ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 323 | |
| 324 | BB_ALLOWED_NETWORKS = "*.gnu.org" |
| 325 | |
| 326 | .. note:: |
| 327 | |
| 328 | The use of the "``*``" character only works at the beginning of |
| 329 | a host name and it must be isolated from the remainder of the |
| 330 | host name. You cannot use the wildcard character in any other |
| 331 | location of the name or combined with the front part of the |
| 332 | name. |
| 333 | |
| 334 | For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` |
| 335 | is not. |
| 336 | |
| 337 | - Mirrors not in the host list are skipped and logged in debug. |
| 338 | |
| 339 | - Attempts to access networks not in the host list cause a failure. |
| 340 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 341 | Using :term:`BB_ALLOWED_NETWORKS` in conjunction with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 342 | :term:`PREMIRRORS` is very useful. Adding the host |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 343 | 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] | 344 | fetched from an allowed location and avoids raising an error when a |
| 345 | host that is not allowed is in a :term:`SRC_URI` |
| 346 | statement. This is because the fetcher does not attempt to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 347 | host listed in :term:`SRC_URI` after a successful fetch from the |
| 348 | :term:`PREMIRRORS` occurs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 349 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 350 | :term:`BB_BASEHASH_IGNORE_VARS` |
| 351 | See :term:`bitbake:BB_BASEHASH_IGNORE_VARS` in the BitBake manual. |
| 352 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 353 | :term:`BB_CACHEDIR` |
| 354 | See :term:`bitbake:BB_CACHEDIR` in the BitBake manual. |
| 355 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 356 | :term:`BB_CHECK_SSL_CERTS` |
| 357 | See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual. |
| 358 | |
| 359 | :term:`BB_CONSOLELOG` |
| 360 | See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual. |
| 361 | |
| 362 | :term:`BB_CURRENTTASK` |
| 363 | See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual. |
| 364 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 365 | :term:`BB_DANGLINGAPPENDS_WARNONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 366 | Defines how BitBake handles situations where an append file |
| 367 | (``.bbappend``) has no corresponding recipe file (``.bb``). This |
| 368 | condition often occurs when layers get out of sync (e.g. ``oe-core`` |
| 369 | bumps a recipe version and the old recipe no longer exists and the |
| 370 | other layer has not been updated to the new version of the recipe |
| 371 | yet). |
| 372 | |
| 373 | The default fatal behavior is safest because it is the sane reaction |
| 374 | given something is out of sync. It is important to realize when your |
| 375 | changes are no longer being applied. |
| 376 | |
| 377 | You can change the default behavior by setting this variable to "1", |
| 378 | "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] | 379 | :term:`Build Directory`: Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 380 | |
| 381 | BB_DANGLINGAPPENDS_WARNONLY = "1" |
| 382 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 383 | :term:`BB_DEFAULT_TASK` |
| 384 | See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual. |
| 385 | |
| 386 | :term:`BB_DEFAULT_UMASK` |
| 387 | See :term:`bitbake:BB_DEFAULT_UMASK` in the BitBake manual. |
| 388 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 389 | :term:`BB_DISKMON_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 390 | Monitors disk space and available inodes during the build and allows |
| 391 | you to control the build based on these parameters. |
| 392 | |
| 393 | Disk space monitoring is disabled by default. To enable monitoring, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 394 | 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] | 395 | found in the :term:`Build Directory`. Use the |
| 396 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 397 | |
| 398 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 399 | |
| 400 | BB_DISKMON_DIRS = "action,dir,threshold [...]" |
| 401 | |
| 402 | where: |
| 403 | |
| 404 | action is: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 405 | ABORT: Immediately stop the build when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 406 | a threshold is broken. |
| 407 | STOPTASKS: Stop the build after the currently |
| 408 | executing tasks have finished when |
| 409 | a threshold is broken. |
| 410 | WARN: Issue a warning but continue the |
| 411 | build when a threshold is broken. |
| 412 | Subsequent warnings are issued as |
| 413 | defined by the BB_DISKMON_WARNINTERVAL |
| 414 | variable, which must be defined in |
| 415 | the conf/local.conf file. |
| 416 | |
| 417 | dir is: |
| 418 | Any directory you choose. You can specify one or |
| 419 | more directories to monitor by separating the |
| 420 | groupings with a space. If two directories are |
| 421 | on the same device, only the first directory |
| 422 | is monitored. |
| 423 | |
| 424 | threshold is: |
| 425 | Either the minimum available disk space, |
| 426 | the minimum number of free inodes, or |
| 427 | both. You must specify at least one. To |
| 428 | omit one or the other, simply omit the value. |
| 429 | Specify the threshold using G, M, K for Gbytes, |
| 430 | Mbytes, and Kbytes, respectively. If you do |
| 431 | not specify G, M, or K, Kbytes is assumed by |
| 432 | default. Do not use GB, MB, or KB. |
| 433 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 434 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 435 | |
| 436 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
| 437 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
| 438 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" |
| 439 | |
| 440 | The first example works only if you also provide the |
| 441 | :term:`BB_DISKMON_WARNINTERVAL` |
| 442 | variable in the ``conf/local.conf``. This example causes the build |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 443 | system to immediately stop when either the disk space in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 444 | ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops |
| 445 | below 100 Kbytes. Because two directories are provided with the |
| 446 | variable, the build system also issue a warning when the disk space |
| 447 | in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number |
| 448 | of free inodes drops below 100 Kbytes. Subsequent warnings are issued |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 449 | during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 450 | variable. |
| 451 | |
| 452 | The second example stops the build after all currently executing |
| 453 | tasks complete when the minimum disk space in the ``${TMPDIR}`` |
| 454 | directory drops below 1 Gbyte. No disk monitoring occurs for the free |
| 455 | inodes in this case. |
| 456 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 457 | The final example immediately stops the build when the number of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 458 | free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No |
| 459 | disk space monitoring for the directory itself occurs in this case. |
| 460 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 461 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 462 | Defines the disk space and free inode warning intervals. To set these |
| 463 | intervals, define the variable in your ``conf/local.conf`` file in |
| 464 | the :term:`Build Directory`. |
| 465 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 466 | 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] | 467 | must also use the :term:`BB_DISKMON_DIRS` |
| 468 | variable and define its action as "WARN". During the build, |
| 469 | subsequent warnings are issued each time disk space or number of free |
| 470 | inodes further reduces by the respective interval. |
| 471 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 472 | If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you |
| 473 | do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 474 | monitoring interval defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 475 | |
| 476 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 477 | |
| 478 | When specifying the variable in your configuration file, use the |
| 479 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 480 | |
| 481 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 482 | |
| 483 | BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" |
| 484 | |
| 485 | where: |
| 486 | |
| 487 | disk_space_interval is: |
| 488 | An interval of memory expressed in either |
| 489 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 490 | respectively. You cannot use GB, MB, or KB. |
| 491 | |
| 492 | disk_inode_interval is: |
| 493 | An interval of free inodes expressed in either |
| 494 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 495 | respectively. You cannot use GB, MB, or KB. |
| 496 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 497 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 498 | |
| 499 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
| 500 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 501 | |
| 502 | These variables cause the |
| 503 | OpenEmbedded build system to issue subsequent warnings each time the |
| 504 | available disk space further reduces by 50 Mbytes or the number of |
| 505 | free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` |
| 506 | directory. Subsequent warnings based on the interval occur each time |
| 507 | a respective interval is reached beyond the initial warning (i.e. 1 |
| 508 | Gbytes and 100 Kbytes). |
| 509 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 510 | :term:`BB_ENV_PASSTHROUGH` |
| 511 | See :term:`bitbake:BB_ENV_PASSTHROUGH` in the BitBake manual. |
| 512 | |
| 513 | :term:`BB_ENV_PASSTHROUGH_ADDITIONS` |
| 514 | See :term:`bitbake:BB_ENV_PASSTHROUGH_ADDITIONS` in the BitBake manual. |
| 515 | |
| 516 | :term:`BB_FETCH_PREMIRRORONLY` |
| 517 | See :term:`bitbake:BB_FETCH_PREMIRRORONLY` in the BitBake manual. |
| 518 | |
| 519 | :term:`BB_FILENAME` |
| 520 | See :term:`bitbake:BB_FILENAME` in the BitBake manual. |
| 521 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 522 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 523 | Causes tarballs of the source control repositories (e.g. Git |
| 524 | repositories), including metadata, to be placed in the |
| 525 | :term:`DL_DIR` directory. |
| 526 | |
| 527 | For performance reasons, creating and placing tarballs of these |
| 528 | repositories is not the default action by the OpenEmbedded build |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 529 | system:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 530 | |
| 531 | BB_GENERATE_MIRROR_TARBALLS = "1" |
| 532 | |
| 533 | Set this variable in your |
| 534 | ``local.conf`` file in the :term:`Build Directory`. |
| 535 | |
| 536 | Once you have the tarballs containing your source files, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 537 | 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] | 538 | source control work directories. |
| 539 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 540 | :term:`BB_GENERATE_SHALLOW_TARBALLS` |
| 541 | See :term:`bitbake:BB_GENERATE_SHALLOW_TARBALLS` in the BitBake manual. |
| 542 | |
| 543 | :term:`BB_GIT_SHALLOW` |
| 544 | See :term:`bitbake:BB_GIT_SHALLOW` in the BitBake manual. |
| 545 | |
| 546 | :term:`BB_GIT_SHALLOW_DEPTH` |
| 547 | See :term:`bitbake:BB_GIT_SHALLOW_DEPTH` in the BitBake manual. |
| 548 | |
| 549 | :term:`BB_HASHCHECK_FUNCTION` |
| 550 | See :term:`bitbake:BB_HASHCHECK_FUNCTION` in the BitBake manual. |
| 551 | |
| 552 | :term:`BB_HASHCONFIG_IGNORE_VARS` |
| 553 | See :term:`bitbake:BB_HASHCONFIG_IGNORE_VARS` in the BitBake manual. |
| 554 | |
| 555 | :term:`BB_HASHSERVE` |
| 556 | See :term:`bitbake:BB_HASHSERVE` in the BitBake manual. |
| 557 | |
| 558 | :term:`BB_HASHSERVE_UPSTREAM` |
| 559 | See :term:`bitbake:BB_HASHSERVE_UPSTREAM` in the BitBake manual. |
| 560 | |
| 561 | :term:`BB_INVALIDCONF` |
| 562 | See :term:`bitbake:BB_INVALIDCONF` in the BitBake manual. |
| 563 | |
| 564 | :term:`BB_LOGCONFIG` |
| 565 | See :term:`bitbake:BB_LOGCONFIG` in the BitBake manual. |
| 566 | |
| 567 | :term:`BB_LOGFMT` |
| 568 | See :term:`bitbake:BB_LOGFMT` in the BitBake manual. |
| 569 | |
| 570 | :term:`BB_MULTI_PROVIDER_ALLOWED` |
| 571 | See :term:`bitbake:BB_MULTI_PROVIDER_ALLOWED` in the BitBake manual. |
| 572 | |
| 573 | :term:`BB_NICE_LEVEL` |
| 574 | See :term:`bitbake:BB_NICE_LEVEL` in the BitBake manual. |
| 575 | |
| 576 | :term:`BB_NO_NETWORK` |
| 577 | See :term:`bitbake:BB_NO_NETWORK` in the BitBake manual. |
| 578 | |
| 579 | :term:`BB_NUMBER_PARSE_THREADS` |
| 580 | See :term:`bitbake:BB_NUMBER_PARSE_THREADS` in the BitBake manual. |
| 581 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 582 | :term:`BB_NUMBER_THREADS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 583 | The maximum number of tasks BitBake should run in parallel at any one |
| 584 | time. The OpenEmbedded build system automatically configures this |
| 585 | variable to be equal to the number of cores on the build system. For |
| 586 | example, a system with a dual core processor that also uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 587 | hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 588 | to "4". |
| 589 | |
| 590 | For single socket systems (i.e. one CPU), you should not have to |
| 591 | override this variable to gain optimal parallelism during builds. |
| 592 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 593 | 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] | 594 | is not set higher than "20". |
| 595 | |
| 596 | For more information on speeding up builds, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 597 | ":ref:`dev-manual/speeding-up-build:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 598 | section in the Yocto Project Development Tasks Manual. |
| 599 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 600 | On the other hand, if your goal is to limit the amount of system |
| 601 | resources consumed by BitBake tasks, setting :term:`BB_NUMBER_THREADS` |
| 602 | to a number lower than the number of CPU threads in your machine |
| 603 | won't be sufficient. That's because each package will still be built |
| 604 | and installed through a number of parallel jobs specified by the |
| 605 | :term:`PARALLEL_MAKE` variable, which is by default the number of CPU |
| 606 | threads in your system, and is not impacted by the |
| 607 | :term:`BB_NUMBER_THREADS` value. |
| 608 | |
| 609 | So, if you set :term:`BB_NUMBER_THREADS` to "1" but don't set |
| 610 | :term:`PARALLEL_MAKE`, most of your system resources will be consumed |
| 611 | anyway. |
| 612 | |
| 613 | Therefore, if you intend to reduce the load of your build system by |
| 614 | setting :term:`BB_NUMBER_THREADS` to a relatively low value compared |
| 615 | to the number of CPU threads on your system, you should also set |
| 616 | :term:`PARALLEL_MAKE` to a similarly low value. |
| 617 | |
| 618 | An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage |
| 619 | of build system resources under control is to use the smarter |
| 620 | :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or |
| 621 | :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake |
| 622 | from starting new tasks as long as thresholds are exceeded. Anyway, |
| 623 | as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the |
| 624 | tasks already being run from using all CPU threads on the system |
| 625 | if :term:`PARALLEL_MAKE` is not set to a low value. |
| 626 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 627 | :term:`BB_ORIGENV` |
| 628 | See :term:`bitbake:BB_ORIGENV` in the BitBake manual. |
| 629 | |
| 630 | :term:`BB_PRESERVE_ENV` |
| 631 | See :term:`bitbake:BB_PRESERVE_ENV` in the BitBake manual. |
| 632 | |
| 633 | :term:`BB_PRESSURE_MAX_CPU` |
| 634 | See :term:`bitbake:BB_PRESSURE_MAX_CPU` in the BitBake manual. |
| 635 | |
| 636 | :term:`BB_PRESSURE_MAX_IO` |
| 637 | See :term:`bitbake:BB_PRESSURE_MAX_IO` in the BitBake manual. |
| 638 | |
| 639 | :term:`BB_PRESSURE_MAX_MEMORY` |
| 640 | See :term:`bitbake:BB_PRESSURE_MAX_MEMORY` in the BitBake manual. |
| 641 | |
| 642 | :term:`BB_RUNFMT` |
| 643 | See :term:`bitbake:BB_RUNFMT` in the BitBake manual. |
| 644 | |
| 645 | :term:`BB_RUNTASK` |
| 646 | See :term:`bitbake:BB_RUNTASK` in the BitBake manual. |
| 647 | |
| 648 | :term:`BB_SCHEDULER` |
| 649 | See :term:`bitbake:BB_SCHEDULER` in the BitBake manual. |
| 650 | |
| 651 | :term:`BB_SCHEDULERS` |
| 652 | See :term:`bitbake:BB_SCHEDULERS` in the BitBake manual. |
| 653 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 654 | :term:`BB_SERVER_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 655 | Specifies the time (in seconds) after which to unload the BitBake |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 656 | server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 657 | long the BitBake server stays resident between invocations. |
| 658 | |
| 659 | For example, the following statement in your ``local.conf`` file |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 660 | instructs the server to be unloaded after 20 seconds of inactivity:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 661 | |
| 662 | BB_SERVER_TIMEOUT = "20" |
| 663 | |
| 664 | If you want the server to never be unloaded, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 665 | set :term:`BB_SERVER_TIMEOUT` to "-1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 666 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 667 | :term:`BB_SETSCENE_DEPVALID` |
| 668 | See :term:`bitbake:BB_SETSCENE_DEPVALID` in the BitBake manual. |
| 669 | |
| 670 | :term:`BB_SIGNATURE_EXCLUDE_FLAGS` |
| 671 | See :term:`bitbake:BB_SIGNATURE_EXCLUDE_FLAGS` in the BitBake manual. |
| 672 | |
| 673 | :term:`BB_SIGNATURE_HANDLER` |
| 674 | See :term:`bitbake:BB_SIGNATURE_HANDLER` in the BitBake manual. |
| 675 | |
| 676 | :term:`BB_SRCREV_POLICY` |
| 677 | See :term:`bitbake:BB_SRCREV_POLICY` in the BitBake manual. |
| 678 | |
| 679 | :term:`BB_STRICT_CHECKSUM` |
| 680 | See :term:`bitbake:BB_STRICT_CHECKSUM` in the BitBake manual. |
| 681 | |
| 682 | :term:`BB_TASK_IONICE_LEVEL` |
| 683 | See :term:`bitbake:BB_TASK_IONICE_LEVEL` in the BitBake manual. |
| 684 | |
| 685 | :term:`BB_TASK_NICE_LEVEL` |
| 686 | See :term:`bitbake:BB_TASK_NICE_LEVEL` in the BitBake manual. |
| 687 | |
| 688 | :term:`BB_TASKHASH` |
| 689 | See :term:`bitbake:BB_TASKHASH` in the BitBake manual. |
| 690 | |
| 691 | :term:`BB_VERBOSE_LOGS` |
| 692 | See :term:`bitbake:BB_VERBOSE_LOGS` in the BitBake manual. |
| 693 | |
| 694 | :term:`BB_WORKERCONTEXT` |
| 695 | See :term:`bitbake:BB_WORKERCONTEXT` in the BitBake manual. |
| 696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 697 | :term:`BBCLASSEXTEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 698 | 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] | 699 | software. There are common variants for recipes as "natives" like |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 700 | ``quilt-native``, which is a copy of Quilt built to run on the build |
| 701 | system; "crosses" such as ``gcc-cross``, which is a compiler built to |
| 702 | 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] | 703 | :term:`MACHINE`; ":ref:`ref-classes-nativesdk`", which |
| 704 | targets the SDK machine instead of :term:`MACHINE`; and "mulitlibs" in |
| 705 | the form "``multilib:``\ multilib_name". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 706 | |
| 707 | 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] | 708 | 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] | 709 | |
| 710 | BBCLASSEXTEND =+ "native nativesdk" |
| 711 | BBCLASSEXTEND =+ "multilib:multilib_name" |
| 712 | |
| 713 | .. note:: |
| 714 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 715 | Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 716 | variants by rewriting variable values and applying overrides such |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 717 | as ``:class-native``. For example, to generate a native version of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 718 | a recipe, a :term:`DEPENDS` on "foo" is rewritten |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 719 | to a :term:`DEPENDS` on "foo-native". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 720 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 721 | Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 722 | Parsing once adds some limitations. For example, it is not |
| 723 | possible to include a different file depending on the variant, |
| 724 | since ``include`` statements are processed when the recipe is |
| 725 | parsed. |
| 726 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 727 | :term:`BBDEBUG` |
| 728 | See :term:`bitbake:BBDEBUG` in the BitBake manual. |
| 729 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 730 | :term:`BBFILE_COLLECTIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 731 | Lists the names of configured layers. These names are used to find |
| 732 | the other ``BBFILE_*`` variables. Typically, each layer will append |
| 733 | its name to this variable in its ``conf/layer.conf`` file. |
| 734 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 735 | :term:`BBFILE_PATTERN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 736 | Variable that expands to match files from |
| 737 | :term:`BBFILES` in a particular layer. This variable |
| 738 | is used in the ``conf/layer.conf`` file and must be suffixed with the |
| 739 | name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``). |
| 740 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 741 | :term:`BBFILE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 742 | Assigns the priority for recipe files in each layer. |
| 743 | |
| 744 | This variable is useful in situations where the same recipe appears |
| 745 | in more than one layer. Setting this variable allows you to |
| 746 | prioritize a layer against other layers that contain the same recipe |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 747 | --- effectively letting you control the precedence for the multiple |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 748 | layers. The precedence established through this variable stands |
| 749 | regardless of a recipe's version (:term:`PV` variable). For |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 750 | example, a layer that has a recipe with a higher :term:`PV` value but for |
| 751 | 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] | 752 | has a lower precedence. |
| 753 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 754 | A larger value for the :term:`BBFILE_PRIORITY` variable results in a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 755 | higher precedence. For example, the value 6 has a higher precedence |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 756 | than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable |
| 757 | is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 758 | for more information. The default priority, if unspecified for a |
| 759 | layer with no dependencies, is the lowest defined priority + 1 (or 1 |
| 760 | if no priorities are defined). |
| 761 | |
| 762 | .. tip:: |
| 763 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 764 | You can use the command ``bitbake-layers show-layers`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 765 | to list all configured layers along with their priorities. |
| 766 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 767 | :term:`BBFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 768 | A space-separated list of recipe files BitBake uses to build |
| 769 | software. |
| 770 | |
| 771 | When specifying recipe files, you can pattern match using Python's |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 772 | `glob <https://docs.python.org/3/library/glob.html>`__ syntax. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 773 | For details on the syntax, see the documentation by following the |
| 774 | previous link. |
| 775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 776 | :term:`BBFILES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 777 | Activates content when identified layers are present. You identify |
| 778 | the layers by the collections that the layers define. |
| 779 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 780 | Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 781 | whose corresponding ``.bb`` file is in a layer that attempts to |
| 782 | modify other layers through ``.bbappend`` but does not want to |
| 783 | introduce a hard dependency on those other layers. |
| 784 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 785 | Use the following form for :term:`BBFILES_DYNAMIC`: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 786 | ``collection_name:filename_pattern``. |
| 787 | |
| 788 | The following example identifies two collection names and two |
| 789 | filename patterns:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 790 | |
| 791 | BBFILES_DYNAMIC += " \ |
| 792 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
| 793 | core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ |
| 794 | " |
| 795 | |
| 796 | This next example shows an error message that occurs because invalid |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 797 | entries are found, which cause parsing to fail: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 798 | |
| 799 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 800 | |
| 801 | ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: |
| 802 | /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend |
| 803 | /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend |
| 804 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 805 | :term:`BBINCLUDED` |
| 806 | See :term:`bitbake:BBINCLUDED` in the BitBake manual. |
| 807 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 808 | :term:`BBINCLUDELOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 809 | Variable that controls how BitBake displays logs on build failure. |
| 810 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 811 | :term:`BBINCLUDELOGS_LINES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 812 | If :term:`BBINCLUDELOGS` is set, specifies the |
| 813 | maximum number of lines from the task log file to print when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 814 | reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 815 | the entire log is printed. |
| 816 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 817 | :term:`BBLAYERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 818 | Lists the layers to enable during the build. This variable is defined |
| 819 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 820 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 821 | |
| 822 | BBLAYERS = " \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 823 | /home/scottrif/poky/meta \ |
| 824 | /home/scottrif/poky/meta-poky \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 825 | /home/scottrif/poky/meta-yocto-bsp \ |
| 826 | /home/scottrif/poky/meta-mykernel \ |
| 827 | " |
| 828 | |
| 829 | This example enables four layers, one of which is a custom, |
| 830 | user-defined layer named ``meta-mykernel``. |
| 831 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 832 | :term:`BBLAYERS_FETCH_DIR` |
| 833 | See :term:`bitbake:BBLAYERS_FETCH_DIR` in the BitBake manual. |
| 834 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 835 | :term:`BBMASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 836 | Prevents BitBake from processing recipes and recipe append files. |
| 837 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 838 | You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 839 | ``.bbappend`` files. BitBake ignores any recipe or recipe append |
| 840 | files that match any of the expressions. It is as if BitBake does not |
| 841 | see them at all. Consequently, matching files are not parsed or |
| 842 | otherwise used by BitBake. |
| 843 | |
| 844 | The values you provide are passed to Python's regular expression |
| 845 | compiler. Consequently, the syntax follows Python's Regular |
| 846 | Expression (re) syntax. The expressions are compared against the full |
| 847 | paths to the files. For complete syntax information, see Python's |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 848 | 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] | 849 | |
| 850 | The following example uses a complete regular expression to tell |
| 851 | BitBake to ignore all recipe and recipe append files in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 852 | ``meta-ti/recipes-misc/`` directory:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 853 | |
| 854 | BBMASK = "meta-ti/recipes-misc/" |
| 855 | |
| 856 | If you want to mask out multiple directories or recipes, you can |
| 857 | specify multiple regular expression fragments. This next example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 858 | masks out multiple directories and individual recipes:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 859 | |
| 860 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
| 861 | BBMASK += "/meta-oe/recipes-support/" |
| 862 | BBMASK += "/meta-foo/.*/openldap" |
| 863 | BBMASK += "opencv.*\.bbappend" |
| 864 | BBMASK += "lzma" |
| 865 | |
| 866 | .. note:: |
| 867 | |
| 868 | When specifying a directory name, use the trailing slash character |
| 869 | to ensure you match just that directory name. |
| 870 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 871 | :term:`BBMULTICONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 872 | Specifies each additional separate configuration when you are |
| 873 | building targets with multiple configurations. Use this variable in |
| 874 | your ``conf/local.conf`` configuration file. Specify a |
| 875 | multiconfigname for each configuration file you are using. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 876 | example, the following line specifies three configuration files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 877 | |
| 878 | BBMULTICONFIG = "configA configB configC" |
| 879 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 880 | Each configuration file you use must reside in a ``multiconfig`` |
| 881 | subdirectory of a configuration directory within a layer, or |
| 882 | within the :term:`Build Directory` (e.g. |
| 883 | ``build_directory/conf/multiconfig/configA.conf`` or |
| 884 | ``mylayer/conf/multiconfig/configB.conf``). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 885 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 886 | For information on how to use :term:`BBMULTICONFIG` in an environment |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 887 | that supports building targets with multiple configurations, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 888 | ":ref:`dev-manual/building:building images for multiple targets using multiple configurations`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 889 | section in the Yocto Project Development Tasks Manual. |
| 890 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 891 | :term:`BBPATH` |
| 892 | See :term:`bitbake:BBPATH` in the BitBake manual. |
| 893 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 894 | :term:`BBSERVER` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 895 | If defined in the BitBake environment, :term:`BBSERVER` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 896 | BitBake remote server. |
| 897 | |
| 898 | Use the following format to export the variable to the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 899 | environment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 900 | |
| 901 | export BBSERVER=localhost:$port |
| 902 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 903 | By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 904 | Consequently, :term:`BBSERVER` is excluded from checksum and dependency |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 905 | data. |
| 906 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 907 | :term:`BBTARGETS` |
| 908 | See :term:`bitbake:BBTARGETS` in the BitBake manual. |
| 909 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 910 | :term:`BINCONFIG` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 911 | When inheriting the :ref:`ref-classes-binconfig-disabled` class, this |
| 912 | variable specifies binary configuration scripts to disable in favor of |
| 913 | using ``pkg-config`` to query the information. The |
| 914 | :ref:`ref-classes-binconfig-disabled` class will modify the specified |
| 915 | scripts to return an error so that calls to them can be easily found |
| 916 | and replaced. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 917 | |
| 918 | To add multiple scripts, separate them by spaces. Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 919 | from the ``libpng`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 920 | |
| 921 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
| 922 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 923 | :term:`BINCONFIG_GLOB` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 924 | When inheriting the :ref:`ref-classes-binconfig` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 925 | this variable specifies a wildcard for configuration scripts that |
| 926 | need editing. The scripts are edited to correct any paths that have |
| 927 | been set up during compilation so that they are correct for use when |
| 928 | installed into the sysroot and called by the build processes of other |
| 929 | recipes. |
| 930 | |
| 931 | .. note:: |
| 932 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 933 | The :term:`BINCONFIG_GLOB` variable uses |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 934 | `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, |
| 935 | which is recognition and expansion of wildcards during pattern |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 936 | matching. Shell globbing is very similar to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 937 | `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ |
| 938 | and `glob <https://docs.python.org/3/library/glob.html>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 939 | |
| 940 | For more information on how this variable works, see |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 941 | ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 942 | You can also find general |
| 943 | information on the class in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 944 | ":ref:`ref-classes-binconfig`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 945 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 946 | :term:`BITBAKE_UI` |
| 947 | See :term:`bitbake:BITBAKE_UI` in the BitBake manual. |
| 948 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 949 | :term:`BP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 950 | The base recipe name and version but without any special recipe name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 951 | suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 952 | comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 953 | |
| 954 | ${BPN}-${PV} |
| 955 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 956 | :term:`BPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 957 | This variable is a version of the :term:`PN` variable with |
| 958 | common prefixes and suffixes removed, such as ``nativesdk-``, |
| 959 | ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. |
| 960 | The exact lists of prefixes and suffixes removed are specified by the |
| 961 | :term:`MLPREFIX` and |
| 962 | :term:`SPECIAL_PKGSUFFIX` variables, |
| 963 | respectively. |
| 964 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 965 | :term:`BUGTRACKER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 966 | Specifies a URL for an upstream bug tracking website for a recipe. |
| 967 | The OpenEmbedded build system does not use this variable. Rather, the |
| 968 | variable is a useful pointer in case a bug in the software being |
| 969 | built needs to be manually reported. |
| 970 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 971 | :term:`BUILD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 972 | Specifies the architecture of the build host (e.g. ``i686``). The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 973 | OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 974 | machine name reported by the ``uname`` command. |
| 975 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 976 | :term:`BUILD_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 977 | Specifies the architecture-specific assembler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 978 | host. By default, the value of :term:`BUILD_AS_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 979 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 980 | :term:`BUILD_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 981 | Specifies the architecture-specific C compiler 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_CC_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_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 985 | 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] | 986 | compiler is being used as the linker. By default, :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 987 | points to GCC and passes as arguments the value of |
| 988 | :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 989 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 990 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 991 | :term:`BUILD_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 992 | Specifies the flags to pass to the C compiler when building for the |
| 993 | build host. When building in the ``-native`` context, |
| 994 | :term:`CFLAGS` is set to the value of this variable by |
| 995 | default. |
| 996 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 997 | :term:`BUILD_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 998 | Specifies the flags to pass to the C preprocessor (i.e. to both the C |
| 999 | and the C++ compilers) when building for the build host. When |
| 1000 | building in the ``-native`` context, :term:`CPPFLAGS` |
| 1001 | is set to the value of this variable by default. |
| 1002 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1003 | :term:`BUILD_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1004 | Specifies the flags to pass to the C++ compiler when building for the |
| 1005 | build host. When building in the ``-native`` context, |
| 1006 | :term:`CXXFLAGS` is set to the value of this variable |
| 1007 | by default. |
| 1008 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1009 | :term:`BUILD_FC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1010 | Specifies the Fortran compiler command for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1011 | default, :term:`BUILD_FC` points to Gfortran and passes as arguments the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1012 | value of :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1013 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1014 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1015 | :term:`BUILD_LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1016 | Specifies the linker command for the build host. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1017 | :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] | 1018 | the value of :term:`BUILD_LD_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1019 | :term:`BUILD_LD_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1020 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1021 | :term:`BUILD_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1022 | Specifies architecture-specific linker flags for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1023 | default, the value of :term:`BUILD_LD_ARCH` is empty. |
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_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1026 | Specifies the flags to pass to the linker when building for the build |
| 1027 | host. When building in the ``-native`` context, |
| 1028 | :term:`LDFLAGS` is set to the value of this variable |
| 1029 | by default. |
| 1030 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1031 | :term:`BUILD_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1032 | Specifies the optimization flags passed to the C compiler when |
| 1033 | building for the build host or the SDK. The flags are passed through |
| 1034 | the :term:`BUILD_CFLAGS` and |
| 1035 | :term:`BUILDSDK_CFLAGS` default values. |
| 1036 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1037 | The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1038 | -pipe". |
| 1039 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1040 | :term:`BUILD_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1041 | Specifies the operating system in use on the build host (e.g. |
| 1042 | "linux"). The OpenEmbedded build system sets the value of |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1043 | :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1044 | first word, converted to lower-case characters. |
| 1045 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1046 | :term:`BUILD_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1047 | The toolchain binary prefix used for native recipes. The OpenEmbedded |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1048 | build system uses the :term:`BUILD_PREFIX` value to set the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1049 | :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1051 | :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1052 | Specifies the command to be used to strip debugging symbols from |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1053 | binaries produced for the build host. By default, :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1054 | points to |
| 1055 | ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. |
| 1056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1057 | :term:`BUILD_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1058 | Specifies the system, including the architecture and the operating |
| 1059 | 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] | 1060 | :ref:`ref-classes-native` recipes). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1061 | |
| 1062 | The OpenEmbedded build system automatically sets this variable based |
| 1063 | on :term:`BUILD_ARCH`, |
| 1064 | :term:`BUILD_VENDOR`, and |
| 1065 | :term:`BUILD_OS`. You do not need to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1066 | :term:`BUILD_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1067 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1068 | :term:`BUILD_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1069 | Specifies the vendor name to use when building for the build host. |
| 1070 | The default value is an empty string (""). |
| 1071 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1072 | :term:`BUILDDIR` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1073 | Points to the location of the :term:`Build Directory`. You can define |
| 1074 | this directory indirectly through the :ref:`structure-core-script` script |
| 1075 | by passing in a :term:`Build Directory` path when you run the script. If |
| 1076 | you run the script and do not provide a :term:`Build Directory` path, the |
| 1077 | :term:`BUILDDIR` defaults to ``build`` in the current directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1078 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1079 | :term:`BUILDHISTORY_COMMIT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1080 | When inheriting the :ref:`ref-classes-buildhistory` class, this variable |
| 1081 | specifies whether or not to commit the build history output in a local |
| 1082 | Git repository. If set to "1", this local repository will be maintained |
| 1083 | automatically by the :ref:`ref-classes-buildhistory` class and a commit |
| 1084 | will be created on every build for changes to each top-level subdirectory |
| 1085 | of the build history output (images, packages, and sdk). If you want to |
| 1086 | track changes to build history over time, you should set this value to |
| 1087 | "1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1088 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1089 | By default, the :ref:`ref-classes-buildhistory` class |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1090 | enables committing the buildhistory output in a local Git repository:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1091 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1092 | BUILDHISTORY_COMMIT ?= "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1093 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1094 | :term:`BUILDHISTORY_COMMIT_AUTHOR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1095 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1096 | class, this variable specifies the author to use for each Git commit. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1097 | In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1098 | :term:`BUILDHISTORY_COMMIT` variable must |
| 1099 | be set to "1". |
| 1100 | |
| 1101 | Git requires that the value you provide for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1102 | :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1103 | email@host". Providing an email address or host that is not valid |
| 1104 | does not produce an error. |
| 1105 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1106 | By default, the :ref:`ref-classes-buildhistory` class sets the variable |
| 1107 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1108 | |
| 1109 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
| 1110 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1111 | :term:`BUILDHISTORY_DIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1112 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1113 | class, this variable specifies the directory in which build history |
| 1114 | information is kept. For more information on how the variable works, |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 1115 | see the :ref:`ref-classes-buildhistory` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1116 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1117 | By default, the :ref:`ref-classes-buildhistory` class sets the directory |
| 1118 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1119 | |
| 1120 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" |
| 1121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1122 | :term:`BUILDHISTORY_FEATURES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1123 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1124 | class, this variable specifies the build history features to be |
| 1125 | enabled. For more information on how build history works, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1126 | ":ref:`dev-manual/build-quality:maintaining build output quality`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1127 | section in the Yocto Project Development Tasks Manual. |
| 1128 | |
| 1129 | You can specify these features in the form of a space-separated list: |
| 1130 | |
| 1131 | - *image:* Analysis of the contents of images, which includes the |
| 1132 | list of installed packages among other things. |
| 1133 | |
| 1134 | - *package:* Analysis of the contents of individual packages. |
| 1135 | |
| 1136 | - *sdk:* Analysis of the contents of the software development kit |
| 1137 | (SDK). |
| 1138 | |
| 1139 | - *task:* Save output file signatures for |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1140 | :ref:`shared state <overview-manual/concepts:shared state cache>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1141 | (sstate) tasks. |
| 1142 | This saves one file per task and lists the SHA-256 checksums for |
| 1143 | each file staged (i.e. the output of the task). |
| 1144 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1145 | By default, the :ref:`ref-classes-buildhistory` class enables the |
| 1146 | following features:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1147 | |
| 1148 | BUILDHISTORY_FEATURES ?= "image package sdk" |
| 1149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1150 | :term:`BUILDHISTORY_IMAGE_FILES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1151 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1152 | class, this variable specifies a list of paths to files copied from |
| 1153 | the image contents into the build history directory under an |
| 1154 | "image-files" directory in the directory for the image, so that you |
| 1155 | can track the contents of each file. The default is to copy |
| 1156 | ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for |
| 1157 | changes in user and group entries. You can modify the list to include |
| 1158 | any file. Specifying an invalid path does not produce an error. |
| 1159 | Consequently, you can include files that might not always be present. |
| 1160 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1161 | By default, the :ref:`ref-classes-buildhistory` class provides paths to |
| 1162 | the following files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1163 | |
| 1164 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" |
| 1165 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1166 | :term:`BUILDHISTORY_PATH_PREFIX_STRIP` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1167 | When inheriting the :ref:`ref-classes-buildhistory` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1168 | class, this variable specifies a common path prefix that should be |
| 1169 | stripped off the beginning of paths in the task signature list when the |
| 1170 | ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be |
| 1171 | useful when build history is populated from multiple sources that may not |
| 1172 | all use the same top level directory. |
| 1173 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1174 | By default, the :ref:`ref-classes-buildhistory` class sets the variable |
| 1175 | as follows:: |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1176 | |
| 1177 | BUILDHISTORY_PATH_PREFIX_STRIP ?= "" |
| 1178 | |
| 1179 | In this case, no prefixes will be stripped. |
| 1180 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1181 | :term:`BUILDHISTORY_PUSH_REPO` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1182 | When inheriting the :ref:`ref-classes-buildhistory` class, this variable |
| 1183 | optionally specifies a remote repository to which build history pushes |
| 1184 | Git changes. In order for :term:`BUILDHISTORY_PUSH_REPO` to work, |
| 1185 | :term:`BUILDHISTORY_COMMIT` must be set to "1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1186 | |
| 1187 | The repository should correspond to a remote address that specifies a |
| 1188 | repository as understood by Git, or alternatively to a remote name |
| 1189 | that you have set up manually using ``git remote`` within the local |
| 1190 | repository. |
| 1191 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1192 | By default, the :ref:`ref-classes-buildhistory` class sets the variable |
| 1193 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1194 | |
| 1195 | BUILDHISTORY_PUSH_REPO ?= "" |
| 1196 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1197 | :term:`BUILDNAME` |
| 1198 | See :term:`bitbake:BUILDNAME` in the BitBake manual. |
| 1199 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1200 | :term:`BUILDSDK_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1201 | Specifies the flags to pass to the C compiler when building for the |
| 1202 | SDK. When building in the ``nativesdk-`` context, |
| 1203 | :term:`CFLAGS` is set to the value of this variable by |
| 1204 | default. |
| 1205 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1206 | :term:`BUILDSDK_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1207 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1208 | C and the C++ compilers) when building for the SDK. When building in |
| 1209 | the ``nativesdk-`` context, :term:`CPPFLAGS` is set |
| 1210 | to the value of this variable by default. |
| 1211 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1212 | :term:`BUILDSDK_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1213 | Specifies the flags to pass to the C++ compiler when building for the |
| 1214 | SDK. When building in the ``nativesdk-`` context, |
| 1215 | :term:`CXXFLAGS` is set to the value of this variable |
| 1216 | by default. |
| 1217 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1218 | :term:`BUILDSDK_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1219 | Specifies the flags to pass to the linker when building for the SDK. |
| 1220 | When building in the ``nativesdk-`` context, |
| 1221 | :term:`LDFLAGS` is set to the value of this variable |
| 1222 | by default. |
| 1223 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1224 | :term:`BUILDSTATS_BASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1225 | Points to the location of the directory that holds build statistics |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1226 | when you use and enable the :ref:`ref-classes-buildstats` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1227 | :term:`BUILDSTATS_BASE` directory defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1228 | ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. |
| 1229 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1230 | :term:`BUSYBOX_SPLIT_SUID` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1231 | For the BusyBox recipe, specifies whether to split the output |
| 1232 | executable file into two parts: one for features that require |
| 1233 | ``setuid root``, and one for the remaining features (i.e. those that |
| 1234 | do not require ``setuid root``). |
| 1235 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1236 | The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1237 | splitting the output executable file. Set the variable to "0" to get |
| 1238 | a single output executable file. |
| 1239 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1240 | :term:`BZRDIR` |
| 1241 | See :term:`bitbake:BZRDIR` in the BitBake manual. |
| 1242 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1243 | :term:`CACHE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1244 | Specifies the directory BitBake uses to store a cache of the |
| 1245 | :term:`Metadata` so it does not need to be parsed every time |
| 1246 | BitBake is started. |
| 1247 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1248 | :term:`CC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1249 | The minimal command and arguments used to run the C compiler. |
| 1250 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1251 | :term:`CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1252 | Specifies the flags to pass to the C compiler. This variable is |
| 1253 | exported to an environment variable and thus made visible to the |
| 1254 | software being built during the compilation step. |
| 1255 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1256 | Default initialization for :term:`CFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1257 | being built: |
| 1258 | |
| 1259 | - :term:`TARGET_CFLAGS` when building for the |
| 1260 | target |
| 1261 | |
| 1262 | - :term:`BUILD_CFLAGS` when building for the |
| 1263 | build host (i.e. ``-native``) |
| 1264 | |
| 1265 | - :term:`BUILDSDK_CFLAGS` when building for |
| 1266 | an SDK (i.e. ``nativesdk-``) |
| 1267 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1268 | :term:`CLASSOVERRIDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1269 | An internal variable specifying the special class override that |
| 1270 | should currently apply (e.g. "class-target", "class-native", and so |
| 1271 | forth). The classes that use this variable (e.g. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1272 | :ref:`ref-classes-native`, :ref:`ref-classes-nativesdk`, and so forth) |
| 1273 | set the variable to appropriate values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1274 | |
| 1275 | .. note:: |
| 1276 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1277 | :term:`CLASSOVERRIDE` gets its default "class-target" value from the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1278 | ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1279 | |
| 1280 | As an example, the following override allows you to install extra |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1281 | files, but only when building for the target:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1282 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1283 | do_install:append:class-target() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1284 | install my-extra-file ${D}${sysconfdir} |
| 1285 | } |
| 1286 | |
| 1287 | Here is an example where ``FOO`` is set to |
| 1288 | "native" when building for the build host, and to "other" when not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1289 | building for the build host:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1290 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1291 | FOO:class-native = "native" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1292 | FOO = "other" |
| 1293 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1294 | The underlying mechanism behind :term:`CLASSOVERRIDE` is simply |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1295 | that it is included in the default value of |
| 1296 | :term:`OVERRIDES`. |
| 1297 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1298 | :term:`CLEANBROKEN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1299 | If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1300 | ``make clean`` command does not work for the software being built. |
| 1301 | Consequently, the OpenEmbedded build system will not try to run |
| 1302 | ``make clean`` during the :ref:`ref-tasks-configure` |
| 1303 | task, which is the default behavior. |
| 1304 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1305 | :term:`COMBINED_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1306 | Provides a list of hardware features that are enabled in both |
| 1307 | :term:`MACHINE_FEATURES` and |
| 1308 | :term:`DISTRO_FEATURES`. This select list of |
| 1309 | features contains features that make sense to be controlled both at |
| 1310 | the machine and distribution configuration level. For example, the |
| 1311 | "bluetooth" feature requires hardware support but should also be |
| 1312 | optional at the distribution level, in case the hardware supports |
| 1313 | Bluetooth but you do not ever intend to use it. |
| 1314 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 1315 | :term:`COMMERCIAL_AUDIO_PLUGINS` |
| 1316 | This variable is specific to the :yocto_git:`GStreamer recipes |
| 1317 | </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`. |
| 1318 | It allows to build the GStreamer `"ugly" |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 1319 | <https://github.com/GStreamer/gst-plugins-ugly>`__ and |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 1320 | `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ audio plugins. |
| 1321 | |
| 1322 | See the :ref:`dev-manual/licenses:other variables related to commercial licenses` |
| 1323 | section for usage details. |
| 1324 | |
| 1325 | :term:`COMMERCIAL_VIDEO_PLUGINS` |
| 1326 | This variable is specific to the :yocto_git:`GStreamer recipes |
| 1327 | </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`. |
| 1328 | It allows to build the GStreamer `"ugly" |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 1329 | <https://github.com/GStreamer/gst-plugins-ugly>`__ and |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 1330 | `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ video plugins. |
| 1331 | |
| 1332 | See the :ref:`dev-manual/licenses:other variables related to commercial licenses` |
| 1333 | section for usage details. |
| 1334 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1335 | :term:`COMMON_LICENSE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1336 | Points to ``meta/files/common-licenses`` in the |
| 1337 | :term:`Source Directory`, which is where generic license |
| 1338 | files reside. |
| 1339 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1340 | :term:`COMPATIBLE_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1341 | A regular expression that resolves to one or more hosts (when the |
| 1342 | recipe is native) or one or more targets (when the recipe is |
| 1343 | non-native) with which a recipe is compatible. The regular expression |
| 1344 | is matched against :term:`HOST_SYS`. You can use the |
| 1345 | variable to stop recipes from being built for classes of systems with |
| 1346 | which the recipes are not compatible. Stopping these builds is |
| 1347 | particularly useful with kernels. The variable also helps to increase |
| 1348 | parsing speed since the build system skips parsing recipes not |
| 1349 | compatible with the current system. |
| 1350 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1351 | :term:`COMPATIBLE_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1352 | A regular expression that resolves to one or more target machines |
| 1353 | with which a recipe is compatible. The regular expression is matched |
| 1354 | against :term:`MACHINEOVERRIDES`. You can use |
| 1355 | the variable to stop recipes from being built for machines with which |
| 1356 | the recipes are not compatible. Stopping these builds is particularly |
| 1357 | useful with kernels. The variable also helps to increase parsing |
| 1358 | speed since the build system skips parsing recipes not compatible |
| 1359 | with the current machine. |
| 1360 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1361 | :term:`COMPLEMENTARY_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1362 | Defines wildcards to match when installing a list of complementary |
| 1363 | packages for all the packages explicitly (or implicitly) installed in |
| 1364 | an image. |
| 1365 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1366 | The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching |
| 1367 | (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), |
| 1368 | which is similar to the Unix style pathname pattern expansion |
| 1369 | (`glob <https://docs.python.org/3/library/glob.html>`__). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1370 | |
| 1371 | The resulting list of complementary packages is associated with an |
| 1372 | item that can be added to |
| 1373 | :term:`IMAGE_FEATURES`. An example usage of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1374 | 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] | 1375 | will install -dev packages (containing headers and other development |
| 1376 | files) for every package in the image. |
| 1377 | |
| 1378 | To add a new feature item pointing to a wildcard, use a variable flag |
| 1379 | 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] | 1380 | wildcard. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1381 | |
| 1382 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' |
| 1383 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1384 | .. note:: |
| 1385 | |
| 1386 | When installing complementary packages, recommends relationships |
| 1387 | (set via :term:`RRECOMMENDS`) are always ignored. |
| 1388 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1389 | :term:`COMPONENTS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1390 | Stores sysroot components for each recipe. The OpenEmbedded build |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1391 | system uses :term:`COMPONENTS_DIR` when constructing recipe-specific |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1392 | sysroots for other recipes. |
| 1393 | |
| 1394 | The default is |
| 1395 | "``${``\ :term:`STAGING_DIR`\ ``}-components``." |
| 1396 | (i.e. |
| 1397 | "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). |
| 1398 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1399 | :term:`CONF_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1400 | Tracks the version of the local configuration file (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1401 | ``local.conf``). The value for :term:`CONF_VERSION` increments each time |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1402 | ``build/conf/`` compatibility changes. |
| 1403 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1404 | :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1405 | Identifies editable or configurable files that are part of a package. |
| 1406 | If the Package Management System (PMS) is being used to update |
| 1407 | packages on the target system, it is possible that configuration |
| 1408 | files you have changed after the original installation and that you |
| 1409 | now want to remain unchanged are overwritten. In other words, |
| 1410 | 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] | 1411 | 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] | 1412 | variable to list the files in the package that you wish to prevent |
| 1413 | the PMS from overwriting during this update process. |
| 1414 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1415 | To use the :term:`CONFFILES` variable, provide a package name override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1416 | that identifies the resulting package. Then, provide a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1417 | space-separated list of files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1418 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1419 | CONFFILES:${PN} += "${sysconfdir}/file1 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1420 | ${sysconfdir}/file2 ${sysconfdir}/file3" |
| 1421 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1422 | There is a relationship between the :term:`CONFFILES` and :term:`FILES` |
| 1423 | variables. The files listed within :term:`CONFFILES` must be a subset of |
| 1424 | the files listed within :term:`FILES`. Because the configuration files |
| 1425 | you provide with :term:`CONFFILES` are simply being identified so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1426 | 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] | 1427 | already be included as part of the package through the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1428 | variable. |
| 1429 | |
| 1430 | .. note:: |
| 1431 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1432 | When specifying paths as part of the :term:`CONFFILES` variable, it is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1433 | good practice to use appropriate path variables. |
| 1434 | For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` |
| 1435 | rather than ``/usr/bin``. You can find a list of these variables at |
| 1436 | the top of the ``meta/conf/bitbake.conf`` file in the |
| 1437 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1438 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1439 | :term:`CONFIG_INITRAMFS_SOURCE` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1440 | Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1441 | OpenEmbedded build system receives and uses this kernel Kconfig |
| 1442 | variable as an environment variable. By default, the variable is set |
| 1443 | to null (""). |
| 1444 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1445 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1446 | with a ``.cpio`` suffix or a space-separated list of directories and |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1447 | files for building the :term:`Initramfs` image. A cpio archive should contain |
| 1448 | a filesystem archive to be used as an :term:`Initramfs` image. Directories |
| 1449 | should contain a filesystem layout to be included in the :term:`Initramfs` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1450 | image. Files should contain entries according to the format described |
| 1451 | by the ``usr/gen_init_cpio`` program in the kernel tree. |
| 1452 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1453 | If you specify multiple directories and files, the :term:`Initramfs` image |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1454 | will be the aggregate of all of them. |
| 1455 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1456 | For information on creating an :term:`Initramfs`, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1457 | ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1458 | in the Yocto Project Development Tasks Manual. |
| 1459 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1460 | :term:`CONFIG_SITE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1461 | A list of files that contains ``autoconf`` test results relevant to |
| 1462 | the current build. This variable is used by the Autotools utilities |
| 1463 | when running ``configure``. |
| 1464 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1465 | :term:`CONFIGURE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1466 | The minimal arguments for GNU configure. |
| 1467 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1468 | :term:`CONFLICT_DISTRO_FEATURES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1469 | When inheriting the :ref:`ref-classes-features_check` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1470 | class, this variable identifies distribution features that would be |
| 1471 | in conflict should the recipe be built. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1472 | :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also |
| 1473 | appears in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1474 | the recipe will be skipped, and if the build system attempts to build |
| 1475 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1476 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1477 | :term:`CONVERSION_CMD` |
| 1478 | This variable is used for storing image conversion commands. |
| 1479 | Image conversion can convert an image into different objects like: |
| 1480 | |
| 1481 | - Compressed version of the image |
| 1482 | |
| 1483 | - Checksums for the image |
| 1484 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1485 | An example of :term:`CONVERSION_CMD` from :ref:`ref-classes-image_types` |
| 1486 | class is:: |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1487 | |
| 1488 | CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
| 1489 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1490 | :term:`COPY_LIC_DIRS` |
| 1491 | If set to "1" along with the |
| 1492 | :term:`COPY_LIC_MANIFEST` variable, the |
| 1493 | OpenEmbedded build system copies into the image the license files, |
| 1494 | which are located in ``/usr/share/common-licenses``, for each |
| 1495 | package. The license files are placed in directories within the image |
| 1496 | itself during build time. |
| 1497 | |
| 1498 | .. note:: |
| 1499 | |
| 1500 | The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for |
| 1501 | newly installed packages to an image, which might be most suitable for |
| 1502 | read-only filesystems that cannot be upgraded. See the |
| 1503 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1504 | You can also reference the ":ref:`dev-manual/licenses:providing license text`" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1505 | section in the Yocto Project Development Tasks Manual for |
| 1506 | information on providing license text. |
| 1507 | |
| 1508 | :term:`COPY_LIC_MANIFEST` |
| 1509 | If set to "1", the OpenEmbedded build system copies the license |
| 1510 | manifest for the image to |
| 1511 | ``/usr/share/common-licenses/license.manifest`` within the image |
| 1512 | itself during build time. |
| 1513 | |
| 1514 | .. note:: |
| 1515 | |
| 1516 | The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for |
| 1517 | newly installed packages to an image, which might be most suitable for |
| 1518 | read-only filesystems that cannot be upgraded. See the |
| 1519 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1520 | You can also reference the ":ref:`dev-manual/licenses:providing license text`" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1521 | section in the Yocto Project Development Tasks Manual for |
| 1522 | information on providing license text. |
| 1523 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1524 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1525 | A space-separated list of licenses to exclude from the source archived by |
| 1526 | the :ref:`ref-classes-archiver` class. In other words, if a license in a |
| 1527 | recipe's :term:`LICENSE` value is in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1528 | :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1529 | class. |
| 1530 | |
| 1531 | .. note:: |
| 1532 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1533 | The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1534 | :term:`COPYLEFT_LICENSE_INCLUDE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1535 | |
| 1536 | The default value, which is "CLOSED Proprietary", for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1537 | :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1538 | :ref:`ref-classes-copyleft_filter` class, which |
| 1539 | is inherited by the :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1540 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1541 | :term:`COPYLEFT_LICENSE_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1542 | A space-separated list of licenses to include in the source archived |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1543 | by the :ref:`ref-classes-archiver` class. In other |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1544 | words, if a license in a recipe's :term:`LICENSE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1545 | value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1546 | source is archived by the class. |
| 1547 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1548 | The default value is set by the :ref:`ref-classes-copyleft_filter` class, |
| 1549 | which is inherited by the :ref:`ref-classes-archiver` class. The default |
| 1550 | value includes "GPL*", "LGPL*", and "AGPL*". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1551 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1552 | :term:`COPYLEFT_PN_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1553 | A list of recipes to exclude in the source archived by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1554 | :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_EXCLUDE` |
| 1555 | variable overrides the license inclusion and exclusion caused through the |
| 1556 | :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1557 | variables, respectively. |
| 1558 | |
| 1559 | The default value, which is "" indicating to not explicitly exclude |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1560 | 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] | 1561 | :ref:`ref-classes-copyleft_filter` class, which is inherited by the |
| 1562 | :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1563 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1564 | :term:`COPYLEFT_PN_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1565 | A list of recipes to include in the source archived by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1566 | :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_INCLUDE` |
| 1567 | variable overrides the license inclusion and exclusion caused through the |
| 1568 | :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1569 | variables, respectively. |
| 1570 | |
| 1571 | The default value, which is "" indicating to not explicitly include |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1572 | 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] | 1573 | :ref:`ref-classes-copyleft_filter` class, which is inherited by the |
| 1574 | :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1575 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1576 | :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1577 | A space-separated list of recipe types to include in the source |
| 1578 | archived by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1579 | Recipe types are ``target``, :ref:`ref-classes-native`, |
| 1580 | :ref:`ref-classes-nativesdk`, :ref:`ref-classes-cross`, |
| 1581 | :ref:`ref-classes-crosssdk`, and :ref:`ref-classes-cross-canadian`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1582 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1583 | The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1584 | is set by the :ref:`ref-classes-copyleft_filter` class, which is |
| 1585 | inherited by the :ref:`ref-classes-archiver` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1586 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1587 | :term:`CORE_IMAGE_EXTRA_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1588 | Specifies the list of packages to be added to the image. You should |
| 1589 | only set this variable in the ``local.conf`` configuration file found |
| 1590 | in the :term:`Build Directory`. |
| 1591 | |
| 1592 | This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer |
| 1593 | supported. |
| 1594 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1595 | :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1596 | Specifies the parent directory of the OpenEmbedded-Core Metadata |
| 1597 | layer (i.e. ``meta``). |
| 1598 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1599 | It is an important distinction that :term:`COREBASE` points to the parent |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1600 | of this layer and not the layer itself. Consider an example where you |
| 1601 | have cloned the Poky Git repository and retained the ``poky`` name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1602 | for your local copy of the repository. In this case, :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1603 | points to the ``poky`` folder because it is the parent directory of |
| 1604 | the ``poky/meta`` layer. |
| 1605 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1606 | :term:`COREBASE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1607 | Lists files from the :term:`COREBASE` directory that |
| 1608 | should be copied other than the layers listed in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1609 | ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1610 | to copy metadata from the OpenEmbedded build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1611 | into the extensible SDK. |
| 1612 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1613 | Explicitly listing files in :term:`COREBASE` is needed because it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1614 | typically contains build directories and other files that should not |
| 1615 | normally be copied into the extensible SDK. Consequently, the value |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1616 | 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] | 1617 | are actually needed. |
| 1618 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1619 | :term:`CPP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1620 | The minimal command and arguments used to run the C preprocessor. |
| 1621 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1622 | :term:`CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1623 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1624 | C and the C++ compilers). This variable is exported to an environment |
| 1625 | variable and thus made visible to the software being built during the |
| 1626 | compilation step. |
| 1627 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1628 | Default initialization for :term:`CPPFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1629 | being built: |
| 1630 | |
| 1631 | - :term:`TARGET_CPPFLAGS` when building for |
| 1632 | the target |
| 1633 | |
| 1634 | - :term:`BUILD_CPPFLAGS` when building for the |
| 1635 | build host (i.e. ``-native``) |
| 1636 | |
| 1637 | - :term:`BUILDSDK_CPPFLAGS` when building |
| 1638 | for an SDK (i.e. ``nativesdk-``) |
| 1639 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1640 | :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1641 | The toolchain binary prefix for the target tools. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1642 | :term:`CROSS_COMPILE` variable is the same as the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1643 | :term:`TARGET_PREFIX` variable. |
| 1644 | |
| 1645 | .. note:: |
| 1646 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1647 | The OpenEmbedded build system sets the :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1648 | variable only in certain contexts (e.g. when building for kernel |
| 1649 | and kernel module recipes). |
| 1650 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1651 | :term:`CVE_CHECK_IGNORE` |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 1652 | This variable is deprecated and should be replaced by :term:`CVE_STATUS`. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1653 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1654 | :term:`CVE_CHECK_SHOW_WARNINGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1655 | Specifies whether or not the :ref:`ref-classes-cve-check` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1656 | class should generate warning messages on the console when unpatched |
| 1657 | CVEs are found. The default is "1", but you may wish to set it to "0" if |
| 1658 | you are already examining/processing the logs after the build has |
| 1659 | completed and thus do not need the warning messages. |
| 1660 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1661 | :term:`CVE_CHECK_SKIP_RECIPE` |
| 1662 | The list of package names (:term:`PN`) for which |
| 1663 | CVEs (Common Vulnerabilities and Exposures) are ignored. |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1664 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1665 | :term:`CVE_DB_UPDATE_INTERVAL` |
| 1666 | Specifies the CVE database update interval in seconds, as used by |
| 1667 | ``cve-update-db-native``. The default value is "86400" i.e. once a day |
| 1668 | (24*60*60). If the value is set to "0" then the update will be forced |
| 1669 | every time. Alternatively, a negative value e.g. "-1" will disable |
| 1670 | updates entirely. |
| 1671 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1672 | :term:`CVE_PRODUCT` |
| 1673 | In a recipe, defines the name used to match the recipe name |
| 1674 | against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__. |
| 1675 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1676 | The default is ${:term:`BPN`} (except for recipes that inherit the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1677 | :ref:`ref-classes-pypi` class where it is set based upon |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1678 | :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] | 1679 | database or matches with multiple entries in the database, the default |
| 1680 | value needs to be changed. |
| 1681 | |
| 1682 | Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`:: |
| 1683 | |
| 1684 | CVE_PRODUCT = "oracle_berkeley_db berkeley_db" |
| 1685 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 1686 | Sometimes the product name is not specific enough, for example |
| 1687 | "tar" has been matching CVEs for the GNU ``tar`` package and also |
| 1688 | the ``node-tar`` node.js extension. To avoid this problem, use the |
| 1689 | vendor name as a prefix. The syntax for this is:: |
| 1690 | |
| 1691 | CVE_PRODUCT = "vendor:package" |
| 1692 | |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 1693 | :term:`CVE_STATUS` |
| 1694 | The CVE ID which is patched or should be ignored. Here is |
| 1695 | an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`:: |
| 1696 | |
| 1697 | CVE_STATUS[CVE-2020-15523] = "not-applicable-platform: Issue only applies on Windows" |
| 1698 | |
| 1699 | It has the format "reason: description" and the description is optional. |
| 1700 | The Reason is mapped to the final CVE state by mapping via |
| 1701 | :term:`CVE_CHECK_STATUSMAP` |
| 1702 | |
| 1703 | :term:`CVE_STATUS_GROUPS` |
| 1704 | If there are many CVEs with the same status and reason, they can by simplified by using this |
| 1705 | variable instead of many similar lines with :term:`CVE_STATUS`:: |
| 1706 | |
| 1707 | CVE_STATUS_GROUPS = "CVE_STATUS_WIN CVE_STATUS_PATCHED" |
| 1708 | |
| 1709 | CVE_STATUS_WIN = "CVE-1234-0001 CVE-1234-0002" |
| 1710 | CVE_STATUS_WIN[status] = "not-applicable-platform: Issue only applies on Windows" |
| 1711 | CVE_STATUS_PATCHED = "CVE-1234-0003 CVE-1234-0004" |
| 1712 | CVE_STATUS_PATCHED[status] = "fixed-version: Fixed externally" |
| 1713 | |
| 1714 | :term:`CVE_CHECK_STATUSMAP` |
| 1715 | Mapping variable for all possible reasons of :term:`CVE_STATUS`: |
| 1716 | ``Patched``, ``Unpatched`` and ``Ignored``. |
| 1717 | See :ref:`ref-classes-cve-check` or ``meta/conf/cve-check-map.conf`` for more details:: |
| 1718 | |
| 1719 | CVE_CHECK_STATUSMAP[cpe-incorrect] = "Ignored" |
| 1720 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1721 | :term:`CVE_VERSION` |
| 1722 | In a recipe, defines the version used to match the recipe version |
| 1723 | against the version in the `NIST CVE database <https://nvd.nist.gov/>`__ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1724 | when usign :ref:`ref-classes-cve-check`. |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1725 | |
| 1726 | The default is ${:term:`PV`} but if recipes use custom version numbers |
| 1727 | which do not map to upstream software component release versions and the versions |
| 1728 | 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] | 1729 | version number for :ref:`ref-classes-cve-check`. Example:: |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1730 | |
| 1731 | CVE_VERSION = "2.39" |
| 1732 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1733 | :term:`CVSDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1734 | The directory in which files checked out under the CVS system are |
| 1735 | stored. |
| 1736 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1737 | :term:`CXX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1738 | The minimal command and arguments used to run the C++ compiler. |
| 1739 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1740 | :term:`CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1741 | Specifies the flags to pass to the C++ compiler. This variable is |
| 1742 | exported to an environment variable and thus made visible to the |
| 1743 | software being built during the compilation step. |
| 1744 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1745 | Default initialization for :term:`CXXFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1746 | being built: |
| 1747 | |
| 1748 | - :term:`TARGET_CXXFLAGS` when building for |
| 1749 | the target |
| 1750 | |
| 1751 | - :term:`BUILD_CXXFLAGS` when building for the |
| 1752 | build host (i.e. ``-native``) |
| 1753 | |
| 1754 | - :term:`BUILDSDK_CXXFLAGS` when building |
| 1755 | for an SDK (i.e. ``nativesdk-``) |
| 1756 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1757 | :term:`D` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1758 | The destination directory. The location in the :term:`Build Directory` |
| 1759 | where components are installed by the |
| 1760 | :ref:`ref-tasks-install` task. This location defaults |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1761 | to:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1762 | |
| 1763 | ${WORKDIR}/image |
| 1764 | |
| 1765 | .. note:: |
| 1766 | |
| 1767 | Tasks that read from or write to this directory should run under |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1768 | :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1769 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1770 | :term:`DATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1771 | The date the build was started. Dates appear using the year, month, |
| 1772 | and day (YMD) format (e.g. "20150209" for February 9th, 2015). |
| 1773 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1774 | :term:`DATETIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1775 | The date and time on which the current build started. The format is |
| 1776 | suitable for timestamps. |
| 1777 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1778 | :term:`DEBIAN_NOAUTONAME` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1779 | When the :ref:`ref-classes-debian` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1780 | which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1781 | particular package should not be renamed according to Debian library |
| 1782 | 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] | 1783 | set this variable. Here is an example from the ``fontconfig`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1784 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1785 | DEBIAN_NOAUTONAME:fontconfig-utils = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1786 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1787 | :term:`DEBIANNAME` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1788 | When the :ref:`ref-classes-debian` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1789 | which is the default behavior, :term:`DEBIANNAME` allows you to override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1790 | the library name for an individual package. Overriding the library |
| 1791 | name in these cases is rare. You must use the package name as an |
| 1792 | override when you set this variable. Here is an example from the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1793 | ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1794 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1795 | DEBIANNAME:${PN} = "dbus-1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1796 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1797 | :term:`DEBUG_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1798 | Specifies to build packages with debugging information. This |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1799 | influences the value of the :term:`SELECTED_OPTIMIZATION` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1800 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1801 | :term:`DEBUG_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1802 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1803 | compiling a system for debugging. This variable defaults to "-O |
| 1804 | -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". |
| 1805 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1806 | :term:`DEBUG_PREFIX_MAP` |
| 1807 | Allows to set C compiler options, such as ``-fdebug-prefix-map``, |
| 1808 | ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to |
| 1809 | replace build-time paths by install-time ones in the debugging sections |
| 1810 | of binaries. This makes compiler output files location independent, |
| 1811 | at the cost of having to pass an extra command to tell the debugger |
| 1812 | where source files are. |
| 1813 | |
| 1814 | This is used by the Yocto Project to guarantee |
| 1815 | :doc:`/test-manual/reproducible-builds` even when the source code of |
| 1816 | a package uses the ``__FILE__`` or ``assert()`` macros. See the |
| 1817 | `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__ |
| 1818 | website for details. |
| 1819 | |
| 1820 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1821 | not intended to be user-configurable. |
| 1822 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1823 | :term:`DEFAULT_PREFERENCE` |
| 1824 | Specifies a weak bias for recipe selection priority. |
| 1825 | |
| 1826 | The most common usage of this is variable is to set it to "-1" within |
| 1827 | a recipe for a development version of a piece of software. Using the |
| 1828 | variable in this way causes the stable version of the recipe to build |
| 1829 | by default in the absence of :term:`PREFERRED_VERSION` being used to |
| 1830 | build the development version. |
| 1831 | |
| 1832 | .. note:: |
| 1833 | |
| 1834 | The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden |
| 1835 | by :term:`BBFILE_PRIORITY` if that variable is different between two |
| 1836 | layers that contain different versions of the same recipe. |
| 1837 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1838 | :term:`DEFAULTTUNE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1839 | The default CPU and Application Binary Interface (ABI) tunings (i.e. |
| 1840 | the "tune") used by the OpenEmbedded build system. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1841 | :term:`DEFAULTTUNE` helps define |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1842 | :term:`TUNE_FEATURES`. |
| 1843 | |
| 1844 | The default tune is either implicitly or explicitly set by the |
| 1845 | machine (:term:`MACHINE`). However, you can override |
| 1846 | the setting using available tunes as defined with |
| 1847 | :term:`AVAILTUNES`. |
| 1848 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1849 | :term:`DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1850 | Lists a recipe's build-time dependencies. These are dependencies on |
| 1851 | other recipes whose contents (e.g. headers and shared libraries) are |
| 1852 | needed by the recipe at build time. |
| 1853 | |
| 1854 | As an example, consider a recipe ``foo`` that contains the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1855 | assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1856 | |
| 1857 | DEPENDS = "bar" |
| 1858 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1859 | The practical effect of the previous assignment is that all files |
| 1860 | installed by bar will be available in the appropriate staging sysroot, |
| 1861 | given by the :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time |
| 1862 | the :ref:`ref-tasks-configure` task for ``foo`` runs. This mechanism is |
| 1863 | implemented by having :ref:`ref-tasks-configure` depend on the |
| 1864 | :ref:`ref-tasks-populate_sysroot` task of each recipe listed in |
| 1865 | :term:`DEPENDS`, through a |
| 1866 | ``[``\ :ref:`deptask <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1867 | declaration in the :ref:`ref-classes-base` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1868 | |
| 1869 | .. note:: |
| 1870 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1871 | It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1872 | explicitly. The standard classes and build-related variables are |
| 1873 | configured to automatically use the appropriate staging sysroots. |
| 1874 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1875 | As another example, :term:`DEPENDS` can also be used to add utilities |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1876 | that run on the build machine during the build. For example, a recipe |
| 1877 | that makes use of a code generator built by the recipe ``codegen`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1878 | might have the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1879 | |
| 1880 | DEPENDS = "codegen-native" |
| 1881 | |
| 1882 | For more |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1883 | information, see the :ref:`ref-classes-native` class and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1884 | the :term:`EXTRANATIVEPATH` variable. |
| 1885 | |
| 1886 | .. note:: |
| 1887 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1888 | - :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] | 1889 | it is a list of :term:`PROVIDES` names, which |
| 1890 | usually match recipe names. Putting a package name such as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1891 | "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1892 | instead, as this will put files from all the packages that make |
| 1893 | up ``foo``, which includes those from ``foo-dev``, into the |
| 1894 | sysroot. |
| 1895 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1896 | - One recipe having another recipe in :term:`DEPENDS` does not by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1897 | itself add any runtime dependencies between the packages |
| 1898 | produced by the two recipes. However, as explained in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1899 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1900 | section in the Yocto Project Overview and Concepts Manual, |
| 1901 | runtime dependencies will often be added automatically, meaning |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1902 | :term:`DEPENDS` alone is sufficient for most recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1903 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1904 | - Counterintuitively, :term:`DEPENDS` is often necessary even for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1905 | recipes that install precompiled components. For example, if |
| 1906 | ``libfoo`` is a precompiled library that links against |
| 1907 | ``libbar``, then linking against ``libfoo`` requires both |
| 1908 | ``libfoo`` and ``libbar`` to be available in the sysroot. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1909 | Without a :term:`DEPENDS` from the recipe that installs ``libfoo`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1910 | to the recipe that installs ``libbar``, other recipes might |
| 1911 | fail to link against ``libfoo``. |
| 1912 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1913 | For information on runtime dependencies, see the :term:`RDEPENDS` |
| 1914 | variable. You can also see the |
| 1915 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 1916 | ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" |
| 1917 | sections in the BitBake User Manual for additional information on tasks |
| 1918 | and dependencies. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1919 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1920 | :term:`DEPLOY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1921 | Points to the general area that the OpenEmbedded build system uses to |
| 1922 | place images, packages, SDKs, and other output files that are ready |
| 1923 | to be used outside of the build system. By default, this directory |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1924 | resides within the :term:`Build Directory` as ``${TMPDIR}/deploy``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1925 | |
| 1926 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1927 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1928 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1929 | ":ref:`overview-manual/concepts:images`", |
| 1930 | ":ref:`overview-manual/concepts:package feeds`", and |
| 1931 | ":ref:`overview-manual/concepts:application development sdk`" sections all in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1932 | Yocto Project Overview and Concepts Manual. |
| 1933 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1934 | :term:`DEPLOY_DIR_DEB` |
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 | Debian packages that are ready to be used outside of the build |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1937 | system. This variable applies only when :term:`PACKAGE_CLASSES` contains |
| 1938 | ":ref:`ref-classes-package_deb`". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1939 | |
| 1940 | The BitBake configuration file initially defines the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1941 | :term:`DEPLOY_DIR_DEB` variable as a sub-folder of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1942 | :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1943 | |
| 1944 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
| 1945 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1946 | The :ref:`ref-classes-package_deb` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1947 | :term:`DEPLOY_DIR_DEB` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1948 | :ref:`ref-tasks-package_write_deb` task |
| 1949 | writes Debian packages into the appropriate folder. For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1950 | information on how packaging works, see the |
| 1951 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1952 | in the Yocto Project Overview and Concepts Manual. |
| 1953 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1954 | :term:`DEPLOY_DIR_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1955 | Points to the area that the OpenEmbedded build system uses to place |
| 1956 | images and other associated output files that are ready to be |
| 1957 | deployed onto the target machine. The directory is machine-specific |
| 1958 | as it contains the ``${MACHINE}`` name. By default, this directory |
| 1959 | resides within the :term:`Build Directory` as |
| 1960 | ``${DEPLOY_DIR}/images/${MACHINE}/``. |
| 1961 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1962 | It must not be used directly in recipes when deploying files. Instead, |
| 1963 | it's only useful when a recipe needs to "read" a file already deployed |
| 1964 | by a dependency. So, it should be filled with the contents of |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1965 | :term:`DEPLOYDIR` by the :ref:`ref-classes-deploy` class or with the |
| 1966 | contents of :term:`IMGDEPLOYDIR` by the :ref:`ref-classes-image` class. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1967 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1968 | For more information on the structure of the :term:`Build Directory`, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1969 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1970 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1971 | ":ref:`overview-manual/concepts:images`" and |
| 1972 | ":ref:`overview-manual/concepts:application development sdk`" sections both in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1973 | the Yocto Project Overview and Concepts Manual. |
| 1974 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1975 | :term:`DEPLOY_DIR_IPK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1976 | Points to the area that the OpenEmbedded build system uses to place |
| 1977 | 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] | 1978 | This variable applies only when :term:`PACKAGE_CLASSES` contains |
| 1979 | ":ref:`ref-classes-package_ipk`". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1980 | |
| 1981 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1982 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1983 | |
| 1984 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
| 1985 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1986 | The :ref:`ref-classes-package_ipk` class uses the :term:`DEPLOY_DIR_IPK` |
| 1987 | variable to make sure the :ref:`ref-tasks-package_write_ipk` task |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1988 | writes IPK packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1989 | on how packaging works, see the |
| 1990 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1991 | in the Yocto Project Overview and Concepts Manual. |
| 1992 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1993 | :term:`DEPLOY_DIR_RPM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1994 | Points to the area that the OpenEmbedded build system uses to place |
| 1995 | 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] | 1996 | This variable applies only when :term:`PACKAGE_CLASSES` contains |
| 1997 | ":ref:`ref-classes-package_rpm`". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1998 | |
| 1999 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2000 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2001 | |
| 2002 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
| 2003 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2004 | The :ref:`ref-classes-package_rpm` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2005 | :term:`DEPLOY_DIR_RPM` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2006 | :ref:`ref-tasks-package_write_rpm` task |
| 2007 | writes RPM packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2008 | on how packaging works, see the |
| 2009 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2010 | in the Yocto Project Overview and Concepts Manual. |
| 2011 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2012 | :term:`DEPLOYDIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2013 | When inheriting the :ref:`ref-classes-deploy` class, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2014 | :term:`DEPLOYDIR` points to a temporary work area for deployed files that |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2015 | is set in the :ref:`ref-classes-deploy` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2016 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2017 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2018 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2019 | 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] | 2020 | deployed into :term:`DEPLOYDIR`, and the class will take care of copying |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2021 | them into :term:`DEPLOY_DIR_IMAGE` |
| 2022 | afterwards. |
| 2023 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2024 | :term:`DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2025 | The package description used by package managers. If not set, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2026 | :term:`DESCRIPTION` takes the value of the :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2027 | variable. |
| 2028 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2029 | :term:`DEV_PKG_DEPENDENCY` |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 2030 | Provides an easy way for recipes to disable or adjust the runtime recommendation |
| 2031 | (:term:`RRECOMMENDS`) of the ``${PN}-dev`` package on the main |
| 2032 | (``${PN}``) package. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2033 | |
| 2034 | :term:`DISABLE_STATIC` |
| 2035 | Used in order to disable static linking by default (in order to save |
| 2036 | space, since static libraries are often unused in embedded systems.) |
| 2037 | The default value is " --disable-static", however it can be set to "" |
| 2038 | in order to enable static linking if desired. Certain recipes do this |
| 2039 | individually, and also there is a |
| 2040 | ``meta/conf/distro/include/no-static-libs.inc`` include file that |
| 2041 | disables static linking for a number of recipes. Some software |
| 2042 | packages or build tools (such as CMake) have explicit support for |
| 2043 | enabling / disabling static linking, and in those cases |
| 2044 | :term:`DISABLE_STATIC` is not used. |
| 2045 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2046 | :term:`DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2047 | The short name of the distribution. For information on the long name |
| 2048 | of the distribution, see the :term:`DISTRO_NAME` |
| 2049 | variable. |
| 2050 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2051 | The :term:`DISTRO` variable corresponds to a distribution configuration |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2052 | file whose root name is the same as the variable's argument and whose |
| 2053 | filename extension is ``.conf``. For example, the distribution |
| 2054 | configuration file for the Poky distribution is named ``poky.conf`` |
| 2055 | and resides in the ``meta-poky/conf/distro`` directory of the |
| 2056 | :term:`Source Directory`. |
| 2057 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2058 | Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2059 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2060 | |
| 2061 | DISTRO = "poky" |
| 2062 | |
| 2063 | Distribution configuration files are located in a ``conf/distro`` |
| 2064 | directory within the :term:`Metadata` that contains the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2065 | distribution configuration. The value for :term:`DISTRO` must not contain |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2066 | spaces, and is typically all lower-case. |
| 2067 | |
| 2068 | .. note:: |
| 2069 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2070 | If the :term:`DISTRO` variable is blank, a set of default configurations |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2071 | are used, which are specified within |
| 2072 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2073 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2074 | :term:`DISTRO_CODENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2075 | Specifies a codename for the distribution being built. |
| 2076 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2077 | :term:`DISTRO_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2078 | Specifies a list of distro-specific packages to add to all images. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2079 | This variable takes effect through ``packagegroup-base`` so the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2080 | variable only really applies to the more full-featured images that |
| 2081 | include ``packagegroup-base``. You can use this variable to keep |
| 2082 | distro policy out of generic images. As with all other distro |
| 2083 | variables, you set this variable in the distro ``.conf`` file. |
| 2084 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2085 | :term:`DISTRO_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2086 | Specifies a list of distro-specific packages to add to all images if |
| 2087 | the packages exist. The packages might not exist or be empty (e.g. |
| 2088 | kernel modules). The list of packages are automatically installed but |
| 2089 | you can remove them. |
| 2090 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2091 | :term:`DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2092 | The software support you want in your distribution for various |
| 2093 | features. You define your distribution features in the distribution |
| 2094 | configuration file. |
| 2095 | |
| 2096 | In most cases, the presence or absence of a feature in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2097 | :term:`DISTRO_FEATURES` is translated to the appropriate option supplied |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2098 | to the configure script during the |
| 2099 | :ref:`ref-tasks-configure` task for recipes that |
| 2100 | optionally support the feature. For example, specifying "x11" in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2101 | :term:`DISTRO_FEATURES`, causes every piece of software built for the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2102 | target that can optionally support X11 to have its X11 support |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 2103 | enabled. |
| 2104 | |
| 2105 | .. note:: |
| 2106 | |
| 2107 | Just enabling :term:`DISTRO_FEATURES` alone doesn't |
| 2108 | enable feature support for packages. Mechanisms such as making |
| 2109 | :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used |
| 2110 | to enable/disable package features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2111 | |
| 2112 | Two more examples are Bluetooth and NFS support. For a more complete |
| 2113 | 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] | 2114 | provide with this variable, see the ":ref:`ref-features-distro`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2115 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2116 | :term:`DISTRO_FEATURES_BACKFILL` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2117 | A space-separated list of features to be added to :term:`DISTRO_FEATURES` |
| 2118 | if not also present in :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2119 | |
| 2120 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 2121 | not intended to be user-configurable. It is best to just reference |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2122 | the variable to see which distro features are being |
| 2123 | :ref:`backfilled <ref-features-backfill>` for all distro configurations. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2125 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2126 | A space-separated list of features from :term:`DISTRO_FEATURES_BACKFILL` |
| 2127 | that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added |
| 2128 | to :term:`DISTRO_FEATURES`) during the build. |
| 2129 | |
| 2130 | This corresponds to an opt-out mechanism. When new default distro |
| 2131 | features are introduced, distribution maintainers can review (`consider`) |
| 2132 | them and decide to exclude them from the |
| 2133 | :ref:`backfilled <ref-features-backfill>` features. Therefore, the |
| 2134 | combination of :term:`DISTRO_FEATURES_BACKFILL` and |
| 2135 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` makes it possible to |
| 2136 | add new default features without breaking existing distributions. |
| 2137 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2138 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2139 | :term:`DISTRO_FEATURES_DEFAULT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2140 | A convenience variable that gives you the default list of distro |
| 2141 | features with the exception of any features specific to the C library |
| 2142 | (``libc``). |
| 2143 | |
| 2144 | When creating a custom distribution, you might find it useful to be |
| 2145 | able to reuse the default |
| 2146 | :term:`DISTRO_FEATURES` options without the |
| 2147 | 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] | 2148 | :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2149 | |
| 2150 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" |
| 2151 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2152 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2153 | Specifies a list of features that if present in the target |
| 2154 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2155 | included in :term:`DISTRO_FEATURES` when building native recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2156 | variable is used in addition to the features filtered using the |
| 2157 | :term:`DISTRO_FEATURES_NATIVE` |
| 2158 | variable. |
| 2159 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2160 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2161 | Specifies a list of features that if present in the target |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2162 | :term:`DISTRO_FEATURES` value should be included in |
| 2163 | :term:`DISTRO_FEATURES` when building :ref:`ref-classes-nativesdk` |
| 2164 | recipes. This variable is used in addition to the features filtered using |
| 2165 | the :term:`DISTRO_FEATURES_NATIVESDK` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2166 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2167 | :term:`DISTRO_FEATURES_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2168 | Specifies a list of features that should be included in |
| 2169 | :term:`DISTRO_FEATURES` when building native |
| 2170 | recipes. This variable is used in addition to the features filtered |
| 2171 | using the |
| 2172 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
| 2173 | variable. |
| 2174 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2175 | :term:`DISTRO_FEATURES_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2176 | Specifies a list of features that should be included in |
| 2177 | :term:`DISTRO_FEATURES` when building |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2178 | :ref:`ref-classes-nativesdk` recipes. This variable is used |
| 2179 | in addition to the features filtered using the |
| 2180 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2182 | :term:`DISTRO_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2183 | The long name of the distribution. For information on the short name |
| 2184 | of the distribution, see the :term:`DISTRO` variable. |
| 2185 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2186 | The :term:`DISTRO_NAME` variable corresponds to a distribution |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2187 | configuration file whose root name is the same as the variable's |
| 2188 | argument and whose filename extension is ``.conf``. For example, the |
| 2189 | distribution configuration file for the Poky distribution is named |
| 2190 | ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory |
| 2191 | of the :term:`Source Directory`. |
| 2192 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2193 | Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2194 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2195 | |
| 2196 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" |
| 2197 | |
| 2198 | Distribution configuration files are located in a ``conf/distro`` |
| 2199 | directory within the :term:`Metadata` that contains the |
| 2200 | distribution configuration. |
| 2201 | |
| 2202 | .. note:: |
| 2203 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2204 | If the :term:`DISTRO_NAME` variable is blank, a set of default |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2205 | configurations are used, which are specified within |
| 2206 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2207 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2208 | :term:`DISTRO_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2209 | The version of the distribution. |
| 2210 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2211 | :term:`DISTROOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2212 | A colon-separated list of overrides specific to the current |
| 2213 | distribution. By default, this list includes the value of |
| 2214 | :term:`DISTRO`. |
| 2215 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2216 | You can extend :term:`DISTROOVERRIDES` to add extra overrides that should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2217 | apply to the distribution. |
| 2218 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2219 | The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2220 | is included in the default value of |
| 2221 | :term:`OVERRIDES`. |
| 2222 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 2223 | Here is an example from :yocto_git:`meta-poky/conf/distro/poky-tiny.conf |
| 2224 | </poky/tree/meta-poky/conf/distro/poky-tiny.conf>`:: |
| 2225 | |
| 2226 | DISTROOVERRIDES = "poky:poky-tiny" |
| 2227 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2228 | :term:`DL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2229 | The central download directory used by the build process to store |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2230 | downloads. By default, :term:`DL_DIR` gets files suitable for mirroring |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2231 | for everything except Git repositories. If you want tarballs of Git |
| 2232 | repositories, use the |
| 2233 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
| 2234 | variable. |
| 2235 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2236 | 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] | 2237 | ``conf/local.conf`` file. This directory is self-maintaining and you |
| 2238 | should not have to touch it. By default, the directory is |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2239 | ``downloads`` in the :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2240 | |
| 2241 | #DL_DIR ?= "${TOPDIR}/downloads" |
| 2242 | |
| 2243 | To specify a different download directory, |
| 2244 | simply remove the comment from the line and provide your directory. |
| 2245 | |
| 2246 | During a first build, the system downloads many different source code |
| 2247 | tarballs from various upstream projects. Downloading can take a |
| 2248 | while, particularly if your network connection is slow. Tarballs are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2249 | 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] | 2250 | system looks there first to find source tarballs. |
| 2251 | |
| 2252 | .. note:: |
| 2253 | |
| 2254 | When wiping and rebuilding, you can preserve this directory to |
| 2255 | speed up this part of subsequent builds. |
| 2256 | |
| 2257 | You can safely share this directory between multiple builds on the |
| 2258 | same development machine. For additional information on how the build |
| 2259 | process gets source files when working behind a firewall or proxy |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2260 | server, see this specific question in the ":doc:`faq`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2261 | chapter. You can also refer to the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2262 | ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2263 | Wiki page. |
| 2264 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2265 | :term:`DOC_COMPRESS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2266 | When inheriting the :ref:`ref-classes-compress_doc` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2267 | class, this variable sets the compression policy used when the |
| 2268 | OpenEmbedded build system compresses man pages and info pages. By |
| 2269 | default, the compression method used is gz (gzip). Other policies |
| 2270 | available are xz and bz2. |
| 2271 | |
| 2272 | 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] | 2273 | comments in the ``meta/classes-recipe/compress_doc.bbclass`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2274 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2275 | :term:`DT_FILES` |
| 2276 | Space-separated list of device tree source files to compile using |
| 2277 | a recipe that inherits the :ref:`ref-classes-devicetree` class. These |
| 2278 | are relative to the :term:`DT_FILES_PATH`. |
| 2279 | |
| 2280 | For convenience, both ``.dts`` and ``.dtb`` extensions can be used. |
| 2281 | |
| 2282 | Use an empty string (default) to build all device tree sources within |
| 2283 | the :term:`DT_FILES_PATH` directory. |
| 2284 | |
| 2285 | :term:`DT_FILES_PATH` |
| 2286 | When compiling out-of-tree device tree sources using a recipe that |
| 2287 | inherits the :ref:`ref-classes-devicetree` class, this variable specifies |
| 2288 | the path to the directory containing dts files to build. |
| 2289 | |
| 2290 | Defaults to the :term:`S` directory. |
| 2291 | |
| 2292 | :term:`DT_PADDING_SIZE` |
| 2293 | When inheriting the :ref:`ref-classes-devicetree` class, this variable |
| 2294 | specifies the size of padding appended to the device tree blob, used as |
| 2295 | extra space typically for additional properties during boot. |
| 2296 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2297 | :term:`EFI_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2298 | When building bootable images (i.e. where ``hddimg``, ``iso``, or |
| 2299 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2300 | :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2301 | default is "grub-efi", but "systemd-boot" can be used instead. |
| 2302 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2303 | See the :ref:`ref-classes-systemd-boot` and :ref:`ref-classes-image-live` |
| 2304 | classes for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2305 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2306 | :term:`ENABLE_BINARY_LOCALE_GENERATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2307 | Variable that controls which locales for ``glibc`` are generated |
| 2308 | during the build (useful if the target device has 64Mbytes of RAM or |
| 2309 | less). |
| 2310 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2311 | :term:`ERR_REPORT_DIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2312 | When used with the :ref:`ref-classes-report-error` class, specifies the |
| 2313 | path used for storing the debug files created by the :ref:`error reporting |
| 2314 | tool <dev-manual/error-reporting-tool:using the error reporting tool>`, |
| 2315 | which allows you to submit build errors you encounter to a central |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2316 | database. By default, the value of this variable is |
| 2317 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. |
| 2318 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2319 | 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] | 2320 | reporting tool to store the debug files as follows in your |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2321 | ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2322 | |
| 2323 | ERR_REPORT_DIR = "path" |
| 2324 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2325 | :term:`ERROR_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2326 | Specifies the quality assurance checks whose failures are reported as |
| 2327 | errors by the OpenEmbedded build system. You set this variable in |
| 2328 | your distribution configuration file. For a list of the checks you |
| 2329 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2330 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2331 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2332 | :term:`ESDK_CLASS_INHERIT_DISABLE` |
| 2333 | A list of classes to remove from the :term:`INHERIT` |
| 2334 | value globally within the extensible SDK configuration. The |
| 2335 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the |
| 2336 | default value:: |
| 2337 | |
| 2338 | ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc" |
| 2339 | |
| 2340 | Some classes are not generally applicable within the extensible SDK |
| 2341 | context. You can use this variable to disable those classes. |
| 2342 | |
| 2343 | For additional information on how to customize the extensible SDK's |
| 2344 | configuration, see the |
| 2345 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2346 | section in the Yocto Project Application Development and the |
| 2347 | Extensible Software Development Kit (eSDK) manual. |
| 2348 | |
| 2349 | :term:`ESDK_LOCALCONF_ALLOW` |
| 2350 | A list of variables allowed through from the OpenEmbedded build |
| 2351 | system configuration into the extensible SDK configuration. By |
| 2352 | default, the list of variables is empty and is set in the |
| 2353 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. |
| 2354 | |
| 2355 | This list overrides the variables specified using the |
| 2356 | :term:`ESDK_LOCALCONF_REMOVE` variable as well as |
| 2357 | other variables automatically added due to the "/" character |
| 2358 | being found at the start of the |
| 2359 | value, which is usually indicative of being a path and thus might not |
| 2360 | be valid on the system where the SDK is installed. |
| 2361 | |
| 2362 | For additional information on how to customize the extensible SDK's |
| 2363 | configuration, see the |
| 2364 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2365 | section in the Yocto Project Application Development and the |
| 2366 | Extensible Software Development Kit (eSDK) manual. |
| 2367 | |
| 2368 | :term:`ESDK_LOCALCONF_REMOVE` |
| 2369 | A list of variables not allowed through from the OpenEmbedded build |
| 2370 | system configuration into the extensible SDK configuration. Usually, |
| 2371 | these are variables that are specific to the machine on which the |
| 2372 | build system is running and thus would be potentially problematic |
| 2373 | within the extensible SDK. |
| 2374 | |
| 2375 | By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the |
| 2376 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and |
| 2377 | excludes the following variables: |
| 2378 | |
| 2379 | - :term:`CONF_VERSION` |
| 2380 | - :term:`BB_NUMBER_THREADS` |
| 2381 | - :term:`BB_NUMBER_PARSE_THREADS` |
| 2382 | - :term:`PARALLEL_MAKE` |
| 2383 | - :term:`PRSERV_HOST` |
| 2384 | - :term:`SSTATE_MIRRORS` :term:`DL_DIR` |
| 2385 | - :term:`SSTATE_DIR` :term:`TMPDIR` |
| 2386 | - :term:`BB_SERVER_TIMEOUT` |
| 2387 | |
| 2388 | For additional information on how to customize the extensible SDK's |
| 2389 | configuration, see the |
| 2390 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2391 | section in the Yocto Project Application Development and the |
| 2392 | Extensible Software Development Kit (eSDK) manual. |
| 2393 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2394 | :term:`EXCLUDE_FROM_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2395 | Triggers the OpenEmbedded build system's shared libraries resolver to |
| 2396 | exclude an entire package when scanning for shared libraries. |
| 2397 | |
| 2398 | .. note:: |
| 2399 | |
| 2400 | The shared libraries resolver's functionality results in part from |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2401 | the internal function ``package_do_shlibs``, which is part of the |
| 2402 | :ref:`ref-tasks-package` task. You should be aware that the shared |
| 2403 | libraries resolver might implicitly define some dependencies between |
| 2404 | packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2405 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2406 | The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2407 | :term:`PRIVATE_LIBS` variable, which excludes a |
| 2408 | package's particular libraries only and not the whole package. |
| 2409 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2410 | 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] | 2411 | particular package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2412 | |
| 2413 | EXCLUDE_FROM_SHLIBS = "1" |
| 2414 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2415 | :term:`EXCLUDE_FROM_WORLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2416 | Directs BitBake to exclude a recipe from world builds (i.e. |
| 2417 | ``bitbake world``). During world builds, BitBake locates, parses and |
| 2418 | builds all recipes found in every layer exposed in the |
| 2419 | ``bblayers.conf`` configuration file. |
| 2420 | |
| 2421 | To exclude a recipe from a world build using this variable, set the |
| 2422 | variable to "1" in the recipe. |
| 2423 | |
| 2424 | .. note:: |
| 2425 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2426 | 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] | 2427 | world build in order to satisfy dependencies of other recipes. Adding |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2428 | 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] | 2429 | explicitly added to the list of build targets in a world build. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2430 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2431 | :term:`EXTENDPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2432 | 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] | 2433 | version based on the recipe's :term:`PE` value. If :term:`PE` |
| 2434 | is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that |
| 2435 | value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1"). |
| 2436 | If a recipe's :term:`PE` is not set (the default) or is equal to zero, |
| 2437 | :term:`EXTENDPE` becomes "". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2438 | |
| 2439 | See the :term:`STAMP` variable for an example. |
| 2440 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2441 | :term:`EXTENDPKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2442 | The full package version specification as it appears on the final |
| 2443 | packages produced by a recipe. The variable's value is normally used |
| 2444 | to fix a runtime dependency to the exact same version of another |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2445 | package in the same recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2446 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2447 | RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2448 | |
| 2449 | The dependency relationships are intended to force the package |
| 2450 | manager to upgrade these types of packages in lock-step. |
| 2451 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2452 | :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2453 | When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2454 | tools are not in the source tree. |
| 2455 | |
| 2456 | When kernel tools are available in the tree, they are preferred over |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2457 | any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2458 | variable tells the OpenEmbedded build system to prefer the installed |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2459 | external tools. See the :ref:`ref-classes-kernel-yocto` class in |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2460 | ``meta/classes-recipe`` to see how the variable is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2461 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2462 | :term:`EXTERNAL_TOOLCHAIN` |
| 2463 | When you intend to use an |
| 2464 | :ref:`external toolchain <dev-manual/external-toolchain:optionally using an external toolchain>`, |
| 2465 | this variable allows to specify the directory where this toolchain was |
| 2466 | installed. |
| 2467 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2468 | :term:`EXTERNALSRC` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2469 | When inheriting the :ref:`ref-classes-externalsrc` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2470 | class, this variable points to the source tree, which is outside of |
| 2471 | the OpenEmbedded build system. When set, this variable sets the |
| 2472 | :term:`S` variable, which is what the OpenEmbedded build |
| 2473 | system uses to locate unpacked recipe source code. |
| 2474 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2475 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2476 | can also find information on how to use this variable in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2477 | ":ref:`dev-manual/building:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2478 | section in the Yocto Project Development Tasks Manual. |
| 2479 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2480 | :term:`EXTERNALSRC_BUILD` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2481 | When inheriting the :ref:`ref-classes-externalsrc` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2482 | class, this variable points to the directory in which the recipe's |
| 2483 | source code is built, which is outside of the OpenEmbedded build |
| 2484 | system. When set, this variable sets the :term:`B` variable, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2485 | which is what the OpenEmbedded build system uses to locate the |
| 2486 | :term:`Build Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2487 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2488 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2489 | can also find information on how to use this variable in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2490 | ":ref:`dev-manual/building:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2491 | section in the Yocto Project Development Tasks Manual. |
| 2492 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2493 | :term:`EXTRA_AUTORECONF` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2494 | For recipes inheriting the :ref:`ref-classes-autotools` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2495 | class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2496 | pass to the ``autoreconf`` command that is executed during the |
| 2497 | :ref:`ref-tasks-configure` task. |
| 2498 | |
| 2499 | The default value is "--exclude=autopoint". |
| 2500 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2501 | :term:`EXTRA_IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2502 | A list of additional features to include in an image. When listing |
| 2503 | more than one feature, separate them with a space. |
| 2504 | |
| 2505 | Typically, you configure this variable in your ``local.conf`` file, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2506 | which is found in the :term:`Build Directory`. Although you can use this |
| 2507 | variable from within a recipe, best practices dictate that you do not. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2508 | |
| 2509 | .. note:: |
| 2510 | |
| 2511 | To enable primary features from within the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2512 | :term:`IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2513 | |
| 2514 | Here are some examples of features you can add: |
| 2515 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2516 | - "dbg-pkgs" --- adds -dbg packages for all installed packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2517 | symbol information for debugging and profiling. |
| 2518 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2519 | - "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] | 2520 | enables post-installation logging. See the 'allow-empty-password' and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2521 | 'post-install-logging' features in the ":ref:`ref-features-image`" |
| 2522 | section for more information. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2523 | - "dev-pkgs" --- adds -dev packages for all installed packages. This is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2524 | useful if you want to develop against the libraries in the image. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2525 | - "read-only-rootfs" --- creates an image whose root filesystem is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2526 | read-only. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2527 | ":ref:`dev-manual/read-only-rootfs:creating a read-only root filesystem`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2528 | section in the Yocto Project Development Tasks Manual for more |
| 2529 | information |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2530 | - "tools-debug" --- adds debugging tools such as gdb and strace. |
| 2531 | - "tools-sdk" --- adds development tools such as gcc, make, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2532 | pkgconfig and so forth. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2533 | - "tools-testapps" --- adds useful testing tools |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2534 | such as ts_print, aplay, arecord and so forth. |
| 2535 | |
| 2536 | For a complete list of image features that ships with the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2537 | Project, see the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2538 | |
| 2539 | 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] | 2540 | 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] | 2541 | section in the Yocto Project Development Tasks Manual. |
| 2542 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2543 | :term:`EXTRA_IMAGECMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2544 | Specifies additional options for the image creation command that has |
| 2545 | been specified in :term:`IMAGE_CMD`. When setting |
| 2546 | this variable, use an override for the associated image type. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2547 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2548 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2549 | EXTRA_IMAGECMD:ext3 ?= "-i 4096" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2550 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2551 | :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2552 | A list of recipes to build that do not provide packages for |
| 2553 | installing into the root filesystem. |
| 2554 | |
| 2555 | 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] | 2556 | needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2557 | variable to list these recipes and thus specify the dependencies. A |
| 2558 | typical example is a required bootloader in a machine configuration. |
| 2559 | |
| 2560 | .. note:: |
| 2561 | |
| 2562 | To add packages to the root filesystem, see the various |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 2563 | :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2564 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2565 | :term:`EXTRA_OECMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2566 | Additional `CMake <https://cmake.org/overview/>`__ options. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2567 | :ref:`ref-classes-cmake` class for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2568 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2569 | :term:`EXTRA_OECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2570 | Additional ``configure`` script options. See |
| 2571 | :term:`PACKAGECONFIG_CONFARGS` for |
| 2572 | additional information on passing configure script options. |
| 2573 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2574 | :term:`EXTRA_OEMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2575 | Additional GNU ``make`` options. |
| 2576 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2577 | Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2578 | variable to specify any required GNU options. |
| 2579 | |
| 2580 | :term:`PARALLEL_MAKE` and |
| 2581 | :term:`PARALLEL_MAKEINST` also make use of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2582 | :term:`EXTRA_OEMAKE` to pass the required flags. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2583 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2584 | :term:`EXTRA_OESCONS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2585 | When inheriting the :ref:`ref-classes-scons` class, this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2586 | variable specifies additional configuration options you want to pass |
| 2587 | to the ``scons`` command line. |
| 2588 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 2589 | :term:`EXTRA_OEMESON` |
| 2590 | Additional `Meson <https://mesonbuild.com/>`__ options. See the |
| 2591 | :ref:`ref-classes-meson` class for additional information. |
| 2592 | |
| 2593 | In addition to standard Meson options, such options correspond to |
| 2594 | `Meson build options <https://mesonbuild.com/Build-options.html>`__ |
| 2595 | defined in the ``meson_options.txt`` file in the sources to build. |
| 2596 | Here is an example:: |
| 2597 | |
| 2598 | EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled" |
| 2599 | |
| 2600 | Note that any custom value for the Meson ``--buildtype`` option |
| 2601 | should be set through the :term:`MESON_BUILDTYPE` variable. |
| 2602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2603 | :term:`EXTRA_USERS_PARAMS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2604 | When inheriting the :ref:`ref-classes-extrausers` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2605 | class, this variable provides image level user and group operations. |
| 2606 | This is a more global method of providing user and group |
| 2607 | configuration as compared to using the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2608 | :ref:`ref-classes-useradd` class, which ties user and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2609 | group configurations to a specific recipe. |
| 2610 | |
| 2611 | The set list of commands you can configure using the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2612 | :term:`EXTRA_USERS_PARAMS` is shown in the |
| 2613 | :ref:`ref-classes-extrausers` class. These commands map to the normal |
| 2614 | Unix commands of the same names:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2615 | |
| 2616 | # EXTRA_USERS_PARAMS = "\ |
| 2617 | # useradd -p '' tester; \ |
| 2618 | # groupadd developers; \ |
| 2619 | # userdel nobody; \ |
| 2620 | # groupdel -g video; \ |
| 2621 | # groupmod -g 1020 developers; \ |
| 2622 | # usermod -s /bin/sh tester; \ |
| 2623 | # " |
| 2624 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 2625 | Hardcoded passwords are supported via the ``-p`` parameters for |
| 2626 | ``useradd`` or ``usermod``, but only hashed. |
| 2627 | |
| 2628 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns |
| 2629 | passwords. First on host, create the (escaped) password hash:: |
| 2630 | |
| 2631 | printf "%q" $(mkpasswd -m sha256crypt tester01) |
| 2632 | |
| 2633 | The resulting hash is set to a variable and used in ``useradd`` command parameters:: |
| 2634 | |
| 2635 | inherit extrausers |
| 2636 | PASSWD = "\$X\$ABC123\$A-Long-Hash" |
| 2637 | EXTRA_USERS_PARAMS = "\ |
| 2638 | useradd -p '${PASSWD}' tester-jim; \ |
| 2639 | useradd -p '${PASSWD}' tester-sue; \ |
| 2640 | " |
| 2641 | |
| 2642 | Finally, here is an example that sets the root password:: |
| 2643 | |
| 2644 | inherit extrausers |
| 2645 | EXTRA_USERS_PARAMS = "\ |
| 2646 | usermod -p '${PASSWD}' root; \ |
| 2647 | " |
| 2648 | |
| 2649 | .. note:: |
| 2650 | |
| 2651 | From a security perspective, hardcoding a default password is not |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 2652 | generally a good idea or even legal in some jurisdictions. It is |
| 2653 | 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] | 2654 | image. |
| 2655 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2656 | Additionally there is a special ``passwd-expire`` command that will |
| 2657 | cause the password for a user to be expired and thus force changing it |
| 2658 | on first login, for example:: |
| 2659 | |
| 2660 | EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" |
| 2661 | |
| 2662 | .. note:: |
| 2663 | |
| 2664 | At present, ``passwd-expire`` may only work for remote logins when |
| 2665 | using OpenSSH and not dropbear as an SSH server. |
| 2666 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2667 | :term:`EXTRANATIVEPATH` |
| 2668 | A list of subdirectories of |
| 2669 | ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` |
| 2670 | added to the beginning of the environment variable ``PATH``. As an |
| 2671 | example, the following prepends |
| 2672 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to |
| 2673 | ``PATH``:: |
| 2674 | |
| 2675 | EXTRANATIVEPATH = "foo bar" |
| 2676 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2677 | :term:`FAKEROOT` |
| 2678 | See :term:`bitbake:FAKEROOT` in the BitBake manual. |
| 2679 | |
| 2680 | :term:`FAKEROOTBASEENV` |
| 2681 | See :term:`bitbake:FAKEROOTBASEENV` in the BitBake manual. |
| 2682 | |
| 2683 | :term:`FAKEROOTCMD` |
| 2684 | See :term:`bitbake:FAKEROOTCMD` in the BitBake manual. |
| 2685 | |
| 2686 | :term:`FAKEROOTDIRS` |
| 2687 | See :term:`bitbake:FAKEROOTDIRS` in the BitBake manual. |
| 2688 | |
| 2689 | :term:`FAKEROOTENV` |
| 2690 | See :term:`bitbake:FAKEROOTENV` in the BitBake manual. |
| 2691 | |
| 2692 | :term:`FAKEROOTNOENV` |
| 2693 | See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual. |
| 2694 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2695 | :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2696 | Defines one or more packages to include in an image when a specific |
| 2697 | item is included in :term:`IMAGE_FEATURES`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2698 | When setting the value, :term:`FEATURE_PACKAGES` should have the name of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2699 | the feature item as an override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2700 | |
| 2701 | FEATURE_PACKAGES_widget = "package1 package2" |
| 2702 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2703 | In this example, if "widget" were added to :term:`IMAGE_FEATURES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2704 | package1 and package2 would be included in the image. |
| 2705 | |
| 2706 | .. note:: |
| 2707 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2708 | Packages installed by features defined through :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2709 | are often package groups. While similarly named, you should not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2710 | confuse the :term:`FEATURE_PACKAGES` variable with package groups, which |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2711 | are discussed elsewhere in the documentation. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2712 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2713 | :term:`FEED_DEPLOYDIR_BASE_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2714 | Points to the base URL of the server and location within the |
| 2715 | document-root that provides the metadata and packages required by |
| 2716 | OPKG to support runtime package management of IPK packages. You set |
| 2717 | this variable in your ``local.conf`` file. |
| 2718 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2719 | Consider the following example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2720 | |
| 2721 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" |
| 2722 | |
| 2723 | This example assumes you are serving |
| 2724 | your packages over HTTP and your databases are located in a directory |
| 2725 | named ``BOARD-dir``, which is underneath your HTTP server's |
| 2726 | document-root. In this case, the OpenEmbedded build system generates |
| 2727 | a set of configuration files for you in your target that work with |
| 2728 | the feed. |
| 2729 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2730 | :term:`FETCHCMD` |
| 2731 | See :term:`bitbake:FETCHCMD` in the BitBake manual. |
| 2732 | |
| 2733 | :term:`FILE` |
| 2734 | See :term:`bitbake:FILE` in the BitBake manual. |
| 2735 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2736 | :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2737 | The list of files and directories that are placed in a package. The |
| 2738 | :term:`PACKAGES` variable lists the packages |
| 2739 | generated by a recipe. |
| 2740 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2741 | To use the :term:`FILES` variable, provide a package name override that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2742 | identifies the resulting package. Then, provide a space-separated |
| 2743 | 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] | 2744 | part of the resulting package. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2745 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2746 | FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2747 | |
| 2748 | .. note:: |
| 2749 | |
| 2750 | - When specifying files or paths, you can pattern match using |
| 2751 | Python's |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2752 | `glob <https://docs.python.org/3/library/glob.html>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2753 | syntax. For details on the syntax, see the documentation by |
| 2754 | following the previous link. |
| 2755 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2756 | - When specifying paths as part of the :term:`FILES` variable, it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2757 | good practice to use appropriate path variables. For example, |
| 2758 | use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` |
| 2759 | rather than ``/usr/bin``. You can find a list of these |
| 2760 | variables at the top of the ``meta/conf/bitbake.conf`` file in |
| 2761 | the :term:`Source Directory`. You will also |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2762 | find the default values of the various ``FILES:*`` variables in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2763 | this file. |
| 2764 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2765 | 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] | 2766 | editable and you know they should not be overwritten during the |
| 2767 | package update process by the Package Management System (PMS), you |
| 2768 | can identify these files so that the PMS will not overwrite them. See |
| 2769 | the :term:`CONFFILES` variable for information on |
| 2770 | how to identify these files to the PMS. |
| 2771 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2772 | :term:`FILES_SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2773 | Defines the file specification to match |
| 2774 | :term:`SOLIBSDEV`. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2775 | :term:`FILES_SOLIBSDEV` defines the full path name of the development |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2776 | symbolic link (symlink) for shared libraries on the target platform. |
| 2777 | |
| 2778 | The following statement from the ``bitbake.conf`` shows how it is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2779 | set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2780 | |
| 2781 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
| 2782 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2783 | :term:`FILESEXTRAPATHS` |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 2784 | A colon-separated list to extend the search path the OpenEmbedded build |
| 2785 | system uses when looking for files and patches as it processes recipes |
| 2786 | and append files. The default directories BitBake uses when it processes |
| 2787 | recipes are initially defined by the :term:`FILESPATH` variable. You can |
| 2788 | extend :term:`FILESPATH` variable by using :term:`FILESEXTRAPATHS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2789 | |
| 2790 | Best practices dictate that you accomplish this by using |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2791 | :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2792 | prepend paths as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2793 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2794 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2795 | |
| 2796 | In the above example, the build system first |
| 2797 | looks for files in a directory that has the same name as the |
| 2798 | corresponding append file. |
| 2799 | |
| 2800 | .. note:: |
| 2801 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2802 | When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2803 | expansion (``:=``) operator. Immediate expansion makes sure that |
| 2804 | BitBake evaluates :term:`THISDIR` at the time the |
| 2805 | directive is encountered rather than at some later time when |
| 2806 | expansion might result in a directory that does not contain the |
| 2807 | files you need. |
| 2808 | |
| 2809 | Also, include the trailing separating colon character if you are |
| 2810 | prepending. The trailing colon character is necessary because you |
| 2811 | are directing BitBake to extend the path by prepending directories |
| 2812 | to the search path. |
| 2813 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2814 | Here is another common use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2815 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2816 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2817 | |
| 2818 | In this example, the build system extends the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2819 | :term:`FILESPATH` variable to include a directory named ``files`` that is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2820 | in the same directory as the corresponding append file. |
| 2821 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2822 | This next example specifically adds three paths:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2823 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2824 | FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2825 | |
| 2826 | A final example shows how you can extend the search path and include |
| 2827 | a :term:`MACHINE`-specific override, which is useful |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2828 | in a BSP layer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2829 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2830 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2831 | |
| 2832 | The previous statement appears in the |
| 2833 | ``linux-yocto-dev.bbappend`` file, which is found in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2834 | :ref:`overview-manual/development-environment:yocto project source repositories` in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2835 | ``meta-intel/common/recipes-kernel/linux``. Here, the machine |
| 2836 | override is a special :term:`PACKAGE_ARCH` |
| 2837 | definition for multiple ``meta-intel`` machines. |
| 2838 | |
| 2839 | .. note:: |
| 2840 | |
| 2841 | 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] | 2842 | the value of :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2843 | |
| 2844 | By prepending paths in ``.bbappend`` files, you allow multiple append |
| 2845 | files that reside in different layers but are used for the same |
| 2846 | recipe to correctly extend the path. |
| 2847 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2848 | :term:`FILESOVERRIDES` |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 2849 | A colon-separated list to specify a subset of :term:`OVERRIDES` used by |
| 2850 | the OpenEmbedded build system for creating :term:`FILESPATH`. The |
| 2851 | :term:`FILESOVERRIDES` variable uses overrides to automatically extend |
| 2852 | the :term:`FILESPATH` variable. For an example of how that works, see the |
| 2853 | :term:`FILESPATH` variable description. Additionally, you find more |
| 2854 | information on how overrides are handled in the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 2855 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2856 | section of the BitBake User Manual. |
| 2857 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2858 | By default, the :term:`FILESOVERRIDES` variable is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2859 | |
| 2860 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
| 2861 | |
| 2862 | .. note:: |
| 2863 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2864 | Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2865 | with expected overrides and are used in an expected manner by the |
| 2866 | build system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2867 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2868 | :term:`FILESPATH` |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 2869 | A colon-separated list specifying the default set of directories the |
| 2870 | OpenEmbedded build system uses when searching for patches and files. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2871 | |
| 2872 | During the build process, BitBake searches each directory in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2873 | :term:`FILESPATH` in the specified order when looking for files and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2874 | patches specified by each ``file://`` URI in a recipe's |
| 2875 | :term:`SRC_URI` statements. |
| 2876 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2877 | The default value for the :term:`FILESPATH` variable is defined in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2878 | :ref:`ref-classes-base` class found in ``meta/classes-global`` in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2879 | :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2880 | |
| 2881 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ |
| 2882 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" |
| 2883 | |
| 2884 | The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2885 | :term:`FILESPATH` variable is automatically extended using the overrides |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2886 | from the :term:`FILESOVERRIDES` variable. |
| 2887 | |
| 2888 | .. note:: |
| 2889 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2890 | - Do not hand-edit the :term:`FILESPATH` variable. If you want the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2891 | build system to look in directories other than the defaults, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2892 | extend the :term:`FILESPATH` variable by using the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2893 | :term:`FILESEXTRAPATHS` variable. |
| 2894 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2895 | - Be aware that the default :term:`FILESPATH` directories do not map |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2896 | to directories in custom layers where append files |
| 2897 | (``.bbappend``) are used. If you want the build system to find |
| 2898 | patches or files that reside with your append files, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2899 | to extend the :term:`FILESPATH` variable by using the |
| 2900 | :term:`FILESEXTRAPATHS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2901 | |
| 2902 | 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] | 2903 | example, consider a case where there is the following directory structure |
| 2904 | for general and machine-specific configurations:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2905 | |
| 2906 | files/defconfig |
| 2907 | files/MACHINEA/defconfig |
| 2908 | files/MACHINEB/defconfig |
| 2909 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2910 | Also in the example, the :term:`SRC_URI` statement contains |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2911 | "file://defconfig". Given this scenario, you can set |
| 2912 | :term:`MACHINE` to "MACHINEA" and cause the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2913 | system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2914 | "MACHINEB" and the build system uses files from ``files/MACHINEB``. |
| 2915 | Finally, for any machine other than "MACHINEA" and "MACHINEB", the |
| 2916 | build system uses files from ``files/defconfig``. |
| 2917 | |
| 2918 | You can find out more about the patching process in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2919 | ":ref:`overview-manual/concepts:patching`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2920 | in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 2921 | ":ref:`dev-manual/new-recipe:patching code`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2922 | the Yocto Project Development Tasks Manual. See the |
| 2923 | :ref:`ref-tasks-patch` task as well. |
| 2924 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2925 | :term:`FILESYSTEM_PERMS_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2926 | Allows you to define your own file permissions settings table as part |
| 2927 | of your configuration for the packaging process. For example, suppose |
| 2928 | you need a consistent set of custom permissions for a set of groups |
| 2929 | and users across an entire work project. It is best to do this in the |
| 2930 | packages themselves but this is not always possible. |
| 2931 | |
| 2932 | By default, the OpenEmbedded build system uses the ``fs-perms.txt``, |
| 2933 | which is located in the ``meta/files`` folder in the :term:`Source Directory`. |
| 2934 | If you create your own file |
| 2935 | permissions setting table, you should place it in your layer or the |
| 2936 | distro's layer. |
| 2937 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2938 | You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2939 | ``conf/local.conf`` file, which is found in the :term:`Build Directory`, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 2940 | to point to your custom ``fs-perms.txt``. You can specify more than a |
| 2941 | single file permissions setting table. The paths you specify to these |
| 2942 | files must be defined within the :term:`BBPATH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2943 | |
| 2944 | For guidance on how to create your own file permissions settings |
| 2945 | table file, examine the existing ``fs-perms.txt``. |
| 2946 | |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 2947 | :term:`FIT_ADDRESS_CELLS` |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 2948 | Specifies the value of the ``#address-cells`` value for the |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2949 | description of the FIT image. |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 2950 | |
| 2951 | The default value is set to "1" by the :ref:`ref-classes-kernel-fitimage` |
| 2952 | class, which corresponds to 32 bit addresses. |
| 2953 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2954 | For platforms that need to set 64 bit addresses, for example in |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 2955 | :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to |
| 2956 | set this value to "2", as two 32 bit values (cells) will be needed |
| 2957 | to represent such addresses. |
| 2958 | |
| 2959 | Here is an example setting "0x400000000" as a load address:: |
| 2960 | |
| 2961 | FIT_ADDRESS_CELLS = "2" |
| 2962 | UBOOT_LOADADDRESS= "0x04 0x00000000" |
| 2963 | |
| 2964 | See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__. |
| 2965 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 2966 | :term:`FIT_CONF_DEFAULT_DTB` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2967 | Specifies the default device tree binary (dtb) file for a FIT image |
| 2968 | when multiple ones are provided. |
| 2969 | |
| 2970 | This variable is used in the :ref:`ref-classes-kernel-fitimage` class. |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 2971 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2972 | :term:`FIT_DESC` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2973 | Specifies the description string encoded into a FIT image. The |
| 2974 | default value is set by the :ref:`ref-classes-kernel-fitimage` class as |
| 2975 | follows:: |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2976 | |
| 2977 | FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" |
| 2978 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2979 | :term:`FIT_GENERATE_KEYS` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2980 | Decides whether to generate the keys for signing the FIT image if |
| 2981 | they don't already exist. The keys are created in |
| 2982 | :term:`UBOOT_SIGN_KEYDIR`. The default value is set to "0" |
| 2983 | by the :ref:`ref-classes-kernel-fitimage` class. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2984 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2985 | :term:`FIT_HASH_ALG` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2986 | Specifies the hash algorithm used in creating the FIT Image. |
| 2987 | This variable is set by default to "sha256" by the |
| 2988 | :ref:`ref-classes-kernel-fitimage` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2989 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2990 | :term:`FIT_KERNEL_COMP_ALG` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2991 | The compression algorithm to use for the kernel image inside the FIT Image. |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 2992 | At present, the only supported values are "gzip" (default), "lzo" or "none". |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2993 | If you set this variable to anything other than "none" you may also need |
| 2994 | to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. |
| 2995 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 2996 | This variable is used in the :ref:`ref-classes-kernel-uboot` class. |
| 2997 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2998 | :term:`FIT_KERNEL_COMP_ALG_EXTENSION` |
| 2999 | File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3000 | value is set ".gz" by the :ref:`ref-classes-kernel-uboot` class. If you |
| 3001 | set :term:`FIT_KERNEL_COMP_ALG` to "lzo", you may want to set this |
| 3002 | variable to ".lzo". |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3003 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3004 | :term:`FIT_KEY_GENRSA_ARGS` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3005 | Arguments to ``openssl genrsa`` for generating a RSA private key for |
| 3006 | signing the FIT image. The default value is set to "-F4" by the |
| 3007 | :ref:`ref-classes-kernel-fitimage` class. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3008 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3009 | :term:`FIT_KEY_REQ_ARGS` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3010 | Arguments to ``openssl req`` for generating a certificate for signing |
| 3011 | the FIT image. The default value is "-batch -new" by the |
| 3012 | :ref:`ref-classes-kernel-fitimage` class, "batch" for |
| 3013 | non interactive mode and "new" for generating new keys. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3014 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3015 | :term:`FIT_KEY_SIGN_PKCS` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3016 | Format for the public key certificate used for signing the FIT image. |
| 3017 | The default value is set to "x509" by the |
| 3018 | :ref:`ref-classes-kernel-fitimage` class. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3019 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3020 | :term:`FIT_SIGN_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3021 | Specifies the signature algorithm used in creating the FIT Image. |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3022 | This variable is set by default to "rsa2048" by the |
| 3023 | :ref:`ref-classes-kernel-fitimage` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3024 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3025 | :term:`FIT_PAD_ALG` |
| 3026 | Specifies the padding algorithm used in creating the FIT Image. |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3027 | The default value is set to "pkcs-1.5" by the |
| 3028 | :ref:`ref-classes-kernel-fitimage` class. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3029 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3030 | :term:`FIT_SIGN_INDIVIDUAL` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3031 | If set to "1", then the :ref:`ref-classes-kernel-fitimage` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3032 | class will sign the kernel, dtb and ramdisk images individually in addition |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3033 | to signing the FIT image itself. This could be useful if you are |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3034 | intending to verify signatures in another context than booting via |
| 3035 | U-Boot. |
| 3036 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3037 | This variable is set to "0" by default. |
| 3038 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3039 | :term:`FIT_SIGN_NUMBITS` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 3040 | Size of the private key used in the FIT image, in number of bits. |
| 3041 | The default value for this variable is set to "2048" |
| 3042 | by the :ref:`ref-classes-kernel-fitimage` class. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3043 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3044 | :term:`FONT_EXTRA_RDEPENDS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3045 | When inheriting the :ref:`ref-classes-fontcache` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3046 | this variable specifies the runtime dependencies for font packages. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3047 | By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3048 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3049 | :term:`FONT_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3050 | When inheriting the :ref:`ref-classes-fontcache` class, this variable |
| 3051 | identifies packages containing font files that need to be cached by |
| 3052 | Fontconfig. By default, the :ref:`ref-classes-fontcache` class assumes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3053 | that fonts are in the recipe's main package (i.e. |
| 3054 | ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you |
| 3055 | need are in a package other than that main package. |
| 3056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3057 | :term:`FORCE_RO_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3058 | Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` |
| 3059 | during the generation of the root filesystem. |
| 3060 | |
| 3061 | Set the variable to "1" to force the removal of these packages. |
| 3062 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3063 | :term:`FULL_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3064 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3065 | compiling an optimized system. This variable defaults to "-O2 -pipe |
| 3066 | ${DEBUG_FLAGS}". |
| 3067 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3068 | :term:`GCCPIE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3069 | Enables Position Independent Executables (PIE) within the GNU C |
| 3070 | Compiler (GCC). Enabling PIE in the GCC makes Return Oriented |
| 3071 | Programming (ROP) attacks much more difficult to execute. |
| 3072 | |
| 3073 | By default the ``security_flags.inc`` file enables PIE by setting the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3074 | variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3075 | |
| 3076 | GCCPIE ?= "--enable-default-pie" |
| 3077 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3078 | :term:`GCCVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3079 | Specifies the default version of the GNU C Compiler (GCC) used for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3080 | compilation. By default, :term:`GCCVERSION` is set to "8.x" in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3081 | ``meta/conf/distro/include/tcmode-default.inc`` include file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3082 | |
| 3083 | GCCVERSION ?= "8.%" |
| 3084 | |
| 3085 | You can override this value by setting it in a |
| 3086 | configuration file such as the ``local.conf``. |
| 3087 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3088 | :term:`GDB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3089 | The minimal command and arguments to run the GNU Debugger. |
| 3090 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3091 | :term:`GIR_EXTRA_LIBS_PATH` |
| 3092 | Allows to specify an extra search path for ``.so`` files |
| 3093 | in GLib related recipes using GObject introspection, |
| 3094 | and which do not compile without this setting. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3095 | See the ":ref:`dev-manual/gobject-introspection:enabling gobject introspection support`" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3096 | section for details. |
| 3097 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3098 | :term:`GITDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3099 | The directory in which a local copy of a Git repository is stored |
| 3100 | when it is cloned. |
| 3101 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3102 | :term:`GITHUB_BASE_URI` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3103 | When inheriting the :ref:`ref-classes-github-releases` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3104 | class, specifies the base URL for fetching releases for the github |
| 3105 | project you wish to fetch sources from. The default value is as follows:: |
| 3106 | |
| 3107 | GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/" |
| 3108 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3109 | :term:`GLIBC_GENERATE_LOCALES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3110 | Specifies the list of GLIBC locales to generate should you not wish |
| 3111 | to generate all LIBC locals, which can be time consuming. |
| 3112 | |
| 3113 | .. note:: |
| 3114 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3115 | If you specifically remove the locale ``en_US.UTF-8``, you must set |
| 3116 | :term:`IMAGE_LINGUAS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3117 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3118 | You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3119 | By default, all locales are generated:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3120 | |
| 3121 | GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" |
| 3122 | |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 3123 | :term:`GO_IMPORT` |
| 3124 | When inheriting the :ref:`ref-classes-go` class, this mandatory variable |
| 3125 | sets the import path for the Go package that will be created for the code |
| 3126 | to build. If you have a ``go.mod`` file in the source directory, this |
| 3127 | typically matches the path in the ``module`` line in this file. |
| 3128 | |
| 3129 | Other Go programs importing this package will use this path. |
| 3130 | |
| 3131 | Here is an example setting from the |
| 3132 | :yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>` |
| 3133 | recipe:: |
| 3134 | |
| 3135 | GO_IMPORT = "golang.org/x/example" |
| 3136 | |
| 3137 | :term:`GO_INSTALL` |
| 3138 | When inheriting the :ref:`ref-classes-go` class, this optional variable |
| 3139 | specifies which packages in the sources should be compiled and |
| 3140 | installed in the Go build space by the |
| 3141 | `go install <https://go.dev/ref/mod#go-install>`__ command. |
| 3142 | |
| 3143 | Here is an example setting from the |
| 3144 | :oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>` |
| 3145 | recipe:: |
| 3146 | |
| 3147 | GO_INSTALL = "\ |
| 3148 | ${GO_IMPORT}/cmd/crucible \ |
| 3149 | ${GO_IMPORT}/cmd/habtool \ |
| 3150 | " |
| 3151 | |
| 3152 | By default, :term:`GO_INSTALL` is defined as:: |
| 3153 | |
| 3154 | GO_INSTALL ?= "${GO_IMPORT}/..." |
| 3155 | |
| 3156 | The ``...`` wildcard means that it will catch all |
| 3157 | packages found in the sources. |
| 3158 | |
| 3159 | See the :term:`GO_INSTALL_FILTEROUT` variable for |
| 3160 | filtering out unwanted packages from the ones |
| 3161 | found from the :term:`GO_INSTALL` value. |
| 3162 | |
| 3163 | :term:`GO_INSTALL_FILTEROUT` |
| 3164 | When using the Go "vendor" mechanism to bring in dependencies for a Go |
| 3165 | package, the default :term:`GO_INSTALL` setting, which uses the ``...`` |
| 3166 | wildcard, will include the vendored packages in the build, which produces |
| 3167 | incorrect results. |
| 3168 | |
| 3169 | There are also some Go packages that are structured poorly, so that the |
| 3170 | ``...`` wildcard results in building example or test code that should not |
| 3171 | be included in the build, or could fail to build. |
| 3172 | |
| 3173 | This optional variable allows for filtering out a subset of the sources. |
| 3174 | It defaults to excluding everything under the ``vendor`` subdirectory |
| 3175 | under package's main directory. This is the normal location for vendored |
| 3176 | packages, but it can be overridden by a recipe to filter out other |
| 3177 | subdirectories if needed. |
| 3178 | |
| 3179 | :term:`GO_WORKDIR` |
| 3180 | When using Go Modules, the current working directory must be the directory |
| 3181 | containing the ``go.mod`` file, or one of its subdirectories. When the |
| 3182 | ``go`` tool is used, it will automatically look for the ``go.mod`` file |
| 3183 | in the Go working directory or in any parent directory, but not in |
| 3184 | subdirectories. |
| 3185 | |
| 3186 | When using the :ref:`ref-classes-go-mod` class to use Go modules, |
| 3187 | the optional :term:`GO_WORKDIR` variable, defaulting to the value |
| 3188 | of :term:`GO_IMPORT`, allows to specify a different Go working directory. |
| 3189 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3190 | :term:`GROUPADD_PARAM` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3191 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3192 | this variable specifies for a package what parameters should be |
| 3193 | passed to the ``groupadd`` command if you wish to add a group to the |
| 3194 | system when the package is installed. |
| 3195 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3196 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3197 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3198 | GROUPADD_PARAM:${PN} = "-r netdev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3199 | |
| 3200 | For information on the standard Linux shell command |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3201 | ``groupadd``, see https://linux.die.net/man/8/groupadd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3202 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3203 | :term:`GROUPMEMS_PARAM` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3204 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3205 | this variable specifies for a package what parameters should be |
| 3206 | passed to the ``groupmems`` command if you wish to modify the members |
| 3207 | of a group when the package is installed. |
| 3208 | |
| 3209 | For information on the standard Linux shell command ``groupmems``, |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3210 | see https://linux.die.net/man/8/groupmems. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3211 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3212 | :term:`GRUB_GFXSERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3213 | Configures the GNU GRand Unified Bootloader (GRUB) to have graphics |
| 3214 | and serial in the boot menu. Set this variable to "1" in your |
| 3215 | ``local.conf`` or distribution configuration file to enable graphics |
| 3216 | and serial in the menu. |
| 3217 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3218 | See the :ref:`ref-classes-grub-efi` class for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3219 | information on how this variable is used. |
| 3220 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3221 | :term:`GRUB_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3222 | Additional options to add to the GNU GRand Unified Bootloader (GRUB) |
| 3223 | configuration. Use a semi-colon character (``;``) to separate |
| 3224 | multiple options. |
| 3225 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3226 | The :term:`GRUB_OPTS` variable is optional. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3227 | :ref:`ref-classes-grub-efi` class for more information |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3228 | on how this variable is used. |
| 3229 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3230 | :term:`GRUB_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3231 | Specifies the timeout before executing the default ``LABEL`` in the |
| 3232 | GNU GRand Unified Bootloader (GRUB). |
| 3233 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3234 | The :term:`GRUB_TIMEOUT` variable is optional. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3235 | :ref:`ref-classes-grub-efi` class for more information |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3236 | on how this variable is used. |
| 3237 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3238 | :term:`GTKIMMODULES_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3239 | When inheriting the :ref:`ref-classes-gtk-immodules-cache` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3240 | this variable specifies the packages that contain the GTK+ input |
| 3241 | method modules being installed when the modules are in packages other |
| 3242 | than the main package. |
| 3243 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3244 | :term:`HGDIR` |
| 3245 | See :term:`bitbake:HGDIR` in the BitBake manual. |
| 3246 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3247 | :term:`HOMEPAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3248 | Website where more information about the software the recipe is |
| 3249 | building can be found. |
| 3250 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3251 | :term:`HOST_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3252 | The name of the target architecture, which is normally the same as |
| 3253 | :term:`TARGET_ARCH`. The OpenEmbedded build system |
| 3254 | supports many architectures. Here is an example list of architectures |
| 3255 | supported. This list is by no means complete as the architecture is |
| 3256 | configurable: |
| 3257 | |
| 3258 | - arm |
| 3259 | - i586 |
| 3260 | - x86_64 |
| 3261 | - powerpc |
| 3262 | - powerpc64 |
| 3263 | - mips |
| 3264 | - mipsel |
| 3265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3266 | :term:`HOST_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3267 | Specifies architecture-specific compiler flags that are passed to the |
| 3268 | C compiler. |
| 3269 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3270 | Default initialization for :term:`HOST_CC_ARCH` varies depending on what |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3271 | is being built: |
| 3272 | |
| 3273 | - :term:`TARGET_CC_ARCH` when building for the |
| 3274 | target |
| 3275 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3276 | - :term:`BUILD_CC_ARCH` when building for the build host (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3277 | ``-native``) |
| 3278 | |
| 3279 | - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. |
| 3280 | ``nativesdk-``) |
| 3281 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3282 | :term:`HOST_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3283 | Specifies the name of the target operating system, which is normally |
| 3284 | the same as the :term:`TARGET_OS`. The variable can |
| 3285 | be set to "linux" for ``glibc``-based systems and to "linux-musl" for |
| 3286 | ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and |
| 3287 | "linux-musleabi" values possible. |
| 3288 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3289 | :term:`HOST_PREFIX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3290 | Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3291 | is normally the same as :term:`TARGET_PREFIX`. |
| 3292 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3293 | :term:`HOST_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3294 | Specifies the system, including the architecture and the operating |
| 3295 | system, for which the build is occurring in the context of the |
| 3296 | current recipe. |
| 3297 | |
| 3298 | The OpenEmbedded build system automatically sets this variable based |
| 3299 | on :term:`HOST_ARCH`, |
| 3300 | :term:`HOST_VENDOR`, and |
| 3301 | :term:`HOST_OS` variables. |
| 3302 | |
| 3303 | .. note:: |
| 3304 | |
| 3305 | You do not need to set the variable yourself. |
| 3306 | |
| 3307 | Consider these two examples: |
| 3308 | |
| 3309 | - Given a native recipe on a 32-bit x86 machine running Linux, the |
| 3310 | value is "i686-linux". |
| 3311 | |
| 3312 | - Given a recipe being built for a little-endian MIPS target running |
| 3313 | Linux, the value might be "mipsel-linux". |
| 3314 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3315 | :term:`HOST_VENDOR` |
| 3316 | Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the |
| 3317 | same as :term:`TARGET_VENDOR`. |
| 3318 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3319 | :term:`HOSTTOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3320 | A space-separated list (filter) of tools on the build host that |
| 3321 | should be allowed to be called from within build tasks. Using this |
| 3322 | filter helps reduce the possibility of host contamination. If a tool |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3323 | 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] | 3324 | host, the OpenEmbedded build system produces an error and the build |
| 3325 | is not started. |
| 3326 | |
| 3327 | For additional information, see |
| 3328 | :term:`HOSTTOOLS_NONFATAL`. |
| 3329 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3330 | :term:`HOSTTOOLS_NONFATAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3331 | A space-separated list (filter) of tools on the build host that |
| 3332 | should be allowed to be called from within build tasks. Using this |
| 3333 | filter helps reduce the possibility of host contamination. Unlike |
| 3334 | :term:`HOSTTOOLS`, the OpenEmbedded build system |
| 3335 | 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] | 3336 | :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can |
| 3337 | use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3338 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3339 | :term:`ICECC_CLASS_DISABLE` |
| 3340 | Identifies user classes that you do not want the Icecream distributed |
| 3341 | compile support to consider. This variable is used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3342 | :ref:`ref-classes-icecc` class. You set this variable in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3343 | your ``local.conf`` file. |
| 3344 | |
| 3345 | When you list classes using this variable, the recipes inheriting |
| 3346 | those classes will not benefit from distributed compilation across |
| 3347 | remote hosts. Instead they will be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3348 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3349 | :term:`ICECC_DISABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3350 | Disables or enables the ``icecc`` (Icecream) function. For more |
| 3351 | information on this function and best practices for using this |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3352 | variable, see the ":ref:`ref-classes-icecc`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3353 | section. |
| 3354 | |
| 3355 | Setting this variable to "1" in your ``local.conf`` disables the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3356 | function:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3357 | |
| 3358 | ICECC_DISABLED ??= "1" |
| 3359 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3360 | To enable the function, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3361 | |
| 3362 | ICECC_DISABLED = "" |
| 3363 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3364 | :term:`ICECC_ENV_EXEC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3365 | Points to the ``icecc-create-env`` script that you provide. This |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3366 | variable is used by the :ref:`ref-classes-icecc` class. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3367 | set this variable in your ``local.conf`` file. |
| 3368 | |
| 3369 | If you do not point to a script that you provide, the OpenEmbedded |
| 3370 | build system uses the default script provided by the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 3371 | :oe_git:`icecc-create-env_0.1.bb |
| 3372 | </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>` |
| 3373 | recipe, which is a modified version and not the one that comes with |
| 3374 | ``icecream``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3375 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3376 | :term:`ICECC_PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3377 | Extra options passed to the ``make`` command during the |
| 3378 | :ref:`ref-tasks-compile` task that specify parallel |
| 3379 | compilation. This variable usually takes the form of "-j x", where x |
| 3380 | represents the maximum number of parallel threads ``make`` can run. |
| 3381 | |
| 3382 | .. note:: |
| 3383 | |
| 3384 | The options passed affect builds on all enabled machines on the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3385 | network, which are machines running the ``iceccd`` daemon. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3386 | |
| 3387 | If your enabled machines support multiple cores, coming up with the |
| 3388 | maximum number of parallel threads that gives you the best |
| 3389 | performance could take some experimentation since machine speed, |
| 3390 | network lag, available memory, and existing machine loads can all |
| 3391 | affect build time. Consequently, unlike the |
| 3392 | :term:`PARALLEL_MAKE` variable, there is no |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3393 | rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3394 | performance. |
| 3395 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3396 | 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] | 3397 | 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] | 3398 | cores as is done with :term:`PARALLEL_MAKE`). |
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:`ICECC_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3401 | The location of the ``icecc`` binary. You can set this variable in |
| 3402 | your ``local.conf`` file. If your ``local.conf`` file does not define |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3403 | this variable, the :ref:`ref-classes-icecc` class attempts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3404 | to define it by locating ``icecc`` using ``which``. |
| 3405 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3406 | :term:`ICECC_RECIPE_DISABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3407 | Identifies user recipes that you do not want the Icecream distributed |
| 3408 | compile support to consider. This variable is used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3409 | :ref:`ref-classes-icecc` class. You set this variable in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3410 | your ``local.conf`` file. |
| 3411 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3412 | When you list recipes using this variable, you are excluding them |
| 3413 | from distributed compilation across remote hosts. Instead they will |
| 3414 | be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3415 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3416 | :term:`ICECC_RECIPE_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3417 | Identifies user recipes that use an empty |
| 3418 | :term:`PARALLEL_MAKE` variable that you want to |
| 3419 | force remote distributed compilation on using the Icecream |
| 3420 | distributed compile support. This variable is used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3421 | :ref:`ref-classes-icecc` class. You set this variable in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3422 | your ``local.conf`` file. |
| 3423 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3424 | :term:`IMAGE_BASENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3425 | The base name of image output files. This variable defaults to the |
| 3426 | recipe name (``${``\ :term:`PN`\ ``}``). |
| 3427 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3428 | :term:`IMAGE_BOOT_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3429 | A space-separated list of files installed into the boot partition |
| 3430 | when preparing an image using the Wic tool with the |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3431 | ``bootimg-partition`` source plugin. By default, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3432 | the files are |
| 3433 | installed under the same name as the source files. To change the |
| 3434 | installed name, separate it from the original name with a semi-colon |
| 3435 | (;). Source files need to be located in |
| 3436 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3437 | examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3438 | |
| 3439 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" |
| 3440 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" |
| 3441 | |
| 3442 | Alternatively, source files can be picked up using a glob pattern. In |
| 3443 | this case, the destination file must have the same name as the base |
| 3444 | name of the source file path. To install files into a directory |
| 3445 | within the target location, pass its name after a semi-colon (;). |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3446 | Here are two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3447 | |
| 3448 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" |
| 3449 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" |
| 3450 | |
| 3451 | The first example |
| 3452 | installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` |
| 3453 | into the root of the target partition. The second example installs |
| 3454 | the same files into a ``boot`` directory within the target partition. |
| 3455 | |
| 3456 | 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] | 3457 | ":ref:`dev-manual/wic:creating partitioned images using wic`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3458 | section of the Yocto Project Development Tasks Manual. Reference |
| 3459 | material for Wic is located in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3460 | ":doc:`/ref-manual/kickstart`" chapter. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3461 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3462 | :term:`IMAGE_BUILDINFO_FILE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3463 | When using the :ref:`ref-classes-image-buildinfo` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3464 | specifies the file in the image to write the build information into. The |
| 3465 | default value is "``${sysconfdir}/buildinfo``". |
| 3466 | |
| 3467 | :term:`IMAGE_BUILDINFO_VARS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3468 | When using the :ref:`ref-classes-image-buildinfo` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3469 | specifies the list of variables to include in the `Build Configuration` |
| 3470 | section of the output file (as a space-separated list). Defaults to |
| 3471 | ":term:`DISTRO` :term:`DISTRO_VERSION`". |
| 3472 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3473 | :term:`IMAGE_CLASSES` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3474 | A list of classes that all images should inherit. This is typically used |
| 3475 | to enable functionality across all image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3476 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3477 | Classes specified in :term:`IMAGE_CLASSES` must be located in the |
| 3478 | ``classes-recipe/`` or ``classes/`` subdirectories. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3479 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3480 | :term:`IMAGE_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3481 | Specifies the command to create the image file for a specific image |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3482 | type, which corresponds to the value set in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3483 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, |
| 3484 | ``btrfs``, and so forth). When setting this variable, you should use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3485 | an override for the associated type. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3486 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3487 | IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3488 | --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3489 | ${EXTRA_IMAGECMD}" |
| 3490 | |
| 3491 | You typically do not need to set this variable unless you are adding |
| 3492 | 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] | 3493 | variable, see the :ref:`ref-classes-image_types` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3494 | class file, which is ``meta/classes-recipe/image_types.bbclass``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3495 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3496 | :term:`IMAGE_DEVICE_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3497 | Specifies one or more files that contain custom device tables that |
| 3498 | are passed to the ``makedevs`` command as part of creating an image. |
| 3499 | These files list basic device nodes that should be created under |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3500 | ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3501 | ``files/device_table-minimal.txt`` is used, which is located by |
| 3502 | :term:`BBPATH`. For details on how you should write |
| 3503 | device table files, see ``meta/files/device_table-minimal.txt`` as an |
| 3504 | example. |
| 3505 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3506 | :term:`IMAGE_EFI_BOOT_FILES` |
| 3507 | A space-separated list of files installed into the boot partition |
| 3508 | when preparing an image using the Wic tool with the |
| 3509 | ``bootimg-efi`` source plugin. By default, |
| 3510 | the files are |
| 3511 | installed under the same name as the source files. To change the |
| 3512 | installed name, separate it from the original name with a semi-colon |
| 3513 | (;). Source files need to be located in |
| 3514 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
| 3515 | examples:: |
| 3516 | |
| 3517 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" |
| 3518 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" |
| 3519 | |
| 3520 | Alternatively, source files can be picked up using a glob pattern. In |
| 3521 | this case, the destination file must have the same name as the base |
| 3522 | name of the source file path. To install files into a directory |
| 3523 | within the target location, pass its name after a semi-colon (;). |
| 3524 | Here are two examples:: |
| 3525 | |
| 3526 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" |
| 3527 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" |
| 3528 | |
| 3529 | The first example |
| 3530 | installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` |
| 3531 | into the root of the target partition. The second example installs |
| 3532 | the same files into a ``boot`` directory within the target partition. |
| 3533 | |
| 3534 | 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] | 3535 | ":ref:`dev-manual/wic:creating partitioned images using wic`" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3536 | section of the Yocto Project Development Tasks Manual. Reference |
| 3537 | material for Wic is located in the |
| 3538 | ":doc:`/ref-manual/kickstart`" chapter. |
| 3539 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3540 | :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3541 | The primary list of features to include in an image. Typically, you |
| 3542 | configure this variable in an image recipe. Although you can use this |
| 3543 | variable from your ``local.conf`` file, which is found in the |
| 3544 | :term:`Build Directory`, best practices dictate that you do |
| 3545 | not. |
| 3546 | |
| 3547 | .. note:: |
| 3548 | |
| 3549 | To enable extra features from outside the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3550 | :term:`EXTRA_IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3551 | |
| 3552 | 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] | 3553 | the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3554 | |
| 3555 | 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] | 3556 | 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] | 3557 | section in the Yocto Project Development Tasks Manual. |
| 3558 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3559 | :term:`IMAGE_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3560 | Specifies the formats the OpenEmbedded build system uses during the |
| 3561 | build when creating the root filesystem. For example, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3562 | :term:`IMAGE_FSTYPES` as follows causes the build system to create root |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3563 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3564 | |
| 3565 | IMAGE_FSTYPES = "ext3 tar.bz2" |
| 3566 | |
| 3567 | For the complete list of supported image formats from which you can |
| 3568 | choose, see :term:`IMAGE_TYPES`. |
| 3569 | |
| 3570 | .. note:: |
| 3571 | |
| 3572 | - If an image recipe uses the "inherit image" line and you are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3573 | setting :term:`IMAGE_FSTYPES` inside the recipe, you must set |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3574 | :term:`IMAGE_FSTYPES` prior to using the "inherit image" line. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3575 | |
| 3576 | - Due to the way the OpenEmbedded build system processes this |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3577 | variable, you cannot update its contents by using ``:append`` |
| 3578 | or ``:prepend``. You must use the ``+=`` operator to add one or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3579 | more options to the :term:`IMAGE_FSTYPES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3580 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3581 | :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3582 | Used by recipes to specify the packages to install into an image |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3583 | through the :ref:`ref-classes-image` class. Use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3584 | :term:`IMAGE_INSTALL` variable with care to avoid ordering issues. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3585 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3586 | Image recipes set :term:`IMAGE_INSTALL` to specify the packages to |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3587 | install into an image through :ref:`ref-classes-image`. Additionally, |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3588 | there are "helper" classes such as the :ref:`ref-classes-core-image` |
| 3589 | class which can take lists used with :term:`IMAGE_FEATURES` and turn |
| 3590 | them into auto-generated entries in :term:`IMAGE_INSTALL` in addition |
| 3591 | to its default contents. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3592 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3593 | 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] | 3594 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3595 | IMAGE_INSTALL:append = " package-name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3596 | |
| 3597 | Be sure to include the space |
| 3598 | between the quotation character and the start of the package name or |
| 3599 | names. |
| 3600 | |
| 3601 | .. note:: |
| 3602 | |
| 3603 | - When working with a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3604 | :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3605 | image, do not use the :term:`IMAGE_INSTALL` variable to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3606 | packages for installation. Instead, use the |
| 3607 | :term:`PACKAGE_INSTALL` variable, which |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3608 | allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3609 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3610 | For information on creating an :term:`Initramfs`, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3611 | ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3612 | section in the Yocto Project Development Tasks Manual. |
| 3613 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3614 | - Using :term:`IMAGE_INSTALL` with the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3615 | :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] | 3616 | BitBake operator within the ``/conf/local.conf`` file or from |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3617 | within an image recipe is not recommended. Use of this operator in |
| 3618 | these ways can cause ordering issues. Since |
| 3619 | :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a |
| 3620 | default value using the |
| 3621 | :ref:`?= <bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3622 | operator, using a ``+=`` operation against :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3623 | results in unexpected behavior when used within |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3624 | ``conf/local.conf``. Furthermore, the same operation from within an |
| 3625 | image recipe may or may not succeed depending on the specific |
| 3626 | situation. In both these cases, the behavior is contrary to how |
| 3627 | most users expect the ``+=`` operator to work. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3628 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3629 | :term:`IMAGE_LINGUAS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3630 | Specifies the list of locales to install into the image during the |
| 3631 | root filesystem construction process. The OpenEmbedded build system |
| 3632 | automatically splits locale files, which are used for localization, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3633 | into separate packages. Setting the :term:`IMAGE_LINGUAS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3634 | ensures that any locale packages that correspond to packages already |
| 3635 | selected for installation into the image are also installed. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3636 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3637 | |
| 3638 | IMAGE_LINGUAS = "pt-br de-de" |
| 3639 | |
| 3640 | In this example, the build system ensures any Brazilian Portuguese |
| 3641 | and German locale files that correspond to packages in the image are |
| 3642 | installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as |
| 3643 | ``*-locale-pt`` and ``*-locale-de``, since some software packages |
| 3644 | only provide locale files by language and not by country-specific |
| 3645 | language). |
| 3646 | |
| 3647 | See the :term:`GLIBC_GENERATE_LOCALES` |
| 3648 | variable for information on generating GLIBC locales. |
| 3649 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3650 | |
| 3651 | :term:`IMAGE_LINK_NAME` |
| 3652 | The name of the output image symlink (which does not include |
| 3653 | the version part as :term:`IMAGE_NAME` does). The default value |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3654 | is derived using the :term:`IMAGE_BASENAME` and |
| 3655 | :term:`IMAGE_MACHINE_SUFFIX` variables:: |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3656 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3657 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3658 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3659 | .. note:: |
| 3660 | |
| 3661 | It is possible to set this to "" to disable symlink creation, |
| 3662 | however, you also need to set :term:`IMAGE_NAME` to still have |
| 3663 | a reasonable value e.g.:: |
| 3664 | |
| 3665 | IMAGE_LINK_NAME = "" |
| 3666 | IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" |
| 3667 | |
| 3668 | :term:`IMAGE_MACHINE_SUFFIX` |
| 3669 | Specifies the by default machine-specific suffix for image file names |
| 3670 | (before the extension). The default value is set as follows:: |
| 3671 | |
| 3672 | IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}" |
| 3673 | |
| 3674 | The default :term:`DEPLOY_DIR_IMAGE` already has a :term:`MACHINE` |
| 3675 | subdirectory, so you may find it unnecessary to also include this suffix |
| 3676 | in the name of every image file. If you prefer to remove the suffix you |
| 3677 | can set this variable to an empty string:: |
| 3678 | |
| 3679 | IMAGE_MACHINE_SUFFIX = "" |
| 3680 | |
| 3681 | (Not to be confused with :term:`IMAGE_NAME_SUFFIX`.) |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3682 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3683 | :term:`IMAGE_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3684 | The manifest file for the image. This file lists all the installed |
| 3685 | packages that make up the image. The file contains package |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3686 | information on a line-per-package basis as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3687 | |
| 3688 | packagename packagearch version |
| 3689 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3690 | The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3691 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3692 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3693 | IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3694 | |
| 3695 | The location is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3696 | derived using the :term:`IMGDEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3697 | and :term:`IMAGE_NAME` variables. You can find |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3698 | 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] | 3699 | section in the Yocto Project Overview and Concepts Manual. |
| 3700 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3701 | :term:`IMAGE_NAME` |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3702 | The name of the output image files minus the extension. By default |
| 3703 | this variable is set using the :term:`IMAGE_LINK_NAME`, and |
| 3704 | :term:`IMAGE_VERSION_SUFFIX` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3705 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3706 | IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3707 | |
| 3708 | :term:`IMAGE_NAME_SUFFIX` |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3709 | Suffix used for the image output filename --- defaults to ``".rootfs"`` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3710 | to distinguish the image file from other files created during image |
| 3711 | building; however if this suffix is redundant or not desired you can |
| 3712 | clear the value of this variable (set the value to ""). For example, |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3713 | this is typically cleared in :term:`Initramfs` image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3714 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3715 | :term:`IMAGE_OVERHEAD_FACTOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3716 | Defines a multiplier that the build system applies to the initial |
| 3717 | image size for cases when the multiplier times the returned disk |
| 3718 | usage value for the image is greater than the sum of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3719 | :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] | 3720 | the multiplier applied to the initial image size creates free disk |
| 3721 | space in the image as overhead. By default, the build process uses a |
| 3722 | multiplier of 1.3 for this variable. This default value results in |
| 3723 | 30% free disk space added to the image when this method is used to |
| 3724 | determine the final generated image size. You should be aware that |
| 3725 | post install scripts and the package management system uses disk |
| 3726 | space inside this overhead area. Consequently, the multiplier does |
| 3727 | not produce an image with all the theoretical free disk space. See |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3728 | :term:`IMAGE_ROOTFS_SIZE` for information on how the build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3729 | determines the overall image size. |
| 3730 | |
| 3731 | The default 30% free disk space typically gives the image enough room |
| 3732 | to boot and allows for basic post installs while still leaving a |
| 3733 | small amount of free disk space. If 30% free space is inadequate, you |
| 3734 | can increase the default value. For example, the following setting |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3735 | gives you 50% free space added to the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3736 | |
| 3737 | IMAGE_OVERHEAD_FACTOR = "1.5" |
| 3738 | |
| 3739 | Alternatively, you can ensure a specific amount of free disk space is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3740 | added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3741 | variable. |
| 3742 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3743 | :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3744 | Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the |
| 3745 | OpenEmbedded build system. The variable is defined appropriately by |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3746 | the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`, |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 3747 | or :ref:`ref-classes-package_ipk` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3748 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3749 | The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image` |
| 3750 | classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3751 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3752 | You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3753 | variable is set indirectly through the appropriate |
| 3754 | :ref:`package_* <ref-classes-package>` class using the |
| 3755 | :term:`PACKAGE_CLASSES` variable. The |
| 3756 | OpenEmbedded build system uses the first package type (e.g. DEB, RPM, |
| 3757 | or IPK) that appears with the variable |
| 3758 | |
| 3759 | .. note:: |
| 3760 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3761 | Files using the ``.tar`` format are never used as a substitute |
| 3762 | packaging format for DEB, RPM, and IPK formatted files for your image |
| 3763 | or SDK. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3764 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3765 | :term:`IMAGE_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3766 | Specifies a list of functions to call once the OpenEmbedded build |
| 3767 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3768 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3769 | |
| 3770 | IMAGE_POSTPROCESS_COMMAND += "function; ... " |
| 3771 | |
| 3772 | If you need to pass the root filesystem path to a command within the |
| 3773 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3774 | directory that becomes the root filesystem image. See the |
| 3775 | :term:`IMAGE_ROOTFS` variable for more |
| 3776 | information. |
| 3777 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3778 | :term:`IMAGE_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3779 | Specifies a list of functions to call before the OpenEmbedded build |
| 3780 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3781 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3782 | |
| 3783 | IMAGE_PREPROCESS_COMMAND += "function; ... " |
| 3784 | |
| 3785 | If you need to pass the root filesystem path to a command within the |
| 3786 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3787 | directory that becomes the root filesystem image. See the |
| 3788 | :term:`IMAGE_ROOTFS` variable for more |
| 3789 | information. |
| 3790 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3791 | :term:`IMAGE_ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3792 | The location of the root filesystem while it is under construction |
| 3793 | (i.e. during the :ref:`ref-tasks-rootfs` task). This |
| 3794 | variable is not configurable. Do not change it. |
| 3795 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3796 | :term:`IMAGE_ROOTFS_ALIGNMENT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3797 | Specifies the alignment for the output image file in Kbytes. If the |
| 3798 | size of the image is not a multiple of this value, then the size is |
| 3799 | rounded up to the nearest multiple of the value. The default value is |
| 3800 | "1". See :term:`IMAGE_ROOTFS_SIZE` for |
| 3801 | additional information. |
| 3802 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3803 | :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3804 | Defines additional free disk space created in the image in Kbytes. By |
| 3805 | default, this variable is set to "0". This free disk space is added |
| 3806 | to the image after the build system determines the image size as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3807 | described in :term:`IMAGE_ROOTFS_SIZE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3808 | |
| 3809 | This variable is particularly useful when you want to ensure that a |
| 3810 | specific amount of free disk space is available on a device after an |
| 3811 | 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] | 3812 | free disk space is available, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3813 | |
| 3814 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" |
| 3815 | |
| 3816 | For example, the Yocto Project Build Appliance specifically requests |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3817 | 40 Gbytes of extra space with the line:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3818 | |
| 3819 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" |
| 3820 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3821 | :term:`IMAGE_ROOTFS_SIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3822 | Defines the size in Kbytes for the generated image. The OpenEmbedded |
| 3823 | build system determines the final size for the generated image using |
| 3824 | an algorithm that takes into account the initial disk space used for |
| 3825 | the generated image, a requested size for the image, and requested |
| 3826 | additional free disk space to be added to the image. Programatically, |
| 3827 | the build system determines the final size of the generated image as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3828 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3829 | |
| 3830 | if (image-du * overhead) < rootfs-size: |
| 3831 | internal-rootfs-size = rootfs-size + xspace |
| 3832 | else: |
| 3833 | internal-rootfs-size = (image-du * overhead) + xspace |
| 3834 | where: |
| 3835 | image-du = Returned value of the du command on the image. |
| 3836 | overhead = IMAGE_OVERHEAD_FACTOR |
| 3837 | rootfs-size = IMAGE_ROOTFS_SIZE |
| 3838 | internal-rootfs-size = Initial root filesystem size before any modifications. |
| 3839 | xspace = IMAGE_ROOTFS_EXTRA_SPACE |
| 3840 | |
| 3841 | See the :term:`IMAGE_OVERHEAD_FACTOR` |
| 3842 | and :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
| 3843 | variables for related information. |
| 3844 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3845 | :term:`IMAGE_TYPEDEP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3846 | Specifies a dependency from one image type on another. Here is an |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3847 | example from the :ref:`ref-classes-image-live` class:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3848 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3849 | IMAGE_TYPEDEP:live = "ext3" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3850 | |
| 3851 | In the previous example, the variable ensures that when "live" is |
| 3852 | listed with the :term:`IMAGE_FSTYPES` variable, |
| 3853 | the OpenEmbedded build system produces an ``ext3`` image first since |
| 3854 | one of the components of the live image is an ``ext3`` formatted |
| 3855 | partition containing the root filesystem. |
| 3856 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3857 | :term:`IMAGE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3858 | Specifies the complete list of supported image types by default: |
| 3859 | |
| 3860 | - btrfs |
| 3861 | - container |
| 3862 | - cpio |
| 3863 | - cpio.gz |
| 3864 | - cpio.lz4 |
| 3865 | - cpio.lzma |
| 3866 | - cpio.xz |
| 3867 | - cramfs |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3868 | - erofs |
| 3869 | - erofs-lz4 |
| 3870 | - erofs-lz4hc |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3871 | - ext2 |
| 3872 | - ext2.bz2 |
| 3873 | - ext2.gz |
| 3874 | - ext2.lzma |
| 3875 | - ext3 |
| 3876 | - ext3.gz |
| 3877 | - ext4 |
| 3878 | - ext4.gz |
| 3879 | - f2fs |
| 3880 | - hddimg |
| 3881 | - iso |
| 3882 | - jffs2 |
| 3883 | - jffs2.sum |
| 3884 | - multiubi |
| 3885 | - squashfs |
| 3886 | - squashfs-lz4 |
| 3887 | - squashfs-lzo |
| 3888 | - squashfs-xz |
| 3889 | - tar |
| 3890 | - tar.bz2 |
| 3891 | - tar.gz |
| 3892 | - tar.lz4 |
| 3893 | - tar.xz |
| 3894 | - tar.zst |
| 3895 | - ubi |
| 3896 | - ubifs |
| 3897 | - wic |
| 3898 | - wic.bz2 |
| 3899 | - wic.gz |
| 3900 | - wic.lzma |
| 3901 | |
| 3902 | For more information about these types of images, see |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3903 | ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3904 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3905 | :term:`IMAGE_VERSION_SUFFIX` |
| 3906 | Version suffix that is part of the default :term:`IMAGE_NAME` and |
| 3907 | :term:`KERNEL_ARTIFACT_NAME` values. |
| 3908 | Defaults to ``"-${DATETIME}"``, however you could set this to a |
| 3909 | version string that comes from your external build environment if |
| 3910 | desired, and this suffix would then be used consistently across |
| 3911 | the build artifacts. |
| 3912 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3913 | :term:`IMGDEPLOYDIR` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3914 | When inheriting the :ref:`ref-classes-image` class directly or |
| 3915 | through the :ref:`ref-classes-core-image` class, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3916 | :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3917 | that is set in the ``image`` class as follows:: |
| 3918 | |
| 3919 | IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" |
| 3920 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3921 | Recipes inheriting the :ref:`ref-classes-image` class should copy |
| 3922 | files to be deployed into :term:`IMGDEPLOYDIR`, and the class will take |
| 3923 | care of copying them into :term:`DEPLOY_DIR_IMAGE` afterwards. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3924 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3925 | :term:`INCOMPATIBLE_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3926 | Specifies a space-separated list of license names (as they would |
| 3927 | appear in :term:`LICENSE`) that should be excluded |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 3928 | from the build (if set globally), or from an image (if set locally |
| 3929 | in an image recipe). |
| 3930 | |
| 3931 | When the variable is set globally, recipes that provide no alternatives to listed |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3932 | incompatible licenses are not built. Packages that are individually |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 3933 | licensed with the specified incompatible licenses will be deleted. |
| 3934 | Most of the time this does not allow a feasible build (because it becomes impossible |
| 3935 | to satisfy build time dependencies), so the recommended way to |
| 3936 | implement license restrictions is to set the variable in specific |
| 3937 | image recipes where the restrictions must apply. That way there |
| 3938 | are no build time restrictions, but the license check is still |
| 3939 | performed when the image's filesystem is assembled from packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3940 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 3941 | There is some support for wildcards in this variable's value, |
| 3942 | however it is restricted to specific licenses. Currently only |
| 3943 | these wildcards are allowed and expand as follows: |
| 3944 | |
| 3945 | - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later`` |
| 3946 | - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later`` |
| 3947 | - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later`` |
| 3948 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3949 | .. note:: |
| 3950 | |
| 3951 | This functionality is only regularly tested using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3952 | setting:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3953 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3954 | INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3955 | |
| 3956 | |
| 3957 | Although you can use other settings, you might be required to |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3958 | remove dependencies on (or provide alternatives to) components that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3959 | are required to produce a functional system image. |
| 3960 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3961 | :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS` |
| 3962 | Specifies a space-separated list of package and license pairs that |
| 3963 | are allowed to be used even if the license is specified in |
| 3964 | :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are |
| 3965 | separated using a colon. Example:: |
| 3966 | |
| 3967 | INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only" |
| 3968 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3969 | :term:`INHERIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3970 | Causes the named class or classes to be inherited globally. Anonymous |
| 3971 | functions in the class or classes are not executed for the base |
| 3972 | configuration and in each individual recipe. The OpenEmbedded build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3973 | system ignores changes to :term:`INHERIT` in individual recipes. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3974 | Classes inherited using :term:`INHERIT` must be located in the |
| 3975 | ``classes-global/`` or ``classes/`` subdirectories. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3976 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3977 | For more information on :term:`INHERIT`, see the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 3978 | :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 3979 | section in the BitBake User Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3980 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3981 | :term:`INHERIT_DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3982 | Lists classes that will be inherited at the distribution level. It is |
| 3983 | unlikely that you want to edit this variable. |
| 3984 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3985 | Classes specified in :term:`INHERIT_DISTRO` must be located in the |
| 3986 | ``classes-global/`` or ``classes/`` subdirectories. |
| 3987 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3988 | The default value of the variable is set as follows in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3989 | ``meta/conf/distro/defaultsetup.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3990 | |
| 3991 | INHERIT_DISTRO ?= "debian devshell sstate license" |
| 3992 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3993 | :term:`INHIBIT_DEFAULT_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3994 | Prevents the default dependencies, namely the C compiler and standard |
| 3995 | C library (libc), from being added to :term:`DEPENDS`. |
| 3996 | This variable is usually used within recipes that do not require any |
| 3997 | compilation using the C compiler. |
| 3998 | |
| 3999 | Set the variable to "1" to prevent the default dependencies from |
| 4000 | being added. |
| 4001 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4002 | :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4003 | Prevents the OpenEmbedded build system from splitting out debug |
| 4004 | information during packaging. By default, the build system splits out |
| 4005 | debugging information during the |
| 4006 | :ref:`ref-tasks-package` task. For more information on |
| 4007 | how debug information is split out, see the |
| 4008 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
| 4009 | variable. |
| 4010 | |
| 4011 | To prevent the build system from splitting out debug information |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4012 | during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4013 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4014 | |
| 4015 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
| 4016 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4017 | :term:`INHIBIT_PACKAGE_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4018 | If set to "1", causes the build to not strip binaries in resulting |
| 4019 | packages and prevents the ``-dbg`` package from containing the source |
| 4020 | files. |
| 4021 | |
| 4022 | By default, the OpenEmbedded build system strips binaries and puts |
| 4023 | the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4024 | Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4025 | plan to debug in general. |
| 4026 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4027 | :term:`INHIBIT_SYSROOT_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4028 | If set to "1", causes the build to not strip binaries in the |
| 4029 | resulting sysroot. |
| 4030 | |
| 4031 | By default, the OpenEmbedded build system strips binaries in the |
| 4032 | resulting sysroot. When you specifically set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4033 | :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4034 | this stripping. |
| 4035 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4036 | If you want to use this variable, include the :ref:`ref-classes-staging` |
| 4037 | class. This class uses a ``sys_strip()`` function to test for the variable |
| 4038 | and acts accordingly. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4039 | |
| 4040 | .. note:: |
| 4041 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4042 | Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4043 | special circumstances. For example, suppose you are building |
| 4044 | bare-metal firmware by using an external GCC toolchain. Furthermore, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4045 | even if the toolchain's binaries are strippable, there are other files |
| 4046 | needed for the build that are not strippable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4047 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4048 | :term:`INIT_MANAGER` |
| 4049 | Specifies the system init manager to use. Available options are: |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4050 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4051 | - ``sysvinit`` |
| 4052 | - ``systemd`` |
| 4053 | - ``mdev-busybox`` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4054 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4055 | With ``sysvinit``, the init manager is set to |
| 4056 | :wikipedia:`SysVinit <Init#SysV-style>`, the traditional UNIX init |
| 4057 | system. This is the default choice in the Poky distribution, together with |
| 4058 | the Udev device manager (see the ":ref:`device-manager`" section). |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4059 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4060 | With ``systemd``, the init manager becomes :wikipedia:`systemd <Systemd>`, |
| 4061 | which comes with the :wikipedia:`udev <Udev>` device manager. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4062 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4063 | With ``mdev-busybox``, the init manager becomes the much simpler BusyBox |
| 4064 | init, together with the BusyBox mdev device manager. This is the simplest |
| 4065 | and lightest solution, and probably the best choice for low-end systems |
| 4066 | with a rather slow CPU and a limited amount of RAM. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4067 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4068 | More concretely, this is used to include |
| 4069 | ``conf/distro/include/init-manager-${INIT_MANAGER}.inc`` into the global |
| 4070 | configuration. You can have a look at the |
| 4071 | :yocto_git:`meta/conf/distro/include/init-manager-*.inc </poky/tree/meta/conf/distro/include>` |
| 4072 | files for more information, and also the ":ref:`init-manager`" |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4073 | section in the Yocto Project Development Tasks Manual. |
| 4074 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4075 | :term:`INITRAMFS_DEPLOY_DIR_IMAGE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4076 | Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs` |
| 4077 | where the :term:`INITRAMFS_IMAGE` will be fetched from. This variable is |
| 4078 | set by default to ``${DEPLOY_DIR_IMAGE}`` in the |
| 4079 | :ref:`ref-classes-kernel` class and it's only meant to be changed when |
| 4080 | building an :term:`Initramfs` image from a separate multiconfig via |
| 4081 | :term:`INITRAMFS_MULTICONFIG`. |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4082 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4083 | :term:`INITRAMFS_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4084 | Defines the format for the output image of an initial RAM filesystem |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4085 | (:term:`Initramfs`), which is used during boot. Supported formats are the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4086 | same as those supported by the |
| 4087 | :term:`IMAGE_FSTYPES` variable. |
| 4088 | |
| 4089 | The default value of this variable, which is set in the |
| 4090 | ``meta/conf/bitbake.conf`` configuration file in the |
| 4091 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4092 | :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 4093 | :wikipedia:`initrd <Initrd>` mechanism, expects |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4094 | an optionally compressed cpio archive. |
| 4095 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4096 | :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4097 | Specifies the :term:`PROVIDES` name of an image |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4098 | recipe that is used to build an initial RAM filesystem (:term:`Initramfs`) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4099 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4100 | additional recipe to be built as a dependency to whatever root |
| 4101 | filesystem recipe you might be using (e.g. ``core-image-sato``). The |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4102 | :term:`Initramfs` image recipe you provide should set |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4103 | :term:`IMAGE_FSTYPES` to |
| 4104 | :term:`INITRAMFS_FSTYPES`. |
| 4105 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4106 | An :term:`Initramfs` image provides a temporary root filesystem used for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4107 | early system initialization (e.g. loading of modules needed to locate |
| 4108 | and mount the "real" root filesystem). |
| 4109 | |
| 4110 | .. note:: |
| 4111 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4112 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` |
| 4113 | recipe in the :term:`Source Directory` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4114 | for an example :term:`Initramfs` recipe. To select this sample recipe as |
| 4115 | 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] | 4116 | to "core-image-minimal-initramfs". |
| 4117 | |
| 4118 | You can also find more information by referencing the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4119 | ``meta-poky/conf/templates/default/local.conf.sample.extended`` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4120 | configuration file in the Source Directory, the :ref:`ref-classes-image` |
| 4121 | class, and the :ref:`ref-classes-kernel` class to see how to use the |
| 4122 | :term:`INITRAMFS_IMAGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4123 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4124 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4125 | :term:`Initramfs` image is built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4126 | |
| 4127 | For more information, you can also see the |
| 4128 | :term:`INITRAMFS_IMAGE_BUNDLE` |
| 4129 | variable, which allows the generated image to be bundled inside the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4130 | kernel image. Additionally, for information on creating an :term:`Initramfs` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4131 | 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] | 4132 | in the Yocto Project Development Tasks Manual. |
| 4133 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4134 | :term:`INITRAMFS_IMAGE_BUNDLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4135 | Controls whether or not the image recipe specified by |
| 4136 | :term:`INITRAMFS_IMAGE` is run through an |
| 4137 | extra pass |
| 4138 | (:ref:`ref-tasks-bundle_initramfs`) during |
| 4139 | kernel compilation in order to build a single binary that contains |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4140 | both the kernel image and the initial RAM filesystem (:term:`Initramfs`) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4141 | image. This makes use of the |
| 4142 | :term:`CONFIG_INITRAMFS_SOURCE` kernel |
| 4143 | feature. |
| 4144 | |
| 4145 | .. note:: |
| 4146 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4147 | Bundling the :term:`Initramfs` with the kernel conflates the code in the |
| 4148 | :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 |
| 4149 | compatible software may be part of a bundled :term:`Initramfs`. |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 4150 | |
| 4151 | .. note:: |
| 4152 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4153 | Using an extra compilation pass to bundle the :term:`Initramfs` avoids a |
| 4154 | circular dependency between the kernel recipe and the :term:`Initramfs` |
| 4155 | recipe should the :term:`Initramfs` include kernel modules. Should that be |
| 4156 | the case, the :term:`Initramfs` recipe depends on the kernel for the |
| 4157 | kernel modules, and the kernel depends on the :term:`Initramfs` recipe |
| 4158 | since the :term:`Initramfs` is bundled inside the kernel image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4159 | |
| 4160 | The combined binary is deposited into the ``tmp/deploy`` directory, |
| 4161 | which is part of the :term:`Build Directory`. |
| 4162 | |
| 4163 | Setting the variable to "1" in a configuration file causes the |
| 4164 | OpenEmbedded build system to generate a kernel image with the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4165 | :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4166 | |
| 4167 | INITRAMFS_IMAGE_BUNDLE = "1" |
| 4168 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4169 | 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] | 4170 | null string as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4171 | |
| 4172 | INITRAMFS_IMAGE_BUNDLE ?= "" |
| 4173 | |
| 4174 | .. note:: |
| 4175 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4176 | You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4177 | configuration file. You cannot set the variable in a recipe file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4178 | |
| 4179 | See the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4180 | :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] | 4181 | file for additional information. Also, for information on creating an |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4182 | :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] | 4183 | in the Yocto Project Development Tasks Manual. |
| 4184 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4185 | :term:`INITRAMFS_IMAGE_NAME` |
| 4186 | |
| 4187 | This value needs to stay in sync with :term:`IMAGE_LINK_NAME`, but with |
| 4188 | :term:`INITRAMFS_IMAGE` instead of :term:`IMAGE_BASENAME`. The default value |
| 4189 | is set as follows: |
| 4190 | |
| 4191 | INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}" |
| 4192 | |
| 4193 | That is, if :term:`INITRAMFS_IMAGE` is set, the value of |
| 4194 | :term:`INITRAMFS_IMAGE_NAME` will be set based upon |
| 4195 | :term:`INITRAMFS_IMAGE` and :term:`IMAGE_MACHINE_SUFFIX`. |
| 4196 | |
| 4197 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4198 | :term:`INITRAMFS_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4199 | The link name of the initial RAM filesystem image. This variable is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4200 | set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4201 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4202 | |
| 4203 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" |
| 4204 | |
| 4205 | The value of the |
| 4206 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4207 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4208 | |
| 4209 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4210 | |
| 4211 | See the :term:`MACHINE` variable for additional |
| 4212 | information. |
| 4213 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4214 | :term:`INITRAMFS_MULTICONFIG` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4215 | Defines the multiconfig to create a multiconfig dependency to be used by |
| 4216 | the :ref:`ref-classes-kernel` class. |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4217 | |
| 4218 | This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from |
| 4219 | a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. |
| 4220 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4221 | 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] | 4222 | 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] | 4223 | section in the Yocto Project Development Tasks Manual. |
| 4224 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4225 | :term:`INITRAMFS_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4226 | The base name of the initial RAM filesystem image. This variable is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4227 | set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4228 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4229 | |
| 4230 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" |
| 4231 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4232 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4233 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4234 | :term:`INITRD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4235 | Indicates list of filesystem images to concatenate and use as an |
| 4236 | initial RAM disk (``initrd``). |
| 4237 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4238 | The :term:`INITRD` variable is an optional variable used with the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4239 | :ref:`ref-classes-image-live` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4240 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4241 | :term:`INITRD_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4242 | When building a "live" bootable image (i.e. when |
| 4243 | :term:`IMAGE_FSTYPES` contains "live"), |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4244 | :term:`INITRD_IMAGE` specifies the image recipe that should be built to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4245 | provide the initial RAM disk image. The default value is |
| 4246 | "core-image-minimal-initramfs". |
| 4247 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4248 | See the :ref:`ref-classes-image-live` class for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4249 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4250 | :term:`INITSCRIPT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4251 | The filename of the initialization script as installed to |
| 4252 | ``${sysconfdir}/init.d``. |
| 4253 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4254 | 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] | 4255 | The variable is mandatory. |
| 4256 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4257 | :term:`INITSCRIPT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4258 | A list of the packages that contain initscripts. If multiple packages |
| 4259 | are specified, you need to append the package name to the other |
| 4260 | ``INITSCRIPT_*`` as an override. |
| 4261 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4262 | 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] | 4263 | The variable is optional and defaults to the :term:`PN` |
| 4264 | variable. |
| 4265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4266 | :term:`INITSCRIPT_PARAMS` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4267 | 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] | 4268 | |
| 4269 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." |
| 4270 | |
| 4271 | In this example, the script has a runlevel of 99, starts the script |
| 4272 | in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. |
| 4273 | |
| 4274 | The variable's default value is "defaults", which is set in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4275 | :ref:`ref-classes-update-rc.d` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4276 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4277 | The value in :term:`INITSCRIPT_PARAMS` is passed through to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4278 | ``update-rc.d`` command. For more information on valid parameters, |
| 4279 | please see the ``update-rc.d`` manual page at |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 4280 | 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] | 4281 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4282 | :term:`INSANE_SKIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4283 | Specifies the QA checks to skip for a specific package within a |
| 4284 | recipe. For example, to skip the check for symbolic link ``.so`` |
| 4285 | files in the main package of a recipe, add the following to the |
| 4286 | recipe. The package name override must be used, which in this example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4287 | is ``${PN}``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4288 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4289 | INSANE_SKIP:${PN} += "dev-so" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4290 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4291 | See the ":ref:`ref-classes-insane`" section for a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4292 | list of the valid QA checks you can specify using this variable. |
| 4293 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4294 | :term:`INSTALL_TIMEZONE_FILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4295 | By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4296 | Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4297 | configuration level to disable this behavior. |
| 4298 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4299 | :term:`IPK_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4300 | When the IPK backend is in use and package management is enabled on |
| 4301 | the target, you can use this variable to set up ``opkg`` in the |
| 4302 | target image to point to package feeds on a nominated server. Once |
| 4303 | the feed is established, you can perform installations or upgrades |
| 4304 | using the package manager at runtime. |
| 4305 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4306 | :term:`KARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4307 | Defines the kernel architecture used when assembling the |
| 4308 | configuration. Architectures supported for this release are: |
| 4309 | |
| 4310 | - powerpc |
| 4311 | - i386 |
| 4312 | - x86_64 |
| 4313 | - arm |
| 4314 | - qemu |
| 4315 | - mips |
| 4316 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4317 | 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] | 4318 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4319 | :term:`KBRANCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4320 | A regular expression used by the build process to explicitly identify |
| 4321 | the kernel branch that is validated, patched, and configured during a |
| 4322 | build. You must set this variable to ensure the exact kernel branch |
| 4323 | you want is being used by the build process. |
| 4324 | |
| 4325 | Values for this variable are set in the kernel's recipe file and the |
| 4326 | kernel's append file. For example, if you are using the |
| 4327 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4328 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4329 | is set as follows in that kernel recipe file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4330 | |
| 4331 | KBRANCH ?= "standard/base" |
| 4332 | |
| 4333 | This variable is also used from the kernel's append file to identify |
| 4334 | the kernel branch specific to a particular machine or target |
| 4335 | hardware. Continuing with the previous kernel example, the kernel's |
| 4336 | append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the |
| 4337 | BSP layer for a given machine. For example, the append file for the |
| 4338 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA |
| 4339 | machines (``meta-yocto-bsp``) is named |
| 4340 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4341 | Here are the related statements from that append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4342 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4343 | KBRANCH:genericx86 = "standard/base" |
| 4344 | KBRANCH:genericx86-64 = "standard/base" |
| 4345 | KBRANCH:edgerouter = "standard/edgerouter" |
| 4346 | KBRANCH:beaglebone = "standard/beaglebone" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4347 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4348 | The :term:`KBRANCH` statements |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4349 | identify the kernel branch to use when building for each supported |
| 4350 | BSP. |
| 4351 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4352 | :term:`KBUILD_DEFCONFIG` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4353 | When used with the :ref:`ref-classes-kernel-yocto` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4354 | class, specifies an "in-tree" kernel configuration file for use |
| 4355 | during a kernel build. |
| 4356 | |
| 4357 | Typically, when using a ``defconfig`` to configure a kernel during a |
| 4358 | build, you place the file in your layer in the same manner as you |
| 4359 | would place patch files and configuration fragment files (i.e. |
| 4360 | "out-of-tree"). However, if you want to use a ``defconfig`` file that |
| 4361 | 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] | 4362 | :term:`KBUILD_DEFCONFIG` variable and append the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4363 | :term:`KMACHINE` variable to point to the |
| 4364 | ``defconfig`` file. |
| 4365 | |
| 4366 | 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] | 4367 | using the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4368 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 4369 | KBUILD_DEFCONFIG:<machine> ?= "defconfig_file" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4370 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 4371 | Here is an example from a "raspberrypi2" :term:`MACHINE` build that uses |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4372 | a ``defconfig`` file named "bcm2709_defconfig":: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4373 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4374 | KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4375 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4376 | As an alternative, you can use the following within your append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4377 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4378 | KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4379 | |
| 4380 | For more |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4381 | information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4382 | ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4383 | section in the Yocto Project Linux Kernel Development Manual. |
| 4384 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4385 | :term:`KCONFIG_MODE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4386 | When used with the :ref:`ref-classes-kernel-yocto` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4387 | class, specifies the kernel configuration values to use for options |
| 4388 | not specified in the provided ``defconfig`` file. Valid options are:: |
| 4389 | |
| 4390 | KCONFIG_MODE = "alldefconfig" |
| 4391 | KCONFIG_MODE = "allnoconfig" |
| 4392 | |
| 4393 | In ``alldefconfig`` mode the options not explicitly specified will be |
| 4394 | assigned their Kconfig default value. In ``allnoconfig`` mode the |
| 4395 | options not explicitly specified will be disabled in the kernel |
| 4396 | config. |
| 4397 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4398 | 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] | 4399 | the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file |
| 4400 | will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed |
| 4401 | in ``${WORKDIR}`` through a meta-layer will be handled in |
| 4402 | ``allnoconfig`` mode. |
| 4403 | |
| 4404 | An "in-tree" ``defconfig`` file can be selected via the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4405 | :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] | 4406 | be explicitly set. |
| 4407 | |
| 4408 | A ``defconfig`` file compatible with ``allnoconfig`` mode can be |
| 4409 | generated by copying the ``.config`` file from a working Linux kernel |
| 4410 | build, renaming it to ``defconfig`` and placing it into the Linux |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4411 | kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4412 | not need to be explicitly set. |
| 4413 | |
| 4414 | A ``defconfig`` file compatible with ``alldefconfig`` mode can be |
| 4415 | generated using the |
| 4416 | :ref:`ref-tasks-savedefconfig` |
| 4417 | task and placed into the Linux kernel ``${WORKDIR}`` through your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4418 | meta-layer. Explicitely set :term:`KCONFIG_MODE`:: |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4419 | |
| 4420 | KCONFIG_MODE = "alldefconfig" |
| 4421 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4422 | :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4423 | Specifies an alternate kernel image type for creation in addition to |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4424 | the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and |
| 4425 | :term:`KERNEL_IMAGETYPES` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4426 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4427 | :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4428 | 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] | 4429 | name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4430 | variable. |
| 4431 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4432 | The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4433 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4434 | following default value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4435 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4436 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4437 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4438 | See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`IMAGE_MACHINE_SUFFIX` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 4439 | and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4440 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4441 | :term:`KERNEL_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4442 | A list of classes defining kernel image types that the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4443 | :ref:`ref-classes-kernel` class should inherit. You typically |
| 4444 | append this variable to enable extended image types. An example is |
| 4445 | ":ref:`ref-classes-kernel-fitimage`", which enables |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 4446 | FIT image support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``. |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4447 | You can register custom kernel image types with the |
| 4448 | :ref:`ref-classes-kernel` class using this variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4449 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4450 | :term:`KERNEL_DANGLING_FEATURES_WARN_ONLY` |
| 4451 | When kernel configuration fragments are missing for some |
| 4452 | :term:`KERNEL_FEATURES` specified by layers or BSPs, |
| 4453 | building and configuring the kernel stops with an error. |
| 4454 | |
| 4455 | You can turn these errors into warnings by setting the |
| 4456 | following in ``conf/local.conf``:: |
| 4457 | |
| 4458 | KERNEL_DANGLING_FEATURES_WARN_ONLY = "1" |
| 4459 | |
| 4460 | You will still be warned that runtime issues may occur, |
| 4461 | but at least the kernel configuration and build process will |
| 4462 | be allowed to continue. |
| 4463 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 4464 | :term:`KERNEL_DEBUG_TIMESTAMPS` |
| 4465 | If set to "1", enables timestamping functionality during building |
| 4466 | the kernel. The default is "0" to disable this for reproducibility |
| 4467 | reasons. |
| 4468 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4469 | :term:`KERNEL_DEPLOY_DEPEND` |
| 4470 | Provides a means of controlling the dependency of an image recipe |
| 4471 | on the kernel. The default value is "virtual/kernel:do_deploy", |
| 4472 | however for a small initramfs image or other images that do not |
| 4473 | need the kernel, this can be set to "" in the image recipe. |
| 4474 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4475 | :term:`KERNEL_DEVICETREE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4476 | Specifies the name of the generated Linux kernel device tree (i.e. |
| 4477 | the ``.dtb``) file. |
| 4478 | |
| 4479 | .. note:: |
| 4480 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4481 | There is legacy support for specifying the full path to the device |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4482 | tree. However, providing just the ``.dtb`` file is preferred. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4483 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4484 | In order to use this variable, the :ref:`ref-classes-kernel-devicetree` |
| 4485 | class must be inherited. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4486 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 4487 | :term:`KERNEL_DEVICETREE_BUNDLE` |
| 4488 | When set to "1", this variable allows to bundle the Linux kernel |
| 4489 | and the Device Tree Binary together in a single file. |
| 4490 | |
| 4491 | This feature is currently only supported on the "arm" (32 bit) |
| 4492 | architecture. |
| 4493 | |
| 4494 | This variable is set to "0" by default by the |
| 4495 | :ref:`ref-classes-kernel-devicetree` class. |
| 4496 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4497 | :term:`KERNEL_DTB_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4498 | The link name of the kernel device tree binary (DTB). This variable |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4499 | 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] | 4500 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4501 | |
| 4502 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4503 | |
| 4504 | The |
| 4505 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4506 | the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4507 | |
| 4508 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4509 | |
| 4510 | See the :term:`MACHINE` variable for additional |
| 4511 | information. |
| 4512 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4513 | :term:`KERNEL_DTB_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4514 | The base name of the kernel device tree binary (DTB). This variable |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4515 | 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] | 4516 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4517 | |
| 4518 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4519 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4520 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4521 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 4522 | :term:`KERNEL_DTBDEST` |
| 4523 | This variable, used by the :ref:`ref-classes-kernel-devicetree` |
| 4524 | class, allows to change the installation directory of the DTB |
| 4525 | (Device Tree Binary) files. |
| 4526 | |
| 4527 | It is set by default to "${KERNEL_IMAGEDEST}" by the |
| 4528 | :ref:`ref-classes-kernel` class. |
| 4529 | |
| 4530 | :term:`KERNEL_DTBVENDORED` |
| 4531 | This variable, used by the :ref:`ref-classes-kernel-devicetree`, |
| 4532 | allows to ignore vendor subdirectories when installing DTB |
| 4533 | (Device Tree Binary) files, when it is set to "false". |
| 4534 | |
| 4535 | To keep vendor subdirectories, set this variable to "true". |
| 4536 | |
| 4537 | It is set by default to "false" by the :ref:`ref-classes-kernel` class. |
| 4538 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4539 | :term:`KERNEL_DTC_FLAGS` |
| 4540 | Specifies the ``dtc`` flags that are passed to the Linux kernel build |
| 4541 | system when generating the device trees (via ``DTC_FLAGS`` environment |
| 4542 | variable). |
| 4543 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4544 | In order to use this variable, the :ref:`ref-classes-kernel-devicetree` |
| 4545 | class must be inherited. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4546 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4547 | :term:`KERNEL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4548 | Specifies additional ``make`` command-line arguments the OpenEmbedded |
| 4549 | build system passes on when compiling the kernel. |
| 4550 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4551 | :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4552 | Includes additional kernel metadata. In the OpenEmbedded build |
| 4553 | system, the default Board Support Packages (BSPs) |
| 4554 | :term:`Metadata` is provided through the |
| 4555 | :term:`KMACHINE` and :term:`KBRANCH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4556 | variables. You can use the :term:`KERNEL_FEATURES` variable from within |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4557 | the kernel recipe or kernel append file to further add metadata for |
| 4558 | all BSPs or specific BSPs. |
| 4559 | |
| 4560 | The metadata you add through this variable includes config fragments |
| 4561 | and features descriptions, which usually includes patches as well as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4562 | config fragments. You typically override the :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4563 | variable for a specific machine. In this way, you can provide |
| 4564 | validated, but optional, sets of kernel configurations and features. |
| 4565 | |
| 4566 | For example, the following example from the ``linux-yocto-rt_4.12`` |
| 4567 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs |
| 4568 | as well as "virtio" configurations to all QEMU machines. The last two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4569 | statements add specific configurations to targeted machine types:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4570 | |
| 4571 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4572 | KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" |
| 4573 | KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc" |
| 4574 | KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" |
| 4575 | KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4576 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4577 | :term:`KERNEL_FIT_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4578 | The link name of the kernel flattened image tree (FIT) image. This |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4579 | variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4580 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4581 | |
| 4582 | KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4583 | |
| 4584 | The value of the |
| 4585 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4586 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4587 | |
| 4588 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4589 | |
| 4590 | See the :term:`MACHINE` variable for additional |
| 4591 | information. |
| 4592 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4593 | :term:`KERNEL_FIT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4594 | The base name of the kernel flattened image tree (FIT) image. This |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4595 | variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4596 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4597 | |
| 4598 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4599 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4600 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4601 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4602 | :term:`KERNEL_IMAGE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4603 | 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] | 4604 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4605 | |
| 4606 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4607 | |
| 4608 | The value of |
| 4609 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4610 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4611 | |
| 4612 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4613 | |
| 4614 | See the :term:`MACHINE` variable for additional |
| 4615 | information. |
| 4616 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4617 | :term:`KERNEL_IMAGE_MAXSIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4618 | Specifies the maximum size of the kernel image file in kilobytes. If |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4619 | :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] | 4620 | checked against the set value during the |
| 4621 | :ref:`ref-tasks-sizecheck` task. The task fails if |
| 4622 | the kernel image file is larger than the setting. |
| 4623 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4624 | :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4625 | limited amount of space in which the kernel image must be stored. |
| 4626 | |
| 4627 | By default, this variable is not set, which means the size of the |
| 4628 | kernel image is not checked. |
| 4629 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4630 | :term:`KERNEL_IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4631 | 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] | 4632 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4633 | |
| 4634 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4635 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 4636 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4637 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4638 | :term:`KERNEL_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4639 | The type of kernel to build for a device, usually set by the machine |
| 4640 | configuration files and defaults to "zImage". This variable is used |
| 4641 | when building the kernel and is passed to ``make`` as the target to |
| 4642 | build. |
| 4643 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4644 | To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`. |
| 4645 | |
| 4646 | :term:`KERNEL_IMAGETYPES` |
| 4647 | Lists additional types of kernel images to build for a device in addition |
| 4648 | to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the |
| 4649 | machine configuration files. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4650 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4651 | :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4652 | Lists kernel modules that need to be auto-loaded during boot. |
| 4653 | |
| 4654 | .. note:: |
| 4655 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4656 | This variable replaces the deprecated :term:`module_autoload` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4657 | variable. |
| 4658 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4659 | You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4660 | can be recognized by the kernel recipe or by an out-of-tree kernel |
| 4661 | module recipe (e.g. a machine configuration file, a distribution |
| 4662 | configuration file, an append file for the recipe, or the recipe |
| 4663 | itself). |
| 4664 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4665 | Specify it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4666 | |
| 4667 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" |
| 4668 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4669 | Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4670 | system to populate the ``/etc/modules-load.d/modname.conf`` file with |
| 4671 | the list of modules to be auto-loaded on boot. The modules appear |
| 4672 | 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] | 4673 | case:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4674 | |
| 4675 | KERNEL_MODULE_AUTOLOAD += "module_name" |
| 4676 | |
| 4677 | For information on how to populate the ``modname.conf`` file with |
| 4678 | ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. |
| 4679 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4680 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4681 | Provides a list of modules for which the OpenEmbedded build system |
| 4682 | expects to find ``module_conf_``\ modname values that specify |
| 4683 | configuration for each of the modules. For information on how to |
| 4684 | provide those module configurations, see the |
| 4685 | :term:`module_conf_* <module_conf>` variable. |
| 4686 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 4687 | :term:`KERNEL_PACKAGE_NAME` |
| 4688 | Specifies the base name of the kernel packages, such as "kernel" |
| 4689 | in the kernel packages such as "kernel-modules", "kernel-image" and |
| 4690 | "kernel-dbg". |
| 4691 | |
| 4692 | The default value for this variable is set to "kernel" by the |
| 4693 | :ref:`ref-classes-kernel` class. |
| 4694 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4695 | :term:`KERNEL_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4696 | 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] | 4697 | of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module` |
| 4698 | class. For information on how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4699 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4700 | section in the Yocto Project Linux Kernel Development Manual. |
| 4701 | |
| 4702 | To help maximize compatibility with out-of-tree drivers used to build |
| 4703 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4704 | :term:`KERNEL_SRC` variable, which is identical to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4705 | the :term:`KERNEL_PATH` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4706 | used by external Makefiles to point to the kernel source directory. |
| 4707 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4708 | :term:`KERNEL_SRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4709 | 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] | 4710 | of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module` |
| 4711 | class. For information on how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4712 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4713 | section in the Yocto Project Linux Kernel Development Manual. |
| 4714 | |
| 4715 | To help maximize compatibility with out-of-tree drivers used to build |
| 4716 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4717 | :term:`KERNEL_PATH` variable, which is identical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4718 | to the :term:`KERNEL_SRC` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4719 | used by external Makefiles to point to the kernel source directory. |
| 4720 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4721 | :term:`KERNEL_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4722 | Specifies the version of the kernel as extracted from ``version.h`` |
| 4723 | or ``utsrelease.h`` within the kernel sources. Effects of setting |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4724 | this variable do not take effect until the kernel has been |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4725 | configured. Consequently, attempting to refer to this variable in |
| 4726 | contexts prior to configuration will not work. |
| 4727 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4728 | :term:`KERNELDEPMODDEPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4729 | Specifies whether the data referenced through |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4730 | :term:`PKGDATA_DIR` is needed or not. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4731 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4732 | 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] | 4733 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4734 | :term:`Initramfs` recipe. Setting the variable there when the data is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4735 | needed avoids a potential dependency loop. |
| 4736 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4737 | :term:`KFEATURE_DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4738 | Provides a short description of a configuration fragment. You use |
| 4739 | this variable in the ``.scc`` file that describes a configuration |
| 4740 | 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] | 4741 | to describe SMP being enabled:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4742 | |
| 4743 | define KFEATURE_DESCRIPTION "Enable SMP" |
| 4744 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4745 | :term:`KMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4746 | The machine as known by the kernel. Sometimes the machine name used |
| 4747 | by the kernel does not match the machine name used by the |
| 4748 | OpenEmbedded build system. For example, the machine name that the |
| 4749 | OpenEmbedded build system understands as ``core2-32-intel-common`` |
| 4750 | goes by a different name in the Linux Yocto kernel. The kernel |
| 4751 | understands that machine as ``intel-core2-32``. For cases like these, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4752 | the :term:`KMACHINE` variable maps the kernel machine name to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4753 | OpenEmbedded build system machine name. |
| 4754 | |
| 4755 | These mappings between different names occur in the Yocto Linux |
| 4756 | Kernel's ``meta`` branch. As an example take a look in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4757 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4758 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4759 | LINUX_VERSION:core2-32-intel-common = "3.19.0" |
| 4760 | COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}" |
| 4761 | SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" |
| 4762 | SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" |
| 4763 | KMACHINE:core2-32-intel-common = "intel-core2-32" |
| 4764 | KBRANCH:core2-32-intel-common = "standard/base" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4765 | KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4766 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4767 | The :term:`KMACHINE` statement says |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4768 | that the kernel understands the machine name as "intel-core2-32". |
| 4769 | However, the OpenEmbedded build system understands the machine as |
| 4770 | "core2-32-intel-common". |
| 4771 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4772 | :term:`KTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4773 | Defines the kernel type to be used in assembling the configuration. |
| 4774 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4775 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4776 | section in the |
| 4777 | Yocto Project Linux Kernel Development Manual for more information on |
| 4778 | kernel types. |
| 4779 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4780 | You define the :term:`KTYPE` variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4781 | :ref:`kernel-dev/advanced:bsp descriptions`. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4782 | value you use must match the value used for the |
| 4783 | :term:`LINUX_KERNEL_TYPE` value used by the |
| 4784 | kernel recipe. |
| 4785 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4786 | :term:`LABELS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4787 | Provides a list of targets for automatic configuration. |
| 4788 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4789 | See the :ref:`ref-classes-grub-efi` class for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4790 | information on how this variable is used. |
| 4791 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4792 | :term:`LAYERDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4793 | Lists the layers, separated by spaces, on which this recipe depends. |
| 4794 | Optionally, you can specify a specific layer version for a dependency |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4795 | 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] | 4796 | |
| 4797 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" |
| 4798 | |
| 4799 | In this previous example, |
| 4800 | version 3 of "anotherlayer" is compared against |
| 4801 | :term:`LAYERVERSION`\ ``_anotherlayer``. |
| 4802 | |
| 4803 | An error is produced if any dependency is missing or the version |
| 4804 | numbers (if specified) do not match exactly. This variable is used in |
| 4805 | the ``conf/layer.conf`` file and must be suffixed with the name of |
| 4806 | the specific layer (e.g. ``LAYERDEPENDS_mylayer``). |
| 4807 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4808 | :term:`LAYERDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4809 | When used inside the ``layer.conf`` configuration file, this variable |
| 4810 | provides the path of the current layer. This variable is not |
| 4811 | available outside of ``layer.conf`` and references are expanded |
| 4812 | immediately when parsing of the file completes. |
| 4813 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4814 | :term:`LAYERDIR_RE` |
| 4815 | See :term:`bitbake:LAYERDIR_RE` in the BitBake manual. |
| 4816 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4817 | :term:`LAYERRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4818 | Lists the layers, separated by spaces, recommended for use with this |
| 4819 | layer. |
| 4820 | |
| 4821 | Optionally, you can specify a specific layer version for a |
| 4822 | recommendation by adding the version to the end of the layer name. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4823 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4824 | |
| 4825 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" |
| 4826 | |
| 4827 | In this previous example, version 3 of "anotherlayer" is compared |
| 4828 | against ``LAYERVERSION_anotherlayer``. |
| 4829 | |
| 4830 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4831 | suffixed with the name of the specific layer (e.g. |
| 4832 | ``LAYERRECOMMENDS_mylayer``). |
| 4833 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4834 | :term:`LAYERSERIES_COMPAT` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 4835 | See :term:`bitbake:LAYERSERIES_COMPAT` in the BitBake manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4836 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4837 | :term:`LAYERVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4838 | Optionally specifies the version of a layer as a single number. You |
| 4839 | can use this within :term:`LAYERDEPENDS` for |
| 4840 | another layer in order to depend on a specific version of the layer. |
| 4841 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4842 | suffixed with the name of the specific layer (e.g. |
| 4843 | ``LAYERVERSION_mylayer``). |
| 4844 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4845 | :term:`LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4846 | The minimal command and arguments used to run the linker. |
| 4847 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4848 | :term:`LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4849 | Specifies the flags to pass to the linker. This variable is exported |
| 4850 | to an environment variable and thus made visible to the software |
| 4851 | being built during the compilation step. |
| 4852 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4853 | Default initialization for :term:`LDFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4854 | being built: |
| 4855 | |
| 4856 | - :term:`TARGET_LDFLAGS` when building for the |
| 4857 | target |
| 4858 | |
| 4859 | - :term:`BUILD_LDFLAGS` when building for the |
| 4860 | build host (i.e. ``-native``) |
| 4861 | |
| 4862 | - :term:`BUILDSDK_LDFLAGS` when building for |
| 4863 | an SDK (i.e. ``nativesdk-``) |
| 4864 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4865 | :term:`LEAD_SONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4866 | Specifies the lead (or primary) compiled library file (i.e. ``.so``) |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4867 | that the :ref:`ref-classes-debian` class applies its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4868 | naming policy to given a recipe that packages multiple libraries. |
| 4869 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4870 | This variable works in conjunction with the :ref:`ref-classes-debian` |
| 4871 | class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4872 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4873 | :term:`LIC_FILES_CHKSUM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4874 | Checksums of the license text in the recipe source code. |
| 4875 | |
| 4876 | This variable tracks changes in license text of the source code |
| 4877 | files. If the license text is changed, it will trigger a build |
| 4878 | failure, which gives the developer an opportunity to review any |
| 4879 | license change. |
| 4880 | |
| 4881 | This variable must be defined for all recipes (unless |
| 4882 | :term:`LICENSE` is set to "CLOSED"). |
| 4883 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4884 | For more information, see the ":ref:`dev-manual/licenses:tracking license changes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4885 | section in the Yocto Project Development Tasks Manual. |
| 4886 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4887 | :term:`LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4888 | The list of source licenses for the recipe. Follow these rules: |
| 4889 | |
| 4890 | - Do not use spaces within individual license names. |
| 4891 | |
| 4892 | - Separate license names using \| (pipe) when there is a choice |
| 4893 | between licenses. |
| 4894 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4895 | - Separate license names using & (ampersand) when there are |
| 4896 | multiple licenses for different parts of the source. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4897 | |
| 4898 | - You can use spaces between license names. |
| 4899 | |
| 4900 | - For standard licenses, use the names of the files in |
| 4901 | ``meta/files/common-licenses/`` or the |
| 4902 | :term:`SPDXLICENSEMAP` flag names defined in |
| 4903 | ``meta/conf/licenses.conf``. |
| 4904 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4905 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4906 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4907 | LICENSE = "LGPL-2.1-only | GPL-3.0-only" |
| 4908 | LICENSE = "MPL-1.0 & LGPL-2.1-only" |
| 4909 | LICENSE = "GPL-2.0-or-later" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4910 | |
| 4911 | The first example is from the |
| 4912 | recipes for Qt, which the user may choose to distribute under either |
| 4913 | the LGPL version 2.1 or GPL version 3. The second example is from |
| 4914 | Cairo where two licenses cover different parts of the source code. |
| 4915 | The final example is from ``sysstat``, which presents a single |
| 4916 | license. |
| 4917 | |
| 4918 | You can also specify licenses on a per-package basis to handle |
| 4919 | situations where components of the output have different licenses. |
| 4920 | For example, a piece of software whose code is licensed under GPLv2 |
| 4921 | but has accompanying documentation licensed under the GNU Free |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4922 | Documentation License 1.2 could be specified as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4923 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4924 | LICENSE = "GFDL-1.2 & GPL-2.0-only" |
| 4925 | LICENSE:${PN} = "GPL-2.0.only" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4926 | LICENSE:${PN}-doc = "GFDL-1.2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4927 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4928 | :term:`LICENSE_CREATE_PACKAGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4929 | Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4930 | build system to create an extra package (i.e. |
| 4931 | ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add |
| 4932 | those packages to the |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4933 | :term:`RRECOMMENDS`\ ``:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4934 | |
| 4935 | The ``${PN}-lic`` package installs a directory in |
| 4936 | ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base |
| 4937 | name, and installs files in that directory that contain license and |
| 4938 | copyright information (i.e. copies of the appropriate license files |
| 4939 | from ``meta/common-licenses`` that match the licenses specified in |
| 4940 | the :term:`LICENSE` variable of the recipe metadata |
| 4941 | and copies of files marked in |
| 4942 | :term:`LIC_FILES_CHKSUM` as containing |
| 4943 | license text). |
| 4944 | |
| 4945 | For related information on providing license text, see the |
| 4946 | :term:`COPY_LIC_DIRS` variable, the |
| 4947 | :term:`COPY_LIC_MANIFEST` variable, and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4948 | ":ref:`dev-manual/licenses:providing license text`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4949 | section in the Yocto Project Development Tasks Manual. |
| 4950 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4951 | :term:`LICENSE_FLAGS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4952 | Specifies additional flags for a recipe you must allow through |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4953 | :term:`LICENSE_FLAGS_ACCEPTED` in |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4954 | order for the recipe to be built. When providing multiple flags, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4955 | separate them with spaces. |
| 4956 | |
| 4957 | This value is independent of :term:`LICENSE` and is |
| 4958 | typically used to mark recipes that might require additional licenses |
| 4959 | in order to be used in a commercial product. For more information, |
| 4960 | see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4961 | ":ref:`dev-manual/licenses:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4962 | section in the Yocto Project Development Tasks Manual. |
| 4963 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4964 | :term:`LICENSE_FLAGS_ACCEPTED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4965 | Lists license flags that when specified in |
| 4966 | :term:`LICENSE_FLAGS` within a recipe should not |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4967 | prevent that recipe from being built. For more information, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 4968 | ":ref:`dev-manual/licenses:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4969 | section in the Yocto Project Development Tasks Manual. |
| 4970 | |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 4971 | :term:`LICENSE_FLAGS_DETAILS` |
| 4972 | Adds details about a flag in :term:`LICENSE_FLAGS`. This way, |
| 4973 | if such a flag is not accepted through :term:`LICENSE_FLAGS_ACCEPTED`, |
| 4974 | the error message will be more informative, containing the specified |
| 4975 | extra details. |
| 4976 | |
| 4977 | For example, a recipe with an EULA may set:: |
| 4978 | |
| 4979 | LICENSE_FLAGS = "FooBar-EULA" |
| 4980 | LICENSE_FLAGS_DETAILS[FooBar-EULA] = "For further details, see https://example.com/eula." |
| 4981 | |
| 4982 | If ``Foobar-EULA`` isn't in :term:`LICENSE_FLAGS_ACCEPTED`, the |
| 4983 | error message is more useful:: |
| 4984 | |
| 4985 | Has a restricted license 'FooBar-EULA' which is not listed in your LICENSE_FLAGS_ACCEPTED. |
| 4986 | For further details, see https://example.com/eula. |
| 4987 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4988 | :term:`LICENSE_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4989 | Path to additional licenses used during the build. By default, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4990 | OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4991 | directory that holds common license text used during the build. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4992 | :term:`LICENSE_PATH` variable allows you to extend that location to other |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4993 | areas that have additional licenses:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4994 | |
| 4995 | LICENSE_PATH += "path-to-additional-common-licenses" |
| 4996 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4997 | :term:`LINUX_KERNEL_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4998 | Defines the kernel type to be used in assembling the configuration. |
| 4999 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5000 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5001 | section in the |
| 5002 | Yocto Project Linux Kernel Development Manual for more information on |
| 5003 | kernel types. |
| 5004 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5005 | 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] | 5006 | "standard". Together with :term:`KMACHINE`, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5007 | :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5008 | the kernel tools to find the appropriate description within the |
| 5009 | kernel :term:`Metadata` with which to build out the sources |
| 5010 | and configuration. |
| 5011 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5012 | :term:`LINUX_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5013 | The Linux version from ``kernel.org`` on which the Linux kernel image |
| 5014 | being built using the OpenEmbedded build system is based. You define |
| 5015 | this variable in the kernel recipe. For example, the |
| 5016 | ``linux-yocto-3.4.bb`` kernel recipe found in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5017 | ``meta/recipes-kernel/linux`` defines the variables as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5018 | |
| 5019 | LINUX_VERSION ?= "3.4.24" |
| 5020 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5021 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5022 | for the recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5023 | |
| 5024 | PV = "${LINUX_VERSION}+git${SRCPV}" |
| 5025 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5026 | :term:`LINUX_VERSION_EXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5027 | A string extension compiled into the version string of the Linux |
| 5028 | kernel built with the OpenEmbedded build system. You define this |
| 5029 | variable in the kernel recipe. For example, the linux-yocto kernel |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5030 | recipes all define the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5031 | |
| 5032 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
| 5033 | |
| 5034 | Defining this variable essentially sets the Linux kernel |
| 5035 | configuration item ``CONFIG_LOCALVERSION``, which is visible through |
| 5036 | the ``uname`` command. Here is an example that shows the extension |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5037 | assuming it was set as previously shown:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5038 | |
| 5039 | $ uname -r |
| 5040 | 3.7.0-rc8-custom |
| 5041 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5042 | :term:`LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5043 | Specifies the directory to which the OpenEmbedded build system writes |
| 5044 | overall log files. The default directory is ``${TMPDIR}/log``. |
| 5045 | |
| 5046 | For the directory containing logs specific to each task, see the |
| 5047 | :term:`T` variable. |
| 5048 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5049 | :term:`MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5050 | Specifies the target device for which the image is built. You define |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5051 | :term:`MACHINE` in the ``local.conf`` file found in the |
| 5052 | :term:`Build Directory`. By default, :term:`MACHINE` is set to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5053 | "qemux86", which is an x86-based architecture machine to be emulated |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5054 | using QEMU:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5055 | |
| 5056 | MACHINE ?= "qemux86" |
| 5057 | |
| 5058 | The variable corresponds to a machine configuration file of the same |
| 5059 | name, through which machine-specific configurations are set. Thus, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5060 | when :term:`MACHINE` is set to "qemux86", the corresponding |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5061 | ``qemux86.conf`` machine configuration file can be found in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5062 | the :term:`Source Directory` in |
| 5063 | ``meta/conf/machine``. |
| 5064 | |
| 5065 | The list of machines supported by the Yocto Project as shipped |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5066 | include the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5067 | |
| 5068 | MACHINE ?= "qemuarm" |
| 5069 | MACHINE ?= "qemuarm64" |
| 5070 | MACHINE ?= "qemumips" |
| 5071 | MACHINE ?= "qemumips64" |
| 5072 | MACHINE ?= "qemuppc" |
| 5073 | MACHINE ?= "qemux86" |
| 5074 | MACHINE ?= "qemux86-64" |
| 5075 | MACHINE ?= "genericx86" |
| 5076 | MACHINE ?= "genericx86-64" |
| 5077 | MACHINE ?= "beaglebone" |
| 5078 | MACHINE ?= "edgerouter" |
| 5079 | |
| 5080 | The last five are Yocto Project reference hardware |
| 5081 | boards, which are provided in the ``meta-yocto-bsp`` layer. |
| 5082 | |
| 5083 | .. note:: |
| 5084 | |
| 5085 | Adding additional Board Support Package (BSP) layers to your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5086 | configuration adds new possible settings for :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5087 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5088 | :term:`MACHINE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5089 | Specifies the name of the machine-specific architecture. This |
| 5090 | variable is set automatically from :term:`MACHINE` or |
| 5091 | :term:`TUNE_PKGARCH`. You should not hand-edit |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5092 | the :term:`MACHINE_ARCH` variable. |
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_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5095 | A list of required machine-specific packages to install as part of |
| 5096 | the image being built. The build process depends on these packages |
| 5097 | being present. Furthermore, because this is a "machine-essential" |
| 5098 | variable, the list of packages are essential for the machine to boot. |
| 5099 | The impact of this variable affects images based on |
| 5100 | ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 5101 | image. |
| 5102 | |
| 5103 | This variable is similar to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5104 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5105 | that the image being built has a build dependency on the variable's |
| 5106 | list of packages. In other words, the image will not build if a file |
| 5107 | in this list is not found. |
| 5108 | |
| 5109 | As an example, suppose the machine for which you are building |
| 5110 | requires ``example-init`` to be run during boot to initialize the |
| 5111 | 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] | 5112 | ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5113 | |
| 5114 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" |
| 5115 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5116 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5117 | A list of recommended machine-specific packages to install as part of |
| 5118 | the image being built. The build process does not depend on these |
| 5119 | packages being present. However, because this is a |
| 5120 | "machine-essential" variable, the list of packages are essential for |
| 5121 | the machine to boot. The impact of this variable affects images based |
| 5122 | on ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 5123 | image. |
| 5124 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5125 | This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5126 | variable with the exception that the image being built does not have |
| 5127 | a build dependency on the variable's list of packages. In other |
| 5128 | words, the image will still build if a package in this list is not |
| 5129 | found. Typically, this variable is used to handle essential kernel |
| 5130 | modules, whose functionality may be selected to be built into the |
| 5131 | kernel rather than as a module, in which case a package will not be |
| 5132 | produced. |
| 5133 | |
| 5134 | Consider an example where you have a custom kernel where a specific |
| 5135 | touchscreen driver is required for the machine to be usable. However, |
| 5136 | the driver can be built as a module or into the kernel depending on |
| 5137 | the kernel configuration. If the driver is built as a module, you |
| 5138 | want it to be installed. But, when the driver is built into the |
| 5139 | kernel, you still want the build to succeed. This variable sets up a |
| 5140 | "recommends" relationship so that in the latter case, the build will |
| 5141 | not fail due to the missing package. To accomplish this, assuming the |
| 5142 | package for the module was called ``kernel-module-ab123``, you would |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5143 | use the following in the machine's ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5144 | |
| 5145 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
| 5146 | |
| 5147 | .. note:: |
| 5148 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5149 | In this example, the ``kernel-module-ab123`` recipe needs to |
| 5150 | explicitly set its :term:`PACKAGES` variable to ensure that BitBake |
| 5151 | does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to |
| 5152 | satisfy the dependency. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5153 | |
| 5154 | Some examples of these machine essentials are flash, screen, |
| 5155 | keyboard, mouse, or touchscreen drivers (depending on the machine). |
| 5156 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5157 | :term:`MACHINE_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5158 | A list of machine-specific packages to install as part of the image |
| 5159 | being built that are not essential for the machine to boot. However, |
| 5160 | the build process for more fully-featured images depends on the |
| 5161 | packages being present. |
| 5162 | |
| 5163 | This variable affects all images based on ``packagegroup-base``, |
| 5164 | which does not include the ``core-image-minimal`` or |
| 5165 | ``core-image-full-cmdline`` images. |
| 5166 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5167 | The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5168 | with the exception that the image being built has a build dependency |
| 5169 | on the variable's list of packages. In other words, the image will |
| 5170 | not build if a file in this list is not found. |
| 5171 | |
| 5172 | An example is a machine that has WiFi capability but is not essential |
| 5173 | for the machine to boot the image. However, if you are building a |
| 5174 | more fully-featured image, you want to enable the WiFi. The package |
| 5175 | containing the firmware for the WiFi hardware is always expected to |
| 5176 | exist, so it is acceptable for the build process to depend upon |
| 5177 | finding the package. In this case, assuming the package for the |
| 5178 | firmware was called ``wifidriver-firmware``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5179 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5180 | |
| 5181 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" |
| 5182 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5183 | :term:`MACHINE_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5184 | A list of machine-specific packages to install as part of the image |
| 5185 | being built that are not essential for booting the machine. The image |
| 5186 | being built has no build dependency on this list of packages. |
| 5187 | |
| 5188 | This variable affects only images based on ``packagegroup-base``, |
| 5189 | which does not include the ``core-image-minimal`` or |
| 5190 | ``core-image-full-cmdline`` images. |
| 5191 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5192 | This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5193 | with the exception that the image being built does not have a build |
| 5194 | dependency on the variable's list of packages. In other words, the |
| 5195 | image will build if a file in this list is not found. |
| 5196 | |
| 5197 | An example is a machine that has WiFi capability but is not essential |
| 5198 | For the machine to boot the image. However, if you are building a |
| 5199 | more fully-featured image, you want to enable WiFi. In this case, the |
| 5200 | package containing the WiFi kernel module will not be produced if the |
| 5201 | WiFi driver is built into the kernel, in which case you still want |
| 5202 | the build to succeed instead of failing as a result of the package |
| 5203 | not being found. To accomplish this, assuming the package for the |
| 5204 | module was called ``kernel-module-examplewifi``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5205 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5206 | |
| 5207 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" |
| 5208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5209 | :term:`MACHINE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5210 | Specifies the list of hardware features the |
| 5211 | :term:`MACHINE` is capable of supporting. For related |
| 5212 | information on enabling features, see the |
| 5213 | :term:`DISTRO_FEATURES`, |
| 5214 | :term:`COMBINED_FEATURES`, and |
| 5215 | :term:`IMAGE_FEATURES` variables. |
| 5216 | |
| 5217 | For a list of hardware features supported by the Yocto Project as |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5218 | shipped, see the ":ref:`ref-features-machine`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5219 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5220 | :term:`MACHINE_FEATURES_BACKFILL` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5221 | A list of space-separated features to be added to |
| 5222 | :term:`MACHINE_FEATURES` if not also present in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5223 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5224 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5225 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is not |
| 5226 | intended to be user-configurable. It is best to just reference the |
| 5227 | variable to see which machine features are being |
| 5228 | :ref:`backfilled <ref-features-backfill>` for all machine configurations. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5229 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5230 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5231 | A list of space-separated features from :term:`MACHINE_FEATURES_BACKFILL` |
| 5232 | that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added |
| 5233 | to :term:`MACHINE_FEATURES`) during the build. |
| 5234 | |
| 5235 | This corresponds to an opt-out mechanism. When new default machine |
| 5236 | features are introduced, machine definition maintainers can review |
| 5237 | (`consider`) them and decide to exclude them from the |
| 5238 | :ref:`backfilled <ref-features-backfill>` features. Therefore, the |
| 5239 | combination of :term:`MACHINE_FEATURES_BACKFILL` and |
| 5240 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` makes it possible to |
| 5241 | add new default features without breaking existing machine definitions. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5242 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5243 | :term:`MACHINEOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5244 | A colon-separated list of overrides that apply to the current |
| 5245 | machine. By default, this list includes the value of |
| 5246 | :term:`MACHINE`. |
| 5247 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5248 | You can extend :term:`MACHINEOVERRIDES` to add extra overrides that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5249 | should apply to a machine. For example, all machines emulated in QEMU |
| 5250 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named |
| 5251 | ``meta/conf/machine/include/qemu.inc`` that prepends the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5252 | override to :term:`MACHINEOVERRIDES`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5253 | |
| 5254 | MACHINEOVERRIDES =. "qemuall:" |
| 5255 | |
| 5256 | This |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5257 | override allows variables to be overridden for all machines emulated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5258 | in QEMU, like in the following example from the ``connman-conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5259 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5260 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5261 | SRC_URI:append:qemuall = " file://wired.config \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5262 | file://wired-setup \ |
| 5263 | " |
| 5264 | |
| 5265 | The underlying mechanism behind |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5266 | :term:`MACHINEOVERRIDES` is simply that it is included in the default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5267 | value of :term:`OVERRIDES`. |
| 5268 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5269 | :term:`MAINTAINER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5270 | The email address of the distribution maintainer. |
| 5271 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 5272 | :term:`MESON_BUILDTYPE` |
| 5273 | Value of the Meson ``--buildtype`` argument used by the |
| 5274 | :ref:`ref-classes-meson` class. It defaults to ``debug`` if |
| 5275 | :term:`DEBUG_BUILD` is set to "1", and ``plain`` otherwise. |
| 5276 | |
| 5277 | See `Meson build options <https://mesonbuild.com/Builtin-options.html>`__ |
| 5278 | for the values you could set in a recipe. Values such as ``plain``, |
| 5279 | ``debug``, ``debugoptimized``, ``release`` and ``minsize`` allow |
| 5280 | you to specify the inclusion of debugging symbols and the compiler |
| 5281 | optimizations (none, performance or size). |
| 5282 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5283 | :term:`METADATA_BRANCH` |
| 5284 | The branch currently checked out for the OpenEmbedded-Core layer (path |
| 5285 | determined by :term:`COREBASE`). |
| 5286 | |
| 5287 | :term:`METADATA_REVISION` |
| 5288 | The revision currently checked out for the OpenEmbedded-Core layer (path |
| 5289 | determined by :term:`COREBASE`). |
| 5290 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 5291 | :term:`MIME_XDG_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5292 | The current implementation of the :ref:`ref-classes-mime-xdg` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 5293 | class cannot detect ``.desktop`` files installed through absolute |
| 5294 | symbolic links. Use this setting to make the class create post-install |
| 5295 | and post-remove scripts for these packages anyway, to invoke the |
| 5296 | ``update-destop-database`` command. |
| 5297 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5298 | :term:`MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5299 | Specifies additional paths from which the OpenEmbedded build system |
| 5300 | gets source code. When the build system searches for source code, it |
| 5301 | first tries the local download directory. If that location fails, the |
| 5302 | build system tries locations defined by |
| 5303 | :term:`PREMIRRORS`, the upstream source, and then |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5304 | locations specified by :term:`MIRRORS` in that order. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5305 | |
| 5306 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5307 | the default value for :term:`MIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5308 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 5309 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5310 | :term:`MLPREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5311 | Specifies a prefix has been added to :term:`PN` to create a |
| 5312 | special version of a recipe or package (i.e. a Multilib version). The |
| 5313 | 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] | 5314 | removed from a name (e.g. the :term:`BPN` variable). |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5315 | :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] | 5316 | |
| 5317 | .. note:: |
| 5318 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5319 | The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation |
| 5320 | is historical and comes from a time when ":ref:`ref-classes-nativesdk`" |
| 5321 | was a suffix rather than a prefix on the recipe name. When |
| 5322 | ":ref:`ref-classes-nativesdk`" was turned into a prefix, it made sense |
| 5323 | to set :term:`MLPREFIX` for it as well. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5324 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5325 | To help understand when :term:`MLPREFIX` might be needed, consider when |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5326 | :term:`BBCLASSEXTEND` is used to provide a :ref:`ref-classes-nativesdk` |
| 5327 | version of a recipe in addition to the target version. If that recipe |
| 5328 | declares build-time dependencies on tasks in other recipes by using |
| 5329 | :term:`DEPENDS`, then a dependency on "foo" will automatically get |
| 5330 | rewritten to a dependency on "nativesdk-foo". However, dependencies like |
| 5331 | the following will not get rewritten automatically:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5332 | |
| 5333 | do_foo[depends] += "recipe:do_foo" |
| 5334 | |
| 5335 | 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] | 5336 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5337 | |
| 5338 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" |
| 5339 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5340 | :term:`module_autoload` |
| 5341 | This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5342 | variable. You should replace all occurrences of :term:`module_autoload` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5343 | with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5344 | |
| 5345 | module_autoload_rfcomm = "rfcomm" |
| 5346 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5347 | should now be replaced with:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5348 | |
| 5349 | KERNEL_MODULE_AUTOLOAD += "rfcomm" |
| 5350 | |
| 5351 | See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. |
| 5352 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5353 | :term:`module_conf` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 5354 | Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5355 | syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` |
| 5356 | file. |
| 5357 | |
| 5358 | You can use this variable anywhere that it can be recognized by the |
| 5359 | kernel recipe or out-of-tree kernel module recipe (e.g. a machine |
| 5360 | configuration file, a distribution configuration file, an append file |
| 5361 | for the recipe, or the recipe itself). If you use this variable, you |
| 5362 | must also be sure to list the module name in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5363 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5364 | variable. |
| 5365 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5366 | Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5367 | |
| 5368 | module_conf_module_name = "modprobe.d-syntax" |
| 5369 | |
| 5370 | You must use the kernel module name override. |
| 5371 | |
| 5372 | 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] | 5373 | the exact syntax you want to provide with :term:`module_conf`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5374 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5375 | Including :term:`module_conf` causes the OpenEmbedded build system to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5376 | populate the ``/etc/modprobe.d/modname.conf`` file with |
| 5377 | ``modprobe.d`` syntax lines. Here is an example that adds the options |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5378 | ``arg1`` and ``arg2`` to a module named ``mymodule``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5379 | |
| 5380 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" |
| 5381 | |
| 5382 | For information on how to specify kernel modules to auto-load on |
| 5383 | boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. |
| 5384 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5385 | :term:`MODULE_TARBALL_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5386 | Controls creation of the ``modules-*.tgz`` file. Set this variable to |
| 5387 | "0" to disable creation of this file, which contains all of the |
| 5388 | kernel modules resulting from a kernel build. |
| 5389 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5390 | :term:`MODULE_TARBALL_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5391 | 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] | 5392 | the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5393 | |
| 5394 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 5395 | |
| 5396 | The value |
| 5397 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5398 | same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5399 | |
| 5400 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 5401 | |
| 5402 | See the :term:`MACHINE` variable for additional information. |
| 5403 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5404 | :term:`MODULE_TARBALL_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5405 | 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] | 5406 | the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5407 | |
| 5408 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 5409 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 5410 | See :term:`KERNEL_ARTIFACT_NAME` for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5411 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5412 | :term:`MOUNT_BASE` |
| 5413 | On non-systemd systems (where ``udev-extraconf`` is being used), |
| 5414 | specifies the base directory for auto-mounting filesystems. The |
| 5415 | default value is "/run/media". |
| 5416 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5417 | :term:`MULTIMACH_TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5418 | Uniquely identifies the type of the target system for which packages |
| 5419 | are being built. This variable allows output for different types of |
| 5420 | target systems to be put into different subdirectories of the same |
| 5421 | output directory. |
| 5422 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5423 | The default value of this variable is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5424 | |
| 5425 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} |
| 5426 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5427 | Some classes (e.g. :ref:`ref-classes-cross-canadian`) modify the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5428 | :term:`MULTIMACH_TARGET_SYS` value. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5429 | |
| 5430 | See the :term:`STAMP` variable for an example. See the |
| 5431 | :term:`STAGING_DIR_TARGET` variable for more information. |
| 5432 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5433 | :term:`NATIVELSBSTRING` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5434 | A string identifying the host distribution. Strings consist of the |
| 5435 | host distributor ID followed by the release, as reported by the |
| 5436 | ``lsb_release`` tool or as read from ``/etc/lsb-release``. For |
| 5437 | example, when running a build on Ubuntu 12.10, the value is |
| 5438 | "Ubuntu-12.10". If this information is unable to be determined, the |
| 5439 | value resolves to "Unknown". |
| 5440 | |
| 5441 | This variable is used by default to isolate native shared state |
| 5442 | packages for different distributions (e.g. to avoid problems with |
| 5443 | ``glibc`` version incompatibilities). Additionally, the variable is |
| 5444 | checked against |
| 5445 | :term:`SANITY_TESTED_DISTROS` if that |
| 5446 | variable is set. |
| 5447 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5448 | :term:`NM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5449 | The minimal command and arguments to run ``nm``. |
| 5450 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5451 | :term:`NO_GENERIC_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5452 | 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] | 5453 | recipe. There are packages, such as the linux-firmware package, with many |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5454 | licenses that are not in any way common. Also, new licenses are added |
| 5455 | occasionally to avoid introducing a lot of common license files, |
| 5456 | which are only applicable to a specific package. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5457 | :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] | 5458 | not exist in common licenses. |
| 5459 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5460 | 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] | 5461 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5462 | |
| 5463 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" |
| 5464 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5465 | Here is an example that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5466 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5467 | source:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5468 | |
| 5469 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
| 5470 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5471 | :term:`NO_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5472 | Prevents installation of all "recommended-only" packages. |
| 5473 | Recommended-only packages are packages installed only through the |
| 5474 | :term:`RRECOMMENDS` variable). Setting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5475 | :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5476 | |
| 5477 | NO_RECOMMENDATIONS = "1" |
| 5478 | |
| 5479 | You can set this variable globally in your ``local.conf`` file or you |
| 5480 | 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] | 5481 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5482 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5483 | NO_RECOMMENDATIONS:pn-target_image = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5484 | |
| 5485 | It is important to realize that if you choose to not install packages |
| 5486 | using this variable and some other packages are dependent on them |
| 5487 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 5488 | variable), the OpenEmbedded build system ignores your request and |
| 5489 | will install the packages to avoid dependency errors. |
| 5490 | |
| 5491 | .. note:: |
| 5492 | |
| 5493 | Some recommended packages might be required for certain system |
| 5494 | functionality, such as kernel modules. It is up to you to add |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5495 | packages with the :term:`IMAGE_INSTALL` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5496 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5497 | This variable is only supported when using the IPK and RPM |
| 5498 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5499 | |
| 5500 | See the :term:`BAD_RECOMMENDATIONS` and |
| 5501 | the :term:`PACKAGE_EXCLUDE` variables for |
| 5502 | related information. |
| 5503 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5504 | :term:`NOAUTOPACKAGEDEBUG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5505 | Disables auto package from splitting ``.debug`` files. If a recipe |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5506 | requires ``FILES:${PN}-dbg`` to be set manually, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5507 | :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5508 | content of the debug package. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5509 | |
| 5510 | NOAUTOPACKAGEDEBUG = "1" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5511 | FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" |
| 5512 | FILES:${PN}-dbg = "/usr/src/debug/" |
| 5513 | 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] | 5514 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5515 | :term:`NON_MULTILIB_RECIPES` |
| 5516 | A list of recipes that should not be built for multilib. OE-Core's |
| 5517 | ``multilib.conf`` file defines a reasonable starting point for this |
| 5518 | list with:: |
| 5519 | |
| 5520 | NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot" |
| 5521 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5522 | :term:`OBJCOPY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5523 | The minimal command and arguments to run ``objcopy``. |
| 5524 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5525 | :term:`OBJDUMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5526 | The minimal command and arguments to run ``objdump``. |
| 5527 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5528 | :term:`OE_BINCONFIG_EXTRA_MANGLE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5529 | When inheriting the :ref:`ref-classes-binconfig` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5530 | this variable specifies additional arguments passed to the "sed" |
| 5531 | command. The sed command alters any paths in configuration scripts |
| 5532 | that have been set up during compilation. Inheriting this class |
| 5533 | results in all paths in these scripts being changed to point into the |
| 5534 | ``sysroots/`` directory so that all builds that use the script will |
| 5535 | use the correct directories for the cross compiling layout. |
| 5536 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5537 | See the ``meta/classes-recipe/binconfig.bbclass`` in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5538 | :term:`Source Directory` for details on how this class |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5539 | applies these additional sed command arguments. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5540 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 5541 | :term:`OECMAKE_GENERATOR` |
| 5542 | A variable for the :ref:`ref-classes-cmake` class, allowing to choose |
| 5543 | which back-end will be generated by CMake to build an application. |
| 5544 | |
| 5545 | By default, this variable is set to ``Ninja``, which is faster than GNU |
| 5546 | make, but if building is broken with Ninja, a recipe can use this |
| 5547 | variable to use GNU make instead:: |
| 5548 | |
| 5549 | OECMAKE_GENERATOR = "Unix Makefiles" |
| 5550 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5551 | :term:`OE_IMPORTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5552 | An internal variable used to tell the OpenEmbedded build system what |
| 5553 | Python modules to import for every Python function run by the system. |
| 5554 | |
| 5555 | .. note:: |
| 5556 | |
| 5557 | Do not set this variable. It is for internal use only. |
| 5558 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5559 | :term:`OE_INIT_ENV_SCRIPT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5560 | The name of the build environment setup script for the purposes of |
| 5561 | setting up the environment within the extensible SDK. The default |
| 5562 | value is "oe-init-build-env". |
| 5563 | |
| 5564 | 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] | 5565 | :term:`OE_INIT_ENV_SCRIPT` variable to its name. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5566 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5567 | :term:`OE_TERMINAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5568 | Controls how the OpenEmbedded build system spawns interactive |
| 5569 | terminals on the host development system (e.g. using the BitBake |
| 5570 | command with the ``-c devshell`` command-line option). For more |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5571 | 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] | 5572 | the Yocto Project Development Tasks Manual. |
| 5573 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5574 | You can use the following values for the :term:`OE_TERMINAL` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5575 | |
| 5576 | - auto |
| 5577 | - gnome |
| 5578 | - xfce |
| 5579 | - rxvt |
| 5580 | - screen |
| 5581 | - konsole |
| 5582 | - none |
| 5583 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5584 | :term:`OEROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5585 | The directory from which the top-level build environment setup script |
| 5586 | is sourced. The Yocto Project provides a top-level build environment |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5587 | setup script: :ref:`structure-core-script`. When you run this |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5588 | script, the :term:`OEROOT` variable resolves to the directory that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5589 | contains the script. |
| 5590 | |
| 5591 | For additional information on how this variable is used, see the |
| 5592 | initialization script. |
| 5593 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 5594 | :term:`OEQA_REPRODUCIBLE_TEST_TARGET` |
| 5595 | Set build target for build reproducibility testing. By default |
| 5596 | all available recipes are compiled with "bitbake world", see also :term:`EXCLUDE_FROM_WORLD` |
| 5597 | and :doc:`/test-manual/reproducible-builds`. |
| 5598 | |
| 5599 | :term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS` |
| 5600 | Set build targets which can be rebuilt using :ref:`shared state <overview-manual/concepts:shared state cache>` |
| 5601 | when running build reproducibility tests. See :doc:`/test-manual/reproducible-builds`. |
| 5602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5603 | :term:`OLDEST_KERNEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5604 | Declares the oldest version of the Linux kernel that the produced |
| 5605 | binaries must support. This variable is passed into the build of the |
| 5606 | Embedded GNU C Library (``glibc``). |
| 5607 | |
| 5608 | The default for this variable comes from the |
| 5609 | ``meta/conf/bitbake.conf`` configuration file. You can override this |
| 5610 | default by setting the variable in a custom distribution |
| 5611 | configuration file. |
| 5612 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5613 | :term:`OVERLAYFS_ETC_DEVICE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5614 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5615 | inherited, specifies the device to be mounted for the read/write |
| 5616 | 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] | 5617 | wish to enable :ref:`ref-classes-overlayfs-etc`, for |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5618 | example, assuming ``/dev/mmcblk0p2`` was the desired device:: |
| 5619 | |
| 5620 | OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2" |
| 5621 | |
| 5622 | :term:`OVERLAYFS_ETC_EXPOSE_LOWER` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5623 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5624 | inherited, if set to "1" then a read-only access to the original |
| 5625 | ``/etc`` content will be provided as a ``lower/`` subdirectory of |
| 5626 | :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0". |
| 5627 | |
| 5628 | :term:`OVERLAYFS_ETC_FSTYPE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5629 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5630 | inherited, specifies the file system type for the read/write |
| 5631 | 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] | 5632 | wish to enable :ref:`ref-classes-overlayfs-etc`, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5633 | for example, assuming the file system is ext4:: |
| 5634 | |
| 5635 | OVERLAYFS_ETC_FSTYPE = "ext4" |
| 5636 | |
| 5637 | :term:`OVERLAYFS_ETC_MOUNT_OPTIONS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5638 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5639 | inherited, specifies the mount options for the read-write layer. |
| 5640 | The default value is "defaults". |
| 5641 | |
| 5642 | :term:`OVERLAYFS_ETC_MOUNT_POINT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5643 | When the :ref:`ref-classes-overlayfs-etc` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5644 | inherited, specifies the parent mount path for the filesystem layers. |
| 5645 | 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] | 5646 | :ref:`ref-classes-overlayfs-etc`, for example if the desired path is |
| 5647 | "/data":: |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5648 | |
| 5649 | OVERLAYFS_ETC_MOUNT_POINT = "/data" |
| 5650 | |
| 5651 | :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5652 | When the :ref:`ref-classes-overlayfs-etc` class is inherited, controls |
| 5653 | how the generated init will be named. For more information, see the |
| 5654 | :ref:`ref-classes-overlayfs-etc` class documentation. The default value |
| 5655 | is "1". |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5656 | |
| 5657 | :term:`OVERLAYFS_MOUNT_POINT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5658 | When inheriting the :ref:`ref-classes-overlayfs` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5659 | specifies mount point(s) to be used. For example:: |
| 5660 | |
| 5661 | OVERLAYFS_MOUNT_POINT[data] = "/data" |
| 5662 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5663 | The assumes you have a ``data.mount`` systemd unit defined elsewhere in |
| 5664 | your BSP (e.g. in ``systemd-machine-units`` recipe) and it is installed |
| 5665 | into the image. For more information see :ref:`ref-classes-overlayfs`. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5666 | |
| 5667 | .. note:: |
| 5668 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5669 | Although the :ref:`ref-classes-overlayfs` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5670 | inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT` |
| 5671 | should be set in your machine configuration. |
| 5672 | |
| 5673 | :term:`OVERLAYFS_QA_SKIP` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5674 | When inheriting the :ref:`ref-classes-overlayfs` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5675 | provides the ability to disable QA checks for particular overlayfs |
| 5676 | mounts. For example:: |
| 5677 | |
| 5678 | OVERLAYFS_QA_SKIP[data] = "mount-configured" |
| 5679 | |
| 5680 | .. note:: |
| 5681 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5682 | Although the :ref:`ref-classes-overlayfs` class is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5683 | inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP` |
| 5684 | should be set in your machine configuration. |
| 5685 | |
| 5686 | :term:`OVERLAYFS_WRITABLE_PATHS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5687 | When inheriting the :ref:`ref-classes-overlayfs` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5688 | specifies writable paths used at runtime for the recipe. For |
| 5689 | example:: |
| 5690 | |
| 5691 | OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application" |
| 5692 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5693 | :term:`OVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5694 | A colon-separated list of overrides that currently apply. Overrides |
| 5695 | are a BitBake mechanism that allows variables to be selectively |
| 5696 | overridden at the end of parsing. The set of overrides in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5697 | :term:`OVERRIDES` represents the "state" during building, which includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5698 | the current recipe being built, the machine for which it is being |
| 5699 | built, and so forth. |
| 5700 | |
| 5701 | 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] | 5702 | the colon-separated list in :term:`OVERRIDES`, then the following |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5703 | assignment will override ``FOO`` with the value "overridden" at the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5704 | end of parsing:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5705 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5706 | FOO:an-override = "overridden" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5707 | |
| 5708 | See the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 5709 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5710 | section in the BitBake User Manual for more information on the |
| 5711 | overrides mechanism. |
| 5712 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5713 | The default value of :term:`OVERRIDES` includes the values of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5714 | :term:`CLASSOVERRIDE`, |
| 5715 | :term:`MACHINEOVERRIDES`, and |
| 5716 | :term:`DISTROOVERRIDES` variables. Another |
| 5717 | important override included by default is ``pn-${PN}``. This override |
| 5718 | allows variables to be set for a single recipe within configuration |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5719 | (``.conf``) files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5720 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5721 | FOO:pn-myrecipe = "myrecipe-specific value" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5722 | |
| 5723 | .. note:: |
| 5724 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5725 | 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] | 5726 | in the output of the ``bitbake -e`` command. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5727 | ":ref:`dev-manual/debugging:viewing variable values`" section in the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5728 | Project Development Tasks Manual for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5729 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5730 | :term:`P` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5731 | The recipe name and version. :term:`P` is comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5732 | |
| 5733 | ${PN}-${PV} |
| 5734 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5735 | :term:`P4DIR` |
| 5736 | See :term:`bitbake:P4DIR` in the BitBake manual. |
| 5737 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5738 | :term:`PACKAGE_ADD_METADATA` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5739 | This variable defines additional metadata to add to packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5740 | |
| 5741 | You may find you need to inject additional metadata into packages. |
| 5742 | This variable allows you to do that by setting the injected data as |
| 5743 | the value. Multiple fields can be added by splitting the content with |
| 5744 | the literal separator "\n". |
| 5745 | |
| 5746 | The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable |
| 5747 | to do package type specific settings. It can also be made package |
| 5748 | specific by using the package name as a suffix. |
| 5749 | |
| 5750 | You can find out more about applying this variable in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5751 | ":ref:`dev-manual/packages:adding custom metadata to packages`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5752 | section in the Yocto Project Development Tasks Manual. |
| 5753 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5754 | :term:`PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5755 | The architecture of the resulting package or packages. |
| 5756 | |
| 5757 | By default, the value of this variable is set to |
| 5758 | :term:`TUNE_PKGARCH` when building for the |
| 5759 | target, :term:`BUILD_ARCH` when building for the |
| 5760 | build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the |
| 5761 | SDK. |
| 5762 | |
| 5763 | .. note:: |
| 5764 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5765 | See :term:`SDK_ARCH` for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5766 | |
| 5767 | However, if your recipe's output packages are built specific to the |
| 5768 | target machine rather than generally for the architecture of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5769 | machine, you should set :term:`PACKAGE_ARCH` to the value of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5770 | :term:`MACHINE_ARCH` in the recipe as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5771 | |
| 5772 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 5773 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5774 | :term:`PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5775 | Specifies a list of architectures compatible with the target machine. |
| 5776 | This variable is set automatically and should not normally be |
| 5777 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5778 | of priority. The default value for :term:`PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5779 | noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". |
| 5780 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5781 | :term:`PACKAGE_BEFORE_PN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5782 | Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5783 | that those added packages can pick up files that would normally be |
| 5784 | included in the default package. |
| 5785 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5786 | :term:`PACKAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5787 | This variable, which is set in the ``local.conf`` configuration file |
| 5788 | found in the ``conf`` folder of the |
| 5789 | :term:`Build Directory`, specifies the package manager the |
| 5790 | OpenEmbedded build system uses when packaging data. |
| 5791 | |
| 5792 | You can provide one or more of the following arguments for the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5793 | variable:: |
| 5794 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 5795 | PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5796 | |
| 5797 | The build system uses only the first argument in the list as the |
| 5798 | package manager when creating your image or SDK. However, packages |
| 5799 | will be created using any additional packaging classes you specify. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5800 | For example, if you use the following in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5801 | |
| 5802 | PACKAGE_CLASSES ?= "package_ipk" |
| 5803 | |
| 5804 | The OpenEmbedded build system uses |
| 5805 | the IPK package manager to create your image or SDK. |
| 5806 | |
| 5807 | For information on packaging and build performance effects as a |
| 5808 | result of the package manager in use, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5809 | ":ref:`ref-classes-package`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5810 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5811 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5812 | Determines how to split up and package debug and source information |
| 5813 | when creating debugging packages to be used with the GNU Project |
| 5814 | Debugger (GDB). In general, based on the value of this variable, |
| 5815 | you can combine the source and debug info in a single package, |
| 5816 | you can break out the source into a separate package that can be |
| 5817 | installed independently, or you can choose to not have the source |
| 5818 | packaged at all. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5819 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5820 | The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5821 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5822 | - "``.debug``": All debugging and source info is placed in a single |
| 5823 | ``*-dbg`` package; debug symbol files are placed next to the |
| 5824 | binary in a ``.debug`` directory so that, if a binary is installed |
| 5825 | into ``/bin``, the corresponding debug symbol file is installed |
| 5826 | in ``/bin/.debug``. Source files are installed in the same ``*-dbg`` |
| 5827 | package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5828 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5829 | - "``debug-file-directory``": As above, all debugging and source info |
| 5830 | is placed in a single ``*-dbg`` package; debug symbol files are |
| 5831 | placed entirely under the directory ``/usr/lib/debug`` and separated |
| 5832 | by the path from where the binary is installed, so that if a binary |
| 5833 | is installed in ``/bin``, the corresponding debug symbols are installed |
| 5834 | in ``/usr/lib/debug/bin``, and so on. As above, source is installed |
| 5835 | in the same package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5836 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5837 | - "``debug-with-srcpkg``": Debugging info is placed in the standard |
| 5838 | ``*-dbg`` package as with the ``.debug`` value, while source is |
| 5839 | placed in a separate ``*-src`` package, which can be installed |
| 5840 | independently. This is the default setting for this variable, |
| 5841 | as defined in Poky's ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5842 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5843 | - "``debug-without-src``": The same behavior as with the ``.debug`` |
| 5844 | setting, but no source is packaged at all. |
| 5845 | |
| 5846 | .. note:: |
| 5847 | |
| 5848 | Much of the above package splitting can be overridden via |
| 5849 | use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5850 | |
| 5851 | You can find out more about debugging using GDB by reading the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5852 | ":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] | 5853 | in the Yocto Project Development Tasks Manual. |
| 5854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5855 | :term:`PACKAGE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5856 | Lists packages that should not be installed into an image. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5857 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5858 | |
| 5859 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." |
| 5860 | |
| 5861 | You can set this variable globally in your ``local.conf`` file or you |
| 5862 | 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] | 5863 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5864 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5865 | PACKAGE_EXCLUDE:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5866 | |
| 5867 | If you choose to not install a package using this variable and some |
| 5868 | other package is dependent on it (i.e. listed in a recipe's |
| 5869 | :term:`RDEPENDS` variable), the OpenEmbedded build |
| 5870 | system generates a fatal installation error. Because the build system |
| 5871 | halts the process with a fatal error, you can use the variable with |
| 5872 | an iterative development process to remove specific components from a |
| 5873 | system. |
| 5874 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5875 | This variable is supported only when using the IPK and RPM |
| 5876 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5877 | |
| 5878 | See the :term:`NO_RECOMMENDATIONS` and the |
| 5879 | :term:`BAD_RECOMMENDATIONS` variables for |
| 5880 | related information. |
| 5881 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5882 | :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` |
| 5883 | Prevents specific packages from being installed when you are |
| 5884 | installing complementary packages. |
| 5885 | |
| 5886 | You might find that you want to prevent installing certain packages |
| 5887 | when you are installing complementary packages. For example, if you |
| 5888 | are using :term:`IMAGE_FEATURES` to install |
| 5889 | ``dev-pkgs``, you might not want to install all packages from a |
| 5890 | particular multilib. If you find yourself in this situation, you can |
| 5891 | use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular |
| 5892 | expressions to match the packages you want to exclude. |
| 5893 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5894 | :term:`PACKAGE_EXTRA_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5895 | Specifies the list of architectures compatible with the device CPU. |
| 5896 | This variable is useful when you build for several different devices |
| 5897 | that use miscellaneous processors such as XScale and ARM926-EJS. |
| 5898 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5899 | :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5900 | Optionally specifies the package architectures used as part of the |
| 5901 | package feed URIs during the build. When used, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5902 | :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5903 | URI, which is constructed using the |
| 5904 | :term:`PACKAGE_FEED_URIS` and |
| 5905 | :term:`PACKAGE_FEED_BASE_PATHS` |
| 5906 | variables. |
| 5907 | |
| 5908 | .. note:: |
| 5909 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5910 | You can use the :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5911 | variable to allow specific package architectures. If you do |
| 5912 | not need to allow specific architectures, which is a common |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5913 | case, you can omit this variable. Omitting the variable results in |
| 5914 | all available architectures for the current machine being included |
| 5915 | into remote package feeds. |
| 5916 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5917 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5918 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5919 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5920 | |
| 5921 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5922 | https://example.com/packagerepos/updates" |
| 5923 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5924 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5925 | |
| 5926 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5927 | |
| 5928 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5929 | |
| 5930 | https://example.com/packagerepos/release/rpm/all |
| 5931 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5932 | https://example.com/packagerepos/release/rpm-dev/all |
| 5933 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5934 | https://example.com/packagerepos/updates/rpm/all |
| 5935 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5936 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5937 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5938 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5939 | :term:`PACKAGE_FEED_BASE_PATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5940 | Specifies the base path used when constructing package feed URIs. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5941 | :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] | 5942 | package feed URI used by the OpenEmbedded build system. The base path |
| 5943 | lies between the :term:`PACKAGE_FEED_URIS` |
| 5944 | and :term:`PACKAGE_FEED_ARCHS` variables. |
| 5945 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5946 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5947 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5948 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5949 | |
| 5950 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5951 | https://example.com/packagerepos/updates" |
| 5952 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5953 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5954 | |
| 5955 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5956 | |
| 5957 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5958 | |
| 5959 | https://example.com/packagerepos/release/rpm/all |
| 5960 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5961 | https://example.com/packagerepos/release/rpm-dev/all |
| 5962 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5963 | https://example.com/packagerepos/updates/rpm/all |
| 5964 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5965 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5966 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5967 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5968 | :term:`PACKAGE_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5969 | Specifies the front portion of the package feed URI used by the |
| 5970 | OpenEmbedded build system. Each final package feed URI is comprised |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5971 | of :term:`PACKAGE_FEED_URIS`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5972 | :term:`PACKAGE_FEED_BASE_PATHS`, and |
| 5973 | :term:`PACKAGE_FEED_ARCHS` variables. |
| 5974 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5975 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5976 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5977 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5978 | |
| 5979 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5980 | https://example.com/packagerepos/updates" |
| 5981 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5982 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5983 | |
| 5984 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5985 | |
| 5986 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5987 | |
| 5988 | https://example.com/packagerepos/release/rpm/all |
| 5989 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5990 | https://example.com/packagerepos/release/rpm-dev/all |
| 5991 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5992 | https://example.com/packagerepos/updates/rpm/all |
| 5993 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5994 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5995 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5996 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5997 | :term:`PACKAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5998 | The final list of packages passed to the package manager for |
| 5999 | installation into the image. |
| 6000 | |
| 6001 | Because the package manager controls actual installation of all |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6002 | packages, the list of packages passed using :term:`PACKAGE_INSTALL` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6003 | not the final list of packages that are actually installed. This |
| 6004 | variable is internal to the image construction code. Consequently, in |
| 6005 | general, you should use the |
| 6006 | :term:`IMAGE_INSTALL` variable to specify |
| 6007 | packages for installation. The exception to this is when working with |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6008 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6009 | image. When working with an initial RAM filesystem (:term:`Initramfs`) image, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6010 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6011 | :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] | 6012 | in the Yocto Project Development Tasks Manual. |
| 6013 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6014 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6015 | Specifies a list of packages the OpenEmbedded build system attempts |
| 6016 | to install when creating an image. If a listed package fails to |
| 6017 | install, the build system does not generate an error. This variable |
| 6018 | is generally not user-defined. |
| 6019 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6020 | :term:`PACKAGE_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6021 | Specifies a list of functions run to pre-process the |
| 6022 | :term:`PKGD` directory prior to splitting the files out |
| 6023 | to individual packages. |
| 6024 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6025 | :term:`PACKAGE_WRITE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6026 | Specifies a list of dependencies for post-installation and |
| 6027 | pre-installation scripts on native/cross tools. If your |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6028 | post-installation or pre-installation script can execute at root filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6029 | creation time rather than on the target but depends on a native tool |
| 6030 | in order to execute, you need to list the tools in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6031 | :term:`PACKAGE_WRITE_DEPS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6032 | |
| 6033 | For information on running post-installation scripts, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6034 | ":ref:`dev-manual/new-recipe:post-installation scripts`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6035 | section in the Yocto Project Development Tasks Manual. |
| 6036 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6037 | :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6038 | This variable provides a means of enabling or disabling features of a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6039 | recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6040 | recipes when you specify features and then arguments that define |
| 6041 | feature behaviors. Here is the basic block structure (broken over |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6042 | multiple lines for readability):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6043 | |
| 6044 | PACKAGECONFIG ??= "f1 f2 f3 ..." |
| 6045 | PACKAGECONFIG[f1] = "\ |
| 6046 | --with-f1, \ |
| 6047 | --without-f1, \ |
| 6048 | build-deps-for-f1, \ |
| 6049 | runtime-deps-for-f1, \ |
| 6050 | runtime-recommends-for-f1, \ |
| 6051 | packageconfig-conflicts-for-f1" |
| 6052 | PACKAGECONFIG[f2] = "\ |
| 6053 | ... and so on and so on ... |
| 6054 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6055 | The :term:`PACKAGECONFIG` variable itself specifies a space-separated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6056 | list of the features to enable. Following the features, you can |
| 6057 | determine the behavior of each feature by providing up to six |
| 6058 | order-dependent arguments, which are separated by commas. You can |
| 6059 | omit any argument you like but must retain the separating commas. The |
| 6060 | order is important and specifies the following: |
| 6061 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6062 | #. Extra arguments that should be added to the configure script |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6063 | argument list (:term:`EXTRA_OECONF` or |
| 6064 | :term:`PACKAGECONFIG_CONFARGS`) if |
| 6065 | the feature is enabled. |
| 6066 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6067 | #. Extra arguments that should be added to :term:`EXTRA_OECONF` or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6068 | :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6069 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6070 | #. Additional build dependencies (:term:`DEPENDS`) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6071 | that should be added if the feature is enabled. |
| 6072 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6073 | #. Additional runtime dependencies (:term:`RDEPENDS`) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6074 | that should be added if the feature is enabled. |
| 6075 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6076 | #. Additional runtime recommendations |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6077 | (:term:`RRECOMMENDS`) that should be added if |
| 6078 | the feature is enabled. |
| 6079 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6080 | #. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6081 | settings for this feature. |
| 6082 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6083 | Consider the following :term:`PACKAGECONFIG` block taken from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6084 | ``librsvg`` recipe. In this example the feature is ``gtk``, which has |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6085 | three arguments that determine the feature's behavior:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6086 | |
| 6087 | PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" |
| 6088 | |
| 6089 | The |
| 6090 | ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is |
| 6091 | enabled. In this case, ``--with-gtk3`` is added to the configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6092 | 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] | 6093 | other hand, if the feature is disabled say through a ``.bbappend`` |
| 6094 | file in another layer, then the second argument ``--without-gtk3`` is |
| 6095 | added to the configure script instead. |
| 6096 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6097 | The basic :term:`PACKAGECONFIG` structure previously described holds true |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6098 | regardless of whether you are creating a block or changing a block. |
| 6099 | When creating a block, use the structure inside your recipe. |
| 6100 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6101 | 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] | 6102 | so one of two ways: |
| 6103 | |
| 6104 | - *Append file:* Create an append file named |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 6105 | ``recipename.bbappend`` in your layer and override the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6106 | :term:`PACKAGECONFIG`. You can either completely override the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6107 | variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6108 | |
| 6109 | PACKAGECONFIG = "f4 f5" |
| 6110 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6111 | Or, you can just append the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6112 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6113 | PACKAGECONFIG:append = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6114 | |
| 6115 | - *Configuration file:* This method is identical to changing the |
| 6116 | block through an append file except you edit your ``local.conf`` |
| 6117 | or ``mydistro.conf`` file. As with append files previously |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6118 | described, you can either completely override the variable:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6119 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6120 | PACKAGECONFIG:pn-recipename = "f4 f5" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6121 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6122 | Or, you can just amend the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6123 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6124 | PACKAGECONFIG:append:pn-recipename = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6125 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6126 | :term:`PACKAGECONFIG_CONFARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6127 | A space-separated list of configuration options generated from the |
| 6128 | :term:`PACKAGECONFIG` setting. |
| 6129 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6130 | Classes such as :ref:`ref-classes-autotools` and :ref:`ref-classes-cmake` |
| 6131 | use :term:`PACKAGECONFIG_CONFARGS` to pass :term:`PACKAGECONFIG` options |
| 6132 | to ``configure`` and ``cmake``, respectively. If you are using |
| 6133 | :term:`PACKAGECONFIG` but not a class that handles the |
| 6134 | :ref:`ref-tasks-configure` task, then you need to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6135 | :term:`PACKAGECONFIG_CONFARGS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6136 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6137 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6138 | For recipes inheriting the :ref:`ref-classes-packagegroup` class, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6139 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6140 | normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) |
| 6141 | should not be automatically created by the ``packagegroup`` recipe, |
| 6142 | which is the default behavior. |
| 6143 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6144 | :term:`PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6145 | The list of packages the recipe creates. The default value is the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6146 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6147 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 6148 | ${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] | 6149 | |
| 6150 | During packaging, the :ref:`ref-tasks-package` task |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6151 | goes through :term:`PACKAGES` and uses the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6152 | variable corresponding to each package to assign files to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6153 | package. If a file matches the :term:`FILES` variable for more than one |
| 6154 | package in :term:`PACKAGES`, it will be assigned to the earliest |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6155 | (leftmost) package. |
| 6156 | |
| 6157 | 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] | 6158 | the patterns in ``FILES:``\ pkg match any files installed by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6159 | :ref:`ref-tasks-install` task) are not generated, |
| 6160 | unless generation is forced through the |
| 6161 | :term:`ALLOW_EMPTY` variable. |
| 6162 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6163 | :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6164 | A promise that your recipe satisfies runtime dependencies for |
| 6165 | optional modules that are found in other recipes. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6166 | :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6167 | only states that they should be satisfied. For example, if a hard, |
| 6168 | runtime dependency (:term:`RDEPENDS`) of another |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6169 | package is satisfied at build time through the :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6170 | variable, but a package with the module name is never actually |
| 6171 | produced, then the other package will be broken. Thus, if you attempt |
| 6172 | to include that package in an image, you will get a dependency |
| 6173 | failure from the packaging system during the |
| 6174 | :ref:`ref-tasks-rootfs` task. |
| 6175 | |
| 6176 | Typically, if there is a chance that such a situation can occur and |
| 6177 | the package that is not created is valid without the dependency being |
| 6178 | satisfied, then you should use :term:`RRECOMMENDS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6179 | (a soft runtime dependency) instead of :term:`RDEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6180 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6181 | 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] | 6182 | you are splitting packages, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6183 | ":ref:`dev-manual/packages:handling optional module packaging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6184 | section in the Yocto Project Development Tasks Manual. |
| 6185 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6186 | :term:`PACKAGESPLITFUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6187 | Specifies a list of functions run to perform additional splitting of |
| 6188 | files into individual packages. Recipes can either prepend to this |
| 6189 | variable or prepend to the ``populate_packages`` function in order to |
| 6190 | perform additional package splitting. In either case, the function |
| 6191 | should set :term:`PACKAGES`, |
| 6192 | :term:`FILES`, :term:`RDEPENDS` and |
| 6193 | other packaging variables appropriately in order to perform the |
| 6194 | desired splitting. |
| 6195 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6196 | :term:`PARALLEL_MAKE` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6197 | |
| 6198 | Extra options passed to the build tool command (``make``, |
| 6199 | ``ninja`` or more specific build engines, like the Go language one) |
| 6200 | during the :ref:`ref-tasks-compile` task, to specify parallel compilation |
| 6201 | on the local build host. This variable is usually in the form "-j x", |
| 6202 | where x represents the maximum number of parallel threads such engines |
| 6203 | can run. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6204 | |
| 6205 | .. note:: |
| 6206 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6207 | For software compiled by ``make``, in order for :term:`PARALLEL_MAKE` |
| 6208 | to be effective, ``make`` must be called with |
| 6209 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 6210 | way to ensure this is to use the ``oe_runmake`` function. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6211 | |
| 6212 | By default, the OpenEmbedded build system automatically sets this |
| 6213 | variable to be equal to the number of cores the build system uses. |
| 6214 | |
| 6215 | .. note:: |
| 6216 | |
| 6217 | If the software being built experiences dependency issues during |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6218 | 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] | 6219 | the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6220 | information on addressing race conditions, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6221 | ":ref:`dev-manual/debugging:debugging parallel make races`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6222 | section in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6223 | |
| 6224 | For single socket systems (i.e. one CPU), you should not have to |
| 6225 | override this variable to gain optimal parallelism during builds. |
| 6226 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6227 | 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] | 6228 | not set higher than "-j 20". |
| 6229 | |
| 6230 | For more information on speeding up builds, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6231 | ":ref:`dev-manual/speeding-up-build:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6232 | section in the Yocto Project Development Tasks Manual. |
| 6233 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6234 | :term:`PARALLEL_MAKEINST` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6235 | Extra options passed to the build tool install command |
| 6236 | (``make install``, ``ninja install`` or more specific ones) |
| 6237 | during the :ref:`ref-tasks-install` task in order to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6238 | parallel installation. This variable defaults to the value of |
| 6239 | :term:`PARALLEL_MAKE`. |
| 6240 | |
| 6241 | .. note:: |
| 6242 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 6243 | For software compiled by ``make``, in order for :term:`PARALLEL_MAKEINST` |
| 6244 | to be effective, ``make`` must be called with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6245 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 6246 | way to ensure this is to use the ``oe_runmake`` function. |
| 6247 | |
| 6248 | If the software being built experiences dependency issues during |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6249 | 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] | 6250 | clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6251 | workaround. For information on addressing race conditions, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6252 | ":ref:`dev-manual/debugging:debugging parallel make races`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6253 | section in the Yocto Project Development Tasks Manual. |
| 6254 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6255 | :term:`PATCHRESOLVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6256 | Determines the action to take when a patch fails. You can set this |
| 6257 | variable to one of two values: "noop" and "user". |
| 6258 | |
| 6259 | The default value of "noop" causes the build to simply fail when the |
| 6260 | OpenEmbedded build system cannot successfully apply a patch. Setting |
| 6261 | the value to "user" causes the build system to launch a shell and |
| 6262 | places you in the right location so that you can manually resolve the |
| 6263 | conflicts. |
| 6264 | |
| 6265 | Set this variable in your ``local.conf`` file. |
| 6266 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6267 | :term:`PATCHTOOL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6268 | Specifies the utility used to apply patches for a recipe during the |
| 6269 | :ref:`ref-tasks-patch` task. You can specify one of |
| 6270 | three utilities: "patch", "quilt", or "git". The default utility used |
| 6271 | is "quilt" except for the quilt-native recipe itself. Because the |
| 6272 | quilt tool is not available at the time quilt-native is being |
| 6273 | patched, it uses "patch". |
| 6274 | |
| 6275 | 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] | 6276 | the recipe using one of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6277 | |
| 6278 | PATCHTOOL = "patch" |
| 6279 | PATCHTOOL = "quilt" |
| 6280 | PATCHTOOL = "git" |
| 6281 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6282 | :term:`PE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6283 | The epoch of the recipe. By default, this variable is unset. The |
| 6284 | variable is used to make upgrades possible when the versioning scheme |
| 6285 | changes in some backwards incompatible way. |
| 6286 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6287 | :term:`PE` is the default value of the :term:`PKGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6288 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6289 | :term:`PEP517_WHEEL_PATH` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6290 | When used by recipes that inherit the :ref:`ref-classes-python_pep517` |
| 6291 | class, denotes the path to ``dist/`` (short for distribution) where the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6292 | binary archive ``wheel`` is built. |
| 6293 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6294 | :term:`PERSISTENT_DIR` |
| 6295 | See :term:`bitbake:PERSISTENT_DIR` in the BitBake manual. |
| 6296 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6297 | :term:`PF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6298 | Specifies the recipe or package name and includes all version and |
| 6299 | revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and |
| 6300 | ``bash-4.2-r1/``). This variable is comprised of the following: |
| 6301 | ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} |
| 6302 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6303 | :term:`PIXBUF_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6304 | When inheriting the :ref:`ref-classes-pixbufcache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6305 | class, this variable identifies packages that contain the pixbuf |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6306 | loaders used with ``gdk-pixbuf``. By default, the |
| 6307 | :ref:`ref-classes-pixbufcache` class assumes that |
| 6308 | the loaders are in the recipe's main package (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6309 | ``${``\ :term:`PN`\ ``}``). Use this variable if the |
| 6310 | loaders you need are in a package other than that main package. |
| 6311 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6312 | :term:`PKG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6313 | The name of the resulting package created by the OpenEmbedded build |
| 6314 | system. |
| 6315 | |
| 6316 | .. note:: |
| 6317 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6318 | 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] | 6319 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6320 | For example, when the :ref:`ref-classes-debian` class renames the output |
| 6321 | package, it does so by setting ``PKG:packagename``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6322 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6323 | :term:`PKG_CONFIG_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6324 | The path to ``pkg-config`` files for the current build context. |
| 6325 | ``pkg-config`` reads this variable from the environment. |
| 6326 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6327 | :term:`PKGD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6328 | Points to the destination directory for files to be packaged before |
| 6329 | they are split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6330 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6331 | |
| 6332 | ${WORKDIR}/package |
| 6333 | |
| 6334 | Do not change this default. |
| 6335 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6336 | :term:`PKGDATA_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6337 | Points to a shared, global-state directory that holds data generated |
| 6338 | during the packaging process. During the packaging process, the |
| 6339 | :ref:`ref-tasks-packagedata` task packages data |
| 6340 | for each recipe and installs it into this temporary, shared area. |
| 6341 | This directory defaults to the following, which you should not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6342 | change:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6343 | |
| 6344 | ${STAGING_DIR_HOST}/pkgdata |
| 6345 | |
| 6346 | For examples of how this data is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6347 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6348 | section in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6349 | ":ref:`dev-manual/debugging:viewing package information with \`\`oe-pkgdata-util\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6350 | section in the Yocto Project Development Tasks Manual. For more |
| 6351 | information on the shared, global-state directory, see |
| 6352 | :term:`STAGING_DIR_HOST`. |
| 6353 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6354 | :term:`PKGDEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6355 | Points to the parent directory for files to be packaged after they |
| 6356 | have been split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6357 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6358 | |
| 6359 | ${WORKDIR}/packages-split |
| 6360 | |
| 6361 | Under this directory, the build system creates directories for each |
| 6362 | package specified in :term:`PACKAGES`. Do not change |
| 6363 | this default. |
| 6364 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6365 | :term:`PKGDESTWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6366 | Points to a temporary work area where the |
| 6367 | :ref:`ref-tasks-package` task saves package metadata. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6368 | The :term:`PKGDESTWORK` location defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6369 | |
| 6370 | ${WORKDIR}/pkgdata |
| 6371 | |
| 6372 | Do not change this default. |
| 6373 | |
| 6374 | The :ref:`ref-tasks-packagedata` task copies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6375 | package metadata from :term:`PKGDESTWORK` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6376 | :term:`PKGDATA_DIR` to make it available globally. |
| 6377 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6378 | :term:`PKGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6379 | 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] | 6380 | is set to :term:`PE`. |
| 6381 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6382 | :term:`PKGR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6383 | The revision of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6384 | :term:`PKGR` is set to :term:`PR`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6385 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6386 | :term:`PKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6387 | The version of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6388 | :term:`PKGV` is set to :term:`PV`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6389 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6390 | :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6391 | This variable can have two separate functions depending on the |
| 6392 | context: a recipe name or a resulting package name. |
| 6393 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6394 | :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] | 6395 | OpenEmbedded build system as input to create a package. The name is |
| 6396 | normally extracted from the recipe file name. For example, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6397 | 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] | 6398 | will be "expat". |
| 6399 | |
| 6400 | The variable refers to a package name in the context of a file |
| 6401 | created or produced by the OpenEmbedded build system. |
| 6402 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6403 | If applicable, the :term:`PN` variable also contains any special suffix |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6404 | or prefix. For example, using ``bash`` to build packages for the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6405 | native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6406 | packages for the target and for Multilib, :term:`PN` would be ``bash`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6407 | and ``lib64-bash``, respectively. |
| 6408 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6409 | :term:`POPULATE_SDK_POST_HOST_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6410 | Specifies a list of functions to call once the OpenEmbedded build |
| 6411 | system has created the host part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6412 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6413 | |
| 6414 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " |
| 6415 | |
| 6416 | If you need to pass the SDK path to a command within a function, you |
| 6417 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6418 | the OpenEmbedded build system when creating SDK output. See the |
| 6419 | :term:`SDK_DIR` variable for more information. |
| 6420 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6421 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6422 | Specifies a list of functions to call once the OpenEmbedded build |
| 6423 | system has created the target part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6424 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6425 | |
| 6426 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " |
| 6427 | |
| 6428 | If you need to pass the SDK path to a command within a function, you |
| 6429 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6430 | the OpenEmbedded build system when creating SDK output. See the |
| 6431 | :term:`SDK_DIR` variable for more information. |
| 6432 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6433 | :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6434 | The revision of the recipe. The default value for this variable is |
| 6435 | "r0". Subsequent revisions of the recipe conventionally have the |
| 6436 | values "r1", "r2", and so forth. When :term:`PV` increases, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6437 | :term:`PR` is conventionally reset to "r0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6438 | |
| 6439 | .. note:: |
| 6440 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6441 | The OpenEmbedded build system does not need the aid of :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6442 | 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] | 6443 | :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6444 | :ref:`stamp <structure-build-tmp-stamps>` and |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6445 | :ref:`overview-manual/concepts:shared state cache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6446 | mechanisms. |
| 6447 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6448 | The :term:`PR` variable primarily becomes significant when a package |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6449 | manager dynamically installs packages on an already built image. In |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6450 | this case, :term:`PR`, which is the default value of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6451 | :term:`PKGR`, helps the package manager distinguish which |
| 6452 | 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] | 6453 | same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with |
| 6454 | the same :term:`PV` usually means that the packages all install the same |
| 6455 | upstream version, but with later (:term:`PR`) version packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6456 | packaging fixes. |
| 6457 | |
| 6458 | .. note:: |
| 6459 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6460 | :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] | 6461 | package contents or metadata. |
| 6462 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6463 | Because manually managing :term:`PR` can be cumbersome and error-prone, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6464 | an automated solution exists. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6465 | ":ref:`dev-manual/packages:working with a pr service`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6466 | in the Yocto Project Development Tasks Manual for more information. |
| 6467 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6468 | :term:`PREFERRED_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6469 | If multiple recipes provide the same item, this variable determines |
| 6470 | which recipe is preferred and thus provides the item (i.e. the |
| 6471 | preferred provider). You should always suffix this variable with the |
| 6472 | name of the provided item. And, you should define the variable using |
| 6473 | the preferred recipe's name (:term:`PN`). Here is a common |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6474 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6475 | |
| 6476 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 6477 | |
| 6478 | In the previous example, multiple recipes are providing "virtual/kernel". |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6479 | 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] | 6480 | the recipe you prefer to provide "virtual/kernel". |
| 6481 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6482 | Following are more examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6483 | |
| 6484 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
| 6485 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
| 6486 | |
| 6487 | For more |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6488 | information, see the ":ref:`dev-manual/new-recipe:using virtual providers`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6489 | section in the Yocto Project Development Tasks Manual. |
| 6490 | |
| 6491 | .. note:: |
| 6492 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6493 | If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6494 | recipe that :term:`PROVIDES` that item but is not selected (defined) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6495 | by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6496 | desirable since this mechanism is designed to select between mutually |
| 6497 | exclusive alternative providers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6498 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6499 | :term:`PREFERRED_PROVIDERS` |
| 6500 | See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual. |
| 6501 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6502 | :term:`PREFERRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6503 | If there are multiple versions of a recipe available, this variable |
| 6504 | determines which version should be given preference. You must always |
| 6505 | suffix the variable with the :term:`PN` you want to select (`python` in |
| 6506 | the first example below), and you should specify the :term:`PV` |
| 6507 | accordingly (`3.4.0` in the example). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6508 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6509 | The :term:`PREFERRED_VERSION` variable supports limited wildcard use |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6510 | through the "``%``" character. You can use the character to match any |
| 6511 | number of characters, which can be useful when specifying versions |
| 6512 | that contain long revision numbers that potentially change. Here are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6513 | two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6514 | |
| 6515 | PREFERRED_VERSION_python = "3.4.0" |
| 6516 | PREFERRED_VERSION_linux-yocto = "5.0%" |
| 6517 | |
| 6518 | .. note:: |
| 6519 | |
| 6520 | The use of the "%" character is limited in that it only works at the end of the |
| 6521 | string. You cannot use the wildcard character in any other |
| 6522 | location of the string. |
| 6523 | |
| 6524 | The specified version is matched against :term:`PV`, which |
| 6525 | does not necessarily match the version part of the recipe's filename. |
| 6526 | 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] | 6527 | where ``foo_git.bb`` contains the following assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6528 | |
| 6529 | PV = "1.1+git${SRCPV}" |
| 6530 | |
| 6531 | In this case, the correct way to select |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6532 | ``foo_git.bb`` is by using an assignment such as the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6533 | |
| 6534 | PREFERRED_VERSION_foo = "1.1+git%" |
| 6535 | |
| 6536 | Compare that previous example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6537 | against the following incorrect example, which does not work:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6538 | |
| 6539 | PREFERRED_VERSION_foo = "git" |
| 6540 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6541 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6542 | configuration files in a way that is hard to change. You can use |
| 6543 | :term:`OVERRIDES` to set a machine-specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6544 | override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6545 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6546 | PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6547 | |
| 6548 | Although not recommended, worst case, you can also use the |
| 6549 | "forcevariable" override, which is the strongest override possible. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6550 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6551 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6552 | PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6553 | |
| 6554 | .. note:: |
| 6555 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6556 | The ``:forcevariable`` override is not handled specially. This override |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6557 | only works because the default value of :term:`OVERRIDES` includes "forcevariable". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6558 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6559 | If a recipe with the specified version is not available, a warning |
| 6560 | message will be shown. See :term:`REQUIRED_VERSION` if you want this |
| 6561 | to be an error instead. |
| 6562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6563 | :term:`PREMIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6564 | Specifies additional paths from which the OpenEmbedded build system |
| 6565 | gets source code. When the build system searches for source code, it |
| 6566 | first tries the local download directory. If that location fails, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6567 | build system tries locations defined by :term:`PREMIRRORS`, the upstream |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6568 | source, and then locations specified by |
| 6569 | :term:`MIRRORS` in that order. |
| 6570 | |
| 6571 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6572 | the default value for :term:`PREMIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6573 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 6574 | |
| 6575 | Typically, you could add a specific server for the build system to |
| 6576 | attempt before any others by adding something like the following to |
| 6577 | the ``local.conf`` configuration file in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6578 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6579 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6580 | PREMIRRORS:prepend = "\ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6581 | git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6582 | ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6583 | http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6584 | https://.*/.* &YOCTO_DL_URL;/mirror/sources/" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6585 | |
| 6586 | These changes cause the |
| 6587 | build system to intercept Git, FTP, HTTP, and HTTPS requests and |
| 6588 | direct them to the ``http://`` sources mirror. You can use |
| 6589 | ``file://`` URLs to point to local directories or network shares as |
| 6590 | well. |
| 6591 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6592 | :term:`PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6593 | Indicates the importance of a package. |
| 6594 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6595 | :term:`PRIORITY` is considered to be part of the distribution policy |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6596 | because the importance of any given recipe depends on the purpose for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6597 | which the distribution is being produced. Thus, :term:`PRIORITY` is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6598 | normally set within recipes. |
| 6599 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6600 | You can set :term:`PRIORITY` to "required", "standard", "extra", and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6601 | "optional", which is the default. |
| 6602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6603 | :term:`PRIVATE_LIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6604 | Specifies libraries installed within a recipe that should be ignored |
| 6605 | by the OpenEmbedded build system's shared library resolver. This |
| 6606 | variable is typically used when software being built by a recipe has |
| 6607 | its own private versions of a library normally provided by another |
| 6608 | recipe. In this case, you would not want the package containing the |
| 6609 | private libraries to be set as a dependency on other unrelated |
| 6610 | packages that should instead depend on the package providing the |
| 6611 | standard version of the library. |
| 6612 | |
| 6613 | Libraries specified in this variable should be specified by their |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6614 | file name. For example, from the Firefox recipe in meta-browser:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6615 | |
| 6616 | PRIVATE_LIBS = "libmozjs.so \ |
| 6617 | libxpcom.so \ |
| 6618 | libnspr4.so \ |
| 6619 | libxul.so \ |
| 6620 | libmozalloc.so \ |
| 6621 | libplc4.so \ |
| 6622 | libplds4.so" |
| 6623 | |
| 6624 | For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6625 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6626 | section in the Yocto Project Overview and Concepts Manual. |
| 6627 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6628 | :term:`PROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6629 | 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] | 6630 | default, a recipe's own :term:`PN` is implicitly already in its |
| 6631 | :term:`PROVIDES` list and therefore does not need to mention that it |
| 6632 | provides itself. If a recipe uses :term:`PROVIDES`, the additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6633 | aliases are synonyms for the recipe and can be useful for satisfying |
| 6634 | dependencies of other recipes during the build as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6635 | :term:`DEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6636 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6637 | Consider the following example :term:`PROVIDES` statement from the recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6638 | file ``eudev_3.2.9.bb``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6639 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6640 | PROVIDES += "udev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6641 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6642 | The :term:`PROVIDES` statement |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6643 | results in the "eudev" recipe also being available as simply "udev". |
| 6644 | |
| 6645 | .. note:: |
| 6646 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6647 | A recipe's own recipe name (:term:`PN`) is always implicitly prepended |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6648 | 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] | 6649 | strictly necessary it is recommended to avoid confusion. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6650 | |
| 6651 | In addition to providing recipes under alternate names, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6652 | :term:`PROVIDES` mechanism is also used to implement virtual targets. A |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6653 | virtual target is a name that corresponds to some particular |
| 6654 | functionality (e.g. a Linux kernel). Recipes that provide the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6655 | functionality in question list the virtual target in :term:`PROVIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6656 | Recipes that depend on the functionality in question can include the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6657 | virtual target in :term:`DEPENDS` to leave the choice of provider open. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6658 | |
| 6659 | Conventionally, virtual targets have names on the form |
| 6660 | "virtual/function" (e.g. "virtual/kernel"). The slash is simply part |
| 6661 | of the name and has no syntactical significance. |
| 6662 | |
| 6663 | The :term:`PREFERRED_PROVIDER` variable is |
| 6664 | used to select which particular recipe provides a virtual target. |
| 6665 | |
| 6666 | .. note:: |
| 6667 | |
| 6668 | A corresponding mechanism for virtual runtime dependencies |
| 6669 | (packages) exists. However, the mechanism does not depend on any |
| 6670 | special functionality beyond ordinary variable assignments. For |
| 6671 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of |
| 6672 | the component that manages the ``/dev`` directory. |
| 6673 | |
| 6674 | Setting the "preferred provider" for runtime dependencies is as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6675 | simple as using the following assignment in a configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6676 | |
| 6677 | VIRTUAL-RUNTIME_dev_manager = "udev" |
| 6678 | |
| 6679 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6680 | :term:`PRSERV_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6681 | The network based :term:`PR` service host and port. |
| 6682 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 6683 | The ``conf/templates/default/local.conf.sample.extended`` configuration |
| 6684 | file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST` |
| 6685 | variable is set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6686 | |
| 6687 | PRSERV_HOST = "localhost:0" |
| 6688 | |
| 6689 | You must |
| 6690 | 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] | 6691 | service <dev-manual/packages:working with a pr service>`. You can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6692 | 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] | 6693 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6694 | |
| 6695 | :term:`PSEUDO_IGNORE_PATHS` |
| 6696 | A comma-separated (without spaces) list of path prefixes that should be ignored |
| 6697 | by pseudo when monitoring and recording file operations, in order to avoid |
| 6698 | problems with files being written to outside of the pseudo context and |
| 6699 | reduce pseudo's overhead. A path is ignored if it matches any prefix in the list |
| 6700 | and can include partial directory (or file) names. |
| 6701 | |
| 6702 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6703 | :term:`PTEST_ENABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6704 | Specifies whether or not :ref:`Package |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6705 | Test <dev-manual/packages:testing packages with ptest>` (ptest) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6706 | functionality is enabled when building a recipe. You should not set |
| 6707 | this variable directly. Enabling and disabling building Package Tests |
| 6708 | at build time should be done by adding "ptest" to (or removing it |
| 6709 | from) :term:`DISTRO_FEATURES`. |
| 6710 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6711 | :term:`PV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6712 | The version of the recipe. The version is normally extracted from the |
| 6713 | recipe filename. For example, if the recipe is named |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6714 | ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1". |
| 6715 | :term:`PV` is generally not overridden within a recipe unless it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6716 | building an unstable (i.e. development) version from a source code |
| 6717 | repository (e.g. Git or Subversion). |
| 6718 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6719 | :term:`PV` is the default value of the :term:`PKGV` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6720 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 6721 | :term:`PYPI_PACKAGE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6722 | When inheriting the :ref:`ref-classes-pypi` class, specifies the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 6723 | `PyPI <https://pypi.org/>`__ package name to be built. The default value |
| 6724 | is set based upon :term:`BPN` (stripping any "python-" or "python3-" |
| 6725 | prefix off if present), however for some packages it will need to be set |
| 6726 | explicitly if that will not match the package name (e.g. where the |
| 6727 | package name has a prefix, underscores, uppercase letters etc.) |
| 6728 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6729 | :term:`PYTHON_ABI` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6730 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 6731 | class, denotes the Application Binary Interface (ABI) currently in use |
| 6732 | for Python. By default, the ABI is "m". You do not have to set this |
| 6733 | variable as the OpenEmbedded build system sets it for you. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6734 | |
| 6735 | The OpenEmbedded build system uses the ABI to construct directory |
| 6736 | names used when installing the Python headers and libraries in |
| 6737 | sysroot (e.g. ``.../python3.3m/...``). |
| 6738 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6739 | :term:`PYTHON_PN` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6740 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 6741 | class, specifies the major Python version being built. For Python 3.x, |
| 6742 | :term:`PYTHON_PN` would be "python3". You do not have to set this |
| 6743 | variable as the OpenEmbedded build system automatically sets it for you. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6744 | |
| 6745 | The variable allows recipes to use common infrastructure such as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6746 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6747 | |
| 6748 | DEPENDS += "${PYTHON_PN}-native" |
| 6749 | |
| 6750 | In the previous example, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6751 | the version of the dependency is :term:`PYTHON_PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6752 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 6753 | :term:`QA_EMPTY_DIRS` |
| 6754 | Specifies a list of directories that are expected to be empty when |
| 6755 | packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or |
| 6756 | :term:`WARN_QA` these will be checked and an error or warning |
| 6757 | (respectively) will be produced. |
| 6758 | |
| 6759 | The default :term:`QA_EMPTY_DIRS` value is set in |
| 6760 | :ref:`insane.bbclass <ref-classes-insane>`. |
| 6761 | |
| 6762 | :term:`QA_EMPTY_DIRS_RECOMMENDATION` |
| 6763 | Specifies a recommendation for why a directory must be empty, |
| 6764 | which will be included in the error message if a specific directory |
| 6765 | is found to contain files. Must be overridden with the directory |
| 6766 | path to match on. |
| 6767 | |
| 6768 | If no recommendation is specified for a directory, then the default |
| 6769 | "but it is expected to be empty" will be used. |
| 6770 | |
| 6771 | An example message shows if files were present in '/dev':: |
| 6772 | |
| 6773 | QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime" |
| 6774 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6775 | :term:`RANLIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6776 | The minimal command and arguments to run ``ranlib``. |
| 6777 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6778 | :term:`RCONFLICTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6779 | The list of packages that conflict with packages. Note that packages |
| 6780 | will not be installed if conflicting packages are not first removed. |
| 6781 | |
| 6782 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6783 | conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6784 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6785 | RCONFLICTS:${PN} = "another_conflicting_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6786 | |
| 6787 | BitBake, which the OpenEmbedded build system uses, supports |
| 6788 | specifying versioned dependencies. Although the syntax varies |
| 6789 | depending on the packaging format, BitBake hides these differences |
| 6790 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6791 | :term:`RCONFLICTS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6792 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6793 | RCONFLICTS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6794 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6795 | For ``operator``, you can specify the following: |
| 6796 | |
| 6797 | - = |
| 6798 | - < |
| 6799 | - > |
| 6800 | - <= |
| 6801 | - >= |
| 6802 | |
| 6803 | 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] | 6804 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6805 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6806 | RCONFLICTS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6807 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6808 | :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6809 | Lists runtime dependencies of a package. These dependencies are other |
| 6810 | packages that must be installed in order for the package to function |
| 6811 | correctly. As an example, the following assignment declares that the |
| 6812 | package ``foo`` needs the packages ``bar`` and ``baz`` to be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6813 | installed:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6814 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6815 | RDEPENDS:foo = "bar baz" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6816 | |
| 6817 | The most common types of package |
| 6818 | runtime dependencies are automatically detected and added. Therefore, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6819 | most recipes do not need to set :term:`RDEPENDS`. For more information, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6820 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6821 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6822 | section in the Yocto Project Overview and Concepts Manual. |
| 6823 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6824 | The practical effect of the above :term:`RDEPENDS` assignment is that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6825 | ``bar`` and ``baz`` will be declared as dependencies inside the |
| 6826 | package ``foo`` when it is written out by one of the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6827 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6828 | Exactly how this is done depends on which package format is used, |
| 6829 | which is determined by |
| 6830 | :term:`PACKAGE_CLASSES`. When the |
| 6831 | corresponding package manager installs the package, it will know to |
| 6832 | also install the packages on which it depends. |
| 6833 | |
| 6834 | To ensure that the packages ``bar`` and ``baz`` get built, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6835 | previous :term:`RDEPENDS` assignment also causes a task dependency to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6836 | added. This dependency is from the recipe's |
| 6837 | :ref:`ref-tasks-build` (not to be confused with |
| 6838 | :ref:`ref-tasks-compile`) task to the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6839 | :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] | 6840 | ``baz``. |
| 6841 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6842 | 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] | 6843 | names of other packages --- they cannot be recipe names. Although |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6844 | package names and recipe names usually match, the important point |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6845 | here is that you are providing package names within the :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6846 | variable. For an example of the default list of packages created from |
| 6847 | a recipe, see the :term:`PACKAGES` variable. |
| 6848 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6849 | Because the :term:`RDEPENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6850 | you should always use the variable in a form with an attached package |
| 6851 | name (remember that a single recipe can build multiple packages). For |
| 6852 | example, suppose you are building a development package that depends |
| 6853 | on the ``perl`` package. In this case, you would use the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6854 | :term:`RDEPENDS` statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6855 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6856 | RDEPENDS:${PN}-dev += "perl" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6857 | |
| 6858 | In the example, |
| 6859 | the development package depends on the ``perl`` package. Thus, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6860 | :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6861 | the variable. |
| 6862 | |
| 6863 | .. note:: |
| 6864 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6865 | ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6866 | by default. This default is set in the BitBake configuration file |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6867 | (``meta/conf/bitbake.conf``). Be careful not to accidentally remove |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6868 | ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6869 | rather than the "=" operator. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6870 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6871 | The package names you use with :term:`RDEPENDS` must appear as they would |
| 6872 | in the :term:`PACKAGES` variable. The :term:`PKG` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6873 | 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] | 6874 | :ref:`ref-classes-debian` class uses this to rename |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6875 | packages), but this final package name cannot be used with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6876 | :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6877 | independent of the package format used. |
| 6878 | |
| 6879 | BitBake, which the OpenEmbedded build system uses, supports |
| 6880 | specifying versioned dependencies. Although the syntax varies |
| 6881 | depending on the packaging format, BitBake hides these differences |
| 6882 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6883 | :term:`RDEPENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6884 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6885 | RDEPENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6886 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6887 | For ``operator``, you can specify the following: |
| 6888 | |
| 6889 | - = |
| 6890 | - < |
| 6891 | - > |
| 6892 | - <= |
| 6893 | - >= |
| 6894 | |
| 6895 | For version, provide the version number. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6896 | |
| 6897 | .. note:: |
| 6898 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6899 | You can use :term:`EXTENDPKGV` to provide a full package version |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6900 | specification. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6901 | |
| 6902 | 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] | 6903 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6904 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6905 | RDEPENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6906 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 6907 | For information on build-time dependencies, see the :term:`DEPENDS` |
| 6908 | variable. You can also see the |
| 6909 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 6910 | ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the |
| 6911 | BitBake User Manual for additional information on tasks and dependencies. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6912 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 6913 | :term:`RECIPE_NO_UPDATE_REASON` |
| 6914 | If a recipe should not be replaced by a more recent upstream version, |
| 6915 | putting the reason why in this variable in a recipe allows |
| 6916 | ``devtool check-upgrade-status`` command to display it, as explained |
| 6917 | in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" |
| 6918 | section. |
| 6919 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6920 | :term:`REPODIR` |
| 6921 | See :term:`bitbake:REPODIR` in the BitBake manual. |
| 6922 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6923 | :term:`REQUIRED_DISTRO_FEATURES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6924 | When inheriting the :ref:`ref-classes-features_check` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6925 | class, this variable identifies distribution features that must exist |
| 6926 | in the current configuration in order for the OpenEmbedded build |
| 6927 | system to build the recipe. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6928 | :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not |
| 6929 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6930 | the recipe will be skipped, and if the build system attempts to build |
| 6931 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6932 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6933 | :term:`REQUIRED_VERSION` |
| 6934 | If there are multiple versions of a recipe available, this variable |
| 6935 | determines which version should be given preference. |
| 6936 | :term:`REQUIRED_VERSION` works in exactly the same manner as |
| 6937 | :term:`PREFERRED_VERSION`, except that if the specified version is not |
| 6938 | available then an error message is shown and the build fails |
| 6939 | immediately. |
| 6940 | |
| 6941 | If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set |
| 6942 | for the same recipe, the :term:`REQUIRED_VERSION` value applies. |
| 6943 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6944 | :term:`RM_WORK_EXCLUDE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6945 | With :ref:`ref-classes-rm-work` enabled, this variable |
| 6946 | specifies a list of recipes whose work directories should not be removed. |
| 6947 | See the ":ref:`ref-classes-rm-work`" section for more details. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6948 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6949 | :term:`ROOT_HOME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6950 | Defines the root home directory. By default, this directory is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6951 | follows in the BitBake configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6952 | |
| 6953 | ROOT_HOME ??= "/home/root" |
| 6954 | |
| 6955 | .. note:: |
| 6956 | |
| 6957 | This default value is likely used because some embedded solutions |
| 6958 | prefer to have a read-only root filesystem and prefer to keep |
| 6959 | writeable data in one place. |
| 6960 | |
| 6961 | You can override the default by setting the variable in any layer or |
| 6962 | in the ``local.conf`` file. Because the default is set using a "weak" |
| 6963 | assignment (i.e. "??="), you can use either of the following forms to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6964 | define your override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6965 | |
| 6966 | ROOT_HOME = "/root" |
| 6967 | ROOT_HOME ?= "/root" |
| 6968 | |
| 6969 | These |
| 6970 | override examples use ``/root``, which is probably the most commonly |
| 6971 | used override. |
| 6972 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6973 | :term:`ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6974 | Indicates a filesystem image to include as the root filesystem. |
| 6975 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6976 | The :term:`ROOTFS` variable is an optional variable used with the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 6977 | :ref:`ref-classes-image-live` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6978 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6979 | :term:`ROOTFS_POSTINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6980 | Specifies a list of functions to call after the OpenEmbedded build |
| 6981 | system has installed packages. You can specify functions separated by |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6982 | semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6983 | |
| 6984 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " |
| 6985 | |
| 6986 | If you need to pass the root filesystem path to a command within a |
| 6987 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6988 | directory that becomes the root filesystem image. See the |
| 6989 | :term:`IMAGE_ROOTFS` variable for more |
| 6990 | information. |
| 6991 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6992 | :term:`ROOTFS_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6993 | Specifies a list of functions to call once the OpenEmbedded build |
| 6994 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6995 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6996 | |
| 6997 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " |
| 6998 | |
| 6999 | If you need to pass the root filesystem path to a command within a |
| 7000 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 7001 | directory that becomes the root filesystem image. See the |
| 7002 | :term:`IMAGE_ROOTFS` variable for more |
| 7003 | information. |
| 7004 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7005 | :term:`ROOTFS_POSTUNINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7006 | Specifies a list of functions to call after the OpenEmbedded build |
| 7007 | system has removed unnecessary packages. When runtime package |
| 7008 | management is disabled in the image, several packages are removed |
| 7009 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7010 | You can specify functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7011 | |
| 7012 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " |
| 7013 | |
| 7014 | If you need to pass the root filesystem path to a command within a |
| 7015 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 7016 | directory that becomes the root filesystem image. See the |
| 7017 | :term:`IMAGE_ROOTFS` variable for more |
| 7018 | information. |
| 7019 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7020 | :term:`ROOTFS_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7021 | Specifies a list of functions to call before the OpenEmbedded build |
| 7022 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7023 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7024 | |
| 7025 | ROOTFS_PREPROCESS_COMMAND += "function; ... " |
| 7026 | |
| 7027 | If you need to pass the root filesystem path to a command within a |
| 7028 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 7029 | directory that becomes the root filesystem image. See the |
| 7030 | :term:`IMAGE_ROOTFS` variable for more |
| 7031 | information. |
| 7032 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7033 | :term:`RPROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7034 | A list of package name aliases that a package also provides. These |
| 7035 | aliases are useful for satisfying runtime dependencies of other |
| 7036 | packages both during the build and on the target (as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7037 | :term:`RDEPENDS`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7038 | |
| 7039 | .. note:: |
| 7040 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7041 | 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] | 7042 | |
| 7043 | As with all package-controlling variables, you must always use the |
| 7044 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7045 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7046 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7047 | RPROVIDES:${PN} = "widget-abi-2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7048 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7049 | :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7050 | A list of packages that extends the usability of a package being |
| 7051 | built. The package being built does not depend on this list of |
| 7052 | packages in order to successfully build, but rather uses them for |
| 7053 | extended usability. To specify runtime dependencies for packages, see |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7054 | the :term:`RDEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7055 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7056 | The package manager will automatically install the :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7057 | list of packages when installing the built package. However, you can |
| 7058 | prevent listed packages from being installed by using the |
| 7059 | :term:`BAD_RECOMMENDATIONS`, |
| 7060 | :term:`NO_RECOMMENDATIONS`, and |
| 7061 | :term:`PACKAGE_EXCLUDE` variables. |
| 7062 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7063 | Packages specified in :term:`RRECOMMENDS` need not actually be produced. |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 7064 | However, there must be a recipe providing each package, either |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7065 | through the :term:`PACKAGES` or |
| 7066 | :term:`PACKAGES_DYNAMIC` variables or the |
| 7067 | :term:`RPROVIDES` variable, or an error will occur |
| 7068 | during the build. If such a recipe does exist and the package is not |
| 7069 | produced, the build continues without error. |
| 7070 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7071 | Because the :term:`RRECOMMENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7072 | you should always attach an override to the variable to specify the |
| 7073 | particular package whose usability is being extended. For example, |
| 7074 | suppose you are building a development package that is extended to |
| 7075 | support wireless functionality. In this case, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7076 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7077 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7078 | RRECOMMENDS:${PN}-dev += "wireless_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7079 | |
| 7080 | In the |
| 7081 | example, the package name (``${PN}-dev``) must appear as it would in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7082 | the :term:`PACKAGES` namespace before any renaming of the output package |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7083 | by classes such as :ref:`ref-classes-debian`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7084 | |
| 7085 | BitBake, which the OpenEmbedded build system uses, supports |
| 7086 | specifying versioned recommends. Although the syntax varies depending |
| 7087 | on the packaging format, BitBake hides these differences from you. |
| 7088 | Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7089 | :term:`RRECOMMENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7090 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7091 | RRECOMMENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7092 | |
| 7093 | For ``operator``, you can specify the following: |
| 7094 | |
| 7095 | - = |
| 7096 | - < |
| 7097 | - > |
| 7098 | - <= |
| 7099 | - >= |
| 7100 | |
| 7101 | 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] | 7102 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7103 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7104 | RRECOMMENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7105 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7106 | :term:`RREPLACES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7107 | A list of packages replaced by a package. The package manager uses |
| 7108 | this variable to determine which package should be installed to |
| 7109 | replace other package(s) during an upgrade. In order to also have the |
| 7110 | 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] | 7111 | the other package to the :term:`RCONFLICTS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7112 | |
| 7113 | As with all package-controlling variables, you must use this variable |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7114 | in conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7115 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7116 | RREPLACES:${PN} = "other_package_being_replaced" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7117 | |
| 7118 | BitBake, which the OpenEmbedded build system uses, supports |
| 7119 | specifying versioned replacements. Although the syntax varies |
| 7120 | depending on the packaging format, BitBake hides these differences |
| 7121 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7122 | :term:`RREPLACES` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7123 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7124 | RREPLACES:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7125 | |
| 7126 | For ``operator``, you can specify the following: |
| 7127 | |
| 7128 | - = |
| 7129 | - < |
| 7130 | - > |
| 7131 | - <= |
| 7132 | - >= |
| 7133 | |
| 7134 | For example, the following sets up a replacement using version 1.2 |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7135 | or greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7136 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7137 | RREPLACES:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7138 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7139 | :term:`RSUGGESTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7140 | A list of additional packages that you can suggest for installation |
| 7141 | by the package manager at the time a package is installed. Not all |
| 7142 | package managers support this functionality. |
| 7143 | |
| 7144 | As with all package-controlling variables, you must always use this |
| 7145 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7146 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7147 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7148 | RSUGGESTS:${PN} = "useful_package another_package" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7149 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7150 | :term:`RUST_CHANNEL` |
| 7151 | Specifies which version of Rust to build - "stable", "beta" or "nightly". |
| 7152 | The default value is "stable". Set this at your own risk, as values other |
| 7153 | than "stable" are not guaranteed to work at a given time. |
| 7154 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7155 | :term:`S` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7156 | The location in the :term:`Build Directory` where |
| 7157 | unpacked recipe source code resides. By default, this directory is |
| 7158 | ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, |
| 7159 | where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe |
| 7160 | version. If the source tarball extracts the code to a directory named |
| 7161 | anything other than ``${BPN}-${PV}``, or if the source code is |
| 7162 | 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] | 7163 | :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] | 7164 | to find the unpacked source. |
| 7165 | |
| 7166 | As an example, assume a :term:`Source Directory` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 7167 | top-level folder named ``poky`` and a default :term:`Build Directory` at |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7168 | ``poky/build``. In this case, the work directory the build system |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7169 | uses to keep the unpacked recipe for ``db`` is the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7170 | |
| 7171 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 |
| 7172 | |
| 7173 | The unpacked source code resides in the ``db-5.1.19`` folder. |
| 7174 | |
| 7175 | This next example assumes a Git repository. By default, Git |
| 7176 | repositories are cloned to ``${WORKDIR}/git`` during |
| 7177 | :ref:`ref-tasks-fetch`. Since this path is different |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7178 | 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] | 7179 | source can be located:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7180 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7181 | SRC_URI = "git://path/to/repo.git;branch=main" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7182 | S = "${WORKDIR}/git" |
| 7183 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7184 | :term:`SANITY_REQUIRED_UTILITIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7185 | Specifies a list of command-line utilities that should be checked for |
| 7186 | during the initial sanity checking process when running BitBake. If |
| 7187 | any of the utilities are not installed on the build host, then |
| 7188 | BitBake immediately exits with an error. |
| 7189 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7190 | :term:`SANITY_TESTED_DISTROS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7191 | A list of the host distribution identifiers that the build system has |
| 7192 | been tested against. Identifiers consist of the host distributor ID |
| 7193 | followed by the release, as reported by the ``lsb_release`` tool or |
| 7194 | as read from ``/etc/lsb-release``. Separate the list items with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7195 | explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7196 | not empty and the current value of |
| 7197 | :term:`NATIVELSBSTRING` does not appear in the |
| 7198 | list, then the build system reports a warning that indicates the |
| 7199 | current host distribution has not been tested as a build host. |
| 7200 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7201 | :term:`SDK_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7202 | The target architecture for the SDK. Typically, you do not directly |
| 7203 | set this variable. Instead, use :term:`SDKMACHINE`. |
| 7204 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7205 | :term:`SDK_ARCHIVE_TYPE` |
| 7206 | Specifies the type of archive to create for the SDK. Valid values: |
| 7207 | |
| 7208 | - ``tar.xz`` (default) |
| 7209 | - ``zip`` |
| 7210 | |
| 7211 | Only one archive type can be specified. |
| 7212 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 7213 | :term:`SDK_BUILDINFO_FILE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7214 | When using the :ref:`ref-classes-image-buildinfo` class, |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 7215 | specifies the file in the SDK to write the build information into. The |
| 7216 | default value is "``/buildinfo``". |
| 7217 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7218 | :term:`SDK_CUSTOM_TEMPLATECONF` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7219 | 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] | 7220 | "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] | 7221 | (:term:`TOPDIR`) then this will be copied into the SDK. |
| 7222 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7223 | :term:`SDK_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7224 | The directory set up and used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7225 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which the |
| 7226 | SDK is deployed. The :ref:`populate_sdk_base <ref-classes-populate-sdk>` |
| 7227 | class defines :term:`SDK_DEPLOY` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7228 | |
| 7229 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
| 7230 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7231 | :term:`SDK_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7232 | The parent directory used by the OpenEmbedded build system when |
| 7233 | creating SDK output. The |
| 7234 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7235 | the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7236 | |
| 7237 | SDK_DIR = "${WORKDIR}/sdk" |
| 7238 | |
| 7239 | .. note:: |
| 7240 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7241 | The :term:`SDK_DIR` directory is a temporary directory as it is part of |
| 7242 | :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7243 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7244 | :term:`SDK_EXT_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7245 | Controls whether or not shared state artifacts are copied into the |
| 7246 | extensible SDK. The default value of "full" copies all of the |
| 7247 | required shared state artifacts into the extensible SDK. The value |
| 7248 | "minimal" leaves these artifacts out of the SDK. |
| 7249 | |
| 7250 | .. note:: |
| 7251 | |
| 7252 | If you set the variable to "minimal", you need to ensure |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7253 | :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the |
| 7254 | artifacts to be fetched as needed. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7255 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7256 | :term:`SDK_HOST_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7257 | The manifest file for the host part of the SDK. This file lists all |
| 7258 | the installed packages that make up the host part of the SDK. The |
| 7259 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7260 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7261 | |
| 7262 | packagename packagearch version |
| 7263 | |
| 7264 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7265 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7266 | |
| 7267 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
| 7268 | |
| 7269 | The location is derived using the :term:`SDK_DEPLOY` and |
| 7270 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 7271 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7272 | :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7273 | When set to "1", specifies to include the packagedata for all recipes |
| 7274 | in the "world" target in the extensible SDK. Including this data |
| 7275 | allows the ``devtool search`` command to find these recipes in search |
| 7276 | results, as well as allows the ``devtool add`` command to map |
| 7277 | dependencies more effectively. |
| 7278 | |
| 7279 | .. note:: |
| 7280 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7281 | Enabling the :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7282 | variable significantly increases build time because all of world |
| 7283 | needs to be built. Enabling the variable also slightly increases |
| 7284 | the size of the extensible SDK. |
| 7285 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7286 | :term:`SDK_INCLUDE_TOOLCHAIN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7287 | When set to "1", specifies to include the toolchain in the extensible |
| 7288 | SDK. Including the toolchain is useful particularly when |
| 7289 | :term:`SDK_EXT_TYPE` is set to "minimal" to keep |
| 7290 | the SDK reasonably small but you still want to provide a usable |
| 7291 | toolchain. For example, suppose you want to use the toolchain from an |
| 7292 | IDE or from other tools and you do not want to perform additional |
| 7293 | steps to install the toolchain. |
| 7294 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7295 | The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if |
| 7296 | :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if |
| 7297 | :term:`SDK_EXT_TYPE` is set to "full". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7298 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7299 | :term:`SDK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7300 | The base name for SDK output files. The name is derived from the |
| 7301 | :term:`DISTRO`, :term:`TCLIBC`, |
| 7302 | :term:`SDK_ARCH`, |
| 7303 | :term:`IMAGE_BASENAME`, and |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7304 | :term:`TUNE_PKGARCH` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7305 | |
| 7306 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" |
| 7307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7308 | :term:`SDK_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7309 | Specifies the operating system for which the SDK will be built. The |
| 7310 | default value is the value of :term:`BUILD_OS`. |
| 7311 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7312 | :term:`SDK_OUTPUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7313 | The location used by the OpenEmbedded build system when creating SDK |
| 7314 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7315 | class defines the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7316 | |
| 7317 | SDK_DIR = "${WORKDIR}/sdk" |
| 7318 | SDK_OUTPUT = "${SDK_DIR}/image" |
| 7319 | SDK_DEPLOY = "${DEPLOY_DIR}/sdk" |
| 7320 | |
| 7321 | .. note:: |
| 7322 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7323 | 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] | 7324 | :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is |
| 7325 | :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7326 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7327 | :term:`SDK_PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7328 | Specifies a list of architectures compatible with the SDK machine. |
| 7329 | This variable is set automatically and should not normally be |
| 7330 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7331 | 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] | 7332 | noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". |
| 7333 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7334 | :term:`SDK_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7335 | Specifies a list of functions to call once the OpenEmbedded build |
| 7336 | system creates the SDK. You can specify functions separated by |
| 7337 | semicolons: SDK_POSTPROCESS_COMMAND += "function; ... " |
| 7338 | |
| 7339 | If you need to pass an SDK path to a command within a function, you |
| 7340 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 7341 | the OpenEmbedded build system when creating SDK output. See the |
| 7342 | :term:`SDK_DIR` variable for more information. |
| 7343 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7344 | :term:`SDK_PREFIX` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7345 | The toolchain binary prefix used for |
| 7346 | :ref:`ref-classes-nativesdk` recipes. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7347 | OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7348 | :term:`TARGET_PREFIX` when building |
| 7349 | ``nativesdk`` recipes. The default value is "${SDK_SYS}-". |
| 7350 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7351 | :term:`SDK_RECRDEP_TASKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7352 | A list of shared state tasks added to the extensible SDK. By default, |
| 7353 | the following tasks are added: |
| 7354 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 7355 | - :ref:`ref-tasks-populate_lic` |
| 7356 | - :ref:`ref-tasks-package_qa` |
| 7357 | - :ref:`ref-tasks-populate_sysroot` |
| 7358 | - :ref:`ref-tasks-deploy` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7359 | |
| 7360 | Despite the default value of "" for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7361 | :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7362 | 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] | 7363 | :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7364 | tasks that are needed in order to build |
| 7365 | :term:`SDK_TARGETS`). |
| 7366 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7367 | :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7368 | Specifies the system, including the architecture and the operating |
| 7369 | system, for which the SDK will be built. |
| 7370 | |
| 7371 | The OpenEmbedded build system automatically sets this variable based |
| 7372 | on :term:`SDK_ARCH`, |
| 7373 | :term:`SDK_VENDOR`, and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7374 | :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] | 7375 | variable yourself. |
| 7376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7377 | :term:`SDK_TARGET_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7378 | The manifest file for the target part of the SDK. This file lists all |
| 7379 | the installed packages that make up the target part of the SDK. The |
| 7380 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7381 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7382 | |
| 7383 | packagename packagearch version |
| 7384 | |
| 7385 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7386 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7387 | |
| 7388 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
| 7389 | |
| 7390 | The location is derived using the :term:`SDK_DEPLOY` and |
| 7391 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 7392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7393 | :term:`SDK_TARGETS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7394 | A list of targets to install from shared state as part of the |
| 7395 | standard or extensible SDK installation. The default value is "${PN}" |
| 7396 | (i.e. the image from which the SDK is built). |
| 7397 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7398 | The :term:`SDK_TARGETS` variable is an internal variable and typically |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7399 | would not be changed. |
| 7400 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7401 | :term:`SDK_TITLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7402 | The title to be printed when running the SDK installer. By default, |
| 7403 | this title is based on the :term:`DISTRO_NAME` or |
| 7404 | :term:`DISTRO` variable and is set in the |
| 7405 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7406 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7407 | |
| 7408 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
| 7409 | |
| 7410 | For the default distribution "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7411 | :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7412 | |
| 7413 | For information on how to change this default title, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7414 | ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7415 | section in the Yocto Project Application Development and the |
| 7416 | Extensible Software Development Kit (eSDK) manual. |
| 7417 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 7418 | :term:`SDK_TOOLCHAIN_LANGS` |
| 7419 | Specifies programming languages to support in the SDK, as a |
| 7420 | space-separated list. Currently supported items are ``rust`` and ``go``. |
| 7421 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7422 | :term:`SDK_UPDATE_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7423 | An optional URL for an update server for the extensible SDK. If set, |
| 7424 | the value is used as the default update server when running |
| 7425 | ``devtool sdk-update`` within the extensible SDK. |
| 7426 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7427 | :term:`SDK_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7428 | Specifies the name of the SDK vendor. |
| 7429 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7430 | :term:`SDK_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7431 | Specifies the version of the SDK. The Poky distribution configuration file |
| 7432 | (``/meta-poky/conf/distro/poky.conf``) sets the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7433 | :term:`SDK_VERSION` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7434 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7435 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7436 | |
| 7437 | For additional information, see the |
| 7438 | :term:`DISTRO_VERSION` and |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7439 | :term:`METADATA_REVISION` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7440 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7441 | :term:`SDK_ZIP_OPTIONS` |
| 7442 | Specifies extra options to pass to the ``zip`` command when zipping the SDK |
| 7443 | (i.e. when :term:`SDK_ARCHIVE_TYPE` is set to "zip"). The default value is |
| 7444 | "-y". |
| 7445 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7446 | :term:`SDKEXTPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7447 | The default installation directory for the Extensible SDK. By |
| 7448 | default, this directory is based on the :term:`DISTRO` |
| 7449 | variable and is set in the |
| 7450 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7451 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7452 | |
| 7453 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
| 7454 | |
| 7455 | For the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7456 | default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7457 | |
| 7458 | For information on how to change this default directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7459 | ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7460 | section in the Yocto Project Application Development and the |
| 7461 | Extensible Software Development Kit (eSDK) manual. |
| 7462 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7463 | :term:`SDKIMAGE_FEATURES` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7464 | Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7465 | the SDK generated from an image using the following command:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7466 | |
| 7467 | $ bitbake -c populate_sdk imagename |
| 7468 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7469 | :term:`SDKMACHINE` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7470 | The machine for which the SDK is built. In other words, the SDK is built |
| 7471 | such that it runs on the target you specify with the :term:`SDKMACHINE` |
| 7472 | value. The value points to a corresponding ``.conf`` file under |
| 7473 | ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``, |
| 7474 | ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are |
| 7475 | :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] | 7476 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7477 | The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the |
| 7478 | architecture of the build machine. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7479 | |
| 7480 | .. note:: |
| 7481 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7482 | You cannot set the :term:`SDKMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7483 | variable in your distribution configuration file. If you do, the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7484 | configuration will not take effect. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7485 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7486 | :term:`SDKPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7487 | Defines the path offered to the user for installation of the SDK that |
| 7488 | is generated by the OpenEmbedded build system. The path appears as |
| 7489 | the default location for installing the SDK when you run the SDK's |
| 7490 | installation script. You can override the offered path when you run |
| 7491 | the script. |
| 7492 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7493 | :term:`SDKTARGETSYSROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7494 | The full path to the sysroot used for cross-compilation within an SDK |
| 7495 | as it will be when installed into the default |
| 7496 | :term:`SDKPATH`. |
| 7497 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7498 | :term:`SECTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7499 | The section in which packages should be categorized. Package |
| 7500 | management utilities can make use of this variable. |
| 7501 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7502 | :term:`SELECTED_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7503 | Specifies the optimization flags passed to the C compiler when |
| 7504 | building for the target. The flags are passed through the default |
| 7505 | value of the :term:`TARGET_CFLAGS` variable. |
| 7506 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7507 | The :term:`SELECTED_OPTIMIZATION` variable takes the value of |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 7508 | :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which |
| 7509 | case the value of :term:`DEBUG_OPTIMIZATION` is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7510 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7511 | :term:`SERIAL_CONSOLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7512 | Defines a serial console (TTY) to enable using |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7513 | :wikipedia:`getty <Getty_(Unix)>`. Provide a value that specifies the |
| 7514 | baud rate followed by the TTY device name separated by a semicolon. |
| 7515 | Use spaces to separate multiple devices:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7516 | |
| 7517 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" |
| 7518 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7519 | :term:`SERIAL_CONSOLES_CHECK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7520 | Specifies serial consoles, which must be listed in |
| 7521 | :term:`SERIAL_CONSOLES`, to check against |
| 7522 | ``/proc/console`` before enabling them using getty. This variable |
| 7523 | allows aliasing in the format: <device>:<alias>. If a device was |
| 7524 | listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7525 | ``/proc/console``, you would do the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7526 | |
| 7527 | SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0" |
| 7528 | |
| 7529 | This variable is currently only supported with SysVinit (i.e. not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7530 | with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires |
| 7531 | ``/etc/inittab`` to be writable when used with SysVinit. This makes it |
| 7532 | incompatible with customizations such as the following:: |
| 7533 | |
| 7534 | EXTRA_IMAGE_FEATURES += "read-only-rootfs" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7535 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7536 | :term:`SETUPTOOLS_BUILD_ARGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7537 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 7538 | class, this variable can be used to specify additional arguments to be |
| 7539 | passed to ``setup.py build`` in the ``setuptools3_do_compile()`` task. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7540 | |
| 7541 | :term:`SETUPTOOLS_INSTALL_ARGS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7542 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 7543 | class, this variable can be used to specify additional arguments to be |
| 7544 | passed to ``setup.py install`` in the ``setuptools3_do_install()`` task. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7545 | |
| 7546 | :term:`SETUPTOOLS_SETUP_PATH` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7547 | When used by recipes that inherit the :ref:`ref-classes-setuptools3` |
| 7548 | class, this variable should be used to specify the directory in which |
| 7549 | the ``setup.py`` file is located if it is not at the root of the source |
| 7550 | tree (as specified by :term:`S`). For example, in a recipe where the |
| 7551 | sources are fetched from a Git repository and ``setup.py`` is in a |
| 7552 | ``python/pythonmodule`` subdirectory, you would have this:: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7553 | |
| 7554 | S = "${WORKDIR}/git" |
| 7555 | SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule" |
| 7556 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7557 | :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7558 | A list of recipe dependencies that should not be used to determine |
| 7559 | signatures of tasks from one recipe when they depend on tasks from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7560 | another recipe. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7561 | |
| 7562 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" |
| 7563 | |
| 7564 | In the previous example, ``intone`` depends on ``mplayer2``. |
| 7565 | |
| 7566 | You can use the special token ``"*"`` on the left-hand side of the |
| 7567 | dependency to match all recipes except the one on the right-hand |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7568 | side. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7569 | |
| 7570 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" |
| 7571 | |
| 7572 | In the previous example, all recipes except ``quilt-native`` ignore |
| 7573 | task signatures from the ``quilt-native`` recipe when determining |
| 7574 | their task signatures. |
| 7575 | |
| 7576 | Use of this variable is one mechanism to remove dependencies that |
| 7577 | affect task signatures and thus force rebuilds when a recipe changes. |
| 7578 | |
| 7579 | .. note:: |
| 7580 | |
| 7581 | If you add an inappropriate dependency for a recipe relationship, |
| 7582 | the software might break during runtime if the interface of the |
| 7583 | second recipe was changed after the first recipe had been built. |
| 7584 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7585 | :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7586 | A list of recipes that are completely stable and will never change. |
| 7587 | The ABI for the recipes in the list are presented by output from the |
| 7588 | tasks run to build the recipe. Use of this variable is one way to |
| 7589 | remove dependencies from one recipe on another that affect task |
| 7590 | signatures and thus force rebuilds when the recipe changes. |
| 7591 | |
| 7592 | .. note:: |
| 7593 | |
| 7594 | If you add an inappropriate variable to this list, the software |
| 7595 | might break at runtime if the interface of the recipe was changed |
| 7596 | after the other had been built. |
| 7597 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7598 | :term:`SITEINFO_BITS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7599 | Specifies the number of bits for the target system CPU. The value |
| 7600 | should be either "32" or "64". |
| 7601 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7602 | :term:`SITEINFO_ENDIANNESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7603 | Specifies the endian byte order of the target system. The value |
| 7604 | should be either "le" for little-endian or "be" for big-endian. |
| 7605 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7606 | :term:`SKIP_FILEDEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7607 | Enables removal of all files from the "Provides" section of an RPM |
| 7608 | package. Removal of these files is required for packages containing |
| 7609 | prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. |
| 7610 | |
| 7611 | To enable file removal, set the variable to "1" in your |
| 7612 | ``conf/local.conf`` configuration file in your: |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 7613 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7614 | |
| 7615 | SKIP_FILEDEPS = "1" |
| 7616 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7617 | :term:`SKIP_RECIPE` |
| 7618 | Used to prevent the OpenEmbedded build system from building a given |
| 7619 | recipe. Specify the :term:`PN` value as a variable flag (``varflag``) |
| 7620 | and provide a reason, which will be reported when attempting to |
| 7621 | build the recipe. |
| 7622 | |
| 7623 | To prevent a recipe from being built, use the :term:`SKIP_RECIPE` |
| 7624 | variable in your ``local.conf`` file or distribution configuration. |
| 7625 | Here is an example which prevents ``myrecipe`` from being built:: |
| 7626 | |
| 7627 | SKIP_RECIPE[myrecipe] = "Not supported by our organization." |
| 7628 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7629 | :term:`SOC_FAMILY` |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 7630 | A colon-separated list grouping together machines based upon the same |
| 7631 | family of SoC (System On Chip). You typically set this variable in a |
| 7632 | common ``.inc`` file that you include in the configuration files of all |
| 7633 | the machines. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7634 | |
| 7635 | .. note:: |
| 7636 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7637 | You must include ``conf/machine/include/soc-family.inc`` for this |
| 7638 | variable to appear in :term:`MACHINEOVERRIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7639 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7640 | :term:`SOLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7641 | Defines the suffix for shared libraries used on the target platform. |
| 7642 | By default, this suffix is ".so.*" for all Linux-based systems and is |
| 7643 | defined in the ``meta/conf/bitbake.conf`` configuration file. |
| 7644 | |
| 7645 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7646 | ``FILES:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7647 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7648 | :term:`SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7649 | Defines the suffix for the development symbolic link (symlink) for |
| 7650 | shared libraries on the target platform. By default, this suffix is |
| 7651 | ".so" for Linux-based systems and is defined in the |
| 7652 | ``meta/conf/bitbake.conf`` configuration file. |
| 7653 | |
| 7654 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7655 | ``FILES:${PN}-dev``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7656 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 7657 | :term:`SOURCE_DATE_EPOCH` |
| 7658 | This defines a date expressed in number of seconds since |
| 7659 | the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by |
| 7660 | multiple build systems to force a timestamp in built binaries. |
| 7661 | Many upstream projects already support this variable. |
| 7662 | |
| 7663 | You will find more details in the `official specifications |
| 7664 | <https://reproducible-builds.org/specs/source-date-epoch/>`__. |
| 7665 | |
| 7666 | A value for each recipe is computed from the sources by |
| 7667 | :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`. |
| 7668 | |
| 7669 | If a recipe wishes to override the default behavior, it should set its |
| 7670 | own :term:`SOURCE_DATE_EPOCH` value:: |
| 7671 | |
| 7672 | SOURCE_DATE_EPOCH = "1613559011" |
| 7673 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7674 | :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7675 | 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] | 7676 | creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7677 | your ``local.conf`` configuration file ensures the source for all |
| 7678 | recipes are fetched regardless of whether or not a recipe is |
| 7679 | compatible with the configuration. A recipe is considered |
| 7680 | incompatible with the currently configured machine when either or |
| 7681 | both the :term:`COMPATIBLE_MACHINE` |
| 7682 | variable and :term:`COMPATIBLE_HOST` variables |
| 7683 | specify compatibility with a machine other than that of the current |
| 7684 | machine or host. |
| 7685 | |
| 7686 | .. note:: |
| 7687 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7688 | Do not set the :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7689 | variable unless you are creating a source mirror. In other words, |
| 7690 | do not set the variable during a normal build. |
| 7691 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7692 | :term:`SOURCE_MIRROR_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7693 | Defines your own :term:`PREMIRRORS` from which to |
| 7694 | first fetch source before attempting to fetch from the upstream |
| 7695 | specified in :term:`SRC_URI`. |
| 7696 | |
| 7697 | To use this variable, you must globally inherit the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7698 | :ref:`ref-classes-own-mirrors` class and then provide |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7699 | the URL to your mirrors. Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7700 | |
| 7701 | INHERIT += "own-mirrors" |
| 7702 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" |
| 7703 | |
| 7704 | .. note:: |
| 7705 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7706 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7707 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7708 | :term:`SPDX_ARCHIVE_PACKAGED` |
| 7709 | This option allows to add to :term:`SPDX` output compressed archives |
| 7710 | of the files in the generated target packages. |
| 7711 | |
| 7712 | Such archives are available in |
| 7713 | ``tmp/deploy/spdx/MACHINE/packages/packagename.tar.zst`` |
| 7714 | under the :term:`Build Directory`. |
| 7715 | |
| 7716 | Enable this option as follows:: |
| 7717 | |
| 7718 | SPDX_ARCHIVE_PACKAGED = "1" |
| 7719 | |
| 7720 | According to our tests on release 4.1 "langdale", building |
| 7721 | ``core-image-minimal`` for the ``qemux86-64`` machine, enabling this |
| 7722 | option multiplied the size of the ``tmp/deploy/spdx`` directory by a |
| 7723 | 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] | 7724 | :ref:`ref-classes-create-spdx` class with no option. |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7725 | |
| 7726 | Note that this option doesn't increase the size of :term:`SPDX` |
| 7727 | files in ``tmp/deploy/images/MACHINE``. |
| 7728 | |
| 7729 | :term:`SPDX_ARCHIVE_SOURCES` |
| 7730 | This option allows to add to :term:`SPDX` output compressed archives |
| 7731 | of the sources for packages installed on the target. It currently |
| 7732 | only works when :term:`SPDX_INCLUDE_SOURCES` is set. |
| 7733 | |
| 7734 | This is one way of fulfilling "source code access" license |
| 7735 | requirements. |
| 7736 | |
| 7737 | Such source archives are available in |
| 7738 | ``tmp/deploy/spdx/MACHINE/recipes/recipe-packagename.tar.zst`` |
| 7739 | under the :term:`Build Directory`. |
| 7740 | |
| 7741 | Enable this option as follows:: |
| 7742 | |
| 7743 | SPDX_INCLUDE_SOURCES = "1" |
| 7744 | SPDX_ARCHIVE_SOURCES = "1" |
| 7745 | |
| 7746 | According to our tests on release 4.1 "langdale", building |
| 7747 | ``core-image-minimal`` for the ``qemux86-64`` machine, enabling |
| 7748 | these options multiplied the size of the ``tmp/deploy/spdx`` |
| 7749 | directory by a factor of 11 (+1.4 GiB for this image), |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7750 | compared to just using the :ref:`ref-classes-create-spdx` |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7751 | class with no option. |
| 7752 | |
| 7753 | Note that using this option only marginally increases the size |
| 7754 | of the :term:`SPDX` output in ``tmp/deploy/images/MACHINE/`` |
| 7755 | (+ 0.07\% with the tested image), compared to just enabling |
| 7756 | :term:`SPDX_INCLUDE_SOURCES`. |
| 7757 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 7758 | :term:`SPDX_CUSTOM_ANNOTATION_VARS` |
| 7759 | This option allows to associate `SPDX annotations |
| 7760 | <https://spdx.github.io/spdx-spec/v2.3/annotations/>`__ to a recipe, |
| 7761 | using the values of variables in the recipe:: |
| 7762 | |
| 7763 | ANNOTATION1 = "First annotation for recipe" |
| 7764 | ANNOTATION2 = "Second annotation for recipe" |
| 7765 | SPDX_CUSTOM_ANNOTATION_VARS = "ANNOTATION1 ANNOTATION2" |
| 7766 | |
| 7767 | This will add a new block to the recipe ``.sdpx.json`` output:: |
| 7768 | |
| 7769 | "annotations": [ |
| 7770 | { |
| 7771 | "annotationDate": "2023-04-18T08:32:12Z", |
| 7772 | "annotationType": "OTHER", |
| 7773 | "annotator": "Tool: oe-spdx-creator - 1.0", |
| 7774 | "comment": "ANNOTATION1=First annotation for recipe" |
| 7775 | }, |
| 7776 | { |
| 7777 | "annotationDate": "2023-04-18T08:32:12Z", |
| 7778 | "annotationType": "OTHER", |
| 7779 | "annotator": "Tool: oe-spdx-creator - 1.0", |
| 7780 | "comment": "ANNOTATION2=Second annotation for recipe" |
| 7781 | } |
| 7782 | ], |
| 7783 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7784 | :term:`SPDX_INCLUDE_SOURCES` |
| 7785 | This option allows to add a description of the source files used to build |
| 7786 | the host tools and the target packages, to the ``spdx.json`` files in |
| 7787 | ``tmp/deploy/spdx/MACHINE/recipes/`` under the :term:`Build Directory`. |
| 7788 | As a consequence, the ``spdx.json`` files under the ``by-namespace`` and |
| 7789 | ``packages`` subdirectories in ``tmp/deploy/spdx/MACHINE`` are also |
| 7790 | modified to include references to such source file descriptions. |
| 7791 | |
| 7792 | Enable this option as follows:: |
| 7793 | |
| 7794 | SPDX_INCLUDE_SOURCES = "1" |
| 7795 | |
| 7796 | According to our tests on release 4.1 "langdale", building |
| 7797 | ``core-image-minimal`` for the ``qemux86-64`` machine, enabling |
| 7798 | this option multiplied the total size of the ``tmp/deploy/spdx`` |
| 7799 | directory by a factor of 3 (+291 MiB for this image), |
| 7800 | and the size of the ``IMAGE-MACHINE.spdx.tar.zst`` in |
| 7801 | ``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] | 7802 | image), compared to just using the :ref:`ref-classes-create-spdx` class |
| 7803 | with no option. |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 7804 | |
| 7805 | :term:`SPDX_PRETTY` |
| 7806 | This option makes the SPDX output more human-readable, using |
| 7807 | identation and newlines, instead of the default output in a |
| 7808 | single line:: |
| 7809 | |
| 7810 | SPDX_PRETTY = "1" |
| 7811 | |
| 7812 | The generated SPDX files are approximately 20% bigger, but |
| 7813 | this option is recommended if you want to inspect the SPDX |
| 7814 | output files with a text editor. |
| 7815 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7816 | :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7817 | Maps commonly used license names to their SPDX counterparts found in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7818 | ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7819 | mappings, see the ``meta/conf/licenses.conf`` file. |
| 7820 | |
| 7821 | For additional information, see the :term:`LICENSE` |
| 7822 | variable. |
| 7823 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7824 | :term:`SPECIAL_PKGSUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7825 | A list of prefixes for :term:`PN` used by the OpenEmbedded |
| 7826 | build system to create variants of recipes or packages. The list |
| 7827 | specifies the prefixes to strip off during certain circumstances such |
| 7828 | as the generation of the :term:`BPN` variable. |
| 7829 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7830 | :term:`SPL_BINARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7831 | The file type for the Secondary Program Loader (SPL). Some devices |
| 7832 | use an SPL from which to boot (e.g. the BeagleBone development |
| 7833 | board). For such cases, you can declare the file type of the SPL |
| 7834 | binary in the ``u-boot.inc`` include file, which is used in the |
| 7835 | U-Boot recipe. |
| 7836 | |
| 7837 | 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] | 7838 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7839 | |
| 7840 | # Some versions of u-boot build an SPL (Second Program Loader) image that |
| 7841 | # should be packaged along with the u-boot binary as well as placed in the |
| 7842 | # deploy directory. For those versions they can set the following variables |
| 7843 | # to allow packaging the SPL. |
| 7844 | SPL_BINARY ?= "" |
| 7845 | SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" |
| 7846 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" |
| 7847 | SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" |
| 7848 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7849 | The :term:`SPL_BINARY` variable helps form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7850 | various ``SPL_*`` variables used by the OpenEmbedded build system. |
| 7851 | |
| 7852 | See the BeagleBone machine configuration example in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7853 | ":ref:`dev-manual/layers:adding a layer using the \`\`bitbake-layers\`\` script`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7854 | section in the Yocto Project Board Support Package Developer's Guide |
| 7855 | for additional information. |
| 7856 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 7857 | :term:`SPL_MKIMAGE_DTCOPTS` |
| 7858 | Options for the device tree compiler passed to ``mkimage -D`` feature |
| 7859 | while creating a FIT image with the :ref:`ref-classes-uboot-sign` |
| 7860 | class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the |
| 7861 | :ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option |
| 7862 | to ``mkimage``. |
| 7863 | |
| 7864 | The default value is set to "" by the :ref:`ref-classes-uboot-config` |
| 7865 | class. |
| 7866 | |
| 7867 | :term:`SPL_SIGN_ENABLE` |
| 7868 | Enable signing of the U-Boot FIT image. The default value is "0". |
| 7869 | This variable is used by the :ref:`ref-classes-uboot-sign` class. |
| 7870 | |
| 7871 | :term:`SPL_SIGN_KEYDIR` |
| 7872 | Location of the directory containing the RSA key and certificate used for |
| 7873 | signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign` |
| 7874 | class. |
| 7875 | |
| 7876 | :term:`SPL_SIGN_KEYNAME` |
| 7877 | The name of keys used by the :ref:`ref-classes-kernel-fitimage` class |
| 7878 | for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR` |
| 7879 | directory. If we have for example a ``dev.key`` key and a ``dev.crt`` |
| 7880 | certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will |
| 7881 | have to set :term:`SPL_SIGN_KEYNAME` to ``dev``. |
| 7882 | |
| 7883 | :term:`SPLASH` |
| 7884 | This variable, used by the :ref:`ref-classes-image` class, allows |
| 7885 | to choose splashscreen applications. Set it to the names of packages |
| 7886 | for such applications to use. This variable is set by default to |
| 7887 | ``psplash``. |
| 7888 | |
| 7889 | :term:`SPLASH_IMAGES` |
| 7890 | This variable, used by the ``psplash`` recipe, allows to customize |
| 7891 | the default splashscreen image. |
| 7892 | |
| 7893 | Specified images in PNG format are converted to ``.h`` files by the recipe, |
| 7894 | and are included in the ``psplash`` binary, so you won't find them in |
| 7895 | the root filesystem. |
| 7896 | |
| 7897 | To make such a change, it is recommended to customize the |
| 7898 | ``psplash`` recipe in a custom layer. Here is an example structure for |
| 7899 | an ``ACME`` board:: |
| 7900 | |
| 7901 | meta-acme/recipes-core/psplash |
| 7902 | ├── files |
| 7903 | │  └── logo-acme.png |
| 7904 | └── psplash_%.bbappend |
| 7905 | |
| 7906 | And here are the contents of the ``psplash_%.bbappend`` file in |
| 7907 | this example:: |
| 7908 | |
| 7909 | SPLASH_IMAGES = "file://logo-acme.png;outsuffix=default" |
| 7910 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
| 7911 | |
| 7912 | You could even add specific configuration options for ``psplash``, |
| 7913 | for example:: |
| 7914 | |
| 7915 | EXTRA_OECONF += "--disable-startup-msg --enable-img-fullscreen" |
| 7916 | |
| 7917 | For information on append files, see the |
| 7918 | ":ref:`dev-manual/layers:appending other layers metadata with your layer`" |
| 7919 | section. |
| 7920 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7921 | :term:`SRCREV_FORMAT` |
| 7922 | See :term:`bitbake:SRCREV_FORMAT` in the BitBake manual. |
| 7923 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7924 | :term:`SRC_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7925 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7926 | See the BitBake manual for the initial description for this variable: |
| 7927 | :term:`bitbake:SRC_URI`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7928 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7929 | The following features are added by OpenEmbedded and the Yocto Project. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7930 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7931 | There are standard and recipe-specific options. Here are standard ones: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7932 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7933 | - ``apply`` --- whether to apply the patch or not. The default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7934 | action is to apply the patch. |
| 7935 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7936 | - ``striplevel`` --- which striplevel to use when applying the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7937 | patch. The default level is 1. |
| 7938 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7939 | - ``patchdir`` --- specifies the directory in which the patch should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7940 | be applied. The default is ``${``\ :term:`S`\ ``}``. |
| 7941 | |
| 7942 | Here are options specific to recipes building code from a revision |
| 7943 | control system: |
| 7944 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7945 | - ``mindate`` --- apply the patch only if |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7946 | :term:`SRCDATE` is equal to or greater than |
| 7947 | ``mindate``. |
| 7948 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7949 | - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7950 | than ``maxdate``. |
| 7951 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7952 | - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7953 | greater than ``minrev``. |
| 7954 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7955 | - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7956 | than ``maxrev``. |
| 7957 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7958 | - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7959 | ``rev``. |
| 7960 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7961 | - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7962 | ``rev``. |
| 7963 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7964 | .. note:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7965 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7966 | If you want the build system to pick up files specified through |
| 7967 | a :term:`SRC_URI` statement from your append file, you need to be |
| 7968 | sure to extend the :term:`FILESPATH` variable by also using the |
| 7969 | :term:`FILESEXTRAPATHS` variable from within your append file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7970 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7971 | :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7972 | By default, the OpenEmbedded build system automatically detects |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7973 | whether :term:`SRC_URI` contains files that are machine-specific. If so, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7974 | the build system automatically changes :term:`PACKAGE_ARCH`. Setting this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7975 | variable to "0" disables this behavior. |
| 7976 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7977 | :term:`SRCDATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7978 | The date of the source code used to build the package. This variable |
| 7979 | applies only if the source was fetched from a Source Code Manager |
| 7980 | (SCM). |
| 7981 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7982 | :term:`SRCPV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7983 | Returns the version string of the current package. This string is |
| 7984 | used to help define the value of :term:`PV`. |
| 7985 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7986 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7987 | configuration file in the :term:`Source Directory` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7988 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7989 | |
| 7990 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
| 7991 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7992 | Recipes that need to define :term:`PV` do so with the help of the |
| 7993 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7994 | located in ``meta/recipes-connectivity`` in the Source Directory |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7995 | defines :term:`PV` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7996 | |
| 7997 | PV = "0.12-git${SRCPV}" |
| 7998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7999 | :term:`SRCREV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8000 | The revision of the source code used to build the package. This |
| 8001 | variable applies to Subversion, Git, Mercurial, and Bazaar only. Note |
| 8002 | that if you want to build a fixed revision and you want to avoid |
| 8003 | performing a query on the remote repository every time BitBake parses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8004 | your recipe, you should specify a :term:`SRCREV` that is a full revision |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 8005 | identifier (e.g. the full SHA hash in git) and not just a tag. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8006 | |
| 8007 | .. note:: |
| 8008 | |
| 8009 | For information on limitations when inheriting the latest revision |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8010 | of software using :term:`SRCREV`, see the :term:`AUTOREV` variable |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8011 | description and the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8012 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8013 | section, which is in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8014 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8015 | :term:`SRCTREECOVEREDTASKS` |
| 8016 | A list of tasks that are typically not relevant (and therefore skipped) |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8017 | when building using the :ref:`ref-classes-externalsrc` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8018 | class. The default value as set in that class file is the set of tasks |
| 8019 | that are rarely needed when using external source:: |
| 8020 | |
| 8021 | SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" |
| 8022 | |
| 8023 | The notable exception is when processing external kernel source as |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8024 | defined in the :ref:`ref-classes-kernel-yocto` class file (formatted for |
| 8025 | aesthetics):: |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8026 | |
| 8027 | SRCTREECOVEREDTASKS += "\ |
| 8028 | do_validate_branches \ |
| 8029 | do_kernel_configcheck \ |
| 8030 | do_kernel_checkout \ |
| 8031 | do_fetch \ |
| 8032 | do_unpack \ |
| 8033 | do_patch \ |
| 8034 | " |
| 8035 | |
| 8036 | See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` |
| 8037 | variables for more information. |
| 8038 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8039 | :term:`SSTATE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8040 | The directory for the shared state cache. |
| 8041 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8042 | :term:`SSTATE_EXCLUDEDEPS_SYSROOT` |
| 8043 | This variable allows to specify indirect dependencies to exclude |
| 8044 | from sysroots, for example to avoid the situations when a dependency on |
| 8045 | any ``-native`` recipe will pull in all dependencies of that recipe |
| 8046 | in the recipe sysroot. This behaviour might not always be wanted, |
| 8047 | for example when that ``-native`` recipe depends on build tools |
| 8048 | that are not relevant for the current recipe. |
| 8049 | |
| 8050 | This way, irrelevant dependencies are ignored, which could have |
| 8051 | prevented the reuse of prebuilt artifacts stored in the Shared |
| 8052 | State Cache. |
| 8053 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8054 | :term:`SSTATE_EXCLUDEDEPS_SYSROOT` is evaluated as two regular |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8055 | expressions of recipe and dependency to ignore. An example |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 8056 | 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] | 8057 | |
| 8058 | # Nothing needs to depend on libc-initial |
| 8059 | # base-passwd/shadow-sysroot don't need their dependencies |
| 8060 | SSTATE_EXCLUDEDEPS_SYSROOT += "\ |
| 8061 | .*->.*-initial.* \ |
| 8062 | .*(base-passwd|shadow-sysroot)->.* \ |
| 8063 | " |
| 8064 | |
| 8065 | The ``->`` substring represents the dependency between |
| 8066 | the two regular expressions. |
| 8067 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8068 | :term:`SSTATE_MIRROR_ALLOW_NETWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8069 | If set to "1", allows fetches from mirrors that are specified in |
| 8070 | :term:`SSTATE_MIRRORS` to work even when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8071 | fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to |
| 8072 | "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if |
| 8073 | 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] | 8074 | your shared state cache, but you want to disable any other fetching |
| 8075 | from the network. |
| 8076 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8077 | :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8078 | Configures the OpenEmbedded build system to search other mirror |
| 8079 | locations for prebuilt cache data objects before building out the |
| 8080 | data. This variable works like fetcher :term:`MIRRORS` |
| 8081 | and :term:`PREMIRRORS` and points to the cache |
| 8082 | locations to check for the shared state (sstate) objects. |
| 8083 | |
| 8084 | You can specify a filesystem directory or a remote URL such as HTTP |
| 8085 | or FTP. The locations you specify need to contain the shared state |
| 8086 | cache (sstate-cache) results from previous builds. The sstate-cache |
| 8087 | you point to can also be from builds on other machines. |
| 8088 | |
| 8089 | When pointing to sstate build artifacts on another machine that uses |
| 8090 | a different GCC version for native builds, you must configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8091 | :term:`SSTATE_MIRRORS` with a regular expression that maps local search |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8092 | paths to server paths. The paths need to take into account |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8093 | :term:`NATIVELSBSTRING` set by the :ref:`ref-classes-uninative` class. |
| 8094 | For example, the following maps the local search path ``universal-4.9`` |
| 8095 | to the server-provided path server_url_sstate_path:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8096 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8097 | 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] | 8098 | |
| 8099 | If a mirror uses the same structure as |
| 8100 | :term:`SSTATE_DIR`, you need to add "PATH" at the |
| 8101 | end as shown in the examples below. The build system substitutes the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8102 | correct path within the directory structure:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8103 | |
| 8104 | SSTATE_MIRRORS ?= "\ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8105 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8106 | file://.* file:///some-local-dir/sstate/PATH" |
| 8107 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8108 | :term:`SSTATE_SCAN_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8109 | Controls the list of files the OpenEmbedded build system scans for |
| 8110 | hardcoded installation paths. The variable uses a space-separated |
| 8111 | list of filenames (not paths) with standard wildcard characters |
| 8112 | allowed. |
| 8113 | |
| 8114 | During a build, the OpenEmbedded build system creates a shared state |
| 8115 | (sstate) object during the first stage of preparing the sysroots. |
| 8116 | That object is scanned for hardcoded paths for original installation |
| 8117 | locations. The list of files that are scanned for paths is controlled |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8118 | by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files |
| 8119 | 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] | 8120 | than the variable being comprehensively set. The |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8121 | :ref:`ref-classes-sstate` class specifies the default list of files. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8122 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8123 | For details on the process, see the :ref:`ref-classes-staging` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8125 | :term:`STAGING_BASE_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8126 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 8127 | directory for the build host. |
| 8128 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8129 | :term:`STAGING_BASELIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8130 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 8131 | directory for the target for which the current recipe is being built |
| 8132 | (:term:`STAGING_DIR_HOST`). |
| 8133 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8134 | :term:`STAGING_BINDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8135 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 8136 | directory for the target for which the current recipe is being built |
| 8137 | (:term:`STAGING_DIR_HOST`). |
| 8138 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8139 | :term:`STAGING_BINDIR_CROSS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8140 | Specifies the path to the directory containing binary configuration |
| 8141 | scripts. These scripts provide configuration information for other |
| 8142 | software that wants to make use of libraries or include files |
| 8143 | provided by the software associated with the script. |
| 8144 | |
| 8145 | .. note:: |
| 8146 | |
| 8147 | This style of build configuration has been largely replaced by |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8148 | ``pkg-config``. Consequently, if ``pkg-config`` is supported by the |
| 8149 | library to which you are linking, it is recommended you use |
| 8150 | ``pkg-config`` instead of a provided configuration script. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8151 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8152 | :term:`STAGING_BINDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8153 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 8154 | directory for the build host. |
| 8155 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8156 | :term:`STAGING_DATADIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8157 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 8158 | directory for the target for which the current recipe is being built |
| 8159 | (:term:`STAGING_DIR_HOST`). |
| 8160 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8161 | :term:`STAGING_DATADIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8162 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 8163 | directory for the build host. |
| 8164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8165 | :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8166 | Helps construct the ``recipe-sysroots`` directory, which is used |
| 8167 | during packaging. |
| 8168 | |
| 8169 | For information on how staging for recipe-specific sysroots occurs, |
| 8170 | see the :ref:`ref-tasks-populate_sysroot` |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8171 | task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8172 | section in the Yocto Project Development Tasks Manual, the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8173 | ":ref:`overview-manual/concepts:configuration, compilation, and staging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8174 | section in the Yocto Project Overview and Concepts Manual, and the |
| 8175 | :term:`SYSROOT_DIRS` variable. |
| 8176 | |
| 8177 | .. note:: |
| 8178 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8179 | Recipes should never write files directly under the :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8180 | directory because the OpenEmbedded build system manages the |
| 8181 | directory automatically. Instead, files should be installed to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8182 | ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8183 | task and then the OpenEmbedded build system will stage a subset of |
| 8184 | those files into the sysroot. |
| 8185 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8186 | :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8187 | Specifies the path to the sysroot directory for the system on which |
| 8188 | the component is built to run (the system that hosts the component). |
| 8189 | For most recipes, this sysroot is the one in which that recipe's |
| 8190 | :ref:`ref-tasks-populate_sysroot` task copies |
| 8191 | files. Exceptions include ``-native`` recipes, where the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 8192 | :ref:`ref-tasks-populate_sysroot` task instead uses |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8193 | :term:`STAGING_DIR_NATIVE`. Depending on |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8194 | 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] | 8195 | have the following values: |
| 8196 | |
| 8197 | - For recipes building for the target machine, the value is |
| 8198 | "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". |
| 8199 | |
| 8200 | - For native recipes building for the build host, the value is empty |
| 8201 | given the assumption that when building for the build host, the |
| 8202 | build host's own directories should be used. |
| 8203 | |
| 8204 | .. note:: |
| 8205 | |
| 8206 | ``-native`` recipes are not installed into host paths like such |
| 8207 | as ``/usr``. Rather, these recipes are installed into |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8208 | :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8209 | standard build environment variables such as |
| 8210 | :term:`CPPFLAGS` and |
| 8211 | :term:`CFLAGS` are set up so that both host paths |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8212 | and :term:`STAGING_DIR_NATIVE` are searched for libraries and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8213 | headers using, for example, GCC's ``-isystem`` option. |
| 8214 | |
| 8215 | Thus, the emphasis is that the ``STAGING_DIR*`` variables |
| 8216 | should be viewed as input variables by tasks such as |
| 8217 | :ref:`ref-tasks-configure`, |
| 8218 | :ref:`ref-tasks-compile`, and |
| 8219 | :ref:`ref-tasks-install`. Having the real system |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8220 | root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8221 | for ``-native`` recipes, as they make use of host headers and |
| 8222 | libraries. |
| 8223 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8224 | :term:`STAGING_DIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8225 | Specifies the path to the sysroot directory used when building |
| 8226 | components that run on the build host itself. |
| 8227 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8228 | :term:`STAGING_DIR_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8229 | Specifies the path to the sysroot used for the system for which the |
| 8230 | component generates code. For components that do not generate code, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8231 | which is the majority, :term:`STAGING_DIR_TARGET` is set to match |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8232 | :term:`STAGING_DIR_HOST`. |
| 8233 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8234 | Some recipes build binaries that can run on the target system but those |
| 8235 | binaries in turn generate code for another different system (e.g. |
| 8236 | :ref:`ref-classes-cross-canadian` recipes). Using terminology from GNU, |
| 8237 | 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] | 8238 | different, system is referred to as the "TARGET". Thus, the binaries |
| 8239 | run on the "HOST" system and generate binaries for the "TARGET" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8240 | system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used |
| 8241 | for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8242 | sysroot used for the "TARGET" system. |
| 8243 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8244 | :term:`STAGING_ETCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8245 | Specifies the path to the ``/etc`` subdirectory of the sysroot |
| 8246 | directory for the build host. |
| 8247 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8248 | :term:`STAGING_EXECPREFIXDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8249 | Specifies the path to the ``/usr`` subdirectory of the sysroot |
| 8250 | directory for the target for which the current recipe is being built |
| 8251 | (:term:`STAGING_DIR_HOST`). |
| 8252 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8253 | :term:`STAGING_INCDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8254 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 8255 | sysroot directory for the target for which the current recipe being |
| 8256 | built (:term:`STAGING_DIR_HOST`). |
| 8257 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8258 | :term:`STAGING_INCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8259 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 8260 | sysroot directory for the build host. |
| 8261 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8262 | :term:`STAGING_KERNEL_BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8263 | Points to the directory containing the kernel build artifacts. |
| 8264 | Recipes building software that needs to access kernel build artifacts |
| 8265 | (e.g. ``systemtap-uprobes``) can look in the directory specified with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8266 | the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8267 | after the kernel has been built. |
| 8268 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8269 | :term:`STAGING_KERNEL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8270 | The directory with kernel headers that are required to build |
| 8271 | out-of-tree modules. |
| 8272 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8273 | :term:`STAGING_LIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8274 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 8275 | directory for the target for which the current recipe is being built |
| 8276 | (:term:`STAGING_DIR_HOST`). |
| 8277 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8278 | :term:`STAGING_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8279 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 8280 | directory for the build host. |
| 8281 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8282 | :term:`STAMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8283 | Specifies the base path used to create recipe stamp files. The path |
| 8284 | to an actual stamp file is constructed by evaluating this string and |
| 8285 | then appending additional information. Currently, the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8286 | assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8287 | file is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8288 | |
| 8289 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 8290 | |
| 8291 | For information on how BitBake uses stamp files to determine if a |
| 8292 | task should be rerun, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8293 | ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8294 | section in the Yocto Project Overview and Concepts Manual. |
| 8295 | |
| 8296 | See :term:`STAMPS_DIR`, |
| 8297 | :term:`MULTIMACH_TARGET_SYS`, |
| 8298 | :term:`PN`, :term:`EXTENDPE`, |
| 8299 | :term:`PV`, and :term:`PR` for related variable |
| 8300 | information. |
| 8301 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8302 | :term:`STAMPCLEAN` |
| 8303 | See :term:`bitbake:STAMPCLEAN` in the BitBake manual. |
| 8304 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8305 | :term:`STAMPS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8306 | Specifies the base directory in which the OpenEmbedded build system |
| 8307 | places stamps. The default directory is ``${TMPDIR}/stamps``. |
| 8308 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8309 | :term:`STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8310 | The minimal command and arguments to run ``strip``, which is used to |
| 8311 | strip symbols. |
| 8312 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8313 | :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8314 | The short (72 characters or less) summary of the binary package for |
| 8315 | packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8316 | :term:`SUMMARY` is used to define the |
| 8317 | :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8318 | not set in the recipe. |
| 8319 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8320 | :term:`SVNDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8321 | The directory in which files checked out of a Subversion system are |
| 8322 | stored. |
| 8323 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8324 | :term:`SYSLINUX_DEFAULT_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8325 | Specifies the kernel boot default console. If you want to use a |
| 8326 | console other than the default, set this variable in your recipe as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8327 | follows where "X" is the console number you want to use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8328 | |
| 8329 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" |
| 8330 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8331 | The :ref:`ref-classes-syslinux` class initially sets |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8332 | this variable to null but then checks for a value later. |
| 8333 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8334 | :term:`SYSLINUX_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8335 | Lists additional options to add to the syslinux file. You need to set |
| 8336 | this variable in your recipe. If you want to list multiple options, |
| 8337 | separate the options with a semicolon character (``;``). |
| 8338 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8339 | The :ref:`ref-classes-syslinux` class uses this variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8340 | to create a set of options. |
| 8341 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8342 | :term:`SYSLINUX_SERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8343 | Specifies the alternate serial port or turns it off. To turn off |
| 8344 | serial, set this variable to an empty string in your recipe. The |
| 8345 | variable's default value is set in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8346 | :ref:`ref-classes-syslinux` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8347 | |
| 8348 | SYSLINUX_SERIAL ?= "0 115200" |
| 8349 | |
| 8350 | The class checks for and uses the variable as needed. |
| 8351 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8352 | :term:`SYSLINUX_SERIAL_TTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8353 | Specifies the alternate console=tty... kernel boot argument. The |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8354 | variable's default value is set in the :ref:`ref-classes-syslinux` |
| 8355 | class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8356 | |
| 8357 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
| 8358 | |
| 8359 | The class checks for and uses the variable as needed. |
| 8360 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8361 | :term:`SYSLINUX_SPLASH` |
| 8362 | An ``.LSS`` file used as the background for the VGA boot menu when |
| 8363 | you use the boot menu. You need to set this variable in your recipe. |
| 8364 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8365 | The :ref:`ref-classes-syslinux` class checks for this |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8366 | variable and if found, the OpenEmbedded build system installs the |
| 8367 | splash screen. |
| 8368 | |
| 8369 | :term:`SYSROOT_DESTDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8370 | Points to the temporary directory under the work directory (default |
| 8371 | "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") |
| 8372 | where the files populated into the sysroot are assembled during the |
| 8373 | :ref:`ref-tasks-populate_sysroot` task. |
| 8374 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8375 | :term:`SYSROOT_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8376 | Directories that are staged into the sysroot by the |
| 8377 | :ref:`ref-tasks-populate_sysroot` task. By |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8378 | default, the following directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8379 | |
| 8380 | SYSROOT_DIRS = " \ |
| 8381 | ${includedir} \ |
| 8382 | ${libdir} \ |
| 8383 | ${base_libdir} \ |
| 8384 | ${nonarch_base_libdir} \ |
| 8385 | ${datadir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8386 | /sysroot-only \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8387 | " |
| 8388 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8389 | :term:`SYSROOT_DIRS_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8390 | Directories that are not staged into the sysroot by the |
| 8391 | :ref:`ref-tasks-populate_sysroot` task. You |
| 8392 | can use this variable to exclude certain subdirectories of |
| 8393 | directories listed in :term:`SYSROOT_DIRS` from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8394 | staging. By default, the following directories are not staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8395 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8396 | SYSROOT_DIRS_IGNORE = " \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8397 | ${mandir} \ |
| 8398 | ${docdir} \ |
| 8399 | ${infodir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8400 | ${datadir}/X11/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8401 | ${datadir}/applications \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8402 | ${datadir}/bash-completion \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8403 | ${datadir}/fonts \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8404 | ${datadir}/gtk-doc/html \ |
| 8405 | ${datadir}/installed-tests \ |
| 8406 | ${datadir}/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8407 | ${datadir}/pixmaps \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8408 | ${datadir}/terminfo \ |
| 8409 | ${libdir}/${BPN}/ptest \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8410 | " |
| 8411 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8412 | :term:`SYSROOT_DIRS_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8413 | Extra directories staged into the sysroot by the |
| 8414 | :ref:`ref-tasks-populate_sysroot` task for |
| 8415 | ``-native`` recipes, in addition to those specified in |
| 8416 | :term:`SYSROOT_DIRS`. By default, the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8417 | extra directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8418 | |
| 8419 | SYSROOT_DIRS_NATIVE = " \ |
| 8420 | ${bindir} \ |
| 8421 | ${sbindir} \ |
| 8422 | ${base_bindir} \ |
| 8423 | ${base_sbindir} \ |
| 8424 | ${libexecdir} \ |
| 8425 | ${sysconfdir} \ |
| 8426 | ${localstatedir} \ |
| 8427 | " |
| 8428 | |
| 8429 | .. note:: |
| 8430 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8431 | Programs built by ``-native`` recipes run directly from the sysroot |
| 8432 | (:term:`STAGING_DIR_NATIVE`), which is why additional directories |
| 8433 | containing program executables and supporting files need to be staged. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8434 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8435 | :term:`SYSROOT_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8436 | A list of functions to execute after files are staged into the |
| 8437 | sysroot. These functions are usually used to apply additional |
| 8438 | processing on the staged files, or to stage additional files. |
| 8439 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8440 | :term:`SYSTEMD_AUTO_ENABLE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8441 | When inheriting the :ref:`ref-classes-systemd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8442 | this variable specifies whether the specified service in |
| 8443 | :term:`SYSTEMD_SERVICE` should start |
| 8444 | automatically or not. By default, the service is enabled to |
| 8445 | automatically start at boot time. The default setting is in the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8446 | :ref:`ref-classes-systemd` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8447 | |
| 8448 | SYSTEMD_AUTO_ENABLE ??= "enable" |
| 8449 | |
| 8450 | You can disable the service by setting the variable to "disable". |
| 8451 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8452 | :term:`SYSTEMD_BOOT_CFG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8453 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8454 | "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8455 | configuration file that should be used. By default, the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8456 | :ref:`ref-classes-systemd-boot` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8457 | :term:`SYSTEMD_BOOT_CFG` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8458 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 8459 | SYSTEMD_BOOT_CFG ?= "${S}/loader.conf" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8460 | |
| 8461 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8462 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8463 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8464 | :term:`SYSTEMD_BOOT_ENTRIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8465 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8466 | "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8467 | list of entry files (``*.conf``) to install that contain one boot |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8468 | entry per file. By default, the :ref:`ref-classes-systemd-boot` class |
| 8469 | sets the :term:`SYSTEMD_BOOT_ENTRIES` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8470 | |
| 8471 | SYSTEMD_BOOT_ENTRIES ?= "" |
| 8472 | |
| 8473 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8474 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8475 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8476 | :term:`SYSTEMD_BOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8477 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8478 | "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8479 | boot menu timeout in seconds. By default, the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8480 | :ref:`ref-classes-systemd-boot` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8481 | :term:`SYSTEMD_BOOT_TIMEOUT` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8482 | |
| 8483 | SYSTEMD_BOOT_TIMEOUT ?= "10" |
| 8484 | |
| 8485 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8486 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8487 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8488 | :term:`SYSTEMD_DEFAULT_TARGET` |
| 8489 | |
| 8490 | This variable allows to set the default unit that systemd starts at bootup. |
| 8491 | Usually, this is either ``multi-user.target`` or ``graphical.target``. |
| 8492 | This works by creating a ``default.target`` symbolic link to the chosen systemd |
| 8493 | target file. |
| 8494 | |
| 8495 | See `systemd's documentation |
| 8496 | <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__ |
| 8497 | for details. |
| 8498 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 8499 | For example, this variable is used in the :oe_git:`core-image-minimal-xfce.bb |
| 8500 | </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] | 8501 | recipe:: |
| 8502 | |
| 8503 | SYSTEMD_DEFAULT_TARGET = "graphical.target" |
| 8504 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8505 | :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8506 | When inheriting the :ref:`ref-classes-systemd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8507 | this variable locates the systemd unit files when they are not found |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8508 | in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8509 | variable is set such that the systemd unit files are assumed to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8510 | reside in the recipes main package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8511 | |
| 8512 | SYSTEMD_PACKAGES ?= "${PN}" |
| 8513 | |
| 8514 | 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] | 8515 | 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] | 8516 | the build system can find the systemd unit files. |
| 8517 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8518 | :term:`SYSTEMD_SERVICE` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8519 | When inheriting the :ref:`ref-classes-systemd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8520 | this variable specifies the systemd service name for a package. |
| 8521 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8522 | Multiple services can be specified, each one separated by a space. |
| 8523 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8524 | When you specify this file in your recipe, use a package name |
| 8525 | override to indicate the package to which the value applies. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8526 | an example from the connman recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8527 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8528 | SYSTEMD_SERVICE:${PN} = "connman.service" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8529 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8530 | 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] | 8531 | :term:`SYSTEMD_PACKAGES`. Overrides not included in :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8532 | will be silently ignored. |
| 8533 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8534 | :term:`SYSVINIT_ENABLED_GETTYS` |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 8535 | When using :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8536 | specifies a space-separated list of the virtual terminals that should |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 8537 | run a :wikipedia:`getty <Getty_(Unix)>` (allowing login), assuming |
| 8538 | :term:`USE_VT` is not set to "0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8539 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8540 | 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] | 8541 | run a getty on the first virtual terminal). |
| 8542 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8543 | :term:`T` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8544 | This variable points to a directory were BitBake places temporary |
| 8545 | files, which consist mostly of task logs and scripts, when building a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8546 | particular recipe. The variable is typically set as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8547 | |
| 8548 | T = "${WORKDIR}/temp" |
| 8549 | |
| 8550 | The :term:`WORKDIR` is the directory into which |
| 8551 | BitBake unpacks and builds the recipe. The default ``bitbake.conf`` |
| 8552 | file sets this variable. |
| 8553 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8554 | The :term:`T` variable is not to be confused with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8555 | :term:`TMPDIR` variable, which points to the root of |
| 8556 | the directory tree where BitBake places the output of an entire |
| 8557 | build. |
| 8558 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8559 | :term:`TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8560 | The target machine's architecture. The OpenEmbedded build system |
| 8561 | supports many architectures. Here is an example list of architectures |
| 8562 | supported. This list is by no means complete as the architecture is |
| 8563 | configurable: |
| 8564 | |
| 8565 | - arm |
| 8566 | - i586 |
| 8567 | - x86_64 |
| 8568 | - powerpc |
| 8569 | - powerpc64 |
| 8570 | - mips |
| 8571 | - mipsel |
| 8572 | |
| 8573 | For additional information on machine architectures, see the |
| 8574 | :term:`TUNE_ARCH` variable. |
| 8575 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8576 | :term:`TARGET_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8577 | Specifies architecture-specific assembler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8578 | system. :term:`TARGET_AS_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8579 | :term:`TUNE_ASARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8580 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8581 | |
| 8582 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
| 8583 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8584 | :term:`TARGET_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8585 | Specifies architecture-specific C compiler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8586 | system. :term:`TARGET_CC_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8587 | :term:`TUNE_CCARGS` by default. |
| 8588 | |
| 8589 | .. note:: |
| 8590 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8591 | It is a common workaround to append :term:`LDFLAGS` to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8592 | :term:`TARGET_CC_ARCH` in recipes that build software for the target that |
| 8593 | would not otherwise respect the exported :term:`LDFLAGS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8594 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8595 | :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8596 | This is a specific kernel compiler flag for a CPU or Application |
| 8597 | Binary Interface (ABI) tune. The flag is used rarely and only for |
| 8598 | cases where a userspace :term:`TUNE_CCARGS` is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8599 | compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8600 | variable allows the kernel (and associated modules) to use a |
| 8601 | different configuration. See the |
| 8602 | ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the |
| 8603 | :term:`Source Directory` for an example. |
| 8604 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8605 | :term:`TARGET_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8606 | Specifies the flags to pass to the C compiler when building for the |
| 8607 | target. When building in the target context, |
| 8608 | :term:`CFLAGS` is set to the value of this variable by |
| 8609 | default. |
| 8610 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8611 | Additionally, the SDK's environment setup script sets the :term:`CFLAGS` |
| 8612 | variable in the environment to the :term:`TARGET_CFLAGS` value so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8613 | executables built using the SDK also have the flags applied. |
| 8614 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8615 | :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8616 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 8617 | C and the C++ compilers) when building for the target. When building |
| 8618 | in the target context, :term:`CPPFLAGS` is set to the |
| 8619 | value of this variable by default. |
| 8620 | |
| 8621 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8622 | :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8623 | value so that executables built using the SDK also have the flags |
| 8624 | applied. |
| 8625 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8626 | :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8627 | Specifies the flags to pass to the C++ compiler when building for the |
| 8628 | target. When building in the target context, |
| 8629 | :term:`CXXFLAGS` is set to the value of this variable |
| 8630 | by default. |
| 8631 | |
| 8632 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8633 | :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8634 | value so that executables built using the SDK also have the flags |
| 8635 | applied. |
| 8636 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8637 | :term:`TARGET_FPU` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8638 | Specifies the method for handling FPU code. For FPU-less targets, |
| 8639 | which include most ARM CPUs, the variable must be set to "soft". If |
| 8640 | not, the kernel emulation gets used, which results in a performance |
| 8641 | penalty. |
| 8642 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8643 | :term:`TARGET_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8644 | Specifies architecture-specific linker flags for the target system. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8645 | :term:`TARGET_LD_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8646 | :term:`TUNE_LDARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8647 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8648 | |
| 8649 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
| 8650 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8651 | :term:`TARGET_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8652 | Specifies the flags to pass to the linker when building for the |
| 8653 | target. When building in the target context, |
| 8654 | :term:`LDFLAGS` is set to the value of this variable |
| 8655 | by default. |
| 8656 | |
| 8657 | Additionally, the SDK's environment setup script sets the |
| 8658 | :term:`LDFLAGS` variable in the environment to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8659 | :term:`TARGET_LDFLAGS` value so that executables built using the SDK also |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8660 | have the flags applied. |
| 8661 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8662 | :term:`TARGET_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8663 | Specifies the target's operating system. The variable can be set to |
| 8664 | "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] | 8665 | for musl libc. For ARM/EABI targets, the possible values are |
| 8666 | "linux-gnueabi" and "linux-musleabi". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8667 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8668 | :term:`TARGET_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8669 | Specifies the prefix used for the toolchain binary target tools. |
| 8670 | |
| 8671 | Depending on the type of recipe and the build target, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8672 | :term:`TARGET_PREFIX` is set as follows: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8673 | |
| 8674 | - For recipes building for the target machine, the value is |
| 8675 | "${:term:`TARGET_SYS`}-". |
| 8676 | |
| 8677 | - For native recipes, the build system sets the variable to the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8678 | value of :term:`BUILD_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8679 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8680 | - For native SDK recipes (:ref:`ref-classes-nativesdk`), |
| 8681 | 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] | 8682 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8683 | :term:`TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8684 | Specifies the system, including the architecture and the operating |
| 8685 | system, for which the build is occurring in the context of the |
| 8686 | current recipe. |
| 8687 | |
| 8688 | The OpenEmbedded build system automatically sets this variable based |
| 8689 | on :term:`TARGET_ARCH`, |
| 8690 | :term:`TARGET_VENDOR`, and |
| 8691 | :term:`TARGET_OS` variables. |
| 8692 | |
| 8693 | .. note:: |
| 8694 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8695 | You do not need to set the :term:`TARGET_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8696 | |
| 8697 | Consider these two examples: |
| 8698 | |
| 8699 | - Given a native recipe on a 32-bit, x86 machine running Linux, the |
| 8700 | value is "i686-linux". |
| 8701 | |
| 8702 | - Given a recipe being built for a little-endian, MIPS target |
| 8703 | running Linux, the value might be "mipsel-linux". |
| 8704 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8705 | :term:`TARGET_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8706 | Specifies the name of the target vendor. |
| 8707 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8708 | :term:`TCLIBC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8709 | Specifies the GNU standard C library (``libc``) variant to use during |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8710 | the build process. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8711 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8712 | You can select "glibc", "musl", "newlib", or "baremetal". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8713 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8714 | :term:`TCLIBCAPPEND` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 8715 | Specifies a suffix to be appended onto the :term:`TMPDIR` value. The |
| 8716 | suffix identifies the ``libc`` variant for building. When you are |
| 8717 | building for multiple variants with the same :term:`Build Directory`, |
| 8718 | this mechanism ensures that output for different ``libc`` variants is |
| 8719 | kept separate to avoid potential conflicts. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8720 | |
| 8721 | In the ``defaultsetup.conf`` file, the default value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8722 | :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8723 | which normally only support one ``libc`` variant, set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8724 | :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8725 | in no suffix being applied. |
| 8726 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8727 | :term:`TCMODE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8728 | Specifies the toolchain selector. :term:`TCMODE` controls the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8729 | characteristics of the generated packages and images by telling the |
| 8730 | OpenEmbedded build system which toolchain profile to use. By default, |
| 8731 | the OpenEmbedded build system builds its own internal toolchain. The |
| 8732 | variable's default value is "default", which uses that internal |
| 8733 | toolchain. |
| 8734 | |
| 8735 | .. note:: |
| 8736 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8737 | 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] | 8738 | responsibility to ensure that the toolchain is compatible with the |
| 8739 | default toolchain. Using older or newer versions of these |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8740 | components might cause build problems. See |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 8741 | :doc:`Release Information </migration-guides/index>` for your |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8742 | version of the Yocto Project, to find the specific components with |
| 8743 | which the toolchain must be compatible. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8744 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8745 | The :term:`TCMODE` variable is similar to :term:`TCLIBC`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8746 | which controls the variant of the GNU standard C library (``libc``) |
| 8747 | used during the build process: ``glibc`` or ``musl``. |
| 8748 | |
| 8749 | With additional layers, it is possible to use a pre-compiled external |
| 8750 | toolchain. One example is the Sourcery G++ Toolchain. The support for |
| 8751 | this toolchain resides in the separate Mentor Graphics |
| 8752 | ``meta-sourcery`` layer at |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8753 | https://github.com/MentorEmbedded/meta-sourcery/. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8754 | |
| 8755 | The layer's ``README`` file contains information on how to use the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8756 | Sourcery G++ Toolchain as an external toolchain. You will have to |
| 8757 | add the layer to your ``bblayers.conf`` file and then set the |
| 8758 | :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file to |
| 8759 | the location of the toolchain. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8760 | |
| 8761 | The fundamentals used for this example apply to any external |
| 8762 | toolchain. You can use ``meta-sourcery`` as a template for adding |
| 8763 | support for other external toolchains. |
| 8764 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8765 | In addition to toolchain configuration, you will also need a |
| 8766 | corresponding toolchain recipe file. This recipe file needs to package |
| 8767 | up any pre-built objects in the toolchain such as ``libgcc``, |
| 8768 | ``libstdcc++``, any locales, and ``libc``. |
| 8769 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 8770 | :term:`TC_CXX_RUNTIME` |
| 8771 | Specifies the C/C++ STL and runtime variant to use during |
| 8772 | the build process. Default value is 'gnu' |
| 8773 | |
| 8774 | You can select "gnu", "llvm", or "android". |
| 8775 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 8776 | :term:`TEMPLATECONF` |
| 8777 | Specifies the directory used by the build system to find templates |
| 8778 | from which to build the ``bblayers.conf`` and ``local.conf`` files. |
| 8779 | Use this variable if you wish to customize such files, and the default |
| 8780 | BitBake targets shown when sourcing the ``oe-init-build-env`` script. |
| 8781 | |
| 8782 | For details, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8783 | :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] | 8784 | section in the Yocto Project Development Tasks manual. |
| 8785 | |
| 8786 | .. note:: |
| 8787 | |
| 8788 | You must set this variable in the external environment in order |
| 8789 | for it to work. |
| 8790 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8791 | :term:`TEST_EXPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8792 | The location the OpenEmbedded build system uses to export tests when |
| 8793 | the :term:`TEST_EXPORT_ONLY` variable is set |
| 8794 | to "1". |
| 8795 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8796 | The :term:`TEST_EXPORT_DIR` variable defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8797 | ``"${TMPDIR}/testimage/${PN}"``. |
| 8798 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8799 | :term:`TEST_EXPORT_ONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8800 | Specifies to export the tests only. Set this variable to "1" if you |
| 8801 | do not want to run the tests but you want them to be exported in a |
| 8802 | manner that you to run them outside of the build system. |
| 8803 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8804 | :term:`TEST_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8805 | Holds the SSH log and the boot log for QEMU machines. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8806 | :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8807 | |
| 8808 | .. note:: |
| 8809 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8810 | Actual test results reside in the task log (``log.do_testimage``), |
| 8811 | which is in the ``${WORKDIR}/temp/`` directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8812 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8813 | :term:`TEST_POWERCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8814 | For automated hardware testing, specifies the command to use to |
| 8815 | control the power of the target machine under test. Typically, this |
| 8816 | command would point to a script that performs the appropriate action |
| 8817 | (e.g. interacting with a web-enabled power strip). The specified |
| 8818 | command should expect to receive as the last argument "off", "on" or |
| 8819 | "cycle" specifying to power off, on, or cycle (power off and then |
| 8820 | power on) the device, respectively. |
| 8821 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8822 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8823 | For automated hardware testing, specifies additional arguments to |
| 8824 | pass through to the command specified in |
| 8825 | :term:`TEST_POWERCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8826 | :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] | 8827 | wish, for example, to separate the machine-specific and |
| 8828 | non-machine-specific parts of the arguments. |
| 8829 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8830 | :term:`TEST_QEMUBOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8831 | The time in seconds allowed for an image to boot before automated |
| 8832 | runtime tests begin to run against an image. The default timeout |
| 8833 | period to allow the boot process to reach the login prompt is 500 |
| 8834 | seconds. You can specify a different value in the ``local.conf`` |
| 8835 | file. |
| 8836 | |
| 8837 | For more information on testing images, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8838 | ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8839 | section in the Yocto Project Development Tasks Manual. |
| 8840 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8841 | :term:`TEST_SERIALCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8842 | For automated hardware testing, specifies the command to use to |
| 8843 | connect to the serial console of the target machine under test. This |
| 8844 | command simply needs to connect to the serial console and forward |
| 8845 | that connection to standard input and output as any normal terminal |
| 8846 | program does. |
| 8847 | |
| 8848 | For example, to use the Picocom terminal program on serial device |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8849 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8850 | |
| 8851 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
| 8852 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8853 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8854 | For automated hardware testing, specifies additional arguments to |
| 8855 | pass through to the command specified in |
| 8856 | :term:`TEST_SERIALCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8857 | :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] | 8858 | wish, for example, to separate the machine-specific and |
| 8859 | non-machine-specific parts of the command. |
| 8860 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8861 | :term:`TEST_SERVER_IP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8862 | The IP address of the build machine (host machine). This IP address |
| 8863 | is usually automatically detected. However, if detection fails, this |
| 8864 | variable needs to be set to the IP address of the build machine (i.e. |
| 8865 | where the build is taking place). |
| 8866 | |
| 8867 | .. note:: |
| 8868 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8869 | 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] | 8870 | tests such as the "dnf" test suite, which needs to download packages |
| 8871 | from ``WORKDIR/oe-rootfs-repo``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8872 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8873 | :term:`TEST_SUITES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8874 | An ordered list of tests (modules) to run against an image when |
| 8875 | performing automated runtime testing. |
| 8876 | |
| 8877 | The OpenEmbedded build system provides a core set of tests that can |
| 8878 | be used against images. |
| 8879 | |
| 8880 | .. note:: |
| 8881 | |
| 8882 | Currently, there is only support for running these tests under |
| 8883 | QEMU. |
| 8884 | |
| 8885 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8886 | 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] | 8887 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8888 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8889 | TEST_SUITES:append = " mytest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8890 | |
| 8891 | Alternatively, you can |
| 8892 | provide the "auto" option to have all applicable tests run against |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8893 | the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8894 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8895 | TEST_SUITES:append = " auto" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8896 | |
| 8897 | Using this option causes the |
| 8898 | build system to automatically run tests that are applicable to the |
| 8899 | image. Tests that are not applicable are skipped. |
| 8900 | |
| 8901 | The order in which tests are run is important. Tests that depend on |
| 8902 | another test must appear later in the list than the test on which |
| 8903 | they depend. For example, if you append the list of tests with two |
| 8904 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8905 | ``test_A``, then you must order the tests as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8906 | |
| 8907 | TEST_SUITES = "test_A test_B" |
| 8908 | |
| 8909 | For more information on testing images, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8910 | ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8911 | section in the Yocto Project Development Tasks Manual. |
| 8912 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8913 | :term:`TEST_TARGET` |
| 8914 | Specifies the target controller to use when running tests against a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8915 | test image. The default controller to use is "qemu":: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8916 | |
| 8917 | TEST_TARGET = "qemu" |
| 8918 | |
| 8919 | A target controller is a class that defines how an image gets |
| 8920 | deployed on a target and how a target is started. A layer can extend |
| 8921 | the controllers by adding a module in the layer's |
| 8922 | ``/lib/oeqa/controllers`` directory and by inheriting the |
| 8923 | ``BaseTarget`` class, which is an abstract class that cannot be used |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8924 | as a value of :term:`TEST_TARGET`. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8925 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8926 | You can provide the following arguments with :term:`TEST_TARGET`: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8927 | |
| 8928 | - *"qemu":* Boots a QEMU image and runs the tests. See the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8929 | ":ref:`dev-manual/runtime-testing:enabling runtime tests on qemu`" section |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8930 | in the Yocto Project Development Tasks Manual for more |
| 8931 | information. |
| 8932 | |
| 8933 | - *"simpleremote":* Runs the tests on target hardware that is |
| 8934 | already up and running. The hardware can be on the network or it |
| 8935 | can be a device running an image on QEMU. You must also set |
| 8936 | :term:`TEST_TARGET_IP` when you use |
| 8937 | "simpleremote". |
| 8938 | |
| 8939 | .. note:: |
| 8940 | |
| 8941 | This argument is defined in |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8942 | ``meta/lib/oeqa/controllers/simpleremote.py``. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8943 | |
| 8944 | For information on running tests on hardware, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8945 | ":ref:`dev-manual/runtime-testing:enabling runtime tests on hardware`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8946 | section in the Yocto Project Development Tasks Manual. |
| 8947 | |
| 8948 | :term:`TEST_TARGET_IP` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8949 | 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] | 8950 | variable has no effect when :term:`TEST_TARGET` is |
| 8951 | set to "qemu". |
| 8952 | |
| 8953 | 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] | 8954 | an example:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8955 | |
| 8956 | TEST_TARGET_IP = "192.168.1.4:2201" |
| 8957 | |
| 8958 | Specifying a port is |
| 8959 | useful when SSH is started on a non-standard port or in cases when |
| 8960 | your hardware under test is behind a firewall or network that is not |
| 8961 | directly accessible from your host and you need to do port address |
| 8962 | translation. |
| 8963 | |
| 8964 | :term:`TESTIMAGE_AUTO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8965 | Automatically runs the series of automated tests for images when an |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8966 | image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8967 | any image that successfully builds to automatically boot under QEMU. |
| 8968 | Using the variable also adds in dependencies so that any SDK for |
| 8969 | which testing is requested is automatically built first. |
| 8970 | |
| 8971 | These tests are written in Python making use of the ``unittest`` |
| 8972 | module, and the majority of them run commands on the target system |
| 8973 | over ``ssh``. You can set this variable to "1" in your ``local.conf`` |
| 8974 | file in the :term:`Build Directory` to have the |
| 8975 | OpenEmbedded build system automatically run these tests after an |
| 8976 | image successfully builds: |
| 8977 | |
| 8978 | TESTIMAGE_AUTO = "1" |
| 8979 | |
| 8980 | For more information |
| 8981 | on enabling, running, and writing these tests, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8982 | ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8983 | section in the Yocto Project Development Tasks Manual and the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 8984 | ":ref:`ref-classes-testimage`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8985 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8986 | :term:`THISDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8987 | The directory in which the file BitBake is currently parsing is |
| 8988 | located. Do not manually set this variable. |
| 8989 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8990 | :term:`TIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8991 | The time the build was started. Times appear using the hour, minute, |
| 8992 | and second (HMS) format (e.g. "140159" for one minute and fifty-nine |
| 8993 | seconds past 1400 hours). |
| 8994 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8995 | :term:`TMPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8996 | This variable is the base directory the OpenEmbedded build system |
| 8997 | uses for all build output and intermediate files (other than the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8998 | shared state cache). By default, the :term:`TMPDIR` variable points to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8999 | ``tmp`` within the :term:`Build Directory`. |
| 9000 | |
| 9001 | If you want to establish this directory in a location other than the |
| 9002 | default, you can uncomment and edit the following statement in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9003 | ``conf/local.conf`` file in the :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9004 | |
| 9005 | #TMPDIR = "${TOPDIR}/tmp" |
| 9006 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9007 | 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] | 9008 | 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] | 9009 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9010 | The filesystem used by :term:`TMPDIR` must have standard filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9011 | semantics (i.e. mixed-case files are unique, POSIX file locking, and |
| 9012 | persistent inodes). Due to various issues with NFS and bugs in some |
| 9013 | implementations, NFS does not meet this minimum requirement. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9014 | Consequently, :term:`TMPDIR` cannot be on NFS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9015 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9016 | :term:`TOOLCHAIN_HOST_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9017 | This variable lists packages the OpenEmbedded build system uses when |
| 9018 | building an SDK, which contains a cross-development environment. The |
| 9019 | packages specified by this variable are part of the toolchain set |
| 9020 | that runs on the :term:`SDKMACHINE`, and each |
| 9021 | package should usually have the prefix ``nativesdk-``. For example, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9022 | consider the following command when building an SDK:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9023 | |
| 9024 | $ bitbake -c populate_sdk imagename |
| 9025 | |
| 9026 | In this case, a default list of packages is |
| 9027 | set in this variable, but you can add additional packages to the |
| 9028 | list. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9029 | ":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] | 9030 | in the Yocto Project Application Development and the Extensible |
| 9031 | Software Development Kit (eSDK) manual for more information. |
| 9032 | |
| 9033 | For background information on cross-development toolchains in the |
| 9034 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9035 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9036 | section in the Yocto Project Overview and Concepts Manual. For |
| 9037 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9038 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9039 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9040 | Note that this variable applies to building an SDK, not an eSDK, |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9041 | in which case the :term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9042 | used instead. |
| 9043 | |
| 9044 | :term:`TOOLCHAIN_HOST_TASK_ESDK` |
| 9045 | This variable allows to extend what is installed in the host |
| 9046 | portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK` |
| 9047 | applying to SDKs. |
| 9048 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9049 | :term:`TOOLCHAIN_OUTPUTNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9050 | This variable defines the name used for the toolchain output. The |
| 9051 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9052 | the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9053 | |
| 9054 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" |
| 9055 | |
| 9056 | See |
| 9057 | the :term:`SDK_NAME` and |
| 9058 | :term:`SDK_VERSION` variables for additional |
| 9059 | information. |
| 9060 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9061 | :term:`TOOLCHAIN_TARGET_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9062 | This variable lists packages the OpenEmbedded build system uses when |
| 9063 | it creates the target part of an SDK (i.e. the part built for the |
| 9064 | target hardware), which includes libraries and headers. Use this |
| 9065 | variable to add individual packages to the part of the SDK that runs |
| 9066 | on the target. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9067 | ":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] | 9068 | in the Yocto Project Application Development and the Extensible |
| 9069 | Software Development Kit (eSDK) manual for more information. |
| 9070 | |
| 9071 | For background information on cross-development toolchains in the |
| 9072 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9073 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9074 | section in the Yocto Project Overview and Concepts Manual. For |
| 9075 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9076 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9077 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9078 | :term:`TOPDIR` |
| 9079 | See :term:`bitbake:TOPDIR` in the BitBake manual. |
| 9080 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9081 | :term:`TRANSLATED_TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9082 | A sanitized version of :term:`TARGET_ARCH`. This |
| 9083 | variable is used where the architecture is needed in a value where |
| 9084 | underscores are not allowed, for example within package filenames. In |
| 9085 | this case, dash characters replace any underscore characters used in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9086 | :term:`TARGET_ARCH`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9087 | |
| 9088 | Do not edit this variable. |
| 9089 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9090 | :term:`TUNE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9091 | The GNU canonical architecture for a specific architecture (i.e. |
| 9092 | ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses |
| 9093 | this value to setup configuration. |
| 9094 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9095 | :term:`TUNE_ARCH` definitions are specific to a given architecture. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9096 | definitions can be a single static definition, or can be dynamically |
| 9097 | adjusted. You can see details for a given CPU family by looking at |
| 9098 | the architecture's ``README`` file. For example, the |
| 9099 | ``meta/conf/machine/include/mips/README`` file in the |
| 9100 | :term:`Source Directory` provides information for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9101 | :term:`TUNE_ARCH` specific to the ``mips`` architecture. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9102 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9103 | :term:`TUNE_ARCH` is tied closely to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9104 | :term:`TARGET_ARCH`, which defines the target |
| 9105 | machine's architecture. The BitBake configuration file |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9106 | (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9107 | |
| 9108 | TARGET_ARCH = "${TUNE_ARCH}" |
| 9109 | |
| 9110 | The following list, which is by no means complete since architectures |
| 9111 | are configurable, shows supported machine architectures: |
| 9112 | |
| 9113 | - arm |
| 9114 | - i586 |
| 9115 | - x86_64 |
| 9116 | - powerpc |
| 9117 | - powerpc64 |
| 9118 | - mips |
| 9119 | - mipsel |
| 9120 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9121 | :term:`TUNE_ASARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9122 | Specifies architecture-specific assembler flags for the target |
| 9123 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9124 | :term:`TUNE_ASARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9125 | typically under ``meta/conf/machine/include/`` and are influenced |
| 9126 | through :term:`TUNE_FEATURES`. For example, the |
| 9127 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9128 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9129 | |
| 9130 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" |
| 9131 | |
| 9132 | .. note:: |
| 9133 | |
| 9134 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 9135 | in turn, affects the tune variables themselves (i.e. the tune can |
| 9136 | supply its own set of flags). |
| 9137 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9138 | :term:`TUNE_CCARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9139 | Specifies architecture-specific C compiler flags for the target |
| 9140 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9141 | :term:`TUNE_CCARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9142 | typically under ``meta/conf/machine/include/`` and are influenced |
| 9143 | through :term:`TUNE_FEATURES`. |
| 9144 | |
| 9145 | .. note:: |
| 9146 | |
| 9147 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 9148 | in turn, affects the tune variables themselves (i.e. the tune can |
| 9149 | supply its own set of flags). |
| 9150 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9151 | :term:`TUNE_FEATURES` |
| 9152 | Features used to "tune" a compiler for optimal use given a specific |
| 9153 | processor. The features are defined within the tune files and allow |
| 9154 | arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on |
| 9155 | the features. |
| 9156 | |
| 9157 | The OpenEmbedded build system verifies the features to be sure they |
| 9158 | are not conflicting and that they are supported. |
| 9159 | |
| 9160 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9161 | :term:`TUNE_FEATURES` as follows:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9162 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 9163 | TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9164 | |
| 9165 | See the :term:`DEFAULTTUNE` variable for more information. |
| 9166 | |
| 9167 | :term:`TUNE_LDARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9168 | Specifies architecture-specific linker flags for the target system. |
| 9169 | The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9170 | :term:`TUNE_LDARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9171 | typically under ``meta/conf/machine/include/`` and are influenced |
| 9172 | through :term:`TUNE_FEATURES`. For example, the |
| 9173 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9174 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9175 | |
| 9176 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" |
| 9177 | |
| 9178 | .. note:: |
| 9179 | |
| 9180 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 9181 | in turn, affects the tune variables themselves (i.e. the tune can |
| 9182 | supply its own set of flags). |
| 9183 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9184 | :term:`TUNE_PKGARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9185 | The package architecture understood by the packaging system to define |
| 9186 | the architecture, ABI, and tuning of output packages. The specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9187 | tune is defined using the "_tune" override as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9188 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 9189 | TUNE_PKGARCH:tune-tune = "tune" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9190 | |
| 9191 | These tune-specific package architectures are defined in the machine |
| 9192 | 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] | 9193 | the ``meta/conf/machine/include/x86/tune-core2.inc`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9194 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 9195 | TUNE_PKGARCH:tune-core2-32 = "core2-32" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9196 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9197 | :term:`TUNECONFLICTS[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9198 | Specifies CPU or Application Binary Interface (ABI) tuning features |
| 9199 | that conflict with feature. |
| 9200 | |
| 9201 | Known tuning conflicts are specified in the machine include files in |
| 9202 | the :term:`Source Directory`. Here is an example from |
| 9203 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file |
| 9204 | that lists the "o32" and "n64" features as conflicting with the "n32" |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9205 | feature:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9206 | |
| 9207 | TUNECONFLICTS[n32] = "o32 n64" |
| 9208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9209 | :term:`TUNEVALID[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9210 | Specifies a valid CPU or Application Binary Interface (ABI) tuning |
| 9211 | feature. The specified feature is stored as a flag. Valid features |
| 9212 | are specified in the machine include files (e.g. |
| 9213 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9214 | from that file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9215 | |
| 9216 | TUNEVALID[bigendian] = "Enable big-endian mode." |
| 9217 | |
| 9218 | See the machine include files in the :term:`Source Directory` |
| 9219 | for these features. |
| 9220 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9221 | :term:`UBOOT_CONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9222 | Configures the :term:`UBOOT_MACHINE` and can |
| 9223 | also define :term:`IMAGE_FSTYPES` for individual |
| 9224 | cases. |
| 9225 | |
| 9226 | Following is an example from the ``meta-fsl-arm`` layer. :: |
| 9227 | |
| 9228 | UBOOT_CONFIG ??= "sd" |
| 9229 | UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard" |
| 9230 | UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config" |
| 9231 | UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs" |
| 9232 | UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" |
| 9233 | |
| 9234 | 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] | 9235 | :term:`UBOOT_MACHINE`. The "sd" configuration defines |
| 9236 | "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 9237 | "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] | 9238 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9239 | 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] | 9240 | :ref:`ref-classes-uboot-config` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9241 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9242 | :term:`UBOOT_DTB_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9243 | 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] | 9244 | image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9245 | :ref:`ref-classes-kernel-fitimage` class to specify the load address to be |
| 9246 | 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] | 9247 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9248 | :term:`UBOOT_DTBO_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9249 | 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] | 9250 | image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9251 | :ref:`ref-classes-kernel-fitimage` class to specify the load address to be |
| 9252 | 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] | 9253 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9254 | :term:`UBOOT_ENTRYPOINT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9255 | 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] | 9256 | creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9257 | command-line parameter to the ``uboot-mkimage`` utility. |
| 9258 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 9259 | To pass a 64 bit address for FIT image creation, you will need to set: |
| 9260 | - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation. |
| 9261 | - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation. |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 9262 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 9263 | This variable is used by the :ref:`ref-classes-kernel-fitimage`, |
| 9264 | :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`, |
| 9265 | :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` |
| 9266 | classes. |
| 9267 | |
| 9268 | :term:`UBOOT_FIT_ADDRESS_CELLS` |
| 9269 | Specifies the value of the ``#address-cells`` value for the |
| 9270 | description of the U-Boot FIT image. |
| 9271 | |
| 9272 | The default value is set to "1" by the :ref:`ref-classes-uboot-sign` |
| 9273 | class, which corresponds to 32 bit addresses. |
| 9274 | |
| 9275 | For platforms that need to set 64 bit addresses in |
| 9276 | :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to |
| 9277 | set this value to "2", as two 32 bit values (cells) will be needed |
| 9278 | to represent such addresses. |
| 9279 | |
| 9280 | Here is an example setting "0x400000000" as a load address:: |
| 9281 | |
| 9282 | UBOOT_FIT_ADDRESS_CELLS = "2" |
| 9283 | UBOOT_LOADADDRESS= "0x04 0x00000000" |
| 9284 | |
| 9285 | See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__. |
| 9286 | |
| 9287 | :term:`UBOOT_FIT_DESC` |
| 9288 | Specifies the description string encoded into a U-Boot fitImage. The default |
| 9289 | value is set by the :ref:`ref-classes-uboot-sign` class as follows:: |
| 9290 | |
| 9291 | UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" |
| 9292 | |
| 9293 | :term:`UBOOT_FIT_GENERATE_KEYS` |
| 9294 | Decides whether to generate the keys for signing the U-Boot fitImage if |
| 9295 | they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`. |
| 9296 | The default value is "0". |
| 9297 | |
| 9298 | Enable this as follows:: |
| 9299 | |
| 9300 | UBOOT_FIT_GENERATE_KEYS = "1" |
| 9301 | |
| 9302 | This variable is used in the :ref:`ref-classes-uboot-sign` class. |
| 9303 | |
| 9304 | :term:`UBOOT_FIT_HASH_ALG` |
| 9305 | Specifies the hash algorithm used in creating the U-Boot FIT Image. |
| 9306 | It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign` |
| 9307 | class. |
| 9308 | |
| 9309 | :term:`UBOOT_FIT_KEY_GENRSA_ARGS` |
| 9310 | Arguments to ``openssl genrsa`` for generating a RSA private key for |
| 9311 | signing the U-Boot FIT image. The default value of this variable |
| 9312 | is set to "-F4" by the :ref:`ref-classes-uboot-sign` class. |
| 9313 | |
| 9314 | :term:`UBOOT_FIT_KEY_REQ_ARGS` |
| 9315 | Arguments to ``openssl req`` for generating a certificate for signing |
| 9316 | the U-Boot FIT image. The default value is "-batch -new" by the |
| 9317 | :ref:`ref-classes-uboot-sign` class, "batch" for |
| 9318 | non interactive mode and "new" for generating new keys. |
| 9319 | |
| 9320 | :term:`UBOOT_FIT_KEY_SIGN_PKCS` |
| 9321 | Format for the public key certificate used for signing the U-Boot FIT |
| 9322 | image. The default value is set to "x509" by the |
| 9323 | :ref:`ref-classes-uboot-sign` class. |
| 9324 | |
| 9325 | :term:`UBOOT_FIT_SIGN_ALG` |
| 9326 | Specifies the signature algorithm used in creating the U-Boot FIT Image. |
| 9327 | This variable is set by default to "rsa2048" by the |
| 9328 | :ref:`ref-classes-uboot-sign` class. |
| 9329 | |
| 9330 | :term:`UBOOT_FIT_SIGN_NUMBITS` |
| 9331 | Size of the private key used in signing the U-Boot FIT image, in number |
| 9332 | of bits. The default value for this variable is set to "2048" |
| 9333 | by the :ref:`ref-classes-uboot-sign` class. |
| 9334 | |
| 9335 | :term:`UBOOT_FITIMAGE_ENABLE` |
| 9336 | This variable allows to generate a FIT image for U-Boot, which is one |
| 9337 | of the ways to implement a verified boot process. |
| 9338 | |
| 9339 | Its default value is "0", so set it to "1" to enable this functionality:: |
| 9340 | |
| 9341 | UBOOT_FITIMAGE_ENABLE = "1" |
| 9342 | |
| 9343 | See the :ref:`ref-classes-uboot-sign` class for details. |
| 9344 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9345 | :term:`UBOOT_LOADADDRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9346 | 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] | 9347 | creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9348 | command-line parameter to the ``uboot-mkimage`` utility. |
| 9349 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 9350 | To pass a 64 bit address, you will also need to set: |
| 9351 | |
| 9352 | - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation. |
| 9353 | - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation. |
| 9354 | |
| 9355 | This variable is used by the :ref:`ref-classes-kernel-fitimage`, |
| 9356 | :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`, |
| 9357 | :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` |
| 9358 | classes. |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 9359 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9360 | :term:`UBOOT_LOCALVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9361 | Appends a string to the name of the local version of the U-Boot |
| 9362 | image. For example, assuming the version of the U-Boot image built |
| 9363 | 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] | 9364 | "2013.10-yocto" given the following statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9365 | |
| 9366 | UBOOT_LOCALVERSION = "-yocto" |
| 9367 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9368 | :term:`UBOOT_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9369 | Specifies the value passed on the ``make`` command line when building |
| 9370 | a U-Boot image. The value indicates the target platform |
| 9371 | configuration. You typically set this variable from the machine |
| 9372 | configuration file (i.e. ``conf/machine/machine_name.conf``). |
| 9373 | |
| 9374 | Please see the "Selection of Processor Architecture and Board Type" |
| 9375 | section in the U-Boot README for valid values for this variable. |
| 9376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9377 | :term:`UBOOT_MAKE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9378 | Specifies the target called in the ``Makefile``. The default target |
| 9379 | is "all". |
| 9380 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9381 | :term:`UBOOT_MKIMAGE` |
| 9382 | Specifies the name of the mkimage command as used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9383 | :ref:`ref-classes-kernel-fitimage` class to assemble |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9384 | the FIT image. This can be used to substitute an alternative command, wrapper |
| 9385 | script or function if desired. The default is "uboot-mkimage". |
| 9386 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9387 | :term:`UBOOT_MKIMAGE_DTCOPTS` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 9388 | Options for the device tree compiler passed to ``mkimage -D`` feature |
| 9389 | while creating a FIT image with the :ref:`ref-classes-kernel-fitimage` |
| 9390 | class. If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then the |
| 9391 | :ref:`ref-classes-kernel-fitimage` class will not pass the ``-D`` option |
| 9392 | to ``mkimage``. |
| 9393 | |
| 9394 | This variable is also used by the :ref:`ref-classes-uboot-sign` class. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9395 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 9396 | :term:`UBOOT_MKIMAGE_KERNEL_TYPE` |
| 9397 | Specifies the type argument for the kernel as passed to ``uboot-mkimage``. |
| 9398 | The default value is "kernel". |
| 9399 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9400 | :term:`UBOOT_MKIMAGE_SIGN` |
| 9401 | Specifies the name of the mkimage command as used by the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9402 | :ref:`ref-classes-kernel-fitimage` class to sign |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9403 | the FIT image after it has been assembled (if enabled). This can be used |
| 9404 | to substitute an alternative command, wrapper script or function if |
| 9405 | desired. The default is "${:term:`UBOOT_MKIMAGE`}". |
| 9406 | |
| 9407 | :term:`UBOOT_MKIMAGE_SIGN_ARGS` |
| 9408 | Optionally specifies additional arguments for the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9409 | :ref:`ref-classes-kernel-fitimage` class to pass to the |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9410 | mkimage command when signing the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9411 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9412 | :term:`UBOOT_RD_ENTRYPOINT` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9413 | Specifies the entrypoint for the RAM disk image. During FIT image |
| 9414 | creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in |
| 9415 | :ref:`ref-classes-kernel-fitimage` class to specify the entrypoint to be |
| 9416 | used in creating the Image Tree Source for the FIT image. |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 9417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9418 | :term:`UBOOT_RD_LOADADDRESS` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9419 | Specifies the load address for the RAM disk image. During FIT image |
| 9420 | creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in |
| 9421 | :ref:`ref-classes-kernel-fitimage` class to specify the load address to |
| 9422 | be used in creating the Image Tree Source for the FIT image. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9423 | |
| 9424 | :term:`UBOOT_SIGN_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9425 | Enable signing of FIT image. The default value is "0". |
| 9426 | |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 9427 | This variable is used by the :ref:`ref-classes-kernel-fitimage`, |
| 9428 | :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` |
| 9429 | classes. |
| 9430 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9431 | :term:`UBOOT_SIGN_KEYDIR` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 9432 | Location of the directory containing the RSA key and certificate used for |
| 9433 | signing FIT image, used by the :ref:`ref-classes-kernel-fitimage` and |
| 9434 | :ref:`ref-classes-uboot-sign` classes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9435 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9436 | :term:`UBOOT_SIGN_KEYNAME` |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 9437 | The name of keys used by the :ref:`ref-classes-kernel-fitimage` class |
| 9438 | for signing U-Boot FIT image stored in the :term:`UBOOT_SIGN_KEYDIR` |
| 9439 | directory. If we have for example a ``dev.key`` key and a ``dev.crt`` |
| 9440 | certificate stored in the :term:`UBOOT_SIGN_KEYDIR` directory, you will |
| 9441 | have to set :term:`UBOOT_SIGN_KEYNAME` to ``dev``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9442 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9443 | :term:`UBOOT_SUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9444 | Points to the generated U-Boot extension. For example, ``u-boot.sb`` |
| 9445 | has a ``.sb`` extension. |
| 9446 | |
| 9447 | The default U-Boot extension is ``.bin`` |
| 9448 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9449 | :term:`UBOOT_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9450 | Specifies the target used for building U-Boot. The target is passed |
| 9451 | directly as part of the "make" command (e.g. SPL and AIS). If you do |
| 9452 | not specifically set this variable, the OpenEmbedded build process |
| 9453 | passes and uses "all" for the target during the U-Boot building |
| 9454 | process. |
| 9455 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9456 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9457 | Specifies a list of options that, if reported by the configure script |
| 9458 | as being invalid, should not generate a warning during the |
| 9459 | :ref:`ref-tasks-configure` task. Normally, invalid |
| 9460 | configure options are simply not passed to the configure script (e.g. |
| 9461 | should be removed from :term:`EXTRA_OECONF` or |
| 9462 | :term:`PACKAGECONFIG_CONFARGS`). |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 9463 | However, there are common options that are passed to all |
| 9464 | configure scripts at a class level, but might not be valid for some |
| 9465 | configure scripts. Therefore warnings about these options are useless. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9466 | 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] | 9467 | |
| 9468 | The configure arguments check that uses |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9469 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9470 | :ref:`ref-classes-insane` class and is only enabled if the |
| 9471 | recipe inherits the :ref:`ref-classes-autotools` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9472 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9473 | :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9474 | For recipes inheriting the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9475 | :ref:`ref-classes-update-rc.d` class, :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9476 | specifies the package that contains the initscript that is enabled. |
| 9477 | |
| 9478 | The default value is "${PN}". Given that almost all recipes that |
| 9479 | install initscripts package them in the main package for the recipe, |
| 9480 | you rarely need to set this variable in individual recipes. |
| 9481 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9482 | :term:`UPSTREAM_CHECK_COMMITS` |
| 9483 | You can perform a per-recipe check for what the latest upstream |
| 9484 | source code version is by calling ``devtool latest-version recipe``. If |
| 9485 | the recipe source code is provided from Git repositories, but |
| 9486 | releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS` |
| 9487 | to ``1`` in the recipe, and the OpenEmbedded build system |
| 9488 | will compare the latest commit with the one currently specified |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9489 | by the recipe (:term:`SRCREV`):: |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9490 | |
| 9491 | UPSTREAM_CHECK_COMMITS = "1" |
| 9492 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9493 | :term:`UPSTREAM_CHECK_GITTAGREGEX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9494 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9495 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9496 | the recipe source code is provided from Git repositories, the |
| 9497 | OpenEmbedded build system determines the latest upstream version by |
| 9498 | picking the latest tag from the list of all repository tags. |
| 9499 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9500 | You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9501 | regular expression to filter only the relevant tags should the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9502 | default filter not work correctly:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9503 | |
| 9504 | UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" |
| 9505 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9506 | :term:`UPSTREAM_CHECK_REGEX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9507 | Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9508 | regular expression instead of the default one when the package |
| 9509 | checking system is parsing the page found using |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9510 | :term:`UPSTREAM_CHECK_URI`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9511 | |
| 9512 | UPSTREAM_CHECK_REGEX = "package_regex" |
| 9513 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9514 | :term:`UPSTREAM_CHECK_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9515 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9516 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9517 | the source code is provided from tarballs, the latest version is |
| 9518 | determined by fetching the directory listing where the tarball is and |
| 9519 | attempting to find a later tarball. When this approach does not work, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9520 | 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] | 9521 | contains the link to the latest tarball:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9522 | |
| 9523 | UPSTREAM_CHECK_URI = "recipe_url" |
| 9524 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9525 | :term:`UPSTREAM_VERSION_UNKNOWN` |
| 9526 | You can perform a per-recipe check for what the latest upstream |
| 9527 | source code version is by calling ``devtool latest-version recipe``. |
| 9528 | If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`, |
| 9529 | :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in |
| 9530 | the recipe allows to determine what the latest upstream version is, |
| 9531 | you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9532 | to acknowledge that the check cannot be performed:: |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 9533 | |
| 9534 | UPSTREAM_VERSION_UNKNOWN = "1" |
| 9535 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9536 | :term:`USE_DEVFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9537 | Determines if ``devtmpfs`` is used for ``/dev`` population. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9538 | default value used for :term:`USE_DEVFS` is "1" when no value is |
| 9539 | 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] | 9540 | statically populated ``/dev`` directory. |
| 9541 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9542 | 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] | 9543 | the Yocto Project Development Tasks Manual for information on how to |
| 9544 | use this variable. |
| 9545 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9546 | :term:`USE_VT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9547 | When using |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9548 | :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`, |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 9549 | determines whether or not to run a :wikipedia:`getty <Getty_(Unix)>` |
| 9550 | on any virtual terminals in order to enable logging in through those |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9551 | terminals. |
| 9552 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9553 | The default value used for :term:`USE_VT` is "1" when no default value is |
| 9554 | 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] | 9555 | machine configuration file for machines that do not have a graphical |
| 9556 | display attached and therefore do not need virtual terminal |
| 9557 | functionality. |
| 9558 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9559 | :term:`USER_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9560 | 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] | 9561 | OpenEmbedded build system to enable extra features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9562 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 9563 | Classes inherited using :term:`USER_CLASSES` must be located in the |
| 9564 | ``classes-global/`` or ``classes/`` subdirectories. |
| 9565 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9566 | The default list is set in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9567 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9568 | USER_CLASSES ?= "buildstats" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9569 | |
| 9570 | For more information, see |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 9571 | ``meta-poky/conf/templates/default/local.conf.sample`` in the |
| 9572 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9573 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9574 | :term:`USERADD_ERROR_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9575 | If set to ``error``, forces the OpenEmbedded build system to produce |
| 9576 | an error if the user identification (``uid``) and group |
| 9577 | identification (``gid``) values are not defined in any of the files |
| 9578 | listed in :term:`USERADD_UID_TABLES` and |
| 9579 | :term:`USERADD_GID_TABLES`. If set to |
| 9580 | ``warn``, a warning will be issued instead. |
| 9581 | |
| 9582 | The default behavior for the build system is to dynamically apply |
| 9583 | ``uid`` and ``gid`` values. Consequently, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9584 | :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] | 9585 | on using statically assigned ``gid`` and ``uid`` values, you should |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9586 | set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9587 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9588 | |
| 9589 | USERADD_ERROR_DYNAMIC = "error" |
| 9590 | |
| 9591 | Overriding the |
| 9592 | default behavior implies you are going to also take steps to set |
| 9593 | static ``uid`` and ``gid`` values through use of the |
| 9594 | :term:`USERADDEXTENSION`, |
| 9595 | :term:`USERADD_UID_TABLES`, and |
| 9596 | :term:`USERADD_GID_TABLES` variables. |
| 9597 | |
| 9598 | .. note:: |
| 9599 | |
| 9600 | There is a difference in behavior between setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9601 | :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9602 | When it is set to ``warn``, the build system will report a warning for |
| 9603 | every undefined ``uid`` and ``gid`` in any recipe. But when it is set |
| 9604 | to ``error``, it will only report errors for recipes that are actually |
| 9605 | built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9606 | This saves you from having to add static IDs for recipes that you |
| 9607 | know will never be built. |
| 9608 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9609 | :term:`USERADD_GID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9610 | Specifies a password file to use for obtaining static group |
| 9611 | identification (``gid``) values when the OpenEmbedded build system |
| 9612 | adds a group to the system during package installation. |
| 9613 | |
| 9614 | When applying static group identification (``gid``) values, the |
| 9615 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 9616 | ``files/group`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9617 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9618 | |
| 9619 | |
| 9620 | USERADD_GID_TABLES = "files/group" |
| 9621 | |
| 9622 | .. note:: |
| 9623 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9624 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 9625 | causes the build system to use static ``gid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9626 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9627 | :term:`USERADD_PACKAGES` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9628 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9629 | this variable specifies the individual packages within the recipe |
| 9630 | that require users and/or groups to be added. |
| 9631 | |
| 9632 | You must set this variable if the recipe inherits the class. For |
| 9633 | example, the following enables adding a user for the main package in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9634 | a recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9635 | |
| 9636 | USERADD_PACKAGES = "${PN}" |
| 9637 | |
| 9638 | .. note:: |
| 9639 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9640 | 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] | 9641 | variable, you need to set one or more of the :term:`USERADD_PARAM`, |
| 9642 | :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9643 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9644 | :term:`USERADD_PARAM` |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9645 | When inheriting the :ref:`ref-classes-useradd` class, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9646 | this variable specifies for a package what parameters should pass to |
| 9647 | the ``useradd`` command if you add a user to the system when the |
| 9648 | package is installed. |
| 9649 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9650 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9651 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 9652 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9653 | --no-create-home --shell /bin/false \ |
| 9654 | --user-group messagebus" |
| 9655 | |
| 9656 | For information on the |
| 9657 | standard Linux shell command ``useradd``, see |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 9658 | https://linux.die.net/man/8/useradd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9659 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9660 | :term:`USERADD_UID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9661 | Specifies a password file to use for obtaining static user |
| 9662 | identification (``uid``) values when the OpenEmbedded build system |
| 9663 | adds a user to the system during package installation. |
| 9664 | |
| 9665 | When applying static user identification (``uid``) values, the |
| 9666 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 9667 | ``files/passwd`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9668 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9669 | |
| 9670 | USERADD_UID_TABLES = "files/passwd" |
| 9671 | |
| 9672 | .. note:: |
| 9673 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9674 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 9675 | causes the build system to use static ``uid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9676 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9677 | :term:`USERADDEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9678 | When set to "useradd-staticids", causes the OpenEmbedded build system |
| 9679 | to base all user and group additions on a static ``passwd`` and |
| 9680 | ``group`` files found in :term:`BBPATH`. |
| 9681 | |
| 9682 | To use static user identification (``uid``) and group identification |
| 9683 | (``gid``) values, set the variable as follows in your ``local.conf`` |
| 9684 | file: USERADDEXTENSION = "useradd-staticids" |
| 9685 | |
| 9686 | .. note:: |
| 9687 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9688 | Setting this variable to use static ``uid`` and ``gid`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9689 | values causes the OpenEmbedded build system to employ the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9690 | :ref:`ref-classes-useradd` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9691 | |
| 9692 | If you use static ``uid`` and ``gid`` information, you must also |
| 9693 | specify the ``files/passwd`` and ``files/group`` files by setting the |
| 9694 | :term:`USERADD_UID_TABLES` and |
| 9695 | :term:`USERADD_GID_TABLES` variables. |
| 9696 | Additionally, you should also set the |
| 9697 | :term:`USERADD_ERROR_DYNAMIC` variable. |
| 9698 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9699 | :term:`VOLATILE_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9700 | Specifies the persistence of the target's ``/var/log`` directory, |
| 9701 | which is used to house postinstall target log files. |
| 9702 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9703 | 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] | 9704 | file is not persistent. You can override this setting by setting the |
| 9705 | variable to "no" to make the log directory persistent. |
| 9706 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 9707 | :term:`VOLATILE_TMP_DIR` |
| 9708 | Specifies the persistence of the target's ``/tmp`` directory. |
| 9709 | |
| 9710 | By default, :term:`VOLATILE_TMP_DIR` is set to "yes", in which case |
| 9711 | ``/tmp`` links to a directory which resides in RAM in a ``tmpfs`` |
| 9712 | filesystem. |
| 9713 | |
| 9714 | If instead, you want the ``/tmp`` directory to be persistent, set the |
| 9715 | variable to "no" to make it a regular directory in the root filesystem. |
| 9716 | |
| 9717 | This supports both sysvinit and systemd based systems. |
| 9718 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9719 | :term:`WARN_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9720 | Specifies the quality assurance checks whose failures are reported as |
| 9721 | warnings by the OpenEmbedded build system. You set this variable in |
| 9722 | your distribution configuration file. For a list of the checks you |
| 9723 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 9724 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9725 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 9726 | :term:`WATCHDOG_TIMEOUT` |
| 9727 | Specifies the timeout in seconds used by the ``watchdog`` recipe and |
| 9728 | also by ``systemd`` during reboot. The default is 60 seconds. |
| 9729 | |
| 9730 | :term:`WIRELESS_DAEMON` |
| 9731 | For ``connman`` and ``packagegroup-base``, specifies the wireless |
| 9732 | daemon to use. The default is "wpa-supplicant" (note that the value |
| 9733 | uses a dash and not an underscore). |
| 9734 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9735 | :term:`WKS_FILE` |
| 9736 | Specifies the location of the Wic kickstart file that is used by the |
| 9737 | OpenEmbedded build system to create a partitioned image |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9738 | (``image.wic``). For information on how to create a partitioned |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9739 | image, see the |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9740 | ":ref:`dev-manual/wic:creating partitioned images using wic`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9741 | section in the Yocto Project Development Tasks Manual. For details on |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9742 | the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9743 | |
| 9744 | :term:`WKS_FILE_DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9745 | When placed in the recipe that builds your image, this variable lists |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9746 | build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9747 | applicable when Wic images are active (i.e. when |
| 9748 | :term:`IMAGE_FSTYPES` contains entries related |
| 9749 | to Wic). If your recipe does not create Wic images, the variable has |
| 9750 | no effect. |
| 9751 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9752 | The :term:`WKS_FILE_DEPENDS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9753 | :term:`DEPENDS` variable. When you use the variable in |
| 9754 | your recipe that builds the Wic image, dependencies you list in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9755 | :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9756 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9757 | With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9758 | specify a list of additional dependencies (e.g. native tools, |
| 9759 | bootloaders, and so forth), that are required to build Wic images. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9760 | Following is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9761 | |
| 9762 | WKS_FILE_DEPENDS = "some-native-tool" |
| 9763 | |
| 9764 | In the |
| 9765 | previous example, some-native-tool would be replaced with an actual |
| 9766 | native tool on which the build would depend. |
| 9767 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 9768 | :term:`WKS_FILES` |
| 9769 | Specifies a list of candidate Wic kickstart files to be used by the |
| 9770 | OpenEmbedded build system to create a partitioned image. Only the |
| 9771 | first one that is found, from left to right, will be used. |
| 9772 | |
| 9773 | This is only useful when there are multiple ``.wks`` files that can be |
| 9774 | used to produce an image. A typical case is when multiple layers are |
| 9775 | used for different hardware platforms, each supplying a different |
| 9776 | ``.wks`` file. In this case, you specify all possible ones through |
| 9777 | :term:`WKS_FILES`. |
| 9778 | |
| 9779 | If only one ``.wks`` file is used, set :term:`WKS_FILE` instead. |
| 9780 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9781 | :term:`WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9782 | The pathname of the work directory in which the OpenEmbedded build |
| 9783 | system builds a recipe. This directory is located within the |
| 9784 | :term:`TMPDIR` directory structure and is specific to |
| 9785 | the recipe being built and the system for which it is being built. |
| 9786 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9787 | The :term:`WORKDIR` directory is defined as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9788 | |
| 9789 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
| 9790 | |
| 9791 | The actual directory depends on several things: |
| 9792 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9793 | - :term:`TMPDIR`: The top-level build output directory |
| 9794 | - :term:`MULTIMACH_TARGET_SYS`: The target system identifier |
| 9795 | - :term:`PN`: The recipe name |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 9796 | - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9797 | is usually the case for most recipes, then :term:`EXTENDPE` is blank. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9798 | - :term:`PV`: The recipe version |
| 9799 | - :term:`PR`: The recipe revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9800 | |
| 9801 | As an example, assume a Source Directory top-level folder name |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 9802 | ``poky``, a default :term:`Build Directory` at ``poky/build``, and a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9803 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose |
| 9804 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work |
| 9805 | directory the build system uses to build the package would be as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9806 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9807 | |
| 9808 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
| 9809 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9810 | :term:`XSERVER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9811 | Specifies the packages that should be installed to provide an X |
| 9812 | server and drivers for the current machine, assuming your image |
| 9813 | directly includes ``packagegroup-core-x11-xserver`` or, perhaps |
| 9814 | indirectly, includes "x11-base" in |
| 9815 | :term:`IMAGE_FEATURES`. |
| 9816 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9817 | The default value of :term:`XSERVER`, if not specified in the machine |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9818 | configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 9819 | |
| 9820 | :term:`XZ_THREADS` |
| 9821 | Specifies the number of parallel threads that should be used when |
| 9822 | using xz compression. |
| 9823 | |
| 9824 | By default this scales with core count, but is never set less than 2 |
| 9825 | to ensure that multi-threaded mode is always used so that the output |
| 9826 | file contents are deterministic. Builds will work with a value of 1 |
| 9827 | but the output will differ compared to the output from the compression |
| 9828 | generated when more than one thread is used. |
| 9829 | |
| 9830 | On systems where many tasks run in parallel, setting a limit to this |
| 9831 | can be helpful in controlling system resource usage. |
| 9832 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 9833 | :term:`XZ_MEMLIMIT` |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 9834 | Specifies the maximum memory the xz compression should use as a percentage |
| 9835 | of system memory. If unconstrained the xz compressor can use large amounts of |
| 9836 | memory and become problematic with parallelism elsewhere in the build. |
| 9837 | "50%" has been found to be a good value. |
| 9838 | |
| 9839 | :term:`ZSTD_THREADS` |
| 9840 | Specifies the number of parallel threads that should be used when |
| 9841 | using ZStandard compression. |
| 9842 | |
| 9843 | By default this scales with core count, but is never set less than 2 |
| 9844 | to ensure that multi-threaded mode is always used so that the output |
| 9845 | file contents are deterministic. Builds will work with a value of 1 |
| 9846 | but the output will differ compared to the output from the compression |
| 9847 | generated when more than one thread is used. |
| 9848 | |
| 9849 | On systems where many tasks run in parallel, setting a limit to this |
| 9850 | can be helpful in controlling system resource usage. |