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` |
| 129 | When inheriting the |
| 130 | :ref:`features_check <ref-classes-features_check>` |
| 131 | class, this variable identifies a list of distribution features where |
| 132 | at least one must be enabled in the current configuration in order |
| 133 | for the OpenEmbedded build system to build the recipe. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 134 | if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES` |
| 135 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 136 | the recipe will be skipped, and if the build system attempts to build |
| 137 | the recipe then an error will be triggered. |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 138 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 139 | :term:`APPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 140 | An override list of append strings for each target specified with |
| 141 | :term:`LABELS`. |
| 142 | |
| 143 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 144 | information on how this variable is used. |
| 145 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 146 | :term:`AR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 147 | The minimal command and arguments used to run ``ar``. |
| 148 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 149 | :term:`ARCHIVER_MODE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 150 | When used with the :ref:`archiver <ref-classes-archiver>` class, |
| 151 | determines the type of information used to create a released archive. |
| 152 | You can use this variable to create archives of patched source, |
| 153 | original source, configured source, and so forth by employing the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 154 | following variable flags (varflags):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 155 | |
| 156 | ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. |
| 157 | ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. |
| 158 | ARCHIVER_MODE[src] = "configured" # Uses configured source files. |
| 159 | ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch. |
| 160 | ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff. |
| 161 | ARCHIVER_MODE[dumpdata] = "1" # Uses environment data. |
| 162 | ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files. |
| 163 | ARCHIVER_MODE[srpm] = "1" # Uses RPM package files. |
| 164 | |
| 165 | For information on how the variable works, see the |
| 166 | ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`. |
| 167 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 168 | :term:`AS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 169 | Minimal command and arguments needed to run the assembler. |
| 170 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 171 | :term:`ASSUME_PROVIDED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 172 | Lists recipe names (:term:`PN` values) BitBake does not |
| 173 | attempt to build. Instead, BitBake assumes these recipes have already |
| 174 | been built. |
| 175 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 176 | In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 177 | tools that should not be built. An example is ``git-native``, which |
| 178 | when specified, allows for the Git binary from the host to be used |
| 179 | rather than building ``git-native``. |
| 180 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 181 | :term:`ASSUME_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 182 | Provides additional ``shlibs`` provider mapping information, which |
| 183 | adds to or overwrites the information provided automatically by the |
| 184 | system. Separate multiple entries using spaces. |
| 185 | |
| 186 | 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] | 187 | shlibname in packagename with the optional version:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 188 | |
| 189 | shlibname:packagename[_version] |
| 190 | |
| 191 | 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] | 192 | as being provided by the ``libegl-implementation`` package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 193 | |
| 194 | ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" |
| 195 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 196 | :term:`AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 197 | The email address used to contact the original author or authors in |
| 198 | order to send patches and forward bugs. |
| 199 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 200 | :term:`AUTO_LIBNAME_PKGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 201 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 202 | which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 203 | packages should be checked for libraries and renamed according to |
| 204 | Debian library package naming. |
| 205 | |
| 206 | The default value is "${PACKAGES}", which causes the debian class to |
| 207 | act on all packages that are explicitly generated by the recipe. |
| 208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 209 | :term:`AUTOREV` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 210 | When :term:`SRCREV` is set to the value of this variable, it specifies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 211 | use the latest source revision in the repository. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 212 | |
| 213 | SRCREV = "${AUTOREV}" |
| 214 | |
| 215 | If you use the previous statement to retrieve the latest version of |
| 216 | software, you need to be sure :term:`PV` contains |
| 217 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you |
| 218 | have a kernel recipe that inherits the |
| 219 | :ref:`kernel <ref-classes-kernel>` class and you use the previous |
| 220 | statement. In this example, ``${SRCPV}`` does not automatically get |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 221 | into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 222 | so that it does contain ``${SRCPV}``. |
| 223 | |
| 224 | For more information see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 225 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 226 | section in the Yocto Project Development Tasks Manual. |
| 227 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 228 | :term:`AUTO_SYSLINUXMENU` |
| 229 | Enables creating an automatic menu for the syslinux bootloader. You |
| 230 | must set this variable in your recipe. The |
| 231 | :ref:`syslinux <ref-classes-syslinux>` class checks this variable. |
| 232 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 233 | :term:`AVAILTUNES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 234 | The list of defined CPU and Application Binary Interface (ABI) |
| 235 | tunings (i.e. "tunes") available for use by the OpenEmbedded build |
| 236 | system. |
| 237 | |
| 238 | The list simply presents the tunes that are available. Not all tunes |
| 239 | may be compatible with a particular machine configuration, or with |
| 240 | each other in a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 241 | :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 242 | configuration. |
| 243 | |
| 244 | To add a tune to the list, be sure to append it with spaces using the |
| 245 | "+=" BitBake operator. Do not simply replace the list by using the |
| 246 | "=" operator. See the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 247 | ":ref:`bitbake: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] | 248 | User Manual for more information. |
| 249 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 250 | :term:`AZ_SAS` |
| 251 | Azure Storage Shared Access Signature, when using the |
| 252 | :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` |
| 253 | This variable can be defined to be used by the fetcher to authenticate |
| 254 | and gain access to non-public artifacts. |
| 255 | :: |
| 256 | |
| 257 | AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" |
| 258 | |
| 259 | For more information see Microsoft's Azure Storage documentation at |
| 260 | https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview |
| 261 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 262 | :term:`B` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 263 | The directory within the :term:`Build Directory` in which the |
| 264 | OpenEmbedded build system places generated objects during a recipe's |
| 265 | build process. By default, this directory is the same as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 266 | :term:`S` directory, which is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 267 | |
| 268 | S = "${WORKDIR}/${BP}" |
| 269 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 270 | You can separate the (:term:`S`) directory and the directory pointed to |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 271 | by the :term:`B` variable. Most Autotools-based recipes support |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 272 | separating these directories. The build system defaults to using |
| 273 | separate directories for ``gcc`` and some kernel recipes. |
| 274 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 275 | :term:`BAD_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 276 | Lists "recommended-only" packages to not install. Recommended-only |
| 277 | packages are packages installed only through the |
| 278 | :term:`RRECOMMENDS` variable. You can prevent any |
| 279 | of these "recommended" packages from being installed by listing them |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 280 | with the :term:`BAD_RECOMMENDATIONS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 281 | |
| 282 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." |
| 283 | |
| 284 | You can set this variable globally in your ``local.conf`` file or you |
| 285 | 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] | 286 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 287 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 288 | BAD_RECOMMENDATIONS:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 289 | |
| 290 | It is important to realize that if you choose to not install packages |
| 291 | using this variable and some other packages are dependent on them |
| 292 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 293 | variable), the OpenEmbedded build system ignores your request and |
| 294 | will install the packages to avoid dependency errors. |
| 295 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 296 | This variable is supported only when using the IPK and RPM |
| 297 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 298 | |
| 299 | See the :term:`NO_RECOMMENDATIONS` and the |
| 300 | :term:`PACKAGE_EXCLUDE` variables for related |
| 301 | information. |
| 302 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 303 | :term:`BASE_LIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 304 | The library directory name for the CPU or Application Binary |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 305 | Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 306 | context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 307 | section in the Yocto Project Development Tasks Manual for information |
| 308 | on Multilib. |
| 309 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 310 | 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] | 311 | the :term:`Source Directory`. If Multilib is not |
| 312 | being used, the value defaults to "lib". |
| 313 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 314 | :term:`BASE_WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 315 | Points to the base of the work directory for all recipes. The default |
| 316 | value is "${TMPDIR}/work". |
| 317 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 318 | :term:`BB_ALLOWED_NETWORKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 319 | Specifies a space-delimited list of hosts that the fetcher is allowed |
| 320 | to use to obtain the required source code. Following are |
| 321 | considerations surrounding this variable: |
| 322 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 323 | - 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] | 324 | or set to "0". |
| 325 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 326 | - There is limited support for wildcard matching against the beginning of |
| 327 | host names. For example, the following setting matches |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 328 | ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``. |
| 329 | :: |
| 330 | |
| 331 | BB_ALLOWED_NETWORKS = "*.gnu.org" |
| 332 | |
| 333 | .. note:: |
| 334 | |
| 335 | The use of the "``*``" character only works at the beginning of |
| 336 | a host name and it must be isolated from the remainder of the |
| 337 | host name. You cannot use the wildcard character in any other |
| 338 | location of the name or combined with the front part of the |
| 339 | name. |
| 340 | |
| 341 | For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` |
| 342 | is not. |
| 343 | |
| 344 | - Mirrors not in the host list are skipped and logged in debug. |
| 345 | |
| 346 | - Attempts to access networks not in the host list cause a failure. |
| 347 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 348 | Using :term:`BB_ALLOWED_NETWORKS` in conjunction with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 349 | :term:`PREMIRRORS` is very useful. Adding the host |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 350 | 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] | 351 | fetched from an allowed location and avoids raising an error when a |
| 352 | host that is not allowed is in a :term:`SRC_URI` |
| 353 | statement. This is because the fetcher does not attempt to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 354 | host listed in :term:`SRC_URI` after a successful fetch from the |
| 355 | :term:`PREMIRRORS` occurs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 356 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 357 | :term:`BB_DANGLINGAPPENDS_WARNONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 358 | Defines how BitBake handles situations where an append file |
| 359 | (``.bbappend``) has no corresponding recipe file (``.bb``). This |
| 360 | condition often occurs when layers get out of sync (e.g. ``oe-core`` |
| 361 | bumps a recipe version and the old recipe no longer exists and the |
| 362 | other layer has not been updated to the new version of the recipe |
| 363 | yet). |
| 364 | |
| 365 | The default fatal behavior is safest because it is the sane reaction |
| 366 | given something is out of sync. It is important to realize when your |
| 367 | changes are no longer being applied. |
| 368 | |
| 369 | You can change the default behavior by setting this variable to "1", |
| 370 | "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] | 371 | :term:`Build Directory`: Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 372 | |
| 373 | BB_DANGLINGAPPENDS_WARNONLY = "1" |
| 374 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 375 | :term:`BB_DISKMON_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 376 | Monitors disk space and available inodes during the build and allows |
| 377 | you to control the build based on these parameters. |
| 378 | |
| 379 | Disk space monitoring is disabled by default. To enable monitoring, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 380 | 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] | 381 | found in the :term:`Build Directory`. Use the |
| 382 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 383 | |
| 384 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 385 | |
| 386 | BB_DISKMON_DIRS = "action,dir,threshold [...]" |
| 387 | |
| 388 | where: |
| 389 | |
| 390 | action is: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 391 | ABORT: Immediately stop the build when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 392 | a threshold is broken. |
| 393 | STOPTASKS: Stop the build after the currently |
| 394 | executing tasks have finished when |
| 395 | a threshold is broken. |
| 396 | WARN: Issue a warning but continue the |
| 397 | build when a threshold is broken. |
| 398 | Subsequent warnings are issued as |
| 399 | defined by the BB_DISKMON_WARNINTERVAL |
| 400 | variable, which must be defined in |
| 401 | the conf/local.conf file. |
| 402 | |
| 403 | dir is: |
| 404 | Any directory you choose. You can specify one or |
| 405 | more directories to monitor by separating the |
| 406 | groupings with a space. If two directories are |
| 407 | on the same device, only the first directory |
| 408 | is monitored. |
| 409 | |
| 410 | threshold is: |
| 411 | Either the minimum available disk space, |
| 412 | the minimum number of free inodes, or |
| 413 | both. You must specify at least one. To |
| 414 | omit one or the other, simply omit the value. |
| 415 | Specify the threshold using G, M, K for Gbytes, |
| 416 | Mbytes, and Kbytes, respectively. If you do |
| 417 | not specify G, M, or K, Kbytes is assumed by |
| 418 | default. Do not use GB, MB, or KB. |
| 419 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 420 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 421 | |
| 422 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
| 423 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
| 424 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" |
| 425 | |
| 426 | The first example works only if you also provide the |
| 427 | :term:`BB_DISKMON_WARNINTERVAL` |
| 428 | variable in the ``conf/local.conf``. This example causes the build |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 429 | system to immediately stop when either the disk space in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 430 | ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops |
| 431 | below 100 Kbytes. Because two directories are provided with the |
| 432 | variable, the build system also issue a warning when the disk space |
| 433 | in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number |
| 434 | of free inodes drops below 100 Kbytes. Subsequent warnings are issued |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 435 | during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 436 | variable. |
| 437 | |
| 438 | The second example stops the build after all currently executing |
| 439 | tasks complete when the minimum disk space in the ``${TMPDIR}`` |
| 440 | directory drops below 1 Gbyte. No disk monitoring occurs for the free |
| 441 | inodes in this case. |
| 442 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 443 | The final example immediately stops the build when the number of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 444 | free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No |
| 445 | disk space monitoring for the directory itself occurs in this case. |
| 446 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 447 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 448 | Defines the disk space and free inode warning intervals. To set these |
| 449 | intervals, define the variable in your ``conf/local.conf`` file in |
| 450 | the :term:`Build Directory`. |
| 451 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 452 | 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] | 453 | must also use the :term:`BB_DISKMON_DIRS` |
| 454 | variable and define its action as "WARN". During the build, |
| 455 | subsequent warnings are issued each time disk space or number of free |
| 456 | inodes further reduces by the respective interval. |
| 457 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 458 | If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you |
| 459 | do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 460 | monitoring interval defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 461 | |
| 462 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 463 | |
| 464 | When specifying the variable in your configuration file, use the |
| 465 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 466 | |
| 467 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 468 | |
| 469 | BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" |
| 470 | |
| 471 | where: |
| 472 | |
| 473 | disk_space_interval is: |
| 474 | An interval of memory expressed in either |
| 475 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 476 | respectively. You cannot use GB, MB, or KB. |
| 477 | |
| 478 | disk_inode_interval is: |
| 479 | An interval of free inodes expressed in either |
| 480 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 481 | respectively. You cannot use GB, MB, or KB. |
| 482 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 483 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 484 | |
| 485 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
| 486 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 487 | |
| 488 | These variables cause the |
| 489 | OpenEmbedded build system to issue subsequent warnings each time the |
| 490 | available disk space further reduces by 50 Mbytes or the number of |
| 491 | free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` |
| 492 | directory. Subsequent warnings based on the interval occur each time |
| 493 | a respective interval is reached beyond the initial warning (i.e. 1 |
| 494 | Gbytes and 100 Kbytes). |
| 495 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 496 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 497 | Causes tarballs of the source control repositories (e.g. Git |
| 498 | repositories), including metadata, to be placed in the |
| 499 | :term:`DL_DIR` directory. |
| 500 | |
| 501 | For performance reasons, creating and placing tarballs of these |
| 502 | repositories is not the default action by the OpenEmbedded build |
| 503 | system. |
| 504 | :: |
| 505 | |
| 506 | BB_GENERATE_MIRROR_TARBALLS = "1" |
| 507 | |
| 508 | Set this variable in your |
| 509 | ``local.conf`` file in the :term:`Build Directory`. |
| 510 | |
| 511 | Once you have the tarballs containing your source files, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 512 | 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] | 513 | source control work directories. |
| 514 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 515 | :term:`BB_NUMBER_THREADS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 516 | The maximum number of tasks BitBake should run in parallel at any one |
| 517 | time. The OpenEmbedded build system automatically configures this |
| 518 | variable to be equal to the number of cores on the build system. For |
| 519 | example, a system with a dual core processor that also uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 520 | hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 521 | to "4". |
| 522 | |
| 523 | For single socket systems (i.e. one CPU), you should not have to |
| 524 | override this variable to gain optimal parallelism during builds. |
| 525 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 526 | 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] | 527 | is not set higher than "20". |
| 528 | |
| 529 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 530 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 531 | section in the Yocto Project Development Tasks Manual. |
| 532 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 533 | :term:`BB_SERVER_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 534 | Specifies the time (in seconds) after which to unload the BitBake |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 535 | server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 536 | long the BitBake server stays resident between invocations. |
| 537 | |
| 538 | For example, the following statement in your ``local.conf`` file |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 539 | instructs the server to be unloaded after 20 seconds of inactivity:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 540 | |
| 541 | BB_SERVER_TIMEOUT = "20" |
| 542 | |
| 543 | If you want the server to never be unloaded, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 544 | set :term:`BB_SERVER_TIMEOUT` to "-1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 545 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 546 | :term:`BBCLASSEXTEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 547 | 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] | 548 | software. There are common variants for recipes as "natives" like |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 549 | ``quilt-native``, which is a copy of Quilt built to run on the build |
| 550 | system; "crosses" such as ``gcc-cross``, which is a compiler built to |
| 551 | run on the build machine but produces binaries that run on the target |
| 552 | :term:`MACHINE`; "nativesdk", which targets the SDK |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 553 | machine instead of :term:`MACHINE`; and "mulitlibs" in the form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 554 | "``multilib:``\ multilib_name". |
| 555 | |
| 556 | 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] | 557 | 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] | 558 | |
| 559 | BBCLASSEXTEND =+ "native nativesdk" |
| 560 | BBCLASSEXTEND =+ "multilib:multilib_name" |
| 561 | |
| 562 | .. note:: |
| 563 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 564 | Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 565 | variants by rewriting variable values and applying overrides such |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 566 | as ``:class-native``. For example, to generate a native version of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 567 | a recipe, a :term:`DEPENDS` on "foo" is rewritten |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 568 | to a :term:`DEPENDS` on "foo-native". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 569 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 570 | Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 571 | Parsing once adds some limitations. For example, it is not |
| 572 | possible to include a different file depending on the variant, |
| 573 | since ``include`` statements are processed when the recipe is |
| 574 | parsed. |
| 575 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 576 | :term:`BBFILE_COLLECTIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 577 | Lists the names of configured layers. These names are used to find |
| 578 | the other ``BBFILE_*`` variables. Typically, each layer will append |
| 579 | its name to this variable in its ``conf/layer.conf`` file. |
| 580 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 581 | :term:`BBFILE_PATTERN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 582 | Variable that expands to match files from |
| 583 | :term:`BBFILES` in a particular layer. This variable |
| 584 | is used in the ``conf/layer.conf`` file and must be suffixed with the |
| 585 | name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``). |
| 586 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 587 | :term:`BBFILE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 588 | Assigns the priority for recipe files in each layer. |
| 589 | |
| 590 | This variable is useful in situations where the same recipe appears |
| 591 | in more than one layer. Setting this variable allows you to |
| 592 | prioritize a layer against other layers that contain the same recipe |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 593 | --- effectively letting you control the precedence for the multiple |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 594 | layers. The precedence established through this variable stands |
| 595 | regardless of a recipe's version (:term:`PV` variable). For |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 596 | example, a layer that has a recipe with a higher :term:`PV` value but for |
| 597 | 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] | 598 | has a lower precedence. |
| 599 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 600 | A larger value for the :term:`BBFILE_PRIORITY` variable results in a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 601 | higher precedence. For example, the value 6 has a higher precedence |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 602 | than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable |
| 603 | is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 604 | for more information. The default priority, if unspecified for a |
| 605 | layer with no dependencies, is the lowest defined priority + 1 (or 1 |
| 606 | if no priorities are defined). |
| 607 | |
| 608 | .. tip:: |
| 609 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 610 | You can use the command ``bitbake-layers show-layers`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 611 | to list all configured layers along with their priorities. |
| 612 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 613 | :term:`BBFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 614 | A space-separated list of recipe files BitBake uses to build |
| 615 | software. |
| 616 | |
| 617 | When specifying recipe files, you can pattern match using Python's |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 618 | `glob <https://docs.python.org/3/library/glob.html>`__ syntax. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 619 | For details on the syntax, see the documentation by following the |
| 620 | previous link. |
| 621 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 622 | :term:`BBFILES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 623 | Activates content when identified layers are present. You identify |
| 624 | the layers by the collections that the layers define. |
| 625 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 626 | Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 627 | whose corresponding ``.bb`` file is in a layer that attempts to |
| 628 | modify other layers through ``.bbappend`` but does not want to |
| 629 | introduce a hard dependency on those other layers. |
| 630 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 631 | Use the following form for :term:`BBFILES_DYNAMIC`: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 632 | ``collection_name:filename_pattern``. |
| 633 | |
| 634 | The following example identifies two collection names and two |
| 635 | filename patterns:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 636 | |
| 637 | BBFILES_DYNAMIC += " \ |
| 638 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
| 639 | core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ |
| 640 | " |
| 641 | |
| 642 | This next example shows an error message that occurs because invalid |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 643 | entries are found, which cause parsing to fail: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 644 | |
| 645 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 646 | |
| 647 | ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: |
| 648 | /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend |
| 649 | /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend |
| 650 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 651 | :term:`BBINCLUDELOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 652 | Variable that controls how BitBake displays logs on build failure. |
| 653 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 654 | :term:`BBINCLUDELOGS_LINES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 655 | If :term:`BBINCLUDELOGS` is set, specifies the |
| 656 | maximum number of lines from the task log file to print when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 657 | reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 658 | the entire log is printed. |
| 659 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 660 | :term:`BBLAYERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 661 | Lists the layers to enable during the build. This variable is defined |
| 662 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 663 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 664 | |
| 665 | BBLAYERS = " \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 666 | /home/scottrif/poky/meta \ |
| 667 | /home/scottrif/poky/meta-poky \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 668 | /home/scottrif/poky/meta-yocto-bsp \ |
| 669 | /home/scottrif/poky/meta-mykernel \ |
| 670 | " |
| 671 | |
| 672 | This example enables four layers, one of which is a custom, |
| 673 | user-defined layer named ``meta-mykernel``. |
| 674 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 675 | :term:`BBMASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 676 | Prevents BitBake from processing recipes and recipe append files. |
| 677 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 678 | You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 679 | ``.bbappend`` files. BitBake ignores any recipe or recipe append |
| 680 | files that match any of the expressions. It is as if BitBake does not |
| 681 | see them at all. Consequently, matching files are not parsed or |
| 682 | otherwise used by BitBake. |
| 683 | |
| 684 | The values you provide are passed to Python's regular expression |
| 685 | compiler. Consequently, the syntax follows Python's Regular |
| 686 | Expression (re) syntax. The expressions are compared against the full |
| 687 | paths to the files. For complete syntax information, see Python's |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 688 | 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] | 689 | |
| 690 | The following example uses a complete regular expression to tell |
| 691 | BitBake to ignore all recipe and recipe append files in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 692 | ``meta-ti/recipes-misc/`` directory:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 693 | |
| 694 | BBMASK = "meta-ti/recipes-misc/" |
| 695 | |
| 696 | If you want to mask out multiple directories or recipes, you can |
| 697 | specify multiple regular expression fragments. This next example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 698 | masks out multiple directories and individual recipes:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 699 | |
| 700 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
| 701 | BBMASK += "/meta-oe/recipes-support/" |
| 702 | BBMASK += "/meta-foo/.*/openldap" |
| 703 | BBMASK += "opencv.*\.bbappend" |
| 704 | BBMASK += "lzma" |
| 705 | |
| 706 | .. note:: |
| 707 | |
| 708 | When specifying a directory name, use the trailing slash character |
| 709 | to ensure you match just that directory name. |
| 710 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 711 | :term:`BBMULTICONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 712 | Specifies each additional separate configuration when you are |
| 713 | building targets with multiple configurations. Use this variable in |
| 714 | your ``conf/local.conf`` configuration file. Specify a |
| 715 | multiconfigname for each configuration file you are using. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 716 | example, the following line specifies three configuration files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 717 | |
| 718 | BBMULTICONFIG = "configA configB configC" |
| 719 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 720 | Each configuration file you use must reside in a ``multiconfig`` |
| 721 | subdirectory of a configuration directory within a layer, or |
| 722 | within the :term:`Build Directory` (e.g. |
| 723 | ``build_directory/conf/multiconfig/configA.conf`` or |
| 724 | ``mylayer/conf/multiconfig/configB.conf``). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 725 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 726 | For information on how to use :term:`BBMULTICONFIG` in an environment |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 727 | that supports building targets with multiple configurations, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 728 | ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 729 | section in the Yocto Project Development Tasks Manual. |
| 730 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 731 | :term:`BBSERVER` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 732 | If defined in the BitBake environment, :term:`BBSERVER` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 733 | BitBake remote server. |
| 734 | |
| 735 | Use the following format to export the variable to the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 736 | environment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 737 | |
| 738 | export BBSERVER=localhost:$port |
| 739 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 740 | By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 741 | Consequently, :term:`BBSERVER` is excluded from checksum and dependency |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 742 | data. |
| 743 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 744 | :term:`BINCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 745 | When inheriting the |
| 746 | :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class, |
| 747 | this variable specifies binary configuration scripts to disable in |
| 748 | favor of using ``pkg-config`` to query the information. The |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 749 | :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 750 | return an error so that calls to them can be easily found and |
| 751 | replaced. |
| 752 | |
| 753 | To add multiple scripts, separate them by spaces. Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 754 | from the ``libpng`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 755 | |
| 756 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
| 757 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 758 | :term:`BINCONFIG_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 759 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 760 | this variable specifies a wildcard for configuration scripts that |
| 761 | need editing. The scripts are edited to correct any paths that have |
| 762 | been set up during compilation so that they are correct for use when |
| 763 | installed into the sysroot and called by the build processes of other |
| 764 | recipes. |
| 765 | |
| 766 | .. note:: |
| 767 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 768 | The :term:`BINCONFIG_GLOB` variable uses |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 769 | `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, |
| 770 | which is recognition and expansion of wildcards during pattern |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 771 | matching. Shell globbing is very similar to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 772 | `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ |
| 773 | and `glob <https://docs.python.org/3/library/glob.html>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 774 | |
| 775 | For more information on how this variable works, see |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 776 | ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 777 | You can also find general |
| 778 | information on the class in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 779 | ":ref:`ref-classes-binconfig`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 780 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 781 | :term:`BP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 782 | The base recipe name and version but without any special recipe name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 783 | suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 784 | comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 785 | |
| 786 | ${BPN}-${PV} |
| 787 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 788 | :term:`BPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 789 | This variable is a version of the :term:`PN` variable with |
| 790 | common prefixes and suffixes removed, such as ``nativesdk-``, |
| 791 | ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. |
| 792 | The exact lists of prefixes and suffixes removed are specified by the |
| 793 | :term:`MLPREFIX` and |
| 794 | :term:`SPECIAL_PKGSUFFIX` variables, |
| 795 | respectively. |
| 796 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 797 | :term:`BUGTRACKER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 798 | Specifies a URL for an upstream bug tracking website for a recipe. |
| 799 | The OpenEmbedded build system does not use this variable. Rather, the |
| 800 | variable is a useful pointer in case a bug in the software being |
| 801 | built needs to be manually reported. |
| 802 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 803 | :term:`BUILD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 804 | Specifies the architecture of the build host (e.g. ``i686``). The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 805 | OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 806 | machine name reported by the ``uname`` command. |
| 807 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 808 | :term:`BUILD_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 809 | Specifies the architecture-specific assembler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 810 | host. By default, the value of :term:`BUILD_AS_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 811 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 812 | :term:`BUILD_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 813 | Specifies the architecture-specific C compiler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 814 | host. By default, the value of :term:`BUILD_CC_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 815 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 816 | :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 817 | 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] | 818 | compiler is being used as the linker. By default, :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 819 | points to GCC and passes as arguments the value of |
| 820 | :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 821 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 822 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 823 | :term:`BUILD_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 824 | Specifies the flags to pass to the C compiler when building for the |
| 825 | build host. When building in the ``-native`` context, |
| 826 | :term:`CFLAGS` is set to the value of this variable by |
| 827 | default. |
| 828 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 829 | :term:`BUILD_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 830 | Specifies the flags to pass to the C preprocessor (i.e. to both the C |
| 831 | and the C++ compilers) when building for the build host. When |
| 832 | building in the ``-native`` context, :term:`CPPFLAGS` |
| 833 | is set to the value of this variable by default. |
| 834 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 835 | :term:`BUILD_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 836 | Specifies the flags to pass to the C++ compiler when building for the |
| 837 | build host. When building in the ``-native`` context, |
| 838 | :term:`CXXFLAGS` is set to the value of this variable |
| 839 | by default. |
| 840 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 841 | :term:`BUILD_FC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 842 | Specifies the Fortran compiler command for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 843 | default, :term:`BUILD_FC` points to Gfortran and passes as arguments the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 844 | value of :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 845 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 846 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 847 | :term:`BUILD_LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 848 | Specifies the linker command for the build host. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 849 | :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] | 850 | the value of :term:`BUILD_LD_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 851 | :term:`BUILD_LD_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 852 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 853 | :term:`BUILD_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 854 | Specifies architecture-specific linker flags for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 855 | default, the value of :term:`BUILD_LD_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 856 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 857 | :term:`BUILD_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 858 | Specifies the flags to pass to the linker when building for the build |
| 859 | host. When building in the ``-native`` context, |
| 860 | :term:`LDFLAGS` is set to the value of this variable |
| 861 | by default. |
| 862 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 863 | :term:`BUILD_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 864 | Specifies the optimization flags passed to the C compiler when |
| 865 | building for the build host or the SDK. The flags are passed through |
| 866 | the :term:`BUILD_CFLAGS` and |
| 867 | :term:`BUILDSDK_CFLAGS` default values. |
| 868 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 869 | The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 870 | -pipe". |
| 871 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 872 | :term:`BUILD_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 873 | Specifies the operating system in use on the build host (e.g. |
| 874 | "linux"). The OpenEmbedded build system sets the value of |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 875 | :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 876 | first word, converted to lower-case characters. |
| 877 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 878 | :term:`BUILD_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 879 | The toolchain binary prefix used for native recipes. The OpenEmbedded |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 880 | build system uses the :term:`BUILD_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 881 | :term:`TARGET_PREFIX` when building for |
| 882 | ``native`` recipes. |
| 883 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 884 | :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 885 | Specifies the command to be used to strip debugging symbols from |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 886 | binaries produced for the build host. By default, :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 887 | points to |
| 888 | ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. |
| 889 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 890 | :term:`BUILD_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 891 | Specifies the system, including the architecture and the operating |
| 892 | system, to use when building for the build host (i.e. when building |
| 893 | ``native`` recipes). |
| 894 | |
| 895 | The OpenEmbedded build system automatically sets this variable based |
| 896 | on :term:`BUILD_ARCH`, |
| 897 | :term:`BUILD_VENDOR`, and |
| 898 | :term:`BUILD_OS`. You do not need to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 899 | :term:`BUILD_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 900 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 901 | :term:`BUILD_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 902 | Specifies the vendor name to use when building for the build host. |
| 903 | The default value is an empty string (""). |
| 904 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 905 | :term:`BUILDDIR` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 906 | Points to the location of the :term:`Build Directory`. You can define |
| 907 | this directory indirectly through the :ref:`structure-core-script` script |
| 908 | by passing in a :term:`Build Directory` path when you run the script. If |
| 909 | you run the script and do not provide a :term:`Build Directory` path, the |
| 910 | :term:`BUILDDIR` defaults to ``build`` in the current directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 911 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 912 | :term:`BUILDHISTORY_COMMIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 913 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 914 | class, this variable specifies whether or not to commit the build |
| 915 | history output in a local Git repository. If set to "1", this local |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 916 | repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 917 | class and a commit will be created on every build for changes to each |
| 918 | top-level subdirectory of the build history output (images, packages, |
| 919 | and sdk). If you want to track changes to build history over time, |
| 920 | you should set this value to "1". |
| 921 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 922 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class |
| 923 | enables committing the buildhistory output in a local Git repository:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 924 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 925 | BUILDHISTORY_COMMIT ?= "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 926 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 927 | :term:`BUILDHISTORY_COMMIT_AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 928 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 929 | class, this variable specifies the author to use for each Git commit. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 930 | In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 931 | :term:`BUILDHISTORY_COMMIT` variable must |
| 932 | be set to "1". |
| 933 | |
| 934 | Git requires that the value you provide for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 935 | :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 936 | email@host". Providing an email address or host that is not valid |
| 937 | does not produce an error. |
| 938 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 939 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 940 | |
| 941 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
| 942 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 943 | :term:`BUILDHISTORY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 944 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 945 | class, this variable specifies the directory in which build history |
| 946 | information is kept. For more information on how the variable works, |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 947 | see the :ref:`ref-classes-buildhistory` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 948 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 949 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 950 | |
| 951 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" |
| 952 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 953 | :term:`BUILDHISTORY_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 954 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 955 | class, this variable specifies the build history features to be |
| 956 | enabled. For more information on how build history works, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 957 | ":ref:`dev-manual/common-tasks:maintaining build output quality`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 958 | section in the Yocto Project Development Tasks Manual. |
| 959 | |
| 960 | You can specify these features in the form of a space-separated list: |
| 961 | |
| 962 | - *image:* Analysis of the contents of images, which includes the |
| 963 | list of installed packages among other things. |
| 964 | |
| 965 | - *package:* Analysis of the contents of individual packages. |
| 966 | |
| 967 | - *sdk:* Analysis of the contents of the software development kit |
| 968 | (SDK). |
| 969 | |
| 970 | - *task:* Save output file signatures for |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 971 | :ref:`shared state <overview-manual/concepts:shared state cache>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 972 | (sstate) tasks. |
| 973 | This saves one file per task and lists the SHA-256 checksums for |
| 974 | each file staged (i.e. the output of the task). |
| 975 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 976 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 977 | features:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 978 | |
| 979 | BUILDHISTORY_FEATURES ?= "image package sdk" |
| 980 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 981 | :term:`BUILDHISTORY_IMAGE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 982 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 983 | class, this variable specifies a list of paths to files copied from |
| 984 | the image contents into the build history directory under an |
| 985 | "image-files" directory in the directory for the image, so that you |
| 986 | can track the contents of each file. The default is to copy |
| 987 | ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for |
| 988 | changes in user and group entries. You can modify the list to include |
| 989 | any file. Specifying an invalid path does not produce an error. |
| 990 | Consequently, you can include files that might not always be present. |
| 991 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 992 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 993 | following files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 994 | |
| 995 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" |
| 996 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 997 | :term:`BUILDHISTORY_PATH_PREFIX_STRIP` |
| 998 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 999 | class, this variable specifies a common path prefix that should be |
| 1000 | stripped off the beginning of paths in the task signature list when the |
| 1001 | ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be |
| 1002 | useful when build history is populated from multiple sources that may not |
| 1003 | all use the same top level directory. |
| 1004 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1005 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows:: |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1006 | |
| 1007 | BUILDHISTORY_PATH_PREFIX_STRIP ?= "" |
| 1008 | |
| 1009 | In this case, no prefixes will be stripped. |
| 1010 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1011 | :term:`BUILDHISTORY_PUSH_REPO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1012 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1013 | class, this variable optionally specifies a remote repository to |
| 1014 | which build history pushes Git changes. In order for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1015 | :term:`BUILDHISTORY_PUSH_REPO` to work, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1016 | :term:`BUILDHISTORY_COMMIT` must be set to |
| 1017 | "1". |
| 1018 | |
| 1019 | The repository should correspond to a remote address that specifies a |
| 1020 | repository as understood by Git, or alternatively to a remote name |
| 1021 | that you have set up manually using ``git remote`` within the local |
| 1022 | repository. |
| 1023 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1024 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1025 | |
| 1026 | BUILDHISTORY_PUSH_REPO ?= "" |
| 1027 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1028 | :term:`BUILDSDK_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1029 | Specifies the flags to pass to the C compiler when building for the |
| 1030 | SDK. When building in the ``nativesdk-`` context, |
| 1031 | :term:`CFLAGS` is set to the value of this variable by |
| 1032 | default. |
| 1033 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1034 | :term:`BUILDSDK_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1035 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1036 | C and the C++ compilers) when building for the SDK. When building in |
| 1037 | the ``nativesdk-`` context, :term:`CPPFLAGS` is set |
| 1038 | to the value of this variable by default. |
| 1039 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1040 | :term:`BUILDSDK_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1041 | Specifies the flags to pass to the C++ compiler when building for the |
| 1042 | SDK. When building in the ``nativesdk-`` context, |
| 1043 | :term:`CXXFLAGS` is set to the value of this variable |
| 1044 | by default. |
| 1045 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1046 | :term:`BUILDSDK_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1047 | Specifies the flags to pass to the linker when building for the SDK. |
| 1048 | When building in the ``nativesdk-`` context, |
| 1049 | :term:`LDFLAGS` is set to the value of this variable |
| 1050 | by default. |
| 1051 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1052 | :term:`BUILDSTATS_BASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1053 | Points to the location of the directory that holds build statistics |
| 1054 | when you use and enable the |
| 1055 | :ref:`buildstats <ref-classes-buildstats>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1056 | :term:`BUILDSTATS_BASE` directory defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1057 | ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. |
| 1058 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1059 | :term:`BUSYBOX_SPLIT_SUID` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1060 | For the BusyBox recipe, specifies whether to split the output |
| 1061 | executable file into two parts: one for features that require |
| 1062 | ``setuid root``, and one for the remaining features (i.e. those that |
| 1063 | do not require ``setuid root``). |
| 1064 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1065 | The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1066 | splitting the output executable file. Set the variable to "0" to get |
| 1067 | a single output executable file. |
| 1068 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1069 | :term:`CACHE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1070 | Specifies the directory BitBake uses to store a cache of the |
| 1071 | :term:`Metadata` so it does not need to be parsed every time |
| 1072 | BitBake is started. |
| 1073 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1074 | :term:`CC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1075 | The minimal command and arguments used to run the C compiler. |
| 1076 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1077 | :term:`CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1078 | Specifies the flags to pass to the C compiler. This variable is |
| 1079 | exported to an environment variable and thus made visible to the |
| 1080 | software being built during the compilation step. |
| 1081 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1082 | Default initialization for :term:`CFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1083 | being built: |
| 1084 | |
| 1085 | - :term:`TARGET_CFLAGS` when building for the |
| 1086 | target |
| 1087 | |
| 1088 | - :term:`BUILD_CFLAGS` when building for the |
| 1089 | build host (i.e. ``-native``) |
| 1090 | |
| 1091 | - :term:`BUILDSDK_CFLAGS` when building for |
| 1092 | an SDK (i.e. ``nativesdk-``) |
| 1093 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1094 | :term:`CLASSOVERRIDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1095 | An internal variable specifying the special class override that |
| 1096 | should currently apply (e.g. "class-target", "class-native", and so |
| 1097 | forth). The classes that use this variable (e.g. |
| 1098 | :ref:`native <ref-classes-native>`, |
| 1099 | :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the |
| 1100 | variable to appropriate values. |
| 1101 | |
| 1102 | .. note:: |
| 1103 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1104 | :term:`CLASSOVERRIDE` gets its default "class-target" value from the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1105 | ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1106 | |
| 1107 | As an example, the following override allows you to install extra |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1108 | files, but only when building for the target:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1109 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1110 | do_install:append:class-target() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1111 | install my-extra-file ${D}${sysconfdir} |
| 1112 | } |
| 1113 | |
| 1114 | Here is an example where ``FOO`` is set to |
| 1115 | "native" when building for the build host, and to "other" when not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1116 | building for the build host:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1117 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1118 | FOO:class-native = "native" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1119 | FOO = "other" |
| 1120 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1121 | The underlying mechanism behind :term:`CLASSOVERRIDE` is simply |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1122 | that it is included in the default value of |
| 1123 | :term:`OVERRIDES`. |
| 1124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1125 | :term:`CLEANBROKEN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1126 | If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1127 | ``make clean`` command does not work for the software being built. |
| 1128 | Consequently, the OpenEmbedded build system will not try to run |
| 1129 | ``make clean`` during the :ref:`ref-tasks-configure` |
| 1130 | task, which is the default behavior. |
| 1131 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1132 | :term:`COMBINED_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1133 | Provides a list of hardware features that are enabled in both |
| 1134 | :term:`MACHINE_FEATURES` and |
| 1135 | :term:`DISTRO_FEATURES`. This select list of |
| 1136 | features contains features that make sense to be controlled both at |
| 1137 | the machine and distribution configuration level. For example, the |
| 1138 | "bluetooth" feature requires hardware support but should also be |
| 1139 | optional at the distribution level, in case the hardware supports |
| 1140 | Bluetooth but you do not ever intend to use it. |
| 1141 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1142 | :term:`COMMON_LICENSE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1143 | Points to ``meta/files/common-licenses`` in the |
| 1144 | :term:`Source Directory`, which is where generic license |
| 1145 | files reside. |
| 1146 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1147 | :term:`COMPATIBLE_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1148 | A regular expression that resolves to one or more hosts (when the |
| 1149 | recipe is native) or one or more targets (when the recipe is |
| 1150 | non-native) with which a recipe is compatible. The regular expression |
| 1151 | is matched against :term:`HOST_SYS`. You can use the |
| 1152 | variable to stop recipes from being built for classes of systems with |
| 1153 | which the recipes are not compatible. Stopping these builds is |
| 1154 | particularly useful with kernels. The variable also helps to increase |
| 1155 | parsing speed since the build system skips parsing recipes not |
| 1156 | compatible with the current system. |
| 1157 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1158 | :term:`COMPATIBLE_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1159 | A regular expression that resolves to one or more target machines |
| 1160 | with which a recipe is compatible. The regular expression is matched |
| 1161 | against :term:`MACHINEOVERRIDES`. You can use |
| 1162 | the variable to stop recipes from being built for machines with which |
| 1163 | the recipes are not compatible. Stopping these builds is particularly |
| 1164 | useful with kernels. The variable also helps to increase parsing |
| 1165 | speed since the build system skips parsing recipes not compatible |
| 1166 | with the current machine. |
| 1167 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1168 | :term:`COMPLEMENTARY_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1169 | Defines wildcards to match when installing a list of complementary |
| 1170 | packages for all the packages explicitly (or implicitly) installed in |
| 1171 | an image. |
| 1172 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1173 | The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching |
| 1174 | (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), |
| 1175 | which is similar to the Unix style pathname pattern expansion |
| 1176 | (`glob <https://docs.python.org/3/library/glob.html>`__). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1177 | |
| 1178 | The resulting list of complementary packages is associated with an |
| 1179 | item that can be added to |
| 1180 | :term:`IMAGE_FEATURES`. An example usage of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1181 | 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] | 1182 | will install -dev packages (containing headers and other development |
| 1183 | files) for every package in the image. |
| 1184 | |
| 1185 | To add a new feature item pointing to a wildcard, use a variable flag |
| 1186 | 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] | 1187 | wildcard. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1188 | |
| 1189 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' |
| 1190 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1191 | .. note:: |
| 1192 | |
| 1193 | When installing complementary packages, recommends relationships |
| 1194 | (set via :term:`RRECOMMENDS`) are always ignored. |
| 1195 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1196 | :term:`COMPONENTS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1197 | Stores sysroot components for each recipe. The OpenEmbedded build |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1198 | system uses :term:`COMPONENTS_DIR` when constructing recipe-specific |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1199 | sysroots for other recipes. |
| 1200 | |
| 1201 | The default is |
| 1202 | "``${``\ :term:`STAGING_DIR`\ ``}-components``." |
| 1203 | (i.e. |
| 1204 | "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). |
| 1205 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1206 | :term:`CONF_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1207 | Tracks the version of the local configuration file (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1208 | ``local.conf``). The value for :term:`CONF_VERSION` increments each time |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1209 | ``build/conf/`` compatibility changes. |
| 1210 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1211 | :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1212 | Identifies editable or configurable files that are part of a package. |
| 1213 | If the Package Management System (PMS) is being used to update |
| 1214 | packages on the target system, it is possible that configuration |
| 1215 | files you have changed after the original installation and that you |
| 1216 | now want to remain unchanged are overwritten. In other words, |
| 1217 | 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] | 1218 | 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] | 1219 | variable to list the files in the package that you wish to prevent |
| 1220 | the PMS from overwriting during this update process. |
| 1221 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1222 | To use the :term:`CONFFILES` variable, provide a package name override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1223 | that identifies the resulting package. Then, provide a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1224 | space-separated list of files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1225 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1226 | CONFFILES:${PN} += "${sysconfdir}/file1 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1227 | ${sysconfdir}/file2 ${sysconfdir}/file3" |
| 1228 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1229 | There is a relationship between the :term:`CONFFILES` and :term:`FILES` |
| 1230 | variables. The files listed within :term:`CONFFILES` must be a subset of |
| 1231 | the files listed within :term:`FILES`. Because the configuration files |
| 1232 | you provide with :term:`CONFFILES` are simply being identified so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1233 | 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] | 1234 | already be included as part of the package through the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1235 | variable. |
| 1236 | |
| 1237 | .. note:: |
| 1238 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1239 | When specifying paths as part of the :term:`CONFFILES` variable, it is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1240 | good practice to use appropriate path variables. |
| 1241 | For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` |
| 1242 | rather than ``/usr/bin``. You can find a list of these variables at |
| 1243 | the top of the ``meta/conf/bitbake.conf`` file in the |
| 1244 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1245 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1246 | :term:`CONFIG_INITRAMFS_SOURCE` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1247 | Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1248 | OpenEmbedded build system receives and uses this kernel Kconfig |
| 1249 | variable as an environment variable. By default, the variable is set |
| 1250 | to null (""). |
| 1251 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1252 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1253 | with a ``.cpio`` suffix or a space-separated list of directories and |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1254 | files for building the :term:`Initramfs` image. A cpio archive should contain |
| 1255 | a filesystem archive to be used as an :term:`Initramfs` image. Directories |
| 1256 | should contain a filesystem layout to be included in the :term:`Initramfs` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1257 | image. Files should contain entries according to the format described |
| 1258 | by the ``usr/gen_init_cpio`` program in the kernel tree. |
| 1259 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1260 | If you specify multiple directories and files, the :term:`Initramfs` image |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1261 | will be the aggregate of all of them. |
| 1262 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1263 | For information on creating an :term:`Initramfs`, see the |
| 1264 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1265 | in the Yocto Project Development Tasks Manual. |
| 1266 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1267 | :term:`CONFIG_SITE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1268 | A list of files that contains ``autoconf`` test results relevant to |
| 1269 | the current build. This variable is used by the Autotools utilities |
| 1270 | when running ``configure``. |
| 1271 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1272 | :term:`CONFIGURE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1273 | The minimal arguments for GNU configure. |
| 1274 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1275 | :term:`CONFLICT_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1276 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1277 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1278 | class, this variable identifies distribution features that would be |
| 1279 | in conflict should the recipe be built. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1280 | :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also |
| 1281 | appears in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1282 | the recipe will be skipped, and if the build system attempts to build |
| 1283 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1284 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1285 | :term:`CONVERSION_CMD` |
| 1286 | This variable is used for storing image conversion commands. |
| 1287 | Image conversion can convert an image into different objects like: |
| 1288 | |
| 1289 | - Compressed version of the image |
| 1290 | |
| 1291 | - Checksums for the image |
| 1292 | |
| 1293 | An example of :term:`CONVERSION_CMD` from :ref:`image-types |
| 1294 | <ref-classes-image_types>` class is:: |
| 1295 | |
| 1296 | CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
| 1297 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1298 | :term:`COPY_LIC_DIRS` |
| 1299 | If set to "1" along with the |
| 1300 | :term:`COPY_LIC_MANIFEST` variable, the |
| 1301 | OpenEmbedded build system copies into the image the license files, |
| 1302 | which are located in ``/usr/share/common-licenses``, for each |
| 1303 | package. The license files are placed in directories within the image |
| 1304 | itself during build time. |
| 1305 | |
| 1306 | .. note:: |
| 1307 | |
| 1308 | The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for |
| 1309 | newly installed packages to an image, which might be most suitable for |
| 1310 | read-only filesystems that cannot be upgraded. See the |
| 1311 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
| 1312 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
| 1313 | section in the Yocto Project Development Tasks Manual for |
| 1314 | information on providing license text. |
| 1315 | |
| 1316 | :term:`COPY_LIC_MANIFEST` |
| 1317 | If set to "1", the OpenEmbedded build system copies the license |
| 1318 | manifest for the image to |
| 1319 | ``/usr/share/common-licenses/license.manifest`` within the image |
| 1320 | itself during build time. |
| 1321 | |
| 1322 | .. note:: |
| 1323 | |
| 1324 | The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for |
| 1325 | newly installed packages to an image, which might be most suitable for |
| 1326 | read-only filesystems that cannot be upgraded. See the |
| 1327 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
| 1328 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
| 1329 | section in the Yocto Project Development Tasks Manual for |
| 1330 | information on providing license text. |
| 1331 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1332 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1333 | A space-separated list of licenses to exclude from the source |
| 1334 | archived by the :ref:`archiver <ref-classes-archiver>` class. In |
| 1335 | other words, if a license in a recipe's |
| 1336 | :term:`LICENSE` value is in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1337 | :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1338 | class. |
| 1339 | |
| 1340 | .. note:: |
| 1341 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1342 | The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1343 | :term:`COPYLEFT_LICENSE_INCLUDE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1344 | |
| 1345 | The default value, which is "CLOSED Proprietary", for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1346 | :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1347 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1348 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1349 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1350 | :term:`COPYLEFT_LICENSE_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1351 | A space-separated list of licenses to include in the source archived |
| 1352 | by the :ref:`archiver <ref-classes-archiver>` class. In other |
| 1353 | words, if a license in a recipe's :term:`LICENSE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1354 | value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1355 | source is archived by the class. |
| 1356 | |
| 1357 | The default value is set by the |
| 1358 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1359 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1360 | "GPL*", "LGPL*", and "AGPL*". |
| 1361 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1362 | :term:`COPYLEFT_PN_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1363 | A list of recipes to exclude in the source archived by the |
| 1364 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1365 | :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1366 | exclusion caused through the |
| 1367 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1368 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1369 | variables, respectively. |
| 1370 | |
| 1371 | The default value, which is "" indicating to not explicitly exclude |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1372 | any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1373 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1374 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1375 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1376 | :term:`COPYLEFT_PN_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1377 | A list of recipes to include in the source archived by the |
| 1378 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1379 | :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1380 | exclusion caused through the |
| 1381 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1382 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1383 | variables, respectively. |
| 1384 | |
| 1385 | The default value, which is "" indicating to not explicitly include |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1386 | any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1387 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1388 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1389 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1390 | :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1391 | A space-separated list of recipe types to include in the source |
| 1392 | archived by the :ref:`archiver <ref-classes-archiver>` class. |
| 1393 | Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``, |
| 1394 | ``crosssdk``, and ``cross-canadian``. |
| 1395 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1396 | The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1397 | is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1398 | class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1399 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1400 | :term:`CORE_IMAGE_EXTRA_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1401 | Specifies the list of packages to be added to the image. You should |
| 1402 | only set this variable in the ``local.conf`` configuration file found |
| 1403 | in the :term:`Build Directory`. |
| 1404 | |
| 1405 | This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer |
| 1406 | supported. |
| 1407 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1408 | :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1409 | Specifies the parent directory of the OpenEmbedded-Core Metadata |
| 1410 | layer (i.e. ``meta``). |
| 1411 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1412 | It is an important distinction that :term:`COREBASE` points to the parent |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1413 | of this layer and not the layer itself. Consider an example where you |
| 1414 | have cloned the Poky Git repository and retained the ``poky`` name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1415 | for your local copy of the repository. In this case, :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1416 | points to the ``poky`` folder because it is the parent directory of |
| 1417 | the ``poky/meta`` layer. |
| 1418 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1419 | :term:`COREBASE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1420 | Lists files from the :term:`COREBASE` directory that |
| 1421 | should be copied other than the layers listed in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1422 | ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1423 | to copy metadata from the OpenEmbedded build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1424 | into the extensible SDK. |
| 1425 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1426 | Explicitly listing files in :term:`COREBASE` is needed because it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1427 | typically contains build directories and other files that should not |
| 1428 | normally be copied into the extensible SDK. Consequently, the value |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1429 | 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] | 1430 | are actually needed. |
| 1431 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1432 | :term:`CPP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1433 | The minimal command and arguments used to run the C preprocessor. |
| 1434 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1435 | :term:`CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1436 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1437 | C and the C++ compilers). This variable is exported to an environment |
| 1438 | variable and thus made visible to the software being built during the |
| 1439 | compilation step. |
| 1440 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1441 | Default initialization for :term:`CPPFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1442 | being built: |
| 1443 | |
| 1444 | - :term:`TARGET_CPPFLAGS` when building for |
| 1445 | the target |
| 1446 | |
| 1447 | - :term:`BUILD_CPPFLAGS` when building for the |
| 1448 | build host (i.e. ``-native``) |
| 1449 | |
| 1450 | - :term:`BUILDSDK_CPPFLAGS` when building |
| 1451 | for an SDK (i.e. ``nativesdk-``) |
| 1452 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1453 | :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1454 | The toolchain binary prefix for the target tools. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1455 | :term:`CROSS_COMPILE` variable is the same as the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1456 | :term:`TARGET_PREFIX` variable. |
| 1457 | |
| 1458 | .. note:: |
| 1459 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1460 | The OpenEmbedded build system sets the :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1461 | variable only in certain contexts (e.g. when building for kernel |
| 1462 | and kernel module recipes). |
| 1463 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1464 | :term:`CVE_CHECK_IGNORE` |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1465 | The list of CVE IDs which are ignored. Here is |
| 1466 | an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`:: |
| 1467 | |
| 1468 | # This is windows only issue. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1469 | CVE_CHECK_IGNORE += "CVE-2020-15523" |
| 1470 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1471 | :term:`CVE_CHECK_SHOW_WARNINGS` |
| 1472 | Specifies whether or not the :ref:`cve-check <ref-classes-cve-check>` |
| 1473 | class should generate warning messages on the console when unpatched |
| 1474 | CVEs are found. The default is "1", but you may wish to set it to "0" if |
| 1475 | you are already examining/processing the logs after the build has |
| 1476 | completed and thus do not need the warning messages. |
| 1477 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1478 | :term:`CVE_CHECK_SKIP_RECIPE` |
| 1479 | The list of package names (:term:`PN`) for which |
| 1480 | CVEs (Common Vulnerabilities and Exposures) are ignored. |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1481 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1482 | :term:`CVE_DB_UPDATE_INTERVAL` |
| 1483 | Specifies the CVE database update interval in seconds, as used by |
| 1484 | ``cve-update-db-native``. The default value is "86400" i.e. once a day |
| 1485 | (24*60*60). If the value is set to "0" then the update will be forced |
| 1486 | every time. Alternatively, a negative value e.g. "-1" will disable |
| 1487 | updates entirely. |
| 1488 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1489 | :term:`CVE_PRODUCT` |
| 1490 | In a recipe, defines the name used to match the recipe name |
| 1491 | against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__. |
| 1492 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1493 | The default is ${:term:`BPN`} (except for recipes that inherit the |
| 1494 | :ref:`pypi <ref-classes-pypi>` class where it is set based upon |
| 1495 | :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] | 1496 | database or matches with multiple entries in the database, the default |
| 1497 | value needs to be changed. |
| 1498 | |
| 1499 | Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`:: |
| 1500 | |
| 1501 | CVE_PRODUCT = "oracle_berkeley_db berkeley_db" |
| 1502 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 1503 | Sometimes the product name is not specific enough, for example |
| 1504 | "tar" has been matching CVEs for the GNU ``tar`` package and also |
| 1505 | the ``node-tar`` node.js extension. To avoid this problem, use the |
| 1506 | vendor name as a prefix. The syntax for this is:: |
| 1507 | |
| 1508 | CVE_PRODUCT = "vendor:package" |
| 1509 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 1510 | :term:`CVE_VERSION` |
| 1511 | In a recipe, defines the version used to match the recipe version |
| 1512 | against the version in the `NIST CVE database <https://nvd.nist.gov/>`__ |
| 1513 | when usign :ref:`cve-check <ref-classes-cve-check>`. |
| 1514 | |
| 1515 | The default is ${:term:`PV`} but if recipes use custom version numbers |
| 1516 | which do not map to upstream software component release versions and the versions |
| 1517 | used in the CVE database, then this variable can be used to set the |
| 1518 | version number for :ref:`cve-check <ref-classes-cve-check>`. Example:: |
| 1519 | |
| 1520 | CVE_VERSION = "2.39" |
| 1521 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1522 | :term:`CVSDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1523 | The directory in which files checked out under the CVS system are |
| 1524 | stored. |
| 1525 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1526 | :term:`CXX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1527 | The minimal command and arguments used to run the C++ compiler. |
| 1528 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1529 | :term:`CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1530 | Specifies the flags to pass to the C++ compiler. This variable is |
| 1531 | exported to an environment variable and thus made visible to the |
| 1532 | software being built during the compilation step. |
| 1533 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1534 | Default initialization for :term:`CXXFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1535 | being built: |
| 1536 | |
| 1537 | - :term:`TARGET_CXXFLAGS` when building for |
| 1538 | the target |
| 1539 | |
| 1540 | - :term:`BUILD_CXXFLAGS` when building for the |
| 1541 | build host (i.e. ``-native``) |
| 1542 | |
| 1543 | - :term:`BUILDSDK_CXXFLAGS` when building |
| 1544 | for an SDK (i.e. ``nativesdk-``) |
| 1545 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1546 | :term:`D` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1547 | The destination directory. The location in the :term:`Build Directory` |
| 1548 | where components are installed by the |
| 1549 | :ref:`ref-tasks-install` task. This location defaults |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1550 | to:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1551 | |
| 1552 | ${WORKDIR}/image |
| 1553 | |
| 1554 | .. note:: |
| 1555 | |
| 1556 | Tasks that read from or write to this directory should run under |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1557 | :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1558 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1559 | :term:`DATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1560 | The date the build was started. Dates appear using the year, month, |
| 1561 | and day (YMD) format (e.g. "20150209" for February 9th, 2015). |
| 1562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1563 | :term:`DATETIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1564 | The date and time on which the current build started. The format is |
| 1565 | suitable for timestamps. |
| 1566 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1567 | :term:`DEBIAN_NOAUTONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1568 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1569 | which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1570 | particular package should not be renamed according to Debian library |
| 1571 | 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] | 1572 | set this variable. Here is an example from the ``fontconfig`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1573 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1574 | DEBIAN_NOAUTONAME:fontconfig-utils = "1" |
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:`DEBIANNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1577 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1578 | which is the default behavior, :term:`DEBIANNAME` allows you to override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1579 | the library name for an individual package. Overriding the library |
| 1580 | name in these cases is rare. You must use the package name as an |
| 1581 | override when you set this variable. Here is an example from the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1582 | ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1583 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1584 | DEBIANNAME:${PN} = "dbus-1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1585 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1586 | :term:`DEBUG_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1587 | Specifies to build packages with debugging information. This |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1588 | influences the value of the :term:`SELECTED_OPTIMIZATION` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1589 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1590 | :term:`DEBUG_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1591 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1592 | compiling a system for debugging. This variable defaults to "-O |
| 1593 | -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". |
| 1594 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1595 | :term:`DEBUG_PREFIX_MAP` |
| 1596 | Allows to set C compiler options, such as ``-fdebug-prefix-map``, |
| 1597 | ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to |
| 1598 | replace build-time paths by install-time ones in the debugging sections |
| 1599 | of binaries. This makes compiler output files location independent, |
| 1600 | at the cost of having to pass an extra command to tell the debugger |
| 1601 | where source files are. |
| 1602 | |
| 1603 | This is used by the Yocto Project to guarantee |
| 1604 | :doc:`/test-manual/reproducible-builds` even when the source code of |
| 1605 | a package uses the ``__FILE__`` or ``assert()`` macros. See the |
| 1606 | `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__ |
| 1607 | website for details. |
| 1608 | |
| 1609 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1610 | not intended to be user-configurable. |
| 1611 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1612 | :term:`DEFAULT_PREFERENCE` |
| 1613 | Specifies a weak bias for recipe selection priority. |
| 1614 | |
| 1615 | The most common usage of this is variable is to set it to "-1" within |
| 1616 | a recipe for a development version of a piece of software. Using the |
| 1617 | variable in this way causes the stable version of the recipe to build |
| 1618 | by default in the absence of :term:`PREFERRED_VERSION` being used to |
| 1619 | build the development version. |
| 1620 | |
| 1621 | .. note:: |
| 1622 | |
| 1623 | The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden |
| 1624 | by :term:`BBFILE_PRIORITY` if that variable is different between two |
| 1625 | layers that contain different versions of the same recipe. |
| 1626 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1627 | :term:`DEFAULTTUNE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1628 | The default CPU and Application Binary Interface (ABI) tunings (i.e. |
| 1629 | the "tune") used by the OpenEmbedded build system. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1630 | :term:`DEFAULTTUNE` helps define |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1631 | :term:`TUNE_FEATURES`. |
| 1632 | |
| 1633 | The default tune is either implicitly or explicitly set by the |
| 1634 | machine (:term:`MACHINE`). However, you can override |
| 1635 | the setting using available tunes as defined with |
| 1636 | :term:`AVAILTUNES`. |
| 1637 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1638 | :term:`DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1639 | Lists a recipe's build-time dependencies. These are dependencies on |
| 1640 | other recipes whose contents (e.g. headers and shared libraries) are |
| 1641 | needed by the recipe at build time. |
| 1642 | |
| 1643 | As an example, consider a recipe ``foo`` that contains the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1644 | assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1645 | |
| 1646 | DEPENDS = "bar" |
| 1647 | |
| 1648 | The practical effect of the previous |
| 1649 | assignment is that all files installed by bar will be available in |
| 1650 | the appropriate staging sysroot, given by the |
| 1651 | :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the |
| 1652 | :ref:`ref-tasks-configure` task for ``foo`` runs. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 1653 | This mechanism is implemented by having :ref:`ref-tasks-configure` depend on |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1654 | the :ref:`ref-tasks-populate_sysroot` task of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1655 | each recipe listed in :term:`DEPENDS`, through a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1656 | ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` |
| 1657 | declaration in the :ref:`base <ref-classes-base>` class. |
| 1658 | |
| 1659 | .. note:: |
| 1660 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1661 | It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1662 | explicitly. The standard classes and build-related variables are |
| 1663 | configured to automatically use the appropriate staging sysroots. |
| 1664 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1665 | As another example, :term:`DEPENDS` can also be used to add utilities |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1666 | that run on the build machine during the build. For example, a recipe |
| 1667 | that makes use of a code generator built by the recipe ``codegen`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1668 | might have the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1669 | |
| 1670 | DEPENDS = "codegen-native" |
| 1671 | |
| 1672 | For more |
| 1673 | information, see the :ref:`native <ref-classes-native>` class and |
| 1674 | the :term:`EXTRANATIVEPATH` variable. |
| 1675 | |
| 1676 | .. note:: |
| 1677 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1678 | - :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] | 1679 | it is a list of :term:`PROVIDES` names, which |
| 1680 | usually match recipe names. Putting a package name such as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1681 | "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1682 | instead, as this will put files from all the packages that make |
| 1683 | up ``foo``, which includes those from ``foo-dev``, into the |
| 1684 | sysroot. |
| 1685 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1686 | - One recipe having another recipe in :term:`DEPENDS` does not by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1687 | itself add any runtime dependencies between the packages |
| 1688 | produced by the two recipes. However, as explained in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1689 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1690 | section in the Yocto Project Overview and Concepts Manual, |
| 1691 | runtime dependencies will often be added automatically, meaning |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1692 | :term:`DEPENDS` alone is sufficient for most recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1693 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1694 | - Counterintuitively, :term:`DEPENDS` is often necessary even for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1695 | recipes that install precompiled components. For example, if |
| 1696 | ``libfoo`` is a precompiled library that links against |
| 1697 | ``libbar``, then linking against ``libfoo`` requires both |
| 1698 | ``libfoo`` and ``libbar`` to be available in the sysroot. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1699 | Without a :term:`DEPENDS` from the recipe that installs ``libfoo`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1700 | to the recipe that installs ``libbar``, other recipes might |
| 1701 | fail to link against ``libfoo``. |
| 1702 | |
| 1703 | For information on runtime dependencies, see the |
| 1704 | :term:`RDEPENDS` variable. You can also see the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1705 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 1706 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1707 | BitBake User Manual for additional information on tasks and |
| 1708 | dependencies. |
| 1709 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1710 | :term:`DEPLOY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1711 | Points to the general area that the OpenEmbedded build system uses to |
| 1712 | place images, packages, SDKs, and other output files that are ready |
| 1713 | to be used outside of the build system. By default, this directory |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 1714 | resides within the :term:`Build Directory` as ``${TMPDIR}/deploy``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1715 | |
| 1716 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1717 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1718 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1719 | ":ref:`overview-manual/concepts:images`", |
| 1720 | ":ref:`overview-manual/concepts:package feeds`", and |
| 1721 | ":ref:`overview-manual/concepts:application development sdk`" sections all in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1722 | Yocto Project Overview and Concepts Manual. |
| 1723 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1724 | :term:`DEPLOY_DIR_DEB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1725 | Points to the area that the OpenEmbedded build system uses to place |
| 1726 | Debian packages that are ready to be used outside of the build |
| 1727 | system. This variable applies only when |
| 1728 | :term:`PACKAGE_CLASSES` contains |
| 1729 | "package_deb". |
| 1730 | |
| 1731 | The BitBake configuration file initially defines the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1732 | :term:`DEPLOY_DIR_DEB` variable as a sub-folder of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1733 | :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1734 | |
| 1735 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
| 1736 | |
| 1737 | The :ref:`package_deb <ref-classes-package_deb>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1738 | :term:`DEPLOY_DIR_DEB` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1739 | :ref:`ref-tasks-package_write_deb` task |
| 1740 | writes Debian packages into the appropriate folder. For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1741 | information on how packaging works, see the |
| 1742 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1743 | in the Yocto Project Overview and Concepts Manual. |
| 1744 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1745 | :term:`DEPLOY_DIR_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1746 | Points to the area that the OpenEmbedded build system uses to place |
| 1747 | images and other associated output files that are ready to be |
| 1748 | deployed onto the target machine. The directory is machine-specific |
| 1749 | as it contains the ``${MACHINE}`` name. By default, this directory |
| 1750 | resides within the :term:`Build Directory` as |
| 1751 | ``${DEPLOY_DIR}/images/${MACHINE}/``. |
| 1752 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1753 | It must not be used directly in recipes when deploying files. Instead, |
| 1754 | it's only useful when a recipe needs to "read" a file already deployed |
| 1755 | by a dependency. So, it should be filled with the contents of |
| 1756 | :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or |
| 1757 | with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image |
| 1758 | <ref-classes-image>` class. |
| 1759 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 1760 | For more information on the structure of the :term:`Build Directory`, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1761 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1762 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1763 | ":ref:`overview-manual/concepts:images`" and |
| 1764 | ":ref:`overview-manual/concepts:application development sdk`" sections both in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1765 | the Yocto Project Overview and Concepts Manual. |
| 1766 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1767 | :term:`DEPLOY_DIR_IPK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1768 | Points to the area that the OpenEmbedded build system uses to place |
| 1769 | IPK packages that are ready to be used outside of the build system. |
| 1770 | This variable applies only when |
| 1771 | :term:`PACKAGE_CLASSES` contains |
| 1772 | "package_ipk". |
| 1773 | |
| 1774 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1775 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1776 | |
| 1777 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
| 1778 | |
| 1779 | The :ref:`package_ipk <ref-classes-package_ipk>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1780 | :term:`DEPLOY_DIR_IPK` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1781 | :ref:`ref-tasks-package_write_ipk` task |
| 1782 | writes IPK packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1783 | on how packaging works, see the |
| 1784 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1785 | in the Yocto Project Overview and Concepts Manual. |
| 1786 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1787 | :term:`DEPLOY_DIR_RPM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1788 | Points to the area that the OpenEmbedded build system uses to place |
| 1789 | RPM packages that are ready to be used outside of the build system. |
| 1790 | This variable applies only when |
| 1791 | :term:`PACKAGE_CLASSES` contains |
| 1792 | "package_rpm". |
| 1793 | |
| 1794 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1795 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1796 | |
| 1797 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
| 1798 | |
| 1799 | The :ref:`package_rpm <ref-classes-package_rpm>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1800 | :term:`DEPLOY_DIR_RPM` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1801 | :ref:`ref-tasks-package_write_rpm` task |
| 1802 | writes RPM packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1803 | on how packaging works, see the |
| 1804 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1805 | in the Yocto Project Overview and Concepts Manual. |
| 1806 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1807 | :term:`DEPLOY_DIR_TAR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1808 | Points to the area that the OpenEmbedded build system uses to place |
| 1809 | tarballs that are ready to be used outside of the build system. This |
| 1810 | variable applies only when |
| 1811 | :term:`PACKAGE_CLASSES` contains |
| 1812 | "package_tar". |
| 1813 | |
| 1814 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1815 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1816 | |
| 1817 | DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" |
| 1818 | |
| 1819 | The :ref:`package_tar <ref-classes-package_tar>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1820 | :term:`DEPLOY_DIR_TAR` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1821 | :ref:`ref-tasks-package_write_tar` task |
| 1822 | writes TAR packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1823 | on how packaging works, see the |
| 1824 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1825 | in the Yocto Project Overview and Concepts Manual. |
| 1826 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1827 | :term:`DEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1828 | When inheriting the :ref:`deploy <ref-classes-deploy>` class, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1829 | :term:`DEPLOYDIR` points to a temporary work area for deployed files that |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1830 | is set in the :ref:`deploy <ref-classes-deploy>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1831 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1832 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1833 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1834 | Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1835 | deployed into :term:`DEPLOYDIR`, and the class will take care of copying |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1836 | them into :term:`DEPLOY_DIR_IMAGE` |
| 1837 | afterwards. |
| 1838 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1839 | :term:`DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1840 | The package description used by package managers. If not set, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1841 | :term:`DESCRIPTION` takes the value of the :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1842 | variable. |
| 1843 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 1844 | :term:`DEV_PKG_DEPENDENCY` |
| 1845 | Provides an easy way for recipes to disable or adjust the runtime |
| 1846 | dependency (:term:`RDEPENDS`) of the ``${PN}-dev`` package on the main |
| 1847 | (``${PN}``) package, particularly where the main package may be empty. |
| 1848 | |
| 1849 | :term:`DISABLE_STATIC` |
| 1850 | Used in order to disable static linking by default (in order to save |
| 1851 | space, since static libraries are often unused in embedded systems.) |
| 1852 | The default value is " --disable-static", however it can be set to "" |
| 1853 | in order to enable static linking if desired. Certain recipes do this |
| 1854 | individually, and also there is a |
| 1855 | ``meta/conf/distro/include/no-static-libs.inc`` include file that |
| 1856 | disables static linking for a number of recipes. Some software |
| 1857 | packages or build tools (such as CMake) have explicit support for |
| 1858 | enabling / disabling static linking, and in those cases |
| 1859 | :term:`DISABLE_STATIC` is not used. |
| 1860 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1861 | :term:`DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1862 | The short name of the distribution. For information on the long name |
| 1863 | of the distribution, see the :term:`DISTRO_NAME` |
| 1864 | variable. |
| 1865 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1866 | The :term:`DISTRO` variable corresponds to a distribution configuration |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1867 | file whose root name is the same as the variable's argument and whose |
| 1868 | filename extension is ``.conf``. For example, the distribution |
| 1869 | configuration file for the Poky distribution is named ``poky.conf`` |
| 1870 | and resides in the ``meta-poky/conf/distro`` directory of the |
| 1871 | :term:`Source Directory`. |
| 1872 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1873 | Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1874 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1875 | |
| 1876 | DISTRO = "poky" |
| 1877 | |
| 1878 | Distribution configuration files are located in a ``conf/distro`` |
| 1879 | directory within the :term:`Metadata` that contains the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1880 | distribution configuration. The value for :term:`DISTRO` must not contain |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1881 | spaces, and is typically all lower-case. |
| 1882 | |
| 1883 | .. note:: |
| 1884 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1885 | If the :term:`DISTRO` variable is blank, a set of default configurations |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1886 | are used, which are specified within |
| 1887 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1888 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1889 | :term:`DISTRO_CODENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1890 | Specifies a codename for the distribution being built. |
| 1891 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1892 | :term:`DISTRO_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1893 | Specifies a list of distro-specific packages to add to all images. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1894 | This variable takes effect through ``packagegroup-base`` so the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1895 | variable only really applies to the more full-featured images that |
| 1896 | include ``packagegroup-base``. You can use this variable to keep |
| 1897 | distro policy out of generic images. As with all other distro |
| 1898 | variables, you set this variable in the distro ``.conf`` file. |
| 1899 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1900 | :term:`DISTRO_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1901 | Specifies a list of distro-specific packages to add to all images if |
| 1902 | the packages exist. The packages might not exist or be empty (e.g. |
| 1903 | kernel modules). The list of packages are automatically installed but |
| 1904 | you can remove them. |
| 1905 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1906 | :term:`DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1907 | The software support you want in your distribution for various |
| 1908 | features. You define your distribution features in the distribution |
| 1909 | configuration file. |
| 1910 | |
| 1911 | In most cases, the presence or absence of a feature in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1912 | :term:`DISTRO_FEATURES` is translated to the appropriate option supplied |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1913 | to the configure script during the |
| 1914 | :ref:`ref-tasks-configure` task for recipes that |
| 1915 | optionally support the feature. For example, specifying "x11" in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1916 | :term:`DISTRO_FEATURES`, causes every piece of software built for the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1917 | target that can optionally support X11 to have its X11 support |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 1918 | enabled. |
| 1919 | |
| 1920 | .. note:: |
| 1921 | |
| 1922 | Just enabling :term:`DISTRO_FEATURES` alone doesn't |
| 1923 | enable feature support for packages. Mechanisms such as making |
| 1924 | :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used |
| 1925 | to enable/disable package features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1926 | |
| 1927 | Two more examples are Bluetooth and NFS support. For a more complete |
| 1928 | 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] | 1929 | provide with this variable, see the ":ref:`ref-features-distro`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1930 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1931 | :term:`DISTRO_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1932 | Features to be added to :term:`DISTRO_FEATURES` if not also present in |
| 1933 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1934 | |
| 1935 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1936 | not intended to be user-configurable. It is best to just reference |
| 1937 | the variable to see which distro features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1938 | all distro configurations. See the ":ref:`ref-features-backfill`" section |
| 1939 | for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1940 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1941 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1942 | Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be |
| 1943 | backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1944 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1945 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1946 | :term:`DISTRO_FEATURES_DEFAULT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1947 | A convenience variable that gives you the default list of distro |
| 1948 | features with the exception of any features specific to the C library |
| 1949 | (``libc``). |
| 1950 | |
| 1951 | When creating a custom distribution, you might find it useful to be |
| 1952 | able to reuse the default |
| 1953 | :term:`DISTRO_FEATURES` options without the |
| 1954 | 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] | 1955 | :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1956 | |
| 1957 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" |
| 1958 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1959 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1960 | Specifies a list of features that if present in the target |
| 1961 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1962 | included in :term:`DISTRO_FEATURES` when building native recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1963 | variable is used in addition to the features filtered using the |
| 1964 | :term:`DISTRO_FEATURES_NATIVE` |
| 1965 | variable. |
| 1966 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1967 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1968 | Specifies a list of features that if present in the target |
| 1969 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1970 | included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1971 | variable is used in addition to the features filtered using the |
| 1972 | :term:`DISTRO_FEATURES_NATIVESDK` |
| 1973 | variable. |
| 1974 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1975 | :term:`DISTRO_FEATURES_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1976 | Specifies a list of features that should be included in |
| 1977 | :term:`DISTRO_FEATURES` when building native |
| 1978 | recipes. This variable is used in addition to the features filtered |
| 1979 | using the |
| 1980 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
| 1981 | variable. |
| 1982 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1983 | :term:`DISTRO_FEATURES_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1984 | Specifies a list of features that should be included in |
| 1985 | :term:`DISTRO_FEATURES` when building |
| 1986 | nativesdk recipes. This variable is used in addition to the features |
| 1987 | filtered using the |
| 1988 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
| 1989 | variable. |
| 1990 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1991 | :term:`DISTRO_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1992 | The long name of the distribution. For information on the short name |
| 1993 | of the distribution, see the :term:`DISTRO` variable. |
| 1994 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1995 | The :term:`DISTRO_NAME` variable corresponds to a distribution |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1996 | configuration file whose root name is the same as the variable's |
| 1997 | argument and whose filename extension is ``.conf``. For example, the |
| 1998 | distribution configuration file for the Poky distribution is named |
| 1999 | ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory |
| 2000 | of the :term:`Source Directory`. |
| 2001 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2002 | Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2003 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2004 | |
| 2005 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" |
| 2006 | |
| 2007 | Distribution configuration files are located in a ``conf/distro`` |
| 2008 | directory within the :term:`Metadata` that contains the |
| 2009 | distribution configuration. |
| 2010 | |
| 2011 | .. note:: |
| 2012 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2013 | If the :term:`DISTRO_NAME` variable is blank, a set of default |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2014 | configurations are used, which are specified within |
| 2015 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2016 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2017 | :term:`DISTRO_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2018 | The version of the distribution. |
| 2019 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2020 | :term:`DISTROOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2021 | A colon-separated list of overrides specific to the current |
| 2022 | distribution. By default, this list includes the value of |
| 2023 | :term:`DISTRO`. |
| 2024 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2025 | You can extend :term:`DISTROOVERRIDES` to add extra overrides that should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2026 | apply to the distribution. |
| 2027 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2028 | The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2029 | is included in the default value of |
| 2030 | :term:`OVERRIDES`. |
| 2031 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2032 | :term:`DL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2033 | The central download directory used by the build process to store |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2034 | downloads. By default, :term:`DL_DIR` gets files suitable for mirroring |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2035 | for everything except Git repositories. If you want tarballs of Git |
| 2036 | repositories, use the |
| 2037 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
| 2038 | variable. |
| 2039 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2040 | 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] | 2041 | ``conf/local.conf`` file. This directory is self-maintaining and you |
| 2042 | should not have to touch it. By default, the directory is |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 2043 | ``downloads`` in the :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2044 | |
| 2045 | #DL_DIR ?= "${TOPDIR}/downloads" |
| 2046 | |
| 2047 | To specify a different download directory, |
| 2048 | simply remove the comment from the line and provide your directory. |
| 2049 | |
| 2050 | During a first build, the system downloads many different source code |
| 2051 | tarballs from various upstream projects. Downloading can take a |
| 2052 | while, particularly if your network connection is slow. Tarballs are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2053 | 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] | 2054 | system looks there first to find source tarballs. |
| 2055 | |
| 2056 | .. note:: |
| 2057 | |
| 2058 | When wiping and rebuilding, you can preserve this directory to |
| 2059 | speed up this part of subsequent builds. |
| 2060 | |
| 2061 | You can safely share this directory between multiple builds on the |
| 2062 | same development machine. For additional information on how the build |
| 2063 | process gets source files when working behind a firewall or proxy |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2064 | server, see this specific question in the ":doc:`faq`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2065 | chapter. You can also refer to the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2066 | ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2067 | Wiki page. |
| 2068 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2069 | :term:`DOC_COMPRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2070 | When inheriting the :ref:`compress_doc <ref-classes-compress_doc>` |
| 2071 | class, this variable sets the compression policy used when the |
| 2072 | OpenEmbedded build system compresses man pages and info pages. By |
| 2073 | default, the compression method used is gz (gzip). Other policies |
| 2074 | available are xz and bz2. |
| 2075 | |
| 2076 | 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] | 2077 | comments in the ``meta/classes-recipe/compress_doc.bbclass`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2078 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2079 | :term:`EFI_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2080 | When building bootable images (i.e. where ``hddimg``, ``iso``, or |
| 2081 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2082 | :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2083 | default is "grub-efi", but "systemd-boot" can be used instead. |
| 2084 | |
| 2085 | See the :ref:`systemd-boot <ref-classes-systemd-boot>` and |
| 2086 | :ref:`image-live <ref-classes-image-live>` classes for more |
| 2087 | information. |
| 2088 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2089 | :term:`ENABLE_BINARY_LOCALE_GENERATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2090 | Variable that controls which locales for ``glibc`` are generated |
| 2091 | during the build (useful if the target device has 64Mbytes of RAM or |
| 2092 | less). |
| 2093 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2094 | :term:`ERR_REPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2095 | When used with the :ref:`report-error <ref-classes-report-error>` |
| 2096 | class, specifies the path used for storing the debug files created by |
| 2097 | the :ref:`error reporting |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2098 | tool <dev-manual/common-tasks:using the error reporting tool>`, which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2099 | allows you to submit build errors you encounter to a central |
| 2100 | database. By default, the value of this variable is |
| 2101 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. |
| 2102 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2103 | 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] | 2104 | reporting tool to store the debug files as follows in your |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2105 | ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2106 | |
| 2107 | ERR_REPORT_DIR = "path" |
| 2108 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2109 | :term:`ERROR_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2110 | Specifies the quality assurance checks whose failures are reported as |
| 2111 | errors by the OpenEmbedded build system. You set this variable in |
| 2112 | your distribution configuration file. For a list of the checks you |
| 2113 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2114 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2115 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2116 | :term:`ESDK_CLASS_INHERIT_DISABLE` |
| 2117 | A list of classes to remove from the :term:`INHERIT` |
| 2118 | value globally within the extensible SDK configuration. The |
| 2119 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the |
| 2120 | default value:: |
| 2121 | |
| 2122 | ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc" |
| 2123 | |
| 2124 | Some classes are not generally applicable within the extensible SDK |
| 2125 | context. You can use this variable to disable those classes. |
| 2126 | |
| 2127 | For additional information on how to customize the extensible SDK's |
| 2128 | configuration, see the |
| 2129 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2130 | section in the Yocto Project Application Development and the |
| 2131 | Extensible Software Development Kit (eSDK) manual. |
| 2132 | |
| 2133 | :term:`ESDK_LOCALCONF_ALLOW` |
| 2134 | A list of variables allowed through from the OpenEmbedded build |
| 2135 | system configuration into the extensible SDK configuration. By |
| 2136 | default, the list of variables is empty and is set in the |
| 2137 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. |
| 2138 | |
| 2139 | This list overrides the variables specified using the |
| 2140 | :term:`ESDK_LOCALCONF_REMOVE` variable as well as |
| 2141 | other variables automatically added due to the "/" character |
| 2142 | being found at the start of the |
| 2143 | value, which is usually indicative of being a path and thus might not |
| 2144 | be valid on the system where the SDK is installed. |
| 2145 | |
| 2146 | For additional information on how to customize the extensible SDK's |
| 2147 | configuration, see the |
| 2148 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2149 | section in the Yocto Project Application Development and the |
| 2150 | Extensible Software Development Kit (eSDK) manual. |
| 2151 | |
| 2152 | :term:`ESDK_LOCALCONF_REMOVE` |
| 2153 | A list of variables not allowed through from the OpenEmbedded build |
| 2154 | system configuration into the extensible SDK configuration. Usually, |
| 2155 | these are variables that are specific to the machine on which the |
| 2156 | build system is running and thus would be potentially problematic |
| 2157 | within the extensible SDK. |
| 2158 | |
| 2159 | By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the |
| 2160 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and |
| 2161 | excludes the following variables: |
| 2162 | |
| 2163 | - :term:`CONF_VERSION` |
| 2164 | - :term:`BB_NUMBER_THREADS` |
| 2165 | - :term:`BB_NUMBER_PARSE_THREADS` |
| 2166 | - :term:`PARALLEL_MAKE` |
| 2167 | - :term:`PRSERV_HOST` |
| 2168 | - :term:`SSTATE_MIRRORS` :term:`DL_DIR` |
| 2169 | - :term:`SSTATE_DIR` :term:`TMPDIR` |
| 2170 | - :term:`BB_SERVER_TIMEOUT` |
| 2171 | |
| 2172 | For additional information on how to customize the extensible SDK's |
| 2173 | configuration, see the |
| 2174 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2175 | section in the Yocto Project Application Development and the |
| 2176 | Extensible Software Development Kit (eSDK) manual. |
| 2177 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2178 | :term:`EXCLUDE_FROM_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2179 | Triggers the OpenEmbedded build system's shared libraries resolver to |
| 2180 | exclude an entire package when scanning for shared libraries. |
| 2181 | |
| 2182 | .. note:: |
| 2183 | |
| 2184 | The shared libraries resolver's functionality results in part from |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2185 | the internal function ``package_do_shlibs``, which is part of the |
| 2186 | :ref:`ref-tasks-package` task. You should be aware that the shared |
| 2187 | libraries resolver might implicitly define some dependencies between |
| 2188 | packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2189 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2190 | The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2191 | :term:`PRIVATE_LIBS` variable, which excludes a |
| 2192 | package's particular libraries only and not the whole package. |
| 2193 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2194 | 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] | 2195 | particular package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2196 | |
| 2197 | EXCLUDE_FROM_SHLIBS = "1" |
| 2198 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2199 | :term:`EXCLUDE_FROM_WORLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2200 | Directs BitBake to exclude a recipe from world builds (i.e. |
| 2201 | ``bitbake world``). During world builds, BitBake locates, parses and |
| 2202 | builds all recipes found in every layer exposed in the |
| 2203 | ``bblayers.conf`` configuration file. |
| 2204 | |
| 2205 | To exclude a recipe from a world build using this variable, set the |
| 2206 | variable to "1" in the recipe. |
| 2207 | |
| 2208 | .. note:: |
| 2209 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2210 | 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] | 2211 | world build in order to satisfy dependencies of other recipes. Adding |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2212 | 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] | 2213 | explicitly added to the list of build targets in a world build. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2214 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2215 | :term:`EXTENDPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2216 | 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] | 2217 | version based on the recipe's :term:`PE` value. If :term:`PE` |
| 2218 | is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that |
| 2219 | value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1"). |
| 2220 | If a recipe's :term:`PE` is not set (the default) or is equal to zero, |
| 2221 | :term:`EXTENDPE` becomes "". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2222 | |
| 2223 | See the :term:`STAMP` variable for an example. |
| 2224 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2225 | :term:`EXTENDPKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2226 | The full package version specification as it appears on the final |
| 2227 | packages produced by a recipe. The variable's value is normally used |
| 2228 | to fix a runtime dependency to the exact same version of another |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2229 | package in the same recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2230 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2231 | RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2232 | |
| 2233 | The dependency relationships are intended to force the package |
| 2234 | manager to upgrade these types of packages in lock-step. |
| 2235 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2236 | :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2237 | When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2238 | tools are not in the source tree. |
| 2239 | |
| 2240 | When kernel tools are available in the tree, they are preferred over |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2241 | any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2242 | variable tells the OpenEmbedded build system to prefer the installed |
| 2243 | external tools. See the |
| 2244 | :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2245 | ``meta/classes-recipe`` to see how the variable is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2246 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2247 | :term:`EXTERNALSRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2248 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2249 | class, this variable points to the source tree, which is outside of |
| 2250 | the OpenEmbedded build system. When set, this variable sets the |
| 2251 | :term:`S` variable, which is what the OpenEmbedded build |
| 2252 | system uses to locate unpacked recipe source code. |
| 2253 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2254 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2255 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2256 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2257 | section in the Yocto Project Development Tasks Manual. |
| 2258 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2259 | :term:`EXTERNALSRC_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2260 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2261 | class, this variable points to the directory in which the recipe's |
| 2262 | source code is built, which is outside of the OpenEmbedded build |
| 2263 | system. When set, this variable sets the :term:`B` variable, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 2264 | which is what the OpenEmbedded build system uses to locate the |
| 2265 | :term:`Build Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2266 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2267 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2268 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2269 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2270 | section in the Yocto Project Development Tasks Manual. |
| 2271 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2272 | :term:`EXTRA_AUTORECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2273 | For recipes inheriting the :ref:`autotools <ref-classes-autotools>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2274 | class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2275 | pass to the ``autoreconf`` command that is executed during the |
| 2276 | :ref:`ref-tasks-configure` task. |
| 2277 | |
| 2278 | The default value is "--exclude=autopoint". |
| 2279 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2280 | :term:`EXTRA_IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2281 | A list of additional features to include in an image. When listing |
| 2282 | more than one feature, separate them with a space. |
| 2283 | |
| 2284 | Typically, you configure this variable in your ``local.conf`` file, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 2285 | which is found in the :term:`Build Directory`. Although you can use this |
| 2286 | variable from within a recipe, best practices dictate that you do not. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2287 | |
| 2288 | .. note:: |
| 2289 | |
| 2290 | To enable primary features from within the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2291 | :term:`IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2292 | |
| 2293 | Here are some examples of features you can add: |
| 2294 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2295 | - "dbg-pkgs" --- adds -dbg packages for all installed packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2296 | symbol information for debugging and profiling. |
| 2297 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2298 | - "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] | 2299 | enables post-installation logging. See the 'allow-empty-password' and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2300 | 'post-install-logging' features in the ":ref:`ref-features-image`" |
| 2301 | section for more information. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2302 | - "dev-pkgs" --- adds -dev packages for all installed packages. This is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2303 | useful if you want to develop against the libraries in the image. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2304 | - "read-only-rootfs" --- creates an image whose root filesystem is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2305 | read-only. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2306 | ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2307 | section in the Yocto Project Development Tasks Manual for more |
| 2308 | information |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2309 | - "tools-debug" --- adds debugging tools such as gdb and strace. |
| 2310 | - "tools-sdk" --- adds development tools such as gcc, make, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2311 | pkgconfig and so forth. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2312 | - "tools-testapps" --- adds useful testing tools |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2313 | such as ts_print, aplay, arecord and so forth. |
| 2314 | |
| 2315 | For a complete list of image features that ships with the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2316 | Project, see the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2317 | |
| 2318 | For an example that shows how to customize your image by using this |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2319 | variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2320 | section in the Yocto Project Development Tasks Manual. |
| 2321 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2322 | :term:`EXTRA_IMAGECMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2323 | Specifies additional options for the image creation command that has |
| 2324 | been specified in :term:`IMAGE_CMD`. When setting |
| 2325 | this variable, use an override for the associated image type. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2326 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2327 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2328 | EXTRA_IMAGECMD:ext3 ?= "-i 4096" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2329 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2330 | :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2331 | A list of recipes to build that do not provide packages for |
| 2332 | installing into the root filesystem. |
| 2333 | |
| 2334 | 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] | 2335 | needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2336 | variable to list these recipes and thus specify the dependencies. A |
| 2337 | typical example is a required bootloader in a machine configuration. |
| 2338 | |
| 2339 | .. note:: |
| 2340 | |
| 2341 | To add packages to the root filesystem, see the various |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 2342 | :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2343 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2344 | :term:`EXTRA_OECMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2345 | Additional `CMake <https://cmake.org/overview/>`__ options. See the |
| 2346 | :ref:`cmake <ref-classes-cmake>` class for additional information. |
| 2347 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2348 | :term:`EXTRA_OECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2349 | Additional ``configure`` script options. See |
| 2350 | :term:`PACKAGECONFIG_CONFARGS` for |
| 2351 | additional information on passing configure script options. |
| 2352 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2353 | :term:`EXTRA_OEMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2354 | Additional GNU ``make`` options. |
| 2355 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2356 | Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2357 | variable to specify any required GNU options. |
| 2358 | |
| 2359 | :term:`PARALLEL_MAKE` and |
| 2360 | :term:`PARALLEL_MAKEINST` also make use of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2361 | :term:`EXTRA_OEMAKE` to pass the required flags. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2362 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2363 | :term:`EXTRA_OESCONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2364 | When inheriting the :ref:`scons <ref-classes-scons>` class, this |
| 2365 | variable specifies additional configuration options you want to pass |
| 2366 | to the ``scons`` command line. |
| 2367 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2368 | :term:`EXTRA_USERS_PARAMS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2369 | When inheriting the :ref:`extrausers <ref-classes-extrausers>` |
| 2370 | class, this variable provides image level user and group operations. |
| 2371 | This is a more global method of providing user and group |
| 2372 | configuration as compared to using the |
| 2373 | :ref:`useradd <ref-classes-useradd>` class, which ties user and |
| 2374 | group configurations to a specific recipe. |
| 2375 | |
| 2376 | The set list of commands you can configure using the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2377 | :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2378 | commands map to the normal Unix commands of the same names:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2379 | |
| 2380 | # EXTRA_USERS_PARAMS = "\ |
| 2381 | # useradd -p '' tester; \ |
| 2382 | # groupadd developers; \ |
| 2383 | # userdel nobody; \ |
| 2384 | # groupdel -g video; \ |
| 2385 | # groupmod -g 1020 developers; \ |
| 2386 | # usermod -s /bin/sh tester; \ |
| 2387 | # " |
| 2388 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 2389 | Hardcoded passwords are supported via the ``-p`` parameters for |
| 2390 | ``useradd`` or ``usermod``, but only hashed. |
| 2391 | |
| 2392 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns |
| 2393 | passwords. First on host, create the (escaped) password hash:: |
| 2394 | |
| 2395 | printf "%q" $(mkpasswd -m sha256crypt tester01) |
| 2396 | |
| 2397 | The resulting hash is set to a variable and used in ``useradd`` command parameters:: |
| 2398 | |
| 2399 | inherit extrausers |
| 2400 | PASSWD = "\$X\$ABC123\$A-Long-Hash" |
| 2401 | EXTRA_USERS_PARAMS = "\ |
| 2402 | useradd -p '${PASSWD}' tester-jim; \ |
| 2403 | useradd -p '${PASSWD}' tester-sue; \ |
| 2404 | " |
| 2405 | |
| 2406 | Finally, here is an example that sets the root password:: |
| 2407 | |
| 2408 | inherit extrausers |
| 2409 | EXTRA_USERS_PARAMS = "\ |
| 2410 | usermod -p '${PASSWD}' root; \ |
| 2411 | " |
| 2412 | |
| 2413 | .. note:: |
| 2414 | |
| 2415 | From a security perspective, hardcoding a default password is not |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 2416 | generally a good idea or even legal in some jurisdictions. It is |
| 2417 | 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] | 2418 | image. |
| 2419 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2420 | Additionally there is a special ``passwd-expire`` command that will |
| 2421 | cause the password for a user to be expired and thus force changing it |
| 2422 | on first login, for example:: |
| 2423 | |
| 2424 | EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" |
| 2425 | |
| 2426 | .. note:: |
| 2427 | |
| 2428 | At present, ``passwd-expire`` may only work for remote logins when |
| 2429 | using OpenSSH and not dropbear as an SSH server. |
| 2430 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2431 | :term:`EXTRANATIVEPATH` |
| 2432 | A list of subdirectories of |
| 2433 | ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` |
| 2434 | added to the beginning of the environment variable ``PATH``. As an |
| 2435 | example, the following prepends |
| 2436 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to |
| 2437 | ``PATH``:: |
| 2438 | |
| 2439 | EXTRANATIVEPATH = "foo bar" |
| 2440 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2441 | :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2442 | Defines one or more packages to include in an image when a specific |
| 2443 | item is included in :term:`IMAGE_FEATURES`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2444 | When setting the value, :term:`FEATURE_PACKAGES` should have the name of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2445 | the feature item as an override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2446 | |
| 2447 | FEATURE_PACKAGES_widget = "package1 package2" |
| 2448 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2449 | In this example, if "widget" were added to :term:`IMAGE_FEATURES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2450 | package1 and package2 would be included in the image. |
| 2451 | |
| 2452 | .. note:: |
| 2453 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2454 | Packages installed by features defined through :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2455 | are often package groups. While similarly named, you should not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2456 | confuse the :term:`FEATURE_PACKAGES` variable with package groups, which |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2457 | are discussed elsewhere in the documentation. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2458 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2459 | :term:`FEED_DEPLOYDIR_BASE_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2460 | Points to the base URL of the server and location within the |
| 2461 | document-root that provides the metadata and packages required by |
| 2462 | OPKG to support runtime package management of IPK packages. You set |
| 2463 | this variable in your ``local.conf`` file. |
| 2464 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2465 | Consider the following example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2466 | |
| 2467 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" |
| 2468 | |
| 2469 | This example assumes you are serving |
| 2470 | your packages over HTTP and your databases are located in a directory |
| 2471 | named ``BOARD-dir``, which is underneath your HTTP server's |
| 2472 | document-root. In this case, the OpenEmbedded build system generates |
| 2473 | a set of configuration files for you in your target that work with |
| 2474 | the feed. |
| 2475 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2476 | :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2477 | The list of files and directories that are placed in a package. The |
| 2478 | :term:`PACKAGES` variable lists the packages |
| 2479 | generated by a recipe. |
| 2480 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2481 | To use the :term:`FILES` variable, provide a package name override that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2482 | identifies the resulting package. Then, provide a space-separated |
| 2483 | 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] | 2484 | part of the resulting package. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2485 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2486 | FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2487 | |
| 2488 | .. note:: |
| 2489 | |
| 2490 | - When specifying files or paths, you can pattern match using |
| 2491 | Python's |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 2492 | `glob <https://docs.python.org/3/library/glob.html>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2493 | syntax. For details on the syntax, see the documentation by |
| 2494 | following the previous link. |
| 2495 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2496 | - When specifying paths as part of the :term:`FILES` variable, it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2497 | good practice to use appropriate path variables. For example, |
| 2498 | use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` |
| 2499 | rather than ``/usr/bin``. You can find a list of these |
| 2500 | variables at the top of the ``meta/conf/bitbake.conf`` file in |
| 2501 | the :term:`Source Directory`. You will also |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2502 | find the default values of the various ``FILES:*`` variables in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2503 | this file. |
| 2504 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2505 | 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] | 2506 | editable and you know they should not be overwritten during the |
| 2507 | package update process by the Package Management System (PMS), you |
| 2508 | can identify these files so that the PMS will not overwrite them. See |
| 2509 | the :term:`CONFFILES` variable for information on |
| 2510 | how to identify these files to the PMS. |
| 2511 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2512 | :term:`FILES_SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2513 | Defines the file specification to match |
| 2514 | :term:`SOLIBSDEV`. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2515 | :term:`FILES_SOLIBSDEV` defines the full path name of the development |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2516 | symbolic link (symlink) for shared libraries on the target platform. |
| 2517 | |
| 2518 | The following statement from the ``bitbake.conf`` shows how it is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2519 | set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2520 | |
| 2521 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
| 2522 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2523 | :term:`FILESEXTRAPATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2524 | Extends the search path the OpenEmbedded build system uses when |
| 2525 | looking for files and patches as it processes recipes and append |
| 2526 | files. The default directories BitBake uses when it processes recipes |
| 2527 | are initially defined by the :term:`FILESPATH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2528 | variable. You can extend :term:`FILESPATH` variable by using |
| 2529 | :term:`FILESEXTRAPATHS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2530 | |
| 2531 | Best practices dictate that you accomplish this by using |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2532 | :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2533 | prepend paths as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2534 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2535 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2536 | |
| 2537 | In the above example, the build system first |
| 2538 | looks for files in a directory that has the same name as the |
| 2539 | corresponding append file. |
| 2540 | |
| 2541 | .. note:: |
| 2542 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2543 | When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2544 | expansion (``:=``) operator. Immediate expansion makes sure that |
| 2545 | BitBake evaluates :term:`THISDIR` at the time the |
| 2546 | directive is encountered rather than at some later time when |
| 2547 | expansion might result in a directory that does not contain the |
| 2548 | files you need. |
| 2549 | |
| 2550 | Also, include the trailing separating colon character if you are |
| 2551 | prepending. The trailing colon character is necessary because you |
| 2552 | are directing BitBake to extend the path by prepending directories |
| 2553 | to the search path. |
| 2554 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2555 | Here is another common use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2556 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2557 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2558 | |
| 2559 | In this example, the build system extends the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2560 | :term:`FILESPATH` variable to include a directory named ``files`` that is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2561 | in the same directory as the corresponding append file. |
| 2562 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2563 | This next example specifically adds three paths:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2564 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2565 | FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2566 | |
| 2567 | A final example shows how you can extend the search path and include |
| 2568 | a :term:`MACHINE`-specific override, which is useful |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2569 | in a BSP layer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2570 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2571 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2572 | |
| 2573 | The previous statement appears in the |
| 2574 | ``linux-yocto-dev.bbappend`` file, which is found in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2575 | :ref:`overview-manual/development-environment:yocto project source repositories` in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2576 | ``meta-intel/common/recipes-kernel/linux``. Here, the machine |
| 2577 | override is a special :term:`PACKAGE_ARCH` |
| 2578 | definition for multiple ``meta-intel`` machines. |
| 2579 | |
| 2580 | .. note:: |
| 2581 | |
| 2582 | 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] | 2583 | the value of :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2584 | |
| 2585 | By prepending paths in ``.bbappend`` files, you allow multiple append |
| 2586 | files that reside in different layers but are used for the same |
| 2587 | recipe to correctly extend the path. |
| 2588 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2589 | :term:`FILESOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2590 | A subset of :term:`OVERRIDES` used by the |
| 2591 | OpenEmbedded build system for creating |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2592 | :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2593 | uses overrides to automatically extend the |
| 2594 | :term:`FILESPATH` variable. For an example of how |
| 2595 | that works, see the :term:`FILESPATH` variable |
| 2596 | description. Additionally, you find more information on how overrides |
| 2597 | are handled in the |
| 2598 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 2599 | section of the BitBake User Manual. |
| 2600 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2601 | By default, the :term:`FILESOVERRIDES` variable is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2602 | |
| 2603 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
| 2604 | |
| 2605 | .. note:: |
| 2606 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2607 | Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2608 | with expected overrides and are used in an expected manner by the |
| 2609 | build system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2610 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2611 | :term:`FILESPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2612 | The default set of directories the OpenEmbedded build system uses |
| 2613 | when searching for patches and files. |
| 2614 | |
| 2615 | During the build process, BitBake searches each directory in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2616 | :term:`FILESPATH` in the specified order when looking for files and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2617 | patches specified by each ``file://`` URI in a recipe's |
| 2618 | :term:`SRC_URI` statements. |
| 2619 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2620 | The default value for the :term:`FILESPATH` variable is defined in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2621 | :ref:`ref-classes-base` class found in ``meta/classes-global`` in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2622 | :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2623 | |
| 2624 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ |
| 2625 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" |
| 2626 | |
| 2627 | The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2628 | :term:`FILESPATH` variable is automatically extended using the overrides |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2629 | from the :term:`FILESOVERRIDES` variable. |
| 2630 | |
| 2631 | .. note:: |
| 2632 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2633 | - Do not hand-edit the :term:`FILESPATH` variable. If you want the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2634 | build system to look in directories other than the defaults, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2635 | extend the :term:`FILESPATH` variable by using the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2636 | :term:`FILESEXTRAPATHS` variable. |
| 2637 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2638 | - Be aware that the default :term:`FILESPATH` directories do not map |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2639 | to directories in custom layers where append files |
| 2640 | (``.bbappend``) are used. If you want the build system to find |
| 2641 | patches or files that reside with your append files, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2642 | to extend the :term:`FILESPATH` variable by using the |
| 2643 | :term:`FILESEXTRAPATHS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2644 | |
| 2645 | 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] | 2646 | example, consider a case where there is the following directory structure |
| 2647 | for general and machine-specific configurations:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2648 | |
| 2649 | files/defconfig |
| 2650 | files/MACHINEA/defconfig |
| 2651 | files/MACHINEB/defconfig |
| 2652 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2653 | Also in the example, the :term:`SRC_URI` statement contains |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2654 | "file://defconfig". Given this scenario, you can set |
| 2655 | :term:`MACHINE` to "MACHINEA" and cause the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2656 | system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2657 | "MACHINEB" and the build system uses files from ``files/MACHINEB``. |
| 2658 | Finally, for any machine other than "MACHINEA" and "MACHINEB", the |
| 2659 | build system uses files from ``files/defconfig``. |
| 2660 | |
| 2661 | You can find out more about the patching process in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2662 | ":ref:`overview-manual/concepts:patching`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2663 | in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2664 | ":ref:`dev-manual/common-tasks:patching code`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2665 | the Yocto Project Development Tasks Manual. See the |
| 2666 | :ref:`ref-tasks-patch` task as well. |
| 2667 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2668 | :term:`FILESYSTEM_PERMS_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2669 | Allows you to define your own file permissions settings table as part |
| 2670 | of your configuration for the packaging process. For example, suppose |
| 2671 | you need a consistent set of custom permissions for a set of groups |
| 2672 | and users across an entire work project. It is best to do this in the |
| 2673 | packages themselves but this is not always possible. |
| 2674 | |
| 2675 | By default, the OpenEmbedded build system uses the ``fs-perms.txt``, |
| 2676 | which is located in the ``meta/files`` folder in the :term:`Source Directory`. |
| 2677 | If you create your own file |
| 2678 | permissions setting table, you should place it in your layer or the |
| 2679 | distro's layer. |
| 2680 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2681 | You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2682 | ``conf/local.conf`` file, which is found in the :term:`Build Directory`, |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 2683 | to point to your custom ``fs-perms.txt``. You can specify more than a |
| 2684 | single file permissions setting table. The paths you specify to these |
| 2685 | files must be defined within the :term:`BBPATH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2686 | |
| 2687 | For guidance on how to create your own file permissions settings |
| 2688 | table file, examine the existing ``fs-perms.txt``. |
| 2689 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2690 | :term:`FIT_DESC` |
| 2691 | Specifies the description string encoded into a fitImage. The default |
| 2692 | value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2693 | class as follows:: |
| 2694 | |
| 2695 | FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" |
| 2696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2697 | :term:`FIT_GENERATE_KEYS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2698 | Decides whether to generate the keys for signing fitImage if they |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2699 | don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2700 | The default value is 0. |
| 2701 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2702 | :term:`FIT_HASH_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2703 | Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256. |
| 2704 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2705 | :term:`FIT_KERNEL_COMP_ALG` |
| 2706 | Compression algorithm to use for the kernel image inside the FIT Image. |
| 2707 | At present, the only supported values are "gzip" (default) or "none" |
| 2708 | If you set this variable to anything other than "none" you may also need |
| 2709 | to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. |
| 2710 | |
| 2711 | :term:`FIT_KERNEL_COMP_ALG_EXTENSION` |
| 2712 | File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default |
| 2713 | value is ".gz". |
| 2714 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2715 | :term:`FIT_KEY_GENRSA_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2716 | Arguments to openssl genrsa for generating RSA private key for signing |
| 2717 | fitImage. The default value is "-F4". i.e. the public exponent 65537 to |
| 2718 | use. |
| 2719 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2720 | :term:`FIT_KEY_REQ_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2721 | Arguments to openssl req for generating certificate for signing fitImage. |
| 2722 | The default value is "-batch -new". batch for non interactive mode |
| 2723 | and new for generating new keys. |
| 2724 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2725 | :term:`FIT_KEY_SIGN_PKCS` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2726 | Format for public key certificate used in signing fitImage. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2727 | The default value is "x509". |
| 2728 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2729 | :term:`FIT_SIGN_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2730 | Specifies the signature algorithm used in creating the FIT Image. |
| 2731 | For e.g. rsa2048. |
| 2732 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2733 | :term:`FIT_PAD_ALG` |
| 2734 | Specifies the padding algorithm used in creating the FIT Image. |
| 2735 | The default value is "pkcs-1.5". |
| 2736 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2737 | :term:`FIT_SIGN_INDIVIDUAL` |
| 2738 | If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2739 | class will sign the kernel, dtb and ramdisk images individually in addition |
| 2740 | to signing the fitImage itself. This could be useful if you are |
| 2741 | intending to verify signatures in another context than booting via |
| 2742 | U-Boot. |
| 2743 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2744 | :term:`FIT_SIGN_NUMBITS` |
| 2745 | Size of private key in number of bits used in fitImage. The default |
| 2746 | value is "2048". |
| 2747 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2748 | :term:`FONT_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2749 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2750 | this variable specifies the runtime dependencies for font packages. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 2751 | By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2752 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2753 | :term:`FONT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2754 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2755 | this variable identifies packages containing font files that need to |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2756 | be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2757 | that fonts are in the recipe's main package (i.e. |
| 2758 | ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you |
| 2759 | need are in a package other than that main package. |
| 2760 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2761 | :term:`FORCE_RO_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2762 | Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` |
| 2763 | during the generation of the root filesystem. |
| 2764 | |
| 2765 | Set the variable to "1" to force the removal of these packages. |
| 2766 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2767 | :term:`FULL_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 2768 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2769 | compiling an optimized system. This variable defaults to "-O2 -pipe |
| 2770 | ${DEBUG_FLAGS}". |
| 2771 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2772 | :term:`GCCPIE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2773 | Enables Position Independent Executables (PIE) within the GNU C |
| 2774 | Compiler (GCC). Enabling PIE in the GCC makes Return Oriented |
| 2775 | Programming (ROP) attacks much more difficult to execute. |
| 2776 | |
| 2777 | By default the ``security_flags.inc`` file enables PIE by setting the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2778 | variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2779 | |
| 2780 | GCCPIE ?= "--enable-default-pie" |
| 2781 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2782 | :term:`GCCVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2783 | Specifies the default version of the GNU C Compiler (GCC) used for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2784 | compilation. By default, :term:`GCCVERSION` is set to "8.x" in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2785 | ``meta/conf/distro/include/tcmode-default.inc`` include file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2786 | |
| 2787 | GCCVERSION ?= "8.%" |
| 2788 | |
| 2789 | You can override this value by setting it in a |
| 2790 | configuration file such as the ``local.conf``. |
| 2791 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2792 | :term:`GDB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2793 | The minimal command and arguments to run the GNU Debugger. |
| 2794 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2795 | :term:`GIR_EXTRA_LIBS_PATH` |
| 2796 | Allows to specify an extra search path for ``.so`` files |
| 2797 | in GLib related recipes using GObject introspection, |
| 2798 | and which do not compile without this setting. |
| 2799 | See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`" |
| 2800 | section for details. |
| 2801 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2802 | :term:`GITDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2803 | The directory in which a local copy of a Git repository is stored |
| 2804 | when it is cloned. |
| 2805 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2806 | :term:`GITHUB_BASE_URI` |
| 2807 | When inheriting the :ref:`github-releases <ref-classes-github-releases>` |
| 2808 | class, specifies the base URL for fetching releases for the github |
| 2809 | project you wish to fetch sources from. The default value is as follows:: |
| 2810 | |
| 2811 | GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/" |
| 2812 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2813 | :term:`GLIBC_GENERATE_LOCALES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2814 | Specifies the list of GLIBC locales to generate should you not wish |
| 2815 | to generate all LIBC locals, which can be time consuming. |
| 2816 | |
| 2817 | .. note:: |
| 2818 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2819 | If you specifically remove the locale ``en_US.UTF-8``, you must set |
| 2820 | :term:`IMAGE_LINGUAS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2821 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2822 | You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2823 | By default, all locales are generated. |
| 2824 | :: |
| 2825 | |
| 2826 | GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" |
| 2827 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2828 | :term:`GROUPADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2829 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2830 | this variable specifies for a package what parameters should be |
| 2831 | passed to the ``groupadd`` command if you wish to add a group to the |
| 2832 | system when the package is installed. |
| 2833 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2834 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2835 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2836 | GROUPADD_PARAM:${PN} = "-r netdev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2837 | |
| 2838 | For information on the standard Linux shell command |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2839 | ``groupadd``, see https://linux.die.net/man/8/groupadd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2840 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2841 | :term:`GROUPMEMS_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2842 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2843 | this variable specifies for a package what parameters should be |
| 2844 | passed to the ``groupmems`` command if you wish to modify the members |
| 2845 | of a group when the package is installed. |
| 2846 | |
| 2847 | For information on the standard Linux shell command ``groupmems``, |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2848 | see https://linux.die.net/man/8/groupmems. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2849 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2850 | :term:`GRUB_GFXSERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2851 | Configures the GNU GRand Unified Bootloader (GRUB) to have graphics |
| 2852 | and serial in the boot menu. Set this variable to "1" in your |
| 2853 | ``local.conf`` or distribution configuration file to enable graphics |
| 2854 | and serial in the menu. |
| 2855 | |
| 2856 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 2857 | information on how this variable is used. |
| 2858 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2859 | :term:`GRUB_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2860 | Additional options to add to the GNU GRand Unified Bootloader (GRUB) |
| 2861 | configuration. Use a semi-colon character (``;``) to separate |
| 2862 | multiple options. |
| 2863 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2864 | The :term:`GRUB_OPTS` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2865 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2866 | on how this variable is used. |
| 2867 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2868 | :term:`GRUB_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2869 | Specifies the timeout before executing the default ``LABEL`` in the |
| 2870 | GNU GRand Unified Bootloader (GRUB). |
| 2871 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2872 | The :term:`GRUB_TIMEOUT` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2873 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2874 | on how this variable is used. |
| 2875 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2876 | :term:`GTKIMMODULES_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2877 | When inheriting the |
| 2878 | :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class, |
| 2879 | this variable specifies the packages that contain the GTK+ input |
| 2880 | method modules being installed when the modules are in packages other |
| 2881 | than the main package. |
| 2882 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2883 | :term:`HOMEPAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2884 | Website where more information about the software the recipe is |
| 2885 | building can be found. |
| 2886 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2887 | :term:`HOST_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2888 | The name of the target architecture, which is normally the same as |
| 2889 | :term:`TARGET_ARCH`. The OpenEmbedded build system |
| 2890 | supports many architectures. Here is an example list of architectures |
| 2891 | supported. This list is by no means complete as the architecture is |
| 2892 | configurable: |
| 2893 | |
| 2894 | - arm |
| 2895 | - i586 |
| 2896 | - x86_64 |
| 2897 | - powerpc |
| 2898 | - powerpc64 |
| 2899 | - mips |
| 2900 | - mipsel |
| 2901 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2902 | :term:`HOST_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2903 | Specifies architecture-specific compiler flags that are passed to the |
| 2904 | C compiler. |
| 2905 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2906 | Default initialization for :term:`HOST_CC_ARCH` varies depending on what |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2907 | is being built: |
| 2908 | |
| 2909 | - :term:`TARGET_CC_ARCH` when building for the |
| 2910 | target |
| 2911 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2912 | - :term:`BUILD_CC_ARCH` when building for the build host (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2913 | ``-native``) |
| 2914 | |
| 2915 | - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. |
| 2916 | ``nativesdk-``) |
| 2917 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2918 | :term:`HOST_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2919 | Specifies the name of the target operating system, which is normally |
| 2920 | the same as the :term:`TARGET_OS`. The variable can |
| 2921 | be set to "linux" for ``glibc``-based systems and to "linux-musl" for |
| 2922 | ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and |
| 2923 | "linux-musleabi" values possible. |
| 2924 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2925 | :term:`HOST_PREFIX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2926 | Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2927 | is normally the same as :term:`TARGET_PREFIX`. |
| 2928 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2929 | :term:`HOST_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2930 | Specifies the system, including the architecture and the operating |
| 2931 | system, for which the build is occurring in the context of the |
| 2932 | current recipe. |
| 2933 | |
| 2934 | The OpenEmbedded build system automatically sets this variable based |
| 2935 | on :term:`HOST_ARCH`, |
| 2936 | :term:`HOST_VENDOR`, and |
| 2937 | :term:`HOST_OS` variables. |
| 2938 | |
| 2939 | .. note:: |
| 2940 | |
| 2941 | You do not need to set the variable yourself. |
| 2942 | |
| 2943 | Consider these two examples: |
| 2944 | |
| 2945 | - Given a native recipe on a 32-bit x86 machine running Linux, the |
| 2946 | value is "i686-linux". |
| 2947 | |
| 2948 | - Given a recipe being built for a little-endian MIPS target running |
| 2949 | Linux, the value might be "mipsel-linux". |
| 2950 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2951 | :term:`HOST_VENDOR` |
| 2952 | Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the |
| 2953 | same as :term:`TARGET_VENDOR`. |
| 2954 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2955 | :term:`HOSTTOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2956 | A space-separated list (filter) of tools on the build host that |
| 2957 | should be allowed to be called from within build tasks. Using this |
| 2958 | filter helps reduce the possibility of host contamination. If a tool |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2959 | 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] | 2960 | host, the OpenEmbedded build system produces an error and the build |
| 2961 | is not started. |
| 2962 | |
| 2963 | For additional information, see |
| 2964 | :term:`HOSTTOOLS_NONFATAL`. |
| 2965 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2966 | :term:`HOSTTOOLS_NONFATAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2967 | A space-separated list (filter) of tools on the build host that |
| 2968 | should be allowed to be called from within build tasks. Using this |
| 2969 | filter helps reduce the possibility of host contamination. Unlike |
| 2970 | :term:`HOSTTOOLS`, the OpenEmbedded build system |
| 2971 | 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] | 2972 | :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can |
| 2973 | use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2974 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2975 | :term:`ICECC_CLASS_DISABLE` |
| 2976 | Identifies user classes that you do not want the Icecream distributed |
| 2977 | compile support to consider. This variable is used by the |
| 2978 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2979 | your ``local.conf`` file. |
| 2980 | |
| 2981 | When you list classes using this variable, the recipes inheriting |
| 2982 | those classes will not benefit from distributed compilation across |
| 2983 | remote hosts. Instead they will be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2984 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2985 | :term:`ICECC_DISABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2986 | Disables or enables the ``icecc`` (Icecream) function. For more |
| 2987 | information on this function and best practices for using this |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2988 | variable, see the ":ref:`ref-classes-icecc`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2989 | section. |
| 2990 | |
| 2991 | Setting this variable to "1" in your ``local.conf`` disables the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2992 | function:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2993 | |
| 2994 | ICECC_DISABLED ??= "1" |
| 2995 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2996 | To enable the function, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2997 | |
| 2998 | ICECC_DISABLED = "" |
| 2999 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3000 | :term:`ICECC_ENV_EXEC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3001 | Points to the ``icecc-create-env`` script that you provide. This |
| 3002 | variable is used by the :ref:`icecc <ref-classes-icecc>` class. You |
| 3003 | set this variable in your ``local.conf`` file. |
| 3004 | |
| 3005 | If you do not point to a script that you provide, the OpenEmbedded |
| 3006 | build system uses the default script provided by the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 3007 | :oe_git:`icecc-create-env_0.1.bb |
| 3008 | </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>` |
| 3009 | recipe, which is a modified version and not the one that comes with |
| 3010 | ``icecream``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3011 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3012 | :term:`ICECC_PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3013 | Extra options passed to the ``make`` command during the |
| 3014 | :ref:`ref-tasks-compile` task that specify parallel |
| 3015 | compilation. This variable usually takes the form of "-j x", where x |
| 3016 | represents the maximum number of parallel threads ``make`` can run. |
| 3017 | |
| 3018 | .. note:: |
| 3019 | |
| 3020 | The options passed affect builds on all enabled machines on the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3021 | network, which are machines running the ``iceccd`` daemon. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3022 | |
| 3023 | If your enabled machines support multiple cores, coming up with the |
| 3024 | maximum number of parallel threads that gives you the best |
| 3025 | performance could take some experimentation since machine speed, |
| 3026 | network lag, available memory, and existing machine loads can all |
| 3027 | affect build time. Consequently, unlike the |
| 3028 | :term:`PARALLEL_MAKE` variable, there is no |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3029 | rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3030 | performance. |
| 3031 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3032 | 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] | 3033 | 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] | 3034 | cores as is done with :term:`PARALLEL_MAKE`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3035 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3036 | :term:`ICECC_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3037 | The location of the ``icecc`` binary. You can set this variable in |
| 3038 | your ``local.conf`` file. If your ``local.conf`` file does not define |
| 3039 | this variable, the :ref:`icecc <ref-classes-icecc>` class attempts |
| 3040 | to define it by locating ``icecc`` using ``which``. |
| 3041 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3042 | :term:`ICECC_RECIPE_DISABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3043 | Identifies user recipes that you do not want the Icecream distributed |
| 3044 | compile support to consider. This variable is used by the |
| 3045 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 3046 | your ``local.conf`` file. |
| 3047 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3048 | When you list recipes using this variable, you are excluding them |
| 3049 | from distributed compilation across remote hosts. Instead they will |
| 3050 | be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3051 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3052 | :term:`ICECC_RECIPE_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3053 | Identifies user recipes that use an empty |
| 3054 | :term:`PARALLEL_MAKE` variable that you want to |
| 3055 | force remote distributed compilation on using the Icecream |
| 3056 | distributed compile support. This variable is used by the |
| 3057 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 3058 | your ``local.conf`` file. |
| 3059 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3060 | :term:`IMAGE_BASENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3061 | The base name of image output files. This variable defaults to the |
| 3062 | recipe name (``${``\ :term:`PN`\ ``}``). |
| 3063 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3064 | :term:`IMAGE_BOOT_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3065 | A space-separated list of files installed into the boot partition |
| 3066 | when preparing an image using the Wic tool with the |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3067 | ``bootimg-partition`` source plugin. By default, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3068 | the files are |
| 3069 | installed under the same name as the source files. To change the |
| 3070 | installed name, separate it from the original name with a semi-colon |
| 3071 | (;). Source files need to be located in |
| 3072 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3073 | examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3074 | |
| 3075 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" |
| 3076 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" |
| 3077 | |
| 3078 | Alternatively, source files can be picked up using a glob pattern. In |
| 3079 | this case, the destination file must have the same name as the base |
| 3080 | name of the source file path. To install files into a directory |
| 3081 | within the target location, pass its name after a semi-colon (;). |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3082 | Here are two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3083 | |
| 3084 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" |
| 3085 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" |
| 3086 | |
| 3087 | The first example |
| 3088 | installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` |
| 3089 | into the root of the target partition. The second example installs |
| 3090 | the same files into a ``boot`` directory within the target partition. |
| 3091 | |
| 3092 | You can find information on how to use the Wic tool in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3093 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3094 | section of the Yocto Project Development Tasks Manual. Reference |
| 3095 | material for Wic is located in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3096 | ":doc:`/ref-manual/kickstart`" chapter. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3097 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3098 | :term:`IMAGE_BUILDINFO_FILE` |
| 3099 | When using the :ref:`image-buildinfo <ref-classes-image-buildinfo>` class, |
| 3100 | specifies the file in the image to write the build information into. The |
| 3101 | default value is "``${sysconfdir}/buildinfo``". |
| 3102 | |
| 3103 | :term:`IMAGE_BUILDINFO_VARS` |
| 3104 | When using the :ref:`image-buildinfo <ref-classes-image-buildinfo>` class, |
| 3105 | specifies the list of variables to include in the `Build Configuration` |
| 3106 | section of the output file (as a space-separated list). Defaults to |
| 3107 | ":term:`DISTRO` :term:`DISTRO_VERSION`". |
| 3108 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3109 | :term:`IMAGE_CLASSES` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3110 | A list of classes that all images should inherit. This is typically used |
| 3111 | to enable functionality across all image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3112 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3113 | Classes specified in :term:`IMAGE_CLASSES` must be located in the |
| 3114 | ``classes-recipe/`` or ``classes/`` subdirectories. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3115 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3116 | :term:`IMAGE_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3117 | Specifies the command to create the image file for a specific image |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3118 | type, which corresponds to the value set in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3119 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, |
| 3120 | ``btrfs``, and so forth). When setting this variable, you should use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3121 | an override for the associated type. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3122 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3123 | IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3124 | --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3125 | ${EXTRA_IMAGECMD}" |
| 3126 | |
| 3127 | You typically do not need to set this variable unless you are adding |
| 3128 | support for a new image type. For more examples on how to set this |
| 3129 | variable, see the :ref:`image_types <ref-classes-image_types>` |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3130 | class file, which is ``meta/classes-recipe/image_types.bbclass``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3131 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3132 | :term:`IMAGE_DEVICE_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3133 | Specifies one or more files that contain custom device tables that |
| 3134 | are passed to the ``makedevs`` command as part of creating an image. |
| 3135 | These files list basic device nodes that should be created under |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3136 | ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3137 | ``files/device_table-minimal.txt`` is used, which is located by |
| 3138 | :term:`BBPATH`. For details on how you should write |
| 3139 | device table files, see ``meta/files/device_table-minimal.txt`` as an |
| 3140 | example. |
| 3141 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3142 | :term:`IMAGE_EFI_BOOT_FILES` |
| 3143 | A space-separated list of files installed into the boot partition |
| 3144 | when preparing an image using the Wic tool with the |
| 3145 | ``bootimg-efi`` source plugin. By default, |
| 3146 | the files are |
| 3147 | installed under the same name as the source files. To change the |
| 3148 | installed name, separate it from the original name with a semi-colon |
| 3149 | (;). Source files need to be located in |
| 3150 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
| 3151 | examples:: |
| 3152 | |
| 3153 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" |
| 3154 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" |
| 3155 | |
| 3156 | Alternatively, source files can be picked up using a glob pattern. In |
| 3157 | this case, the destination file must have the same name as the base |
| 3158 | name of the source file path. To install files into a directory |
| 3159 | within the target location, pass its name after a semi-colon (;). |
| 3160 | Here are two examples:: |
| 3161 | |
| 3162 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" |
| 3163 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" |
| 3164 | |
| 3165 | The first example |
| 3166 | installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` |
| 3167 | into the root of the target partition. The second example installs |
| 3168 | the same files into a ``boot`` directory within the target partition. |
| 3169 | |
| 3170 | You can find information on how to use the Wic tool in the |
| 3171 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
| 3172 | section of the Yocto Project Development Tasks Manual. Reference |
| 3173 | material for Wic is located in the |
| 3174 | ":doc:`/ref-manual/kickstart`" chapter. |
| 3175 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3176 | :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3177 | The primary list of features to include in an image. Typically, you |
| 3178 | configure this variable in an image recipe. Although you can use this |
| 3179 | variable from your ``local.conf`` file, which is found in the |
| 3180 | :term:`Build Directory`, best practices dictate that you do |
| 3181 | not. |
| 3182 | |
| 3183 | .. note:: |
| 3184 | |
| 3185 | To enable extra features from outside the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3186 | :term:`EXTRA_IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3187 | |
| 3188 | 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] | 3189 | the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3190 | |
| 3191 | For an example that shows how to customize your image by using this |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3192 | variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3193 | section in the Yocto Project Development Tasks Manual. |
| 3194 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3195 | :term:`IMAGE_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3196 | Specifies the formats the OpenEmbedded build system uses during the |
| 3197 | build when creating the root filesystem. For example, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3198 | :term:`IMAGE_FSTYPES` as follows causes the build system to create root |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3199 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3200 | |
| 3201 | IMAGE_FSTYPES = "ext3 tar.bz2" |
| 3202 | |
| 3203 | For the complete list of supported image formats from which you can |
| 3204 | choose, see :term:`IMAGE_TYPES`. |
| 3205 | |
| 3206 | .. note:: |
| 3207 | |
| 3208 | - If an image recipe uses the "inherit image" line and you are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3209 | setting :term:`IMAGE_FSTYPES` inside the recipe, you must set |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3210 | :term:`IMAGE_FSTYPES` prior to using the "inherit image" line. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3211 | |
| 3212 | - Due to the way the OpenEmbedded build system processes this |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3213 | variable, you cannot update its contents by using ``:append`` |
| 3214 | or ``:prepend``. You must use the ``+=`` operator to add one or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3215 | more options to the :term:`IMAGE_FSTYPES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3216 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3217 | :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3218 | Used by recipes to specify the packages to install into an image |
| 3219 | through the :ref:`image <ref-classes-image>` class. Use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3220 | :term:`IMAGE_INSTALL` variable with care to avoid ordering issues. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3221 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3222 | Image recipes set :term:`IMAGE_INSTALL` to specify the packages to |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3223 | install into an image through :ref:`ref-classes-image`. Additionally, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3224 | there are "helper" classes such as the |
| 3225 | :ref:`core-image <ref-classes-core-image>` class which can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3226 | take lists used with :term:`IMAGE_FEATURES` and turn them into |
| 3227 | auto-generated entries in :term:`IMAGE_INSTALL` in addition to its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3228 | default contents. |
| 3229 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3230 | 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] | 3231 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3232 | IMAGE_INSTALL:append = " package-name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3233 | |
| 3234 | Be sure to include the space |
| 3235 | between the quotation character and the start of the package name or |
| 3236 | names. |
| 3237 | |
| 3238 | .. note:: |
| 3239 | |
| 3240 | - When working with a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3241 | :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3242 | image, do not use the :term:`IMAGE_INSTALL` variable to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3243 | packages for installation. Instead, use the |
| 3244 | :term:`PACKAGE_INSTALL` variable, which |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3245 | allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3246 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3247 | For information on creating an :term:`Initramfs`, see the |
| 3248 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3249 | section in the Yocto Project Development Tasks Manual. |
| 3250 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3251 | - Using :term:`IMAGE_INSTALL` with the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3252 | :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3253 | BitBake operator within the ``/conf/local.conf`` file or from |
| 3254 | within an image recipe is not recommended. Use of this operator |
| 3255 | in these ways can cause ordering issues. Since |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3256 | :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3257 | value using the |
| 3258 | :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3259 | operator, using a ``+=`` operation against :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3260 | results in unexpected behavior when used within |
| 3261 | ``conf/local.conf``. Furthermore, the same operation from |
| 3262 | within an image recipe may or may not succeed depending on the |
| 3263 | specific situation. In both these cases, the behavior is |
| 3264 | contrary to how most users expect the ``+=`` operator to work. |
| 3265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3266 | :term:`IMAGE_LINGUAS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3267 | Specifies the list of locales to install into the image during the |
| 3268 | root filesystem construction process. The OpenEmbedded build system |
| 3269 | automatically splits locale files, which are used for localization, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3270 | into separate packages. Setting the :term:`IMAGE_LINGUAS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3271 | ensures that any locale packages that correspond to packages already |
| 3272 | selected for installation into the image are also installed. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3273 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3274 | |
| 3275 | IMAGE_LINGUAS = "pt-br de-de" |
| 3276 | |
| 3277 | In this example, the build system ensures any Brazilian Portuguese |
| 3278 | and German locale files that correspond to packages in the image are |
| 3279 | installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as |
| 3280 | ``*-locale-pt`` and ``*-locale-de``, since some software packages |
| 3281 | only provide locale files by language and not by country-specific |
| 3282 | language). |
| 3283 | |
| 3284 | See the :term:`GLIBC_GENERATE_LOCALES` |
| 3285 | variable for information on generating GLIBC locales. |
| 3286 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3287 | |
| 3288 | :term:`IMAGE_LINK_NAME` |
| 3289 | The name of the output image symlink (which does not include |
| 3290 | the version part as :term:`IMAGE_NAME` does). The default value |
| 3291 | is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3292 | variables:: |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3293 | |
| 3294 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" |
| 3295 | |
| 3296 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3297 | :term:`IMAGE_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3298 | The manifest file for the image. This file lists all the installed |
| 3299 | packages that make up the image. The file contains package |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3300 | information on a line-per-package basis as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3301 | |
| 3302 | packagename packagearch version |
| 3303 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3304 | The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3305 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3306 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3307 | IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3308 | |
| 3309 | The location is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3310 | derived using the :term:`IMGDEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3311 | and :term:`IMAGE_NAME` variables. You can find |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3312 | 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] | 3313 | section in the Yocto Project Overview and Concepts Manual. |
| 3314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3315 | :term:`IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3316 | The name of the output image files minus the extension. This variable |
| 3317 | is derived using the :term:`IMAGE_BASENAME`, |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3318 | :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3319 | variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3320 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3321 | IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3322 | |
| 3323 | :term:`IMAGE_NAME_SUFFIX` |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3324 | Suffix used for the image output filename --- defaults to ``".rootfs"`` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3325 | to distinguish the image file from other files created during image |
| 3326 | building; however if this suffix is redundant or not desired you can |
| 3327 | clear the value of this variable (set the value to ""). For example, |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3328 | this is typically cleared in :term:`Initramfs` image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3329 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3330 | :term:`IMAGE_OVERHEAD_FACTOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3331 | Defines a multiplier that the build system applies to the initial |
| 3332 | image size for cases when the multiplier times the returned disk |
| 3333 | usage value for the image is greater than the sum of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3334 | :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] | 3335 | the multiplier applied to the initial image size creates free disk |
| 3336 | space in the image as overhead. By default, the build process uses a |
| 3337 | multiplier of 1.3 for this variable. This default value results in |
| 3338 | 30% free disk space added to the image when this method is used to |
| 3339 | determine the final generated image size. You should be aware that |
| 3340 | post install scripts and the package management system uses disk |
| 3341 | space inside this overhead area. Consequently, the multiplier does |
| 3342 | not produce an image with all the theoretical free disk space. See |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3343 | :term:`IMAGE_ROOTFS_SIZE` for information on how the build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3344 | determines the overall image size. |
| 3345 | |
| 3346 | The default 30% free disk space typically gives the image enough room |
| 3347 | to boot and allows for basic post installs while still leaving a |
| 3348 | small amount of free disk space. If 30% free space is inadequate, you |
| 3349 | can increase the default value. For example, the following setting |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3350 | gives you 50% free space added to the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3351 | |
| 3352 | IMAGE_OVERHEAD_FACTOR = "1.5" |
| 3353 | |
| 3354 | Alternatively, you can ensure a specific amount of free disk space is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3355 | added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3356 | variable. |
| 3357 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3358 | :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3359 | Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the |
| 3360 | OpenEmbedded build system. The variable is defined appropriately by |
| 3361 | the :ref:`package_deb <ref-classes-package_deb>`, |
| 3362 | :ref:`package_rpm <ref-classes-package_rpm>`, |
| 3363 | :ref:`package_ipk <ref-classes-package_ipk>`, or |
| 3364 | :ref:`package_tar <ref-classes-package_tar>` class. |
| 3365 | |
| 3366 | .. note:: |
| 3367 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3368 | The ``package_tar`` class is broken and is not supported. It is |
| 3369 | recommended that you do not use it. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3370 | |
| 3371 | The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3372 | :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3373 | for packaging up images and SDKs. |
| 3374 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3375 | You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3376 | variable is set indirectly through the appropriate |
| 3377 | :ref:`package_* <ref-classes-package>` class using the |
| 3378 | :term:`PACKAGE_CLASSES` variable. The |
| 3379 | OpenEmbedded build system uses the first package type (e.g. DEB, RPM, |
| 3380 | or IPK) that appears with the variable |
| 3381 | |
| 3382 | .. note:: |
| 3383 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3384 | Files using the ``.tar`` format are never used as a substitute |
| 3385 | packaging format for DEB, RPM, and IPK formatted files for your image |
| 3386 | or SDK. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3387 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3388 | :term:`IMAGE_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3389 | Specifies a list of functions to call once the OpenEmbedded build |
| 3390 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3391 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3392 | |
| 3393 | IMAGE_POSTPROCESS_COMMAND += "function; ... " |
| 3394 | |
| 3395 | If you need to pass the root filesystem path to a command within the |
| 3396 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3397 | directory that becomes the root filesystem image. See the |
| 3398 | :term:`IMAGE_ROOTFS` variable for more |
| 3399 | information. |
| 3400 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3401 | :term:`IMAGE_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3402 | Specifies a list of functions to call before the OpenEmbedded build |
| 3403 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3404 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3405 | |
| 3406 | IMAGE_PREPROCESS_COMMAND += "function; ... " |
| 3407 | |
| 3408 | If you need to pass the root filesystem path to a command within the |
| 3409 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3410 | directory that becomes the root filesystem image. See the |
| 3411 | :term:`IMAGE_ROOTFS` variable for more |
| 3412 | information. |
| 3413 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3414 | :term:`IMAGE_ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3415 | The location of the root filesystem while it is under construction |
| 3416 | (i.e. during the :ref:`ref-tasks-rootfs` task). This |
| 3417 | variable is not configurable. Do not change it. |
| 3418 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3419 | :term:`IMAGE_ROOTFS_ALIGNMENT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3420 | Specifies the alignment for the output image file in Kbytes. If the |
| 3421 | size of the image is not a multiple of this value, then the size is |
| 3422 | rounded up to the nearest multiple of the value. The default value is |
| 3423 | "1". See :term:`IMAGE_ROOTFS_SIZE` for |
| 3424 | additional information. |
| 3425 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3426 | :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3427 | Defines additional free disk space created in the image in Kbytes. By |
| 3428 | default, this variable is set to "0". This free disk space is added |
| 3429 | to the image after the build system determines the image size as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3430 | described in :term:`IMAGE_ROOTFS_SIZE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3431 | |
| 3432 | This variable is particularly useful when you want to ensure that a |
| 3433 | specific amount of free disk space is available on a device after an |
| 3434 | 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] | 3435 | free disk space is available, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3436 | |
| 3437 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" |
| 3438 | |
| 3439 | For example, the Yocto Project Build Appliance specifically requests |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3440 | 40 Gbytes of extra space with the line:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3441 | |
| 3442 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" |
| 3443 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3444 | :term:`IMAGE_ROOTFS_SIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3445 | Defines the size in Kbytes for the generated image. The OpenEmbedded |
| 3446 | build system determines the final size for the generated image using |
| 3447 | an algorithm that takes into account the initial disk space used for |
| 3448 | the generated image, a requested size for the image, and requested |
| 3449 | additional free disk space to be added to the image. Programatically, |
| 3450 | the build system determines the final size of the generated image as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3451 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3452 | |
| 3453 | if (image-du * overhead) < rootfs-size: |
| 3454 | internal-rootfs-size = rootfs-size + xspace |
| 3455 | else: |
| 3456 | internal-rootfs-size = (image-du * overhead) + xspace |
| 3457 | where: |
| 3458 | image-du = Returned value of the du command on the image. |
| 3459 | overhead = IMAGE_OVERHEAD_FACTOR |
| 3460 | rootfs-size = IMAGE_ROOTFS_SIZE |
| 3461 | internal-rootfs-size = Initial root filesystem size before any modifications. |
| 3462 | xspace = IMAGE_ROOTFS_EXTRA_SPACE |
| 3463 | |
| 3464 | See the :term:`IMAGE_OVERHEAD_FACTOR` |
| 3465 | and :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
| 3466 | variables for related information. |
| 3467 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3468 | :term:`IMAGE_TYPEDEP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3469 | Specifies a dependency from one image type on another. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3470 | example from the :ref:`image-live <ref-classes-image-live>` class:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3471 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3472 | IMAGE_TYPEDEP:live = "ext3" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3473 | |
| 3474 | In the previous example, the variable ensures that when "live" is |
| 3475 | listed with the :term:`IMAGE_FSTYPES` variable, |
| 3476 | the OpenEmbedded build system produces an ``ext3`` image first since |
| 3477 | one of the components of the live image is an ``ext3`` formatted |
| 3478 | partition containing the root filesystem. |
| 3479 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3480 | :term:`IMAGE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3481 | Specifies the complete list of supported image types by default: |
| 3482 | |
| 3483 | - btrfs |
| 3484 | - container |
| 3485 | - cpio |
| 3486 | - cpio.gz |
| 3487 | - cpio.lz4 |
| 3488 | - cpio.lzma |
| 3489 | - cpio.xz |
| 3490 | - cramfs |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3491 | - erofs |
| 3492 | - erofs-lz4 |
| 3493 | - erofs-lz4hc |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3494 | - ext2 |
| 3495 | - ext2.bz2 |
| 3496 | - ext2.gz |
| 3497 | - ext2.lzma |
| 3498 | - ext3 |
| 3499 | - ext3.gz |
| 3500 | - ext4 |
| 3501 | - ext4.gz |
| 3502 | - f2fs |
| 3503 | - hddimg |
| 3504 | - iso |
| 3505 | - jffs2 |
| 3506 | - jffs2.sum |
| 3507 | - multiubi |
| 3508 | - squashfs |
| 3509 | - squashfs-lz4 |
| 3510 | - squashfs-lzo |
| 3511 | - squashfs-xz |
| 3512 | - tar |
| 3513 | - tar.bz2 |
| 3514 | - tar.gz |
| 3515 | - tar.lz4 |
| 3516 | - tar.xz |
| 3517 | - tar.zst |
| 3518 | - ubi |
| 3519 | - ubifs |
| 3520 | - wic |
| 3521 | - wic.bz2 |
| 3522 | - wic.gz |
| 3523 | - wic.lzma |
| 3524 | |
| 3525 | For more information about these types of images, see |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3526 | ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3527 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3528 | :term:`IMAGE_VERSION_SUFFIX` |
| 3529 | Version suffix that is part of the default :term:`IMAGE_NAME` and |
| 3530 | :term:`KERNEL_ARTIFACT_NAME` values. |
| 3531 | Defaults to ``"-${DATETIME}"``, however you could set this to a |
| 3532 | version string that comes from your external build environment if |
| 3533 | desired, and this suffix would then be used consistently across |
| 3534 | the build artifacts. |
| 3535 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3536 | :term:`IMGDEPLOYDIR` |
| 3537 | When inheriting the :ref:`image <ref-classes-image>` class directly or |
| 3538 | through the :ref:`core-image <ref-classes-core-image>` class, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3539 | :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3540 | that is set in the ``image`` class as follows:: |
| 3541 | |
| 3542 | IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" |
| 3543 | |
| 3544 | Recipes inheriting the ``image`` class should copy files to be |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3545 | deployed into :term:`IMGDEPLOYDIR`, and the class will take care of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3546 | copying them into :term:`DEPLOY_DIR_IMAGE` afterwards. |
| 3547 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3548 | :term:`INC_PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3549 | Helps define the recipe revision for recipes that share a common |
| 3550 | ``include`` file. You can think of this variable as part of the |
| 3551 | recipe revision as set from within an include file. |
| 3552 | |
| 3553 | Suppose, for example, you have a set of recipes that are used across |
| 3554 | several projects. And, within each of those recipes the revision (its |
| 3555 | :term:`PR` value) is set accordingly. In this case, when |
| 3556 | the revision of those recipes changes, the burden is on you to find |
| 3557 | all those recipes and be sure that they get changed to reflect the |
| 3558 | updated version of the recipe. In this scenario, it can get |
| 3559 | complicated when recipes that are used in many places and provide |
| 3560 | common functionality are upgraded to a new revision. |
| 3561 | |
| 3562 | A more efficient way of dealing with this situation is to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3563 | :term:`INC_PR` variable inside the ``include`` files that the recipes |
| 3564 | share and then expand the :term:`INC_PR` variable within the recipes to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3565 | help define the recipe revision. |
| 3566 | |
| 3567 | The following provides an example that shows how to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3568 | :term:`INC_PR` variable given a common ``include`` file that defines the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3569 | variable. Once the variable is defined in the ``include`` file, you |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3570 | can use the variable to set the :term:`PR` values in each recipe. You |
| 3571 | will notice that when you set a recipe's :term:`PR` you can provide more |
| 3572 | granular revisioning by appending values to the :term:`INC_PR` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3573 | |
| 3574 | recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" |
| 3575 | recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" |
| 3576 | recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0" |
| 3577 | recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" |
| 3578 | |
| 3579 | The |
| 3580 | first line of the example establishes the baseline revision to be |
| 3581 | used for all recipes that use the ``include`` file. The remaining |
| 3582 | lines in the example are from individual recipes and show how the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3583 | :term:`PR` value is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3584 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3585 | :term:`INCOMPATIBLE_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3586 | Specifies a space-separated list of license names (as they would |
| 3587 | appear in :term:`LICENSE`) that should be excluded |
| 3588 | from the build. Recipes that provide no alternatives to listed |
| 3589 | incompatible licenses are not built. Packages that are individually |
| 3590 | licensed with the specified incompatible licenses will be deleted. |
| 3591 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 3592 | There is some support for wildcards in this variable's value, |
| 3593 | however it is restricted to specific licenses. Currently only |
| 3594 | these wildcards are allowed and expand as follows: |
| 3595 | |
| 3596 | - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later`` |
| 3597 | - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later`` |
| 3598 | - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later`` |
| 3599 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3600 | .. note:: |
| 3601 | |
| 3602 | This functionality is only regularly tested using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3603 | setting:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3604 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3605 | INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3606 | |
| 3607 | |
| 3608 | Although you can use other settings, you might be required to |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3609 | remove dependencies on (or provide alternatives to) components that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3610 | are required to produce a functional system image. |
| 3611 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3612 | :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS` |
| 3613 | Specifies a space-separated list of package and license pairs that |
| 3614 | are allowed to be used even if the license is specified in |
| 3615 | :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are |
| 3616 | separated using a colon. Example:: |
| 3617 | |
| 3618 | INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only" |
| 3619 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3620 | :term:`INHERIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3621 | Causes the named class or classes to be inherited globally. Anonymous |
| 3622 | functions in the class or classes are not executed for the base |
| 3623 | configuration and in each individual recipe. The OpenEmbedded build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3624 | system ignores changes to :term:`INHERIT` in individual recipes. |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3625 | Classes inherited using :term:`INHERIT` must be located in the |
| 3626 | ``classes-global/`` or ``classes/`` subdirectories. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3627 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3628 | For more information on :term:`INHERIT`, see the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3629 | :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 3630 | section in the BitBake User Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3631 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3632 | :term:`INHERIT_DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3633 | Lists classes that will be inherited at the distribution level. It is |
| 3634 | unlikely that you want to edit this variable. |
| 3635 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3636 | Classes specified in :term:`INHERIT_DISTRO` must be located in the |
| 3637 | ``classes-global/`` or ``classes/`` subdirectories. |
| 3638 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3639 | The default value of the variable is set as follows in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3640 | ``meta/conf/distro/defaultsetup.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3641 | |
| 3642 | INHERIT_DISTRO ?= "debian devshell sstate license" |
| 3643 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3644 | :term:`INHIBIT_DEFAULT_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3645 | Prevents the default dependencies, namely the C compiler and standard |
| 3646 | C library (libc), from being added to :term:`DEPENDS`. |
| 3647 | This variable is usually used within recipes that do not require any |
| 3648 | compilation using the C compiler. |
| 3649 | |
| 3650 | Set the variable to "1" to prevent the default dependencies from |
| 3651 | being added. |
| 3652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3653 | :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3654 | Prevents the OpenEmbedded build system from splitting out debug |
| 3655 | information during packaging. By default, the build system splits out |
| 3656 | debugging information during the |
| 3657 | :ref:`ref-tasks-package` task. For more information on |
| 3658 | how debug information is split out, see the |
| 3659 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
| 3660 | variable. |
| 3661 | |
| 3662 | To prevent the build system from splitting out debug information |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3663 | during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3664 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3665 | |
| 3666 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
| 3667 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3668 | :term:`INHIBIT_PACKAGE_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3669 | If set to "1", causes the build to not strip binaries in resulting |
| 3670 | packages and prevents the ``-dbg`` package from containing the source |
| 3671 | files. |
| 3672 | |
| 3673 | By default, the OpenEmbedded build system strips binaries and puts |
| 3674 | the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3675 | Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3676 | plan to debug in general. |
| 3677 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3678 | :term:`INHIBIT_SYSROOT_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3679 | If set to "1", causes the build to not strip binaries in the |
| 3680 | resulting sysroot. |
| 3681 | |
| 3682 | By default, the OpenEmbedded build system strips binaries in the |
| 3683 | resulting sysroot. When you specifically set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3684 | :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3685 | this stripping. |
| 3686 | |
| 3687 | If you want to use this variable, include the |
| 3688 | :ref:`staging <ref-classes-staging>` class. This class uses a |
| 3689 | ``sys_strip()`` function to test for the variable and acts |
| 3690 | accordingly. |
| 3691 | |
| 3692 | .. note:: |
| 3693 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3694 | Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3695 | special circumstances. For example, suppose you are building |
| 3696 | bare-metal firmware by using an external GCC toolchain. Furthermore, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3697 | even if the toolchain's binaries are strippable, there are other files |
| 3698 | needed for the build that are not strippable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3699 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3700 | :term:`Initramfs` |
| 3701 | An Initial RAM Filesystem (:term:`Initramfs`) is an optionally compressed |
| 3702 | `cpio <https://en.wikipedia.org/wiki/Cpio>`__ archive which is extracted |
| 3703 | by the Linux kernel into RAM in a special `tmpfs <https://en.wikipedia.org/wiki/Tmpfs>`__ |
| 3704 | instance, used as the initial root filesystem. |
| 3705 | |
| 3706 | This is a replacement for the legacy init RAM disk ("initrd") |
| 3707 | technique, booting on an emulated block device in RAM, but being less |
| 3708 | efficient because of the overhead of going through a filesystem and |
| 3709 | having to duplicate accessed file contents in the file cache in RAM, |
| 3710 | as for any block device. |
| 3711 | |
| 3712 | .. note: |
| 3713 | |
| 3714 | As far as bootloaders are concerned, :term:`Initramfs` and "initrd" |
| 3715 | images are still copied to RAM in the same way. That's why most |
| 3716 | most bootloaders refer to :term:`Initramfs` images as "initrd" |
| 3717 | or "init RAM disk". |
| 3718 | |
| 3719 | This kind of mechanism is typically used for two reasons: |
| 3720 | |
| 3721 | - For booting the same kernel binary on multiple systems requiring |
| 3722 | different device drivers. The Initramfs image is then customized |
| 3723 | for each type of system, to include the specific kernel modules |
| 3724 | necessary to access the final root filesystem. This technique |
| 3725 | is used on all GNU / Linux distributions for desktops and servers. |
| 3726 | |
| 3727 | - For booting faster. As the root filesystem is extracted into RAM, |
| 3728 | accessing the first user-space applications is very fast, compared |
| 3729 | to having to initialize a block device, to access multiple blocks |
| 3730 | from it, and to go through a filesystem having its own overhead. |
| 3731 | For example, this allows to display a splashscreen very early, |
| 3732 | and to later take care of mounting the final root filesystem and |
| 3733 | loading less time-critical kernel drivers. |
| 3734 | |
| 3735 | This cpio archive can either be loaded to RAM by the bootloader, |
| 3736 | or be included in the kernel binary. |
| 3737 | |
| 3738 | For information on creating and using an :term:`Initramfs`, see the |
| 3739 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" |
| 3740 | section in the Yocto Project Development Tasks Manual. |
| 3741 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3742 | :term:`INITRAMFS_DEPLOY_DIR_IMAGE` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3743 | Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs` where the |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3744 | :term:`INITRAMFS_IMAGE` will be fetched from. |
| 3745 | This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the |
| 3746 | :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3747 | when building an :term:`Initramfs` image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`. |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3748 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3749 | :term:`INITRAMFS_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3750 | Defines the format for the output image of an initial RAM filesystem |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3751 | (:term:`Initramfs`), which is used during boot. Supported formats are the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3752 | same as those supported by the |
| 3753 | :term:`IMAGE_FSTYPES` variable. |
| 3754 | |
| 3755 | The default value of this variable, which is set in the |
| 3756 | ``meta/conf/bitbake.conf`` configuration file in the |
| 3757 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3758 | :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3759 | `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects |
| 3760 | an optionally compressed cpio archive. |
| 3761 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3762 | :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3763 | Specifies the :term:`PROVIDES` name of an image |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3764 | recipe that is used to build an initial RAM filesystem (:term:`Initramfs`) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3765 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3766 | additional recipe to be built as a dependency to whatever root |
| 3767 | filesystem recipe you might be using (e.g. ``core-image-sato``). The |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3768 | :term:`Initramfs` image recipe you provide should set |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3769 | :term:`IMAGE_FSTYPES` to |
| 3770 | :term:`INITRAMFS_FSTYPES`. |
| 3771 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3772 | An :term:`Initramfs` image provides a temporary root filesystem used for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3773 | early system initialization (e.g. loading of modules needed to locate |
| 3774 | and mount the "real" root filesystem). |
| 3775 | |
| 3776 | .. note:: |
| 3777 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3778 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` |
| 3779 | recipe in the :term:`Source Directory` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3780 | for an example :term:`Initramfs` recipe. To select this sample recipe as |
| 3781 | 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] | 3782 | to "core-image-minimal-initramfs". |
| 3783 | |
| 3784 | You can also find more information by referencing the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 3785 | ``meta-poky/conf/templates/default/local.conf.sample.extended`` |
| 3786 | configuration file in the Source Directory, the :ref:`image |
| 3787 | <ref-classes-image>` class, and the :ref:`kernel <ref-classes-kernel>` |
| 3788 | class to see how to use the :term:`INITRAMFS_IMAGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3789 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3790 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3791 | :term:`Initramfs` image is built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3792 | |
| 3793 | For more information, you can also see the |
| 3794 | :term:`INITRAMFS_IMAGE_BUNDLE` |
| 3795 | variable, which allows the generated image to be bundled inside the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3796 | kernel image. Additionally, for information on creating an :term:`Initramfs` |
| 3797 | image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3798 | in the Yocto Project Development Tasks Manual. |
| 3799 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3800 | :term:`INITRAMFS_IMAGE_BUNDLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3801 | Controls whether or not the image recipe specified by |
| 3802 | :term:`INITRAMFS_IMAGE` is run through an |
| 3803 | extra pass |
| 3804 | (:ref:`ref-tasks-bundle_initramfs`) during |
| 3805 | kernel compilation in order to build a single binary that contains |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3806 | both the kernel image and the initial RAM filesystem (:term:`Initramfs`) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3807 | image. This makes use of the |
| 3808 | :term:`CONFIG_INITRAMFS_SOURCE` kernel |
| 3809 | feature. |
| 3810 | |
| 3811 | .. note:: |
| 3812 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3813 | Bundling the :term:`Initramfs` with the kernel conflates the code in the |
| 3814 | :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 |
| 3815 | compatible software may be part of a bundled :term:`Initramfs`. |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 3816 | |
| 3817 | .. note:: |
| 3818 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3819 | Using an extra compilation pass to bundle the :term:`Initramfs` avoids a |
| 3820 | circular dependency between the kernel recipe and the :term:`Initramfs` |
| 3821 | recipe should the :term:`Initramfs` include kernel modules. Should that be |
| 3822 | the case, the :term:`Initramfs` recipe depends on the kernel for the |
| 3823 | kernel modules, and the kernel depends on the :term:`Initramfs` recipe |
| 3824 | since the :term:`Initramfs` is bundled inside the kernel image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3825 | |
| 3826 | The combined binary is deposited into the ``tmp/deploy`` directory, |
| 3827 | which is part of the :term:`Build Directory`. |
| 3828 | |
| 3829 | Setting the variable to "1" in a configuration file causes the |
| 3830 | OpenEmbedded build system to generate a kernel image with the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3831 | :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3832 | |
| 3833 | INITRAMFS_IMAGE_BUNDLE = "1" |
| 3834 | |
| 3835 | By default, the |
| 3836 | :ref:`kernel <ref-classes-kernel>` class sets this variable to a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3837 | null string as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3838 | |
| 3839 | INITRAMFS_IMAGE_BUNDLE ?= "" |
| 3840 | |
| 3841 | .. note:: |
| 3842 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3843 | You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3844 | configuration file. You cannot set the variable in a recipe file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3845 | |
| 3846 | See the |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 3847 | :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] | 3848 | file for additional information. Also, for information on creating an |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3849 | :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3850 | in the Yocto Project Development Tasks Manual. |
| 3851 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3852 | :term:`INITRAMFS_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3853 | The link name of the initial RAM filesystem image. This variable is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3854 | set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3855 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3856 | |
| 3857 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" |
| 3858 | |
| 3859 | The value of the |
| 3860 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3861 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3862 | |
| 3863 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 3864 | |
| 3865 | See the :term:`MACHINE` variable for additional |
| 3866 | information. |
| 3867 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3868 | :term:`INITRAMFS_MULTICONFIG` |
| 3869 | Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class. |
| 3870 | |
| 3871 | This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from |
| 3872 | a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. |
| 3873 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 3874 | For more information on how to bundle an :term:`Initramfs` image from a separate |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3875 | multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`" |
| 3876 | section in the Yocto Project Development Tasks Manual. |
| 3877 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3878 | :term:`INITRAMFS_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3879 | The base name of the initial RAM filesystem image. This variable is |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 3880 | set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3881 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3882 | |
| 3883 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" |
| 3884 | |
| 3885 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3886 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3887 | |
| 3888 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3889 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3890 | :term:`INITRD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3891 | Indicates list of filesystem images to concatenate and use as an |
| 3892 | initial RAM disk (``initrd``). |
| 3893 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3894 | The :term:`INITRD` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3895 | :ref:`image-live <ref-classes-image-live>` class. |
| 3896 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3897 | :term:`INITRD_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3898 | When building a "live" bootable image (i.e. when |
| 3899 | :term:`IMAGE_FSTYPES` contains "live"), |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3900 | :term:`INITRD_IMAGE` specifies the image recipe that should be built to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3901 | provide the initial RAM disk image. The default value is |
| 3902 | "core-image-minimal-initramfs". |
| 3903 | |
| 3904 | See the :ref:`image-live <ref-classes-image-live>` class for more |
| 3905 | information. |
| 3906 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3907 | :term:`INITSCRIPT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3908 | The filename of the initialization script as installed to |
| 3909 | ``${sysconfdir}/init.d``. |
| 3910 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3911 | 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] | 3912 | The variable is mandatory. |
| 3913 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3914 | :term:`INITSCRIPT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3915 | A list of the packages that contain initscripts. If multiple packages |
| 3916 | are specified, you need to append the package name to the other |
| 3917 | ``INITSCRIPT_*`` as an override. |
| 3918 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3919 | 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] | 3920 | The variable is optional and defaults to the :term:`PN` |
| 3921 | variable. |
| 3922 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3923 | :term:`INITSCRIPT_PARAMS` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3924 | 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] | 3925 | |
| 3926 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." |
| 3927 | |
| 3928 | In this example, the script has a runlevel of 99, starts the script |
| 3929 | in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. |
| 3930 | |
| 3931 | The variable's default value is "defaults", which is set in the |
| 3932 | :ref:`update-rc.d <ref-classes-update-rc.d>` class. |
| 3933 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3934 | The value in :term:`INITSCRIPT_PARAMS` is passed through to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3935 | ``update-rc.d`` command. For more information on valid parameters, |
| 3936 | please see the ``update-rc.d`` manual page at |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3937 | 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] | 3938 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3939 | :term:`INSANE_SKIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3940 | Specifies the QA checks to skip for a specific package within a |
| 3941 | recipe. For example, to skip the check for symbolic link ``.so`` |
| 3942 | files in the main package of a recipe, add the following to the |
| 3943 | recipe. The package name override must be used, which in this example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3944 | is ``${PN}``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3945 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3946 | INSANE_SKIP:${PN} += "dev-so" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3947 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3948 | See the ":ref:`ref-classes-insane`" section for a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3949 | list of the valid QA checks you can specify using this variable. |
| 3950 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3951 | :term:`INSTALL_TIMEZONE_FILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3952 | By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3953 | Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3954 | configuration level to disable this behavior. |
| 3955 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3956 | :term:`IPK_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3957 | When the IPK backend is in use and package management is enabled on |
| 3958 | the target, you can use this variable to set up ``opkg`` in the |
| 3959 | target image to point to package feeds on a nominated server. Once |
| 3960 | the feed is established, you can perform installations or upgrades |
| 3961 | using the package manager at runtime. |
| 3962 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3963 | :term:`KARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3964 | Defines the kernel architecture used when assembling the |
| 3965 | configuration. Architectures supported for this release are: |
| 3966 | |
| 3967 | - powerpc |
| 3968 | - i386 |
| 3969 | - x86_64 |
| 3970 | - arm |
| 3971 | - qemu |
| 3972 | - mips |
| 3973 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3974 | 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] | 3975 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3976 | :term:`KBRANCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3977 | A regular expression used by the build process to explicitly identify |
| 3978 | the kernel branch that is validated, patched, and configured during a |
| 3979 | build. You must set this variable to ensure the exact kernel branch |
| 3980 | you want is being used by the build process. |
| 3981 | |
| 3982 | Values for this variable are set in the kernel's recipe file and the |
| 3983 | kernel's append file. For example, if you are using the |
| 3984 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3985 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3986 | is set as follows in that kernel recipe file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3987 | |
| 3988 | KBRANCH ?= "standard/base" |
| 3989 | |
| 3990 | This variable is also used from the kernel's append file to identify |
| 3991 | the kernel branch specific to a particular machine or target |
| 3992 | hardware. Continuing with the previous kernel example, the kernel's |
| 3993 | append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the |
| 3994 | BSP layer for a given machine. For example, the append file for the |
| 3995 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA |
| 3996 | machines (``meta-yocto-bsp``) is named |
| 3997 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3998 | Here are the related statements from that append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3999 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4000 | KBRANCH:genericx86 = "standard/base" |
| 4001 | KBRANCH:genericx86-64 = "standard/base" |
| 4002 | KBRANCH:edgerouter = "standard/edgerouter" |
| 4003 | KBRANCH:beaglebone = "standard/beaglebone" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4004 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4005 | The :term:`KBRANCH` statements |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4006 | identify the kernel branch to use when building for each supported |
| 4007 | BSP. |
| 4008 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4009 | :term:`KBUILD_DEFCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4010 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 4011 | class, specifies an "in-tree" kernel configuration file for use |
| 4012 | during a kernel build. |
| 4013 | |
| 4014 | Typically, when using a ``defconfig`` to configure a kernel during a |
| 4015 | build, you place the file in your layer in the same manner as you |
| 4016 | would place patch files and configuration fragment files (i.e. |
| 4017 | "out-of-tree"). However, if you want to use a ``defconfig`` file that |
| 4018 | 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] | 4019 | :term:`KBUILD_DEFCONFIG` variable and append the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4020 | :term:`KMACHINE` variable to point to the |
| 4021 | ``defconfig`` file. |
| 4022 | |
| 4023 | 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] | 4024 | using the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4025 | |
| 4026 | KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file |
| 4027 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4028 | Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4029 | a ``defconfig`` file named "bcm2709_defconfig":: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4030 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4031 | KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4032 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4033 | As an alternative, you can use the following within your append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4034 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4035 | KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4036 | |
| 4037 | For more |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4038 | information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4039 | ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4040 | section in the Yocto Project Linux Kernel Development Manual. |
| 4041 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4042 | :term:`KCONFIG_MODE` |
| 4043 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 4044 | class, specifies the kernel configuration values to use for options |
| 4045 | not specified in the provided ``defconfig`` file. Valid options are:: |
| 4046 | |
| 4047 | KCONFIG_MODE = "alldefconfig" |
| 4048 | KCONFIG_MODE = "allnoconfig" |
| 4049 | |
| 4050 | In ``alldefconfig`` mode the options not explicitly specified will be |
| 4051 | assigned their Kconfig default value. In ``allnoconfig`` mode the |
| 4052 | options not explicitly specified will be disabled in the kernel |
| 4053 | config. |
| 4054 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4055 | 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] | 4056 | the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file |
| 4057 | will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed |
| 4058 | in ``${WORKDIR}`` through a meta-layer will be handled in |
| 4059 | ``allnoconfig`` mode. |
| 4060 | |
| 4061 | An "in-tree" ``defconfig`` file can be selected via the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4062 | :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] | 4063 | be explicitly set. |
| 4064 | |
| 4065 | A ``defconfig`` file compatible with ``allnoconfig`` mode can be |
| 4066 | generated by copying the ``.config`` file from a working Linux kernel |
| 4067 | build, renaming it to ``defconfig`` and placing it into the Linux |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4068 | kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4069 | not need to be explicitly set. |
| 4070 | |
| 4071 | A ``defconfig`` file compatible with ``alldefconfig`` mode can be |
| 4072 | generated using the |
| 4073 | :ref:`ref-tasks-savedefconfig` |
| 4074 | task and placed into the Linux kernel ``${WORKDIR}`` through your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4075 | meta-layer. Explicitely set :term:`KCONFIG_MODE`:: |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4076 | |
| 4077 | KCONFIG_MODE = "alldefconfig" |
| 4078 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4079 | :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4080 | Specifies an alternate kernel image type for creation in addition to |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4081 | the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and |
| 4082 | :term:`KERNEL_IMAGETYPES` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4083 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4084 | :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4085 | 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] | 4086 | name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4087 | variable. |
| 4088 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4089 | The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4090 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4091 | following default value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4092 | |
| 4093 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4094 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 4095 | See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE` |
| 4096 | and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4097 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4098 | :term:`KERNEL_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4099 | A list of classes defining kernel image types that the |
| 4100 | :ref:`kernel <ref-classes-kernel>` class should inherit. You |
| 4101 | typically append this variable to enable extended image types. An |
| 4102 | example is the "kernel-fitimage", which enables fitImage support and |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4103 | resides in ``meta/classes-recipe/kernel-fitimage.bbclass``. You can register |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4104 | custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4105 | variable. |
| 4106 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 4107 | :term:`KERNEL_DEBUG_TIMESTAMPS` |
| 4108 | If set to "1", enables timestamping functionality during building |
| 4109 | the kernel. The default is "0" to disable this for reproducibility |
| 4110 | reasons. |
| 4111 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4112 | :term:`KERNEL_DEPLOY_DEPEND` |
| 4113 | Provides a means of controlling the dependency of an image recipe |
| 4114 | on the kernel. The default value is "virtual/kernel:do_deploy", |
| 4115 | however for a small initramfs image or other images that do not |
| 4116 | need the kernel, this can be set to "" in the image recipe. |
| 4117 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4118 | :term:`KERNEL_DEVICETREE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4119 | Specifies the name of the generated Linux kernel device tree (i.e. |
| 4120 | the ``.dtb``) file. |
| 4121 | |
| 4122 | .. note:: |
| 4123 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4124 | There is legacy support for specifying the full path to the device |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4125 | tree. However, providing just the ``.dtb`` file is preferred. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4126 | |
| 4127 | In order to use this variable, the |
| 4128 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 4129 | be inherited. |
| 4130 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4131 | :term:`KERNEL_DTB_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4132 | The link name of the kernel device tree binary (DTB). This variable |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4133 | 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] | 4134 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4135 | |
| 4136 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4137 | |
| 4138 | The |
| 4139 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4140 | the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4141 | |
| 4142 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4143 | |
| 4144 | See the :term:`MACHINE` variable for additional |
| 4145 | information. |
| 4146 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4147 | :term:`KERNEL_DTB_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4148 | The base name of the kernel device tree binary (DTB). This variable |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4149 | 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] | 4150 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4151 | |
| 4152 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4153 | |
| 4154 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4155 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4156 | |
| 4157 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4158 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4159 | :term:`KERNEL_DTC_FLAGS` |
| 4160 | Specifies the ``dtc`` flags that are passed to the Linux kernel build |
| 4161 | system when generating the device trees (via ``DTC_FLAGS`` environment |
| 4162 | variable). |
| 4163 | |
| 4164 | In order to use this variable, the |
| 4165 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 4166 | be inherited. |
| 4167 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4168 | :term:`KERNEL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4169 | Specifies additional ``make`` command-line arguments the OpenEmbedded |
| 4170 | build system passes on when compiling the kernel. |
| 4171 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4172 | :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4173 | Includes additional kernel metadata. In the OpenEmbedded build |
| 4174 | system, the default Board Support Packages (BSPs) |
| 4175 | :term:`Metadata` is provided through the |
| 4176 | :term:`KMACHINE` and :term:`KBRANCH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4177 | variables. You can use the :term:`KERNEL_FEATURES` variable from within |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4178 | the kernel recipe or kernel append file to further add metadata for |
| 4179 | all BSPs or specific BSPs. |
| 4180 | |
| 4181 | The metadata you add through this variable includes config fragments |
| 4182 | and features descriptions, which usually includes patches as well as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4183 | config fragments. You typically override the :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4184 | variable for a specific machine. In this way, you can provide |
| 4185 | validated, but optional, sets of kernel configurations and features. |
| 4186 | |
| 4187 | For example, the following example from the ``linux-yocto-rt_4.12`` |
| 4188 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs |
| 4189 | as well as "virtio" configurations to all QEMU machines. The last two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4190 | statements add specific configurations to targeted machine types:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4191 | |
| 4192 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4193 | KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" |
| 4194 | KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc" |
| 4195 | KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" |
| 4196 | KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4197 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4198 | :term:`KERNEL_FIT_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4199 | The link name of the kernel flattened image tree (FIT) image. This |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4200 | variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4201 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4202 | |
| 4203 | KERNEL_FIT_LINK_NAME ?= "${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 | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4214 | :term:`KERNEL_FIT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4215 | The base name of the kernel flattened image tree (FIT) image. This |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 4216 | variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4217 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4218 | |
| 4219 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4220 | |
| 4221 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4222 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4223 | |
| 4224 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4225 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4226 | :term:`KERNEL_IMAGE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4227 | 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] | 4228 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4229 | |
| 4230 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4231 | |
| 4232 | The value of |
| 4233 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4234 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4235 | |
| 4236 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4237 | |
| 4238 | See the :term:`MACHINE` variable for additional |
| 4239 | information. |
| 4240 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4241 | :term:`KERNEL_IMAGE_MAXSIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4242 | Specifies the maximum size of the kernel image file in kilobytes. If |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4243 | :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] | 4244 | checked against the set value during the |
| 4245 | :ref:`ref-tasks-sizecheck` task. The task fails if |
| 4246 | the kernel image file is larger than the setting. |
| 4247 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4248 | :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4249 | limited amount of space in which the kernel image must be stored. |
| 4250 | |
| 4251 | By default, this variable is not set, which means the size of the |
| 4252 | kernel image is not checked. |
| 4253 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4254 | :term:`KERNEL_IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4255 | 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] | 4256 | ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4257 | |
| 4258 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4259 | |
| 4260 | The value of the |
| 4261 | :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4262 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4263 | |
| 4264 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4266 | :term:`KERNEL_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4267 | The type of kernel to build for a device, usually set by the machine |
| 4268 | configuration files and defaults to "zImage". This variable is used |
| 4269 | when building the kernel and is passed to ``make`` as the target to |
| 4270 | build. |
| 4271 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 4272 | To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`. |
| 4273 | |
| 4274 | :term:`KERNEL_IMAGETYPES` |
| 4275 | Lists additional types of kernel images to build for a device in addition |
| 4276 | to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the |
| 4277 | machine configuration files. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4278 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4279 | :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4280 | Lists kernel modules that need to be auto-loaded during boot. |
| 4281 | |
| 4282 | .. note:: |
| 4283 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4284 | This variable replaces the deprecated :term:`module_autoload` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4285 | variable. |
| 4286 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4287 | You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4288 | can be recognized by the kernel recipe or by an out-of-tree kernel |
| 4289 | module recipe (e.g. a machine configuration file, a distribution |
| 4290 | configuration file, an append file for the recipe, or the recipe |
| 4291 | itself). |
| 4292 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4293 | Specify it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4294 | |
| 4295 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" |
| 4296 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4297 | Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4298 | system to populate the ``/etc/modules-load.d/modname.conf`` file with |
| 4299 | the list of modules to be auto-loaded on boot. The modules appear |
| 4300 | 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] | 4301 | case:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4302 | |
| 4303 | KERNEL_MODULE_AUTOLOAD += "module_name" |
| 4304 | |
| 4305 | For information on how to populate the ``modname.conf`` file with |
| 4306 | ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. |
| 4307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4308 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4309 | Provides a list of modules for which the OpenEmbedded build system |
| 4310 | expects to find ``module_conf_``\ modname values that specify |
| 4311 | configuration for each of the modules. For information on how to |
| 4312 | provide those module configurations, see the |
| 4313 | :term:`module_conf_* <module_conf>` variable. |
| 4314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4315 | :term:`KERNEL_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4316 | The location of the kernel sources. This variable is set to the value |
| 4317 | of the :term:`STAGING_KERNEL_DIR` within |
| 4318 | the :ref:`module <ref-classes-module>` class. For information on |
| 4319 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4320 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4321 | section in the Yocto Project Linux Kernel Development Manual. |
| 4322 | |
| 4323 | To help maximize compatibility with out-of-tree drivers used to build |
| 4324 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4325 | :term:`KERNEL_SRC` variable, which is identical to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4326 | the :term:`KERNEL_PATH` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4327 | used by external Makefiles to point to the kernel source directory. |
| 4328 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4329 | :term:`KERNEL_SRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4330 | The location of the kernel sources. This variable is set to the value |
| 4331 | of the :term:`STAGING_KERNEL_DIR` within |
| 4332 | the :ref:`module <ref-classes-module>` class. For information on |
| 4333 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4334 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4335 | section in the Yocto Project Linux Kernel Development Manual. |
| 4336 | |
| 4337 | To help maximize compatibility with out-of-tree drivers used to build |
| 4338 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4339 | :term:`KERNEL_PATH` variable, which is identical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4340 | to the :term:`KERNEL_SRC` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4341 | used by external Makefiles to point to the kernel source directory. |
| 4342 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4343 | :term:`KERNEL_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4344 | Specifies the version of the kernel as extracted from ``version.h`` |
| 4345 | or ``utsrelease.h`` within the kernel sources. Effects of setting |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4346 | this variable do not take effect until the kernel has been |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4347 | configured. Consequently, attempting to refer to this variable in |
| 4348 | contexts prior to configuration will not work. |
| 4349 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4350 | :term:`KERNELDEPMODDEPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4351 | Specifies whether the data referenced through |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4352 | :term:`PKGDATA_DIR` is needed or not. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4353 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4354 | 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] | 4355 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 4356 | :term:`Initramfs` recipe. Setting the variable there when the data is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4357 | needed avoids a potential dependency loop. |
| 4358 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4359 | :term:`KFEATURE_DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4360 | Provides a short description of a configuration fragment. You use |
| 4361 | this variable in the ``.scc`` file that describes a configuration |
| 4362 | 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] | 4363 | to describe SMP being enabled:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4364 | |
| 4365 | define KFEATURE_DESCRIPTION "Enable SMP" |
| 4366 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4367 | :term:`KMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4368 | The machine as known by the kernel. Sometimes the machine name used |
| 4369 | by the kernel does not match the machine name used by the |
| 4370 | OpenEmbedded build system. For example, the machine name that the |
| 4371 | OpenEmbedded build system understands as ``core2-32-intel-common`` |
| 4372 | goes by a different name in the Linux Yocto kernel. The kernel |
| 4373 | understands that machine as ``intel-core2-32``. For cases like these, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4374 | the :term:`KMACHINE` variable maps the kernel machine name to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4375 | OpenEmbedded build system machine name. |
| 4376 | |
| 4377 | These mappings between different names occur in the Yocto Linux |
| 4378 | Kernel's ``meta`` branch. As an example take a look in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4379 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4380 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4381 | LINUX_VERSION:core2-32-intel-common = "3.19.0" |
| 4382 | COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}" |
| 4383 | SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" |
| 4384 | SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" |
| 4385 | KMACHINE:core2-32-intel-common = "intel-core2-32" |
| 4386 | KBRANCH:core2-32-intel-common = "standard/base" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4387 | KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4388 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4389 | The :term:`KMACHINE` statement says |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4390 | that the kernel understands the machine name as "intel-core2-32". |
| 4391 | However, the OpenEmbedded build system understands the machine as |
| 4392 | "core2-32-intel-common". |
| 4393 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4394 | :term:`KTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4395 | Defines the kernel type to be used in assembling the configuration. |
| 4396 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4397 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4398 | section in the |
| 4399 | Yocto Project Linux Kernel Development Manual for more information on |
| 4400 | kernel types. |
| 4401 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4402 | You define the :term:`KTYPE` variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4403 | :ref:`kernel-dev/advanced:bsp descriptions`. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4404 | value you use must match the value used for the |
| 4405 | :term:`LINUX_KERNEL_TYPE` value used by the |
| 4406 | kernel recipe. |
| 4407 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4408 | :term:`LABELS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4409 | Provides a list of targets for automatic configuration. |
| 4410 | |
| 4411 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 4412 | information on how this variable is used. |
| 4413 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4414 | :term:`LAYERDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4415 | Lists the layers, separated by spaces, on which this recipe depends. |
| 4416 | Optionally, you can specify a specific layer version for a dependency |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4417 | 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] | 4418 | |
| 4419 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" |
| 4420 | |
| 4421 | In this previous example, |
| 4422 | version 3 of "anotherlayer" is compared against |
| 4423 | :term:`LAYERVERSION`\ ``_anotherlayer``. |
| 4424 | |
| 4425 | An error is produced if any dependency is missing or the version |
| 4426 | numbers (if specified) do not match exactly. This variable is used in |
| 4427 | the ``conf/layer.conf`` file and must be suffixed with the name of |
| 4428 | the specific layer (e.g. ``LAYERDEPENDS_mylayer``). |
| 4429 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4430 | :term:`LAYERDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4431 | When used inside the ``layer.conf`` configuration file, this variable |
| 4432 | provides the path of the current layer. This variable is not |
| 4433 | available outside of ``layer.conf`` and references are expanded |
| 4434 | immediately when parsing of the file completes. |
| 4435 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4436 | :term:`LAYERRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4437 | Lists the layers, separated by spaces, recommended for use with this |
| 4438 | layer. |
| 4439 | |
| 4440 | Optionally, you can specify a specific layer version for a |
| 4441 | recommendation by adding the version to the end of the layer name. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4442 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4443 | |
| 4444 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" |
| 4445 | |
| 4446 | In this previous example, version 3 of "anotherlayer" is compared |
| 4447 | against ``LAYERVERSION_anotherlayer``. |
| 4448 | |
| 4449 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4450 | suffixed with the name of the specific layer (e.g. |
| 4451 | ``LAYERRECOMMENDS_mylayer``). |
| 4452 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4453 | :term:`LAYERSERIES_COMPAT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4454 | Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4455 | a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4456 | allows the layer maintainer to indicate which combinations of the |
| 4457 | layer and OE-Core can be expected to work. The variable gives the |
| 4458 | system a way to detect when a layer has not been tested with new |
| 4459 | releases of OE-Core (e.g. the layer is not maintained). |
| 4460 | |
| 4461 | To specify the OE-Core versions for which a layer is compatible, use |
| 4462 | this variable in your layer's ``conf/layer.conf`` configuration file. |
| 4463 | For the list, use the Yocto Project |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4464 | :yocto_wiki:`Release Name </Releases>` (e.g. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4465 | &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4466 | layer, use a space-separated list:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4467 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4468 | LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4469 | |
| 4470 | .. note:: |
| 4471 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4472 | Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4473 | Compatible version 2 standard. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4474 | The OpenEmbedded build system produces a warning if the variable |
| 4475 | is not set for any given layer. |
| 4476 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4477 | See the ":ref:`dev-manual/common-tasks:creating your own layer`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4478 | section in the Yocto Project Development Tasks Manual. |
| 4479 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4480 | :term:`LAYERVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4481 | Optionally specifies the version of a layer as a single number. You |
| 4482 | can use this within :term:`LAYERDEPENDS` for |
| 4483 | another layer in order to depend on a specific version of the layer. |
| 4484 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4485 | suffixed with the name of the specific layer (e.g. |
| 4486 | ``LAYERVERSION_mylayer``). |
| 4487 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4488 | :term:`LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4489 | The minimal command and arguments used to run the linker. |
| 4490 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4491 | :term:`LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4492 | Specifies the flags to pass to the linker. This variable is exported |
| 4493 | to an environment variable and thus made visible to the software |
| 4494 | being built during the compilation step. |
| 4495 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4496 | Default initialization for :term:`LDFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4497 | being built: |
| 4498 | |
| 4499 | - :term:`TARGET_LDFLAGS` when building for the |
| 4500 | target |
| 4501 | |
| 4502 | - :term:`BUILD_LDFLAGS` when building for the |
| 4503 | build host (i.e. ``-native``) |
| 4504 | |
| 4505 | - :term:`BUILDSDK_LDFLAGS` when building for |
| 4506 | an SDK (i.e. ``nativesdk-``) |
| 4507 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4508 | :term:`LEAD_SONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4509 | Specifies the lead (or primary) compiled library file (i.e. ``.so``) |
| 4510 | that the :ref:`debian <ref-classes-debian>` class applies its |
| 4511 | naming policy to given a recipe that packages multiple libraries. |
| 4512 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4513 | This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4514 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4515 | :term:`LIC_FILES_CHKSUM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4516 | Checksums of the license text in the recipe source code. |
| 4517 | |
| 4518 | This variable tracks changes in license text of the source code |
| 4519 | files. If the license text is changed, it will trigger a build |
| 4520 | failure, which gives the developer an opportunity to review any |
| 4521 | license change. |
| 4522 | |
| 4523 | This variable must be defined for all recipes (unless |
| 4524 | :term:`LICENSE` is set to "CLOSED"). |
| 4525 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4526 | For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4527 | section in the Yocto Project Development Tasks Manual. |
| 4528 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4529 | :term:`LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4530 | The list of source licenses for the recipe. Follow these rules: |
| 4531 | |
| 4532 | - Do not use spaces within individual license names. |
| 4533 | |
| 4534 | - Separate license names using \| (pipe) when there is a choice |
| 4535 | between licenses. |
| 4536 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4537 | - Separate license names using & (ampersand) when there are |
| 4538 | multiple licenses for different parts of the source. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4539 | |
| 4540 | - You can use spaces between license names. |
| 4541 | |
| 4542 | - For standard licenses, use the names of the files in |
| 4543 | ``meta/files/common-licenses/`` or the |
| 4544 | :term:`SPDXLICENSEMAP` flag names defined in |
| 4545 | ``meta/conf/licenses.conf``. |
| 4546 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4547 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4548 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4549 | LICENSE = "LGPL-2.1-only | GPL-3.0-only" |
| 4550 | LICENSE = "MPL-1.0 & LGPL-2.1-only" |
| 4551 | LICENSE = "GPL-2.0-or-later" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4552 | |
| 4553 | The first example is from the |
| 4554 | recipes for Qt, which the user may choose to distribute under either |
| 4555 | the LGPL version 2.1 or GPL version 3. The second example is from |
| 4556 | Cairo where two licenses cover different parts of the source code. |
| 4557 | The final example is from ``sysstat``, which presents a single |
| 4558 | license. |
| 4559 | |
| 4560 | You can also specify licenses on a per-package basis to handle |
| 4561 | situations where components of the output have different licenses. |
| 4562 | For example, a piece of software whose code is licensed under GPLv2 |
| 4563 | but has accompanying documentation licensed under the GNU Free |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4564 | Documentation License 1.2 could be specified as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4565 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4566 | LICENSE = "GFDL-1.2 & GPL-2.0-only" |
| 4567 | LICENSE:${PN} = "GPL-2.0.only" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4568 | LICENSE:${PN}-doc = "GFDL-1.2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4569 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4570 | :term:`LICENSE_CREATE_PACKAGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4571 | Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4572 | build system to create an extra package (i.e. |
| 4573 | ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add |
| 4574 | those packages to the |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4575 | :term:`RRECOMMENDS`\ ``:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4576 | |
| 4577 | The ``${PN}-lic`` package installs a directory in |
| 4578 | ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base |
| 4579 | name, and installs files in that directory that contain license and |
| 4580 | copyright information (i.e. copies of the appropriate license files |
| 4581 | from ``meta/common-licenses`` that match the licenses specified in |
| 4582 | the :term:`LICENSE` variable of the recipe metadata |
| 4583 | and copies of files marked in |
| 4584 | :term:`LIC_FILES_CHKSUM` as containing |
| 4585 | license text). |
| 4586 | |
| 4587 | For related information on providing license text, see the |
| 4588 | :term:`COPY_LIC_DIRS` variable, the |
| 4589 | :term:`COPY_LIC_MANIFEST` variable, and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4590 | ":ref:`dev-manual/common-tasks:providing license text`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4591 | section in the Yocto Project Development Tasks Manual. |
| 4592 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4593 | :term:`LICENSE_FLAGS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4594 | Specifies additional flags for a recipe you must allow through |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4595 | :term:`LICENSE_FLAGS_ACCEPTED` in |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4596 | order for the recipe to be built. When providing multiple flags, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4597 | separate them with spaces. |
| 4598 | |
| 4599 | This value is independent of :term:`LICENSE` and is |
| 4600 | typically used to mark recipes that might require additional licenses |
| 4601 | in order to be used in a commercial product. For more information, |
| 4602 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4603 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4604 | section in the Yocto Project Development Tasks Manual. |
| 4605 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4606 | :term:`LICENSE_FLAGS_ACCEPTED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4607 | Lists license flags that when specified in |
| 4608 | :term:`LICENSE_FLAGS` within a recipe should not |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4609 | prevent that recipe from being built. For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4610 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4611 | section in the Yocto Project Development Tasks Manual. |
| 4612 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4613 | :term:`LICENSE_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4614 | Path to additional licenses used during the build. By default, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4615 | OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4616 | directory that holds common license text used during the build. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4617 | :term:`LICENSE_PATH` variable allows you to extend that location to other |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4618 | areas that have additional licenses:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4619 | |
| 4620 | LICENSE_PATH += "path-to-additional-common-licenses" |
| 4621 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4622 | :term:`LINUX_KERNEL_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4623 | Defines the kernel type to be used in assembling the configuration. |
| 4624 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4625 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4626 | section in the |
| 4627 | Yocto Project Linux Kernel Development Manual for more information on |
| 4628 | kernel types. |
| 4629 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4630 | 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] | 4631 | "standard". Together with :term:`KMACHINE`, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4632 | :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4633 | the kernel tools to find the appropriate description within the |
| 4634 | kernel :term:`Metadata` with which to build out the sources |
| 4635 | and configuration. |
| 4636 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4637 | :term:`LINUX_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4638 | The Linux version from ``kernel.org`` on which the Linux kernel image |
| 4639 | being built using the OpenEmbedded build system is based. You define |
| 4640 | this variable in the kernel recipe. For example, the |
| 4641 | ``linux-yocto-3.4.bb`` kernel recipe found in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4642 | ``meta/recipes-kernel/linux`` defines the variables as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4643 | |
| 4644 | LINUX_VERSION ?= "3.4.24" |
| 4645 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4646 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4647 | for the recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4648 | |
| 4649 | PV = "${LINUX_VERSION}+git${SRCPV}" |
| 4650 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4651 | :term:`LINUX_VERSION_EXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4652 | A string extension compiled into the version string of the Linux |
| 4653 | kernel built with the OpenEmbedded build system. You define this |
| 4654 | variable in the kernel recipe. For example, the linux-yocto kernel |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4655 | recipes all define the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4656 | |
| 4657 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
| 4658 | |
| 4659 | Defining this variable essentially sets the Linux kernel |
| 4660 | configuration item ``CONFIG_LOCALVERSION``, which is visible through |
| 4661 | the ``uname`` command. Here is an example that shows the extension |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4662 | assuming it was set as previously shown:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4663 | |
| 4664 | $ uname -r |
| 4665 | 3.7.0-rc8-custom |
| 4666 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4667 | :term:`LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4668 | Specifies the directory to which the OpenEmbedded build system writes |
| 4669 | overall log files. The default directory is ``${TMPDIR}/log``. |
| 4670 | |
| 4671 | For the directory containing logs specific to each task, see the |
| 4672 | :term:`T` variable. |
| 4673 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4674 | :term:`MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4675 | Specifies the target device for which the image is built. You define |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4676 | :term:`MACHINE` in the ``local.conf`` file found in the |
| 4677 | :term:`Build Directory`. By default, :term:`MACHINE` is set to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4678 | "qemux86", which is an x86-based architecture machine to be emulated |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4679 | using QEMU:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4680 | |
| 4681 | MACHINE ?= "qemux86" |
| 4682 | |
| 4683 | The variable corresponds to a machine configuration file of the same |
| 4684 | name, through which machine-specific configurations are set. Thus, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4685 | when :term:`MACHINE` is set to "qemux86", the corresponding |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4686 | ``qemux86.conf`` machine configuration file can be found in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4687 | the :term:`Source Directory` in |
| 4688 | ``meta/conf/machine``. |
| 4689 | |
| 4690 | The list of machines supported by the Yocto Project as shipped |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4691 | include the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4692 | |
| 4693 | MACHINE ?= "qemuarm" |
| 4694 | MACHINE ?= "qemuarm64" |
| 4695 | MACHINE ?= "qemumips" |
| 4696 | MACHINE ?= "qemumips64" |
| 4697 | MACHINE ?= "qemuppc" |
| 4698 | MACHINE ?= "qemux86" |
| 4699 | MACHINE ?= "qemux86-64" |
| 4700 | MACHINE ?= "genericx86" |
| 4701 | MACHINE ?= "genericx86-64" |
| 4702 | MACHINE ?= "beaglebone" |
| 4703 | MACHINE ?= "edgerouter" |
| 4704 | |
| 4705 | The last five are Yocto Project reference hardware |
| 4706 | boards, which are provided in the ``meta-yocto-bsp`` layer. |
| 4707 | |
| 4708 | .. note:: |
| 4709 | |
| 4710 | Adding additional Board Support Package (BSP) layers to your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4711 | configuration adds new possible settings for :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4712 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4713 | :term:`MACHINE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4714 | Specifies the name of the machine-specific architecture. This |
| 4715 | variable is set automatically from :term:`MACHINE` or |
| 4716 | :term:`TUNE_PKGARCH`. You should not hand-edit |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4717 | the :term:`MACHINE_ARCH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4718 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4719 | :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4720 | A list of required machine-specific packages to install as part of |
| 4721 | the image being built. The build process depends on these packages |
| 4722 | being present. Furthermore, because this is a "machine-essential" |
| 4723 | variable, the list of packages are essential for the machine to boot. |
| 4724 | The impact of this variable affects images based on |
| 4725 | ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4726 | image. |
| 4727 | |
| 4728 | This variable is similar to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4729 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4730 | that the image being built has a build dependency on the variable's |
| 4731 | list of packages. In other words, the image will not build if a file |
| 4732 | in this list is not found. |
| 4733 | |
| 4734 | As an example, suppose the machine for which you are building |
| 4735 | requires ``example-init`` to be run during boot to initialize the |
| 4736 | 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] | 4737 | ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4738 | |
| 4739 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" |
| 4740 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4741 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4742 | A list of recommended machine-specific packages to install as part of |
| 4743 | the image being built. The build process does not depend on these |
| 4744 | packages being present. However, because this is a |
| 4745 | "machine-essential" variable, the list of packages are essential for |
| 4746 | the machine to boot. The impact of this variable affects images based |
| 4747 | on ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4748 | image. |
| 4749 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4750 | This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4751 | variable with the exception that the image being built does not have |
| 4752 | a build dependency on the variable's list of packages. In other |
| 4753 | words, the image will still build if a package in this list is not |
| 4754 | found. Typically, this variable is used to handle essential kernel |
| 4755 | modules, whose functionality may be selected to be built into the |
| 4756 | kernel rather than as a module, in which case a package will not be |
| 4757 | produced. |
| 4758 | |
| 4759 | Consider an example where you have a custom kernel where a specific |
| 4760 | touchscreen driver is required for the machine to be usable. However, |
| 4761 | the driver can be built as a module or into the kernel depending on |
| 4762 | the kernel configuration. If the driver is built as a module, you |
| 4763 | want it to be installed. But, when the driver is built into the |
| 4764 | kernel, you still want the build to succeed. This variable sets up a |
| 4765 | "recommends" relationship so that in the latter case, the build will |
| 4766 | not fail due to the missing package. To accomplish this, assuming the |
| 4767 | package for the module was called ``kernel-module-ab123``, you would |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4768 | use the following in the machine's ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4769 | |
| 4770 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
| 4771 | |
| 4772 | .. note:: |
| 4773 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4774 | In this example, the ``kernel-module-ab123`` recipe needs to |
| 4775 | explicitly set its :term:`PACKAGES` variable to ensure that BitBake |
| 4776 | does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to |
| 4777 | satisfy the dependency. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4778 | |
| 4779 | Some examples of these machine essentials are flash, screen, |
| 4780 | keyboard, mouse, or touchscreen drivers (depending on the machine). |
| 4781 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4782 | :term:`MACHINE_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4783 | A list of machine-specific packages to install as part of the image |
| 4784 | being built that are not essential for the machine to boot. However, |
| 4785 | the build process for more fully-featured images depends on the |
| 4786 | packages being present. |
| 4787 | |
| 4788 | This variable affects all images based on ``packagegroup-base``, |
| 4789 | which does not include the ``core-image-minimal`` or |
| 4790 | ``core-image-full-cmdline`` images. |
| 4791 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4792 | The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4793 | with the exception that the image being built has a build dependency |
| 4794 | on the variable's list of packages. In other words, the image will |
| 4795 | not build if a file in this list is not found. |
| 4796 | |
| 4797 | An example is a machine that has WiFi capability but is not essential |
| 4798 | for the machine to boot the image. However, if you are building a |
| 4799 | more fully-featured image, you want to enable the WiFi. The package |
| 4800 | containing the firmware for the WiFi hardware is always expected to |
| 4801 | exist, so it is acceptable for the build process to depend upon |
| 4802 | finding the package. In this case, assuming the package for the |
| 4803 | firmware was called ``wifidriver-firmware``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4804 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4805 | |
| 4806 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" |
| 4807 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4808 | :term:`MACHINE_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4809 | A list of machine-specific packages to install as part of the image |
| 4810 | being built that are not essential for booting the machine. The image |
| 4811 | being built has no build dependency on this list of packages. |
| 4812 | |
| 4813 | This variable affects only images based on ``packagegroup-base``, |
| 4814 | which does not include the ``core-image-minimal`` or |
| 4815 | ``core-image-full-cmdline`` images. |
| 4816 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4817 | This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4818 | with the exception that the image being built does not have a build |
| 4819 | dependency on the variable's list of packages. In other words, the |
| 4820 | image will build if a file in this list is not found. |
| 4821 | |
| 4822 | An example is a machine that has WiFi capability but is not essential |
| 4823 | For the machine to boot the image. However, if you are building a |
| 4824 | more fully-featured image, you want to enable WiFi. In this case, the |
| 4825 | package containing the WiFi kernel module will not be produced if the |
| 4826 | WiFi driver is built into the kernel, in which case you still want |
| 4827 | the build to succeed instead of failing as a result of the package |
| 4828 | not being found. To accomplish this, assuming the package for the |
| 4829 | module was called ``kernel-module-examplewifi``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4830 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4831 | |
| 4832 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" |
| 4833 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4834 | :term:`MACHINE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4835 | Specifies the list of hardware features the |
| 4836 | :term:`MACHINE` is capable of supporting. For related |
| 4837 | information on enabling features, see the |
| 4838 | :term:`DISTRO_FEATURES`, |
| 4839 | :term:`COMBINED_FEATURES`, and |
| 4840 | :term:`IMAGE_FEATURES` variables. |
| 4841 | |
| 4842 | For a list of hardware features supported by the Yocto Project as |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4843 | shipped, see the ":ref:`ref-features-machine`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4844 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4845 | :term:`MACHINE_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4846 | Features to be added to :term:`MACHINE_FEATURES` if not also present in |
| 4847 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4848 | |
| 4849 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 4850 | not intended to be user-configurable. It is best to just reference |
| 4851 | the variable to see which machine features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4852 | all machine configurations. See the ":ref:`ref-features-backfill`" |
| 4853 | section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4855 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4856 | Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be |
| 4857 | backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4858 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4860 | :term:`MACHINEOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4861 | A colon-separated list of overrides that apply to the current |
| 4862 | machine. By default, this list includes the value of |
| 4863 | :term:`MACHINE`. |
| 4864 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4865 | You can extend :term:`MACHINEOVERRIDES` to add extra overrides that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4866 | should apply to a machine. For example, all machines emulated in QEMU |
| 4867 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named |
| 4868 | ``meta/conf/machine/include/qemu.inc`` that prepends the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4869 | override to :term:`MACHINEOVERRIDES`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4870 | |
| 4871 | MACHINEOVERRIDES =. "qemuall:" |
| 4872 | |
| 4873 | This |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4874 | override allows variables to be overridden for all machines emulated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4875 | in QEMU, like in the following example from the ``connman-conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4876 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4877 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4878 | SRC_URI:append:qemuall = " file://wired.config \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4879 | file://wired-setup \ |
| 4880 | " |
| 4881 | |
| 4882 | The underlying mechanism behind |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4883 | :term:`MACHINEOVERRIDES` is simply that it is included in the default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4884 | value of :term:`OVERRIDES`. |
| 4885 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4886 | :term:`MAINTAINER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4887 | The email address of the distribution maintainer. |
| 4888 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 4889 | :term:`METADATA_BRANCH` |
| 4890 | The branch currently checked out for the OpenEmbedded-Core layer (path |
| 4891 | determined by :term:`COREBASE`). |
| 4892 | |
| 4893 | :term:`METADATA_REVISION` |
| 4894 | The revision currently checked out for the OpenEmbedded-Core layer (path |
| 4895 | determined by :term:`COREBASE`). |
| 4896 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4897 | :term:`MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4898 | Specifies additional paths from which the OpenEmbedded build system |
| 4899 | gets source code. When the build system searches for source code, it |
| 4900 | first tries the local download directory. If that location fails, the |
| 4901 | build system tries locations defined by |
| 4902 | :term:`PREMIRRORS`, the upstream source, and then |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4903 | locations specified by :term:`MIRRORS` in that order. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4904 | |
| 4905 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4906 | the default value for :term:`MIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4907 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 4908 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4909 | :term:`MLPREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4910 | Specifies a prefix has been added to :term:`PN` to create a |
| 4911 | special version of a recipe or package (i.e. a Multilib version). The |
| 4912 | variable is used in places where the prefix needs to be added to or |
| 4913 | removed from a the name (e.g. the :term:`BPN` variable). |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4914 | :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] | 4915 | |
| 4916 | .. note:: |
| 4917 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4918 | The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4919 | historical and comes from a time when ``nativesdk`` was a suffix |
| 4920 | rather than a prefix on the recipe name. When ``nativesdk`` was turned |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4921 | into a prefix, it made sense to set :term:`MLPREFIX` for it as well. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4922 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4923 | To help understand when :term:`MLPREFIX` might be needed, consider when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4924 | :term:`BBCLASSEXTEND` is used to provide a |
| 4925 | ``nativesdk`` version of a recipe in addition to the target version. |
| 4926 | If that recipe declares build-time dependencies on tasks in other |
| 4927 | recipes by using :term:`DEPENDS`, then a dependency on |
| 4928 | "foo" will automatically get rewritten to a dependency on |
| 4929 | "nativesdk-foo". However, dependencies like the following will not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4930 | get rewritten automatically:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4931 | |
| 4932 | do_foo[depends] += "recipe:do_foo" |
| 4933 | |
| 4934 | 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] | 4935 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4936 | |
| 4937 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" |
| 4938 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4939 | :term:`module_autoload` |
| 4940 | This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4941 | variable. You should replace all occurrences of :term:`module_autoload` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4942 | with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4943 | |
| 4944 | module_autoload_rfcomm = "rfcomm" |
| 4945 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4946 | should now be replaced with:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4947 | |
| 4948 | KERNEL_MODULE_AUTOLOAD += "rfcomm" |
| 4949 | |
| 4950 | See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. |
| 4951 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4952 | :term:`module_conf` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 4953 | Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4954 | syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` |
| 4955 | file. |
| 4956 | |
| 4957 | You can use this variable anywhere that it can be recognized by the |
| 4958 | kernel recipe or out-of-tree kernel module recipe (e.g. a machine |
| 4959 | configuration file, a distribution configuration file, an append file |
| 4960 | for the recipe, or the recipe itself). If you use this variable, you |
| 4961 | must also be sure to list the module name in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4962 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4963 | variable. |
| 4964 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4965 | Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4966 | |
| 4967 | module_conf_module_name = "modprobe.d-syntax" |
| 4968 | |
| 4969 | You must use the kernel module name override. |
| 4970 | |
| 4971 | 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] | 4972 | the exact syntax you want to provide with :term:`module_conf`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4973 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4974 | Including :term:`module_conf` causes the OpenEmbedded build system to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4975 | populate the ``/etc/modprobe.d/modname.conf`` file with |
| 4976 | ``modprobe.d`` syntax lines. Here is an example that adds the options |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4977 | ``arg1`` and ``arg2`` to a module named ``mymodule``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4978 | |
| 4979 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" |
| 4980 | |
| 4981 | For information on how to specify kernel modules to auto-load on |
| 4982 | boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. |
| 4983 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4984 | :term:`MODULE_TARBALL_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4985 | Controls creation of the ``modules-*.tgz`` file. Set this variable to |
| 4986 | "0" to disable creation of this file, which contains all of the |
| 4987 | kernel modules resulting from a kernel build. |
| 4988 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4989 | :term:`MODULE_TARBALL_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4990 | 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] | 4991 | the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4992 | |
| 4993 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4994 | |
| 4995 | The value |
| 4996 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4997 | same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4998 | |
| 4999 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 5000 | |
| 5001 | See the :term:`MACHINE` variable for additional information. |
| 5002 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5003 | :term:`MODULE_TARBALL_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5004 | 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] | 5005 | the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5006 | |
| 5007 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 5008 | |
| 5009 | The value of the :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5010 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5011 | |
| 5012 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 5013 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5014 | :term:`MOUNT_BASE` |
| 5015 | On non-systemd systems (where ``udev-extraconf`` is being used), |
| 5016 | specifies the base directory for auto-mounting filesystems. The |
| 5017 | default value is "/run/media". |
| 5018 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5019 | :term:`MULTIMACH_TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5020 | Uniquely identifies the type of the target system for which packages |
| 5021 | are being built. This variable allows output for different types of |
| 5022 | target systems to be put into different subdirectories of the same |
| 5023 | output directory. |
| 5024 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5025 | The default value of this variable is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5026 | |
| 5027 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} |
| 5028 | |
| 5029 | Some classes (e.g. |
| 5030 | :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5031 | :term:`MULTIMACH_TARGET_SYS` value. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5032 | |
| 5033 | See the :term:`STAMP` variable for an example. See the |
| 5034 | :term:`STAGING_DIR_TARGET` variable for more information. |
| 5035 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5036 | :term:`NATIVELSBSTRING` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5037 | A string identifying the host distribution. Strings consist of the |
| 5038 | host distributor ID followed by the release, as reported by the |
| 5039 | ``lsb_release`` tool or as read from ``/etc/lsb-release``. For |
| 5040 | example, when running a build on Ubuntu 12.10, the value is |
| 5041 | "Ubuntu-12.10". If this information is unable to be determined, the |
| 5042 | value resolves to "Unknown". |
| 5043 | |
| 5044 | This variable is used by default to isolate native shared state |
| 5045 | packages for different distributions (e.g. to avoid problems with |
| 5046 | ``glibc`` version incompatibilities). Additionally, the variable is |
| 5047 | checked against |
| 5048 | :term:`SANITY_TESTED_DISTROS` if that |
| 5049 | variable is set. |
| 5050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5051 | :term:`NM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5052 | The minimal command and arguments to run ``nm``. |
| 5053 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5054 | :term:`NO_GENERIC_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5055 | 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] | 5056 | recipe. There are packages, such as the linux-firmware package, with many |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5057 | licenses that are not in any way common. Also, new licenses are added |
| 5058 | occasionally to avoid introducing a lot of common license files, |
| 5059 | which are only applicable to a specific package. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5060 | :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] | 5061 | not exist in common licenses. |
| 5062 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5063 | 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] | 5064 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5065 | |
| 5066 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" |
| 5067 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5068 | Here is an example that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5069 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5070 | source:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5071 | |
| 5072 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
| 5073 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5074 | :term:`NO_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5075 | Prevents installation of all "recommended-only" packages. |
| 5076 | Recommended-only packages are packages installed only through the |
| 5077 | :term:`RRECOMMENDS` variable). Setting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5078 | :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5079 | |
| 5080 | NO_RECOMMENDATIONS = "1" |
| 5081 | |
| 5082 | You can set this variable globally in your ``local.conf`` file or you |
| 5083 | 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] | 5084 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5085 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5086 | NO_RECOMMENDATIONS:pn-target_image = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5087 | |
| 5088 | It is important to realize that if you choose to not install packages |
| 5089 | using this variable and some other packages are dependent on them |
| 5090 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 5091 | variable), the OpenEmbedded build system ignores your request and |
| 5092 | will install the packages to avoid dependency errors. |
| 5093 | |
| 5094 | .. note:: |
| 5095 | |
| 5096 | Some recommended packages might be required for certain system |
| 5097 | functionality, such as kernel modules. It is up to you to add |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5098 | packages with the :term:`IMAGE_INSTALL` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5099 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5100 | This variable is only supported when using the IPK and RPM |
| 5101 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5102 | |
| 5103 | See the :term:`BAD_RECOMMENDATIONS` and |
| 5104 | the :term:`PACKAGE_EXCLUDE` variables for |
| 5105 | related information. |
| 5106 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5107 | :term:`NOAUTOPACKAGEDEBUG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5108 | Disables auto package from splitting ``.debug`` files. If a recipe |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5109 | requires ``FILES:${PN}-dbg`` to be set manually, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5110 | :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5111 | content of the debug package. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5112 | |
| 5113 | NOAUTOPACKAGEDEBUG = "1" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5114 | FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" |
| 5115 | FILES:${PN}-dbg = "/usr/src/debug/" |
| 5116 | 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] | 5117 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5118 | :term:`NON_MULTILIB_RECIPES` |
| 5119 | A list of recipes that should not be built for multilib. OE-Core's |
| 5120 | ``multilib.conf`` file defines a reasonable starting point for this |
| 5121 | list with:: |
| 5122 | |
| 5123 | NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot" |
| 5124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5125 | :term:`OBJCOPY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5126 | The minimal command and arguments to run ``objcopy``. |
| 5127 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5128 | :term:`OBJDUMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5129 | The minimal command and arguments to run ``objdump``. |
| 5130 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5131 | :term:`OE_BINCONFIG_EXTRA_MANGLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5132 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 5133 | this variable specifies additional arguments passed to the "sed" |
| 5134 | command. The sed command alters any paths in configuration scripts |
| 5135 | that have been set up during compilation. Inheriting this class |
| 5136 | results in all paths in these scripts being changed to point into the |
| 5137 | ``sysroots/`` directory so that all builds that use the script will |
| 5138 | use the correct directories for the cross compiling layout. |
| 5139 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5140 | See the ``meta/classes-recipe/binconfig.bbclass`` in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5141 | :term:`Source Directory` for details on how this class |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5142 | applies these additional sed command arguments. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5143 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5144 | :term:`OE_IMPORTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5145 | An internal variable used to tell the OpenEmbedded build system what |
| 5146 | Python modules to import for every Python function run by the system. |
| 5147 | |
| 5148 | .. note:: |
| 5149 | |
| 5150 | Do not set this variable. It is for internal use only. |
| 5151 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5152 | :term:`OE_INIT_ENV_SCRIPT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5153 | The name of the build environment setup script for the purposes of |
| 5154 | setting up the environment within the extensible SDK. The default |
| 5155 | value is "oe-init-build-env". |
| 5156 | |
| 5157 | 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] | 5158 | :term:`OE_INIT_ENV_SCRIPT` variable to its name. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5159 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5160 | :term:`OE_TERMINAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5161 | Controls how the OpenEmbedded build system spawns interactive |
| 5162 | terminals on the host development system (e.g. using the BitBake |
| 5163 | command with the ``-c devshell`` command-line option). For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5164 | information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5165 | the Yocto Project Development Tasks Manual. |
| 5166 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5167 | You can use the following values for the :term:`OE_TERMINAL` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5168 | |
| 5169 | - auto |
| 5170 | - gnome |
| 5171 | - xfce |
| 5172 | - rxvt |
| 5173 | - screen |
| 5174 | - konsole |
| 5175 | - none |
| 5176 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5177 | :term:`OEROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5178 | The directory from which the top-level build environment setup script |
| 5179 | is sourced. The Yocto Project provides a top-level build environment |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5180 | setup script: :ref:`structure-core-script`. When you run this |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5181 | script, the :term:`OEROOT` variable resolves to the directory that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5182 | contains the script. |
| 5183 | |
| 5184 | For additional information on how this variable is used, see the |
| 5185 | initialization script. |
| 5186 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5187 | :term:`OLDEST_KERNEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5188 | Declares the oldest version of the Linux kernel that the produced |
| 5189 | binaries must support. This variable is passed into the build of the |
| 5190 | Embedded GNU C Library (``glibc``). |
| 5191 | |
| 5192 | The default for this variable comes from the |
| 5193 | ``meta/conf/bitbake.conf`` configuration file. You can override this |
| 5194 | default by setting the variable in a custom distribution |
| 5195 | configuration file. |
| 5196 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5197 | :term:`OVERLAYFS_ETC_DEVICE` |
| 5198 | When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is |
| 5199 | inherited, specifies the device to be mounted for the read/write |
| 5200 | layer of ``/etc``. There is no default, so you must set this if you |
| 5201 | wish to enable :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`, for |
| 5202 | example, assuming ``/dev/mmcblk0p2`` was the desired device:: |
| 5203 | |
| 5204 | OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2" |
| 5205 | |
| 5206 | :term:`OVERLAYFS_ETC_EXPOSE_LOWER` |
| 5207 | When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is |
| 5208 | inherited, if set to "1" then a read-only access to the original |
| 5209 | ``/etc`` content will be provided as a ``lower/`` subdirectory of |
| 5210 | :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0". |
| 5211 | |
| 5212 | :term:`OVERLAYFS_ETC_FSTYPE` |
| 5213 | When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is |
| 5214 | inherited, specifies the file system type for the read/write |
| 5215 | layer of ``/etc``. There is no default, so you must set this if you |
| 5216 | wish to enable :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`, |
| 5217 | for example, assuming the file system is ext4:: |
| 5218 | |
| 5219 | OVERLAYFS_ETC_FSTYPE = "ext4" |
| 5220 | |
| 5221 | :term:`OVERLAYFS_ETC_MOUNT_OPTIONS` |
| 5222 | When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is |
| 5223 | inherited, specifies the mount options for the read-write layer. |
| 5224 | The default value is "defaults". |
| 5225 | |
| 5226 | :term:`OVERLAYFS_ETC_MOUNT_POINT` |
| 5227 | When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is |
| 5228 | inherited, specifies the parent mount path for the filesystem layers. |
| 5229 | There is no default, so you must set this if you wish to enable |
| 5230 | :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`, for example if |
| 5231 | the desired path is "/data":: |
| 5232 | |
| 5233 | OVERLAYFS_ETC_MOUNT_POINT = "/data" |
| 5234 | |
| 5235 | :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME` |
| 5236 | When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is |
| 5237 | inherited, controls how the generated init will be named. For more |
| 5238 | information, see the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` |
| 5239 | class documentation. The default value is "1". |
| 5240 | |
| 5241 | :term:`OVERLAYFS_MOUNT_POINT` |
| 5242 | When inheriting the :ref:`overlayfs <ref-classes-overlayfs>` class, |
| 5243 | specifies mount point(s) to be used. For example:: |
| 5244 | |
| 5245 | OVERLAYFS_MOUNT_POINT[data] = "/data" |
| 5246 | |
| 5247 | The assumes you have a ``data.mount`` systemd unit defined elsewhere |
| 5248 | in your BSP (e.g. in ``systemd-machine-units`` recipe) and it is |
| 5249 | installed into the image. For more information see |
| 5250 | :ref:`overlayfs <ref-classes-overlayfs>`. |
| 5251 | |
| 5252 | .. note:: |
| 5253 | |
| 5254 | Although the :ref:`overlayfs <ref-classes-overlayfs>` class is |
| 5255 | inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT` |
| 5256 | should be set in your machine configuration. |
| 5257 | |
| 5258 | :term:`OVERLAYFS_QA_SKIP` |
| 5259 | When inheriting the :ref:`overlayfs <ref-classes-overlayfs>` class, |
| 5260 | provides the ability to disable QA checks for particular overlayfs |
| 5261 | mounts. For example:: |
| 5262 | |
| 5263 | OVERLAYFS_QA_SKIP[data] = "mount-configured" |
| 5264 | |
| 5265 | .. note:: |
| 5266 | |
| 5267 | Although the :ref:`overlayfs <ref-classes-overlayfs>` class is |
| 5268 | inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP` |
| 5269 | should be set in your machine configuration. |
| 5270 | |
| 5271 | :term:`OVERLAYFS_WRITABLE_PATHS` |
| 5272 | When inheriting the :ref:`overlayfs <ref-classes-overlayfs>` class, |
| 5273 | specifies writable paths used at runtime for the recipe. For |
| 5274 | example:: |
| 5275 | |
| 5276 | OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application" |
| 5277 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5278 | :term:`OVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5279 | A colon-separated list of overrides that currently apply. Overrides |
| 5280 | are a BitBake mechanism that allows variables to be selectively |
| 5281 | overridden at the end of parsing. The set of overrides in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5282 | :term:`OVERRIDES` represents the "state" during building, which includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5283 | the current recipe being built, the machine for which it is being |
| 5284 | built, and so forth. |
| 5285 | |
| 5286 | 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] | 5287 | the colon-separated list in :term:`OVERRIDES`, then the following |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5288 | assignment will override ``FOO`` with the value "overridden" at the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5289 | end of parsing:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5290 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5291 | FOO:an-override = "overridden" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5292 | |
| 5293 | See the |
| 5294 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 5295 | section in the BitBake User Manual for more information on the |
| 5296 | overrides mechanism. |
| 5297 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5298 | The default value of :term:`OVERRIDES` includes the values of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5299 | :term:`CLASSOVERRIDE`, |
| 5300 | :term:`MACHINEOVERRIDES`, and |
| 5301 | :term:`DISTROOVERRIDES` variables. Another |
| 5302 | important override included by default is ``pn-${PN}``. This override |
| 5303 | allows variables to be set for a single recipe within configuration |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5304 | (``.conf``) files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5305 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5306 | FOO:pn-myrecipe = "myrecipe-specific value" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5307 | |
| 5308 | .. note:: |
| 5309 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5310 | 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] | 5311 | in the output of the ``bitbake -e`` command. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5312 | ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5313 | Project Development Tasks Manual for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5315 | :term:`P` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5316 | The recipe name and version. :term:`P` is comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5317 | |
| 5318 | ${PN}-${PV} |
| 5319 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5320 | :term:`PACKAGE_ADD_METADATA` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5321 | This variable defines additional metadata to add to packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5322 | |
| 5323 | You may find you need to inject additional metadata into packages. |
| 5324 | This variable allows you to do that by setting the injected data as |
| 5325 | the value. Multiple fields can be added by splitting the content with |
| 5326 | the literal separator "\n". |
| 5327 | |
| 5328 | The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable |
| 5329 | to do package type specific settings. It can also be made package |
| 5330 | specific by using the package name as a suffix. |
| 5331 | |
| 5332 | You can find out more about applying this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5333 | ":ref:`dev-manual/common-tasks:adding custom metadata to packages`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5334 | section in the Yocto Project Development Tasks Manual. |
| 5335 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5336 | :term:`PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5337 | The architecture of the resulting package or packages. |
| 5338 | |
| 5339 | By default, the value of this variable is set to |
| 5340 | :term:`TUNE_PKGARCH` when building for the |
| 5341 | target, :term:`BUILD_ARCH` when building for the |
| 5342 | build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the |
| 5343 | SDK. |
| 5344 | |
| 5345 | .. note:: |
| 5346 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5347 | See :term:`SDK_ARCH` for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5348 | |
| 5349 | However, if your recipe's output packages are built specific to the |
| 5350 | target machine rather than generally for the architecture of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5351 | machine, you should set :term:`PACKAGE_ARCH` to the value of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5352 | :term:`MACHINE_ARCH` in the recipe as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5353 | |
| 5354 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 5355 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5356 | :term:`PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5357 | Specifies a list of architectures compatible with the target machine. |
| 5358 | This variable is set automatically and should not normally be |
| 5359 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5360 | of priority. The default value for :term:`PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5361 | noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". |
| 5362 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5363 | :term:`PACKAGE_BEFORE_PN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5364 | Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5365 | that those added packages can pick up files that would normally be |
| 5366 | included in the default package. |
| 5367 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5368 | :term:`PACKAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5369 | This variable, which is set in the ``local.conf`` configuration file |
| 5370 | found in the ``conf`` folder of the |
| 5371 | :term:`Build Directory`, specifies the package manager the |
| 5372 | OpenEmbedded build system uses when packaging data. |
| 5373 | |
| 5374 | You can provide one or more of the following arguments for the |
| 5375 | variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk |
| 5376 | package_tar" |
| 5377 | |
| 5378 | .. note:: |
| 5379 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5380 | While it is a legal option, the ``package_tar`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5381 | class has limited functionality due to no support for package |
| 5382 | dependencies by that backend. Therefore, it is recommended that |
| 5383 | you do not use it. |
| 5384 | |
| 5385 | The build system uses only the first argument in the list as the |
| 5386 | package manager when creating your image or SDK. However, packages |
| 5387 | will be created using any additional packaging classes you specify. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5388 | For example, if you use the following in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5389 | |
| 5390 | PACKAGE_CLASSES ?= "package_ipk" |
| 5391 | |
| 5392 | The OpenEmbedded build system uses |
| 5393 | the IPK package manager to create your image or SDK. |
| 5394 | |
| 5395 | For information on packaging and build performance effects as a |
| 5396 | result of the package manager in use, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5397 | ":ref:`ref-classes-package`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5398 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5399 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5400 | Determines how to split up and package debug and source information |
| 5401 | when creating debugging packages to be used with the GNU Project |
| 5402 | Debugger (GDB). In general, based on the value of this variable, |
| 5403 | you can combine the source and debug info in a single package, |
| 5404 | you can break out the source into a separate package that can be |
| 5405 | installed independently, or you can choose to not have the source |
| 5406 | packaged at all. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5407 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5408 | The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5409 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5410 | - "``.debug``": All debugging and source info is placed in a single |
| 5411 | ``*-dbg`` package; debug symbol files are placed next to the |
| 5412 | binary in a ``.debug`` directory so that, if a binary is installed |
| 5413 | into ``/bin``, the corresponding debug symbol file is installed |
| 5414 | in ``/bin/.debug``. Source files are installed in the same ``*-dbg`` |
| 5415 | package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5416 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5417 | - "``debug-file-directory``": As above, all debugging and source info |
| 5418 | is placed in a single ``*-dbg`` package; debug symbol files are |
| 5419 | placed entirely under the directory ``/usr/lib/debug`` and separated |
| 5420 | by the path from where the binary is installed, so that if a binary |
| 5421 | is installed in ``/bin``, the corresponding debug symbols are installed |
| 5422 | in ``/usr/lib/debug/bin``, and so on. As above, source is installed |
| 5423 | in the same package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5424 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5425 | - "``debug-with-srcpkg``": Debugging info is placed in the standard |
| 5426 | ``*-dbg`` package as with the ``.debug`` value, while source is |
| 5427 | placed in a separate ``*-src`` package, which can be installed |
| 5428 | independently. This is the default setting for this variable, |
| 5429 | as defined in Poky's ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5430 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5431 | - "``debug-without-src``": The same behavior as with the ``.debug`` |
| 5432 | setting, but no source is packaged at all. |
| 5433 | |
| 5434 | .. note:: |
| 5435 | |
| 5436 | Much of the above package splitting can be overridden via |
| 5437 | use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5438 | |
| 5439 | You can find out more about debugging using GDB by reading the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5440 | ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5441 | in the Yocto Project Development Tasks Manual. |
| 5442 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5443 | :term:`PACKAGE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5444 | Lists packages that should not be installed into an image. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5445 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5446 | |
| 5447 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." |
| 5448 | |
| 5449 | You can set this variable globally in your ``local.conf`` file or you |
| 5450 | 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] | 5451 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5452 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5453 | PACKAGE_EXCLUDE:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5454 | |
| 5455 | If you choose to not install a package using this variable and some |
| 5456 | other package is dependent on it (i.e. listed in a recipe's |
| 5457 | :term:`RDEPENDS` variable), the OpenEmbedded build |
| 5458 | system generates a fatal installation error. Because the build system |
| 5459 | halts the process with a fatal error, you can use the variable with |
| 5460 | an iterative development process to remove specific components from a |
| 5461 | system. |
| 5462 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5463 | This variable is supported only when using the IPK and RPM |
| 5464 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5465 | |
| 5466 | See the :term:`NO_RECOMMENDATIONS` and the |
| 5467 | :term:`BAD_RECOMMENDATIONS` variables for |
| 5468 | related information. |
| 5469 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5470 | :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` |
| 5471 | Prevents specific packages from being installed when you are |
| 5472 | installing complementary packages. |
| 5473 | |
| 5474 | You might find that you want to prevent installing certain packages |
| 5475 | when you are installing complementary packages. For example, if you |
| 5476 | are using :term:`IMAGE_FEATURES` to install |
| 5477 | ``dev-pkgs``, you might not want to install all packages from a |
| 5478 | particular multilib. If you find yourself in this situation, you can |
| 5479 | use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular |
| 5480 | expressions to match the packages you want to exclude. |
| 5481 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5482 | :term:`PACKAGE_EXTRA_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5483 | Specifies the list of architectures compatible with the device CPU. |
| 5484 | This variable is useful when you build for several different devices |
| 5485 | that use miscellaneous processors such as XScale and ARM926-EJS. |
| 5486 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5487 | :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5488 | Optionally specifies the package architectures used as part of the |
| 5489 | package feed URIs during the build. When used, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5490 | :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5491 | URI, which is constructed using the |
| 5492 | :term:`PACKAGE_FEED_URIS` and |
| 5493 | :term:`PACKAGE_FEED_BASE_PATHS` |
| 5494 | variables. |
| 5495 | |
| 5496 | .. note:: |
| 5497 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5498 | You can use the :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5499 | variable to allow specific package architectures. If you do |
| 5500 | not need to allow specific architectures, which is a common |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5501 | case, you can omit this variable. Omitting the variable results in |
| 5502 | all available architectures for the current machine being included |
| 5503 | into remote package feeds. |
| 5504 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5505 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5506 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5507 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5508 | |
| 5509 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5510 | https://example.com/packagerepos/updates" |
| 5511 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5512 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5513 | |
| 5514 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5515 | |
| 5516 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5517 | |
| 5518 | https://example.com/packagerepos/release/rpm/all |
| 5519 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5520 | https://example.com/packagerepos/release/rpm-dev/all |
| 5521 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5522 | https://example.com/packagerepos/updates/rpm/all |
| 5523 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5524 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5525 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5526 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5527 | :term:`PACKAGE_FEED_BASE_PATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5528 | Specifies the base path used when constructing package feed URIs. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5529 | :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] | 5530 | package feed URI used by the OpenEmbedded build system. The base path |
| 5531 | lies between the :term:`PACKAGE_FEED_URIS` |
| 5532 | and :term:`PACKAGE_FEED_ARCHS` variables. |
| 5533 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5534 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5535 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5536 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5537 | |
| 5538 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5539 | https://example.com/packagerepos/updates" |
| 5540 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5541 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5542 | |
| 5543 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5544 | |
| 5545 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5546 | |
| 5547 | https://example.com/packagerepos/release/rpm/all |
| 5548 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5549 | https://example.com/packagerepos/release/rpm-dev/all |
| 5550 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5551 | https://example.com/packagerepos/updates/rpm/all |
| 5552 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5553 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5554 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5555 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5556 | :term:`PACKAGE_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5557 | Specifies the front portion of the package feed URI used by the |
| 5558 | OpenEmbedded build system. Each final package feed URI is comprised |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5559 | of :term:`PACKAGE_FEED_URIS`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5560 | :term:`PACKAGE_FEED_BASE_PATHS`, and |
| 5561 | :term:`PACKAGE_FEED_ARCHS` variables. |
| 5562 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5563 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5564 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5565 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5566 | |
| 5567 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5568 | https://example.com/packagerepos/updates" |
| 5569 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5570 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5571 | |
| 5572 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5573 | |
| 5574 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5575 | |
| 5576 | https://example.com/packagerepos/release/rpm/all |
| 5577 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5578 | https://example.com/packagerepos/release/rpm-dev/all |
| 5579 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5580 | https://example.com/packagerepos/updates/rpm/all |
| 5581 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5582 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5583 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5584 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5585 | :term:`PACKAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5586 | The final list of packages passed to the package manager for |
| 5587 | installation into the image. |
| 5588 | |
| 5589 | Because the package manager controls actual installation of all |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5590 | packages, the list of packages passed using :term:`PACKAGE_INSTALL` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5591 | not the final list of packages that are actually installed. This |
| 5592 | variable is internal to the image construction code. Consequently, in |
| 5593 | general, you should use the |
| 5594 | :term:`IMAGE_INSTALL` variable to specify |
| 5595 | packages for installation. The exception to this is when working with |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5596 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 5597 | image. When working with an initial RAM filesystem (:term:`Initramfs`) image, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5598 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 5599 | :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5600 | in the Yocto Project Development Tasks Manual. |
| 5601 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5602 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5603 | Specifies a list of packages the OpenEmbedded build system attempts |
| 5604 | to install when creating an image. If a listed package fails to |
| 5605 | install, the build system does not generate an error. This variable |
| 5606 | is generally not user-defined. |
| 5607 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5608 | :term:`PACKAGE_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5609 | Specifies a list of functions run to pre-process the |
| 5610 | :term:`PKGD` directory prior to splitting the files out |
| 5611 | to individual packages. |
| 5612 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5613 | :term:`PACKAGE_WRITE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5614 | Specifies a list of dependencies for post-installation and |
| 5615 | pre-installation scripts on native/cross tools. If your |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5616 | post-installation or pre-installation script can execute at root filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5617 | creation time rather than on the target but depends on a native tool |
| 5618 | in order to execute, you need to list the tools in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5619 | :term:`PACKAGE_WRITE_DEPS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5620 | |
| 5621 | For information on running post-installation scripts, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5622 | ":ref:`dev-manual/common-tasks:post-installation scripts`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5623 | section in the Yocto Project Development Tasks Manual. |
| 5624 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5625 | :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5626 | This variable provides a means of enabling or disabling features of a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5627 | recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5628 | recipes when you specify features and then arguments that define |
| 5629 | feature behaviors. Here is the basic block structure (broken over |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5630 | multiple lines for readability):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5631 | |
| 5632 | PACKAGECONFIG ??= "f1 f2 f3 ..." |
| 5633 | PACKAGECONFIG[f1] = "\ |
| 5634 | --with-f1, \ |
| 5635 | --without-f1, \ |
| 5636 | build-deps-for-f1, \ |
| 5637 | runtime-deps-for-f1, \ |
| 5638 | runtime-recommends-for-f1, \ |
| 5639 | packageconfig-conflicts-for-f1" |
| 5640 | PACKAGECONFIG[f2] = "\ |
| 5641 | ... and so on and so on ... |
| 5642 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5643 | The :term:`PACKAGECONFIG` variable itself specifies a space-separated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5644 | list of the features to enable. Following the features, you can |
| 5645 | determine the behavior of each feature by providing up to six |
| 5646 | order-dependent arguments, which are separated by commas. You can |
| 5647 | omit any argument you like but must retain the separating commas. The |
| 5648 | order is important and specifies the following: |
| 5649 | |
| 5650 | 1. Extra arguments that should be added to the configure script |
| 5651 | argument list (:term:`EXTRA_OECONF` or |
| 5652 | :term:`PACKAGECONFIG_CONFARGS`) if |
| 5653 | the feature is enabled. |
| 5654 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5655 | 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or |
| 5656 | :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5657 | |
| 5658 | 3. Additional build dependencies (:term:`DEPENDS`) |
| 5659 | that should be added if the feature is enabled. |
| 5660 | |
| 5661 | 4. Additional runtime dependencies (:term:`RDEPENDS`) |
| 5662 | that should be added if the feature is enabled. |
| 5663 | |
| 5664 | 5. Additional runtime recommendations |
| 5665 | (:term:`RRECOMMENDS`) that should be added if |
| 5666 | the feature is enabled. |
| 5667 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5668 | 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5669 | settings for this feature. |
| 5670 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5671 | Consider the following :term:`PACKAGECONFIG` block taken from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5672 | ``librsvg`` recipe. In this example the feature is ``gtk``, which has |
| 5673 | three arguments that determine the feature's behavior. |
| 5674 | :: |
| 5675 | |
| 5676 | PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" |
| 5677 | |
| 5678 | The |
| 5679 | ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is |
| 5680 | enabled. In this case, ``--with-gtk3`` is added to the configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5681 | 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] | 5682 | other hand, if the feature is disabled say through a ``.bbappend`` |
| 5683 | file in another layer, then the second argument ``--without-gtk3`` is |
| 5684 | added to the configure script instead. |
| 5685 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5686 | The basic :term:`PACKAGECONFIG` structure previously described holds true |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5687 | regardless of whether you are creating a block or changing a block. |
| 5688 | When creating a block, use the structure inside your recipe. |
| 5689 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5690 | 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] | 5691 | so one of two ways: |
| 5692 | |
| 5693 | - *Append file:* Create an append file named |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5694 | ``recipename.bbappend`` in your layer and override the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5695 | :term:`PACKAGECONFIG`. You can either completely override the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5696 | variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5697 | |
| 5698 | PACKAGECONFIG = "f4 f5" |
| 5699 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5700 | Or, you can just append the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5701 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5702 | PACKAGECONFIG:append = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5703 | |
| 5704 | - *Configuration file:* This method is identical to changing the |
| 5705 | block through an append file except you edit your ``local.conf`` |
| 5706 | or ``mydistro.conf`` file. As with append files previously |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5707 | described, you can either completely override the variable:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5708 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5709 | PACKAGECONFIG:pn-recipename = "f4 f5" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5710 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5711 | Or, you can just amend the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5712 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5713 | PACKAGECONFIG:append:pn-recipename = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5714 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5715 | :term:`PACKAGECONFIG_CONFARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5716 | A space-separated list of configuration options generated from the |
| 5717 | :term:`PACKAGECONFIG` setting. |
| 5718 | |
| 5719 | Classes such as :ref:`autotools <ref-classes-autotools>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5720 | :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to |
| 5721 | pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``, |
| 5722 | respectively. If you are using :term:`PACKAGECONFIG` but not a class that |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 5723 | handles the :ref:`ref-tasks-configure` task, then you need to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5724 | :term:`PACKAGECONFIG_CONFARGS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5725 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5726 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5727 | For recipes inheriting the |
| 5728 | :ref:`packagegroup <ref-classes-packagegroup>` class, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5729 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5730 | normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) |
| 5731 | should not be automatically created by the ``packagegroup`` recipe, |
| 5732 | which is the default behavior. |
| 5733 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5734 | :term:`PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5735 | The list of packages the recipe creates. The default value is the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5736 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5737 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 5738 | ${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] | 5739 | |
| 5740 | During packaging, the :ref:`ref-tasks-package` task |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5741 | goes through :term:`PACKAGES` and uses the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5742 | variable corresponding to each package to assign files to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5743 | package. If a file matches the :term:`FILES` variable for more than one |
| 5744 | package in :term:`PACKAGES`, it will be assigned to the earliest |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5745 | (leftmost) package. |
| 5746 | |
| 5747 | 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] | 5748 | the patterns in ``FILES:``\ pkg match any files installed by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5749 | :ref:`ref-tasks-install` task) are not generated, |
| 5750 | unless generation is forced through the |
| 5751 | :term:`ALLOW_EMPTY` variable. |
| 5752 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5753 | :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5754 | A promise that your recipe satisfies runtime dependencies for |
| 5755 | optional modules that are found in other recipes. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5756 | :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5757 | only states that they should be satisfied. For example, if a hard, |
| 5758 | runtime dependency (:term:`RDEPENDS`) of another |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5759 | package is satisfied at build time through the :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5760 | variable, but a package with the module name is never actually |
| 5761 | produced, then the other package will be broken. Thus, if you attempt |
| 5762 | to include that package in an image, you will get a dependency |
| 5763 | failure from the packaging system during the |
| 5764 | :ref:`ref-tasks-rootfs` task. |
| 5765 | |
| 5766 | Typically, if there is a chance that such a situation can occur and |
| 5767 | the package that is not created is valid without the dependency being |
| 5768 | satisfied, then you should use :term:`RRECOMMENDS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5769 | (a soft runtime dependency) instead of :term:`RDEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5770 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5771 | 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] | 5772 | you are splitting packages, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5773 | ":ref:`dev-manual/common-tasks:handling optional module packaging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5774 | section in the Yocto Project Development Tasks Manual. |
| 5775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5776 | :term:`PACKAGESPLITFUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5777 | Specifies a list of functions run to perform additional splitting of |
| 5778 | files into individual packages. Recipes can either prepend to this |
| 5779 | variable or prepend to the ``populate_packages`` function in order to |
| 5780 | perform additional package splitting. In either case, the function |
| 5781 | should set :term:`PACKAGES`, |
| 5782 | :term:`FILES`, :term:`RDEPENDS` and |
| 5783 | other packaging variables appropriately in order to perform the |
| 5784 | desired splitting. |
| 5785 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5786 | :term:`PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5787 | Extra options passed to the ``make`` command during the |
| 5788 | :ref:`ref-tasks-compile` task in order to specify |
| 5789 | parallel compilation on the local build host. This variable is |
| 5790 | usually in the form "-j x", where x represents the maximum number of |
| 5791 | parallel threads ``make`` can run. |
| 5792 | |
| 5793 | .. note:: |
| 5794 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5795 | In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5796 | called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure |
| 5797 | this is to use the ``oe_runmake`` function. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5798 | |
| 5799 | By default, the OpenEmbedded build system automatically sets this |
| 5800 | variable to be equal to the number of cores the build system uses. |
| 5801 | |
| 5802 | .. note:: |
| 5803 | |
| 5804 | If the software being built experiences dependency issues during |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 5805 | 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] | 5806 | the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5807 | information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5808 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5809 | section in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5810 | |
| 5811 | For single socket systems (i.e. one CPU), you should not have to |
| 5812 | override this variable to gain optimal parallelism during builds. |
| 5813 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5814 | 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] | 5815 | not set higher than "-j 20". |
| 5816 | |
| 5817 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5818 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5819 | section in the Yocto Project Development Tasks Manual. |
| 5820 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5821 | :term:`PARALLEL_MAKEINST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5822 | Extra options passed to the ``make install`` command during the |
| 5823 | :ref:`ref-tasks-install` task in order to specify |
| 5824 | parallel installation. This variable defaults to the value of |
| 5825 | :term:`PARALLEL_MAKE`. |
| 5826 | |
| 5827 | .. note:: |
| 5828 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5829 | In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5830 | be called with |
| 5831 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 5832 | way to ensure this is to use the ``oe_runmake`` function. |
| 5833 | |
| 5834 | If the software being built experiences dependency issues during |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 5835 | 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] | 5836 | clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5837 | workaround. For information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5838 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5839 | section in the Yocto Project Development Tasks Manual. |
| 5840 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5841 | :term:`PATCHRESOLVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5842 | Determines the action to take when a patch fails. You can set this |
| 5843 | variable to one of two values: "noop" and "user". |
| 5844 | |
| 5845 | The default value of "noop" causes the build to simply fail when the |
| 5846 | OpenEmbedded build system cannot successfully apply a patch. Setting |
| 5847 | the value to "user" causes the build system to launch a shell and |
| 5848 | places you in the right location so that you can manually resolve the |
| 5849 | conflicts. |
| 5850 | |
| 5851 | Set this variable in your ``local.conf`` file. |
| 5852 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5853 | :term:`PATCHTOOL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5854 | Specifies the utility used to apply patches for a recipe during the |
| 5855 | :ref:`ref-tasks-patch` task. You can specify one of |
| 5856 | three utilities: "patch", "quilt", or "git". The default utility used |
| 5857 | is "quilt" except for the quilt-native recipe itself. Because the |
| 5858 | quilt tool is not available at the time quilt-native is being |
| 5859 | patched, it uses "patch". |
| 5860 | |
| 5861 | 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] | 5862 | the recipe using one of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5863 | |
| 5864 | PATCHTOOL = "patch" |
| 5865 | PATCHTOOL = "quilt" |
| 5866 | PATCHTOOL = "git" |
| 5867 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5868 | :term:`PE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5869 | The epoch of the recipe. By default, this variable is unset. The |
| 5870 | variable is used to make upgrades possible when the versioning scheme |
| 5871 | changes in some backwards incompatible way. |
| 5872 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5873 | :term:`PE` is the default value of the :term:`PKGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5874 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5875 | :term:`PEP517_WHEEL_PATH` |
| 5876 | When used by recipes that inherit the |
| 5877 | :ref:`python_pep517 <ref-classes-python_pep517>` class, |
| 5878 | denotes the path to ``dist/`` (short for distribution) where the |
| 5879 | binary archive ``wheel`` is built. |
| 5880 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5881 | :term:`PF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5882 | Specifies the recipe or package name and includes all version and |
| 5883 | revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and |
| 5884 | ``bash-4.2-r1/``). This variable is comprised of the following: |
| 5885 | ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} |
| 5886 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5887 | :term:`PIXBUF_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5888 | When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>` |
| 5889 | class, this variable identifies packages that contain the pixbuf |
| 5890 | loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache`` |
| 5891 | class assumes that the loaders are in the recipe's main package (i.e. |
| 5892 | ``${``\ :term:`PN`\ ``}``). Use this variable if the |
| 5893 | loaders you need are in a package other than that main package. |
| 5894 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5895 | :term:`PKG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5896 | The name of the resulting package created by the OpenEmbedded build |
| 5897 | system. |
| 5898 | |
| 5899 | .. note:: |
| 5900 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5901 | 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] | 5902 | |
| 5903 | For example, when the :ref:`debian <ref-classes-debian>` class |
| 5904 | renames the output package, it does so by setting |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5905 | ``PKG:packagename``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5906 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5907 | :term:`PKG_CONFIG_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5908 | The path to ``pkg-config`` files for the current build context. |
| 5909 | ``pkg-config`` reads this variable from the environment. |
| 5910 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5911 | :term:`PKGD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5912 | Points to the destination directory for files to be packaged before |
| 5913 | they are split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5914 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5915 | |
| 5916 | ${WORKDIR}/package |
| 5917 | |
| 5918 | Do not change this default. |
| 5919 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5920 | :term:`PKGDATA_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5921 | Points to a shared, global-state directory that holds data generated |
| 5922 | during the packaging process. During the packaging process, the |
| 5923 | :ref:`ref-tasks-packagedata` task packages data |
| 5924 | for each recipe and installs it into this temporary, shared area. |
| 5925 | This directory defaults to the following, which you should not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5926 | change:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5927 | |
| 5928 | ${STAGING_DIR_HOST}/pkgdata |
| 5929 | |
| 5930 | For examples of how this data is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5931 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5932 | section in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5933 | ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5934 | section in the Yocto Project Development Tasks Manual. For more |
| 5935 | information on the shared, global-state directory, see |
| 5936 | :term:`STAGING_DIR_HOST`. |
| 5937 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5938 | :term:`PKGDEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5939 | Points to the parent directory for files to be packaged after they |
| 5940 | have been split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5941 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5942 | |
| 5943 | ${WORKDIR}/packages-split |
| 5944 | |
| 5945 | Under this directory, the build system creates directories for each |
| 5946 | package specified in :term:`PACKAGES`. Do not change |
| 5947 | this default. |
| 5948 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5949 | :term:`PKGDESTWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5950 | Points to a temporary work area where the |
| 5951 | :ref:`ref-tasks-package` task saves package metadata. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5952 | The :term:`PKGDESTWORK` location defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5953 | |
| 5954 | ${WORKDIR}/pkgdata |
| 5955 | |
| 5956 | Do not change this default. |
| 5957 | |
| 5958 | The :ref:`ref-tasks-packagedata` task copies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5959 | package metadata from :term:`PKGDESTWORK` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5960 | :term:`PKGDATA_DIR` to make it available globally. |
| 5961 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5962 | :term:`PKGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5963 | 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] | 5964 | is set to :term:`PE`. |
| 5965 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5966 | :term:`PKGR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5967 | The revision of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5968 | :term:`PKGR` is set to :term:`PR`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5969 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5970 | :term:`PKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5971 | The version of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5972 | :term:`PKGV` is set to :term:`PV`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5973 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5974 | :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5975 | This variable can have two separate functions depending on the |
| 5976 | context: a recipe name or a resulting package name. |
| 5977 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5978 | :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] | 5979 | OpenEmbedded build system as input to create a package. The name is |
| 5980 | normally extracted from the recipe file name. For example, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5981 | 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] | 5982 | will be "expat". |
| 5983 | |
| 5984 | The variable refers to a package name in the context of a file |
| 5985 | created or produced by the OpenEmbedded build system. |
| 5986 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5987 | If applicable, the :term:`PN` variable also contains any special suffix |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5988 | or prefix. For example, using ``bash`` to build packages for the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5989 | native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5990 | packages for the target and for Multilib, :term:`PN` would be ``bash`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5991 | and ``lib64-bash``, respectively. |
| 5992 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5993 | :term:`POPULATE_SDK_POST_HOST_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5994 | Specifies a list of functions to call once the OpenEmbedded build |
| 5995 | system has created the host part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5996 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5997 | |
| 5998 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " |
| 5999 | |
| 6000 | If you need to pass the SDK path to a command within a function, you |
| 6001 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6002 | the OpenEmbedded build system when creating SDK output. See the |
| 6003 | :term:`SDK_DIR` variable for more information. |
| 6004 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6005 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6006 | Specifies a list of functions to call once the OpenEmbedded build |
| 6007 | system has created the target part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6008 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6009 | |
| 6010 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " |
| 6011 | |
| 6012 | If you need to pass the SDK path to a command within a function, you |
| 6013 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6014 | the OpenEmbedded build system when creating SDK output. See the |
| 6015 | :term:`SDK_DIR` variable for more information. |
| 6016 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6017 | :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6018 | The revision of the recipe. The default value for this variable is |
| 6019 | "r0". Subsequent revisions of the recipe conventionally have the |
| 6020 | values "r1", "r2", and so forth. When :term:`PV` increases, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6021 | :term:`PR` is conventionally reset to "r0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6022 | |
| 6023 | .. note:: |
| 6024 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6025 | The OpenEmbedded build system does not need the aid of :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6026 | 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] | 6027 | :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6028 | :ref:`stamp <structure-build-tmp-stamps>` and |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6029 | :ref:`overview-manual/concepts:shared state cache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6030 | mechanisms. |
| 6031 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6032 | The :term:`PR` variable primarily becomes significant when a package |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6033 | manager dynamically installs packages on an already built image. In |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6034 | this case, :term:`PR`, which is the default value of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6035 | :term:`PKGR`, helps the package manager distinguish which |
| 6036 | 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] | 6037 | same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with |
| 6038 | the same :term:`PV` usually means that the packages all install the same |
| 6039 | upstream version, but with later (:term:`PR`) version packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6040 | packaging fixes. |
| 6041 | |
| 6042 | .. note:: |
| 6043 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6044 | :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] | 6045 | package contents or metadata. |
| 6046 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6047 | Because manually managing :term:`PR` can be cumbersome and error-prone, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6048 | an automated solution exists. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6049 | ":ref:`dev-manual/common-tasks:working with a pr service`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6050 | in the Yocto Project Development Tasks Manual for more information. |
| 6051 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6052 | :term:`PREFERRED_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6053 | If multiple recipes provide the same item, this variable determines |
| 6054 | which recipe is preferred and thus provides the item (i.e. the |
| 6055 | preferred provider). You should always suffix this variable with the |
| 6056 | name of the provided item. And, you should define the variable using |
| 6057 | the preferred recipe's name (:term:`PN`). Here is a common |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6058 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6059 | |
| 6060 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 6061 | |
| 6062 | In the previous example, multiple recipes are providing "virtual/kernel". |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6063 | 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] | 6064 | the recipe you prefer to provide "virtual/kernel". |
| 6065 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6066 | Following are more examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6067 | |
| 6068 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
| 6069 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
| 6070 | |
| 6071 | For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6072 | information, see the ":ref:`dev-manual/common-tasks:using virtual providers`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6073 | section in the Yocto Project Development Tasks Manual. |
| 6074 | |
| 6075 | .. note:: |
| 6076 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6077 | If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6078 | recipe that :term:`PROVIDES` that item but is not selected (defined) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6079 | by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6080 | desirable since this mechanism is designed to select between mutually |
| 6081 | exclusive alternative providers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6082 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6083 | :term:`PREFERRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6084 | If there are multiple versions of a recipe available, this variable |
| 6085 | determines which version should be given preference. You must always |
| 6086 | suffix the variable with the :term:`PN` you want to select (`python` in |
| 6087 | the first example below), and you should specify the :term:`PV` |
| 6088 | accordingly (`3.4.0` in the example). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6089 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6090 | The :term:`PREFERRED_VERSION` variable supports limited wildcard use |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6091 | through the "``%``" character. You can use the character to match any |
| 6092 | number of characters, which can be useful when specifying versions |
| 6093 | that contain long revision numbers that potentially change. Here are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6094 | two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6095 | |
| 6096 | PREFERRED_VERSION_python = "3.4.0" |
| 6097 | PREFERRED_VERSION_linux-yocto = "5.0%" |
| 6098 | |
| 6099 | .. note:: |
| 6100 | |
| 6101 | The use of the "%" character is limited in that it only works at the end of the |
| 6102 | string. You cannot use the wildcard character in any other |
| 6103 | location of the string. |
| 6104 | |
| 6105 | The specified version is matched against :term:`PV`, which |
| 6106 | does not necessarily match the version part of the recipe's filename. |
| 6107 | 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] | 6108 | where ``foo_git.bb`` contains the following assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6109 | |
| 6110 | PV = "1.1+git${SRCPV}" |
| 6111 | |
| 6112 | In this case, the correct way to select |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6113 | ``foo_git.bb`` is by using an assignment such as the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6114 | |
| 6115 | PREFERRED_VERSION_foo = "1.1+git%" |
| 6116 | |
| 6117 | Compare that previous example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6118 | against the following incorrect example, which does not work:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6119 | |
| 6120 | PREFERRED_VERSION_foo = "git" |
| 6121 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6122 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6123 | configuration files in a way that is hard to change. You can use |
| 6124 | :term:`OVERRIDES` to set a machine-specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6125 | override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6126 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6127 | PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6128 | |
| 6129 | Although not recommended, worst case, you can also use the |
| 6130 | "forcevariable" override, which is the strongest override possible. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6131 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6132 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6133 | PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6134 | |
| 6135 | .. note:: |
| 6136 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6137 | The ``:forcevariable`` override is not handled specially. This override |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6138 | only works because the default value of :term:`OVERRIDES` includes "forcevariable". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6139 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6140 | If a recipe with the specified version is not available, a warning |
| 6141 | message will be shown. See :term:`REQUIRED_VERSION` if you want this |
| 6142 | to be an error instead. |
| 6143 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6144 | :term:`PREMIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6145 | Specifies additional paths from which the OpenEmbedded build system |
| 6146 | gets source code. When the build system searches for source code, it |
| 6147 | first tries the local download directory. If that location fails, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6148 | build system tries locations defined by :term:`PREMIRRORS`, the upstream |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6149 | source, and then locations specified by |
| 6150 | :term:`MIRRORS` in that order. |
| 6151 | |
| 6152 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6153 | the default value for :term:`PREMIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6154 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 6155 | |
| 6156 | Typically, you could add a specific server for the build system to |
| 6157 | attempt before any others by adding something like the following to |
| 6158 | the ``local.conf`` configuration file in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6159 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6160 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6161 | PREMIRRORS:prepend = "\ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6162 | git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6163 | ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6164 | http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 6165 | https://.*/.* &YOCTO_DL_URL;/mirror/sources/" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6166 | |
| 6167 | These changes cause the |
| 6168 | build system to intercept Git, FTP, HTTP, and HTTPS requests and |
| 6169 | direct them to the ``http://`` sources mirror. You can use |
| 6170 | ``file://`` URLs to point to local directories or network shares as |
| 6171 | well. |
| 6172 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6173 | :term:`PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6174 | Indicates the importance of a package. |
| 6175 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6176 | :term:`PRIORITY` is considered to be part of the distribution policy |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6177 | because the importance of any given recipe depends on the purpose for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6178 | which the distribution is being produced. Thus, :term:`PRIORITY` is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6179 | normally set within recipes. |
| 6180 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6181 | You can set :term:`PRIORITY` to "required", "standard", "extra", and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6182 | "optional", which is the default. |
| 6183 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6184 | :term:`PRIVATE_LIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6185 | Specifies libraries installed within a recipe that should be ignored |
| 6186 | by the OpenEmbedded build system's shared library resolver. This |
| 6187 | variable is typically used when software being built by a recipe has |
| 6188 | its own private versions of a library normally provided by another |
| 6189 | recipe. In this case, you would not want the package containing the |
| 6190 | private libraries to be set as a dependency on other unrelated |
| 6191 | packages that should instead depend on the package providing the |
| 6192 | standard version of the library. |
| 6193 | |
| 6194 | Libraries specified in this variable should be specified by their |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6195 | file name. For example, from the Firefox recipe in meta-browser:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6196 | |
| 6197 | PRIVATE_LIBS = "libmozjs.so \ |
| 6198 | libxpcom.so \ |
| 6199 | libnspr4.so \ |
| 6200 | libxul.so \ |
| 6201 | libmozalloc.so \ |
| 6202 | libplc4.so \ |
| 6203 | libplds4.so" |
| 6204 | |
| 6205 | For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6206 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6207 | section in the Yocto Project Overview and Concepts Manual. |
| 6208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6209 | :term:`PROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6210 | 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] | 6211 | default, a recipe's own :term:`PN` is implicitly already in its |
| 6212 | :term:`PROVIDES` list and therefore does not need to mention that it |
| 6213 | provides itself. If a recipe uses :term:`PROVIDES`, the additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6214 | aliases are synonyms for the recipe and can be useful for satisfying |
| 6215 | dependencies of other recipes during the build as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6216 | :term:`DEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6217 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6218 | Consider the following example :term:`PROVIDES` statement from the recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6219 | file ``eudev_3.2.9.bb``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6220 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6221 | PROVIDES += "udev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6222 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6223 | The :term:`PROVIDES` statement |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6224 | results in the "eudev" recipe also being available as simply "udev". |
| 6225 | |
| 6226 | .. note:: |
| 6227 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6228 | A recipe's own recipe name (:term:`PN`) is always implicitly prepended |
| 6229 | to `PROVIDES`, so while using "+=" in the above example may not be |
| 6230 | strictly necessary it is recommended to avoid confusion. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6231 | |
| 6232 | In addition to providing recipes under alternate names, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6233 | :term:`PROVIDES` mechanism is also used to implement virtual targets. A |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6234 | virtual target is a name that corresponds to some particular |
| 6235 | functionality (e.g. a Linux kernel). Recipes that provide the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6236 | functionality in question list the virtual target in :term:`PROVIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6237 | Recipes that depend on the functionality in question can include the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6238 | virtual target in :term:`DEPENDS` to leave the choice of provider open. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6239 | |
| 6240 | Conventionally, virtual targets have names on the form |
| 6241 | "virtual/function" (e.g. "virtual/kernel"). The slash is simply part |
| 6242 | of the name and has no syntactical significance. |
| 6243 | |
| 6244 | The :term:`PREFERRED_PROVIDER` variable is |
| 6245 | used to select which particular recipe provides a virtual target. |
| 6246 | |
| 6247 | .. note:: |
| 6248 | |
| 6249 | A corresponding mechanism for virtual runtime dependencies |
| 6250 | (packages) exists. However, the mechanism does not depend on any |
| 6251 | special functionality beyond ordinary variable assignments. For |
| 6252 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of |
| 6253 | the component that manages the ``/dev`` directory. |
| 6254 | |
| 6255 | Setting the "preferred provider" for runtime dependencies is as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6256 | simple as using the following assignment in a configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6257 | |
| 6258 | VIRTUAL-RUNTIME_dev_manager = "udev" |
| 6259 | |
| 6260 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6261 | :term:`PRSERV_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6262 | The network based :term:`PR` service host and port. |
| 6263 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 6264 | The ``conf/templates/default/local.conf.sample.extended`` configuration |
| 6265 | file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST` |
| 6266 | variable is set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6267 | |
| 6268 | PRSERV_HOST = "localhost:0" |
| 6269 | |
| 6270 | You must |
| 6271 | set the variable if you want to automatically start a local :ref:`PR |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6272 | service <dev-manual/common-tasks:working with a pr service>`. You can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6273 | 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] | 6274 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6275 | |
| 6276 | :term:`PSEUDO_IGNORE_PATHS` |
| 6277 | A comma-separated (without spaces) list of path prefixes that should be ignored |
| 6278 | by pseudo when monitoring and recording file operations, in order to avoid |
| 6279 | problems with files being written to outside of the pseudo context and |
| 6280 | reduce pseudo's overhead. A path is ignored if it matches any prefix in the list |
| 6281 | and can include partial directory (or file) names. |
| 6282 | |
| 6283 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6284 | :term:`PTEST_ENABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6285 | Specifies whether or not :ref:`Package |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6286 | Test <dev-manual/common-tasks:testing packages with ptest>` (ptest) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6287 | functionality is enabled when building a recipe. You should not set |
| 6288 | this variable directly. Enabling and disabling building Package Tests |
| 6289 | at build time should be done by adding "ptest" to (or removing it |
| 6290 | from) :term:`DISTRO_FEATURES`. |
| 6291 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6292 | :term:`PV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6293 | The version of the recipe. The version is normally extracted from the |
| 6294 | recipe filename. For example, if the recipe is named |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6295 | ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1". |
| 6296 | :term:`PV` is generally not overridden within a recipe unless it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6297 | building an unstable (i.e. development) version from a source code |
| 6298 | repository (e.g. Git or Subversion). |
| 6299 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6300 | :term:`PV` is the default value of the :term:`PKGV` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6301 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 6302 | :term:`PYPI_PACKAGE` |
| 6303 | When inheriting the :ref:`pypi <ref-classes-pypi>` class, specifies the |
| 6304 | `PyPI <https://pypi.org/>`__ package name to be built. The default value |
| 6305 | is set based upon :term:`BPN` (stripping any "python-" or "python3-" |
| 6306 | prefix off if present), however for some packages it will need to be set |
| 6307 | explicitly if that will not match the package name (e.g. where the |
| 6308 | package name has a prefix, underscores, uppercase letters etc.) |
| 6309 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6310 | :term:`PYTHON_ABI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6311 | When used by recipes that inherit the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6312 | :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6313 | Application Binary Interface (ABI) currently in use for Python. By |
| 6314 | default, the ABI is "m". You do not have to set this variable as the |
| 6315 | OpenEmbedded build system sets it for you. |
| 6316 | |
| 6317 | The OpenEmbedded build system uses the ABI to construct directory |
| 6318 | names used when installing the Python headers and libraries in |
| 6319 | sysroot (e.g. ``.../python3.3m/...``). |
| 6320 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6321 | :term:`PYTHON_PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6322 | When used by recipes that inherit the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6323 | :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6324 | major Python version being built. For Python 3.x, :term:`PYTHON_PN` would |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6325 | be "python3". You do not have to set this variable as the |
| 6326 | OpenEmbedded build system automatically sets it for you. |
| 6327 | |
| 6328 | The variable allows recipes to use common infrastructure such as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6329 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6330 | |
| 6331 | DEPENDS += "${PYTHON_PN}-native" |
| 6332 | |
| 6333 | In the previous example, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6334 | the version of the dependency is :term:`PYTHON_PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6335 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 6336 | :term:`QA_EMPTY_DIRS` |
| 6337 | Specifies a list of directories that are expected to be empty when |
| 6338 | packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or |
| 6339 | :term:`WARN_QA` these will be checked and an error or warning |
| 6340 | (respectively) will be produced. |
| 6341 | |
| 6342 | The default :term:`QA_EMPTY_DIRS` value is set in |
| 6343 | :ref:`insane.bbclass <ref-classes-insane>`. |
| 6344 | |
| 6345 | :term:`QA_EMPTY_DIRS_RECOMMENDATION` |
| 6346 | Specifies a recommendation for why a directory must be empty, |
| 6347 | which will be included in the error message if a specific directory |
| 6348 | is found to contain files. Must be overridden with the directory |
| 6349 | path to match on. |
| 6350 | |
| 6351 | If no recommendation is specified for a directory, then the default |
| 6352 | "but it is expected to be empty" will be used. |
| 6353 | |
| 6354 | An example message shows if files were present in '/dev':: |
| 6355 | |
| 6356 | QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime" |
| 6357 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6358 | :term:`RANLIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6359 | The minimal command and arguments to run ``ranlib``. |
| 6360 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6361 | :term:`RCONFLICTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6362 | The list of packages that conflict with packages. Note that packages |
| 6363 | will not be installed if conflicting packages are not first removed. |
| 6364 | |
| 6365 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6366 | conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6367 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6368 | RCONFLICTS:${PN} = "another_conflicting_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6369 | |
| 6370 | BitBake, which the OpenEmbedded build system uses, supports |
| 6371 | specifying versioned dependencies. Although the syntax varies |
| 6372 | depending on the packaging format, BitBake hides these differences |
| 6373 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6374 | :term:`RCONFLICTS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6375 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6376 | RCONFLICTS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6377 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6378 | For ``operator``, you can specify the following: |
| 6379 | |
| 6380 | - = |
| 6381 | - < |
| 6382 | - > |
| 6383 | - <= |
| 6384 | - >= |
| 6385 | |
| 6386 | 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] | 6387 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6388 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6389 | RCONFLICTS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6390 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6391 | :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6392 | Lists runtime dependencies of a package. These dependencies are other |
| 6393 | packages that must be installed in order for the package to function |
| 6394 | correctly. As an example, the following assignment declares that the |
| 6395 | package ``foo`` needs the packages ``bar`` and ``baz`` to be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6396 | installed:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6397 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6398 | RDEPENDS:foo = "bar baz" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6399 | |
| 6400 | The most common types of package |
| 6401 | runtime dependencies are automatically detected and added. Therefore, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6402 | most recipes do not need to set :term:`RDEPENDS`. For more information, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6403 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6404 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6405 | section in the Yocto Project Overview and Concepts Manual. |
| 6406 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6407 | The practical effect of the above :term:`RDEPENDS` assignment is that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6408 | ``bar`` and ``baz`` will be declared as dependencies inside the |
| 6409 | package ``foo`` when it is written out by one of the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6410 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6411 | Exactly how this is done depends on which package format is used, |
| 6412 | which is determined by |
| 6413 | :term:`PACKAGE_CLASSES`. When the |
| 6414 | corresponding package manager installs the package, it will know to |
| 6415 | also install the packages on which it depends. |
| 6416 | |
| 6417 | To ensure that the packages ``bar`` and ``baz`` get built, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6418 | previous :term:`RDEPENDS` assignment also causes a task dependency to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6419 | added. This dependency is from the recipe's |
| 6420 | :ref:`ref-tasks-build` (not to be confused with |
| 6421 | :ref:`ref-tasks-compile`) task to the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6422 | :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] | 6423 | ``baz``. |
| 6424 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6425 | 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] | 6426 | names of other packages --- they cannot be recipe names. Although |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6427 | package names and recipe names usually match, the important point |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6428 | here is that you are providing package names within the :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6429 | variable. For an example of the default list of packages created from |
| 6430 | a recipe, see the :term:`PACKAGES` variable. |
| 6431 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6432 | Because the :term:`RDEPENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6433 | you should always use the variable in a form with an attached package |
| 6434 | name (remember that a single recipe can build multiple packages). For |
| 6435 | example, suppose you are building a development package that depends |
| 6436 | on the ``perl`` package. In this case, you would use the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6437 | :term:`RDEPENDS` statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6438 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6439 | RDEPENDS:${PN}-dev += "perl" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6440 | |
| 6441 | In the example, |
| 6442 | the development package depends on the ``perl`` package. Thus, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6443 | :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6444 | the variable. |
| 6445 | |
| 6446 | .. note:: |
| 6447 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6448 | ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6449 | by default. This default is set in the BitBake configuration file |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6450 | (``meta/conf/bitbake.conf``). Be careful not to accidentally remove |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6451 | ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6452 | rather than the "=" operator. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6453 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6454 | The package names you use with :term:`RDEPENDS` must appear as they would |
| 6455 | in the :term:`PACKAGES` variable. The :term:`PKG` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6456 | allows a different name to be used for the final package (e.g. the |
| 6457 | :ref:`debian <ref-classes-debian>` class uses this to rename |
| 6458 | packages), but this final package name cannot be used with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6459 | :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6460 | independent of the package format used. |
| 6461 | |
| 6462 | BitBake, which the OpenEmbedded build system uses, supports |
| 6463 | specifying versioned dependencies. Although the syntax varies |
| 6464 | depending on the packaging format, BitBake hides these differences |
| 6465 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6466 | :term:`RDEPENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6467 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6468 | RDEPENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6469 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6470 | For ``operator``, you can specify the following: |
| 6471 | |
| 6472 | - = |
| 6473 | - < |
| 6474 | - > |
| 6475 | - <= |
| 6476 | - >= |
| 6477 | |
| 6478 | For version, provide the version number. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6479 | |
| 6480 | .. note:: |
| 6481 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6482 | You can use :term:`EXTENDPKGV` to provide a full package version |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6483 | specification. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6484 | |
| 6485 | 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] | 6486 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6487 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6488 | RDEPENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6489 | |
| 6490 | For information on build-time dependencies, see the |
| 6491 | :term:`DEPENDS` variable. You can also see the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 6492 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 6493 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6494 | BitBake User Manual for additional information on tasks and |
| 6495 | dependencies. |
| 6496 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 6497 | :term:`RECIPE_NO_UPDATE_REASON` |
| 6498 | If a recipe should not be replaced by a more recent upstream version, |
| 6499 | putting the reason why in this variable in a recipe allows |
| 6500 | ``devtool check-upgrade-status`` command to display it, as explained |
| 6501 | in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" |
| 6502 | section. |
| 6503 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6504 | :term:`REQUIRED_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6505 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6506 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6507 | class, this variable identifies distribution features that must exist |
| 6508 | in the current configuration in order for the OpenEmbedded build |
| 6509 | system to build the recipe. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6510 | :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not |
| 6511 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6512 | the recipe will be skipped, and if the build system attempts to build |
| 6513 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6514 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6515 | :term:`REQUIRED_VERSION` |
| 6516 | If there are multiple versions of a recipe available, this variable |
| 6517 | determines which version should be given preference. |
| 6518 | :term:`REQUIRED_VERSION` works in exactly the same manner as |
| 6519 | :term:`PREFERRED_VERSION`, except that if the specified version is not |
| 6520 | available then an error message is shown and the build fails |
| 6521 | immediately. |
| 6522 | |
| 6523 | If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set |
| 6524 | for the same recipe, the :term:`REQUIRED_VERSION` value applies. |
| 6525 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6526 | :term:`RM_WORK_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6527 | With ``rm_work`` enabled, this variable specifies a list of recipes |
| 6528 | whose work directories should not be removed. See the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6529 | ":ref:`ref-classes-rm-work`" section for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6530 | details. |
| 6531 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6532 | :term:`ROOT_HOME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6533 | Defines the root home directory. By default, this directory is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6534 | follows in the BitBake configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6535 | |
| 6536 | ROOT_HOME ??= "/home/root" |
| 6537 | |
| 6538 | .. note:: |
| 6539 | |
| 6540 | This default value is likely used because some embedded solutions |
| 6541 | prefer to have a read-only root filesystem and prefer to keep |
| 6542 | writeable data in one place. |
| 6543 | |
| 6544 | You can override the default by setting the variable in any layer or |
| 6545 | in the ``local.conf`` file. Because the default is set using a "weak" |
| 6546 | assignment (i.e. "??="), you can use either of the following forms to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6547 | define your override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6548 | |
| 6549 | ROOT_HOME = "/root" |
| 6550 | ROOT_HOME ?= "/root" |
| 6551 | |
| 6552 | These |
| 6553 | override examples use ``/root``, which is probably the most commonly |
| 6554 | used override. |
| 6555 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6556 | :term:`ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6557 | Indicates a filesystem image to include as the root filesystem. |
| 6558 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6559 | The :term:`ROOTFS` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6560 | :ref:`image-live <ref-classes-image-live>` class. |
| 6561 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6562 | :term:`ROOTFS_POSTINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6563 | Specifies a list of functions to call after the OpenEmbedded build |
| 6564 | system has installed packages. You can specify functions separated by |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6565 | semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6566 | |
| 6567 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " |
| 6568 | |
| 6569 | If you need to pass the root filesystem path to a command within a |
| 6570 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6571 | directory that becomes the root filesystem image. See the |
| 6572 | :term:`IMAGE_ROOTFS` variable for more |
| 6573 | information. |
| 6574 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6575 | :term:`ROOTFS_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6576 | Specifies a list of functions to call once the OpenEmbedded build |
| 6577 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6578 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6579 | |
| 6580 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " |
| 6581 | |
| 6582 | If you need to pass the root filesystem path to a command within a |
| 6583 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6584 | directory that becomes the root filesystem image. See the |
| 6585 | :term:`IMAGE_ROOTFS` variable for more |
| 6586 | information. |
| 6587 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6588 | :term:`ROOTFS_POSTUNINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6589 | Specifies a list of functions to call after the OpenEmbedded build |
| 6590 | system has removed unnecessary packages. When runtime package |
| 6591 | management is disabled in the image, several packages are removed |
| 6592 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6593 | You can specify functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6594 | |
| 6595 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " |
| 6596 | |
| 6597 | If you need to pass the root filesystem path to a command within a |
| 6598 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6599 | directory that becomes the root filesystem image. See the |
| 6600 | :term:`IMAGE_ROOTFS` variable for more |
| 6601 | information. |
| 6602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6603 | :term:`ROOTFS_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6604 | Specifies a list of functions to call before the OpenEmbedded build |
| 6605 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6606 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6607 | |
| 6608 | ROOTFS_PREPROCESS_COMMAND += "function; ... " |
| 6609 | |
| 6610 | If you need to pass the root filesystem path to a command within a |
| 6611 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6612 | directory that becomes the root filesystem image. See the |
| 6613 | :term:`IMAGE_ROOTFS` variable for more |
| 6614 | information. |
| 6615 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6616 | :term:`RPROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6617 | A list of package name aliases that a package also provides. These |
| 6618 | aliases are useful for satisfying runtime dependencies of other |
| 6619 | packages both during the build and on the target (as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6620 | :term:`RDEPENDS`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6621 | |
| 6622 | .. note:: |
| 6623 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6624 | 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] | 6625 | |
| 6626 | As with all package-controlling variables, you must always use the |
| 6627 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6628 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6629 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6630 | RPROVIDES:${PN} = "widget-abi-2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6631 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6632 | :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6633 | A list of packages that extends the usability of a package being |
| 6634 | built. The package being built does not depend on this list of |
| 6635 | packages in order to successfully build, but rather uses them for |
| 6636 | extended usability. To specify runtime dependencies for packages, see |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6637 | the :term:`RDEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6638 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6639 | The package manager will automatically install the :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6640 | list of packages when installing the built package. However, you can |
| 6641 | prevent listed packages from being installed by using the |
| 6642 | :term:`BAD_RECOMMENDATIONS`, |
| 6643 | :term:`NO_RECOMMENDATIONS`, and |
| 6644 | :term:`PACKAGE_EXCLUDE` variables. |
| 6645 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6646 | Packages specified in :term:`RRECOMMENDS` need not actually be produced. |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6647 | However, there must be a recipe providing each package, either |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6648 | through the :term:`PACKAGES` or |
| 6649 | :term:`PACKAGES_DYNAMIC` variables or the |
| 6650 | :term:`RPROVIDES` variable, or an error will occur |
| 6651 | during the build. If such a recipe does exist and the package is not |
| 6652 | produced, the build continues without error. |
| 6653 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6654 | Because the :term:`RRECOMMENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6655 | you should always attach an override to the variable to specify the |
| 6656 | particular package whose usability is being extended. For example, |
| 6657 | suppose you are building a development package that is extended to |
| 6658 | support wireless functionality. In this case, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6659 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6660 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6661 | RRECOMMENDS:${PN}-dev += "wireless_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6662 | |
| 6663 | In the |
| 6664 | example, the package name (``${PN}-dev``) must appear as it would in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6665 | the :term:`PACKAGES` namespace before any renaming of the output package |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 6666 | by classes such as :ref:`ref-classes-debian`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6667 | |
| 6668 | BitBake, which the OpenEmbedded build system uses, supports |
| 6669 | specifying versioned recommends. Although the syntax varies depending |
| 6670 | on the packaging format, BitBake hides these differences from you. |
| 6671 | Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6672 | :term:`RRECOMMENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6673 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6674 | RRECOMMENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6675 | |
| 6676 | For ``operator``, you can specify the following: |
| 6677 | |
| 6678 | - = |
| 6679 | - < |
| 6680 | - > |
| 6681 | - <= |
| 6682 | - >= |
| 6683 | |
| 6684 | 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] | 6685 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6686 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6687 | RRECOMMENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6688 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6689 | :term:`RREPLACES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6690 | A list of packages replaced by a package. The package manager uses |
| 6691 | this variable to determine which package should be installed to |
| 6692 | replace other package(s) during an upgrade. In order to also have the |
| 6693 | 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] | 6694 | the other package to the :term:`RCONFLICTS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6695 | |
| 6696 | As with all package-controlling variables, you must use this variable |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6697 | in conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6698 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6699 | RREPLACES:${PN} = "other_package_being_replaced" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6700 | |
| 6701 | BitBake, which the OpenEmbedded build system uses, supports |
| 6702 | specifying versioned replacements. Although the syntax varies |
| 6703 | depending on the packaging format, BitBake hides these differences |
| 6704 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6705 | :term:`RREPLACES` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6706 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6707 | RREPLACES:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6708 | |
| 6709 | For ``operator``, you can specify the following: |
| 6710 | |
| 6711 | - = |
| 6712 | - < |
| 6713 | - > |
| 6714 | - <= |
| 6715 | - >= |
| 6716 | |
| 6717 | For example, the following sets up a replacement using version 1.2 |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6718 | or greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6719 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6720 | RREPLACES:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6721 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6722 | :term:`RSUGGESTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6723 | A list of additional packages that you can suggest for installation |
| 6724 | by the package manager at the time a package is installed. Not all |
| 6725 | package managers support this functionality. |
| 6726 | |
| 6727 | As with all package-controlling variables, you must always use this |
| 6728 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6729 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6730 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6731 | RSUGGESTS:${PN} = "useful_package another_package" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6732 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6733 | :term:`S` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6734 | The location in the :term:`Build Directory` where |
| 6735 | unpacked recipe source code resides. By default, this directory is |
| 6736 | ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, |
| 6737 | where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe |
| 6738 | version. If the source tarball extracts the code to a directory named |
| 6739 | anything other than ``${BPN}-${PV}``, or if the source code is |
| 6740 | 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] | 6741 | :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] | 6742 | to find the unpacked source. |
| 6743 | |
| 6744 | As an example, assume a :term:`Source Directory` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 6745 | top-level folder named ``poky`` and a default :term:`Build Directory` at |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6746 | ``poky/build``. In this case, the work directory the build system |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6747 | uses to keep the unpacked recipe for ``db`` is the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6748 | |
| 6749 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 |
| 6750 | |
| 6751 | The unpacked source code resides in the ``db-5.1.19`` folder. |
| 6752 | |
| 6753 | This next example assumes a Git repository. By default, Git |
| 6754 | repositories are cloned to ``${WORKDIR}/git`` during |
| 6755 | :ref:`ref-tasks-fetch`. Since this path is different |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6756 | 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] | 6757 | source can be located:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6758 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6759 | SRC_URI = "git://path/to/repo.git;branch=main" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6760 | S = "${WORKDIR}/git" |
| 6761 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6762 | :term:`SANITY_REQUIRED_UTILITIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6763 | Specifies a list of command-line utilities that should be checked for |
| 6764 | during the initial sanity checking process when running BitBake. If |
| 6765 | any of the utilities are not installed on the build host, then |
| 6766 | BitBake immediately exits with an error. |
| 6767 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6768 | :term:`SANITY_TESTED_DISTROS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6769 | A list of the host distribution identifiers that the build system has |
| 6770 | been tested against. Identifiers consist of the host distributor ID |
| 6771 | followed by the release, as reported by the ``lsb_release`` tool or |
| 6772 | as read from ``/etc/lsb-release``. Separate the list items with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6773 | explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6774 | not empty and the current value of |
| 6775 | :term:`NATIVELSBSTRING` does not appear in the |
| 6776 | list, then the build system reports a warning that indicates the |
| 6777 | current host distribution has not been tested as a build host. |
| 6778 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6779 | :term:`SDK_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6780 | The target architecture for the SDK. Typically, you do not directly |
| 6781 | set this variable. Instead, use :term:`SDKMACHINE`. |
| 6782 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 6783 | :term:`SDK_BUILDINFO_FILE` |
| 6784 | When using the :ref:`image-buildinfo <ref-classes-image-buildinfo>` class, |
| 6785 | specifies the file in the SDK to write the build information into. The |
| 6786 | default value is "``/buildinfo``". |
| 6787 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6788 | :term:`SDK_CUSTOM_TEMPLATECONF` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6789 | 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^] | 6790 | "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] | 6791 | (:term:`TOPDIR`) then this will be copied into the SDK. |
| 6792 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6793 | :term:`SDK_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6794 | The directory set up and used by the |
| 6795 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which |
| 6796 | the SDK is deployed. The ``populate_sdk_base`` class defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6797 | :term:`SDK_DEPLOY` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6798 | |
| 6799 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
| 6800 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6801 | :term:`SDK_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6802 | The parent directory used by the OpenEmbedded build system when |
| 6803 | creating SDK output. The |
| 6804 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6805 | the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6806 | |
| 6807 | SDK_DIR = "${WORKDIR}/sdk" |
| 6808 | |
| 6809 | .. note:: |
| 6810 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6811 | The :term:`SDK_DIR` directory is a temporary directory as it is part of |
| 6812 | :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6813 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6814 | :term:`SDK_EXT_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6815 | Controls whether or not shared state artifacts are copied into the |
| 6816 | extensible SDK. The default value of "full" copies all of the |
| 6817 | required shared state artifacts into the extensible SDK. The value |
| 6818 | "minimal" leaves these artifacts out of the SDK. |
| 6819 | |
| 6820 | .. note:: |
| 6821 | |
| 6822 | If you set the variable to "minimal", you need to ensure |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6823 | :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the |
| 6824 | artifacts to be fetched as needed. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6825 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6826 | :term:`SDK_HOST_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6827 | The manifest file for the host part of the SDK. This file lists all |
| 6828 | the installed packages that make up the host part of the SDK. The |
| 6829 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6830 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6831 | |
| 6832 | packagename packagearch version |
| 6833 | |
| 6834 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6835 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6836 | |
| 6837 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
| 6838 | |
| 6839 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6840 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6841 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6842 | :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6843 | When set to "1", specifies to include the packagedata for all recipes |
| 6844 | in the "world" target in the extensible SDK. Including this data |
| 6845 | allows the ``devtool search`` command to find these recipes in search |
| 6846 | results, as well as allows the ``devtool add`` command to map |
| 6847 | dependencies more effectively. |
| 6848 | |
| 6849 | .. note:: |
| 6850 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6851 | Enabling the :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6852 | variable significantly increases build time because all of world |
| 6853 | needs to be built. Enabling the variable also slightly increases |
| 6854 | the size of the extensible SDK. |
| 6855 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6856 | :term:`SDK_INCLUDE_TOOLCHAIN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6857 | When set to "1", specifies to include the toolchain in the extensible |
| 6858 | SDK. Including the toolchain is useful particularly when |
| 6859 | :term:`SDK_EXT_TYPE` is set to "minimal" to keep |
| 6860 | the SDK reasonably small but you still want to provide a usable |
| 6861 | toolchain. For example, suppose you want to use the toolchain from an |
| 6862 | IDE or from other tools and you do not want to perform additional |
| 6863 | steps to install the toolchain. |
| 6864 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6865 | The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if |
| 6866 | :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if |
| 6867 | :term:`SDK_EXT_TYPE` is set to "full". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6868 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6869 | :term:`SDK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6870 | The base name for SDK output files. The name is derived from the |
| 6871 | :term:`DISTRO`, :term:`TCLIBC`, |
| 6872 | :term:`SDK_ARCH`, |
| 6873 | :term:`IMAGE_BASENAME`, and |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6874 | :term:`TUNE_PKGARCH` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6875 | |
| 6876 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" |
| 6877 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6878 | :term:`SDK_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6879 | Specifies the operating system for which the SDK will be built. The |
| 6880 | default value is the value of :term:`BUILD_OS`. |
| 6881 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6882 | :term:`SDK_OUTPUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6883 | The location used by the OpenEmbedded build system when creating SDK |
| 6884 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6885 | class defines the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6886 | |
| 6887 | SDK_DIR = "${WORKDIR}/sdk" |
| 6888 | SDK_OUTPUT = "${SDK_DIR}/image" |
| 6889 | SDK_DEPLOY = "${DEPLOY_DIR}/sdk" |
| 6890 | |
| 6891 | .. note:: |
| 6892 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6893 | 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] | 6894 | :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is |
| 6895 | :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6896 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6897 | :term:`SDK_PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6898 | Specifies a list of architectures compatible with the SDK machine. |
| 6899 | This variable is set automatically and should not normally be |
| 6900 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6901 | 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] | 6902 | noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". |
| 6903 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6904 | :term:`SDK_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6905 | Specifies a list of functions to call once the OpenEmbedded build |
| 6906 | system creates the SDK. You can specify functions separated by |
| 6907 | semicolons: SDK_POSTPROCESS_COMMAND += "function; ... " |
| 6908 | |
| 6909 | If you need to pass an SDK path to a command within a function, you |
| 6910 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6911 | the OpenEmbedded build system when creating SDK output. See the |
| 6912 | :term:`SDK_DIR` variable for more information. |
| 6913 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6914 | :term:`SDK_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6915 | The toolchain binary prefix used for ``nativesdk`` recipes. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6916 | OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6917 | :term:`TARGET_PREFIX` when building |
| 6918 | ``nativesdk`` recipes. The default value is "${SDK_SYS}-". |
| 6919 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6920 | :term:`SDK_RECRDEP_TASKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6921 | A list of shared state tasks added to the extensible SDK. By default, |
| 6922 | the following tasks are added: |
| 6923 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 6924 | - :ref:`ref-tasks-populate_lic` |
| 6925 | - :ref:`ref-tasks-package_qa` |
| 6926 | - :ref:`ref-tasks-populate_sysroot` |
| 6927 | - :ref:`ref-tasks-deploy` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6928 | |
| 6929 | Despite the default value of "" for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6930 | :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6931 | 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] | 6932 | :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6933 | tasks that are needed in order to build |
| 6934 | :term:`SDK_TARGETS`). |
| 6935 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6936 | :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6937 | Specifies the system, including the architecture and the operating |
| 6938 | system, for which the SDK will be built. |
| 6939 | |
| 6940 | The OpenEmbedded build system automatically sets this variable based |
| 6941 | on :term:`SDK_ARCH`, |
| 6942 | :term:`SDK_VENDOR`, and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6943 | :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] | 6944 | variable yourself. |
| 6945 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6946 | :term:`SDK_TARGET_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6947 | The manifest file for the target part of the SDK. This file lists all |
| 6948 | the installed packages that make up the target part of the SDK. The |
| 6949 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6950 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6951 | |
| 6952 | packagename packagearch version |
| 6953 | |
| 6954 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6955 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6956 | |
| 6957 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
| 6958 | |
| 6959 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6960 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6961 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6962 | :term:`SDK_TARGETS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6963 | A list of targets to install from shared state as part of the |
| 6964 | standard or extensible SDK installation. The default value is "${PN}" |
| 6965 | (i.e. the image from which the SDK is built). |
| 6966 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6967 | The :term:`SDK_TARGETS` variable is an internal variable and typically |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6968 | would not be changed. |
| 6969 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6970 | :term:`SDK_TITLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6971 | The title to be printed when running the SDK installer. By default, |
| 6972 | this title is based on the :term:`DISTRO_NAME` or |
| 6973 | :term:`DISTRO` variable and is set in the |
| 6974 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6975 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6976 | |
| 6977 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
| 6978 | |
| 6979 | For the default distribution "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6980 | :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6981 | |
| 6982 | For information on how to change this default title, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6983 | ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6984 | section in the Yocto Project Application Development and the |
| 6985 | Extensible Software Development Kit (eSDK) manual. |
| 6986 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 6987 | :term:`SDK_TOOLCHAIN_LANGS` |
| 6988 | Specifies programming languages to support in the SDK, as a |
| 6989 | space-separated list. Currently supported items are ``rust`` and ``go``. |
| 6990 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6991 | :term:`SDK_UPDATE_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6992 | An optional URL for an update server for the extensible SDK. If set, |
| 6993 | the value is used as the default update server when running |
| 6994 | ``devtool sdk-update`` within the extensible SDK. |
| 6995 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6996 | :term:`SDK_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6997 | Specifies the name of the SDK vendor. |
| 6998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6999 | :term:`SDK_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7000 | Specifies the version of the SDK. The Poky distribution configuration file |
| 7001 | (``/meta-poky/conf/distro/poky.conf``) sets the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7002 | :term:`SDK_VERSION` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7003 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7004 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7005 | |
| 7006 | For additional information, see the |
| 7007 | :term:`DISTRO_VERSION` and |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 7008 | :term:`METADATA_REVISION` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7009 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7010 | :term:`SDKEXTPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7011 | The default installation directory for the Extensible SDK. By |
| 7012 | default, this directory is based on the :term:`DISTRO` |
| 7013 | variable and is set in the |
| 7014 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7015 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7016 | |
| 7017 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
| 7018 | |
| 7019 | For the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7020 | default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7021 | |
| 7022 | For information on how to change this default directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7023 | ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7024 | section in the Yocto Project Application Development and the |
| 7025 | Extensible Software Development Kit (eSDK) manual. |
| 7026 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7027 | :term:`SDKIMAGE_FEATURES` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7028 | Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7029 | the SDK generated from an image using the following command:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7030 | |
| 7031 | $ bitbake -c populate_sdk imagename |
| 7032 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7033 | :term:`SDKMACHINE` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7034 | The machine for which the SDK is built. In other words, the SDK is built |
| 7035 | such that it runs on the target you specify with the :term:`SDKMACHINE` |
| 7036 | value. The value points to a corresponding ``.conf`` file under |
| 7037 | ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``, |
| 7038 | ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are |
| 7039 | :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] | 7040 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7041 | The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the |
| 7042 | architecture of the build machine. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7043 | |
| 7044 | .. note:: |
| 7045 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7046 | You cannot set the :term:`SDKMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7047 | variable in your distribution configuration file. If you do, the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7048 | configuration will not take effect. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7049 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7050 | :term:`SDKPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7051 | Defines the path offered to the user for installation of the SDK that |
| 7052 | is generated by the OpenEmbedded build system. The path appears as |
| 7053 | the default location for installing the SDK when you run the SDK's |
| 7054 | installation script. You can override the offered path when you run |
| 7055 | the script. |
| 7056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7057 | :term:`SDKTARGETSYSROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7058 | The full path to the sysroot used for cross-compilation within an SDK |
| 7059 | as it will be when installed into the default |
| 7060 | :term:`SDKPATH`. |
| 7061 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7062 | :term:`SECTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7063 | The section in which packages should be categorized. Package |
| 7064 | management utilities can make use of this variable. |
| 7065 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7066 | :term:`SELECTED_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7067 | Specifies the optimization flags passed to the C compiler when |
| 7068 | building for the target. The flags are passed through the default |
| 7069 | value of the :term:`TARGET_CFLAGS` variable. |
| 7070 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7071 | The :term:`SELECTED_OPTIMIZATION` variable takes the value of |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 7072 | :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which |
| 7073 | case the value of :term:`DEBUG_OPTIMIZATION` is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7074 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7075 | :term:`SERIAL_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7076 | Defines a serial console (TTY) to enable using |
| 7077 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 7078 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7079 | separated by a space. You cannot specify more than one TTY device:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7080 | |
| 7081 | SERIAL_CONSOLE = "115200 ttyS0" |
| 7082 | |
| 7083 | .. note:: |
| 7084 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7085 | The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7086 | :term:`SERIAL_CONSOLES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7087 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7088 | :term:`SERIAL_CONSOLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7089 | Defines a serial console (TTY) to enable using |
| 7090 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 7091 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7092 | separated by a semicolon. Use spaces to separate multiple devices:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7093 | |
| 7094 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" |
| 7095 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7096 | :term:`SERIAL_CONSOLES_CHECK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7097 | Specifies serial consoles, which must be listed in |
| 7098 | :term:`SERIAL_CONSOLES`, to check against |
| 7099 | ``/proc/console`` before enabling them using getty. This variable |
| 7100 | allows aliasing in the format: <device>:<alias>. If a device was |
| 7101 | listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7102 | ``/proc/console``, you would do the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7103 | |
| 7104 | SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0" |
| 7105 | |
| 7106 | This variable is currently only supported with SysVinit (i.e. not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7107 | with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires |
| 7108 | ``/etc/inittab`` to be writable when used with SysVinit. This makes it |
| 7109 | incompatible with customizations such as the following:: |
| 7110 | |
| 7111 | EXTRA_IMAGE_FEATURES += "read-only-rootfs" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7112 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7113 | :term:`SETUPTOOLS_BUILD_ARGS` |
| 7114 | When used by recipes that inherit the |
| 7115 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can |
| 7116 | be used to specify additional arguments to be passed to ``setup.py build`` |
| 7117 | in the ``setuptools3_do_compile()`` task. |
| 7118 | |
| 7119 | :term:`SETUPTOOLS_INSTALL_ARGS` |
| 7120 | When used by recipes that inherit the |
| 7121 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can |
| 7122 | be used to specify additional arguments to be passed to ``setup.py install`` |
| 7123 | in the ``setuptools3_do_install()`` task. |
| 7124 | |
| 7125 | :term:`SETUPTOOLS_SETUP_PATH` |
| 7126 | When used by recipes that inherit the |
| 7127 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should |
| 7128 | be used to specify the directory in which the ``setup.py`` file is |
| 7129 | located if it is not at the root of the source tree (as specified by |
| 7130 | :term:`S`). For example, in a recipe where the sources are fetched from |
| 7131 | a Git repository and ``setup.py`` is in a ``python/pythonmodule`` |
| 7132 | subdirectory, you would have this:: |
| 7133 | |
| 7134 | S = "${WORKDIR}/git" |
| 7135 | SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule" |
| 7136 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7137 | :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7138 | A list of recipe dependencies that should not be used to determine |
| 7139 | signatures of tasks from one recipe when they depend on tasks from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7140 | another recipe. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7141 | |
| 7142 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" |
| 7143 | |
| 7144 | In the previous example, ``intone`` depends on ``mplayer2``. |
| 7145 | |
| 7146 | You can use the special token ``"*"`` on the left-hand side of the |
| 7147 | dependency to match all recipes except the one on the right-hand |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7148 | side. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7149 | |
| 7150 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" |
| 7151 | |
| 7152 | In the previous example, all recipes except ``quilt-native`` ignore |
| 7153 | task signatures from the ``quilt-native`` recipe when determining |
| 7154 | their task signatures. |
| 7155 | |
| 7156 | Use of this variable is one mechanism to remove dependencies that |
| 7157 | affect task signatures and thus force rebuilds when a recipe changes. |
| 7158 | |
| 7159 | .. note:: |
| 7160 | |
| 7161 | If you add an inappropriate dependency for a recipe relationship, |
| 7162 | the software might break during runtime if the interface of the |
| 7163 | second recipe was changed after the first recipe had been built. |
| 7164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7165 | :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7166 | A list of recipes that are completely stable and will never change. |
| 7167 | The ABI for the recipes in the list are presented by output from the |
| 7168 | tasks run to build the recipe. Use of this variable is one way to |
| 7169 | remove dependencies from one recipe on another that affect task |
| 7170 | signatures and thus force rebuilds when the recipe changes. |
| 7171 | |
| 7172 | .. note:: |
| 7173 | |
| 7174 | If you add an inappropriate variable to this list, the software |
| 7175 | might break at runtime if the interface of the recipe was changed |
| 7176 | after the other had been built. |
| 7177 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7178 | :term:`SITEINFO_BITS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7179 | Specifies the number of bits for the target system CPU. The value |
| 7180 | should be either "32" or "64". |
| 7181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7182 | :term:`SITEINFO_ENDIANNESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7183 | Specifies the endian byte order of the target system. The value |
| 7184 | should be either "le" for little-endian or "be" for big-endian. |
| 7185 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7186 | :term:`SKIP_FILEDEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7187 | Enables removal of all files from the "Provides" section of an RPM |
| 7188 | package. Removal of these files is required for packages containing |
| 7189 | prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. |
| 7190 | |
| 7191 | To enable file removal, set the variable to "1" in your |
| 7192 | ``conf/local.conf`` configuration file in your: |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 7193 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7194 | |
| 7195 | SKIP_FILEDEPS = "1" |
| 7196 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7197 | :term:`SKIP_RECIPE` |
| 7198 | Used to prevent the OpenEmbedded build system from building a given |
| 7199 | recipe. Specify the :term:`PN` value as a variable flag (``varflag``) |
| 7200 | and provide a reason, which will be reported when attempting to |
| 7201 | build the recipe. |
| 7202 | |
| 7203 | To prevent a recipe from being built, use the :term:`SKIP_RECIPE` |
| 7204 | variable in your ``local.conf`` file or distribution configuration. |
| 7205 | Here is an example which prevents ``myrecipe`` from being built:: |
| 7206 | |
| 7207 | SKIP_RECIPE[myrecipe] = "Not supported by our organization." |
| 7208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7209 | :term:`SOC_FAMILY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7210 | Groups together machines based upon the same family of SOC (System On |
| 7211 | Chip). You typically set this variable in a common ``.inc`` file that |
| 7212 | you include in the configuration files of all the machines. |
| 7213 | |
| 7214 | .. note:: |
| 7215 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7216 | You must include ``conf/machine/include/soc-family.inc`` for this |
| 7217 | variable to appear in :term:`MACHINEOVERRIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7218 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7219 | :term:`SOLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7220 | Defines the suffix for shared libraries used on the target platform. |
| 7221 | By default, this suffix is ".so.*" for all Linux-based systems and is |
| 7222 | defined in the ``meta/conf/bitbake.conf`` configuration file. |
| 7223 | |
| 7224 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7225 | ``FILES:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7226 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7227 | :term:`SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7228 | Defines the suffix for the development symbolic link (symlink) for |
| 7229 | shared libraries on the target platform. By default, this suffix is |
| 7230 | ".so" for Linux-based systems and is defined in the |
| 7231 | ``meta/conf/bitbake.conf`` configuration file. |
| 7232 | |
| 7233 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7234 | ``FILES:${PN}-dev``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7235 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 7236 | :term:`SOURCE_DATE_EPOCH` |
| 7237 | This defines a date expressed in number of seconds since |
| 7238 | the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by |
| 7239 | multiple build systems to force a timestamp in built binaries. |
| 7240 | Many upstream projects already support this variable. |
| 7241 | |
| 7242 | You will find more details in the `official specifications |
| 7243 | <https://reproducible-builds.org/specs/source-date-epoch/>`__. |
| 7244 | |
| 7245 | A value for each recipe is computed from the sources by |
| 7246 | :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`. |
| 7247 | |
| 7248 | If a recipe wishes to override the default behavior, it should set its |
| 7249 | own :term:`SOURCE_DATE_EPOCH` value:: |
| 7250 | |
| 7251 | SOURCE_DATE_EPOCH = "1613559011" |
| 7252 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7253 | :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7254 | 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] | 7255 | creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7256 | your ``local.conf`` configuration file ensures the source for all |
| 7257 | recipes are fetched regardless of whether or not a recipe is |
| 7258 | compatible with the configuration. A recipe is considered |
| 7259 | incompatible with the currently configured machine when either or |
| 7260 | both the :term:`COMPATIBLE_MACHINE` |
| 7261 | variable and :term:`COMPATIBLE_HOST` variables |
| 7262 | specify compatibility with a machine other than that of the current |
| 7263 | machine or host. |
| 7264 | |
| 7265 | .. note:: |
| 7266 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7267 | Do not set the :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7268 | variable unless you are creating a source mirror. In other words, |
| 7269 | do not set the variable during a normal build. |
| 7270 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7271 | :term:`SOURCE_MIRROR_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7272 | Defines your own :term:`PREMIRRORS` from which to |
| 7273 | first fetch source before attempting to fetch from the upstream |
| 7274 | specified in :term:`SRC_URI`. |
| 7275 | |
| 7276 | To use this variable, you must globally inherit the |
| 7277 | :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7278 | the URL to your mirrors. Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7279 | |
| 7280 | INHERIT += "own-mirrors" |
| 7281 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" |
| 7282 | |
| 7283 | .. note:: |
| 7284 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7285 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7286 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7287 | :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7288 | Maps commonly used license names to their SPDX counterparts found in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7289 | ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7290 | mappings, see the ``meta/conf/licenses.conf`` file. |
| 7291 | |
| 7292 | For additional information, see the :term:`LICENSE` |
| 7293 | variable. |
| 7294 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7295 | :term:`SPECIAL_PKGSUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7296 | A list of prefixes for :term:`PN` used by the OpenEmbedded |
| 7297 | build system to create variants of recipes or packages. The list |
| 7298 | specifies the prefixes to strip off during certain circumstances such |
| 7299 | as the generation of the :term:`BPN` variable. |
| 7300 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7301 | :term:`SPL_BINARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7302 | The file type for the Secondary Program Loader (SPL). Some devices |
| 7303 | use an SPL from which to boot (e.g. the BeagleBone development |
| 7304 | board). For such cases, you can declare the file type of the SPL |
| 7305 | binary in the ``u-boot.inc`` include file, which is used in the |
| 7306 | U-Boot recipe. |
| 7307 | |
| 7308 | 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] | 7309 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7310 | |
| 7311 | # Some versions of u-boot build an SPL (Second Program Loader) image that |
| 7312 | # should be packaged along with the u-boot binary as well as placed in the |
| 7313 | # deploy directory. For those versions they can set the following variables |
| 7314 | # to allow packaging the SPL. |
| 7315 | SPL_BINARY ?= "" |
| 7316 | SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" |
| 7317 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" |
| 7318 | SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" |
| 7319 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7320 | The :term:`SPL_BINARY` variable helps form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7321 | various ``SPL_*`` variables used by the OpenEmbedded build system. |
| 7322 | |
| 7323 | See the BeagleBone machine configuration example in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7324 | ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7325 | section in the Yocto Project Board Support Package Developer's Guide |
| 7326 | for additional information. |
| 7327 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7328 | :term:`SRC_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7329 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7330 | See the BitBake manual for the initial description for this variable: |
| 7331 | :term:`bitbake:SRC_URI`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7332 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7333 | The following features are added by OpenEmbedded and the Yocto Project. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7334 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7335 | There are standard and recipe-specific options. Here are standard ones: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7336 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7337 | - ``apply`` --- whether to apply the patch or not. The default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7338 | action is to apply the patch. |
| 7339 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7340 | - ``striplevel`` --- which striplevel to use when applying the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7341 | patch. The default level is 1. |
| 7342 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7343 | - ``patchdir`` --- specifies the directory in which the patch should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7344 | be applied. The default is ``${``\ :term:`S`\ ``}``. |
| 7345 | |
| 7346 | Here are options specific to recipes building code from a revision |
| 7347 | control system: |
| 7348 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7349 | - ``mindate`` --- apply the patch only if |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7350 | :term:`SRCDATE` is equal to or greater than |
| 7351 | ``mindate``. |
| 7352 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7353 | - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7354 | than ``maxdate``. |
| 7355 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7356 | - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7357 | greater than ``minrev``. |
| 7358 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7359 | - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7360 | than ``maxrev``. |
| 7361 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7362 | - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7363 | ``rev``. |
| 7364 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7365 | - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7366 | ``rev``. |
| 7367 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7368 | .. note:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7369 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7370 | If you want the build system to pick up files specified through |
| 7371 | a :term:`SRC_URI` statement from your append file, you need to be |
| 7372 | sure to extend the :term:`FILESPATH` variable by also using the |
| 7373 | :term:`FILESEXTRAPATHS` variable from within your append file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7374 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7375 | :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7376 | By default, the OpenEmbedded build system automatically detects |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7377 | whether :term:`SRC_URI` contains files that are machine-specific. If so, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7378 | the build system automatically changes :term:`PACKAGE_ARCH`. Setting this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7379 | variable to "0" disables this behavior. |
| 7380 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7381 | :term:`SRCDATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7382 | The date of the source code used to build the package. This variable |
| 7383 | applies only if the source was fetched from a Source Code Manager |
| 7384 | (SCM). |
| 7385 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7386 | :term:`SRCPV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7387 | Returns the version string of the current package. This string is |
| 7388 | used to help define the value of :term:`PV`. |
| 7389 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7390 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7391 | configuration file in the :term:`Source Directory` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7392 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7393 | |
| 7394 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
| 7395 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7396 | Recipes that need to define :term:`PV` do so with the help of the |
| 7397 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7398 | located in ``meta/recipes-connectivity`` in the Source Directory |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7399 | defines :term:`PV` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7400 | |
| 7401 | PV = "0.12-git${SRCPV}" |
| 7402 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7403 | :term:`SRCREV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7404 | The revision of the source code used to build the package. This |
| 7405 | variable applies to Subversion, Git, Mercurial, and Bazaar only. Note |
| 7406 | that if you want to build a fixed revision and you want to avoid |
| 7407 | performing a query on the remote repository every time BitBake parses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7408 | your recipe, you should specify a :term:`SRCREV` that is a full revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7409 | identifier and not just a tag. |
| 7410 | |
| 7411 | .. note:: |
| 7412 | |
| 7413 | For information on limitations when inheriting the latest revision |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7414 | of software using :term:`SRCREV`, see the :term:`AUTOREV` variable |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7415 | description and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7416 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7417 | section, which is in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7418 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7419 | :term:`SRCTREECOVEREDTASKS` |
| 7420 | A list of tasks that are typically not relevant (and therefore skipped) |
| 7421 | when building using the :ref:`externalsrc <ref-classes-externalsrc>` |
| 7422 | class. The default value as set in that class file is the set of tasks |
| 7423 | that are rarely needed when using external source:: |
| 7424 | |
| 7425 | SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" |
| 7426 | |
| 7427 | The notable exception is when processing external kernel source as |
| 7428 | defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 7429 | class file (formatted for aesthetics):: |
| 7430 | |
| 7431 | SRCTREECOVEREDTASKS += "\ |
| 7432 | do_validate_branches \ |
| 7433 | do_kernel_configcheck \ |
| 7434 | do_kernel_checkout \ |
| 7435 | do_fetch \ |
| 7436 | do_unpack \ |
| 7437 | do_patch \ |
| 7438 | " |
| 7439 | |
| 7440 | See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` |
| 7441 | variables for more information. |
| 7442 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7443 | :term:`SSTATE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7444 | The directory for the shared state cache. |
| 7445 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7446 | :term:`SSTATE_EXCLUDEDEPS_SYSROOT` |
| 7447 | This variable allows to specify indirect dependencies to exclude |
| 7448 | from sysroots, for example to avoid the situations when a dependency on |
| 7449 | any ``-native`` recipe will pull in all dependencies of that recipe |
| 7450 | in the recipe sysroot. This behaviour might not always be wanted, |
| 7451 | for example when that ``-native`` recipe depends on build tools |
| 7452 | that are not relevant for the current recipe. |
| 7453 | |
| 7454 | This way, irrelevant dependencies are ignored, which could have |
| 7455 | prevented the reuse of prebuilt artifacts stored in the Shared |
| 7456 | State Cache. |
| 7457 | |
| 7458 | ``SSTATE_EXCLUDEDEPS_SYSROOT`` is evaluated as two regular |
| 7459 | expressions of recipe and dependency to ignore. An example |
| 7460 | is the rule in :oe_git:`meta/conf/layer.conf </meta/conf/layer.conf>`:: |
| 7461 | |
| 7462 | # Nothing needs to depend on libc-initial |
| 7463 | # base-passwd/shadow-sysroot don't need their dependencies |
| 7464 | SSTATE_EXCLUDEDEPS_SYSROOT += "\ |
| 7465 | .*->.*-initial.* \ |
| 7466 | .*(base-passwd|shadow-sysroot)->.* \ |
| 7467 | " |
| 7468 | |
| 7469 | The ``->`` substring represents the dependency between |
| 7470 | the two regular expressions. |
| 7471 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7472 | :term:`SSTATE_MIRROR_ALLOW_NETWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7473 | If set to "1", allows fetches from mirrors that are specified in |
| 7474 | :term:`SSTATE_MIRRORS` to work even when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7475 | fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to |
| 7476 | "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if |
| 7477 | 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] | 7478 | your shared state cache, but you want to disable any other fetching |
| 7479 | from the network. |
| 7480 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7481 | :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7482 | Configures the OpenEmbedded build system to search other mirror |
| 7483 | locations for prebuilt cache data objects before building out the |
| 7484 | data. This variable works like fetcher :term:`MIRRORS` |
| 7485 | and :term:`PREMIRRORS` and points to the cache |
| 7486 | locations to check for the shared state (sstate) objects. |
| 7487 | |
| 7488 | You can specify a filesystem directory or a remote URL such as HTTP |
| 7489 | or FTP. The locations you specify need to contain the shared state |
| 7490 | cache (sstate-cache) results from previous builds. The sstate-cache |
| 7491 | you point to can also be from builds on other machines. |
| 7492 | |
| 7493 | When pointing to sstate build artifacts on another machine that uses |
| 7494 | a different GCC version for native builds, you must configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7495 | :term:`SSTATE_MIRRORS` with a regular expression that maps local search |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7496 | paths to server paths. The paths need to take into account |
| 7497 | :term:`NATIVELSBSTRING` set by the |
| 7498 | :ref:`uninative <ref-classes-uninative>` class. For example, the |
| 7499 | following maps the local search path ``universal-4.9`` to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7500 | server-provided path server_url_sstate_path:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7501 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7502 | 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] | 7503 | |
| 7504 | If a mirror uses the same structure as |
| 7505 | :term:`SSTATE_DIR`, you need to add "PATH" at the |
| 7506 | end as shown in the examples below. The build system substitutes the |
| 7507 | correct path within the directory structure. |
| 7508 | :: |
| 7509 | |
| 7510 | SSTATE_MIRRORS ?= "\ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7511 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7512 | file://.* file:///some-local-dir/sstate/PATH" |
| 7513 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7514 | :term:`SSTATE_SCAN_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7515 | Controls the list of files the OpenEmbedded build system scans for |
| 7516 | hardcoded installation paths. The variable uses a space-separated |
| 7517 | list of filenames (not paths) with standard wildcard characters |
| 7518 | allowed. |
| 7519 | |
| 7520 | During a build, the OpenEmbedded build system creates a shared state |
| 7521 | (sstate) object during the first stage of preparing the sysroots. |
| 7522 | That object is scanned for hardcoded paths for original installation |
| 7523 | locations. The list of files that are scanned for paths is controlled |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7524 | by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files |
| 7525 | 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] | 7526 | than the variable being comprehensively set. The |
| 7527 | :ref:`sstate <ref-classes-sstate>` class specifies the default list |
| 7528 | of files. |
| 7529 | |
| 7530 | For details on the process, see the |
| 7531 | :ref:`staging <ref-classes-staging>` class. |
| 7532 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7533 | :term:`STAGING_BASE_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7534 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7535 | directory for the build host. |
| 7536 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7537 | :term:`STAGING_BASELIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7538 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7539 | directory for the target for which the current recipe is being built |
| 7540 | (:term:`STAGING_DIR_HOST`). |
| 7541 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7542 | :term:`STAGING_BINDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7543 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7544 | directory for the target for which the current recipe is being built |
| 7545 | (:term:`STAGING_DIR_HOST`). |
| 7546 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7547 | :term:`STAGING_BINDIR_CROSS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7548 | Specifies the path to the directory containing binary configuration |
| 7549 | scripts. These scripts provide configuration information for other |
| 7550 | software that wants to make use of libraries or include files |
| 7551 | provided by the software associated with the script. |
| 7552 | |
| 7553 | .. note:: |
| 7554 | |
| 7555 | This style of build configuration has been largely replaced by |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7556 | ``pkg-config``. Consequently, if ``pkg-config`` is supported by the |
| 7557 | library to which you are linking, it is recommended you use |
| 7558 | ``pkg-config`` instead of a provided configuration script. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7559 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7560 | :term:`STAGING_BINDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7561 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7562 | directory for the build host. |
| 7563 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7564 | :term:`STAGING_DATADIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7565 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7566 | directory for the target for which the current recipe is being built |
| 7567 | (:term:`STAGING_DIR_HOST`). |
| 7568 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7569 | :term:`STAGING_DATADIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7570 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7571 | directory for the build host. |
| 7572 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7573 | :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7574 | Helps construct the ``recipe-sysroots`` directory, which is used |
| 7575 | during packaging. |
| 7576 | |
| 7577 | For information on how staging for recipe-specific sysroots occurs, |
| 7578 | see the :ref:`ref-tasks-populate_sysroot` |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7579 | task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7580 | section in the Yocto Project Development Tasks Manual, the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7581 | ":ref:`overview-manual/concepts:configuration, compilation, and staging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7582 | section in the Yocto Project Overview and Concepts Manual, and the |
| 7583 | :term:`SYSROOT_DIRS` variable. |
| 7584 | |
| 7585 | .. note:: |
| 7586 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7587 | Recipes should never write files directly under the :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7588 | directory because the OpenEmbedded build system manages the |
| 7589 | directory automatically. Instead, files should be installed to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7590 | ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7591 | task and then the OpenEmbedded build system will stage a subset of |
| 7592 | those files into the sysroot. |
| 7593 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7594 | :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7595 | Specifies the path to the sysroot directory for the system on which |
| 7596 | the component is built to run (the system that hosts the component). |
| 7597 | For most recipes, this sysroot is the one in which that recipe's |
| 7598 | :ref:`ref-tasks-populate_sysroot` task copies |
| 7599 | files. Exceptions include ``-native`` recipes, where the |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 7600 | :ref:`ref-tasks-populate_sysroot` task instead uses |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7601 | :term:`STAGING_DIR_NATIVE`. Depending on |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7602 | 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] | 7603 | have the following values: |
| 7604 | |
| 7605 | - For recipes building for the target machine, the value is |
| 7606 | "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". |
| 7607 | |
| 7608 | - For native recipes building for the build host, the value is empty |
| 7609 | given the assumption that when building for the build host, the |
| 7610 | build host's own directories should be used. |
| 7611 | |
| 7612 | .. note:: |
| 7613 | |
| 7614 | ``-native`` recipes are not installed into host paths like such |
| 7615 | as ``/usr``. Rather, these recipes are installed into |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7616 | :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7617 | standard build environment variables such as |
| 7618 | :term:`CPPFLAGS` and |
| 7619 | :term:`CFLAGS` are set up so that both host paths |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7620 | and :term:`STAGING_DIR_NATIVE` are searched for libraries and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7621 | headers using, for example, GCC's ``-isystem`` option. |
| 7622 | |
| 7623 | Thus, the emphasis is that the ``STAGING_DIR*`` variables |
| 7624 | should be viewed as input variables by tasks such as |
| 7625 | :ref:`ref-tasks-configure`, |
| 7626 | :ref:`ref-tasks-compile`, and |
| 7627 | :ref:`ref-tasks-install`. Having the real system |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7628 | root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7629 | for ``-native`` recipes, as they make use of host headers and |
| 7630 | libraries. |
| 7631 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7632 | :term:`STAGING_DIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7633 | Specifies the path to the sysroot directory used when building |
| 7634 | components that run on the build host itself. |
| 7635 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7636 | :term:`STAGING_DIR_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7637 | Specifies the path to the sysroot used for the system for which the |
| 7638 | component generates code. For components that do not generate code, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7639 | which is the majority, :term:`STAGING_DIR_TARGET` is set to match |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7640 | :term:`STAGING_DIR_HOST`. |
| 7641 | |
| 7642 | Some recipes build binaries that can run on the target system but |
| 7643 | those binaries in turn generate code for another different system |
| 7644 | (e.g. cross-canadian recipes). Using terminology from GNU, the |
| 7645 | primary system is referred to as the "HOST" and the secondary, or |
| 7646 | different, system is referred to as the "TARGET". Thus, the binaries |
| 7647 | run on the "HOST" system and generate binaries for the "TARGET" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7648 | system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used |
| 7649 | for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7650 | sysroot used for the "TARGET" system. |
| 7651 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7652 | :term:`STAGING_ETCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7653 | Specifies the path to the ``/etc`` subdirectory of the sysroot |
| 7654 | directory for the build host. |
| 7655 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7656 | :term:`STAGING_EXECPREFIXDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7657 | Specifies the path to the ``/usr`` subdirectory of the sysroot |
| 7658 | directory for the target for which the current recipe is being built |
| 7659 | (:term:`STAGING_DIR_HOST`). |
| 7660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7661 | :term:`STAGING_INCDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7662 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7663 | sysroot directory for the target for which the current recipe being |
| 7664 | built (:term:`STAGING_DIR_HOST`). |
| 7665 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7666 | :term:`STAGING_INCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7667 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7668 | sysroot directory for the build host. |
| 7669 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7670 | :term:`STAGING_KERNEL_BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7671 | Points to the directory containing the kernel build artifacts. |
| 7672 | Recipes building software that needs to access kernel build artifacts |
| 7673 | (e.g. ``systemtap-uprobes``) can look in the directory specified with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7674 | the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7675 | after the kernel has been built. |
| 7676 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7677 | :term:`STAGING_KERNEL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7678 | The directory with kernel headers that are required to build |
| 7679 | out-of-tree modules. |
| 7680 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7681 | :term:`STAGING_LIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7682 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7683 | directory for the target for which the current recipe is being built |
| 7684 | (:term:`STAGING_DIR_HOST`). |
| 7685 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7686 | :term:`STAGING_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7687 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7688 | directory for the build host. |
| 7689 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7690 | :term:`STAMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7691 | Specifies the base path used to create recipe stamp files. The path |
| 7692 | to an actual stamp file is constructed by evaluating this string and |
| 7693 | then appending additional information. Currently, the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7694 | assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7695 | file is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7696 | |
| 7697 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 7698 | |
| 7699 | For information on how BitBake uses stamp files to determine if a |
| 7700 | task should be rerun, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7701 | ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7702 | section in the Yocto Project Overview and Concepts Manual. |
| 7703 | |
| 7704 | See :term:`STAMPS_DIR`, |
| 7705 | :term:`MULTIMACH_TARGET_SYS`, |
| 7706 | :term:`PN`, :term:`EXTENDPE`, |
| 7707 | :term:`PV`, and :term:`PR` for related variable |
| 7708 | information. |
| 7709 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7710 | :term:`STAMPS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7711 | Specifies the base directory in which the OpenEmbedded build system |
| 7712 | places stamps. The default directory is ``${TMPDIR}/stamps``. |
| 7713 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7714 | :term:`STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7715 | The minimal command and arguments to run ``strip``, which is used to |
| 7716 | strip symbols. |
| 7717 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7718 | :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7719 | The short (72 characters or less) summary of the binary package for |
| 7720 | packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7721 | :term:`SUMMARY` is used to define the |
| 7722 | :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7723 | not set in the recipe. |
| 7724 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7725 | :term:`SVNDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7726 | The directory in which files checked out of a Subversion system are |
| 7727 | stored. |
| 7728 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7729 | :term:`SYSLINUX_DEFAULT_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7730 | Specifies the kernel boot default console. If you want to use a |
| 7731 | console other than the default, set this variable in your recipe as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7732 | follows where "X" is the console number you want to use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7733 | |
| 7734 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" |
| 7735 | |
| 7736 | The :ref:`syslinux <ref-classes-syslinux>` class initially sets |
| 7737 | this variable to null but then checks for a value later. |
| 7738 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7739 | :term:`SYSLINUX_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7740 | Lists additional options to add to the syslinux file. You need to set |
| 7741 | this variable in your recipe. If you want to list multiple options, |
| 7742 | separate the options with a semicolon character (``;``). |
| 7743 | |
| 7744 | The :ref:`syslinux <ref-classes-syslinux>` class uses this variable |
| 7745 | to create a set of options. |
| 7746 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7747 | :term:`SYSLINUX_SERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7748 | Specifies the alternate serial port or turns it off. To turn off |
| 7749 | serial, set this variable to an empty string in your recipe. The |
| 7750 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7751 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7752 | |
| 7753 | SYSLINUX_SERIAL ?= "0 115200" |
| 7754 | |
| 7755 | The class checks for and uses the variable as needed. |
| 7756 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7757 | :term:`SYSLINUX_SERIAL_TTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7758 | Specifies the alternate console=tty... kernel boot argument. The |
| 7759 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7760 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7761 | |
| 7762 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
| 7763 | |
| 7764 | The class checks for and uses the variable as needed. |
| 7765 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7766 | :term:`SYSLINUX_SPLASH` |
| 7767 | An ``.LSS`` file used as the background for the VGA boot menu when |
| 7768 | you use the boot menu. You need to set this variable in your recipe. |
| 7769 | |
| 7770 | The :ref:`syslinux <ref-classes-syslinux>` class checks for this |
| 7771 | variable and if found, the OpenEmbedded build system installs the |
| 7772 | splash screen. |
| 7773 | |
| 7774 | :term:`SYSROOT_DESTDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7775 | Points to the temporary directory under the work directory (default |
| 7776 | "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") |
| 7777 | where the files populated into the sysroot are assembled during the |
| 7778 | :ref:`ref-tasks-populate_sysroot` task. |
| 7779 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7780 | :term:`SYSROOT_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7781 | Directories that are staged into the sysroot by the |
| 7782 | :ref:`ref-tasks-populate_sysroot` task. By |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7783 | default, the following directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7784 | |
| 7785 | SYSROOT_DIRS = " \ |
| 7786 | ${includedir} \ |
| 7787 | ${libdir} \ |
| 7788 | ${base_libdir} \ |
| 7789 | ${nonarch_base_libdir} \ |
| 7790 | ${datadir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7791 | /sysroot-only \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7792 | " |
| 7793 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7794 | :term:`SYSROOT_DIRS_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7795 | Directories that are not staged into the sysroot by the |
| 7796 | :ref:`ref-tasks-populate_sysroot` task. You |
| 7797 | can use this variable to exclude certain subdirectories of |
| 7798 | directories listed in :term:`SYSROOT_DIRS` from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7799 | staging. By default, the following directories are not staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7800 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7801 | SYSROOT_DIRS_IGNORE = " \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7802 | ${mandir} \ |
| 7803 | ${docdir} \ |
| 7804 | ${infodir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7805 | ${datadir}/X11/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7806 | ${datadir}/applications \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7807 | ${datadir}/bash-completion \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7808 | ${datadir}/fonts \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7809 | ${datadir}/gtk-doc/html \ |
| 7810 | ${datadir}/installed-tests \ |
| 7811 | ${datadir}/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7812 | ${datadir}/pixmaps \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7813 | ${datadir}/terminfo \ |
| 7814 | ${libdir}/${BPN}/ptest \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7815 | " |
| 7816 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7817 | :term:`SYSROOT_DIRS_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7818 | Extra directories staged into the sysroot by the |
| 7819 | :ref:`ref-tasks-populate_sysroot` task for |
| 7820 | ``-native`` recipes, in addition to those specified in |
| 7821 | :term:`SYSROOT_DIRS`. By default, the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7822 | extra directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7823 | |
| 7824 | SYSROOT_DIRS_NATIVE = " \ |
| 7825 | ${bindir} \ |
| 7826 | ${sbindir} \ |
| 7827 | ${base_bindir} \ |
| 7828 | ${base_sbindir} \ |
| 7829 | ${libexecdir} \ |
| 7830 | ${sysconfdir} \ |
| 7831 | ${localstatedir} \ |
| 7832 | " |
| 7833 | |
| 7834 | .. note:: |
| 7835 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7836 | Programs built by ``-native`` recipes run directly from the sysroot |
| 7837 | (:term:`STAGING_DIR_NATIVE`), which is why additional directories |
| 7838 | containing program executables and supporting files need to be staged. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7839 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7840 | :term:`SYSROOT_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7841 | A list of functions to execute after files are staged into the |
| 7842 | sysroot. These functions are usually used to apply additional |
| 7843 | processing on the staged files, or to stage additional files. |
| 7844 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7845 | :term:`SYSTEMD_AUTO_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7846 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7847 | this variable specifies whether the specified service in |
| 7848 | :term:`SYSTEMD_SERVICE` should start |
| 7849 | automatically or not. By default, the service is enabled to |
| 7850 | automatically start at boot time. The default setting is in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7851 | :ref:`systemd <ref-classes-systemd>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7852 | |
| 7853 | SYSTEMD_AUTO_ENABLE ??= "enable" |
| 7854 | |
| 7855 | You can disable the service by setting the variable to "disable". |
| 7856 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7857 | :term:`SYSTEMD_BOOT_CFG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7858 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7859 | "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7860 | configuration file that should be used. By default, the |
| 7861 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7862 | :term:`SYSTEMD_BOOT_CFG` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7863 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 7864 | SYSTEMD_BOOT_CFG ?= "${S}/loader.conf" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7865 | |
| 7866 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7867 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7868 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7869 | :term:`SYSTEMD_BOOT_ENTRIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7870 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7871 | "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7872 | list of entry files (``*.conf``) to install that contain one boot |
| 7873 | entry per file. By default, the |
| 7874 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7875 | :term:`SYSTEMD_BOOT_ENTRIES` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7876 | |
| 7877 | SYSTEMD_BOOT_ENTRIES ?= "" |
| 7878 | |
| 7879 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7880 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7881 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7882 | :term:`SYSTEMD_BOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7883 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7884 | "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7885 | boot menu timeout in seconds. By default, the |
| 7886 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7887 | :term:`SYSTEMD_BOOT_TIMEOUT` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7888 | |
| 7889 | SYSTEMD_BOOT_TIMEOUT ?= "10" |
| 7890 | |
| 7891 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7892 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7893 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7894 | :term:`SYSTEMD_DEFAULT_TARGET` |
| 7895 | |
| 7896 | This variable allows to set the default unit that systemd starts at bootup. |
| 7897 | Usually, this is either ``multi-user.target`` or ``graphical.target``. |
| 7898 | This works by creating a ``default.target`` symbolic link to the chosen systemd |
| 7899 | target file. |
| 7900 | |
| 7901 | See `systemd's documentation |
| 7902 | <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__ |
| 7903 | for details. |
| 7904 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 7905 | For example, this variable is used in the :oe_git:`core-image-minimal-xfce.bb |
| 7906 | </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] | 7907 | recipe:: |
| 7908 | |
| 7909 | SYSTEMD_DEFAULT_TARGET = "graphical.target" |
| 7910 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7911 | :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7912 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7913 | this variable locates the systemd unit files when they are not found |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7914 | in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7915 | variable is set such that the systemd unit files are assumed to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7916 | reside in the recipes main package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7917 | |
| 7918 | SYSTEMD_PACKAGES ?= "${PN}" |
| 7919 | |
| 7920 | 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] | 7921 | 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] | 7922 | the build system can find the systemd unit files. |
| 7923 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7924 | :term:`SYSTEMD_SERVICE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7925 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7926 | this variable specifies the systemd service name for a package. |
| 7927 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7928 | Multiple services can be specified, each one separated by a space. |
| 7929 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7930 | When you specify this file in your recipe, use a package name |
| 7931 | override to indicate the package to which the value applies. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7932 | an example from the connman recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7933 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7934 | SYSTEMD_SERVICE:${PN} = "connman.service" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7935 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7936 | The package overrides that can be specified are directly related to the value of |
| 7937 | term:`SYSTEMD_PACKAGES`. Overrides not included in term:`SYSTEMD_PACKAGES` |
| 7938 | will be silently ignored. |
| 7939 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7940 | :term:`SYSVINIT_ENABLED_GETTYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7941 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7942 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7943 | specifies a space-separated list of the virtual terminals that should |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7944 | run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7945 | (allowing login), assuming :term:`USE_VT` is not set to |
| 7946 | "0". |
| 7947 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7948 | 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] | 7949 | run a getty on the first virtual terminal). |
| 7950 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7951 | :term:`T` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7952 | This variable points to a directory were BitBake places temporary |
| 7953 | files, which consist mostly of task logs and scripts, when building a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7954 | particular recipe. The variable is typically set as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7955 | |
| 7956 | T = "${WORKDIR}/temp" |
| 7957 | |
| 7958 | The :term:`WORKDIR` is the directory into which |
| 7959 | BitBake unpacks and builds the recipe. The default ``bitbake.conf`` |
| 7960 | file sets this variable. |
| 7961 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7962 | The :term:`T` variable is not to be confused with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7963 | :term:`TMPDIR` variable, which points to the root of |
| 7964 | the directory tree where BitBake places the output of an entire |
| 7965 | build. |
| 7966 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7967 | :term:`TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7968 | The target machine's architecture. The OpenEmbedded build system |
| 7969 | supports many architectures. Here is an example list of architectures |
| 7970 | supported. This list is by no means complete as the architecture is |
| 7971 | configurable: |
| 7972 | |
| 7973 | - arm |
| 7974 | - i586 |
| 7975 | - x86_64 |
| 7976 | - powerpc |
| 7977 | - powerpc64 |
| 7978 | - mips |
| 7979 | - mipsel |
| 7980 | |
| 7981 | For additional information on machine architectures, see the |
| 7982 | :term:`TUNE_ARCH` variable. |
| 7983 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7984 | :term:`TARGET_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7985 | Specifies architecture-specific assembler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7986 | system. :term:`TARGET_AS_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7987 | :term:`TUNE_ASARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7988 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7989 | |
| 7990 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
| 7991 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7992 | :term:`TARGET_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7993 | Specifies architecture-specific C compiler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7994 | system. :term:`TARGET_CC_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7995 | :term:`TUNE_CCARGS` by default. |
| 7996 | |
| 7997 | .. note:: |
| 7998 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7999 | It is a common workaround to append :term:`LDFLAGS` to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8000 | :term:`TARGET_CC_ARCH` in recipes that build software for the target that |
| 8001 | would not otherwise respect the exported :term:`LDFLAGS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8002 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8003 | :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8004 | This is a specific kernel compiler flag for a CPU or Application |
| 8005 | Binary Interface (ABI) tune. The flag is used rarely and only for |
| 8006 | cases where a userspace :term:`TUNE_CCARGS` is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8007 | compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8008 | variable allows the kernel (and associated modules) to use a |
| 8009 | different configuration. See the |
| 8010 | ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the |
| 8011 | :term:`Source Directory` for an example. |
| 8012 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8013 | :term:`TARGET_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8014 | Specifies the flags to pass to the C compiler when building for the |
| 8015 | target. When building in the target context, |
| 8016 | :term:`CFLAGS` is set to the value of this variable by |
| 8017 | default. |
| 8018 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8019 | Additionally, the SDK's environment setup script sets the :term:`CFLAGS` |
| 8020 | variable in the environment to the :term:`TARGET_CFLAGS` value so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8021 | executables built using the SDK also have the flags applied. |
| 8022 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8023 | :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8024 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 8025 | C and the C++ compilers) when building for the target. When building |
| 8026 | in the target context, :term:`CPPFLAGS` is set to the |
| 8027 | value of this variable by default. |
| 8028 | |
| 8029 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8030 | :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8031 | value so that executables built using the SDK also have the flags |
| 8032 | applied. |
| 8033 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8034 | :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8035 | Specifies the flags to pass to the C++ compiler when building for the |
| 8036 | target. When building in the target context, |
| 8037 | :term:`CXXFLAGS` is set to the value of this variable |
| 8038 | by default. |
| 8039 | |
| 8040 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8041 | :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8042 | value so that executables built using the SDK also have the flags |
| 8043 | applied. |
| 8044 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8045 | :term:`TARGET_FPU` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8046 | Specifies the method for handling FPU code. For FPU-less targets, |
| 8047 | which include most ARM CPUs, the variable must be set to "soft". If |
| 8048 | not, the kernel emulation gets used, which results in a performance |
| 8049 | penalty. |
| 8050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8051 | :term:`TARGET_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8052 | Specifies architecture-specific linker flags for the target system. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8053 | :term:`TARGET_LD_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8054 | :term:`TUNE_LDARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8055 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8056 | |
| 8057 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
| 8058 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8059 | :term:`TARGET_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8060 | Specifies the flags to pass to the linker when building for the |
| 8061 | target. When building in the target context, |
| 8062 | :term:`LDFLAGS` is set to the value of this variable |
| 8063 | by default. |
| 8064 | |
| 8065 | Additionally, the SDK's environment setup script sets the |
| 8066 | :term:`LDFLAGS` variable in the environment to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8067 | :term:`TARGET_LDFLAGS` value so that executables built using the SDK also |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8068 | have the flags applied. |
| 8069 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8070 | :term:`TARGET_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8071 | Specifies the target's operating system. The variable can be set to |
| 8072 | "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] | 8073 | for musl libc. For ARM/EABI targets, the possible values are |
| 8074 | "linux-gnueabi" and "linux-musleabi". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8075 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8076 | :term:`TARGET_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8077 | Specifies the prefix used for the toolchain binary target tools. |
| 8078 | |
| 8079 | Depending on the type of recipe and the build target, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8080 | :term:`TARGET_PREFIX` is set as follows: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8081 | |
| 8082 | - For recipes building for the target machine, the value is |
| 8083 | "${:term:`TARGET_SYS`}-". |
| 8084 | |
| 8085 | - For native recipes, the build system sets the variable to the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8086 | value of :term:`BUILD_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8087 | |
| 8088 | - For native SDK recipes (``nativesdk``), the build system sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8089 | variable to the value of :term:`SDK_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8090 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8091 | :term:`TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8092 | Specifies the system, including the architecture and the operating |
| 8093 | system, for which the build is occurring in the context of the |
| 8094 | current recipe. |
| 8095 | |
| 8096 | The OpenEmbedded build system automatically sets this variable based |
| 8097 | on :term:`TARGET_ARCH`, |
| 8098 | :term:`TARGET_VENDOR`, and |
| 8099 | :term:`TARGET_OS` variables. |
| 8100 | |
| 8101 | .. note:: |
| 8102 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8103 | You do not need to set the :term:`TARGET_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8104 | |
| 8105 | Consider these two examples: |
| 8106 | |
| 8107 | - Given a native recipe on a 32-bit, x86 machine running Linux, the |
| 8108 | value is "i686-linux". |
| 8109 | |
| 8110 | - Given a recipe being built for a little-endian, MIPS target |
| 8111 | running Linux, the value might be "mipsel-linux". |
| 8112 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8113 | :term:`TARGET_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8114 | Specifies the name of the target vendor. |
| 8115 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8116 | :term:`TCLIBC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8117 | Specifies the GNU standard C library (``libc``) variant to use during |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8118 | the build process. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8119 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8120 | You can select "glibc", "musl", "newlib", or "baremetal". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8122 | :term:`TCLIBCAPPEND` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 8123 | Specifies a suffix to be appended onto the :term:`TMPDIR` value. The |
| 8124 | suffix identifies the ``libc`` variant for building. When you are |
| 8125 | building for multiple variants with the same :term:`Build Directory`, |
| 8126 | this mechanism ensures that output for different ``libc`` variants is |
| 8127 | kept separate to avoid potential conflicts. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8128 | |
| 8129 | In the ``defaultsetup.conf`` file, the default value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8130 | :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8131 | which normally only support one ``libc`` variant, set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8132 | :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8133 | in no suffix being applied. |
| 8134 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8135 | :term:`TCMODE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8136 | Specifies the toolchain selector. :term:`TCMODE` controls the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8137 | characteristics of the generated packages and images by telling the |
| 8138 | OpenEmbedded build system which toolchain profile to use. By default, |
| 8139 | the OpenEmbedded build system builds its own internal toolchain. The |
| 8140 | variable's default value is "default", which uses that internal |
| 8141 | toolchain. |
| 8142 | |
| 8143 | .. note:: |
| 8144 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8145 | 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] | 8146 | responsibility to ensure that the toolchain is compatible with the |
| 8147 | default toolchain. Using older or newer versions of these |
| 8148 | components might cause build problems. See the Release Notes for |
| 8149 | the Yocto Project release for the specific components with which |
| 8150 | the toolchain must be compatible. To access the Release Notes, go |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8151 | to the :yocto_home:`Downloads </software-overview/downloads>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8152 | page on the Yocto Project website and click on the "RELEASE |
| 8153 | INFORMATION" link for the appropriate release. |
| 8154 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8155 | The :term:`TCMODE` variable is similar to :term:`TCLIBC`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8156 | which controls the variant of the GNU standard C library (``libc``) |
| 8157 | used during the build process: ``glibc`` or ``musl``. |
| 8158 | |
| 8159 | With additional layers, it is possible to use a pre-compiled external |
| 8160 | toolchain. One example is the Sourcery G++ Toolchain. The support for |
| 8161 | this toolchain resides in the separate Mentor Graphics |
| 8162 | ``meta-sourcery`` layer at |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8163 | https://github.com/MentorEmbedded/meta-sourcery/. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8164 | |
| 8165 | The layer's ``README`` file contains information on how to use the |
| 8166 | Sourcery G++ Toolchain as an external toolchain. In summary, you must |
| 8167 | be sure to add the layer to your ``bblayers.conf`` file in front of |
| 8168 | the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable |
| 8169 | in your ``local.conf`` file to the location in which you installed |
| 8170 | the toolchain. |
| 8171 | |
| 8172 | The fundamentals used for this example apply to any external |
| 8173 | toolchain. You can use ``meta-sourcery`` as a template for adding |
| 8174 | support for other external toolchains. |
| 8175 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 8176 | :term:`TC_CXX_RUNTIME` |
| 8177 | Specifies the C/C++ STL and runtime variant to use during |
| 8178 | the build process. Default value is 'gnu' |
| 8179 | |
| 8180 | You can select "gnu", "llvm", or "android". |
| 8181 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 8182 | :term:`TEMPLATECONF` |
| 8183 | Specifies the directory used by the build system to find templates |
| 8184 | from which to build the ``bblayers.conf`` and ``local.conf`` files. |
| 8185 | Use this variable if you wish to customize such files, and the default |
| 8186 | BitBake targets shown when sourcing the ``oe-init-build-env`` script. |
| 8187 | |
| 8188 | For details, see the |
| 8189 | :ref:`dev-manual/common-tasks:creating a custom template configuration directory` |
| 8190 | section in the Yocto Project Development Tasks manual. |
| 8191 | |
| 8192 | .. note:: |
| 8193 | |
| 8194 | You must set this variable in the external environment in order |
| 8195 | for it to work. |
| 8196 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8197 | :term:`TEST_EXPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8198 | The location the OpenEmbedded build system uses to export tests when |
| 8199 | the :term:`TEST_EXPORT_ONLY` variable is set |
| 8200 | to "1". |
| 8201 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8202 | The :term:`TEST_EXPORT_DIR` variable defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8203 | ``"${TMPDIR}/testimage/${PN}"``. |
| 8204 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8205 | :term:`TEST_EXPORT_ONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8206 | Specifies to export the tests only. Set this variable to "1" if you |
| 8207 | do not want to run the tests but you want them to be exported in a |
| 8208 | manner that you to run them outside of the build system. |
| 8209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8210 | :term:`TEST_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8211 | Holds the SSH log and the boot log for QEMU machines. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8212 | :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8213 | |
| 8214 | .. note:: |
| 8215 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8216 | Actual test results reside in the task log (``log.do_testimage``), |
| 8217 | which is in the ``${WORKDIR}/temp/`` directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8218 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8219 | :term:`TEST_POWERCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8220 | For automated hardware testing, specifies the command to use to |
| 8221 | control the power of the target machine under test. Typically, this |
| 8222 | command would point to a script that performs the appropriate action |
| 8223 | (e.g. interacting with a web-enabled power strip). The specified |
| 8224 | command should expect to receive as the last argument "off", "on" or |
| 8225 | "cycle" specifying to power off, on, or cycle (power off and then |
| 8226 | power on) the device, respectively. |
| 8227 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8228 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8229 | For automated hardware testing, specifies additional arguments to |
| 8230 | pass through to the command specified in |
| 8231 | :term:`TEST_POWERCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8232 | :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] | 8233 | wish, for example, to separate the machine-specific and |
| 8234 | non-machine-specific parts of the arguments. |
| 8235 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8236 | :term:`TEST_QEMUBOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8237 | The time in seconds allowed for an image to boot before automated |
| 8238 | runtime tests begin to run against an image. The default timeout |
| 8239 | period to allow the boot process to reach the login prompt is 500 |
| 8240 | seconds. You can specify a different value in the ``local.conf`` |
| 8241 | file. |
| 8242 | |
| 8243 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8244 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8245 | section in the Yocto Project Development Tasks Manual. |
| 8246 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8247 | :term:`TEST_SERIALCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8248 | For automated hardware testing, specifies the command to use to |
| 8249 | connect to the serial console of the target machine under test. This |
| 8250 | command simply needs to connect to the serial console and forward |
| 8251 | that connection to standard input and output as any normal terminal |
| 8252 | program does. |
| 8253 | |
| 8254 | For example, to use the Picocom terminal program on serial device |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8255 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8256 | |
| 8257 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
| 8258 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8259 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8260 | For automated hardware testing, specifies additional arguments to |
| 8261 | pass through to the command specified in |
| 8262 | :term:`TEST_SERIALCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8263 | :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] | 8264 | wish, for example, to separate the machine-specific and |
| 8265 | non-machine-specific parts of the command. |
| 8266 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8267 | :term:`TEST_SERVER_IP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8268 | The IP address of the build machine (host machine). This IP address |
| 8269 | is usually automatically detected. However, if detection fails, this |
| 8270 | variable needs to be set to the IP address of the build machine (i.e. |
| 8271 | where the build is taking place). |
| 8272 | |
| 8273 | .. note:: |
| 8274 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8275 | 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] | 8276 | tests such as the "dnf" test suite, which needs to download packages |
| 8277 | from ``WORKDIR/oe-rootfs-repo``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8278 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8279 | :term:`TEST_SUITES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8280 | An ordered list of tests (modules) to run against an image when |
| 8281 | performing automated runtime testing. |
| 8282 | |
| 8283 | The OpenEmbedded build system provides a core set of tests that can |
| 8284 | be used against images. |
| 8285 | |
| 8286 | .. note:: |
| 8287 | |
| 8288 | Currently, there is only support for running these tests under |
| 8289 | QEMU. |
| 8290 | |
| 8291 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8292 | 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] | 8293 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8294 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8295 | TEST_SUITES:append = " mytest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8296 | |
| 8297 | Alternatively, you can |
| 8298 | provide the "auto" option to have all applicable tests run against |
| 8299 | the image. |
| 8300 | :: |
| 8301 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8302 | TEST_SUITES:append = " auto" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8303 | |
| 8304 | Using this option causes the |
| 8305 | build system to automatically run tests that are applicable to the |
| 8306 | image. Tests that are not applicable are skipped. |
| 8307 | |
| 8308 | The order in which tests are run is important. Tests that depend on |
| 8309 | another test must appear later in the list than the test on which |
| 8310 | they depend. For example, if you append the list of tests with two |
| 8311 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8312 | ``test_A``, then you must order the tests as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8313 | |
| 8314 | TEST_SUITES = "test_A test_B" |
| 8315 | |
| 8316 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8317 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8318 | section in the Yocto Project Development Tasks Manual. |
| 8319 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8320 | :term:`TEST_TARGET` |
| 8321 | Specifies the target controller to use when running tests against a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8322 | test image. The default controller to use is "qemu":: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8323 | |
| 8324 | TEST_TARGET = "qemu" |
| 8325 | |
| 8326 | A target controller is a class that defines how an image gets |
| 8327 | deployed on a target and how a target is started. A layer can extend |
| 8328 | the controllers by adding a module in the layer's |
| 8329 | ``/lib/oeqa/controllers`` directory and by inheriting the |
| 8330 | ``BaseTarget`` class, which is an abstract class that cannot be used |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8331 | as a value of :term:`TEST_TARGET`. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8332 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8333 | You can provide the following arguments with :term:`TEST_TARGET`: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8334 | |
| 8335 | - *"qemu":* Boots a QEMU image and runs the tests. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8336 | ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8337 | in the Yocto Project Development Tasks Manual for more |
| 8338 | information. |
| 8339 | |
| 8340 | - *"simpleremote":* Runs the tests on target hardware that is |
| 8341 | already up and running. The hardware can be on the network or it |
| 8342 | can be a device running an image on QEMU. You must also set |
| 8343 | :term:`TEST_TARGET_IP` when you use |
| 8344 | "simpleremote". |
| 8345 | |
| 8346 | .. note:: |
| 8347 | |
| 8348 | This argument is defined in |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8349 | ``meta/lib/oeqa/controllers/simpleremote.py``. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8350 | |
| 8351 | For information on running tests on hardware, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8352 | ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8353 | section in the Yocto Project Development Tasks Manual. |
| 8354 | |
| 8355 | :term:`TEST_TARGET_IP` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8356 | 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] | 8357 | variable has no effect when :term:`TEST_TARGET` is |
| 8358 | set to "qemu". |
| 8359 | |
| 8360 | 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] | 8361 | an example:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8362 | |
| 8363 | TEST_TARGET_IP = "192.168.1.4:2201" |
| 8364 | |
| 8365 | Specifying a port is |
| 8366 | useful when SSH is started on a non-standard port or in cases when |
| 8367 | your hardware under test is behind a firewall or network that is not |
| 8368 | directly accessible from your host and you need to do port address |
| 8369 | translation. |
| 8370 | |
| 8371 | :term:`TESTIMAGE_AUTO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8372 | Automatically runs the series of automated tests for images when an |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8373 | image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8374 | any image that successfully builds to automatically boot under QEMU. |
| 8375 | Using the variable also adds in dependencies so that any SDK for |
| 8376 | which testing is requested is automatically built first. |
| 8377 | |
| 8378 | These tests are written in Python making use of the ``unittest`` |
| 8379 | module, and the majority of them run commands on the target system |
| 8380 | over ``ssh``. You can set this variable to "1" in your ``local.conf`` |
| 8381 | file in the :term:`Build Directory` to have the |
| 8382 | OpenEmbedded build system automatically run these tests after an |
| 8383 | image successfully builds: |
| 8384 | |
| 8385 | TESTIMAGE_AUTO = "1" |
| 8386 | |
| 8387 | For more information |
| 8388 | on enabling, running, and writing these tests, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8389 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8390 | section in the Yocto Project Development Tasks Manual and the |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 8391 | ":ref:`ref-classes-testimage`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8393 | :term:`THISDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8394 | The directory in which the file BitBake is currently parsing is |
| 8395 | located. Do not manually set this variable. |
| 8396 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8397 | :term:`TIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8398 | The time the build was started. Times appear using the hour, minute, |
| 8399 | and second (HMS) format (e.g. "140159" for one minute and fifty-nine |
| 8400 | seconds past 1400 hours). |
| 8401 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8402 | :term:`TMPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8403 | This variable is the base directory the OpenEmbedded build system |
| 8404 | uses for all build output and intermediate files (other than the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8405 | shared state cache). By default, the :term:`TMPDIR` variable points to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8406 | ``tmp`` within the :term:`Build Directory`. |
| 8407 | |
| 8408 | If you want to establish this directory in a location other than the |
| 8409 | default, you can uncomment and edit the following statement in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8410 | ``conf/local.conf`` file in the :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8411 | |
| 8412 | #TMPDIR = "${TOPDIR}/tmp" |
| 8413 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8414 | 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^] | 8415 | 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] | 8416 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8417 | The filesystem used by :term:`TMPDIR` must have standard filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8418 | semantics (i.e. mixed-case files are unique, POSIX file locking, and |
| 8419 | persistent inodes). Due to various issues with NFS and bugs in some |
| 8420 | implementations, NFS does not meet this minimum requirement. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8421 | Consequently, :term:`TMPDIR` cannot be on NFS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8422 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8423 | :term:`TOOLCHAIN_HOST_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8424 | This variable lists packages the OpenEmbedded build system uses when |
| 8425 | building an SDK, which contains a cross-development environment. The |
| 8426 | packages specified by this variable are part of the toolchain set |
| 8427 | that runs on the :term:`SDKMACHINE`, and each |
| 8428 | package should usually have the prefix ``nativesdk-``. For example, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8429 | consider the following command when building an SDK:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8430 | |
| 8431 | $ bitbake -c populate_sdk imagename |
| 8432 | |
| 8433 | In this case, a default list of packages is |
| 8434 | set in this variable, but you can add additional packages to the |
| 8435 | list. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8436 | ":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] | 8437 | in the Yocto Project Application Development and the Extensible |
| 8438 | Software Development Kit (eSDK) manual for more information. |
| 8439 | |
| 8440 | For background information on cross-development toolchains in the |
| 8441 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8442 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8443 | section in the Yocto Project Overview and Concepts Manual. For |
| 8444 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8445 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8446 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8447 | Note that this variable applies to building an SDK, not an eSDK, |
| 8448 | in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be |
| 8449 | used instead. |
| 8450 | |
| 8451 | :term:`TOOLCHAIN_HOST_TASK_ESDK` |
| 8452 | This variable allows to extend what is installed in the host |
| 8453 | portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK` |
| 8454 | applying to SDKs. |
| 8455 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8456 | :term:`TOOLCHAIN_OUTPUTNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8457 | This variable defines the name used for the toolchain output. The |
| 8458 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8459 | the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8460 | |
| 8461 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" |
| 8462 | |
| 8463 | See |
| 8464 | the :term:`SDK_NAME` and |
| 8465 | :term:`SDK_VERSION` variables for additional |
| 8466 | information. |
| 8467 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8468 | :term:`TOOLCHAIN_TARGET_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8469 | This variable lists packages the OpenEmbedded build system uses when |
| 8470 | it creates the target part of an SDK (i.e. the part built for the |
| 8471 | target hardware), which includes libraries and headers. Use this |
| 8472 | variable to add individual packages to the part of the SDK that runs |
| 8473 | on the target. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8474 | ":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] | 8475 | in the Yocto Project Application Development and the Extensible |
| 8476 | Software Development Kit (eSDK) manual for more information. |
| 8477 | |
| 8478 | For background information on cross-development toolchains in the |
| 8479 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8480 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8481 | section in the Yocto Project Overview and Concepts Manual. For |
| 8482 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8483 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8484 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8485 | :term:`TRANSLATED_TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8486 | A sanitized version of :term:`TARGET_ARCH`. This |
| 8487 | variable is used where the architecture is needed in a value where |
| 8488 | underscores are not allowed, for example within package filenames. In |
| 8489 | this case, dash characters replace any underscore characters used in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8490 | :term:`TARGET_ARCH`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8491 | |
| 8492 | Do not edit this variable. |
| 8493 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8494 | :term:`TUNE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8495 | The GNU canonical architecture for a specific architecture (i.e. |
| 8496 | ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses |
| 8497 | this value to setup configuration. |
| 8498 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8499 | :term:`TUNE_ARCH` definitions are specific to a given architecture. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8500 | definitions can be a single static definition, or can be dynamically |
| 8501 | adjusted. You can see details for a given CPU family by looking at |
| 8502 | the architecture's ``README`` file. For example, the |
| 8503 | ``meta/conf/machine/include/mips/README`` file in the |
| 8504 | :term:`Source Directory` provides information for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8505 | :term:`TUNE_ARCH` specific to the ``mips`` architecture. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8506 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8507 | :term:`TUNE_ARCH` is tied closely to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8508 | :term:`TARGET_ARCH`, which defines the target |
| 8509 | machine's architecture. The BitBake configuration file |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8510 | (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8511 | |
| 8512 | TARGET_ARCH = "${TUNE_ARCH}" |
| 8513 | |
| 8514 | The following list, which is by no means complete since architectures |
| 8515 | are configurable, shows supported machine architectures: |
| 8516 | |
| 8517 | - arm |
| 8518 | - i586 |
| 8519 | - x86_64 |
| 8520 | - powerpc |
| 8521 | - powerpc64 |
| 8522 | - mips |
| 8523 | - mipsel |
| 8524 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8525 | :term:`TUNE_ASARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8526 | Specifies architecture-specific assembler flags for the target |
| 8527 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8528 | :term:`TUNE_ASARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8529 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8530 | through :term:`TUNE_FEATURES`. For example, the |
| 8531 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8532 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8533 | |
| 8534 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" |
| 8535 | |
| 8536 | .. note:: |
| 8537 | |
| 8538 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8539 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8540 | supply its own set of flags). |
| 8541 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8542 | :term:`TUNE_CCARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8543 | Specifies architecture-specific C compiler flags for the target |
| 8544 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8545 | :term:`TUNE_CCARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8546 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8547 | through :term:`TUNE_FEATURES`. |
| 8548 | |
| 8549 | .. note:: |
| 8550 | |
| 8551 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8552 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8553 | supply its own set of flags). |
| 8554 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8555 | :term:`TUNE_FEATURES` |
| 8556 | Features used to "tune" a compiler for optimal use given a specific |
| 8557 | processor. The features are defined within the tune files and allow |
| 8558 | arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on |
| 8559 | the features. |
| 8560 | |
| 8561 | The OpenEmbedded build system verifies the features to be sure they |
| 8562 | are not conflicting and that they are supported. |
| 8563 | |
| 8564 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8565 | :term:`TUNE_FEATURES` as follows:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8566 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8567 | TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8568 | |
| 8569 | See the :term:`DEFAULTTUNE` variable for more information. |
| 8570 | |
| 8571 | :term:`TUNE_LDARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8572 | Specifies architecture-specific linker flags for the target system. |
| 8573 | The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8574 | :term:`TUNE_LDARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8575 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8576 | through :term:`TUNE_FEATURES`. For example, the |
| 8577 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8578 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8579 | |
| 8580 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" |
| 8581 | |
| 8582 | .. note:: |
| 8583 | |
| 8584 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8585 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8586 | supply its own set of flags). |
| 8587 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8588 | :term:`TUNE_PKGARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8589 | The package architecture understood by the packaging system to define |
| 8590 | the architecture, ABI, and tuning of output packages. The specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8591 | tune is defined using the "_tune" override as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8592 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8593 | TUNE_PKGARCH:tune-tune = "tune" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8594 | |
| 8595 | These tune-specific package architectures are defined in the machine |
| 8596 | 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] | 8597 | the ``meta/conf/machine/include/x86/tune-core2.inc`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8598 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8599 | TUNE_PKGARCH:tune-core2-32 = "core2-32" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8600 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8601 | :term:`TUNECONFLICTS[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8602 | Specifies CPU or Application Binary Interface (ABI) tuning features |
| 8603 | that conflict with feature. |
| 8604 | |
| 8605 | Known tuning conflicts are specified in the machine include files in |
| 8606 | the :term:`Source Directory`. Here is an example from |
| 8607 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file |
| 8608 | that lists the "o32" and "n64" features as conflicting with the "n32" |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8609 | feature:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8610 | |
| 8611 | TUNECONFLICTS[n32] = "o32 n64" |
| 8612 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8613 | :term:`TUNEVALID[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8614 | Specifies a valid CPU or Application Binary Interface (ABI) tuning |
| 8615 | feature. The specified feature is stored as a flag. Valid features |
| 8616 | are specified in the machine include files (e.g. |
| 8617 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8618 | from that file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8619 | |
| 8620 | TUNEVALID[bigendian] = "Enable big-endian mode." |
| 8621 | |
| 8622 | See the machine include files in the :term:`Source Directory` |
| 8623 | for these features. |
| 8624 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8625 | :term:`UBOOT_CONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8626 | Configures the :term:`UBOOT_MACHINE` and can |
| 8627 | also define :term:`IMAGE_FSTYPES` for individual |
| 8628 | cases. |
| 8629 | |
| 8630 | Following is an example from the ``meta-fsl-arm`` layer. :: |
| 8631 | |
| 8632 | UBOOT_CONFIG ??= "sd" |
| 8633 | UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard" |
| 8634 | UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config" |
| 8635 | UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs" |
| 8636 | UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" |
| 8637 | |
| 8638 | 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] | 8639 | :term:`UBOOT_MACHINE`. The "sd" configuration defines |
| 8640 | "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8641 | "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] | 8642 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8643 | For more information on how the :term:`UBOOT_CONFIG` is handled, see the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8644 | :ref:`uboot-config <ref-classes-uboot-config>` |
| 8645 | class. |
| 8646 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8647 | :term:`UBOOT_DTB_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8648 | 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] | 8649 | image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8650 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify |
| 8651 | the load address to be used in |
| 8652 | creating the dtb sections of Image Tree Source for the FIT image. |
| 8653 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8654 | :term:`UBOOT_DTBO_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8655 | 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] | 8656 | image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8657 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in |
| 8658 | creating the dtbo sections of Image Tree Source for the FIT image. |
| 8659 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8660 | :term:`UBOOT_ENTRYPOINT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8661 | 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] | 8662 | creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8663 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8664 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8665 | :term:`UBOOT_LOADADDRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8666 | 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] | 8667 | creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8668 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8669 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8670 | :term:`UBOOT_LOCALVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8671 | Appends a string to the name of the local version of the U-Boot |
| 8672 | image. For example, assuming the version of the U-Boot image built |
| 8673 | 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] | 8674 | "2013.10-yocto" given the following statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8675 | |
| 8676 | UBOOT_LOCALVERSION = "-yocto" |
| 8677 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8678 | :term:`UBOOT_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8679 | Specifies the value passed on the ``make`` command line when building |
| 8680 | a U-Boot image. The value indicates the target platform |
| 8681 | configuration. You typically set this variable from the machine |
| 8682 | configuration file (i.e. ``conf/machine/machine_name.conf``). |
| 8683 | |
| 8684 | Please see the "Selection of Processor Architecture and Board Type" |
| 8685 | section in the U-Boot README for valid values for this variable. |
| 8686 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8687 | :term:`UBOOT_MAKE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8688 | Specifies the target called in the ``Makefile``. The default target |
| 8689 | is "all". |
| 8690 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8691 | :term:`UBOOT_MKIMAGE` |
| 8692 | Specifies the name of the mkimage command as used by the |
| 8693 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble |
| 8694 | the FIT image. This can be used to substitute an alternative command, wrapper |
| 8695 | script or function if desired. The default is "uboot-mkimage". |
| 8696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8697 | :term:`UBOOT_MKIMAGE_DTCOPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8698 | Options for the device tree compiler passed to mkimage '-D' |
| 8699 | feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8700 | If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8701 | pass the ``-D`` option to mkimage. |
| 8702 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 8703 | :term:`UBOOT_MKIMAGE_KERNEL_TYPE` |
| 8704 | Specifies the type argument for the kernel as passed to ``uboot-mkimage``. |
| 8705 | The default value is "kernel". |
| 8706 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8707 | :term:`UBOOT_MKIMAGE_SIGN` |
| 8708 | Specifies the name of the mkimage command as used by the |
| 8709 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign |
| 8710 | the FIT image after it has been assembled (if enabled). This can be used |
| 8711 | to substitute an alternative command, wrapper script or function if |
| 8712 | desired. The default is "${:term:`UBOOT_MKIMAGE`}". |
| 8713 | |
| 8714 | :term:`UBOOT_MKIMAGE_SIGN_ARGS` |
| 8715 | Optionally specifies additional arguments for the |
| 8716 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the |
| 8717 | mkimage command when signing the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8718 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8719 | :term:`UBOOT_RD_ENTRYPOINT` |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8720 | Specifies the entrypoint for the RAM disk image. |
| 8721 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8722 | :term:`UBOOT_RD_ENTRYPOINT` variable is used |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8723 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8724 | entrypoint to be used in creating the Image Tree Source for |
| 8725 | the FIT image. |
| 8726 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8727 | :term:`UBOOT_RD_LOADADDRESS` |
| 8728 | Specifies the load address for the RAM disk image. |
| 8729 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8730 | :term:`UBOOT_RD_LOADADDRESS` variable is used |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8731 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8732 | load address to be used in creating the Image Tree Source for |
| 8733 | the FIT image. |
| 8734 | |
| 8735 | :term:`UBOOT_SIGN_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8736 | Enable signing of FIT image. The default value is "0". |
| 8737 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8738 | :term:`UBOOT_SIGN_KEYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8739 | Location of the directory containing the RSA key and |
| 8740 | certificate used for signing FIT image. |
| 8741 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8742 | :term:`UBOOT_SIGN_KEYNAME` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8743 | The name of keys used for signing U-Boot FIT image stored in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8744 | :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt |
| 8745 | certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have |
| 8746 | :term:`UBOOT_SIGN_KEYNAME` set to "dev". |
| 8747 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8748 | :term:`UBOOT_SUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8749 | Points to the generated U-Boot extension. For example, ``u-boot.sb`` |
| 8750 | has a ``.sb`` extension. |
| 8751 | |
| 8752 | The default U-Boot extension is ``.bin`` |
| 8753 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8754 | :term:`UBOOT_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8755 | Specifies the target used for building U-Boot. The target is passed |
| 8756 | directly as part of the "make" command (e.g. SPL and AIS). If you do |
| 8757 | not specifically set this variable, the OpenEmbedded build process |
| 8758 | passes and uses "all" for the target during the U-Boot building |
| 8759 | process. |
| 8760 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8761 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8762 | Specifies a list of options that, if reported by the configure script |
| 8763 | as being invalid, should not generate a warning during the |
| 8764 | :ref:`ref-tasks-configure` task. Normally, invalid |
| 8765 | configure options are simply not passed to the configure script (e.g. |
| 8766 | should be removed from :term:`EXTRA_OECONF` or |
| 8767 | :term:`PACKAGECONFIG_CONFARGS`). |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 8768 | However, there are common options that are passed to all |
| 8769 | configure scripts at a class level, but might not be valid for some |
| 8770 | configure scripts. Therefore warnings about these options are useless. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8771 | 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] | 8772 | |
| 8773 | The configure arguments check that uses |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8774 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8775 | :ref:`insane <ref-classes-insane>` class and is only enabled if the |
| 8776 | recipe inherits the :ref:`autotools <ref-classes-autotools>` class. |
| 8777 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8778 | :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8779 | For recipes inheriting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8780 | :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8781 | specifies the package that contains the initscript that is enabled. |
| 8782 | |
| 8783 | The default value is "${PN}". Given that almost all recipes that |
| 8784 | install initscripts package them in the main package for the recipe, |
| 8785 | you rarely need to set this variable in individual recipes. |
| 8786 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8787 | :term:`UPSTREAM_CHECK_COMMITS` |
| 8788 | You can perform a per-recipe check for what the latest upstream |
| 8789 | source code version is by calling ``devtool latest-version recipe``. If |
| 8790 | the recipe source code is provided from Git repositories, but |
| 8791 | releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS` |
| 8792 | to ``1`` in the recipe, and the OpenEmbedded build system |
| 8793 | will compare the latest commit with the one currently specified |
| 8794 | by the recipe (:term:`SRCREV`). |
| 8795 | :: |
| 8796 | |
| 8797 | UPSTREAM_CHECK_COMMITS = "1" |
| 8798 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8799 | :term:`UPSTREAM_CHECK_GITTAGREGEX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8800 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8801 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8802 | the recipe source code is provided from Git repositories, the |
| 8803 | OpenEmbedded build system determines the latest upstream version by |
| 8804 | picking the latest tag from the list of all repository tags. |
| 8805 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8806 | You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8807 | regular expression to filter only the relevant tags should the |
| 8808 | default filter not work correctly. |
| 8809 | :: |
| 8810 | |
| 8811 | UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" |
| 8812 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8813 | :term:`UPSTREAM_CHECK_REGEX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8814 | Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8815 | regular expression instead of the default one when the package |
| 8816 | checking system is parsing the page found using |
| 8817 | :term:`UPSTREAM_CHECK_URI`. |
| 8818 | :: |
| 8819 | |
| 8820 | UPSTREAM_CHECK_REGEX = "package_regex" |
| 8821 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8822 | :term:`UPSTREAM_CHECK_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8823 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8824 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8825 | the source code is provided from tarballs, the latest version is |
| 8826 | determined by fetching the directory listing where the tarball is and |
| 8827 | attempting to find a later tarball. When this approach does not work, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8828 | you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8829 | contains the link to the latest tarball. |
| 8830 | :: |
| 8831 | |
| 8832 | UPSTREAM_CHECK_URI = "recipe_url" |
| 8833 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8834 | :term:`UPSTREAM_VERSION_UNKNOWN` |
| 8835 | You can perform a per-recipe check for what the latest upstream |
| 8836 | source code version is by calling ``devtool latest-version recipe``. |
| 8837 | If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`, |
| 8838 | :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in |
| 8839 | the recipe allows to determine what the latest upstream version is, |
| 8840 | you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe |
| 8841 | to acknowledge that the check cannot be performed. |
| 8842 | :: |
| 8843 | |
| 8844 | UPSTREAM_VERSION_UNKNOWN = "1" |
| 8845 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8846 | :term:`USE_DEVFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8847 | Determines if ``devtmpfs`` is used for ``/dev`` population. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8848 | default value used for :term:`USE_DEVFS` is "1" when no value is |
| 8849 | 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] | 8850 | statically populated ``/dev`` directory. |
| 8851 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8852 | See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8853 | the Yocto Project Development Tasks Manual for information on how to |
| 8854 | use this variable. |
| 8855 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8856 | :term:`USE_VT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8857 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8858 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8859 | determines whether or not to run a |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8860 | `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8861 | virtual terminals in order to enable logging in through those |
| 8862 | terminals. |
| 8863 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8864 | The default value used for :term:`USE_VT` is "1" when no default value is |
| 8865 | 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] | 8866 | machine configuration file for machines that do not have a graphical |
| 8867 | display attached and therefore do not need virtual terminal |
| 8868 | functionality. |
| 8869 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8870 | :term:`USER_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8871 | 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] | 8872 | OpenEmbedded build system to enable extra features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8873 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 8874 | Classes inherited using :term:`USER_CLASSES` must be located in the |
| 8875 | ``classes-global/`` or ``classes/`` subdirectories. |
| 8876 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8877 | The default list is set in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8878 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8879 | USER_CLASSES ?= "buildstats" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8880 | |
| 8881 | For more information, see |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 8882 | ``meta-poky/conf/templates/default/local.conf.sample`` in the |
| 8883 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8884 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8885 | :term:`USERADD_ERROR_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8886 | If set to ``error``, forces the OpenEmbedded build system to produce |
| 8887 | an error if the user identification (``uid``) and group |
| 8888 | identification (``gid``) values are not defined in any of the files |
| 8889 | listed in :term:`USERADD_UID_TABLES` and |
| 8890 | :term:`USERADD_GID_TABLES`. If set to |
| 8891 | ``warn``, a warning will be issued instead. |
| 8892 | |
| 8893 | The default behavior for the build system is to dynamically apply |
| 8894 | ``uid`` and ``gid`` values. Consequently, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8895 | :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] | 8896 | on using statically assigned ``gid`` and ``uid`` values, you should |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8897 | set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8898 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8899 | |
| 8900 | USERADD_ERROR_DYNAMIC = "error" |
| 8901 | |
| 8902 | Overriding the |
| 8903 | default behavior implies you are going to also take steps to set |
| 8904 | static ``uid`` and ``gid`` values through use of the |
| 8905 | :term:`USERADDEXTENSION`, |
| 8906 | :term:`USERADD_UID_TABLES`, and |
| 8907 | :term:`USERADD_GID_TABLES` variables. |
| 8908 | |
| 8909 | .. note:: |
| 8910 | |
| 8911 | There is a difference in behavior between setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8912 | :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8913 | When it is set to ``warn``, the build system will report a warning for |
| 8914 | every undefined ``uid`` and ``gid`` in any recipe. But when it is set |
| 8915 | to ``error``, it will only report errors for recipes that are actually |
| 8916 | built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8917 | This saves you from having to add static IDs for recipes that you |
| 8918 | know will never be built. |
| 8919 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8920 | :term:`USERADD_GID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8921 | Specifies a password file to use for obtaining static group |
| 8922 | identification (``gid``) values when the OpenEmbedded build system |
| 8923 | adds a group to the system during package installation. |
| 8924 | |
| 8925 | When applying static group identification (``gid``) values, the |
| 8926 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8927 | ``files/group`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8928 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8929 | |
| 8930 | |
| 8931 | USERADD_GID_TABLES = "files/group" |
| 8932 | |
| 8933 | .. note:: |
| 8934 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8935 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8936 | causes the build system to use static ``gid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8937 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8938 | :term:`USERADD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8939 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8940 | this variable specifies the individual packages within the recipe |
| 8941 | that require users and/or groups to be added. |
| 8942 | |
| 8943 | You must set this variable if the recipe inherits the class. For |
| 8944 | example, the following enables adding a user for the main package in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8945 | a recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8946 | |
| 8947 | USERADD_PACKAGES = "${PN}" |
| 8948 | |
| 8949 | .. note:: |
| 8950 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8951 | 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] | 8952 | variable, you need to set one or more of the :term:`USERADD_PARAM`, |
| 8953 | :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8954 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8955 | :term:`USERADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8956 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8957 | this variable specifies for a package what parameters should pass to |
| 8958 | the ``useradd`` command if you add a user to the system when the |
| 8959 | package is installed. |
| 8960 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8961 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8962 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8963 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8964 | --no-create-home --shell /bin/false \ |
| 8965 | --user-group messagebus" |
| 8966 | |
| 8967 | For information on the |
| 8968 | standard Linux shell command ``useradd``, see |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8969 | https://linux.die.net/man/8/useradd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8970 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8971 | :term:`USERADD_UID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8972 | Specifies a password file to use for obtaining static user |
| 8973 | identification (``uid``) values when the OpenEmbedded build system |
| 8974 | adds a user to the system during package installation. |
| 8975 | |
| 8976 | When applying static user identification (``uid``) values, the |
| 8977 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8978 | ``files/passwd`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8979 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8980 | |
| 8981 | USERADD_UID_TABLES = "files/passwd" |
| 8982 | |
| 8983 | .. note:: |
| 8984 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8985 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8986 | causes the build system to use static ``uid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8987 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8988 | :term:`USERADDEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8989 | When set to "useradd-staticids", causes the OpenEmbedded build system |
| 8990 | to base all user and group additions on a static ``passwd`` and |
| 8991 | ``group`` files found in :term:`BBPATH`. |
| 8992 | |
| 8993 | To use static user identification (``uid``) and group identification |
| 8994 | (``gid``) values, set the variable as follows in your ``local.conf`` |
| 8995 | file: USERADDEXTENSION = "useradd-staticids" |
| 8996 | |
| 8997 | .. note:: |
| 8998 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8999 | Setting this variable to use static ``uid`` and ``gid`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9000 | values causes the OpenEmbedded build system to employ the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9001 | :ref:`ref-classes-useradd` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9002 | |
| 9003 | If you use static ``uid`` and ``gid`` information, you must also |
| 9004 | specify the ``files/passwd`` and ``files/group`` files by setting the |
| 9005 | :term:`USERADD_UID_TABLES` and |
| 9006 | :term:`USERADD_GID_TABLES` variables. |
| 9007 | Additionally, you should also set the |
| 9008 | :term:`USERADD_ERROR_DYNAMIC` variable. |
| 9009 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9010 | :term:`VOLATILE_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9011 | Specifies the persistence of the target's ``/var/log`` directory, |
| 9012 | which is used to house postinstall target log files. |
| 9013 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9014 | 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] | 9015 | file is not persistent. You can override this setting by setting the |
| 9016 | variable to "no" to make the log directory persistent. |
| 9017 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9018 | :term:`WARN_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9019 | Specifies the quality assurance checks whose failures are reported as |
| 9020 | warnings by the OpenEmbedded build system. You set this variable in |
| 9021 | your distribution configuration file. For a list of the checks you |
| 9022 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 9023 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9024 | |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 9025 | :term:`WATCHDOG_TIMEOUT` |
| 9026 | Specifies the timeout in seconds used by the ``watchdog`` recipe and |
| 9027 | also by ``systemd`` during reboot. The default is 60 seconds. |
| 9028 | |
| 9029 | :term:`WIRELESS_DAEMON` |
| 9030 | For ``connman`` and ``packagegroup-base``, specifies the wireless |
| 9031 | daemon to use. The default is "wpa-supplicant" (note that the value |
| 9032 | uses a dash and not an underscore). |
| 9033 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9034 | :term:`WKS_FILE` |
| 9035 | Specifies the location of the Wic kickstart file that is used by the |
| 9036 | OpenEmbedded build system to create a partitioned image |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9037 | (``image.wic``). For information on how to create a partitioned |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9038 | image, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9039 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9040 | section in the Yocto Project Development Tasks Manual. For details on |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 9041 | the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9042 | |
| 9043 | :term:`WKS_FILE_DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9044 | When placed in the recipe that builds your image, this variable lists |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9045 | build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9046 | applicable when Wic images are active (i.e. when |
| 9047 | :term:`IMAGE_FSTYPES` contains entries related |
| 9048 | to Wic). If your recipe does not create Wic images, the variable has |
| 9049 | no effect. |
| 9050 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9051 | The :term:`WKS_FILE_DEPENDS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9052 | :term:`DEPENDS` variable. When you use the variable in |
| 9053 | your recipe that builds the Wic image, dependencies you list in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9054 | :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9055 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9056 | With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9057 | specify a list of additional dependencies (e.g. native tools, |
| 9058 | bootloaders, and so forth), that are required to build Wic images. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9059 | Following is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9060 | |
| 9061 | WKS_FILE_DEPENDS = "some-native-tool" |
| 9062 | |
| 9063 | In the |
| 9064 | previous example, some-native-tool would be replaced with an actual |
| 9065 | native tool on which the build would depend. |
| 9066 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 9067 | :term:`WKS_FILES` |
| 9068 | Specifies a list of candidate Wic kickstart files to be used by the |
| 9069 | OpenEmbedded build system to create a partitioned image. Only the |
| 9070 | first one that is found, from left to right, will be used. |
| 9071 | |
| 9072 | This is only useful when there are multiple ``.wks`` files that can be |
| 9073 | used to produce an image. A typical case is when multiple layers are |
| 9074 | used for different hardware platforms, each supplying a different |
| 9075 | ``.wks`` file. In this case, you specify all possible ones through |
| 9076 | :term:`WKS_FILES`. |
| 9077 | |
| 9078 | If only one ``.wks`` file is used, set :term:`WKS_FILE` instead. |
| 9079 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9080 | :term:`WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9081 | The pathname of the work directory in which the OpenEmbedded build |
| 9082 | system builds a recipe. This directory is located within the |
| 9083 | :term:`TMPDIR` directory structure and is specific to |
| 9084 | the recipe being built and the system for which it is being built. |
| 9085 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9086 | The :term:`WORKDIR` directory is defined as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9087 | |
| 9088 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
| 9089 | |
| 9090 | The actual directory depends on several things: |
| 9091 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9092 | - :term:`TMPDIR`: The top-level build output directory |
| 9093 | - :term:`MULTIMACH_TARGET_SYS`: The target system identifier |
| 9094 | - :term:`PN`: The recipe name |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 9095 | - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which |
| 9096 | is usually the case for most recipes, then `EXTENDPE` is blank. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 9097 | - :term:`PV`: The recipe version |
| 9098 | - :term:`PR`: The recipe revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9099 | |
| 9100 | As an example, assume a Source Directory top-level folder name |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 9101 | ``poky``, a default :term:`Build Directory` at ``poky/build``, and a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9102 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose |
| 9103 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work |
| 9104 | directory the build system uses to build the package would be as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 9105 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9106 | |
| 9107 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
| 9108 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 9109 | :term:`XSERVER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9110 | Specifies the packages that should be installed to provide an X |
| 9111 | server and drivers for the current machine, assuming your image |
| 9112 | directly includes ``packagegroup-core-x11-xserver`` or, perhaps |
| 9113 | indirectly, includes "x11-base" in |
| 9114 | :term:`IMAGE_FEATURES`. |
| 9115 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 9116 | The default value of :term:`XSERVER`, if not specified in the machine |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 9117 | configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 9118 | |
| 9119 | :term:`XZ_THREADS` |
| 9120 | Specifies the number of parallel threads that should be used when |
| 9121 | using xz compression. |
| 9122 | |
| 9123 | By default this scales with core count, but is never set less than 2 |
| 9124 | to ensure that multi-threaded mode is always used so that the output |
| 9125 | file contents are deterministic. Builds will work with a value of 1 |
| 9126 | but the output will differ compared to the output from the compression |
| 9127 | generated when more than one thread is used. |
| 9128 | |
| 9129 | On systems where many tasks run in parallel, setting a limit to this |
| 9130 | can be helpful in controlling system resource usage. |
| 9131 | |
| 9132 | :term:`XZ_MEMLIMIT` |
| 9133 | Specifies the maximum memory the xz compression should use as a percentage |
| 9134 | of system memory. If unconstrained the xz compressor can use large amounts of |
| 9135 | memory and become problematic with parallelism elsewhere in the build. |
| 9136 | "50%" has been found to be a good value. |
| 9137 | |
| 9138 | :term:`ZSTD_THREADS` |
| 9139 | Specifies the number of parallel threads that should be used when |
| 9140 | using ZStandard compression. |
| 9141 | |
| 9142 | By default this scales with core count, but is never set less than 2 |
| 9143 | to ensure that multi-threaded mode is always used so that the output |
| 9144 | file contents are deterministic. Builds will work with a value of 1 |
| 9145 | but the output will differ compared to the output from the compression |
| 9146 | generated when more than one thread is used. |
| 9147 | |
| 9148 | On systems where many tasks run in parallel, setting a limit to this |
| 9149 | can be helpful in controlling system resource usage. |