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. |
| 138 | |
| 139 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 140 | :term:`APPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 141 | An override list of append strings for each target specified with |
| 142 | :term:`LABELS`. |
| 143 | |
| 144 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 145 | information on how this variable is used. |
| 146 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 147 | :term:`AR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 148 | The minimal command and arguments used to run ``ar``. |
| 149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 150 | :term:`ARCHIVER_MODE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 151 | When used with the :ref:`archiver <ref-classes-archiver>` class, |
| 152 | determines the type of information used to create a released archive. |
| 153 | You can use this variable to create archives of patched source, |
| 154 | original source, configured source, and so forth by employing the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 155 | following variable flags (varflags):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 156 | |
| 157 | ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. |
| 158 | ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. |
| 159 | ARCHIVER_MODE[src] = "configured" # Uses configured source files. |
| 160 | ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch. |
| 161 | ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff. |
| 162 | ARCHIVER_MODE[dumpdata] = "1" # Uses environment data. |
| 163 | ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files. |
| 164 | ARCHIVER_MODE[srpm] = "1" # Uses RPM package files. |
| 165 | |
| 166 | For information on how the variable works, see the |
| 167 | ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`. |
| 168 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 169 | :term:`AS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 170 | Minimal command and arguments needed to run the assembler. |
| 171 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 172 | :term:`ASSUME_PROVIDED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 173 | Lists recipe names (:term:`PN` values) BitBake does not |
| 174 | attempt to build. Instead, BitBake assumes these recipes have already |
| 175 | been built. |
| 176 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 177 | In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 178 | tools that should not be built. An example is ``git-native``, which |
| 179 | when specified, allows for the Git binary from the host to be used |
| 180 | rather than building ``git-native``. |
| 181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 182 | :term:`ASSUME_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 183 | Provides additional ``shlibs`` provider mapping information, which |
| 184 | adds to or overwrites the information provided automatically by the |
| 185 | system. Separate multiple entries using spaces. |
| 186 | |
| 187 | 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] | 188 | shlibname in packagename with the optional version:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 189 | |
| 190 | shlibname:packagename[_version] |
| 191 | |
| 192 | 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] | 193 | as being provided by the ``libegl-implementation`` package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 194 | |
| 195 | ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" |
| 196 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 197 | :term:`AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 198 | The email address used to contact the original author or authors in |
| 199 | order to send patches and forward bugs. |
| 200 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 201 | :term:`AUTO_LIBNAME_PKGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 202 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 203 | which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 204 | packages should be checked for libraries and renamed according to |
| 205 | Debian library package naming. |
| 206 | |
| 207 | The default value is "${PACKAGES}", which causes the debian class to |
| 208 | act on all packages that are explicitly generated by the recipe. |
| 209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 210 | :term:`AUTOREV` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 211 | 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] | 212 | use the latest source revision in the repository. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 213 | |
| 214 | SRCREV = "${AUTOREV}" |
| 215 | |
| 216 | If you use the previous statement to retrieve the latest version of |
| 217 | software, you need to be sure :term:`PV` contains |
| 218 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you |
| 219 | have a kernel recipe that inherits the |
| 220 | :ref:`kernel <ref-classes-kernel>` class and you use the previous |
| 221 | statement. In this example, ``${SRCPV}`` does not automatically get |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 222 | 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] | 223 | so that it does contain ``${SRCPV}``. |
| 224 | |
| 225 | For more information see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 226 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 227 | section in the Yocto Project Development Tasks Manual. |
| 228 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 229 | :term:`AUTO_SYSLINUXMENU` |
| 230 | Enables creating an automatic menu for the syslinux bootloader. You |
| 231 | must set this variable in your recipe. The |
| 232 | :ref:`syslinux <ref-classes-syslinux>` class checks this variable. |
| 233 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 234 | :term:`AVAILTUNES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 235 | The list of defined CPU and Application Binary Interface (ABI) |
| 236 | tunings (i.e. "tunes") available for use by the OpenEmbedded build |
| 237 | system. |
| 238 | |
| 239 | The list simply presents the tunes that are available. Not all tunes |
| 240 | may be compatible with a particular machine configuration, or with |
| 241 | each other in a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 242 | :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] | 243 | configuration. |
| 244 | |
| 245 | To add a tune to the list, be sure to append it with spaces using the |
| 246 | "+=" BitBake operator. Do not simply replace the list by using the |
| 247 | "=" operator. See the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 248 | ":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] | 249 | User Manual for more information. |
| 250 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 251 | :term:`AZ_SAS` |
| 252 | Azure Storage Shared Access Signature, when using the |
| 253 | :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` |
| 254 | This variable can be defined to be used by the fetcher to authenticate |
| 255 | and gain access to non-public artifacts. |
| 256 | :: |
| 257 | |
| 258 | AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" |
| 259 | |
| 260 | For more information see Microsoft's Azure Storage documentation at |
| 261 | https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview |
| 262 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 263 | :term:`B` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 264 | The directory within the :term:`Build Directory` in |
| 265 | which the OpenEmbedded build system places generated objects during a |
| 266 | recipe's build process. By default, this directory is the same as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 267 | :term:`S` directory, which is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 268 | |
| 269 | S = "${WORKDIR}/${BP}" |
| 270 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 271 | You can separate the (:term:`S`) directory and the directory pointed to |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 272 | by the :term:`B` variable. Most Autotools-based recipes support |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 273 | separating these directories. The build system defaults to using |
| 274 | separate directories for ``gcc`` and some kernel recipes. |
| 275 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 276 | :term:`BAD_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 277 | Lists "recommended-only" packages to not install. Recommended-only |
| 278 | packages are packages installed only through the |
| 279 | :term:`RRECOMMENDS` variable. You can prevent any |
| 280 | of these "recommended" packages from being installed by listing them |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 281 | with the :term:`BAD_RECOMMENDATIONS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 282 | |
| 283 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." |
| 284 | |
| 285 | You can set this variable globally in your ``local.conf`` file or you |
| 286 | 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] | 287 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 288 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 289 | BAD_RECOMMENDATIONS:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 290 | |
| 291 | It is important to realize that if you choose to not install packages |
| 292 | using this variable and some other packages are dependent on them |
| 293 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 294 | variable), the OpenEmbedded build system ignores your request and |
| 295 | will install the packages to avoid dependency errors. |
| 296 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 297 | This variable is supported only when using the IPK and RPM |
| 298 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 299 | |
| 300 | See the :term:`NO_RECOMMENDATIONS` and the |
| 301 | :term:`PACKAGE_EXCLUDE` variables for related |
| 302 | information. |
| 303 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 304 | :term:`BASE_LIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 305 | The library directory name for the CPU or Application Binary |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 306 | Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 307 | 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] | 308 | section in the Yocto Project Development Tasks Manual for information |
| 309 | on Multilib. |
| 310 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 311 | 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] | 312 | the :term:`Source Directory`. If Multilib is not |
| 313 | being used, the value defaults to "lib". |
| 314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 315 | :term:`BASE_WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 316 | Points to the base of the work directory for all recipes. The default |
| 317 | value is "${TMPDIR}/work". |
| 318 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 319 | :term:`BB_ALLOWED_NETWORKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 320 | Specifies a space-delimited list of hosts that the fetcher is allowed |
| 321 | to use to obtain the required source code. Following are |
| 322 | considerations surrounding this variable: |
| 323 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 324 | - 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] | 325 | or set to "0". |
| 326 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 327 | - There is limited support for wildcard matching against the beginning of |
| 328 | host names. For example, the following setting matches |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 329 | ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``. |
| 330 | :: |
| 331 | |
| 332 | BB_ALLOWED_NETWORKS = "*.gnu.org" |
| 333 | |
| 334 | .. note:: |
| 335 | |
| 336 | The use of the "``*``" character only works at the beginning of |
| 337 | a host name and it must be isolated from the remainder of the |
| 338 | host name. You cannot use the wildcard character in any other |
| 339 | location of the name or combined with the front part of the |
| 340 | name. |
| 341 | |
| 342 | For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` |
| 343 | is not. |
| 344 | |
| 345 | - Mirrors not in the host list are skipped and logged in debug. |
| 346 | |
| 347 | - Attempts to access networks not in the host list cause a failure. |
| 348 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 349 | Using :term:`BB_ALLOWED_NETWORKS` in conjunction with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 350 | :term:`PREMIRRORS` is very useful. Adding the host |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 351 | 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] | 352 | fetched from an allowed location and avoids raising an error when a |
| 353 | host that is not allowed is in a :term:`SRC_URI` |
| 354 | statement. This is because the fetcher does not attempt to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 355 | host listed in :term:`SRC_URI` after a successful fetch from the |
| 356 | :term:`PREMIRRORS` occurs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 357 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 358 | :term:`BB_DANGLINGAPPENDS_WARNONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 359 | Defines how BitBake handles situations where an append file |
| 360 | (``.bbappend``) has no corresponding recipe file (``.bb``). This |
| 361 | condition often occurs when layers get out of sync (e.g. ``oe-core`` |
| 362 | bumps a recipe version and the old recipe no longer exists and the |
| 363 | other layer has not been updated to the new version of the recipe |
| 364 | yet). |
| 365 | |
| 366 | The default fatal behavior is safest because it is the sane reaction |
| 367 | given something is out of sync. It is important to realize when your |
| 368 | changes are no longer being applied. |
| 369 | |
| 370 | You can change the default behavior by setting this variable to "1", |
| 371 | "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] | 372 | :term:`Build Directory`: Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 373 | |
| 374 | BB_DANGLINGAPPENDS_WARNONLY = "1" |
| 375 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 376 | :term:`BB_DISKMON_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 377 | Monitors disk space and available inodes during the build and allows |
| 378 | you to control the build based on these parameters. |
| 379 | |
| 380 | Disk space monitoring is disabled by default. To enable monitoring, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 381 | 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] | 382 | found in the :term:`Build Directory`. Use the |
| 383 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 384 | |
| 385 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 386 | |
| 387 | BB_DISKMON_DIRS = "action,dir,threshold [...]" |
| 388 | |
| 389 | where: |
| 390 | |
| 391 | action is: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 392 | ABORT: Immediately stop the build when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 393 | a threshold is broken. |
| 394 | STOPTASKS: Stop the build after the currently |
| 395 | executing tasks have finished when |
| 396 | a threshold is broken. |
| 397 | WARN: Issue a warning but continue the |
| 398 | build when a threshold is broken. |
| 399 | Subsequent warnings are issued as |
| 400 | defined by the BB_DISKMON_WARNINTERVAL |
| 401 | variable, which must be defined in |
| 402 | the conf/local.conf file. |
| 403 | |
| 404 | dir is: |
| 405 | Any directory you choose. You can specify one or |
| 406 | more directories to monitor by separating the |
| 407 | groupings with a space. If two directories are |
| 408 | on the same device, only the first directory |
| 409 | is monitored. |
| 410 | |
| 411 | threshold is: |
| 412 | Either the minimum available disk space, |
| 413 | the minimum number of free inodes, or |
| 414 | both. You must specify at least one. To |
| 415 | omit one or the other, simply omit the value. |
| 416 | Specify the threshold using G, M, K for Gbytes, |
| 417 | Mbytes, and Kbytes, respectively. If you do |
| 418 | not specify G, M, or K, Kbytes is assumed by |
| 419 | default. Do not use GB, MB, or KB. |
| 420 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 421 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 422 | |
| 423 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
| 424 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
| 425 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" |
| 426 | |
| 427 | The first example works only if you also provide the |
| 428 | :term:`BB_DISKMON_WARNINTERVAL` |
| 429 | variable in the ``conf/local.conf``. This example causes the build |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 430 | system to immediately stop when either the disk space in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 431 | ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops |
| 432 | below 100 Kbytes. Because two directories are provided with the |
| 433 | variable, the build system also issue a warning when the disk space |
| 434 | in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number |
| 435 | of free inodes drops below 100 Kbytes. Subsequent warnings are issued |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 436 | during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 437 | variable. |
| 438 | |
| 439 | The second example stops the build after all currently executing |
| 440 | tasks complete when the minimum disk space in the ``${TMPDIR}`` |
| 441 | directory drops below 1 Gbyte. No disk monitoring occurs for the free |
| 442 | inodes in this case. |
| 443 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 444 | The final example immediately stops the build when the number of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 445 | free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No |
| 446 | disk space monitoring for the directory itself occurs in this case. |
| 447 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 448 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 449 | Defines the disk space and free inode warning intervals. To set these |
| 450 | intervals, define the variable in your ``conf/local.conf`` file in |
| 451 | the :term:`Build Directory`. |
| 452 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 453 | 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] | 454 | must also use the :term:`BB_DISKMON_DIRS` |
| 455 | variable and define its action as "WARN". During the build, |
| 456 | subsequent warnings are issued each time disk space or number of free |
| 457 | inodes further reduces by the respective interval. |
| 458 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 459 | If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you |
| 460 | do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 461 | monitoring interval defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 462 | |
| 463 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 464 | |
| 465 | When specifying the variable in your configuration file, use the |
| 466 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 467 | |
| 468 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 469 | |
| 470 | BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" |
| 471 | |
| 472 | where: |
| 473 | |
| 474 | disk_space_interval is: |
| 475 | An interval of memory expressed in either |
| 476 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 477 | respectively. You cannot use GB, MB, or KB. |
| 478 | |
| 479 | disk_inode_interval is: |
| 480 | An interval of free inodes expressed in either |
| 481 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 482 | respectively. You cannot use GB, MB, or KB. |
| 483 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 484 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 485 | |
| 486 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
| 487 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 488 | |
| 489 | These variables cause the |
| 490 | OpenEmbedded build system to issue subsequent warnings each time the |
| 491 | available disk space further reduces by 50 Mbytes or the number of |
| 492 | free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` |
| 493 | directory. Subsequent warnings based on the interval occur each time |
| 494 | a respective interval is reached beyond the initial warning (i.e. 1 |
| 495 | Gbytes and 100 Kbytes). |
| 496 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 497 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 498 | Causes tarballs of the source control repositories (e.g. Git |
| 499 | repositories), including metadata, to be placed in the |
| 500 | :term:`DL_DIR` directory. |
| 501 | |
| 502 | For performance reasons, creating and placing tarballs of these |
| 503 | repositories is not the default action by the OpenEmbedded build |
| 504 | system. |
| 505 | :: |
| 506 | |
| 507 | BB_GENERATE_MIRROR_TARBALLS = "1" |
| 508 | |
| 509 | Set this variable in your |
| 510 | ``local.conf`` file in the :term:`Build Directory`. |
| 511 | |
| 512 | Once you have the tarballs containing your source files, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 513 | 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] | 514 | source control work directories. |
| 515 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 516 | :term:`BB_NUMBER_THREADS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 517 | The maximum number of tasks BitBake should run in parallel at any one |
| 518 | time. The OpenEmbedded build system automatically configures this |
| 519 | variable to be equal to the number of cores on the build system. For |
| 520 | example, a system with a dual core processor that also uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 521 | hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 522 | to "4". |
| 523 | |
| 524 | For single socket systems (i.e. one CPU), you should not have to |
| 525 | override this variable to gain optimal parallelism during builds. |
| 526 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 527 | 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] | 528 | is not set higher than "20". |
| 529 | |
| 530 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 531 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 532 | section in the Yocto Project Development Tasks Manual. |
| 533 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 534 | :term:`BB_SERVER_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 535 | Specifies the time (in seconds) after which to unload the BitBake |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 536 | server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 537 | long the BitBake server stays resident between invocations. |
| 538 | |
| 539 | For example, the following statement in your ``local.conf`` file |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 540 | instructs the server to be unloaded after 20 seconds of inactivity:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 541 | |
| 542 | BB_SERVER_TIMEOUT = "20" |
| 543 | |
| 544 | If you want the server to never be unloaded, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 545 | set :term:`BB_SERVER_TIMEOUT` to "-1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 546 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 547 | :term:`BBCLASSEXTEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 548 | 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] | 549 | software. There are common variants for recipes as "natives" like |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 550 | ``quilt-native``, which is a copy of Quilt built to run on the build |
| 551 | system; "crosses" such as ``gcc-cross``, which is a compiler built to |
| 552 | run on the build machine but produces binaries that run on the target |
| 553 | :term:`MACHINE`; "nativesdk", which targets the SDK |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 554 | machine instead of :term:`MACHINE`; and "mulitlibs" in the form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 555 | "``multilib:``\ multilib_name". |
| 556 | |
| 557 | 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] | 558 | 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] | 559 | |
| 560 | BBCLASSEXTEND =+ "native nativesdk" |
| 561 | BBCLASSEXTEND =+ "multilib:multilib_name" |
| 562 | |
| 563 | .. note:: |
| 564 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 565 | Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 566 | variants by rewriting variable values and applying overrides such |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 567 | as ``:class-native``. For example, to generate a native version of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 568 | a recipe, a :term:`DEPENDS` on "foo" is rewritten |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 569 | to a :term:`DEPENDS` on "foo-native". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 570 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 571 | Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 572 | Parsing once adds some limitations. For example, it is not |
| 573 | possible to include a different file depending on the variant, |
| 574 | since ``include`` statements are processed when the recipe is |
| 575 | parsed. |
| 576 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 577 | :term:`BBFILE_COLLECTIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 578 | Lists the names of configured layers. These names are used to find |
| 579 | the other ``BBFILE_*`` variables. Typically, each layer will append |
| 580 | its name to this variable in its ``conf/layer.conf`` file. |
| 581 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 582 | :term:`BBFILE_PATTERN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 583 | Variable that expands to match files from |
| 584 | :term:`BBFILES` in a particular layer. This variable |
| 585 | is used in the ``conf/layer.conf`` file and must be suffixed with the |
| 586 | name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``). |
| 587 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 588 | :term:`BBFILE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 589 | Assigns the priority for recipe files in each layer. |
| 590 | |
| 591 | This variable is useful in situations where the same recipe appears |
| 592 | in more than one layer. Setting this variable allows you to |
| 593 | prioritize a layer against other layers that contain the same recipe |
| 594 | - effectively letting you control the precedence for the multiple |
| 595 | layers. The precedence established through this variable stands |
| 596 | regardless of a recipe's version (:term:`PV` variable). For |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 597 | example, a layer that has a recipe with a higher :term:`PV` value but for |
| 598 | 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] | 599 | has a lower precedence. |
| 600 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 601 | A larger value for the :term:`BBFILE_PRIORITY` variable results in a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 602 | higher precedence. For example, the value 6 has a higher precedence |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 603 | than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable |
| 604 | is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 605 | for more information. The default priority, if unspecified for a |
| 606 | layer with no dependencies, is the lowest defined priority + 1 (or 1 |
| 607 | if no priorities are defined). |
| 608 | |
| 609 | .. tip:: |
| 610 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 611 | You can use the command ``bitbake-layers show-layers`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 612 | to list all configured layers along with their priorities. |
| 613 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 614 | :term:`BBFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 615 | A space-separated list of recipe files BitBake uses to build |
| 616 | software. |
| 617 | |
| 618 | When specifying recipe files, you can pattern match using Python's |
| 619 | `glob <https://docs.python.org/3/library/glob.html>`_ syntax. |
| 620 | For details on the syntax, see the documentation by following the |
| 621 | previous link. |
| 622 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 623 | :term:`BBFILES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 624 | Activates content when identified layers are present. You identify |
| 625 | the layers by the collections that the layers define. |
| 626 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 627 | Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 628 | whose corresponding ``.bb`` file is in a layer that attempts to |
| 629 | modify other layers through ``.bbappend`` but does not want to |
| 630 | introduce a hard dependency on those other layers. |
| 631 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 632 | Use the following form for :term:`BBFILES_DYNAMIC`: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 633 | ``collection_name:filename_pattern``. |
| 634 | |
| 635 | The following example identifies two collection names and two |
| 636 | filename patterns:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 637 | |
| 638 | BBFILES_DYNAMIC += " \ |
| 639 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
| 640 | core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ |
| 641 | " |
| 642 | |
| 643 | This next example shows an error message that occurs because invalid |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 644 | entries are found, which cause parsing to fail: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 645 | |
| 646 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 647 | |
| 648 | ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: |
| 649 | /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend |
| 650 | /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend |
| 651 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 652 | :term:`BBINCLUDELOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 653 | Variable that controls how BitBake displays logs on build failure. |
| 654 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 655 | :term:`BBINCLUDELOGS_LINES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 656 | If :term:`BBINCLUDELOGS` is set, specifies the |
| 657 | maximum number of lines from the task log file to print when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 658 | reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 659 | the entire log is printed. |
| 660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 661 | :term:`BBLAYERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 662 | Lists the layers to enable during the build. This variable is defined |
| 663 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 664 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 665 | |
| 666 | BBLAYERS = " \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 667 | /home/scottrif/poky/meta \ |
| 668 | /home/scottrif/poky/meta-poky \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 669 | /home/scottrif/poky/meta-yocto-bsp \ |
| 670 | /home/scottrif/poky/meta-mykernel \ |
| 671 | " |
| 672 | |
| 673 | This example enables four layers, one of which is a custom, |
| 674 | user-defined layer named ``meta-mykernel``. |
| 675 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 676 | :term:`BBMASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 677 | Prevents BitBake from processing recipes and recipe append files. |
| 678 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 679 | You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 680 | ``.bbappend`` files. BitBake ignores any recipe or recipe append |
| 681 | files that match any of the expressions. It is as if BitBake does not |
| 682 | see them at all. Consequently, matching files are not parsed or |
| 683 | otherwise used by BitBake. |
| 684 | |
| 685 | The values you provide are passed to Python's regular expression |
| 686 | compiler. Consequently, the syntax follows Python's Regular |
| 687 | Expression (re) syntax. The expressions are compared against the full |
| 688 | paths to the files. For complete syntax information, see Python's |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 689 | 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] | 690 | |
| 691 | The following example uses a complete regular expression to tell |
| 692 | BitBake to ignore all recipe and recipe append files in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 693 | ``meta-ti/recipes-misc/`` directory:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 694 | |
| 695 | BBMASK = "meta-ti/recipes-misc/" |
| 696 | |
| 697 | If you want to mask out multiple directories or recipes, you can |
| 698 | specify multiple regular expression fragments. This next example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 699 | masks out multiple directories and individual recipes:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 700 | |
| 701 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
| 702 | BBMASK += "/meta-oe/recipes-support/" |
| 703 | BBMASK += "/meta-foo/.*/openldap" |
| 704 | BBMASK += "opencv.*\.bbappend" |
| 705 | BBMASK += "lzma" |
| 706 | |
| 707 | .. note:: |
| 708 | |
| 709 | When specifying a directory name, use the trailing slash character |
| 710 | to ensure you match just that directory name. |
| 711 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 712 | :term:`BBMULTICONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 713 | Specifies each additional separate configuration when you are |
| 714 | building targets with multiple configurations. Use this variable in |
| 715 | your ``conf/local.conf`` configuration file. Specify a |
| 716 | multiconfigname for each configuration file you are using. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 717 | example, the following line specifies three configuration files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 718 | |
| 719 | BBMULTICONFIG = "configA configB configC" |
| 720 | |
| 721 | Each configuration file you |
| 722 | use must reside in the :term:`Build Directory` |
| 723 | ``conf/multiconfig`` directory (e.g. |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 724 | ``build_directory/conf/multiconfig/configA.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:`BBPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 732 | Used by BitBake to locate ``.bbclass`` and configuration files. This |
| 733 | variable is analogous to the ``PATH`` variable. |
| 734 | |
| 735 | .. note:: |
| 736 | |
| 737 | If you run BitBake from a directory outside of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 738 | :term:`Build Directory`, you must be sure to set :term:`BBPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 739 | to point to the Build Directory. Set the variable as you would any |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 740 | environment variable and then run BitBake:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 741 | |
| 742 | $ BBPATH = "build_directory" |
| 743 | $ export BBPATH |
| 744 | $ bitbake target |
| 745 | |
| 746 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 747 | :term:`BBSERVER` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 748 | If defined in the BitBake environment, :term:`BBSERVER` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 749 | BitBake remote server. |
| 750 | |
| 751 | Use the following format to export the variable to the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 752 | environment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 753 | |
| 754 | export BBSERVER=localhost:$port |
| 755 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 756 | By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 757 | Consequently, :term:`BBSERVER` is excluded from checksum and dependency |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 758 | data. |
| 759 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 760 | :term:`BINCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 761 | When inheriting the |
| 762 | :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class, |
| 763 | this variable specifies binary configuration scripts to disable in |
| 764 | favor of using ``pkg-config`` to query the information. The |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 765 | :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] | 766 | return an error so that calls to them can be easily found and |
| 767 | replaced. |
| 768 | |
| 769 | To add multiple scripts, separate them by spaces. Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 770 | from the ``libpng`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 771 | |
| 772 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
| 773 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 774 | :term:`BINCONFIG_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 775 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 776 | this variable specifies a wildcard for configuration scripts that |
| 777 | need editing. The scripts are edited to correct any paths that have |
| 778 | been set up during compilation so that they are correct for use when |
| 779 | installed into the sysroot and called by the build processes of other |
| 780 | recipes. |
| 781 | |
| 782 | .. note:: |
| 783 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 784 | The :term:`BINCONFIG_GLOB` variable uses |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 785 | `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, |
| 786 | which is recognition and expansion of wildcards during pattern |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 787 | matching. Shell globbing is very similar to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 788 | `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ |
| 789 | and `glob <https://docs.python.org/3/library/glob.html>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 790 | |
| 791 | For more information on how this variable works, see |
| 792 | ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`. |
| 793 | You can also find general |
| 794 | information on the class in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 795 | ":ref:`ref-classes-binconfig`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 796 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 797 | :term:`BP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 798 | The base recipe name and version but without any special recipe name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 799 | suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 800 | comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 801 | |
| 802 | ${BPN}-${PV} |
| 803 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 804 | :term:`BPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 805 | This variable is a version of the :term:`PN` variable with |
| 806 | common prefixes and suffixes removed, such as ``nativesdk-``, |
| 807 | ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. |
| 808 | The exact lists of prefixes and suffixes removed are specified by the |
| 809 | :term:`MLPREFIX` and |
| 810 | :term:`SPECIAL_PKGSUFFIX` variables, |
| 811 | respectively. |
| 812 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 813 | :term:`BUGTRACKER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 814 | Specifies a URL for an upstream bug tracking website for a recipe. |
| 815 | The OpenEmbedded build system does not use this variable. Rather, the |
| 816 | variable is a useful pointer in case a bug in the software being |
| 817 | built needs to be manually reported. |
| 818 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 819 | :term:`BUILD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 820 | Specifies the architecture of the build host (e.g. ``i686``). The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 821 | OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 822 | machine name reported by the ``uname`` command. |
| 823 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 824 | :term:`BUILD_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 825 | Specifies the architecture-specific assembler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 826 | host. By default, the value of :term:`BUILD_AS_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 827 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 828 | :term:`BUILD_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 829 | Specifies the architecture-specific C compiler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 830 | host. By default, the value of :term:`BUILD_CC_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 831 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 832 | :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 833 | 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] | 834 | compiler is being used as the linker. By default, :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 835 | points to GCC and passes as arguments the value of |
| 836 | :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 837 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 838 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 839 | :term:`BUILD_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 840 | Specifies the flags to pass to the C compiler when building for the |
| 841 | build host. When building in the ``-native`` context, |
| 842 | :term:`CFLAGS` is set to the value of this variable by |
| 843 | default. |
| 844 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 845 | :term:`BUILD_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 846 | Specifies the flags to pass to the C preprocessor (i.e. to both the C |
| 847 | and the C++ compilers) when building for the build host. When |
| 848 | building in the ``-native`` context, :term:`CPPFLAGS` |
| 849 | is set to the value of this variable by default. |
| 850 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 851 | :term:`BUILD_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 852 | Specifies the flags to pass to the C++ compiler when building for the |
| 853 | build host. When building in the ``-native`` context, |
| 854 | :term:`CXXFLAGS` is set to the value of this variable |
| 855 | by default. |
| 856 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 857 | :term:`BUILD_FC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 858 | Specifies the Fortran compiler command for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 859 | default, :term:`BUILD_FC` points to Gfortran and passes as arguments the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 860 | value of :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 861 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 862 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 863 | :term:`BUILD_LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 864 | Specifies the linker command for the build host. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 865 | :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] | 866 | the value of :term:`BUILD_LD_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 867 | :term:`BUILD_LD_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 868 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 869 | :term:`BUILD_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 870 | Specifies architecture-specific linker flags for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 871 | default, the value of :term:`BUILD_LD_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 872 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 873 | :term:`BUILD_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 874 | Specifies the flags to pass to the linker when building for the build |
| 875 | host. When building in the ``-native`` context, |
| 876 | :term:`LDFLAGS` is set to the value of this variable |
| 877 | by default. |
| 878 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 879 | :term:`BUILD_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 880 | Specifies the optimization flags passed to the C compiler when |
| 881 | building for the build host or the SDK. The flags are passed through |
| 882 | the :term:`BUILD_CFLAGS` and |
| 883 | :term:`BUILDSDK_CFLAGS` default values. |
| 884 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 885 | The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 886 | -pipe". |
| 887 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 888 | :term:`BUILD_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 889 | Specifies the operating system in use on the build host (e.g. |
| 890 | "linux"). The OpenEmbedded build system sets the value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 891 | :term:`BUILD_OS` from the OS reported by the ``uname`` command - the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 892 | first word, converted to lower-case characters. |
| 893 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 894 | :term:`BUILD_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 895 | The toolchain binary prefix used for native recipes. The OpenEmbedded |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 896 | build system uses the :term:`BUILD_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 897 | :term:`TARGET_PREFIX` when building for |
| 898 | ``native`` recipes. |
| 899 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 900 | :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 901 | Specifies the command to be used to strip debugging symbols from |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 902 | binaries produced for the build host. By default, :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 903 | points to |
| 904 | ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. |
| 905 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 906 | :term:`BUILD_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 907 | Specifies the system, including the architecture and the operating |
| 908 | system, to use when building for the build host (i.e. when building |
| 909 | ``native`` recipes). |
| 910 | |
| 911 | The OpenEmbedded build system automatically sets this variable based |
| 912 | on :term:`BUILD_ARCH`, |
| 913 | :term:`BUILD_VENDOR`, and |
| 914 | :term:`BUILD_OS`. You do not need to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 915 | :term:`BUILD_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 916 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 917 | :term:`BUILD_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 918 | Specifies the vendor name to use when building for the build host. |
| 919 | The default value is an empty string (""). |
| 920 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 921 | :term:`BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 922 | Points to the location of the :term:`Build Directory`. |
| 923 | You can define this directory indirectly through the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 924 | :ref:`structure-core-script` script by passing in a Build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 925 | Directory path when you run the script. If you run the script and do |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 926 | not provide a Build Directory path, the :term:`BUILDDIR` defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 927 | ``build`` in the current directory. |
| 928 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 929 | :term:`BUILDHISTORY_COMMIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 930 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 931 | class, this variable specifies whether or not to commit the build |
| 932 | 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] | 933 | repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 934 | class and a commit will be created on every build for changes to each |
| 935 | top-level subdirectory of the build history output (images, packages, |
| 936 | and sdk). If you want to track changes to build history over time, |
| 937 | you should set this value to "1". |
| 938 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 939 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class does not commit the build |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 940 | history output in a local Git repository:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 941 | |
| 942 | BUILDHISTORY_COMMIT ?= "0" |
| 943 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 944 | :term:`BUILDHISTORY_COMMIT_AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 945 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 946 | class, this variable specifies the author to use for each Git commit. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 947 | In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 948 | :term:`BUILDHISTORY_COMMIT` variable must |
| 949 | be set to "1". |
| 950 | |
| 951 | Git requires that the value you provide for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 952 | :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 953 | email@host". Providing an email address or host that is not valid |
| 954 | does not produce an error. |
| 955 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 956 | 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] | 957 | |
| 958 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
| 959 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 960 | :term:`BUILDHISTORY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 961 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 962 | class, this variable specifies the directory in which build history |
| 963 | information is kept. For more information on how the variable works, |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 964 | see the :ref:`ref-classes-buildhistory` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 965 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 966 | 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] | 967 | |
| 968 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" |
| 969 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 970 | :term:`BUILDHISTORY_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 971 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 972 | class, this variable specifies the build history features to be |
| 973 | enabled. For more information on how build history works, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 974 | ":ref:`dev-manual/common-tasks:maintaining build output quality`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 975 | section in the Yocto Project Development Tasks Manual. |
| 976 | |
| 977 | You can specify these features in the form of a space-separated list: |
| 978 | |
| 979 | - *image:* Analysis of the contents of images, which includes the |
| 980 | list of installed packages among other things. |
| 981 | |
| 982 | - *package:* Analysis of the contents of individual packages. |
| 983 | |
| 984 | - *sdk:* Analysis of the contents of the software development kit |
| 985 | (SDK). |
| 986 | |
| 987 | - *task:* Save output file signatures for |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 988 | :ref:`shared state <overview-manual/concepts:shared state cache>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 989 | (sstate) tasks. |
| 990 | This saves one file per task and lists the SHA-256 checksums for |
| 991 | each file staged (i.e. the output of the task). |
| 992 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 993 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 994 | features:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 995 | |
| 996 | BUILDHISTORY_FEATURES ?= "image package sdk" |
| 997 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 998 | :term:`BUILDHISTORY_IMAGE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 999 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1000 | class, this variable specifies a list of paths to files copied from |
| 1001 | the image contents into the build history directory under an |
| 1002 | "image-files" directory in the directory for the image, so that you |
| 1003 | can track the contents of each file. The default is to copy |
| 1004 | ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for |
| 1005 | changes in user and group entries. You can modify the list to include |
| 1006 | any file. Specifying an invalid path does not produce an error. |
| 1007 | Consequently, you can include files that might not always be present. |
| 1008 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1009 | 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] | 1010 | following files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1011 | |
| 1012 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" |
| 1013 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1014 | :term:`BUILDHISTORY_PATH_PREFIX_STRIP` |
| 1015 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1016 | class, this variable specifies a common path prefix that should be |
| 1017 | stripped off the beginning of paths in the task signature list when the |
| 1018 | ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be |
| 1019 | useful when build history is populated from multiple sources that may not |
| 1020 | all use the same top level directory. |
| 1021 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1022 | 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] | 1023 | |
| 1024 | BUILDHISTORY_PATH_PREFIX_STRIP ?= "" |
| 1025 | |
| 1026 | In this case, no prefixes will be stripped. |
| 1027 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1028 | :term:`BUILDHISTORY_PUSH_REPO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1029 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1030 | class, this variable optionally specifies a remote repository to |
| 1031 | which build history pushes Git changes. In order for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1032 | :term:`BUILDHISTORY_PUSH_REPO` to work, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1033 | :term:`BUILDHISTORY_COMMIT` must be set to |
| 1034 | "1". |
| 1035 | |
| 1036 | The repository should correspond to a remote address that specifies a |
| 1037 | repository as understood by Git, or alternatively to a remote name |
| 1038 | that you have set up manually using ``git remote`` within the local |
| 1039 | repository. |
| 1040 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1041 | 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] | 1042 | |
| 1043 | BUILDHISTORY_PUSH_REPO ?= "" |
| 1044 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1045 | :term:`BUILDSDK_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1046 | Specifies the flags to pass to the C compiler when building for the |
| 1047 | SDK. When building in the ``nativesdk-`` context, |
| 1048 | :term:`CFLAGS` is set to the value of this variable by |
| 1049 | default. |
| 1050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1051 | :term:`BUILDSDK_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1052 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1053 | C and the C++ compilers) when building for the SDK. When building in |
| 1054 | the ``nativesdk-`` context, :term:`CPPFLAGS` is set |
| 1055 | to the value of this variable by default. |
| 1056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1057 | :term:`BUILDSDK_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1058 | Specifies the flags to pass to the C++ compiler when building for the |
| 1059 | SDK. When building in the ``nativesdk-`` context, |
| 1060 | :term:`CXXFLAGS` is set to the value of this variable |
| 1061 | by default. |
| 1062 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1063 | :term:`BUILDSDK_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1064 | Specifies the flags to pass to the linker when building for the SDK. |
| 1065 | When building in the ``nativesdk-`` context, |
| 1066 | :term:`LDFLAGS` is set to the value of this variable |
| 1067 | by default. |
| 1068 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1069 | :term:`BUILDSTATS_BASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1070 | Points to the location of the directory that holds build statistics |
| 1071 | when you use and enable the |
| 1072 | :ref:`buildstats <ref-classes-buildstats>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1073 | :term:`BUILDSTATS_BASE` directory defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1074 | ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. |
| 1075 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1076 | :term:`BUSYBOX_SPLIT_SUID` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1077 | For the BusyBox recipe, specifies whether to split the output |
| 1078 | executable file into two parts: one for features that require |
| 1079 | ``setuid root``, and one for the remaining features (i.e. those that |
| 1080 | do not require ``setuid root``). |
| 1081 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1082 | The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1083 | splitting the output executable file. Set the variable to "0" to get |
| 1084 | a single output executable file. |
| 1085 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1086 | :term:`CACHE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1087 | Specifies the directory BitBake uses to store a cache of the |
| 1088 | :term:`Metadata` so it does not need to be parsed every time |
| 1089 | BitBake is started. |
| 1090 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1091 | :term:`CC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1092 | The minimal command and arguments used to run the C compiler. |
| 1093 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1094 | :term:`CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1095 | Specifies the flags to pass to the C compiler. This variable is |
| 1096 | exported to an environment variable and thus made visible to the |
| 1097 | software being built during the compilation step. |
| 1098 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1099 | Default initialization for :term:`CFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1100 | being built: |
| 1101 | |
| 1102 | - :term:`TARGET_CFLAGS` when building for the |
| 1103 | target |
| 1104 | |
| 1105 | - :term:`BUILD_CFLAGS` when building for the |
| 1106 | build host (i.e. ``-native``) |
| 1107 | |
| 1108 | - :term:`BUILDSDK_CFLAGS` when building for |
| 1109 | an SDK (i.e. ``nativesdk-``) |
| 1110 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1111 | :term:`CLASSOVERRIDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1112 | An internal variable specifying the special class override that |
| 1113 | should currently apply (e.g. "class-target", "class-native", and so |
| 1114 | forth). The classes that use this variable (e.g. |
| 1115 | :ref:`native <ref-classes-native>`, |
| 1116 | :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the |
| 1117 | variable to appropriate values. |
| 1118 | |
| 1119 | .. note:: |
| 1120 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1121 | :term:`CLASSOVERRIDE` gets its default "class-target" value from the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1122 | ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1123 | |
| 1124 | As an example, the following override allows you to install extra |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1125 | files, but only when building for the target:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1126 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1127 | do_install:append:class-target() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1128 | install my-extra-file ${D}${sysconfdir} |
| 1129 | } |
| 1130 | |
| 1131 | Here is an example where ``FOO`` is set to |
| 1132 | "native" when building for the build host, and to "other" when not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1133 | building for the build host:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1134 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1135 | FOO:class-native = "native" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1136 | FOO = "other" |
| 1137 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1138 | The underlying mechanism behind :term:`CLASSOVERRIDE` is simply |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1139 | that it is included in the default value of |
| 1140 | :term:`OVERRIDES`. |
| 1141 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1142 | :term:`CLEANBROKEN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1143 | If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1144 | ``make clean`` command does not work for the software being built. |
| 1145 | Consequently, the OpenEmbedded build system will not try to run |
| 1146 | ``make clean`` during the :ref:`ref-tasks-configure` |
| 1147 | task, which is the default behavior. |
| 1148 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1149 | :term:`COMBINED_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1150 | Provides a list of hardware features that are enabled in both |
| 1151 | :term:`MACHINE_FEATURES` and |
| 1152 | :term:`DISTRO_FEATURES`. This select list of |
| 1153 | features contains features that make sense to be controlled both at |
| 1154 | the machine and distribution configuration level. For example, the |
| 1155 | "bluetooth" feature requires hardware support but should also be |
| 1156 | optional at the distribution level, in case the hardware supports |
| 1157 | Bluetooth but you do not ever intend to use it. |
| 1158 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1159 | :term:`COMMON_LICENSE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1160 | Points to ``meta/files/common-licenses`` in the |
| 1161 | :term:`Source Directory`, which is where generic license |
| 1162 | files reside. |
| 1163 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1164 | :term:`COMPATIBLE_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1165 | A regular expression that resolves to one or more hosts (when the |
| 1166 | recipe is native) or one or more targets (when the recipe is |
| 1167 | non-native) with which a recipe is compatible. The regular expression |
| 1168 | is matched against :term:`HOST_SYS`. You can use the |
| 1169 | variable to stop recipes from being built for classes of systems with |
| 1170 | which the recipes are not compatible. Stopping these builds is |
| 1171 | particularly useful with kernels. The variable also helps to increase |
| 1172 | parsing speed since the build system skips parsing recipes not |
| 1173 | compatible with the current system. |
| 1174 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1175 | :term:`COMPATIBLE_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1176 | A regular expression that resolves to one or more target machines |
| 1177 | with which a recipe is compatible. The regular expression is matched |
| 1178 | against :term:`MACHINEOVERRIDES`. You can use |
| 1179 | the variable to stop recipes from being built for machines with which |
| 1180 | the recipes are not compatible. Stopping these builds is particularly |
| 1181 | useful with kernels. The variable also helps to increase parsing |
| 1182 | speed since the build system skips parsing recipes not compatible |
| 1183 | with the current machine. |
| 1184 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1185 | :term:`COMPLEMENTARY_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1186 | Defines wildcards to match when installing a list of complementary |
| 1187 | packages for all the packages explicitly (or implicitly) installed in |
| 1188 | an image. |
| 1189 | |
| 1190 | .. note:: |
| 1191 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1192 | The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1193 | (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), |
| 1194 | which is similar to the Unix style pathname pattern expansion |
| 1195 | (`glob <https://docs.python.org/3/library/glob.html>`__). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1196 | |
| 1197 | The resulting list of complementary packages is associated with an |
| 1198 | item that can be added to |
| 1199 | :term:`IMAGE_FEATURES`. An example usage of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1200 | 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] | 1201 | will install -dev packages (containing headers and other development |
| 1202 | files) for every package in the image. |
| 1203 | |
| 1204 | To add a new feature item pointing to a wildcard, use a variable flag |
| 1205 | 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] | 1206 | wildcard. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1207 | |
| 1208 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' |
| 1209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1210 | :term:`COMPONENTS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1211 | Stores sysroot components for each recipe. The OpenEmbedded build |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1212 | system uses :term:`COMPONENTS_DIR` when constructing recipe-specific |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1213 | sysroots for other recipes. |
| 1214 | |
| 1215 | The default is |
| 1216 | "``${``\ :term:`STAGING_DIR`\ ``}-components``." |
| 1217 | (i.e. |
| 1218 | "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). |
| 1219 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1220 | :term:`CONF_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1221 | Tracks the version of the local configuration file (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1222 | ``local.conf``). The value for :term:`CONF_VERSION` increments each time |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1223 | ``build/conf/`` compatibility changes. |
| 1224 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1225 | :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1226 | Identifies editable or configurable files that are part of a package. |
| 1227 | If the Package Management System (PMS) is being used to update |
| 1228 | packages on the target system, it is possible that configuration |
| 1229 | files you have changed after the original installation and that you |
| 1230 | now want to remain unchanged are overwritten. In other words, |
| 1231 | 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] | 1232 | 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] | 1233 | variable to list the files in the package that you wish to prevent |
| 1234 | the PMS from overwriting during this update process. |
| 1235 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1236 | To use the :term:`CONFFILES` variable, provide a package name override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1237 | that identifies the resulting package. Then, provide a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1238 | space-separated list of files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1239 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1240 | CONFFILES:${PN} += "${sysconfdir}/file1 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1241 | ${sysconfdir}/file2 ${sysconfdir}/file3" |
| 1242 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1243 | There is a relationship between the :term:`CONFFILES` and :term:`FILES` |
| 1244 | variables. The files listed within :term:`CONFFILES` must be a subset of |
| 1245 | the files listed within :term:`FILES`. Because the configuration files |
| 1246 | you provide with :term:`CONFFILES` are simply being identified so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1247 | 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] | 1248 | already be included as part of the package through the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1249 | variable. |
| 1250 | |
| 1251 | .. note:: |
| 1252 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1253 | When specifying paths as part of the :term:`CONFFILES` variable, it is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1254 | good practice to use appropriate path variables. |
| 1255 | For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` |
| 1256 | rather than ``/usr/bin``. You can find a list of these variables at |
| 1257 | the top of the ``meta/conf/bitbake.conf`` file in the |
| 1258 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1259 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1260 | :term:`CONFIG_INITRAMFS_SOURCE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1261 | Identifies the initial RAM filesystem (initramfs) source files. The |
| 1262 | OpenEmbedded build system receives and uses this kernel Kconfig |
| 1263 | variable as an environment variable. By default, the variable is set |
| 1264 | to null (""). |
| 1265 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1266 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1267 | with a ``.cpio`` suffix or a space-separated list of directories and |
| 1268 | files for building the initramfs image. A cpio archive should contain |
| 1269 | a filesystem archive to be used as an initramfs image. Directories |
| 1270 | should contain a filesystem layout to be included in the initramfs |
| 1271 | image. Files should contain entries according to the format described |
| 1272 | by the ``usr/gen_init_cpio`` program in the kernel tree. |
| 1273 | |
| 1274 | If you specify multiple directories and files, the initramfs image |
| 1275 | will be the aggregate of all of them. |
| 1276 | |
| 1277 | For information on creating an initramfs, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1278 | ":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] | 1279 | in the Yocto Project Development Tasks Manual. |
| 1280 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1281 | :term:`CONFIG_SITE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1282 | A list of files that contains ``autoconf`` test results relevant to |
| 1283 | the current build. This variable is used by the Autotools utilities |
| 1284 | when running ``configure``. |
| 1285 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1286 | :term:`CONFIGURE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1287 | The minimal arguments for GNU configure. |
| 1288 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1289 | :term:`CONFLICT_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1290 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1291 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1292 | class, this variable identifies distribution features that would be |
| 1293 | in conflict should the recipe be built. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1294 | :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also |
| 1295 | appears in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1296 | the recipe will be skipped, and if the build system attempts to build |
| 1297 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1298 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1299 | :term:`COPY_LIC_DIRS` |
| 1300 | If set to "1" along with the |
| 1301 | :term:`COPY_LIC_MANIFEST` variable, the |
| 1302 | OpenEmbedded build system copies into the image the license files, |
| 1303 | which are located in ``/usr/share/common-licenses``, for each |
| 1304 | package. The license files are placed in directories within the image |
| 1305 | itself during build time. |
| 1306 | |
| 1307 | .. note:: |
| 1308 | |
| 1309 | The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for |
| 1310 | newly installed packages to an image, which might be most suitable for |
| 1311 | read-only filesystems that cannot be upgraded. See the |
| 1312 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
| 1313 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
| 1314 | section in the Yocto Project Development Tasks Manual for |
| 1315 | information on providing license text. |
| 1316 | |
| 1317 | :term:`COPY_LIC_MANIFEST` |
| 1318 | If set to "1", the OpenEmbedded build system copies the license |
| 1319 | manifest for the image to |
| 1320 | ``/usr/share/common-licenses/license.manifest`` within the image |
| 1321 | itself during build time. |
| 1322 | |
| 1323 | .. note:: |
| 1324 | |
| 1325 | The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for |
| 1326 | newly installed packages to an image, which might be most suitable for |
| 1327 | read-only filesystems that cannot be upgraded. See the |
| 1328 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
| 1329 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
| 1330 | section in the Yocto Project Development Tasks Manual for |
| 1331 | information on providing license text. |
| 1332 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1333 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1334 | A space-separated list of licenses to exclude from the source |
| 1335 | archived by the :ref:`archiver <ref-classes-archiver>` class. In |
| 1336 | other words, if a license in a recipe's |
| 1337 | :term:`LICENSE` value is in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1338 | :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1339 | class. |
| 1340 | |
| 1341 | .. note:: |
| 1342 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1343 | The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1344 | :term:`COPYLEFT_LICENSE_INCLUDE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1345 | |
| 1346 | The default value, which is "CLOSED Proprietary", for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1347 | :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1348 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1349 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1350 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1351 | :term:`COPYLEFT_LICENSE_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1352 | A space-separated list of licenses to include in the source archived |
| 1353 | by the :ref:`archiver <ref-classes-archiver>` class. In other |
| 1354 | words, if a license in a recipe's :term:`LICENSE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1355 | value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1356 | source is archived by the class. |
| 1357 | |
| 1358 | The default value is set by the |
| 1359 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1360 | 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] | 1361 | "GPL*", "LGPL*", and "AGPL*". |
| 1362 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1363 | :term:`COPYLEFT_PN_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1364 | A list of recipes to exclude in the source archived by the |
| 1365 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1366 | :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1367 | exclusion caused through the |
| 1368 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1369 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1370 | variables, respectively. |
| 1371 | |
| 1372 | The default value, which is "" indicating to not explicitly exclude |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1373 | 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] | 1374 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1375 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1377 | :term:`COPYLEFT_PN_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1378 | A list of recipes to include in the source archived by the |
| 1379 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1380 | :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1381 | exclusion caused through the |
| 1382 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1383 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1384 | variables, respectively. |
| 1385 | |
| 1386 | The default value, which is "" indicating to not explicitly include |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1387 | 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] | 1388 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1389 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1390 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1391 | :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1392 | A space-separated list of recipe types to include in the source |
| 1393 | archived by the :ref:`archiver <ref-classes-archiver>` class. |
| 1394 | Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``, |
| 1395 | ``crosssdk``, and ``cross-canadian``. |
| 1396 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1397 | The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1398 | is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1399 | class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1400 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1401 | :term:`CORE_IMAGE_EXTRA_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1402 | Specifies the list of packages to be added to the image. You should |
| 1403 | only set this variable in the ``local.conf`` configuration file found |
| 1404 | in the :term:`Build Directory`. |
| 1405 | |
| 1406 | This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer |
| 1407 | supported. |
| 1408 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1409 | :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1410 | Specifies the parent directory of the OpenEmbedded-Core Metadata |
| 1411 | layer (i.e. ``meta``). |
| 1412 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1413 | It is an important distinction that :term:`COREBASE` points to the parent |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1414 | of this layer and not the layer itself. Consider an example where you |
| 1415 | have cloned the Poky Git repository and retained the ``poky`` name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1416 | for your local copy of the repository. In this case, :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1417 | points to the ``poky`` folder because it is the parent directory of |
| 1418 | the ``poky/meta`` layer. |
| 1419 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1420 | :term:`COREBASE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1421 | Lists files from the :term:`COREBASE` directory that |
| 1422 | should be copied other than the layers listed in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1423 | ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1424 | to copy metadata from the OpenEmbedded build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1425 | into the extensible SDK. |
| 1426 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1427 | Explicitly listing files in :term:`COREBASE` is needed because it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1428 | typically contains build directories and other files that should not |
| 1429 | normally be copied into the extensible SDK. Consequently, the value |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1430 | 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] | 1431 | are actually needed. |
| 1432 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1433 | :term:`CPP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1434 | The minimal command and arguments used to run the C preprocessor. |
| 1435 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1436 | :term:`CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1437 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1438 | C and the C++ compilers). This variable is exported to an environment |
| 1439 | variable and thus made visible to the software being built during the |
| 1440 | compilation step. |
| 1441 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1442 | Default initialization for :term:`CPPFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1443 | being built: |
| 1444 | |
| 1445 | - :term:`TARGET_CPPFLAGS` when building for |
| 1446 | the target |
| 1447 | |
| 1448 | - :term:`BUILD_CPPFLAGS` when building for the |
| 1449 | build host (i.e. ``-native``) |
| 1450 | |
| 1451 | - :term:`BUILDSDK_CPPFLAGS` when building |
| 1452 | for an SDK (i.e. ``nativesdk-``) |
| 1453 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1454 | :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1455 | The toolchain binary prefix for the target tools. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1456 | :term:`CROSS_COMPILE` variable is the same as the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1457 | :term:`TARGET_PREFIX` variable. |
| 1458 | |
| 1459 | .. note:: |
| 1460 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1461 | The OpenEmbedded build system sets the :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1462 | variable only in certain contexts (e.g. when building for kernel |
| 1463 | and kernel module recipes). |
| 1464 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1465 | :term:`CVE_CHECK_IGNORE` |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1466 | The list of CVE IDs which are ignored. Here is |
| 1467 | an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`:: |
| 1468 | |
| 1469 | # This is windows only issue. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1470 | CVE_CHECK_IGNORE += "CVE-2020-15523" |
| 1471 | |
| 1472 | :term:`CVE_CHECK_SKIP_RECIPE` |
| 1473 | The list of package names (:term:`PN`) for which |
| 1474 | CVEs (Common Vulnerabilities and Exposures) are ignored. |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1475 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1476 | :term:`CVE_PRODUCT` |
| 1477 | In a recipe, defines the name used to match the recipe name |
| 1478 | against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__. |
| 1479 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1480 | The default is ${:term:`BPN`}. If it does not match the name in the NIST CVE |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1481 | database or matches with multiple entries in the database, the default |
| 1482 | value needs to be changed. |
| 1483 | |
| 1484 | Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`:: |
| 1485 | |
| 1486 | CVE_PRODUCT = "oracle_berkeley_db berkeley_db" |
| 1487 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 1488 | Sometimes the product name is not specific enough, for example |
| 1489 | "tar" has been matching CVEs for the GNU ``tar`` package and also |
| 1490 | the ``node-tar`` node.js extension. To avoid this problem, use the |
| 1491 | vendor name as a prefix. The syntax for this is:: |
| 1492 | |
| 1493 | CVE_PRODUCT = "vendor:package" |
| 1494 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1495 | :term:`CVSDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1496 | The directory in which files checked out under the CVS system are |
| 1497 | stored. |
| 1498 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1499 | :term:`CXX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1500 | The minimal command and arguments used to run the C++ compiler. |
| 1501 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1502 | :term:`CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1503 | Specifies the flags to pass to the C++ compiler. This variable is |
| 1504 | exported to an environment variable and thus made visible to the |
| 1505 | software being built during the compilation step. |
| 1506 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1507 | Default initialization for :term:`CXXFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1508 | being built: |
| 1509 | |
| 1510 | - :term:`TARGET_CXXFLAGS` when building for |
| 1511 | the target |
| 1512 | |
| 1513 | - :term:`BUILD_CXXFLAGS` when building for the |
| 1514 | build host (i.e. ``-native``) |
| 1515 | |
| 1516 | - :term:`BUILDSDK_CXXFLAGS` when building |
| 1517 | for an SDK (i.e. ``nativesdk-``) |
| 1518 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1519 | :term:`D` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1520 | The destination directory. The location in the :term:`Build Directory` |
| 1521 | where components are installed by the |
| 1522 | :ref:`ref-tasks-install` task. This location defaults |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1523 | to:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1524 | |
| 1525 | ${WORKDIR}/image |
| 1526 | |
| 1527 | .. note:: |
| 1528 | |
| 1529 | Tasks that read from or write to this directory should run under |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1530 | :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1531 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1532 | :term:`DATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1533 | The date the build was started. Dates appear using the year, month, |
| 1534 | and day (YMD) format (e.g. "20150209" for February 9th, 2015). |
| 1535 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1536 | :term:`DATETIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1537 | The date and time on which the current build started. The format is |
| 1538 | suitable for timestamps. |
| 1539 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1540 | :term:`DEBIAN_NOAUTONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1541 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1542 | which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1543 | particular package should not be renamed according to Debian library |
| 1544 | 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] | 1545 | set this variable. Here is an example from the ``fontconfig`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1546 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1547 | DEBIAN_NOAUTONAME:fontconfig-utils = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1548 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1549 | :term:`DEBIANNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1550 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1551 | which is the default behavior, :term:`DEBIANNAME` allows you to override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1552 | the library name for an individual package. Overriding the library |
| 1553 | name in these cases is rare. You must use the package name as an |
| 1554 | override when you set this variable. Here is an example from the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1555 | ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1556 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1557 | DEBIANNAME:${PN} = "dbus-1" |
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:`DEBUG_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1560 | Specifies to build packages with debugging information. This |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1561 | influences the value of the :term:`SELECTED_OPTIMIZATION` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1563 | :term:`DEBUG_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1564 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1565 | compiling a system for debugging. This variable defaults to "-O |
| 1566 | -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". |
| 1567 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1568 | :term:`DEBUG_PREFIX_MAP` |
| 1569 | Allows to set C compiler options, such as ``-fdebug-prefix-map``, |
| 1570 | ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to |
| 1571 | replace build-time paths by install-time ones in the debugging sections |
| 1572 | of binaries. This makes compiler output files location independent, |
| 1573 | at the cost of having to pass an extra command to tell the debugger |
| 1574 | where source files are. |
| 1575 | |
| 1576 | This is used by the Yocto Project to guarantee |
| 1577 | :doc:`/test-manual/reproducible-builds` even when the source code of |
| 1578 | a package uses the ``__FILE__`` or ``assert()`` macros. See the |
| 1579 | `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__ |
| 1580 | website for details. |
| 1581 | |
| 1582 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1583 | not intended to be user-configurable. |
| 1584 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1585 | :term:`DEFAULT_PREFERENCE` |
| 1586 | Specifies a weak bias for recipe selection priority. |
| 1587 | |
| 1588 | The most common usage of this is variable is to set it to "-1" within |
| 1589 | a recipe for a development version of a piece of software. Using the |
| 1590 | variable in this way causes the stable version of the recipe to build |
| 1591 | by default in the absence of :term:`PREFERRED_VERSION` being used to |
| 1592 | build the development version. |
| 1593 | |
| 1594 | .. note:: |
| 1595 | |
| 1596 | The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden |
| 1597 | by :term:`BBFILE_PRIORITY` if that variable is different between two |
| 1598 | layers that contain different versions of the same recipe. |
| 1599 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1600 | :term:`DEFAULTTUNE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1601 | The default CPU and Application Binary Interface (ABI) tunings (i.e. |
| 1602 | the "tune") used by the OpenEmbedded build system. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1603 | :term:`DEFAULTTUNE` helps define |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1604 | :term:`TUNE_FEATURES`. |
| 1605 | |
| 1606 | The default tune is either implicitly or explicitly set by the |
| 1607 | machine (:term:`MACHINE`). However, you can override |
| 1608 | the setting using available tunes as defined with |
| 1609 | :term:`AVAILTUNES`. |
| 1610 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1611 | :term:`DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1612 | Lists a recipe's build-time dependencies. These are dependencies on |
| 1613 | other recipes whose contents (e.g. headers and shared libraries) are |
| 1614 | needed by the recipe at build time. |
| 1615 | |
| 1616 | As an example, consider a recipe ``foo`` that contains the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1617 | assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1618 | |
| 1619 | DEPENDS = "bar" |
| 1620 | |
| 1621 | The practical effect of the previous |
| 1622 | assignment is that all files installed by bar will be available in |
| 1623 | the appropriate staging sysroot, given by the |
| 1624 | :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the |
| 1625 | :ref:`ref-tasks-configure` task for ``foo`` runs. |
| 1626 | This mechanism is implemented by having ``do_configure`` depend on |
| 1627 | the :ref:`ref-tasks-populate_sysroot` task of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1628 | each recipe listed in :term:`DEPENDS`, through a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1629 | ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` |
| 1630 | declaration in the :ref:`base <ref-classes-base>` class. |
| 1631 | |
| 1632 | .. note:: |
| 1633 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1634 | It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1635 | explicitly. The standard classes and build-related variables are |
| 1636 | configured to automatically use the appropriate staging sysroots. |
| 1637 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1638 | As another example, :term:`DEPENDS` can also be used to add utilities |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1639 | that run on the build machine during the build. For example, a recipe |
| 1640 | that makes use of a code generator built by the recipe ``codegen`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1641 | might have the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1642 | |
| 1643 | DEPENDS = "codegen-native" |
| 1644 | |
| 1645 | For more |
| 1646 | information, see the :ref:`native <ref-classes-native>` class and |
| 1647 | the :term:`EXTRANATIVEPATH` variable. |
| 1648 | |
| 1649 | .. note:: |
| 1650 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1651 | - :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] | 1652 | it is a list of :term:`PROVIDES` names, which |
| 1653 | usually match recipe names. Putting a package name such as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1654 | "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1655 | instead, as this will put files from all the packages that make |
| 1656 | up ``foo``, which includes those from ``foo-dev``, into the |
| 1657 | sysroot. |
| 1658 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1659 | - One recipe having another recipe in :term:`DEPENDS` does not by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1660 | itself add any runtime dependencies between the packages |
| 1661 | produced by the two recipes. However, as explained in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1662 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1663 | section in the Yocto Project Overview and Concepts Manual, |
| 1664 | runtime dependencies will often be added automatically, meaning |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1665 | :term:`DEPENDS` alone is sufficient for most recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1666 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1667 | - Counterintuitively, :term:`DEPENDS` is often necessary even for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1668 | recipes that install precompiled components. For example, if |
| 1669 | ``libfoo`` is a precompiled library that links against |
| 1670 | ``libbar``, then linking against ``libfoo`` requires both |
| 1671 | ``libfoo`` and ``libbar`` to be available in the sysroot. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1672 | Without a :term:`DEPENDS` from the recipe that installs ``libfoo`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1673 | to the recipe that installs ``libbar``, other recipes might |
| 1674 | fail to link against ``libfoo``. |
| 1675 | |
| 1676 | For information on runtime dependencies, see the |
| 1677 | :term:`RDEPENDS` variable. You can also see the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1678 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 1679 | ":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] | 1680 | BitBake User Manual for additional information on tasks and |
| 1681 | dependencies. |
| 1682 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1683 | :term:`DEPLOY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1684 | Points to the general area that the OpenEmbedded build system uses to |
| 1685 | place images, packages, SDKs, and other output files that are ready |
| 1686 | to be used outside of the build system. By default, this directory |
| 1687 | resides within the :term:`Build Directory` as |
| 1688 | ``${TMPDIR}/deploy``. |
| 1689 | |
| 1690 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1691 | ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1692 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1693 | ":ref:`overview-manual/concepts:images`", |
| 1694 | ":ref:`overview-manual/concepts:package feeds`", and |
| 1695 | ":ref:`overview-manual/concepts:application development sdk`" sections all in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1696 | Yocto Project Overview and Concepts Manual. |
| 1697 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1698 | :term:`DEPLOY_DIR_DEB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1699 | Points to the area that the OpenEmbedded build system uses to place |
| 1700 | Debian packages that are ready to be used outside of the build |
| 1701 | system. This variable applies only when |
| 1702 | :term:`PACKAGE_CLASSES` contains |
| 1703 | "package_deb". |
| 1704 | |
| 1705 | The BitBake configuration file initially defines the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1706 | :term:`DEPLOY_DIR_DEB` variable as a sub-folder of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1707 | :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1708 | |
| 1709 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
| 1710 | |
| 1711 | The :ref:`package_deb <ref-classes-package_deb>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1712 | :term:`DEPLOY_DIR_DEB` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1713 | :ref:`ref-tasks-package_write_deb` task |
| 1714 | writes Debian packages into the appropriate folder. For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1715 | information on how packaging works, see the |
| 1716 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1717 | in the Yocto Project Overview and Concepts Manual. |
| 1718 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1719 | :term:`DEPLOY_DIR_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1720 | Points to the area that the OpenEmbedded build system uses to place |
| 1721 | images and other associated output files that are ready to be |
| 1722 | deployed onto the target machine. The directory is machine-specific |
| 1723 | as it contains the ``${MACHINE}`` name. By default, this directory |
| 1724 | resides within the :term:`Build Directory` as |
| 1725 | ``${DEPLOY_DIR}/images/${MACHINE}/``. |
| 1726 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1727 | It must not be used directly in recipes when deploying files. Instead, |
| 1728 | it's only useful when a recipe needs to "read" a file already deployed |
| 1729 | by a dependency. So, it should be filled with the contents of |
| 1730 | :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or |
| 1731 | with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image |
| 1732 | <ref-classes-image>` class. |
| 1733 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1734 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1735 | ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1736 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1737 | ":ref:`overview-manual/concepts:images`" and |
| 1738 | ":ref:`overview-manual/concepts:application development sdk`" sections both in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1739 | the Yocto Project Overview and Concepts Manual. |
| 1740 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1741 | :term:`DEPLOY_DIR_IPK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1742 | Points to the area that the OpenEmbedded build system uses to place |
| 1743 | IPK packages that are ready to be used outside of the build system. |
| 1744 | This variable applies only when |
| 1745 | :term:`PACKAGE_CLASSES` contains |
| 1746 | "package_ipk". |
| 1747 | |
| 1748 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1749 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1750 | |
| 1751 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
| 1752 | |
| 1753 | The :ref:`package_ipk <ref-classes-package_ipk>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1754 | :term:`DEPLOY_DIR_IPK` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1755 | :ref:`ref-tasks-package_write_ipk` task |
| 1756 | writes IPK packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1757 | on how packaging works, see the |
| 1758 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1759 | in the Yocto Project Overview and Concepts Manual. |
| 1760 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1761 | :term:`DEPLOY_DIR_RPM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1762 | Points to the area that the OpenEmbedded build system uses to place |
| 1763 | RPM packages that are ready to be used outside of the build system. |
| 1764 | This variable applies only when |
| 1765 | :term:`PACKAGE_CLASSES` contains |
| 1766 | "package_rpm". |
| 1767 | |
| 1768 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1769 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1770 | |
| 1771 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
| 1772 | |
| 1773 | The :ref:`package_rpm <ref-classes-package_rpm>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1774 | :term:`DEPLOY_DIR_RPM` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1775 | :ref:`ref-tasks-package_write_rpm` task |
| 1776 | writes RPM packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1777 | on how packaging works, see the |
| 1778 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1779 | in the Yocto Project Overview and Concepts Manual. |
| 1780 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1781 | :term:`DEPLOY_DIR_TAR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1782 | Points to the area that the OpenEmbedded build system uses to place |
| 1783 | tarballs that are ready to be used outside of the build system. This |
| 1784 | variable applies only when |
| 1785 | :term:`PACKAGE_CLASSES` contains |
| 1786 | "package_tar". |
| 1787 | |
| 1788 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1789 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1790 | |
| 1791 | DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" |
| 1792 | |
| 1793 | The :ref:`package_tar <ref-classes-package_tar>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1794 | :term:`DEPLOY_DIR_TAR` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1795 | :ref:`ref-tasks-package_write_tar` task |
| 1796 | writes TAR packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1797 | on how packaging works, see the |
| 1798 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1799 | in the Yocto Project Overview and Concepts Manual. |
| 1800 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1801 | :term:`DEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1802 | When inheriting the :ref:`deploy <ref-classes-deploy>` class, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1803 | :term:`DEPLOYDIR` points to a temporary work area for deployed files that |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1804 | is set in the :ref:`deploy <ref-classes-deploy>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1805 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1806 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1807 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1808 | 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] | 1809 | deployed into :term:`DEPLOYDIR`, and the class will take care of copying |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1810 | them into :term:`DEPLOY_DIR_IMAGE` |
| 1811 | afterwards. |
| 1812 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1813 | :term:`DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1814 | The package description used by package managers. If not set, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1815 | :term:`DESCRIPTION` takes the value of the :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1816 | variable. |
| 1817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1818 | :term:`DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1819 | The short name of the distribution. For information on the long name |
| 1820 | of the distribution, see the :term:`DISTRO_NAME` |
| 1821 | variable. |
| 1822 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1823 | The :term:`DISTRO` variable corresponds to a distribution configuration |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1824 | file whose root name is the same as the variable's argument and whose |
| 1825 | filename extension is ``.conf``. For example, the distribution |
| 1826 | configuration file for the Poky distribution is named ``poky.conf`` |
| 1827 | and resides in the ``meta-poky/conf/distro`` directory of the |
| 1828 | :term:`Source Directory`. |
| 1829 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1830 | Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1831 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1832 | |
| 1833 | DISTRO = "poky" |
| 1834 | |
| 1835 | Distribution configuration files are located in a ``conf/distro`` |
| 1836 | directory within the :term:`Metadata` that contains the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1837 | distribution configuration. The value for :term:`DISTRO` must not contain |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1838 | spaces, and is typically all lower-case. |
| 1839 | |
| 1840 | .. note:: |
| 1841 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1842 | If the :term:`DISTRO` variable is blank, a set of default configurations |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1843 | are used, which are specified within |
| 1844 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1845 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1846 | :term:`DISTRO_CODENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1847 | Specifies a codename for the distribution being built. |
| 1848 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1849 | :term:`DISTRO_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1850 | Specifies a list of distro-specific packages to add to all images. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1851 | This variable takes effect through ``packagegroup-base`` so the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1852 | variable only really applies to the more full-featured images that |
| 1853 | include ``packagegroup-base``. You can use this variable to keep |
| 1854 | distro policy out of generic images. As with all other distro |
| 1855 | variables, you set this variable in the distro ``.conf`` file. |
| 1856 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1857 | :term:`DISTRO_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1858 | Specifies a list of distro-specific packages to add to all images if |
| 1859 | the packages exist. The packages might not exist or be empty (e.g. |
| 1860 | kernel modules). The list of packages are automatically installed but |
| 1861 | you can remove them. |
| 1862 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1863 | :term:`DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1864 | The software support you want in your distribution for various |
| 1865 | features. You define your distribution features in the distribution |
| 1866 | configuration file. |
| 1867 | |
| 1868 | In most cases, the presence or absence of a feature in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1869 | :term:`DISTRO_FEATURES` is translated to the appropriate option supplied |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1870 | to the configure script during the |
| 1871 | :ref:`ref-tasks-configure` task for recipes that |
| 1872 | optionally support the feature. For example, specifying "x11" in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1873 | :term:`DISTRO_FEATURES`, causes every piece of software built for the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1874 | target that can optionally support X11 to have its X11 support |
| 1875 | enabled. |
| 1876 | |
| 1877 | Two more examples are Bluetooth and NFS support. For a more complete |
| 1878 | 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] | 1879 | provide with this variable, see the ":ref:`ref-features-distro`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1880 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1881 | :term:`DISTRO_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1882 | Features to be added to :term:`DISTRO_FEATURES` if not also present in |
| 1883 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1884 | |
| 1885 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1886 | not intended to be user-configurable. It is best to just reference |
| 1887 | the variable to see which distro features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1888 | all distro configurations. See the ":ref:`ref-features-backfill`" section |
| 1889 | for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1890 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1891 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1892 | Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be |
| 1893 | backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1894 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1895 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1896 | :term:`DISTRO_FEATURES_DEFAULT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1897 | A convenience variable that gives you the default list of distro |
| 1898 | features with the exception of any features specific to the C library |
| 1899 | (``libc``). |
| 1900 | |
| 1901 | When creating a custom distribution, you might find it useful to be |
| 1902 | able to reuse the default |
| 1903 | :term:`DISTRO_FEATURES` options without the |
| 1904 | 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] | 1905 | :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1906 | |
| 1907 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" |
| 1908 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1909 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1910 | Specifies a list of features that if present in the target |
| 1911 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1912 | included in :term:`DISTRO_FEATURES` when building native recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1913 | variable is used in addition to the features filtered using the |
| 1914 | :term:`DISTRO_FEATURES_NATIVE` |
| 1915 | variable. |
| 1916 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1917 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1918 | Specifies a list of features that if present in the target |
| 1919 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1920 | included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1921 | variable is used in addition to the features filtered using the |
| 1922 | :term:`DISTRO_FEATURES_NATIVESDK` |
| 1923 | variable. |
| 1924 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1925 | :term:`DISTRO_FEATURES_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1926 | Specifies a list of features that should be included in |
| 1927 | :term:`DISTRO_FEATURES` when building native |
| 1928 | recipes. This variable is used in addition to the features filtered |
| 1929 | using the |
| 1930 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
| 1931 | variable. |
| 1932 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1933 | :term:`DISTRO_FEATURES_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1934 | Specifies a list of features that should be included in |
| 1935 | :term:`DISTRO_FEATURES` when building |
| 1936 | nativesdk recipes. This variable is used in addition to the features |
| 1937 | filtered using the |
| 1938 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
| 1939 | variable. |
| 1940 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1941 | :term:`DISTRO_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1942 | The long name of the distribution. For information on the short name |
| 1943 | of the distribution, see the :term:`DISTRO` variable. |
| 1944 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1945 | The :term:`DISTRO_NAME` variable corresponds to a distribution |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1946 | configuration file whose root name is the same as the variable's |
| 1947 | argument and whose filename extension is ``.conf``. For example, the |
| 1948 | distribution configuration file for the Poky distribution is named |
| 1949 | ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory |
| 1950 | of the :term:`Source Directory`. |
| 1951 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1952 | Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1953 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1954 | |
| 1955 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" |
| 1956 | |
| 1957 | Distribution configuration files are located in a ``conf/distro`` |
| 1958 | directory within the :term:`Metadata` that contains the |
| 1959 | distribution configuration. |
| 1960 | |
| 1961 | .. note:: |
| 1962 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1963 | If the :term:`DISTRO_NAME` variable is blank, a set of default |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1964 | configurations are used, which are specified within |
| 1965 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1966 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1967 | :term:`DISTRO_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1968 | The version of the distribution. |
| 1969 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1970 | :term:`DISTROOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1971 | A colon-separated list of overrides specific to the current |
| 1972 | distribution. By default, this list includes the value of |
| 1973 | :term:`DISTRO`. |
| 1974 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1975 | You can extend :term:`DISTROOVERRIDES` to add extra overrides that should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1976 | apply to the distribution. |
| 1977 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1978 | The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1979 | is included in the default value of |
| 1980 | :term:`OVERRIDES`. |
| 1981 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1982 | :term:`DL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1983 | The central download directory used by the build process to store |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1984 | downloads. By default, :term:`DL_DIR` gets files suitable for mirroring |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1985 | for everything except Git repositories. If you want tarballs of Git |
| 1986 | repositories, use the |
| 1987 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
| 1988 | variable. |
| 1989 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1990 | 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] | 1991 | ``conf/local.conf`` file. This directory is self-maintaining and you |
| 1992 | should not have to touch it. By default, the directory is |
| 1993 | ``downloads`` in the :term:`Build Directory`. |
| 1994 | :: |
| 1995 | |
| 1996 | #DL_DIR ?= "${TOPDIR}/downloads" |
| 1997 | |
| 1998 | To specify a different download directory, |
| 1999 | simply remove the comment from the line and provide your directory. |
| 2000 | |
| 2001 | During a first build, the system downloads many different source code |
| 2002 | tarballs from various upstream projects. Downloading can take a |
| 2003 | while, particularly if your network connection is slow. Tarballs are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2004 | 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] | 2005 | system looks there first to find source tarballs. |
| 2006 | |
| 2007 | .. note:: |
| 2008 | |
| 2009 | When wiping and rebuilding, you can preserve this directory to |
| 2010 | speed up this part of subsequent builds. |
| 2011 | |
| 2012 | You can safely share this directory between multiple builds on the |
| 2013 | same development machine. For additional information on how the build |
| 2014 | process gets source files when working behind a firewall or proxy |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2015 | server, see this specific question in the ":doc:`faq`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2016 | chapter. You can also refer to the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2017 | ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2018 | Wiki page. |
| 2019 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2020 | :term:`DOC_COMPRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2021 | When inheriting the :ref:`compress_doc <ref-classes-compress_doc>` |
| 2022 | class, this variable sets the compression policy used when the |
| 2023 | OpenEmbedded build system compresses man pages and info pages. By |
| 2024 | default, the compression method used is gz (gzip). Other policies |
| 2025 | available are xz and bz2. |
| 2026 | |
| 2027 | For information on policies and on how to use this variable, see the |
| 2028 | comments in the ``meta/classes/compress_doc.bbclass`` file. |
| 2029 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2030 | :term:`EFI_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2031 | When building bootable images (i.e. where ``hddimg``, ``iso``, or |
| 2032 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2033 | :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2034 | default is "grub-efi", but "systemd-boot" can be used instead. |
| 2035 | |
| 2036 | See the :ref:`systemd-boot <ref-classes-systemd-boot>` and |
| 2037 | :ref:`image-live <ref-classes-image-live>` classes for more |
| 2038 | information. |
| 2039 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2040 | :term:`ENABLE_BINARY_LOCALE_GENERATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2041 | Variable that controls which locales for ``glibc`` are generated |
| 2042 | during the build (useful if the target device has 64Mbytes of RAM or |
| 2043 | less). |
| 2044 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2045 | :term:`ERR_REPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2046 | When used with the :ref:`report-error <ref-classes-report-error>` |
| 2047 | class, specifies the path used for storing the debug files created by |
| 2048 | the :ref:`error reporting |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2049 | tool <dev-manual/common-tasks:using the error reporting tool>`, which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2050 | allows you to submit build errors you encounter to a central |
| 2051 | database. By default, the value of this variable is |
| 2052 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. |
| 2053 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2054 | 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] | 2055 | reporting tool to store the debug files as follows in your |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2056 | ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2057 | |
| 2058 | ERR_REPORT_DIR = "path" |
| 2059 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2060 | :term:`ERROR_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2061 | Specifies the quality assurance checks whose failures are reported as |
| 2062 | errors by the OpenEmbedded build system. You set this variable in |
| 2063 | your distribution configuration file. For a list of the checks you |
| 2064 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2065 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2066 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2067 | :term:`ESDK_CLASS_INHERIT_DISABLE` |
| 2068 | A list of classes to remove from the :term:`INHERIT` |
| 2069 | value globally within the extensible SDK configuration. The |
| 2070 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the |
| 2071 | default value:: |
| 2072 | |
| 2073 | ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc" |
| 2074 | |
| 2075 | Some classes are not generally applicable within the extensible SDK |
| 2076 | context. You can use this variable to disable those classes. |
| 2077 | |
| 2078 | For additional information on how to customize the extensible SDK's |
| 2079 | configuration, see the |
| 2080 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2081 | section in the Yocto Project Application Development and the |
| 2082 | Extensible Software Development Kit (eSDK) manual. |
| 2083 | |
| 2084 | :term:`ESDK_LOCALCONF_ALLOW` |
| 2085 | A list of variables allowed through from the OpenEmbedded build |
| 2086 | system configuration into the extensible SDK configuration. By |
| 2087 | default, the list of variables is empty and is set in the |
| 2088 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. |
| 2089 | |
| 2090 | This list overrides the variables specified using the |
| 2091 | :term:`ESDK_LOCALCONF_REMOVE` variable as well as |
| 2092 | other variables automatically added due to the "/" character |
| 2093 | being found at the start of the |
| 2094 | value, which is usually indicative of being a path and thus might not |
| 2095 | be valid on the system where the SDK is installed. |
| 2096 | |
| 2097 | For additional information on how to customize the extensible SDK's |
| 2098 | configuration, see the |
| 2099 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2100 | section in the Yocto Project Application Development and the |
| 2101 | Extensible Software Development Kit (eSDK) manual. |
| 2102 | |
| 2103 | :term:`ESDK_LOCALCONF_REMOVE` |
| 2104 | A list of variables not allowed through from the OpenEmbedded build |
| 2105 | system configuration into the extensible SDK configuration. Usually, |
| 2106 | these are variables that are specific to the machine on which the |
| 2107 | build system is running and thus would be potentially problematic |
| 2108 | within the extensible SDK. |
| 2109 | |
| 2110 | By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the |
| 2111 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and |
| 2112 | excludes the following variables: |
| 2113 | |
| 2114 | - :term:`CONF_VERSION` |
| 2115 | - :term:`BB_NUMBER_THREADS` |
| 2116 | - :term:`BB_NUMBER_PARSE_THREADS` |
| 2117 | - :term:`PARALLEL_MAKE` |
| 2118 | - :term:`PRSERV_HOST` |
| 2119 | - :term:`SSTATE_MIRRORS` :term:`DL_DIR` |
| 2120 | - :term:`SSTATE_DIR` :term:`TMPDIR` |
| 2121 | - :term:`BB_SERVER_TIMEOUT` |
| 2122 | |
| 2123 | For additional information on how to customize the extensible SDK's |
| 2124 | configuration, see the |
| 2125 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2126 | section in the Yocto Project Application Development and the |
| 2127 | Extensible Software Development Kit (eSDK) manual. |
| 2128 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2129 | :term:`EXCLUDE_FROM_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2130 | Triggers the OpenEmbedded build system's shared libraries resolver to |
| 2131 | exclude an entire package when scanning for shared libraries. |
| 2132 | |
| 2133 | .. note:: |
| 2134 | |
| 2135 | The shared libraries resolver's functionality results in part from |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2136 | the internal function ``package_do_shlibs``, which is part of the |
| 2137 | :ref:`ref-tasks-package` task. You should be aware that the shared |
| 2138 | libraries resolver might implicitly define some dependencies between |
| 2139 | packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2140 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2141 | The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2142 | :term:`PRIVATE_LIBS` variable, which excludes a |
| 2143 | package's particular libraries only and not the whole package. |
| 2144 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2145 | 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] | 2146 | particular package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2147 | |
| 2148 | EXCLUDE_FROM_SHLIBS = "1" |
| 2149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2150 | :term:`EXCLUDE_FROM_WORLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2151 | Directs BitBake to exclude a recipe from world builds (i.e. |
| 2152 | ``bitbake world``). During world builds, BitBake locates, parses and |
| 2153 | builds all recipes found in every layer exposed in the |
| 2154 | ``bblayers.conf`` configuration file. |
| 2155 | |
| 2156 | To exclude a recipe from a world build using this variable, set the |
| 2157 | variable to "1" in the recipe. |
| 2158 | |
| 2159 | .. note:: |
| 2160 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2161 | 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] | 2162 | world build in order to satisfy dependencies of other recipes. Adding |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2163 | 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] | 2164 | explicitly added to the list of build targets in a world build. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2165 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2166 | :term:`EXTENDPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2167 | 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] | 2168 | version based on the recipe's :term:`PE` value. If :term:`PE` |
| 2169 | is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that |
| 2170 | value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1"). |
| 2171 | If a recipe's :term:`PE` is not set (the default) or is equal to zero, |
| 2172 | :term:`EXTENDPE` becomes "". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2173 | |
| 2174 | See the :term:`STAMP` variable for an example. |
| 2175 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2176 | :term:`EXTENDPKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2177 | The full package version specification as it appears on the final |
| 2178 | packages produced by a recipe. The variable's value is normally used |
| 2179 | to fix a runtime dependency to the exact same version of another |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2180 | package in the same recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2181 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2182 | RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2183 | |
| 2184 | The dependency relationships are intended to force the package |
| 2185 | manager to upgrade these types of packages in lock-step. |
| 2186 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2187 | :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2188 | When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2189 | tools are not in the source tree. |
| 2190 | |
| 2191 | When kernel tools are available in the tree, they are preferred over |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2192 | any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2193 | variable tells the OpenEmbedded build system to prefer the installed |
| 2194 | external tools. See the |
| 2195 | :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in |
| 2196 | ``meta/classes`` to see how the variable is used. |
| 2197 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2198 | :term:`EXTERNALSRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2199 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2200 | class, this variable points to the source tree, which is outside of |
| 2201 | the OpenEmbedded build system. When set, this variable sets the |
| 2202 | :term:`S` variable, which is what the OpenEmbedded build |
| 2203 | system uses to locate unpacked recipe source code. |
| 2204 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2205 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2206 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2207 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2208 | section in the Yocto Project Development Tasks Manual. |
| 2209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2210 | :term:`EXTERNALSRC_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2211 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2212 | class, this variable points to the directory in which the recipe's |
| 2213 | source code is built, which is outside of the OpenEmbedded build |
| 2214 | system. When set, this variable sets the :term:`B` variable, |
| 2215 | which is what the OpenEmbedded build system uses to locate the Build |
| 2216 | Directory. |
| 2217 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2218 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2219 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2220 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2221 | section in the Yocto Project Development Tasks Manual. |
| 2222 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2223 | :term:`EXTRA_AUTORECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2224 | For recipes inheriting the :ref:`autotools <ref-classes-autotools>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2225 | class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2226 | pass to the ``autoreconf`` command that is executed during the |
| 2227 | :ref:`ref-tasks-configure` task. |
| 2228 | |
| 2229 | The default value is "--exclude=autopoint". |
| 2230 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2231 | :term:`EXTRA_IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2232 | A list of additional features to include in an image. When listing |
| 2233 | more than one feature, separate them with a space. |
| 2234 | |
| 2235 | Typically, you configure this variable in your ``local.conf`` file, |
| 2236 | which is found in the :term:`Build Directory`. |
| 2237 | Although you can use this variable from within a recipe, best |
| 2238 | practices dictate that you do not. |
| 2239 | |
| 2240 | .. note:: |
| 2241 | |
| 2242 | To enable primary features from within the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2243 | :term:`IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2244 | |
| 2245 | Here are some examples of features you can add: |
| 2246 | |
| 2247 | - "dbg-pkgs" - Adds -dbg packages for all installed packages including |
| 2248 | symbol information for debugging and profiling. |
| 2249 | |
| 2250 | - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and |
| 2251 | enables post-installation logging. See the 'allow-empty-password' and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2252 | 'post-install-logging' features in the ":ref:`ref-features-image`" |
| 2253 | section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2254 | - "dev-pkgs" - Adds -dev packages for all installed packages. This is |
| 2255 | useful if you want to develop against the libraries in the image. |
| 2256 | - "read-only-rootfs" - Creates an image whose root filesystem is |
| 2257 | read-only. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2258 | ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2259 | section in the Yocto Project Development Tasks Manual for more |
| 2260 | information |
| 2261 | - "tools-debug" - Adds debugging tools such as gdb and strace. |
| 2262 | - "tools-sdk" - Adds development tools such as gcc, make, |
| 2263 | pkgconfig and so forth. |
| 2264 | - "tools-testapps" - Adds useful testing tools |
| 2265 | such as ts_print, aplay, arecord and so forth. |
| 2266 | |
| 2267 | For a complete list of image features that ships with the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2268 | Project, see the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2269 | |
| 2270 | 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] | 2271 | 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] | 2272 | section in the Yocto Project Development Tasks Manual. |
| 2273 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2274 | :term:`EXTRA_IMAGECMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2275 | Specifies additional options for the image creation command that has |
| 2276 | been specified in :term:`IMAGE_CMD`. When setting |
| 2277 | this variable, use an override for the associated image type. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2278 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2279 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2280 | EXTRA_IMAGECMD:ext3 ?= "-i 4096" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2281 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2282 | :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2283 | A list of recipes to build that do not provide packages for |
| 2284 | installing into the root filesystem. |
| 2285 | |
| 2286 | 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] | 2287 | needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2288 | variable to list these recipes and thus specify the dependencies. A |
| 2289 | typical example is a required bootloader in a machine configuration. |
| 2290 | |
| 2291 | .. note:: |
| 2292 | |
| 2293 | To add packages to the root filesystem, see the various |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 2294 | :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2295 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2296 | :term:`EXTRA_OECMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2297 | Additional `CMake <https://cmake.org/overview/>`__ options. See the |
| 2298 | :ref:`cmake <ref-classes-cmake>` class for additional information. |
| 2299 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2300 | :term:`EXTRA_OECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2301 | Additional ``configure`` script options. See |
| 2302 | :term:`PACKAGECONFIG_CONFARGS` for |
| 2303 | additional information on passing configure script options. |
| 2304 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2305 | :term:`EXTRA_OEMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2306 | Additional GNU ``make`` options. |
| 2307 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2308 | Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2309 | variable to specify any required GNU options. |
| 2310 | |
| 2311 | :term:`PARALLEL_MAKE` and |
| 2312 | :term:`PARALLEL_MAKEINST` also make use of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2313 | :term:`EXTRA_OEMAKE` to pass the required flags. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2315 | :term:`EXTRA_OESCONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2316 | When inheriting the :ref:`scons <ref-classes-scons>` class, this |
| 2317 | variable specifies additional configuration options you want to pass |
| 2318 | to the ``scons`` command line. |
| 2319 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2320 | :term:`EXTRA_USERS_PARAMS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2321 | When inheriting the :ref:`extrausers <ref-classes-extrausers>` |
| 2322 | class, this variable provides image level user and group operations. |
| 2323 | This is a more global method of providing user and group |
| 2324 | configuration as compared to using the |
| 2325 | :ref:`useradd <ref-classes-useradd>` class, which ties user and |
| 2326 | group configurations to a specific recipe. |
| 2327 | |
| 2328 | The set list of commands you can configure using the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2329 | :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] | 2330 | commands map to the normal Unix commands of the same names:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2331 | |
| 2332 | # EXTRA_USERS_PARAMS = "\ |
| 2333 | # useradd -p '' tester; \ |
| 2334 | # groupadd developers; \ |
| 2335 | # userdel nobody; \ |
| 2336 | # groupdel -g video; \ |
| 2337 | # groupmod -g 1020 developers; \ |
| 2338 | # usermod -s /bin/sh tester; \ |
| 2339 | # " |
| 2340 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 2341 | Hardcoded passwords are supported via the ``-p`` parameters for |
| 2342 | ``useradd`` or ``usermod``, but only hashed. |
| 2343 | |
| 2344 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns |
| 2345 | passwords. First on host, create the (escaped) password hash:: |
| 2346 | |
| 2347 | printf "%q" $(mkpasswd -m sha256crypt tester01) |
| 2348 | |
| 2349 | The resulting hash is set to a variable and used in ``useradd`` command parameters:: |
| 2350 | |
| 2351 | inherit extrausers |
| 2352 | PASSWD = "\$X\$ABC123\$A-Long-Hash" |
| 2353 | EXTRA_USERS_PARAMS = "\ |
| 2354 | useradd -p '${PASSWD}' tester-jim; \ |
| 2355 | useradd -p '${PASSWD}' tester-sue; \ |
| 2356 | " |
| 2357 | |
| 2358 | Finally, here is an example that sets the root password:: |
| 2359 | |
| 2360 | inherit extrausers |
| 2361 | EXTRA_USERS_PARAMS = "\ |
| 2362 | usermod -p '${PASSWD}' root; \ |
| 2363 | " |
| 2364 | |
| 2365 | .. note:: |
| 2366 | |
| 2367 | From a security perspective, hardcoding a default password is not |
| 2368 | generally a good idea or even legal in some jurisdictions. It is |
| 2369 | recommended that you do not do this if you are building a production |
| 2370 | image. |
| 2371 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2372 | Additionally there is a special ``passwd-expire`` command that will |
| 2373 | cause the password for a user to be expired and thus force changing it |
| 2374 | on first login, for example:: |
| 2375 | |
| 2376 | EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" |
| 2377 | |
| 2378 | .. note:: |
| 2379 | |
| 2380 | At present, ``passwd-expire`` may only work for remote logins when |
| 2381 | using OpenSSH and not dropbear as an SSH server. |
| 2382 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2383 | :term:`EXTRANATIVEPATH` |
| 2384 | A list of subdirectories of |
| 2385 | ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` |
| 2386 | added to the beginning of the environment variable ``PATH``. As an |
| 2387 | example, the following prepends |
| 2388 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to |
| 2389 | ``PATH``:: |
| 2390 | |
| 2391 | EXTRANATIVEPATH = "foo bar" |
| 2392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2393 | :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2394 | Defines one or more packages to include in an image when a specific |
| 2395 | item is included in :term:`IMAGE_FEATURES`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2396 | When setting the value, :term:`FEATURE_PACKAGES` should have the name of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2397 | the feature item as an override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2398 | |
| 2399 | FEATURE_PACKAGES_widget = "package1 package2" |
| 2400 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2401 | In this example, if "widget" were added to :term:`IMAGE_FEATURES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2402 | package1 and package2 would be included in the image. |
| 2403 | |
| 2404 | .. note:: |
| 2405 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2406 | Packages installed by features defined through :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2407 | are often package groups. While similarly named, you should not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2408 | confuse the :term:`FEATURE_PACKAGES` variable with package groups, which |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2409 | are discussed elsewhere in the documentation. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2410 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2411 | :term:`FEED_DEPLOYDIR_BASE_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2412 | Points to the base URL of the server and location within the |
| 2413 | document-root that provides the metadata and packages required by |
| 2414 | OPKG to support runtime package management of IPK packages. You set |
| 2415 | this variable in your ``local.conf`` file. |
| 2416 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2417 | Consider the following example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2418 | |
| 2419 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" |
| 2420 | |
| 2421 | This example assumes you are serving |
| 2422 | your packages over HTTP and your databases are located in a directory |
| 2423 | named ``BOARD-dir``, which is underneath your HTTP server's |
| 2424 | document-root. In this case, the OpenEmbedded build system generates |
| 2425 | a set of configuration files for you in your target that work with |
| 2426 | the feed. |
| 2427 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2428 | :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2429 | The list of files and directories that are placed in a package. The |
| 2430 | :term:`PACKAGES` variable lists the packages |
| 2431 | generated by a recipe. |
| 2432 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2433 | To use the :term:`FILES` variable, provide a package name override that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2434 | identifies the resulting package. Then, provide a space-separated |
| 2435 | 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] | 2436 | part of the resulting package. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2437 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2438 | FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2439 | |
| 2440 | .. note:: |
| 2441 | |
| 2442 | - When specifying files or paths, you can pattern match using |
| 2443 | Python's |
| 2444 | `glob <https://docs.python.org/3/library/glob.html>`_ |
| 2445 | syntax. For details on the syntax, see the documentation by |
| 2446 | following the previous link. |
| 2447 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2448 | - When specifying paths as part of the :term:`FILES` variable, it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2449 | good practice to use appropriate path variables. For example, |
| 2450 | use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` |
| 2451 | rather than ``/usr/bin``. You can find a list of these |
| 2452 | variables at the top of the ``meta/conf/bitbake.conf`` file in |
| 2453 | the :term:`Source Directory`. You will also |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2454 | find the default values of the various ``FILES:*`` variables in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2455 | this file. |
| 2456 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2457 | 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] | 2458 | editable and you know they should not be overwritten during the |
| 2459 | package update process by the Package Management System (PMS), you |
| 2460 | can identify these files so that the PMS will not overwrite them. See |
| 2461 | the :term:`CONFFILES` variable for information on |
| 2462 | how to identify these files to the PMS. |
| 2463 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2464 | :term:`FILES_SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2465 | Defines the file specification to match |
| 2466 | :term:`SOLIBSDEV`. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2467 | :term:`FILES_SOLIBSDEV` defines the full path name of the development |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2468 | symbolic link (symlink) for shared libraries on the target platform. |
| 2469 | |
| 2470 | The following statement from the ``bitbake.conf`` shows how it is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2471 | set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2472 | |
| 2473 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
| 2474 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2475 | :term:`FILESEXTRAPATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2476 | Extends the search path the OpenEmbedded build system uses when |
| 2477 | looking for files and patches as it processes recipes and append |
| 2478 | files. The default directories BitBake uses when it processes recipes |
| 2479 | are initially defined by the :term:`FILESPATH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2480 | variable. You can extend :term:`FILESPATH` variable by using |
| 2481 | :term:`FILESEXTRAPATHS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2482 | |
| 2483 | Best practices dictate that you accomplish this by using |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2484 | :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2485 | prepend paths as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2486 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2487 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2488 | |
| 2489 | In the above example, the build system first |
| 2490 | looks for files in a directory that has the same name as the |
| 2491 | corresponding append file. |
| 2492 | |
| 2493 | .. note:: |
| 2494 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2495 | When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2496 | expansion (``:=``) operator. Immediate expansion makes sure that |
| 2497 | BitBake evaluates :term:`THISDIR` at the time the |
| 2498 | directive is encountered rather than at some later time when |
| 2499 | expansion might result in a directory that does not contain the |
| 2500 | files you need. |
| 2501 | |
| 2502 | Also, include the trailing separating colon character if you are |
| 2503 | prepending. The trailing colon character is necessary because you |
| 2504 | are directing BitBake to extend the path by prepending directories |
| 2505 | to the search path. |
| 2506 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2507 | Here is another common use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2508 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2509 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2510 | |
| 2511 | In this example, the build system extends the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2512 | :term:`FILESPATH` variable to include a directory named ``files`` that is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2513 | in the same directory as the corresponding append file. |
| 2514 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2515 | This next example specifically adds three paths:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2516 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2517 | FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2518 | |
| 2519 | A final example shows how you can extend the search path and include |
| 2520 | a :term:`MACHINE`-specific override, which is useful |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2521 | in a BSP layer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2522 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2523 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2524 | |
| 2525 | The previous statement appears in the |
| 2526 | ``linux-yocto-dev.bbappend`` file, which is found in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2527 | :ref:`overview-manual/development-environment:yocto project source repositories` in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2528 | ``meta-intel/common/recipes-kernel/linux``. Here, the machine |
| 2529 | override is a special :term:`PACKAGE_ARCH` |
| 2530 | definition for multiple ``meta-intel`` machines. |
| 2531 | |
| 2532 | .. note:: |
| 2533 | |
| 2534 | 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] | 2535 | the value of :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2536 | |
| 2537 | By prepending paths in ``.bbappend`` files, you allow multiple append |
| 2538 | files that reside in different layers but are used for the same |
| 2539 | recipe to correctly extend the path. |
| 2540 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2541 | :term:`FILESOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2542 | A subset of :term:`OVERRIDES` used by the |
| 2543 | OpenEmbedded build system for creating |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2544 | :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2545 | uses overrides to automatically extend the |
| 2546 | :term:`FILESPATH` variable. For an example of how |
| 2547 | that works, see the :term:`FILESPATH` variable |
| 2548 | description. Additionally, you find more information on how overrides |
| 2549 | are handled in the |
| 2550 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 2551 | section of the BitBake User Manual. |
| 2552 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2553 | By default, the :term:`FILESOVERRIDES` variable is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2554 | |
| 2555 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
| 2556 | |
| 2557 | .. note:: |
| 2558 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2559 | Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2560 | with expected overrides and are used in an expected manner by the |
| 2561 | build system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2563 | :term:`FILESPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2564 | The default set of directories the OpenEmbedded build system uses |
| 2565 | when searching for patches and files. |
| 2566 | |
| 2567 | During the build process, BitBake searches each directory in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2568 | :term:`FILESPATH` in the specified order when looking for files and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2569 | patches specified by each ``file://`` URI in a recipe's |
| 2570 | :term:`SRC_URI` statements. |
| 2571 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2572 | The default value for the :term:`FILESPATH` variable is defined in the |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2573 | :ref:`ref-classes-base` class found in ``meta/classes`` in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2574 | :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2575 | |
| 2576 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ |
| 2577 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" |
| 2578 | |
| 2579 | The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2580 | :term:`FILESPATH` variable is automatically extended using the overrides |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2581 | from the :term:`FILESOVERRIDES` variable. |
| 2582 | |
| 2583 | .. note:: |
| 2584 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2585 | - Do not hand-edit the :term:`FILESPATH` variable. If you want the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2586 | build system to look in directories other than the defaults, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2587 | extend the :term:`FILESPATH` variable by using the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2588 | :term:`FILESEXTRAPATHS` variable. |
| 2589 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2590 | - Be aware that the default :term:`FILESPATH` directories do not map |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2591 | to directories in custom layers where append files |
| 2592 | (``.bbappend``) are used. If you want the build system to find |
| 2593 | patches or files that reside with your append files, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2594 | to extend the :term:`FILESPATH` variable by using the |
| 2595 | :term:`FILESEXTRAPATHS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2596 | |
| 2597 | 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] | 2598 | example, consider a case where there is the following directory structure |
| 2599 | for general and machine-specific configurations:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2600 | |
| 2601 | files/defconfig |
| 2602 | files/MACHINEA/defconfig |
| 2603 | files/MACHINEB/defconfig |
| 2604 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2605 | Also in the example, the :term:`SRC_URI` statement contains |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2606 | "file://defconfig". Given this scenario, you can set |
| 2607 | :term:`MACHINE` to "MACHINEA" and cause the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2608 | system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2609 | "MACHINEB" and the build system uses files from ``files/MACHINEB``. |
| 2610 | Finally, for any machine other than "MACHINEA" and "MACHINEB", the |
| 2611 | build system uses files from ``files/defconfig``. |
| 2612 | |
| 2613 | You can find out more about the patching process in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2614 | ":ref:`overview-manual/concepts:patching`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2615 | in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2616 | ":ref:`dev-manual/common-tasks:patching code`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2617 | the Yocto Project Development Tasks Manual. See the |
| 2618 | :ref:`ref-tasks-patch` task as well. |
| 2619 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2620 | :term:`FILESYSTEM_PERMS_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2621 | Allows you to define your own file permissions settings table as part |
| 2622 | of your configuration for the packaging process. For example, suppose |
| 2623 | you need a consistent set of custom permissions for a set of groups |
| 2624 | and users across an entire work project. It is best to do this in the |
| 2625 | packages themselves but this is not always possible. |
| 2626 | |
| 2627 | By default, the OpenEmbedded build system uses the ``fs-perms.txt``, |
| 2628 | which is located in the ``meta/files`` folder in the :term:`Source Directory`. |
| 2629 | If you create your own file |
| 2630 | permissions setting table, you should place it in your layer or the |
| 2631 | distro's layer. |
| 2632 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2633 | You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2634 | ``conf/local.conf`` file, which is found in the :term:`Build Directory`, |
| 2635 | to point to your custom |
| 2636 | ``fs-perms.txt``. You can specify more than a single file permissions |
| 2637 | setting table. The paths you specify to these files must be defined |
| 2638 | within the :term:`BBPATH` variable. |
| 2639 | |
| 2640 | For guidance on how to create your own file permissions settings |
| 2641 | table file, examine the existing ``fs-perms.txt``. |
| 2642 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2643 | :term:`FIT_DESC` |
| 2644 | Specifies the description string encoded into a fitImage. The default |
| 2645 | value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2646 | class as follows:: |
| 2647 | |
| 2648 | FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" |
| 2649 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2650 | :term:`FIT_GENERATE_KEYS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2651 | Decides whether to generate the keys for signing fitImage if they |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2652 | 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] | 2653 | The default value is 0. |
| 2654 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2655 | :term:`FIT_HASH_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2656 | Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256. |
| 2657 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2658 | :term:`FIT_KERNEL_COMP_ALG` |
| 2659 | Compression algorithm to use for the kernel image inside the FIT Image. |
| 2660 | At present, the only supported values are "gzip" (default) or "none" |
| 2661 | If you set this variable to anything other than "none" you may also need |
| 2662 | to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. |
| 2663 | |
| 2664 | :term:`FIT_KERNEL_COMP_ALG_EXTENSION` |
| 2665 | File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default |
| 2666 | value is ".gz". |
| 2667 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2668 | :term:`FIT_KEY_GENRSA_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2669 | Arguments to openssl genrsa for generating RSA private key for signing |
| 2670 | fitImage. The default value is "-F4". i.e. the public exponent 65537 to |
| 2671 | use. |
| 2672 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2673 | :term:`FIT_KEY_REQ_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2674 | Arguments to openssl req for generating certificate for signing fitImage. |
| 2675 | The default value is "-batch -new". batch for non interactive mode |
| 2676 | and new for generating new keys. |
| 2677 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2678 | :term:`FIT_KEY_SIGN_PKCS` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2679 | Format for public key certificate used in signing fitImage. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2680 | The default value is "x509". |
| 2681 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2682 | :term:`FIT_SIGN_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2683 | Specifies the signature algorithm used in creating the FIT Image. |
| 2684 | For e.g. rsa2048. |
| 2685 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2686 | :term:`FIT_SIGN_INDIVIDUAL` |
| 2687 | If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2688 | class will sign the kernel, dtb and ramdisk images individually in addition |
| 2689 | to signing the fitImage itself. This could be useful if you are |
| 2690 | intending to verify signatures in another context than booting via |
| 2691 | U-Boot. |
| 2692 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2693 | :term:`FIT_SIGN_NUMBITS` |
| 2694 | Size of private key in number of bits used in fitImage. The default |
| 2695 | value is "2048". |
| 2696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2697 | :term:`FONT_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2698 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2699 | this variable specifies the runtime dependencies for font packages. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 2700 | By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2701 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2702 | :term:`FONT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2703 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2704 | this variable identifies packages containing font files that need to |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2705 | 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] | 2706 | that fonts are in the recipe's main package (i.e. |
| 2707 | ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you |
| 2708 | need are in a package other than that main package. |
| 2709 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2710 | :term:`FORCE_RO_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2711 | Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` |
| 2712 | during the generation of the root filesystem. |
| 2713 | |
| 2714 | Set the variable to "1" to force the removal of these packages. |
| 2715 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2716 | :term:`FULL_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 2717 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2718 | compiling an optimized system. This variable defaults to "-O2 -pipe |
| 2719 | ${DEBUG_FLAGS}". |
| 2720 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2721 | :term:`GCCPIE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2722 | Enables Position Independent Executables (PIE) within the GNU C |
| 2723 | Compiler (GCC). Enabling PIE in the GCC makes Return Oriented |
| 2724 | Programming (ROP) attacks much more difficult to execute. |
| 2725 | |
| 2726 | By default the ``security_flags.inc`` file enables PIE by setting the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2727 | variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2728 | |
| 2729 | GCCPIE ?= "--enable-default-pie" |
| 2730 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2731 | :term:`GCCVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2732 | Specifies the default version of the GNU C Compiler (GCC) used for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2733 | compilation. By default, :term:`GCCVERSION` is set to "8.x" in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2734 | ``meta/conf/distro/include/tcmode-default.inc`` include file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2735 | |
| 2736 | GCCVERSION ?= "8.%" |
| 2737 | |
| 2738 | You can override this value by setting it in a |
| 2739 | configuration file such as the ``local.conf``. |
| 2740 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2741 | :term:`GDB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2742 | The minimal command and arguments to run the GNU Debugger. |
| 2743 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2744 | :term:`GIR_EXTRA_LIBS_PATH` |
| 2745 | Allows to specify an extra search path for ``.so`` files |
| 2746 | in GLib related recipes using GObject introspection, |
| 2747 | and which do not compile without this setting. |
| 2748 | See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`" |
| 2749 | section for details. |
| 2750 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2751 | :term:`GITDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2752 | The directory in which a local copy of a Git repository is stored |
| 2753 | when it is cloned. |
| 2754 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2755 | :term:`GLIBC_GENERATE_LOCALES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2756 | Specifies the list of GLIBC locales to generate should you not wish |
| 2757 | to generate all LIBC locals, which can be time consuming. |
| 2758 | |
| 2759 | .. note:: |
| 2760 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2761 | If you specifically remove the locale ``en_US.UTF-8``, you must set |
| 2762 | :term:`IMAGE_LINGUAS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2763 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2764 | You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2765 | By default, all locales are generated. |
| 2766 | :: |
| 2767 | |
| 2768 | GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" |
| 2769 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2770 | :term:`GROUPADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2771 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2772 | this variable specifies for a package what parameters should be |
| 2773 | passed to the ``groupadd`` command if you wish to add a group to the |
| 2774 | system when the package is installed. |
| 2775 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2776 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2777 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2778 | GROUPADD_PARAM:${PN} = "-r netdev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2779 | |
| 2780 | For information on the standard Linux shell command |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2781 | ``groupadd``, see https://linux.die.net/man/8/groupadd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2782 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2783 | :term:`GROUPMEMS_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2784 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2785 | this variable specifies for a package what parameters should be |
| 2786 | passed to the ``groupmems`` command if you wish to modify the members |
| 2787 | of a group when the package is installed. |
| 2788 | |
| 2789 | For information on the standard Linux shell command ``groupmems``, |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2790 | see https://linux.die.net/man/8/groupmems. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2791 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2792 | :term:`GRUB_GFXSERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2793 | Configures the GNU GRand Unified Bootloader (GRUB) to have graphics |
| 2794 | and serial in the boot menu. Set this variable to "1" in your |
| 2795 | ``local.conf`` or distribution configuration file to enable graphics |
| 2796 | and serial in the menu. |
| 2797 | |
| 2798 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 2799 | information on how this variable is used. |
| 2800 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2801 | :term:`GRUB_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2802 | Additional options to add to the GNU GRand Unified Bootloader (GRUB) |
| 2803 | configuration. Use a semi-colon character (``;``) to separate |
| 2804 | multiple options. |
| 2805 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2806 | The :term:`GRUB_OPTS` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2807 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2808 | on how this variable is used. |
| 2809 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2810 | :term:`GRUB_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2811 | Specifies the timeout before executing the default ``LABEL`` in the |
| 2812 | GNU GRand Unified Bootloader (GRUB). |
| 2813 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2814 | The :term:`GRUB_TIMEOUT` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2815 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2816 | on how this variable is used. |
| 2817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2818 | :term:`GTKIMMODULES_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2819 | When inheriting the |
| 2820 | :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class, |
| 2821 | this variable specifies the packages that contain the GTK+ input |
| 2822 | method modules being installed when the modules are in packages other |
| 2823 | than the main package. |
| 2824 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2825 | :term:`HOMEPAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2826 | Website where more information about the software the recipe is |
| 2827 | building can be found. |
| 2828 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2829 | :term:`HOST_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2830 | The name of the target architecture, which is normally the same as |
| 2831 | :term:`TARGET_ARCH`. The OpenEmbedded build system |
| 2832 | supports many architectures. Here is an example list of architectures |
| 2833 | supported. This list is by no means complete as the architecture is |
| 2834 | configurable: |
| 2835 | |
| 2836 | - arm |
| 2837 | - i586 |
| 2838 | - x86_64 |
| 2839 | - powerpc |
| 2840 | - powerpc64 |
| 2841 | - mips |
| 2842 | - mipsel |
| 2843 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2844 | :term:`HOST_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2845 | Specifies architecture-specific compiler flags that are passed to the |
| 2846 | C compiler. |
| 2847 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2848 | Default initialization for :term:`HOST_CC_ARCH` varies depending on what |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2849 | is being built: |
| 2850 | |
| 2851 | - :term:`TARGET_CC_ARCH` when building for the |
| 2852 | target |
| 2853 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2854 | - :term:`BUILD_CC_ARCH` when building for the build host (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2855 | ``-native``) |
| 2856 | |
| 2857 | - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. |
| 2858 | ``nativesdk-``) |
| 2859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2860 | :term:`HOST_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2861 | Specifies the name of the target operating system, which is normally |
| 2862 | the same as the :term:`TARGET_OS`. The variable can |
| 2863 | be set to "linux" for ``glibc``-based systems and to "linux-musl" for |
| 2864 | ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and |
| 2865 | "linux-musleabi" values possible. |
| 2866 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2867 | :term:`HOST_PREFIX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2868 | Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2869 | is normally the same as :term:`TARGET_PREFIX`. |
| 2870 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2871 | :term:`HOST_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2872 | Specifies the system, including the architecture and the operating |
| 2873 | system, for which the build is occurring in the context of the |
| 2874 | current recipe. |
| 2875 | |
| 2876 | The OpenEmbedded build system automatically sets this variable based |
| 2877 | on :term:`HOST_ARCH`, |
| 2878 | :term:`HOST_VENDOR`, and |
| 2879 | :term:`HOST_OS` variables. |
| 2880 | |
| 2881 | .. note:: |
| 2882 | |
| 2883 | You do not need to set the variable yourself. |
| 2884 | |
| 2885 | Consider these two examples: |
| 2886 | |
| 2887 | - Given a native recipe on a 32-bit x86 machine running Linux, the |
| 2888 | value is "i686-linux". |
| 2889 | |
| 2890 | - Given a recipe being built for a little-endian MIPS target running |
| 2891 | Linux, the value might be "mipsel-linux". |
| 2892 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2893 | :term:`HOST_VENDOR` |
| 2894 | Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the |
| 2895 | same as :term:`TARGET_VENDOR`. |
| 2896 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2897 | :term:`HOSTTOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2898 | A space-separated list (filter) of tools on the build host that |
| 2899 | should be allowed to be called from within build tasks. Using this |
| 2900 | filter helps reduce the possibility of host contamination. If a tool |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2901 | 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] | 2902 | host, the OpenEmbedded build system produces an error and the build |
| 2903 | is not started. |
| 2904 | |
| 2905 | For additional information, see |
| 2906 | :term:`HOSTTOOLS_NONFATAL`. |
| 2907 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2908 | :term:`HOSTTOOLS_NONFATAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2909 | A space-separated list (filter) of tools on the build host that |
| 2910 | should be allowed to be called from within build tasks. Using this |
| 2911 | filter helps reduce the possibility of host contamination. Unlike |
| 2912 | :term:`HOSTTOOLS`, the OpenEmbedded build system |
| 2913 | 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] | 2914 | :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can |
| 2915 | use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2916 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2917 | :term:`ICECC_CLASS_DISABLE` |
| 2918 | Identifies user classes that you do not want the Icecream distributed |
| 2919 | compile support to consider. This variable is used by the |
| 2920 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2921 | your ``local.conf`` file. |
| 2922 | |
| 2923 | When you list classes using this variable, the recipes inheriting |
| 2924 | those classes will not benefit from distributed compilation across |
| 2925 | remote hosts. Instead they will be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2926 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2927 | :term:`ICECC_DISABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2928 | Disables or enables the ``icecc`` (Icecream) function. For more |
| 2929 | information on this function and best practices for using this |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2930 | variable, see the ":ref:`ref-classes-icecc`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2931 | section. |
| 2932 | |
| 2933 | Setting this variable to "1" in your ``local.conf`` disables the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2934 | function:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2935 | |
| 2936 | ICECC_DISABLED ??= "1" |
| 2937 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2938 | To enable the function, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2939 | |
| 2940 | ICECC_DISABLED = "" |
| 2941 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2942 | :term:`ICECC_ENV_EXEC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2943 | Points to the ``icecc-create-env`` script that you provide. This |
| 2944 | variable is used by the :ref:`icecc <ref-classes-icecc>` class. You |
| 2945 | set this variable in your ``local.conf`` file. |
| 2946 | |
| 2947 | If you do not point to a script that you provide, the OpenEmbedded |
| 2948 | build system uses the default script provided by the |
| 2949 | ``icecc-create-env.bb`` recipe, which is a modified version and not |
| 2950 | the one that comes with ``icecc``. |
| 2951 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2952 | :term:`ICECC_PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2953 | Extra options passed to the ``make`` command during the |
| 2954 | :ref:`ref-tasks-compile` task that specify parallel |
| 2955 | compilation. This variable usually takes the form of "-j x", where x |
| 2956 | represents the maximum number of parallel threads ``make`` can run. |
| 2957 | |
| 2958 | .. note:: |
| 2959 | |
| 2960 | The options passed affect builds on all enabled machines on the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2961 | network, which are machines running the ``iceccd`` daemon. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2962 | |
| 2963 | If your enabled machines support multiple cores, coming up with the |
| 2964 | maximum number of parallel threads that gives you the best |
| 2965 | performance could take some experimentation since machine speed, |
| 2966 | network lag, available memory, and existing machine loads can all |
| 2967 | affect build time. Consequently, unlike the |
| 2968 | :term:`PARALLEL_MAKE` variable, there is no |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2969 | rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2970 | performance. |
| 2971 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2972 | 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] | 2973 | 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] | 2974 | cores as is done with :term:`PARALLEL_MAKE`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2975 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2976 | :term:`ICECC_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2977 | The location of the ``icecc`` binary. You can set this variable in |
| 2978 | your ``local.conf`` file. If your ``local.conf`` file does not define |
| 2979 | this variable, the :ref:`icecc <ref-classes-icecc>` class attempts |
| 2980 | to define it by locating ``icecc`` using ``which``. |
| 2981 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2982 | :term:`ICECC_RECIPE_DISABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2983 | Identifies user recipes that you do not want the Icecream distributed |
| 2984 | compile support to consider. This variable is used by the |
| 2985 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2986 | your ``local.conf`` file. |
| 2987 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2988 | When you list recipes using this variable, you are excluding them |
| 2989 | from distributed compilation across remote hosts. Instead they will |
| 2990 | be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2991 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2992 | :term:`ICECC_RECIPE_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2993 | Identifies user recipes that use an empty |
| 2994 | :term:`PARALLEL_MAKE` variable that you want to |
| 2995 | force remote distributed compilation on using the Icecream |
| 2996 | distributed compile support. This variable is used by the |
| 2997 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2998 | your ``local.conf`` file. |
| 2999 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3000 | :term:`IMAGE_BASENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3001 | The base name of image output files. This variable defaults to the |
| 3002 | recipe name (``${``\ :term:`PN`\ ``}``). |
| 3003 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3004 | :term:`IMAGE_BOOT_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3005 | A space-separated list of files installed into the boot partition |
| 3006 | when preparing an image using the Wic tool with the |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3007 | ``bootimg-partition`` source plugin. By default, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3008 | the files are |
| 3009 | installed under the same name as the source files. To change the |
| 3010 | installed name, separate it from the original name with a semi-colon |
| 3011 | (;). Source files need to be located in |
| 3012 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3013 | examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3014 | |
| 3015 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" |
| 3016 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" |
| 3017 | |
| 3018 | Alternatively, source files can be picked up using a glob pattern. In |
| 3019 | this case, the destination file must have the same name as the base |
| 3020 | name of the source file path. To install files into a directory |
| 3021 | within the target location, pass its name after a semi-colon (;). |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3022 | Here are two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3023 | |
| 3024 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" |
| 3025 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" |
| 3026 | |
| 3027 | The first example |
| 3028 | installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` |
| 3029 | into the root of the target partition. The second example installs |
| 3030 | the same files into a ``boot`` directory within the target partition. |
| 3031 | |
| 3032 | 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] | 3033 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3034 | section of the Yocto Project Development Tasks Manual. Reference |
| 3035 | material for Wic is located in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3036 | ":doc:`/ref-manual/kickstart`" chapter. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3037 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3038 | :term:`IMAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3039 | A list of classes that all images should inherit. You typically use |
| 3040 | this variable to specify the list of classes that register the |
| 3041 | different types of images the OpenEmbedded build system creates. |
| 3042 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3043 | The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3044 | set this variable in your ``local.conf`` or in a distribution |
| 3045 | configuration file. |
| 3046 | |
| 3047 | For more information, see ``meta/classes/image_types.bbclass`` in the |
| 3048 | :term:`Source Directory`. |
| 3049 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3050 | :term:`IMAGE_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3051 | Specifies the command to create the image file for a specific image |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3052 | type, which corresponds to the value set in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3053 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, |
| 3054 | ``btrfs``, and so forth). When setting this variable, you should use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3055 | an override for the associated type. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3056 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3057 | IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3058 | --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3059 | ${EXTRA_IMAGECMD}" |
| 3060 | |
| 3061 | You typically do not need to set this variable unless you are adding |
| 3062 | support for a new image type. For more examples on how to set this |
| 3063 | variable, see the :ref:`image_types <ref-classes-image_types>` |
| 3064 | class file, which is ``meta/classes/image_types.bbclass``. |
| 3065 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3066 | :term:`IMAGE_DEVICE_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3067 | Specifies one or more files that contain custom device tables that |
| 3068 | are passed to the ``makedevs`` command as part of creating an image. |
| 3069 | These files list basic device nodes that should be created under |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3070 | ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3071 | ``files/device_table-minimal.txt`` is used, which is located by |
| 3072 | :term:`BBPATH`. For details on how you should write |
| 3073 | device table files, see ``meta/files/device_table-minimal.txt`` as an |
| 3074 | example. |
| 3075 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3076 | :term:`IMAGE_EFI_BOOT_FILES` |
| 3077 | A space-separated list of files installed into the boot partition |
| 3078 | when preparing an image using the Wic tool with the |
| 3079 | ``bootimg-efi`` source plugin. By default, |
| 3080 | the files are |
| 3081 | installed under the same name as the source files. To change the |
| 3082 | installed name, separate it from the original name with a semi-colon |
| 3083 | (;). Source files need to be located in |
| 3084 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
| 3085 | examples:: |
| 3086 | |
| 3087 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" |
| 3088 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" |
| 3089 | |
| 3090 | Alternatively, source files can be picked up using a glob pattern. In |
| 3091 | this case, the destination file must have the same name as the base |
| 3092 | name of the source file path. To install files into a directory |
| 3093 | within the target location, pass its name after a semi-colon (;). |
| 3094 | Here are two examples:: |
| 3095 | |
| 3096 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" |
| 3097 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" |
| 3098 | |
| 3099 | The first example |
| 3100 | installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` |
| 3101 | into the root of the target partition. The second example installs |
| 3102 | the same files into a ``boot`` directory within the target partition. |
| 3103 | |
| 3104 | You can find information on how to use the Wic tool in the |
| 3105 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
| 3106 | section of the Yocto Project Development Tasks Manual. Reference |
| 3107 | material for Wic is located in the |
| 3108 | ":doc:`/ref-manual/kickstart`" chapter. |
| 3109 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3110 | :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3111 | The primary list of features to include in an image. Typically, you |
| 3112 | configure this variable in an image recipe. Although you can use this |
| 3113 | variable from your ``local.conf`` file, which is found in the |
| 3114 | :term:`Build Directory`, best practices dictate that you do |
| 3115 | not. |
| 3116 | |
| 3117 | .. note:: |
| 3118 | |
| 3119 | To enable extra features from outside the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3120 | :term:`EXTRA_IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3121 | |
| 3122 | 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] | 3123 | the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3124 | |
| 3125 | 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] | 3126 | 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] | 3127 | section in the Yocto Project Development Tasks Manual. |
| 3128 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3129 | :term:`IMAGE_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3130 | Specifies the formats the OpenEmbedded build system uses during the |
| 3131 | build when creating the root filesystem. For example, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3132 | :term:`IMAGE_FSTYPES` as follows causes the build system to create root |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3133 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3134 | |
| 3135 | IMAGE_FSTYPES = "ext3 tar.bz2" |
| 3136 | |
| 3137 | For the complete list of supported image formats from which you can |
| 3138 | choose, see :term:`IMAGE_TYPES`. |
| 3139 | |
| 3140 | .. note:: |
| 3141 | |
| 3142 | - If an image recipe uses the "inherit image" line and you are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3143 | setting :term:`IMAGE_FSTYPES` inside the recipe, you must set |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3144 | :term:`IMAGE_FSTYPES` prior to using the "inherit image" line. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3145 | |
| 3146 | - Due to the way the OpenEmbedded build system processes this |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3147 | variable, you cannot update its contents by using ``:append`` |
| 3148 | or ``:prepend``. You must use the ``+=`` operator to add one or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3149 | more options to the :term:`IMAGE_FSTYPES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3150 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3151 | :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3152 | Used by recipes to specify the packages to install into an image |
| 3153 | through the :ref:`image <ref-classes-image>` class. Use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3154 | :term:`IMAGE_INSTALL` variable with care to avoid ordering issues. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3155 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3156 | Image recipes set :term:`IMAGE_INSTALL` to specify the packages to |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3157 | install into an image through :ref:`ref-classes-image`. Additionally, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3158 | there are "helper" classes such as the |
| 3159 | :ref:`core-image <ref-classes-core-image>` class which can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3160 | take lists used with :term:`IMAGE_FEATURES` and turn them into |
| 3161 | auto-generated entries in :term:`IMAGE_INSTALL` in addition to its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3162 | default contents. |
| 3163 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3164 | 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] | 3165 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3166 | IMAGE_INSTALL:append = " package-name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3167 | |
| 3168 | Be sure to include the space |
| 3169 | between the quotation character and the start of the package name or |
| 3170 | names. |
| 3171 | |
| 3172 | .. note:: |
| 3173 | |
| 3174 | - When working with a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3175 | :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3176 | image, do not use the :term:`IMAGE_INSTALL` variable to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3177 | packages for installation. Instead, use the |
| 3178 | :term:`PACKAGE_INSTALL` variable, which |
| 3179 | allows the initial RAM filesystem (initramfs) recipe to use a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3180 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3181 | For information on creating an initramfs, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3182 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3183 | section in the Yocto Project Development Tasks Manual. |
| 3184 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3185 | - Using :term:`IMAGE_INSTALL` with the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3186 | :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] | 3187 | BitBake operator within the ``/conf/local.conf`` file or from |
| 3188 | within an image recipe is not recommended. Use of this operator |
| 3189 | in these ways can cause ordering issues. Since |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3190 | :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3191 | value using the |
| 3192 | :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] | 3193 | operator, using a ``+=`` operation against :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3194 | results in unexpected behavior when used within |
| 3195 | ``conf/local.conf``. Furthermore, the same operation from |
| 3196 | within an image recipe may or may not succeed depending on the |
| 3197 | specific situation. In both these cases, the behavior is |
| 3198 | contrary to how most users expect the ``+=`` operator to work. |
| 3199 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3200 | :term:`IMAGE_LINGUAS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3201 | Specifies the list of locales to install into the image during the |
| 3202 | root filesystem construction process. The OpenEmbedded build system |
| 3203 | automatically splits locale files, which are used for localization, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3204 | into separate packages. Setting the :term:`IMAGE_LINGUAS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3205 | ensures that any locale packages that correspond to packages already |
| 3206 | selected for installation into the image are also installed. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3207 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3208 | |
| 3209 | IMAGE_LINGUAS = "pt-br de-de" |
| 3210 | |
| 3211 | In this example, the build system ensures any Brazilian Portuguese |
| 3212 | and German locale files that correspond to packages in the image are |
| 3213 | installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as |
| 3214 | ``*-locale-pt`` and ``*-locale-de``, since some software packages |
| 3215 | only provide locale files by language and not by country-specific |
| 3216 | language). |
| 3217 | |
| 3218 | See the :term:`GLIBC_GENERATE_LOCALES` |
| 3219 | variable for information on generating GLIBC locales. |
| 3220 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3221 | |
| 3222 | :term:`IMAGE_LINK_NAME` |
| 3223 | The name of the output image symlink (which does not include |
| 3224 | the version part as :term:`IMAGE_NAME` does). The default value |
| 3225 | is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3226 | variables:: |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3227 | |
| 3228 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" |
| 3229 | |
| 3230 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3231 | :term:`IMAGE_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3232 | The manifest file for the image. This file lists all the installed |
| 3233 | packages that make up the image. The file contains package |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3234 | information on a line-per-package basis as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3235 | |
| 3236 | packagename packagearch version |
| 3237 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3238 | The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3239 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3240 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3241 | IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3242 | |
| 3243 | The location is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3244 | derived using the :term:`IMGDEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3245 | and :term:`IMAGE_NAME` variables. You can find |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3246 | 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] | 3247 | section in the Yocto Project Overview and Concepts Manual. |
| 3248 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3249 | :term:`IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3250 | The name of the output image files minus the extension. This variable |
| 3251 | is derived using the :term:`IMAGE_BASENAME`, |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3252 | :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3253 | variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3254 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3255 | IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3256 | |
| 3257 | :term:`IMAGE_NAME_SUFFIX` |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3258 | Suffix used for the image output filename - defaults to ``".rootfs"`` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3259 | to distinguish the image file from other files created during image |
| 3260 | building; however if this suffix is redundant or not desired you can |
| 3261 | clear the value of this variable (set the value to ""). For example, |
| 3262 | this is typically cleared in initramfs image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3263 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3264 | :term:`IMAGE_OVERHEAD_FACTOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3265 | Defines a multiplier that the build system applies to the initial |
| 3266 | image size for cases when the multiplier times the returned disk |
| 3267 | usage value for the image is greater than the sum of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3268 | :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] | 3269 | the multiplier applied to the initial image size creates free disk |
| 3270 | space in the image as overhead. By default, the build process uses a |
| 3271 | multiplier of 1.3 for this variable. This default value results in |
| 3272 | 30% free disk space added to the image when this method is used to |
| 3273 | determine the final generated image size. You should be aware that |
| 3274 | post install scripts and the package management system uses disk |
| 3275 | space inside this overhead area. Consequently, the multiplier does |
| 3276 | not produce an image with all the theoretical free disk space. See |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3277 | :term:`IMAGE_ROOTFS_SIZE` for information on how the build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3278 | determines the overall image size. |
| 3279 | |
| 3280 | The default 30% free disk space typically gives the image enough room |
| 3281 | to boot and allows for basic post installs while still leaving a |
| 3282 | small amount of free disk space. If 30% free space is inadequate, you |
| 3283 | can increase the default value. For example, the following setting |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3284 | gives you 50% free space added to the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3285 | |
| 3286 | IMAGE_OVERHEAD_FACTOR = "1.5" |
| 3287 | |
| 3288 | Alternatively, you can ensure a specific amount of free disk space is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3289 | added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3290 | variable. |
| 3291 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3292 | :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3293 | Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the |
| 3294 | OpenEmbedded build system. The variable is defined appropriately by |
| 3295 | the :ref:`package_deb <ref-classes-package_deb>`, |
| 3296 | :ref:`package_rpm <ref-classes-package_rpm>`, |
| 3297 | :ref:`package_ipk <ref-classes-package_ipk>`, or |
| 3298 | :ref:`package_tar <ref-classes-package_tar>` class. |
| 3299 | |
| 3300 | .. note:: |
| 3301 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3302 | The ``package_tar`` class is broken and is not supported. It is |
| 3303 | recommended that you do not use it. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3304 | |
| 3305 | The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3306 | :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3307 | for packaging up images and SDKs. |
| 3308 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3309 | You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3310 | variable is set indirectly through the appropriate |
| 3311 | :ref:`package_* <ref-classes-package>` class using the |
| 3312 | :term:`PACKAGE_CLASSES` variable. The |
| 3313 | OpenEmbedded build system uses the first package type (e.g. DEB, RPM, |
| 3314 | or IPK) that appears with the variable |
| 3315 | |
| 3316 | .. note:: |
| 3317 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3318 | Files using the ``.tar`` format are never used as a substitute |
| 3319 | packaging format for DEB, RPM, and IPK formatted files for your image |
| 3320 | or SDK. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3321 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3322 | :term:`IMAGE_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3323 | Specifies a list of functions to call once the OpenEmbedded build |
| 3324 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3325 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3326 | |
| 3327 | IMAGE_POSTPROCESS_COMMAND += "function; ... " |
| 3328 | |
| 3329 | If you need to pass the root filesystem path to a command within the |
| 3330 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3331 | directory that becomes the root filesystem image. See the |
| 3332 | :term:`IMAGE_ROOTFS` variable for more |
| 3333 | information. |
| 3334 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3335 | :term:`IMAGE_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3336 | Specifies a list of functions to call before the OpenEmbedded build |
| 3337 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3338 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3339 | |
| 3340 | IMAGE_PREPROCESS_COMMAND += "function; ... " |
| 3341 | |
| 3342 | If you need to pass the root filesystem path to a command within the |
| 3343 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3344 | directory that becomes the root filesystem image. See the |
| 3345 | :term:`IMAGE_ROOTFS` variable for more |
| 3346 | information. |
| 3347 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3348 | :term:`IMAGE_ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3349 | The location of the root filesystem while it is under construction |
| 3350 | (i.e. during the :ref:`ref-tasks-rootfs` task). This |
| 3351 | variable is not configurable. Do not change it. |
| 3352 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3353 | :term:`IMAGE_ROOTFS_ALIGNMENT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3354 | Specifies the alignment for the output image file in Kbytes. If the |
| 3355 | size of the image is not a multiple of this value, then the size is |
| 3356 | rounded up to the nearest multiple of the value. The default value is |
| 3357 | "1". See :term:`IMAGE_ROOTFS_SIZE` for |
| 3358 | additional information. |
| 3359 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3360 | :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3361 | Defines additional free disk space created in the image in Kbytes. By |
| 3362 | default, this variable is set to "0". This free disk space is added |
| 3363 | to the image after the build system determines the image size as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3364 | described in :term:`IMAGE_ROOTFS_SIZE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3365 | |
| 3366 | This variable is particularly useful when you want to ensure that a |
| 3367 | specific amount of free disk space is available on a device after an |
| 3368 | 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] | 3369 | free disk space is available, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3370 | |
| 3371 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" |
| 3372 | |
| 3373 | For example, the Yocto Project Build Appliance specifically requests |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3374 | 40 Gbytes of extra space with the line:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3375 | |
| 3376 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" |
| 3377 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3378 | :term:`IMAGE_ROOTFS_SIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3379 | Defines the size in Kbytes for the generated image. The OpenEmbedded |
| 3380 | build system determines the final size for the generated image using |
| 3381 | an algorithm that takes into account the initial disk space used for |
| 3382 | the generated image, a requested size for the image, and requested |
| 3383 | additional free disk space to be added to the image. Programatically, |
| 3384 | the build system determines the final size of the generated image as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3385 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3386 | |
| 3387 | if (image-du * overhead) < rootfs-size: |
| 3388 | internal-rootfs-size = rootfs-size + xspace |
| 3389 | else: |
| 3390 | internal-rootfs-size = (image-du * overhead) + xspace |
| 3391 | where: |
| 3392 | image-du = Returned value of the du command on the image. |
| 3393 | overhead = IMAGE_OVERHEAD_FACTOR |
| 3394 | rootfs-size = IMAGE_ROOTFS_SIZE |
| 3395 | internal-rootfs-size = Initial root filesystem size before any modifications. |
| 3396 | xspace = IMAGE_ROOTFS_EXTRA_SPACE |
| 3397 | |
| 3398 | See the :term:`IMAGE_OVERHEAD_FACTOR` |
| 3399 | and :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
| 3400 | variables for related information. |
| 3401 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3402 | :term:`IMAGE_TYPEDEP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3403 | Specifies a dependency from one image type on another. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3404 | example from the :ref:`image-live <ref-classes-image-live>` class:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3405 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3406 | IMAGE_TYPEDEP:live = "ext3" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3407 | |
| 3408 | In the previous example, the variable ensures that when "live" is |
| 3409 | listed with the :term:`IMAGE_FSTYPES` variable, |
| 3410 | the OpenEmbedded build system produces an ``ext3`` image first since |
| 3411 | one of the components of the live image is an ``ext3`` formatted |
| 3412 | partition containing the root filesystem. |
| 3413 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3414 | :term:`IMAGE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3415 | Specifies the complete list of supported image types by default: |
| 3416 | |
| 3417 | - btrfs |
| 3418 | - container |
| 3419 | - cpio |
| 3420 | - cpio.gz |
| 3421 | - cpio.lz4 |
| 3422 | - cpio.lzma |
| 3423 | - cpio.xz |
| 3424 | - cramfs |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3425 | - erofs |
| 3426 | - erofs-lz4 |
| 3427 | - erofs-lz4hc |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3428 | - ext2 |
| 3429 | - ext2.bz2 |
| 3430 | - ext2.gz |
| 3431 | - ext2.lzma |
| 3432 | - ext3 |
| 3433 | - ext3.gz |
| 3434 | - ext4 |
| 3435 | - ext4.gz |
| 3436 | - f2fs |
| 3437 | - hddimg |
| 3438 | - iso |
| 3439 | - jffs2 |
| 3440 | - jffs2.sum |
| 3441 | - multiubi |
| 3442 | - squashfs |
| 3443 | - squashfs-lz4 |
| 3444 | - squashfs-lzo |
| 3445 | - squashfs-xz |
| 3446 | - tar |
| 3447 | - tar.bz2 |
| 3448 | - tar.gz |
| 3449 | - tar.lz4 |
| 3450 | - tar.xz |
| 3451 | - tar.zst |
| 3452 | - ubi |
| 3453 | - ubifs |
| 3454 | - wic |
| 3455 | - wic.bz2 |
| 3456 | - wic.gz |
| 3457 | - wic.lzma |
| 3458 | |
| 3459 | For more information about these types of images, see |
| 3460 | ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`. |
| 3461 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3462 | :term:`IMAGE_VERSION_SUFFIX` |
| 3463 | Version suffix that is part of the default :term:`IMAGE_NAME` and |
| 3464 | :term:`KERNEL_ARTIFACT_NAME` values. |
| 3465 | Defaults to ``"-${DATETIME}"``, however you could set this to a |
| 3466 | version string that comes from your external build environment if |
| 3467 | desired, and this suffix would then be used consistently across |
| 3468 | the build artifacts. |
| 3469 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3470 | :term:`IMGDEPLOYDIR` |
| 3471 | When inheriting the :ref:`image <ref-classes-image>` class directly or |
| 3472 | through the :ref:`core-image <ref-classes-core-image>` class, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3473 | :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3474 | that is set in the ``image`` class as follows:: |
| 3475 | |
| 3476 | IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" |
| 3477 | |
| 3478 | Recipes inheriting the ``image`` class should copy files to be |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3479 | deployed into :term:`IMGDEPLOYDIR`, and the class will take care of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3480 | copying them into :term:`DEPLOY_DIR_IMAGE` afterwards. |
| 3481 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3482 | :term:`INC_PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3483 | Helps define the recipe revision for recipes that share a common |
| 3484 | ``include`` file. You can think of this variable as part of the |
| 3485 | recipe revision as set from within an include file. |
| 3486 | |
| 3487 | Suppose, for example, you have a set of recipes that are used across |
| 3488 | several projects. And, within each of those recipes the revision (its |
| 3489 | :term:`PR` value) is set accordingly. In this case, when |
| 3490 | the revision of those recipes changes, the burden is on you to find |
| 3491 | all those recipes and be sure that they get changed to reflect the |
| 3492 | updated version of the recipe. In this scenario, it can get |
| 3493 | complicated when recipes that are used in many places and provide |
| 3494 | common functionality are upgraded to a new revision. |
| 3495 | |
| 3496 | 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] | 3497 | :term:`INC_PR` variable inside the ``include`` files that the recipes |
| 3498 | 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] | 3499 | help define the recipe revision. |
| 3500 | |
| 3501 | The following provides an example that shows how to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3502 | :term:`INC_PR` variable given a common ``include`` file that defines the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3503 | variable. Once the variable is defined in the ``include`` file, you |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3504 | can use the variable to set the :term:`PR` values in each recipe. You |
| 3505 | will notice that when you set a recipe's :term:`PR` you can provide more |
| 3506 | granular revisioning by appending values to the :term:`INC_PR` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3507 | |
| 3508 | recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" |
| 3509 | recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" |
| 3510 | recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0" |
| 3511 | recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" |
| 3512 | |
| 3513 | The |
| 3514 | first line of the example establishes the baseline revision to be |
| 3515 | used for all recipes that use the ``include`` file. The remaining |
| 3516 | lines in the example are from individual recipes and show how the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3517 | :term:`PR` value is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3518 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3519 | :term:`INCOMPATIBLE_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3520 | Specifies a space-separated list of license names (as they would |
| 3521 | appear in :term:`LICENSE`) that should be excluded |
| 3522 | from the build. Recipes that provide no alternatives to listed |
| 3523 | incompatible licenses are not built. Packages that are individually |
| 3524 | licensed with the specified incompatible licenses will be deleted. |
| 3525 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 3526 | There is some support for wildcards in this variable's value, |
| 3527 | however it is restricted to specific licenses. Currently only |
| 3528 | these wildcards are allowed and expand as follows: |
| 3529 | |
| 3530 | - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later`` |
| 3531 | - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later`` |
| 3532 | - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later`` |
| 3533 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3534 | .. note:: |
| 3535 | |
| 3536 | This functionality is only regularly tested using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3537 | setting:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3538 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3539 | INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3540 | |
| 3541 | |
| 3542 | Although you can use other settings, you might be required to |
| 3543 | remove dependencies on or provide alternatives to components that |
| 3544 | are required to produce a functional system image. |
| 3545 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3546 | :term:`INHERIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3547 | Causes the named class or classes to be inherited globally. Anonymous |
| 3548 | functions in the class or classes are not executed for the base |
| 3549 | configuration and in each individual recipe. The OpenEmbedded build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3550 | system ignores changes to :term:`INHERIT` in individual recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3551 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3552 | For more information on :term:`INHERIT`, see the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3553 | :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 3554 | section in the BitBake User Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3555 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3556 | :term:`INHERIT_DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3557 | Lists classes that will be inherited at the distribution level. It is |
| 3558 | unlikely that you want to edit this variable. |
| 3559 | |
| 3560 | The default value of the variable is set as follows in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3561 | ``meta/conf/distro/defaultsetup.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3562 | |
| 3563 | INHERIT_DISTRO ?= "debian devshell sstate license" |
| 3564 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3565 | :term:`INHIBIT_DEFAULT_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3566 | Prevents the default dependencies, namely the C compiler and standard |
| 3567 | C library (libc), from being added to :term:`DEPENDS`. |
| 3568 | This variable is usually used within recipes that do not require any |
| 3569 | compilation using the C compiler. |
| 3570 | |
| 3571 | Set the variable to "1" to prevent the default dependencies from |
| 3572 | being added. |
| 3573 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3574 | :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3575 | Prevents the OpenEmbedded build system from splitting out debug |
| 3576 | information during packaging. By default, the build system splits out |
| 3577 | debugging information during the |
| 3578 | :ref:`ref-tasks-package` task. For more information on |
| 3579 | how debug information is split out, see the |
| 3580 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
| 3581 | variable. |
| 3582 | |
| 3583 | To prevent the build system from splitting out debug information |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3584 | during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3585 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3586 | |
| 3587 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
| 3588 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3589 | :term:`INHIBIT_PACKAGE_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3590 | If set to "1", causes the build to not strip binaries in resulting |
| 3591 | packages and prevents the ``-dbg`` package from containing the source |
| 3592 | files. |
| 3593 | |
| 3594 | By default, the OpenEmbedded build system strips binaries and puts |
| 3595 | the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3596 | Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3597 | plan to debug in general. |
| 3598 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3599 | :term:`INHIBIT_SYSROOT_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3600 | If set to "1", causes the build to not strip binaries in the |
| 3601 | resulting sysroot. |
| 3602 | |
| 3603 | By default, the OpenEmbedded build system strips binaries in the |
| 3604 | resulting sysroot. When you specifically set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3605 | :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3606 | this stripping. |
| 3607 | |
| 3608 | If you want to use this variable, include the |
| 3609 | :ref:`staging <ref-classes-staging>` class. This class uses a |
| 3610 | ``sys_strip()`` function to test for the variable and acts |
| 3611 | accordingly. |
| 3612 | |
| 3613 | .. note:: |
| 3614 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3615 | Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3616 | special circumstances. For example, suppose you are building |
| 3617 | bare-metal firmware by using an external GCC toolchain. Furthermore, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3618 | even if the toolchain's binaries are strippable, there are other files |
| 3619 | needed for the build that are not strippable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3620 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3621 | :term:`INITRAMFS_DEPLOY_DIR_IMAGE` |
| 3622 | Indicates the deploy directory used by ``do_bundle_initramfs`` where the |
| 3623 | :term:`INITRAMFS_IMAGE` will be fetched from. |
| 3624 | This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the |
| 3625 | :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed |
| 3626 | when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`. |
| 3627 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3628 | :term:`INITRAMFS_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3629 | Defines the format for the output image of an initial RAM filesystem |
| 3630 | (initramfs), which is used during boot. Supported formats are the |
| 3631 | same as those supported by the |
| 3632 | :term:`IMAGE_FSTYPES` variable. |
| 3633 | |
| 3634 | The default value of this variable, which is set in the |
| 3635 | ``meta/conf/bitbake.conf`` configuration file in the |
| 3636 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's |
| 3637 | initramfs mechanism, as opposed to the initial RAM filesystem |
| 3638 | `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects |
| 3639 | an optionally compressed cpio archive. |
| 3640 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3641 | :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3642 | Specifies the :term:`PROVIDES` name of an image |
| 3643 | recipe that is used to build an initial RAM filesystem (initramfs) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3644 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3645 | additional recipe to be built as a dependency to whatever root |
| 3646 | filesystem recipe you might be using (e.g. ``core-image-sato``). The |
| 3647 | initramfs image recipe you provide should set |
| 3648 | :term:`IMAGE_FSTYPES` to |
| 3649 | :term:`INITRAMFS_FSTYPES`. |
| 3650 | |
| 3651 | An initramfs image provides a temporary root filesystem used for |
| 3652 | early system initialization (e.g. loading of modules needed to locate |
| 3653 | and mount the "real" root filesystem). |
| 3654 | |
| 3655 | .. note:: |
| 3656 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3657 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` |
| 3658 | recipe in the :term:`Source Directory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3659 | for an example initramfs recipe. To select this sample recipe as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3660 | the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3661 | to "core-image-minimal-initramfs". |
| 3662 | |
| 3663 | You can also find more information by referencing the |
| 3664 | ``meta-poky/conf/local.conf.sample.extended`` configuration file in |
| 3665 | the Source Directory, the :ref:`image <ref-classes-image>` class, |
| 3666 | and the :ref:`kernel <ref-classes-kernel>` class to see how to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3667 | the :term:`INITRAMFS_IMAGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3668 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3669 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3670 | initramfs image is built. |
| 3671 | |
| 3672 | For more information, you can also see the |
| 3673 | :term:`INITRAMFS_IMAGE_BUNDLE` |
| 3674 | variable, which allows the generated image to be bundled inside the |
| 3675 | kernel image. Additionally, for information on creating an initramfs |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3676 | 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] | 3677 | in the Yocto Project Development Tasks Manual. |
| 3678 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3679 | :term:`INITRAMFS_IMAGE_BUNDLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3680 | Controls whether or not the image recipe specified by |
| 3681 | :term:`INITRAMFS_IMAGE` is run through an |
| 3682 | extra pass |
| 3683 | (:ref:`ref-tasks-bundle_initramfs`) during |
| 3684 | kernel compilation in order to build a single binary that contains |
| 3685 | both the kernel image and the initial RAM filesystem (initramfs) |
| 3686 | image. This makes use of the |
| 3687 | :term:`CONFIG_INITRAMFS_SOURCE` kernel |
| 3688 | feature. |
| 3689 | |
| 3690 | .. note:: |
| 3691 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 3692 | Bundling the initramfs with the kernel conflates the code in the |
| 3693 | initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 |
| 3694 | compatible software may be part of a bundled initramfs. |
| 3695 | |
| 3696 | .. note:: |
| 3697 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3698 | Using an extra compilation pass to bundle the initramfs avoids a |
| 3699 | circular dependency between the kernel recipe and the initramfs |
| 3700 | recipe should the initramfs include kernel modules. Should that be |
| 3701 | the case, the initramfs recipe depends on the kernel for the |
| 3702 | kernel modules, and the kernel depends on the initramfs recipe |
| 3703 | since the initramfs is bundled inside the kernel image. |
| 3704 | |
| 3705 | The combined binary is deposited into the ``tmp/deploy`` directory, |
| 3706 | which is part of the :term:`Build Directory`. |
| 3707 | |
| 3708 | Setting the variable to "1" in a configuration file causes the |
| 3709 | OpenEmbedded build system to generate a kernel image with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3710 | initramfs specified in :term:`INITRAMFS_IMAGE` bundled within:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3711 | |
| 3712 | INITRAMFS_IMAGE_BUNDLE = "1" |
| 3713 | |
| 3714 | By default, the |
| 3715 | :ref:`kernel <ref-classes-kernel>` class sets this variable to a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3716 | null string as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3717 | |
| 3718 | INITRAMFS_IMAGE_BUNDLE ?= "" |
| 3719 | |
| 3720 | .. note:: |
| 3721 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3722 | You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3723 | configuration file. You cannot set the variable in a recipe file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3724 | |
| 3725 | See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3726 | :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3727 | file for additional information. Also, for information on creating an |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3728 | 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] | 3729 | in the Yocto Project Development Tasks Manual. |
| 3730 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3731 | :term:`INITRAMFS_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3732 | The link name of the initial RAM filesystem image. This variable is |
| 3733 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3734 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3735 | |
| 3736 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" |
| 3737 | |
| 3738 | The value of the |
| 3739 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3740 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3741 | |
| 3742 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 3743 | |
| 3744 | See the :term:`MACHINE` variable for additional |
| 3745 | information. |
| 3746 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3747 | :term:`INITRAMFS_MULTICONFIG` |
| 3748 | Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class. |
| 3749 | |
| 3750 | This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from |
| 3751 | a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. |
| 3752 | |
| 3753 | For more information on how to bundle an initramfs image from a separate |
| 3754 | multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`" |
| 3755 | section in the Yocto Project Development Tasks Manual. |
| 3756 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3757 | :term:`INITRAMFS_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3758 | The base name of the initial RAM filesystem image. This variable is |
| 3759 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3760 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3761 | |
| 3762 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" |
| 3763 | |
| 3764 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3765 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3766 | |
| 3767 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3768 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3769 | :term:`INITRD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3770 | Indicates list of filesystem images to concatenate and use as an |
| 3771 | initial RAM disk (``initrd``). |
| 3772 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3773 | The :term:`INITRD` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3774 | :ref:`image-live <ref-classes-image-live>` class. |
| 3775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3776 | :term:`INITRD_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3777 | When building a "live" bootable image (i.e. when |
| 3778 | :term:`IMAGE_FSTYPES` contains "live"), |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3779 | :term:`INITRD_IMAGE` specifies the image recipe that should be built to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3780 | provide the initial RAM disk image. The default value is |
| 3781 | "core-image-minimal-initramfs". |
| 3782 | |
| 3783 | See the :ref:`image-live <ref-classes-image-live>` class for more |
| 3784 | information. |
| 3785 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3786 | :term:`INITSCRIPT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3787 | The filename of the initialization script as installed to |
| 3788 | ``${sysconfdir}/init.d``. |
| 3789 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3790 | 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] | 3791 | The variable is mandatory. |
| 3792 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3793 | :term:`INITSCRIPT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3794 | A list of the packages that contain initscripts. If multiple packages |
| 3795 | are specified, you need to append the package name to the other |
| 3796 | ``INITSCRIPT_*`` as an override. |
| 3797 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3798 | 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] | 3799 | The variable is optional and defaults to the :term:`PN` |
| 3800 | variable. |
| 3801 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3802 | :term:`INITSCRIPT_PARAMS` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3803 | 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] | 3804 | |
| 3805 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." |
| 3806 | |
| 3807 | In this example, the script has a runlevel of 99, starts the script |
| 3808 | in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. |
| 3809 | |
| 3810 | The variable's default value is "defaults", which is set in the |
| 3811 | :ref:`update-rc.d <ref-classes-update-rc.d>` class. |
| 3812 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3813 | The value in :term:`INITSCRIPT_PARAMS` is passed through to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3814 | ``update-rc.d`` command. For more information on valid parameters, |
| 3815 | please see the ``update-rc.d`` manual page at |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3816 | 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] | 3817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3818 | :term:`INSANE_SKIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3819 | Specifies the QA checks to skip for a specific package within a |
| 3820 | recipe. For example, to skip the check for symbolic link ``.so`` |
| 3821 | files in the main package of a recipe, add the following to the |
| 3822 | recipe. The package name override must be used, which in this example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3823 | is ``${PN}``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3824 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3825 | INSANE_SKIP:${PN} += "dev-so" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3826 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3827 | See the ":ref:`ref-classes-insane`" section for a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3828 | list of the valid QA checks you can specify using this variable. |
| 3829 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3830 | :term:`INSTALL_TIMEZONE_FILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3831 | By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3832 | Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3833 | configuration level to disable this behavior. |
| 3834 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3835 | :term:`IPK_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3836 | When the IPK backend is in use and package management is enabled on |
| 3837 | the target, you can use this variable to set up ``opkg`` in the |
| 3838 | target image to point to package feeds on a nominated server. Once |
| 3839 | the feed is established, you can perform installations or upgrades |
| 3840 | using the package manager at runtime. |
| 3841 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3842 | :term:`KARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3843 | Defines the kernel architecture used when assembling the |
| 3844 | configuration. Architectures supported for this release are: |
| 3845 | |
| 3846 | - powerpc |
| 3847 | - i386 |
| 3848 | - x86_64 |
| 3849 | - arm |
| 3850 | - qemu |
| 3851 | - mips |
| 3852 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3853 | 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] | 3854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3855 | :term:`KBRANCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3856 | A regular expression used by the build process to explicitly identify |
| 3857 | the kernel branch that is validated, patched, and configured during a |
| 3858 | build. You must set this variable to ensure the exact kernel branch |
| 3859 | you want is being used by the build process. |
| 3860 | |
| 3861 | Values for this variable are set in the kernel's recipe file and the |
| 3862 | kernel's append file. For example, if you are using the |
| 3863 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3864 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3865 | is set as follows in that kernel recipe file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3866 | |
| 3867 | KBRANCH ?= "standard/base" |
| 3868 | |
| 3869 | This variable is also used from the kernel's append file to identify |
| 3870 | the kernel branch specific to a particular machine or target |
| 3871 | hardware. Continuing with the previous kernel example, the kernel's |
| 3872 | append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the |
| 3873 | BSP layer for a given machine. For example, the append file for the |
| 3874 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA |
| 3875 | machines (``meta-yocto-bsp``) is named |
| 3876 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3877 | Here are the related statements from that append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3878 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3879 | KBRANCH:genericx86 = "standard/base" |
| 3880 | KBRANCH:genericx86-64 = "standard/base" |
| 3881 | KBRANCH:edgerouter = "standard/edgerouter" |
| 3882 | KBRANCH:beaglebone = "standard/beaglebone" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3883 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3884 | The :term:`KBRANCH` statements |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3885 | identify the kernel branch to use when building for each supported |
| 3886 | BSP. |
| 3887 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3888 | :term:`KBUILD_DEFCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3889 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 3890 | class, specifies an "in-tree" kernel configuration file for use |
| 3891 | during a kernel build. |
| 3892 | |
| 3893 | Typically, when using a ``defconfig`` to configure a kernel during a |
| 3894 | build, you place the file in your layer in the same manner as you |
| 3895 | would place patch files and configuration fragment files (i.e. |
| 3896 | "out-of-tree"). However, if you want to use a ``defconfig`` file that |
| 3897 | 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] | 3898 | :term:`KBUILD_DEFCONFIG` variable and append the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3899 | :term:`KMACHINE` variable to point to the |
| 3900 | ``defconfig`` file. |
| 3901 | |
| 3902 | 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] | 3903 | using the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3904 | |
| 3905 | KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file |
| 3906 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3907 | Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3908 | a ``defconfig`` file named "bcm2709_defconfig":: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3909 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3910 | KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3911 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3912 | As an alternative, you can use the following within your append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3913 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3914 | KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3915 | |
| 3916 | For more |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3917 | information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3918 | ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3919 | section in the Yocto Project Linux Kernel Development Manual. |
| 3920 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3921 | :term:`KCONFIG_MODE` |
| 3922 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 3923 | class, specifies the kernel configuration values to use for options |
| 3924 | not specified in the provided ``defconfig`` file. Valid options are:: |
| 3925 | |
| 3926 | KCONFIG_MODE = "alldefconfig" |
| 3927 | KCONFIG_MODE = "allnoconfig" |
| 3928 | |
| 3929 | In ``alldefconfig`` mode the options not explicitly specified will be |
| 3930 | assigned their Kconfig default value. In ``allnoconfig`` mode the |
| 3931 | options not explicitly specified will be disabled in the kernel |
| 3932 | config. |
| 3933 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3934 | 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] | 3935 | the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file |
| 3936 | will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed |
| 3937 | in ``${WORKDIR}`` through a meta-layer will be handled in |
| 3938 | ``allnoconfig`` mode. |
| 3939 | |
| 3940 | An "in-tree" ``defconfig`` file can be selected via the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3941 | :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] | 3942 | be explicitly set. |
| 3943 | |
| 3944 | A ``defconfig`` file compatible with ``allnoconfig`` mode can be |
| 3945 | generated by copying the ``.config`` file from a working Linux kernel |
| 3946 | build, renaming it to ``defconfig`` and placing it into the Linux |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3947 | kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3948 | not need to be explicitly set. |
| 3949 | |
| 3950 | A ``defconfig`` file compatible with ``alldefconfig`` mode can be |
| 3951 | generated using the |
| 3952 | :ref:`ref-tasks-savedefconfig` |
| 3953 | task and placed into the Linux kernel ``${WORKDIR}`` through your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3954 | meta-layer. Explicitely set :term:`KCONFIG_MODE`:: |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3955 | |
| 3956 | KCONFIG_MODE = "alldefconfig" |
| 3957 | |
| 3958 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3959 | :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3960 | Specifies an alternate kernel image type for creation in addition to |
| 3961 | the kernel image type specified using the |
| 3962 | :term:`KERNEL_IMAGETYPE` variable. |
| 3963 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3964 | :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3965 | 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] | 3966 | name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3967 | variable. |
| 3968 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3969 | The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3970 | ``meta/classes/kernel-artifact-names.bbclass`` file, has the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3971 | following default value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3972 | |
| 3973 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3974 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3975 | See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE` |
| 3976 | and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3977 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3978 | :term:`KERNEL_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3979 | A list of classes defining kernel image types that the |
| 3980 | :ref:`kernel <ref-classes-kernel>` class should inherit. You |
| 3981 | typically append this variable to enable extended image types. An |
| 3982 | example is the "kernel-fitimage", which enables fitImage support and |
| 3983 | resides in ``meta/classes/kernel-fitimage.bbclass``. You can register |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3984 | 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] | 3985 | variable. |
| 3986 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 3987 | :term:`KERNEL_DEBUG_TIMESTAMPS` |
| 3988 | If set to "1", enables timestamping functionality during building |
| 3989 | the kernel. The default is "0" to disable this for reproducibility |
| 3990 | reasons. |
| 3991 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3992 | :term:`KERNEL_DEVICETREE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3993 | Specifies the name of the generated Linux kernel device tree (i.e. |
| 3994 | the ``.dtb``) file. |
| 3995 | |
| 3996 | .. note:: |
| 3997 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3998 | There is legacy support for specifying the full path to the device |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3999 | tree. However, providing just the ``.dtb`` file is preferred. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4000 | |
| 4001 | In order to use this variable, the |
| 4002 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 4003 | be inherited. |
| 4004 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4005 | :term:`KERNEL_DTB_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4006 | The link name of the kernel device tree binary (DTB). This variable |
| 4007 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4008 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4009 | |
| 4010 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4011 | |
| 4012 | The |
| 4013 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4014 | the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4015 | |
| 4016 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4017 | |
| 4018 | See the :term:`MACHINE` variable for additional |
| 4019 | information. |
| 4020 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4021 | :term:`KERNEL_DTB_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4022 | The base name of the kernel device tree binary (DTB). This variable |
| 4023 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4024 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4025 | |
| 4026 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4027 | |
| 4028 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4029 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4030 | |
| 4031 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4032 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4033 | :term:`KERNEL_DTC_FLAGS` |
| 4034 | Specifies the ``dtc`` flags that are passed to the Linux kernel build |
| 4035 | system when generating the device trees (via ``DTC_FLAGS`` environment |
| 4036 | variable). |
| 4037 | |
| 4038 | In order to use this variable, the |
| 4039 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 4040 | be inherited. |
| 4041 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4042 | :term:`KERNEL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4043 | Specifies additional ``make`` command-line arguments the OpenEmbedded |
| 4044 | build system passes on when compiling the kernel. |
| 4045 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4046 | :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4047 | Includes additional kernel metadata. In the OpenEmbedded build |
| 4048 | system, the default Board Support Packages (BSPs) |
| 4049 | :term:`Metadata` is provided through the |
| 4050 | :term:`KMACHINE` and :term:`KBRANCH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4051 | variables. You can use the :term:`KERNEL_FEATURES` variable from within |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4052 | the kernel recipe or kernel append file to further add metadata for |
| 4053 | all BSPs or specific BSPs. |
| 4054 | |
| 4055 | The metadata you add through this variable includes config fragments |
| 4056 | and features descriptions, which usually includes patches as well as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4057 | config fragments. You typically override the :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4058 | variable for a specific machine. In this way, you can provide |
| 4059 | validated, but optional, sets of kernel configurations and features. |
| 4060 | |
| 4061 | For example, the following example from the ``linux-yocto-rt_4.12`` |
| 4062 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs |
| 4063 | as well as "virtio" configurations to all QEMU machines. The last two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4064 | statements add specific configurations to targeted machine types:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4065 | |
| 4066 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 4067 | KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" |
| 4068 | KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc" |
| 4069 | KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" |
| 4070 | KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4071 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4072 | :term:`KERNEL_FIT_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4073 | The link name of the kernel flattened image tree (FIT) image. This |
| 4074 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4075 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4076 | |
| 4077 | KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4078 | |
| 4079 | The value of the |
| 4080 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4081 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4082 | |
| 4083 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4084 | |
| 4085 | See the :term:`MACHINE` variable for additional |
| 4086 | information. |
| 4087 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4088 | :term:`KERNEL_FIT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4089 | The base name of the kernel flattened image tree (FIT) image. This |
| 4090 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4091 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4092 | |
| 4093 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4094 | |
| 4095 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4096 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4097 | |
| 4098 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4099 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4100 | :term:`KERNEL_IMAGE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4101 | The link name for the kernel image. This variable is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4102 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4103 | |
| 4104 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4105 | |
| 4106 | The value of |
| 4107 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4108 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4109 | |
| 4110 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4111 | |
| 4112 | See the :term:`MACHINE` variable for additional |
| 4113 | information. |
| 4114 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4115 | :term:`KERNEL_IMAGE_MAXSIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4116 | Specifies the maximum size of the kernel image file in kilobytes. If |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4117 | :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] | 4118 | checked against the set value during the |
| 4119 | :ref:`ref-tasks-sizecheck` task. The task fails if |
| 4120 | the kernel image file is larger than the setting. |
| 4121 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4122 | :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4123 | limited amount of space in which the kernel image must be stored. |
| 4124 | |
| 4125 | By default, this variable is not set, which means the size of the |
| 4126 | kernel image is not checked. |
| 4127 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4128 | :term:`KERNEL_IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4129 | The base name of the kernel image. This variable is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4130 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4131 | |
| 4132 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4133 | |
| 4134 | The value of the |
| 4135 | :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4136 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4137 | |
| 4138 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4139 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4140 | :term:`KERNEL_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4141 | The type of kernel to build for a device, usually set by the machine |
| 4142 | configuration files and defaults to "zImage". This variable is used |
| 4143 | when building the kernel and is passed to ``make`` as the target to |
| 4144 | build. |
| 4145 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4146 | If you want to build an alternate kernel image type in addition to that |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4147 | specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4148 | variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4150 | :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4151 | Lists kernel modules that need to be auto-loaded during boot. |
| 4152 | |
| 4153 | .. note:: |
| 4154 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4155 | This variable replaces the deprecated :term:`module_autoload` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4156 | variable. |
| 4157 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4158 | You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4159 | can be recognized by the kernel recipe or by an out-of-tree kernel |
| 4160 | module recipe (e.g. a machine configuration file, a distribution |
| 4161 | configuration file, an append file for the recipe, or the recipe |
| 4162 | itself). |
| 4163 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4164 | Specify it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4165 | |
| 4166 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" |
| 4167 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4168 | Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4169 | system to populate the ``/etc/modules-load.d/modname.conf`` file with |
| 4170 | the list of modules to be auto-loaded on boot. The modules appear |
| 4171 | 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] | 4172 | case:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4173 | |
| 4174 | KERNEL_MODULE_AUTOLOAD += "module_name" |
| 4175 | |
| 4176 | For information on how to populate the ``modname.conf`` file with |
| 4177 | ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. |
| 4178 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4179 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4180 | Provides a list of modules for which the OpenEmbedded build system |
| 4181 | expects to find ``module_conf_``\ modname values that specify |
| 4182 | configuration for each of the modules. For information on how to |
| 4183 | provide those module configurations, see the |
| 4184 | :term:`module_conf_* <module_conf>` variable. |
| 4185 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4186 | :term:`KERNEL_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4187 | The location of the kernel sources. This variable is set to the value |
| 4188 | of the :term:`STAGING_KERNEL_DIR` within |
| 4189 | the :ref:`module <ref-classes-module>` class. For information on |
| 4190 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4191 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4192 | section in the Yocto Project Linux Kernel Development Manual. |
| 4193 | |
| 4194 | To help maximize compatibility with out-of-tree drivers used to build |
| 4195 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4196 | :term:`KERNEL_SRC` variable, which is identical to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4197 | the :term:`KERNEL_PATH` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4198 | used by external Makefiles to point to the kernel source directory. |
| 4199 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4200 | :term:`KERNEL_SRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4201 | The location of the kernel sources. This variable is set to the value |
| 4202 | of the :term:`STAGING_KERNEL_DIR` within |
| 4203 | the :ref:`module <ref-classes-module>` class. For information on |
| 4204 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4205 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4206 | section in the Yocto Project Linux Kernel Development Manual. |
| 4207 | |
| 4208 | To help maximize compatibility with out-of-tree drivers used to build |
| 4209 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4210 | :term:`KERNEL_PATH` variable, which is identical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4211 | to the :term:`KERNEL_SRC` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4212 | used by external Makefiles to point to the kernel source directory. |
| 4213 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4214 | :term:`KERNEL_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4215 | Specifies the version of the kernel as extracted from ``version.h`` |
| 4216 | or ``utsrelease.h`` within the kernel sources. Effects of setting |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4217 | this variable do not take effect until the kernel has been |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4218 | configured. Consequently, attempting to refer to this variable in |
| 4219 | contexts prior to configuration will not work. |
| 4220 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4221 | :term:`KERNELDEPMODDEPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4222 | Specifies whether the data referenced through |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4223 | :term:`PKGDATA_DIR` is needed or not. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4224 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4225 | 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] | 4226 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4227 | ``initramfs`` recipe. Setting the variable there when the data is not |
| 4228 | needed avoids a potential dependency loop. |
| 4229 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4230 | :term:`KFEATURE_DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4231 | Provides a short description of a configuration fragment. You use |
| 4232 | this variable in the ``.scc`` file that describes a configuration |
| 4233 | 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] | 4234 | to describe SMP being enabled:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4235 | |
| 4236 | define KFEATURE_DESCRIPTION "Enable SMP" |
| 4237 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4238 | :term:`KMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4239 | The machine as known by the kernel. Sometimes the machine name used |
| 4240 | by the kernel does not match the machine name used by the |
| 4241 | OpenEmbedded build system. For example, the machine name that the |
| 4242 | OpenEmbedded build system understands as ``core2-32-intel-common`` |
| 4243 | goes by a different name in the Linux Yocto kernel. The kernel |
| 4244 | understands that machine as ``intel-core2-32``. For cases like these, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4245 | the :term:`KMACHINE` variable maps the kernel machine name to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4246 | OpenEmbedded build system machine name. |
| 4247 | |
| 4248 | These mappings between different names occur in the Yocto Linux |
| 4249 | Kernel's ``meta`` branch. As an example take a look in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4250 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4251 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4252 | LINUX_VERSION:core2-32-intel-common = "3.19.0" |
| 4253 | COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}" |
| 4254 | SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" |
| 4255 | SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" |
| 4256 | KMACHINE:core2-32-intel-common = "intel-core2-32" |
| 4257 | KBRANCH:core2-32-intel-common = "standard/base" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 4258 | KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4259 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4260 | The :term:`KMACHINE` statement says |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4261 | that the kernel understands the machine name as "intel-core2-32". |
| 4262 | However, the OpenEmbedded build system understands the machine as |
| 4263 | "core2-32-intel-common". |
| 4264 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4265 | :term:`KTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4266 | Defines the kernel type to be used in assembling the configuration. |
| 4267 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4268 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4269 | section in the |
| 4270 | Yocto Project Linux Kernel Development Manual for more information on |
| 4271 | kernel types. |
| 4272 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4273 | You define the :term:`KTYPE` variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4274 | :ref:`kernel-dev/advanced:bsp descriptions`. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4275 | value you use must match the value used for the |
| 4276 | :term:`LINUX_KERNEL_TYPE` value used by the |
| 4277 | kernel recipe. |
| 4278 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4279 | :term:`LABELS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4280 | Provides a list of targets for automatic configuration. |
| 4281 | |
| 4282 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 4283 | information on how this variable is used. |
| 4284 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4285 | :term:`LAYERDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4286 | Lists the layers, separated by spaces, on which this recipe depends. |
| 4287 | Optionally, you can specify a specific layer version for a dependency |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4288 | 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] | 4289 | |
| 4290 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" |
| 4291 | |
| 4292 | In this previous example, |
| 4293 | version 3 of "anotherlayer" is compared against |
| 4294 | :term:`LAYERVERSION`\ ``_anotherlayer``. |
| 4295 | |
| 4296 | An error is produced if any dependency is missing or the version |
| 4297 | numbers (if specified) do not match exactly. This variable is used in |
| 4298 | the ``conf/layer.conf`` file and must be suffixed with the name of |
| 4299 | the specific layer (e.g. ``LAYERDEPENDS_mylayer``). |
| 4300 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4301 | :term:`LAYERDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4302 | When used inside the ``layer.conf`` configuration file, this variable |
| 4303 | provides the path of the current layer. This variable is not |
| 4304 | available outside of ``layer.conf`` and references are expanded |
| 4305 | immediately when parsing of the file completes. |
| 4306 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4307 | :term:`LAYERRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4308 | Lists the layers, separated by spaces, recommended for use with this |
| 4309 | layer. |
| 4310 | |
| 4311 | Optionally, you can specify a specific layer version for a |
| 4312 | recommendation by adding the version to the end of the layer name. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4313 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4314 | |
| 4315 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" |
| 4316 | |
| 4317 | In this previous example, version 3 of "anotherlayer" is compared |
| 4318 | against ``LAYERVERSION_anotherlayer``. |
| 4319 | |
| 4320 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4321 | suffixed with the name of the specific layer (e.g. |
| 4322 | ``LAYERRECOMMENDS_mylayer``). |
| 4323 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4324 | :term:`LAYERSERIES_COMPAT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4325 | Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4326 | a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4327 | allows the layer maintainer to indicate which combinations of the |
| 4328 | layer and OE-Core can be expected to work. The variable gives the |
| 4329 | system a way to detect when a layer has not been tested with new |
| 4330 | releases of OE-Core (e.g. the layer is not maintained). |
| 4331 | |
| 4332 | To specify the OE-Core versions for which a layer is compatible, use |
| 4333 | this variable in your layer's ``conf/layer.conf`` configuration file. |
| 4334 | For the list, use the Yocto Project |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4335 | :yocto_wiki:`Release Name </Releases>` (e.g. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4336 | &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4337 | layer, use a space-separated list:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4338 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4339 | 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] | 4340 | |
| 4341 | .. note:: |
| 4342 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4343 | Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4344 | Compatible version 2 standard. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4345 | The OpenEmbedded build system produces a warning if the variable |
| 4346 | is not set for any given layer. |
| 4347 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4348 | See the ":ref:`dev-manual/common-tasks:creating your own layer`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4349 | section in the Yocto Project Development Tasks Manual. |
| 4350 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4351 | :term:`LAYERVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4352 | Optionally specifies the version of a layer as a single number. You |
| 4353 | can use this within :term:`LAYERDEPENDS` for |
| 4354 | another layer in order to depend on a specific version of the layer. |
| 4355 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4356 | suffixed with the name of the specific layer (e.g. |
| 4357 | ``LAYERVERSION_mylayer``). |
| 4358 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4359 | :term:`LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4360 | The minimal command and arguments used to run the linker. |
| 4361 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4362 | :term:`LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4363 | Specifies the flags to pass to the linker. This variable is exported |
| 4364 | to an environment variable and thus made visible to the software |
| 4365 | being built during the compilation step. |
| 4366 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4367 | Default initialization for :term:`LDFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4368 | being built: |
| 4369 | |
| 4370 | - :term:`TARGET_LDFLAGS` when building for the |
| 4371 | target |
| 4372 | |
| 4373 | - :term:`BUILD_LDFLAGS` when building for the |
| 4374 | build host (i.e. ``-native``) |
| 4375 | |
| 4376 | - :term:`BUILDSDK_LDFLAGS` when building for |
| 4377 | an SDK (i.e. ``nativesdk-``) |
| 4378 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4379 | :term:`LEAD_SONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4380 | Specifies the lead (or primary) compiled library file (i.e. ``.so``) |
| 4381 | that the :ref:`debian <ref-classes-debian>` class applies its |
| 4382 | naming policy to given a recipe that packages multiple libraries. |
| 4383 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4384 | 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] | 4385 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4386 | :term:`LIC_FILES_CHKSUM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4387 | Checksums of the license text in the recipe source code. |
| 4388 | |
| 4389 | This variable tracks changes in license text of the source code |
| 4390 | files. If the license text is changed, it will trigger a build |
| 4391 | failure, which gives the developer an opportunity to review any |
| 4392 | license change. |
| 4393 | |
| 4394 | This variable must be defined for all recipes (unless |
| 4395 | :term:`LICENSE` is set to "CLOSED"). |
| 4396 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4397 | 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] | 4398 | section in the Yocto Project Development Tasks Manual. |
| 4399 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4400 | :term:`LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4401 | The list of source licenses for the recipe. Follow these rules: |
| 4402 | |
| 4403 | - Do not use spaces within individual license names. |
| 4404 | |
| 4405 | - Separate license names using \| (pipe) when there is a choice |
| 4406 | between licenses. |
| 4407 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4408 | - Separate license names using & (ampersand) when there are |
| 4409 | multiple licenses for different parts of the source. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4410 | |
| 4411 | - You can use spaces between license names. |
| 4412 | |
| 4413 | - For standard licenses, use the names of the files in |
| 4414 | ``meta/files/common-licenses/`` or the |
| 4415 | :term:`SPDXLICENSEMAP` flag names defined in |
| 4416 | ``meta/conf/licenses.conf``. |
| 4417 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4418 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4419 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4420 | LICENSE = "LGPL-2.1-only | GPL-3.0-only" |
| 4421 | LICENSE = "MPL-1.0 & LGPL-2.1-only" |
| 4422 | LICENSE = "GPL-2.0-or-later" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4423 | |
| 4424 | The first example is from the |
| 4425 | recipes for Qt, which the user may choose to distribute under either |
| 4426 | the LGPL version 2.1 or GPL version 3. The second example is from |
| 4427 | Cairo where two licenses cover different parts of the source code. |
| 4428 | The final example is from ``sysstat``, which presents a single |
| 4429 | license. |
| 4430 | |
| 4431 | You can also specify licenses on a per-package basis to handle |
| 4432 | situations where components of the output have different licenses. |
| 4433 | For example, a piece of software whose code is licensed under GPLv2 |
| 4434 | but has accompanying documentation licensed under the GNU Free |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4435 | Documentation License 1.2 could be specified as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4436 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4437 | LICENSE = "GFDL-1.2 & GPL-2.0-only" |
| 4438 | LICENSE:${PN} = "GPL-2.0.only" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4439 | LICENSE:${PN}-doc = "GFDL-1.2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4440 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4441 | :term:`LICENSE_CREATE_PACKAGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4442 | Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4443 | build system to create an extra package (i.e. |
| 4444 | ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add |
| 4445 | those packages to the |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4446 | :term:`RRECOMMENDS`\ ``:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4447 | |
| 4448 | The ``${PN}-lic`` package installs a directory in |
| 4449 | ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base |
| 4450 | name, and installs files in that directory that contain license and |
| 4451 | copyright information (i.e. copies of the appropriate license files |
| 4452 | from ``meta/common-licenses`` that match the licenses specified in |
| 4453 | the :term:`LICENSE` variable of the recipe metadata |
| 4454 | and copies of files marked in |
| 4455 | :term:`LIC_FILES_CHKSUM` as containing |
| 4456 | license text). |
| 4457 | |
| 4458 | For related information on providing license text, see the |
| 4459 | :term:`COPY_LIC_DIRS` variable, the |
| 4460 | :term:`COPY_LIC_MANIFEST` variable, and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4461 | ":ref:`dev-manual/common-tasks:providing license text`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4462 | section in the Yocto Project Development Tasks Manual. |
| 4463 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4464 | :term:`LICENSE_FLAGS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4465 | Specifies additional flags for a recipe you must allow through |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4466 | :term:`LICENSE_FLAGS_ACCEPTED` in |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4467 | order for the recipe to be built. When providing multiple flags, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4468 | separate them with spaces. |
| 4469 | |
| 4470 | This value is independent of :term:`LICENSE` and is |
| 4471 | typically used to mark recipes that might require additional licenses |
| 4472 | in order to be used in a commercial product. For more information, |
| 4473 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4474 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4475 | section in the Yocto Project Development Tasks Manual. |
| 4476 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4477 | :term:`LICENSE_FLAGS_ACCEPTED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4478 | Lists license flags that when specified in |
| 4479 | :term:`LICENSE_FLAGS` within a recipe should not |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4480 | prevent that recipe from being built. For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4481 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4482 | section in the Yocto Project Development Tasks Manual. |
| 4483 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4484 | :term:`LICENSE_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4485 | Path to additional licenses used during the build. By default, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4486 | OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4487 | directory that holds common license text used during the build. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4488 | :term:`LICENSE_PATH` variable allows you to extend that location to other |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4489 | areas that have additional licenses:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4490 | |
| 4491 | LICENSE_PATH += "path-to-additional-common-licenses" |
| 4492 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4493 | :term:`LINUX_KERNEL_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4494 | Defines the kernel type to be used in assembling the configuration. |
| 4495 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4496 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4497 | section in the |
| 4498 | Yocto Project Linux Kernel Development Manual for more information on |
| 4499 | kernel types. |
| 4500 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4501 | 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] | 4502 | "standard". Together with :term:`KMACHINE`, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4503 | :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4504 | the kernel tools to find the appropriate description within the |
| 4505 | kernel :term:`Metadata` with which to build out the sources |
| 4506 | and configuration. |
| 4507 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4508 | :term:`LINUX_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4509 | The Linux version from ``kernel.org`` on which the Linux kernel image |
| 4510 | being built using the OpenEmbedded build system is based. You define |
| 4511 | this variable in the kernel recipe. For example, the |
| 4512 | ``linux-yocto-3.4.bb`` kernel recipe found in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4513 | ``meta/recipes-kernel/linux`` defines the variables as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4514 | |
| 4515 | LINUX_VERSION ?= "3.4.24" |
| 4516 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4517 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4518 | for the recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4519 | |
| 4520 | PV = "${LINUX_VERSION}+git${SRCPV}" |
| 4521 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4522 | :term:`LINUX_VERSION_EXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4523 | A string extension compiled into the version string of the Linux |
| 4524 | kernel built with the OpenEmbedded build system. You define this |
| 4525 | variable in the kernel recipe. For example, the linux-yocto kernel |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4526 | recipes all define the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4527 | |
| 4528 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
| 4529 | |
| 4530 | Defining this variable essentially sets the Linux kernel |
| 4531 | configuration item ``CONFIG_LOCALVERSION``, which is visible through |
| 4532 | the ``uname`` command. Here is an example that shows the extension |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4533 | assuming it was set as previously shown:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4534 | |
| 4535 | $ uname -r |
| 4536 | 3.7.0-rc8-custom |
| 4537 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4538 | :term:`LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4539 | Specifies the directory to which the OpenEmbedded build system writes |
| 4540 | overall log files. The default directory is ``${TMPDIR}/log``. |
| 4541 | |
| 4542 | For the directory containing logs specific to each task, see the |
| 4543 | :term:`T` variable. |
| 4544 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4545 | :term:`MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4546 | Specifies the target device for which the image is built. You define |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4547 | :term:`MACHINE` in the ``local.conf`` file found in the |
| 4548 | :term:`Build Directory`. By default, :term:`MACHINE` is set to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4549 | "qemux86", which is an x86-based architecture machine to be emulated |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4550 | using QEMU:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4551 | |
| 4552 | MACHINE ?= "qemux86" |
| 4553 | |
| 4554 | The variable corresponds to a machine configuration file of the same |
| 4555 | name, through which machine-specific configurations are set. Thus, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4556 | when :term:`MACHINE` is set to "qemux86", the corresponding |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4557 | ``qemux86.conf`` machine configuration file can be found in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4558 | the :term:`Source Directory` in |
| 4559 | ``meta/conf/machine``. |
| 4560 | |
| 4561 | The list of machines supported by the Yocto Project as shipped |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4562 | include the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4563 | |
| 4564 | MACHINE ?= "qemuarm" |
| 4565 | MACHINE ?= "qemuarm64" |
| 4566 | MACHINE ?= "qemumips" |
| 4567 | MACHINE ?= "qemumips64" |
| 4568 | MACHINE ?= "qemuppc" |
| 4569 | MACHINE ?= "qemux86" |
| 4570 | MACHINE ?= "qemux86-64" |
| 4571 | MACHINE ?= "genericx86" |
| 4572 | MACHINE ?= "genericx86-64" |
| 4573 | MACHINE ?= "beaglebone" |
| 4574 | MACHINE ?= "edgerouter" |
| 4575 | |
| 4576 | The last five are Yocto Project reference hardware |
| 4577 | boards, which are provided in the ``meta-yocto-bsp`` layer. |
| 4578 | |
| 4579 | .. note:: |
| 4580 | |
| 4581 | Adding additional Board Support Package (BSP) layers to your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4582 | configuration adds new possible settings for :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4583 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4584 | :term:`MACHINE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4585 | Specifies the name of the machine-specific architecture. This |
| 4586 | variable is set automatically from :term:`MACHINE` or |
| 4587 | :term:`TUNE_PKGARCH`. You should not hand-edit |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4588 | the :term:`MACHINE_ARCH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4589 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4590 | :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4591 | A list of required machine-specific packages to install as part of |
| 4592 | the image being built. The build process depends on these packages |
| 4593 | being present. Furthermore, because this is a "machine-essential" |
| 4594 | variable, the list of packages are essential for the machine to boot. |
| 4595 | The impact of this variable affects images based on |
| 4596 | ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4597 | image. |
| 4598 | |
| 4599 | This variable is similar to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4600 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4601 | that the image being built has a build dependency on the variable's |
| 4602 | list of packages. In other words, the image will not build if a file |
| 4603 | in this list is not found. |
| 4604 | |
| 4605 | As an example, suppose the machine for which you are building |
| 4606 | requires ``example-init`` to be run during boot to initialize the |
| 4607 | 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] | 4608 | ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4609 | |
| 4610 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" |
| 4611 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4612 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4613 | A list of recommended machine-specific packages to install as part of |
| 4614 | the image being built. The build process does not depend on these |
| 4615 | packages being present. However, because this is a |
| 4616 | "machine-essential" variable, the list of packages are essential for |
| 4617 | the machine to boot. The impact of this variable affects images based |
| 4618 | on ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4619 | image. |
| 4620 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4621 | This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4622 | variable with the exception that the image being built does not have |
| 4623 | a build dependency on the variable's list of packages. In other |
| 4624 | words, the image will still build if a package in this list is not |
| 4625 | found. Typically, this variable is used to handle essential kernel |
| 4626 | modules, whose functionality may be selected to be built into the |
| 4627 | kernel rather than as a module, in which case a package will not be |
| 4628 | produced. |
| 4629 | |
| 4630 | Consider an example where you have a custom kernel where a specific |
| 4631 | touchscreen driver is required for the machine to be usable. However, |
| 4632 | the driver can be built as a module or into the kernel depending on |
| 4633 | the kernel configuration. If the driver is built as a module, you |
| 4634 | want it to be installed. But, when the driver is built into the |
| 4635 | kernel, you still want the build to succeed. This variable sets up a |
| 4636 | "recommends" relationship so that in the latter case, the build will |
| 4637 | not fail due to the missing package. To accomplish this, assuming the |
| 4638 | package for the module was called ``kernel-module-ab123``, you would |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4639 | use the following in the machine's ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4640 | |
| 4641 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
| 4642 | |
| 4643 | .. note:: |
| 4644 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4645 | In this example, the ``kernel-module-ab123`` recipe needs to |
| 4646 | explicitly set its :term:`PACKAGES` variable to ensure that BitBake |
| 4647 | does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to |
| 4648 | satisfy the dependency. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4649 | |
| 4650 | Some examples of these machine essentials are flash, screen, |
| 4651 | keyboard, mouse, or touchscreen drivers (depending on the machine). |
| 4652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4653 | :term:`MACHINE_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4654 | A list of machine-specific packages to install as part of the image |
| 4655 | being built that are not essential for the machine to boot. However, |
| 4656 | the build process for more fully-featured images depends on the |
| 4657 | packages being present. |
| 4658 | |
| 4659 | This variable affects all images based on ``packagegroup-base``, |
| 4660 | which does not include the ``core-image-minimal`` or |
| 4661 | ``core-image-full-cmdline`` images. |
| 4662 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4663 | The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4664 | with the exception that the image being built has a build dependency |
| 4665 | on the variable's list of packages. In other words, the image will |
| 4666 | not build if a file in this list is not found. |
| 4667 | |
| 4668 | An example is a machine that has WiFi capability but is not essential |
| 4669 | for the machine to boot the image. However, if you are building a |
| 4670 | more fully-featured image, you want to enable the WiFi. The package |
| 4671 | containing the firmware for the WiFi hardware is always expected to |
| 4672 | exist, so it is acceptable for the build process to depend upon |
| 4673 | finding the package. In this case, assuming the package for the |
| 4674 | firmware was called ``wifidriver-firmware``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4675 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4676 | |
| 4677 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" |
| 4678 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4679 | :term:`MACHINE_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4680 | A list of machine-specific packages to install as part of the image |
| 4681 | being built that are not essential for booting the machine. The image |
| 4682 | being built has no build dependency on this list of packages. |
| 4683 | |
| 4684 | This variable affects only images based on ``packagegroup-base``, |
| 4685 | which does not include the ``core-image-minimal`` or |
| 4686 | ``core-image-full-cmdline`` images. |
| 4687 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4688 | This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4689 | with the exception that the image being built does not have a build |
| 4690 | dependency on the variable's list of packages. In other words, the |
| 4691 | image will build if a file in this list is not found. |
| 4692 | |
| 4693 | An example is a machine that has WiFi capability but is not essential |
| 4694 | For the machine to boot the image. However, if you are building a |
| 4695 | more fully-featured image, you want to enable WiFi. In this case, the |
| 4696 | package containing the WiFi kernel module will not be produced if the |
| 4697 | WiFi driver is built into the kernel, in which case you still want |
| 4698 | the build to succeed instead of failing as a result of the package |
| 4699 | not being found. To accomplish this, assuming the package for the |
| 4700 | module was called ``kernel-module-examplewifi``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4701 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4702 | |
| 4703 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" |
| 4704 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4705 | :term:`MACHINE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4706 | Specifies the list of hardware features the |
| 4707 | :term:`MACHINE` is capable of supporting. For related |
| 4708 | information on enabling features, see the |
| 4709 | :term:`DISTRO_FEATURES`, |
| 4710 | :term:`COMBINED_FEATURES`, and |
| 4711 | :term:`IMAGE_FEATURES` variables. |
| 4712 | |
| 4713 | For a list of hardware features supported by the Yocto Project as |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4714 | shipped, see the ":ref:`ref-features-machine`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4715 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4716 | :term:`MACHINE_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4717 | Features to be added to :term:`MACHINE_FEATURES` if not also present in |
| 4718 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4719 | |
| 4720 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 4721 | not intended to be user-configurable. It is best to just reference |
| 4722 | the variable to see which machine features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4723 | all machine configurations. See the ":ref:`ref-features-backfill`" |
| 4724 | section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4725 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4726 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4727 | Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be |
| 4728 | backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4729 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4730 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4731 | :term:`MACHINEOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4732 | A colon-separated list of overrides that apply to the current |
| 4733 | machine. By default, this list includes the value of |
| 4734 | :term:`MACHINE`. |
| 4735 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4736 | You can extend :term:`MACHINEOVERRIDES` to add extra overrides that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4737 | should apply to a machine. For example, all machines emulated in QEMU |
| 4738 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named |
| 4739 | ``meta/conf/machine/include/qemu.inc`` that prepends the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4740 | override to :term:`MACHINEOVERRIDES`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4741 | |
| 4742 | MACHINEOVERRIDES =. "qemuall:" |
| 4743 | |
| 4744 | This |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4745 | override allows variables to be overridden for all machines emulated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4746 | in QEMU, like in the following example from the ``connman-conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4747 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4748 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4749 | SRC_URI:append:qemuall = " file://wired.config \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4750 | file://wired-setup \ |
| 4751 | " |
| 4752 | |
| 4753 | The underlying mechanism behind |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4754 | :term:`MACHINEOVERRIDES` is simply that it is included in the default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4755 | value of :term:`OVERRIDES`. |
| 4756 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4757 | :term:`MAINTAINER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4758 | The email address of the distribution maintainer. |
| 4759 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 4760 | :term:`METADATA_BRANCH` |
| 4761 | The branch currently checked out for the OpenEmbedded-Core layer (path |
| 4762 | determined by :term:`COREBASE`). |
| 4763 | |
| 4764 | :term:`METADATA_REVISION` |
| 4765 | The revision currently checked out for the OpenEmbedded-Core layer (path |
| 4766 | determined by :term:`COREBASE`). |
| 4767 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4768 | :term:`MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4769 | Specifies additional paths from which the OpenEmbedded build system |
| 4770 | gets source code. When the build system searches for source code, it |
| 4771 | first tries the local download directory. If that location fails, the |
| 4772 | build system tries locations defined by |
| 4773 | :term:`PREMIRRORS`, the upstream source, and then |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4774 | locations specified by :term:`MIRRORS` in that order. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4775 | |
| 4776 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4777 | the default value for :term:`MIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4778 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 4779 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4780 | :term:`MLPREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4781 | Specifies a prefix has been added to :term:`PN` to create a |
| 4782 | special version of a recipe or package (i.e. a Multilib version). The |
| 4783 | variable is used in places where the prefix needs to be added to or |
| 4784 | removed from a the name (e.g. the :term:`BPN` variable). |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4785 | :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] | 4786 | |
| 4787 | .. note:: |
| 4788 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4789 | The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4790 | historical and comes from a time when ``nativesdk`` was a suffix |
| 4791 | rather than a prefix on the recipe name. When ``nativesdk`` was turned |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4792 | 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] | 4793 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4794 | To help understand when :term:`MLPREFIX` might be needed, consider when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4795 | :term:`BBCLASSEXTEND` is used to provide a |
| 4796 | ``nativesdk`` version of a recipe in addition to the target version. |
| 4797 | If that recipe declares build-time dependencies on tasks in other |
| 4798 | recipes by using :term:`DEPENDS`, then a dependency on |
| 4799 | "foo" will automatically get rewritten to a dependency on |
| 4800 | "nativesdk-foo". However, dependencies like the following will not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4801 | get rewritten automatically:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4802 | |
| 4803 | do_foo[depends] += "recipe:do_foo" |
| 4804 | |
| 4805 | 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] | 4806 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4807 | |
| 4808 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" |
| 4809 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4810 | :term:`module_autoload` |
| 4811 | This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4812 | variable. You should replace all occurrences of :term:`module_autoload` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4813 | with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4814 | |
| 4815 | module_autoload_rfcomm = "rfcomm" |
| 4816 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4817 | should now be replaced with:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4818 | |
| 4819 | KERNEL_MODULE_AUTOLOAD += "rfcomm" |
| 4820 | |
| 4821 | See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. |
| 4822 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4823 | :term:`module_conf` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4824 | Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4825 | syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` |
| 4826 | file. |
| 4827 | |
| 4828 | You can use this variable anywhere that it can be recognized by the |
| 4829 | kernel recipe or out-of-tree kernel module recipe (e.g. a machine |
| 4830 | configuration file, a distribution configuration file, an append file |
| 4831 | for the recipe, or the recipe itself). If you use this variable, you |
| 4832 | must also be sure to list the module name in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4833 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4834 | variable. |
| 4835 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4836 | Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4837 | |
| 4838 | module_conf_module_name = "modprobe.d-syntax" |
| 4839 | |
| 4840 | You must use the kernel module name override. |
| 4841 | |
| 4842 | 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] | 4843 | the exact syntax you want to provide with :term:`module_conf`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4844 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4845 | Including :term:`module_conf` causes the OpenEmbedded build system to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4846 | populate the ``/etc/modprobe.d/modname.conf`` file with |
| 4847 | ``modprobe.d`` syntax lines. Here is an example that adds the options |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4848 | ``arg1`` and ``arg2`` to a module named ``mymodule``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4849 | |
| 4850 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" |
| 4851 | |
| 4852 | For information on how to specify kernel modules to auto-load on |
| 4853 | boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. |
| 4854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4855 | :term:`MODULE_TARBALL_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4856 | Controls creation of the ``modules-*.tgz`` file. Set this variable to |
| 4857 | "0" to disable creation of this file, which contains all of the |
| 4858 | kernel modules resulting from a kernel build. |
| 4859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4860 | :term:`MODULE_TARBALL_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4861 | The link name of the kernel module tarball. This variable is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4862 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4863 | |
| 4864 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4865 | |
| 4866 | The value |
| 4867 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4868 | same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4869 | |
| 4870 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4871 | |
| 4872 | See the :term:`MACHINE` variable for additional information. |
| 4873 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4874 | :term:`MODULE_TARBALL_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4875 | The base name of the kernel module tarball. This variable is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4876 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4877 | |
| 4878 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4879 | |
| 4880 | The value of the :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4881 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4882 | |
| 4883 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4884 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4885 | :term:`MULTIMACH_TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4886 | Uniquely identifies the type of the target system for which packages |
| 4887 | are being built. This variable allows output for different types of |
| 4888 | target systems to be put into different subdirectories of the same |
| 4889 | output directory. |
| 4890 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4891 | The default value of this variable is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4892 | |
| 4893 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} |
| 4894 | |
| 4895 | Some classes (e.g. |
| 4896 | :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4897 | :term:`MULTIMACH_TARGET_SYS` value. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4898 | |
| 4899 | See the :term:`STAMP` variable for an example. See the |
| 4900 | :term:`STAGING_DIR_TARGET` variable for more information. |
| 4901 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4902 | :term:`NATIVELSBSTRING` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4903 | A string identifying the host distribution. Strings consist of the |
| 4904 | host distributor ID followed by the release, as reported by the |
| 4905 | ``lsb_release`` tool or as read from ``/etc/lsb-release``. For |
| 4906 | example, when running a build on Ubuntu 12.10, the value is |
| 4907 | "Ubuntu-12.10". If this information is unable to be determined, the |
| 4908 | value resolves to "Unknown". |
| 4909 | |
| 4910 | This variable is used by default to isolate native shared state |
| 4911 | packages for different distributions (e.g. to avoid problems with |
| 4912 | ``glibc`` version incompatibilities). Additionally, the variable is |
| 4913 | checked against |
| 4914 | :term:`SANITY_TESTED_DISTROS` if that |
| 4915 | variable is set. |
| 4916 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4917 | :term:`NM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4918 | The minimal command and arguments to run ``nm``. |
| 4919 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4920 | :term:`NO_GENERIC_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4921 | 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] | 4922 | recipe. There are packages, such as the linux-firmware package, with many |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4923 | licenses that are not in any way common. Also, new licenses are added |
| 4924 | occasionally to avoid introducing a lot of common license files, |
| 4925 | which are only applicable to a specific package. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4926 | :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] | 4927 | not exist in common licenses. |
| 4928 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4929 | 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] | 4930 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4931 | |
| 4932 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" |
| 4933 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4934 | Here is an example that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4935 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4936 | source:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4937 | |
| 4938 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
| 4939 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4940 | :term:`NO_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4941 | Prevents installation of all "recommended-only" packages. |
| 4942 | Recommended-only packages are packages installed only through the |
| 4943 | :term:`RRECOMMENDS` variable). Setting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4944 | :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4945 | |
| 4946 | NO_RECOMMENDATIONS = "1" |
| 4947 | |
| 4948 | You can set this variable globally in your ``local.conf`` file or you |
| 4949 | 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] | 4950 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4951 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4952 | NO_RECOMMENDATIONS:pn-target_image = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4953 | |
| 4954 | It is important to realize that if you choose to not install packages |
| 4955 | using this variable and some other packages are dependent on them |
| 4956 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 4957 | variable), the OpenEmbedded build system ignores your request and |
| 4958 | will install the packages to avoid dependency errors. |
| 4959 | |
| 4960 | .. note:: |
| 4961 | |
| 4962 | Some recommended packages might be required for certain system |
| 4963 | functionality, such as kernel modules. It is up to you to add |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4964 | packages with the :term:`IMAGE_INSTALL` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4965 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4966 | This variable is only supported when using the IPK and RPM |
| 4967 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4968 | |
| 4969 | See the :term:`BAD_RECOMMENDATIONS` and |
| 4970 | the :term:`PACKAGE_EXCLUDE` variables for |
| 4971 | related information. |
| 4972 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4973 | :term:`NOAUTOPACKAGEDEBUG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4974 | Disables auto package from splitting ``.debug`` files. If a recipe |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4975 | requires ``FILES:${PN}-dbg`` to be set manually, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4976 | :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4977 | content of the debug package. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4978 | |
| 4979 | NOAUTOPACKAGEDEBUG = "1" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4980 | FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" |
| 4981 | FILES:${PN}-dbg = "/usr/src/debug/" |
| 4982 | 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] | 4983 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4984 | :term:`NON_MULTILIB_RECIPES` |
| 4985 | A list of recipes that should not be built for multilib. OE-Core's |
| 4986 | ``multilib.conf`` file defines a reasonable starting point for this |
| 4987 | list with:: |
| 4988 | |
| 4989 | NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot" |
| 4990 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4991 | :term:`OBJCOPY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4992 | The minimal command and arguments to run ``objcopy``. |
| 4993 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4994 | :term:`OBJDUMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4995 | The minimal command and arguments to run ``objdump``. |
| 4996 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4997 | :term:`OE_BINCONFIG_EXTRA_MANGLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4998 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 4999 | this variable specifies additional arguments passed to the "sed" |
| 5000 | command. The sed command alters any paths in configuration scripts |
| 5001 | that have been set up during compilation. Inheriting this class |
| 5002 | results in all paths in these scripts being changed to point into the |
| 5003 | ``sysroots/`` directory so that all builds that use the script will |
| 5004 | use the correct directories for the cross compiling layout. |
| 5005 | |
| 5006 | See the ``meta/classes/binconfig.bbclass`` in the |
| 5007 | :term:`Source Directory` for details on how this class |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5008 | applies these additional sed command arguments. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5009 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5010 | :term:`OE_IMPORTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5011 | An internal variable used to tell the OpenEmbedded build system what |
| 5012 | Python modules to import for every Python function run by the system. |
| 5013 | |
| 5014 | .. note:: |
| 5015 | |
| 5016 | Do not set this variable. It is for internal use only. |
| 5017 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5018 | :term:`OE_INIT_ENV_SCRIPT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5019 | The name of the build environment setup script for the purposes of |
| 5020 | setting up the environment within the extensible SDK. The default |
| 5021 | value is "oe-init-build-env". |
| 5022 | |
| 5023 | 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] | 5024 | :term:`OE_INIT_ENV_SCRIPT` variable to its name. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5025 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5026 | :term:`OE_TERMINAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5027 | Controls how the OpenEmbedded build system spawns interactive |
| 5028 | terminals on the host development system (e.g. using the BitBake |
| 5029 | command with the ``-c devshell`` command-line option). For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5030 | 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] | 5031 | the Yocto Project Development Tasks Manual. |
| 5032 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5033 | You can use the following values for the :term:`OE_TERMINAL` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5034 | |
| 5035 | - auto |
| 5036 | - gnome |
| 5037 | - xfce |
| 5038 | - rxvt |
| 5039 | - screen |
| 5040 | - konsole |
| 5041 | - none |
| 5042 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5043 | :term:`OEROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5044 | The directory from which the top-level build environment setup script |
| 5045 | is sourced. The Yocto Project provides a top-level build environment |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5046 | setup script: :ref:`structure-core-script`. When you run this |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5047 | script, the :term:`OEROOT` variable resolves to the directory that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5048 | contains the script. |
| 5049 | |
| 5050 | For additional information on how this variable is used, see the |
| 5051 | initialization script. |
| 5052 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5053 | :term:`OLDEST_KERNEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5054 | Declares the oldest version of the Linux kernel that the produced |
| 5055 | binaries must support. This variable is passed into the build of the |
| 5056 | Embedded GNU C Library (``glibc``). |
| 5057 | |
| 5058 | The default for this variable comes from the |
| 5059 | ``meta/conf/bitbake.conf`` configuration file. You can override this |
| 5060 | default by setting the variable in a custom distribution |
| 5061 | configuration file. |
| 5062 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5063 | :term:`OVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5064 | A colon-separated list of overrides that currently apply. Overrides |
| 5065 | are a BitBake mechanism that allows variables to be selectively |
| 5066 | overridden at the end of parsing. The set of overrides in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5067 | :term:`OVERRIDES` represents the "state" during building, which includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5068 | the current recipe being built, the machine for which it is being |
| 5069 | built, and so forth. |
| 5070 | |
| 5071 | 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] | 5072 | the colon-separated list in :term:`OVERRIDES`, then the following |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5073 | assignment will override ``FOO`` with the value "overridden" at the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5074 | end of parsing:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5075 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5076 | FOO:an-override = "overridden" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5077 | |
| 5078 | See the |
| 5079 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 5080 | section in the BitBake User Manual for more information on the |
| 5081 | overrides mechanism. |
| 5082 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5083 | The default value of :term:`OVERRIDES` includes the values of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5084 | :term:`CLASSOVERRIDE`, |
| 5085 | :term:`MACHINEOVERRIDES`, and |
| 5086 | :term:`DISTROOVERRIDES` variables. Another |
| 5087 | important override included by default is ``pn-${PN}``. This override |
| 5088 | allows variables to be set for a single recipe within configuration |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5089 | (``.conf``) files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5090 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5091 | FOO:pn-myrecipe = "myrecipe-specific value" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5092 | |
| 5093 | .. note:: |
| 5094 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5095 | 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] | 5096 | in the output of the ``bitbake -e`` command. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5097 | ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5098 | Project Development Tasks Manual for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5099 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5100 | :term:`P` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5101 | The recipe name and version. :term:`P` is comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5102 | |
| 5103 | ${PN}-${PV} |
| 5104 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5105 | :term:`PACKAGE_ADD_METADATA` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5106 | This variable defines additional metadata to add to packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5107 | |
| 5108 | You may find you need to inject additional metadata into packages. |
| 5109 | This variable allows you to do that by setting the injected data as |
| 5110 | the value. Multiple fields can be added by splitting the content with |
| 5111 | the literal separator "\n". |
| 5112 | |
| 5113 | The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable |
| 5114 | to do package type specific settings. It can also be made package |
| 5115 | specific by using the package name as a suffix. |
| 5116 | |
| 5117 | You can find out more about applying this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5118 | ":ref:`dev-manual/common-tasks:adding custom metadata to packages`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5119 | section in the Yocto Project Development Tasks Manual. |
| 5120 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5121 | :term:`PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5122 | The architecture of the resulting package or packages. |
| 5123 | |
| 5124 | By default, the value of this variable is set to |
| 5125 | :term:`TUNE_PKGARCH` when building for the |
| 5126 | target, :term:`BUILD_ARCH` when building for the |
| 5127 | build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the |
| 5128 | SDK. |
| 5129 | |
| 5130 | .. note:: |
| 5131 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5132 | See :term:`SDK_ARCH` for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5133 | |
| 5134 | However, if your recipe's output packages are built specific to the |
| 5135 | target machine rather than generally for the architecture of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5136 | machine, you should set :term:`PACKAGE_ARCH` to the value of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5137 | :term:`MACHINE_ARCH` in the recipe as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5138 | |
| 5139 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 5140 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5141 | :term:`PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5142 | Specifies a list of architectures compatible with the target machine. |
| 5143 | This variable is set automatically and should not normally be |
| 5144 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5145 | of priority. The default value for :term:`PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5146 | noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". |
| 5147 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5148 | :term:`PACKAGE_BEFORE_PN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5149 | Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5150 | that those added packages can pick up files that would normally be |
| 5151 | included in the default package. |
| 5152 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5153 | :term:`PACKAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5154 | This variable, which is set in the ``local.conf`` configuration file |
| 5155 | found in the ``conf`` folder of the |
| 5156 | :term:`Build Directory`, specifies the package manager the |
| 5157 | OpenEmbedded build system uses when packaging data. |
| 5158 | |
| 5159 | You can provide one or more of the following arguments for the |
| 5160 | variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk |
| 5161 | package_tar" |
| 5162 | |
| 5163 | .. note:: |
| 5164 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5165 | While it is a legal option, the ``package_tar`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5166 | class has limited functionality due to no support for package |
| 5167 | dependencies by that backend. Therefore, it is recommended that |
| 5168 | you do not use it. |
| 5169 | |
| 5170 | The build system uses only the first argument in the list as the |
| 5171 | package manager when creating your image or SDK. However, packages |
| 5172 | will be created using any additional packaging classes you specify. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5173 | For example, if you use the following in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5174 | |
| 5175 | PACKAGE_CLASSES ?= "package_ipk" |
| 5176 | |
| 5177 | The OpenEmbedded build system uses |
| 5178 | the IPK package manager to create your image or SDK. |
| 5179 | |
| 5180 | For information on packaging and build performance effects as a |
| 5181 | result of the package manager in use, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5182 | ":ref:`ref-classes-package`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5183 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5184 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5185 | Determines how to split up and package debug and source information |
| 5186 | when creating debugging packages to be used with the GNU Project |
| 5187 | Debugger (GDB). In general, based on the value of this variable, |
| 5188 | you can combine the source and debug info in a single package, |
| 5189 | you can break out the source into a separate package that can be |
| 5190 | installed independently, or you can choose to not have the source |
| 5191 | packaged at all. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5192 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5193 | The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5194 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5195 | - "``.debug``": All debugging and source info is placed in a single |
| 5196 | ``*-dbg`` package; debug symbol files are placed next to the |
| 5197 | binary in a ``.debug`` directory so that, if a binary is installed |
| 5198 | into ``/bin``, the corresponding debug symbol file is installed |
| 5199 | in ``/bin/.debug``. Source files are installed in the same ``*-dbg`` |
| 5200 | package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5201 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5202 | - "``debug-file-directory``": As above, all debugging and source info |
| 5203 | is placed in a single ``*-dbg`` package; debug symbol files are |
| 5204 | placed entirely under the directory ``/usr/lib/debug`` and separated |
| 5205 | by the path from where the binary is installed, so that if a binary |
| 5206 | is installed in ``/bin``, the corresponding debug symbols are installed |
| 5207 | in ``/usr/lib/debug/bin``, and so on. As above, source is installed |
| 5208 | in the same package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5209 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5210 | - "``debug-with-srcpkg``": Debugging info is placed in the standard |
| 5211 | ``*-dbg`` package as with the ``.debug`` value, while source is |
| 5212 | placed in a separate ``*-src`` package, which can be installed |
| 5213 | independently. This is the default setting for this variable, |
| 5214 | as defined in Poky's ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5215 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5216 | - "``debug-without-src``": The same behavior as with the ``.debug`` |
| 5217 | setting, but no source is packaged at all. |
| 5218 | |
| 5219 | .. note:: |
| 5220 | |
| 5221 | Much of the above package splitting can be overridden via |
| 5222 | use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5223 | |
| 5224 | You can find out more about debugging using GDB by reading the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5225 | ":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] | 5226 | in the Yocto Project Development Tasks Manual. |
| 5227 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5228 | :term:`PACKAGE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5229 | Lists packages that should not be installed into an image. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5230 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5231 | |
| 5232 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." |
| 5233 | |
| 5234 | You can set this variable globally in your ``local.conf`` file or you |
| 5235 | 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] | 5236 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5237 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5238 | PACKAGE_EXCLUDE:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5239 | |
| 5240 | If you choose to not install a package using this variable and some |
| 5241 | other package is dependent on it (i.e. listed in a recipe's |
| 5242 | :term:`RDEPENDS` variable), the OpenEmbedded build |
| 5243 | system generates a fatal installation error. Because the build system |
| 5244 | halts the process with a fatal error, you can use the variable with |
| 5245 | an iterative development process to remove specific components from a |
| 5246 | system. |
| 5247 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5248 | This variable is supported only when using the IPK and RPM |
| 5249 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5250 | |
| 5251 | See the :term:`NO_RECOMMENDATIONS` and the |
| 5252 | :term:`BAD_RECOMMENDATIONS` variables for |
| 5253 | related information. |
| 5254 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5255 | :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` |
| 5256 | Prevents specific packages from being installed when you are |
| 5257 | installing complementary packages. |
| 5258 | |
| 5259 | You might find that you want to prevent installing certain packages |
| 5260 | when you are installing complementary packages. For example, if you |
| 5261 | are using :term:`IMAGE_FEATURES` to install |
| 5262 | ``dev-pkgs``, you might not want to install all packages from a |
| 5263 | particular multilib. If you find yourself in this situation, you can |
| 5264 | use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular |
| 5265 | expressions to match the packages you want to exclude. |
| 5266 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5267 | :term:`PACKAGE_EXTRA_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5268 | Specifies the list of architectures compatible with the device CPU. |
| 5269 | This variable is useful when you build for several different devices |
| 5270 | that use miscellaneous processors such as XScale and ARM926-EJS. |
| 5271 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5272 | :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5273 | Optionally specifies the package architectures used as part of the |
| 5274 | package feed URIs during the build. When used, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5275 | :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5276 | URI, which is constructed using the |
| 5277 | :term:`PACKAGE_FEED_URIS` and |
| 5278 | :term:`PACKAGE_FEED_BASE_PATHS` |
| 5279 | variables. |
| 5280 | |
| 5281 | .. note:: |
| 5282 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5283 | You can use the :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5284 | variable to allow specific package architectures. If you do |
| 5285 | not need to allow specific architectures, which is a common |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5286 | case, you can omit this variable. Omitting the variable results in |
| 5287 | all available architectures for the current machine being included |
| 5288 | into remote package feeds. |
| 5289 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5290 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5291 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5292 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5293 | |
| 5294 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5295 | https://example.com/packagerepos/updates" |
| 5296 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5297 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5298 | |
| 5299 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5300 | |
| 5301 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5302 | |
| 5303 | https://example.com/packagerepos/release/rpm/all |
| 5304 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5305 | https://example.com/packagerepos/release/rpm-dev/all |
| 5306 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5307 | https://example.com/packagerepos/updates/rpm/all |
| 5308 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5309 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5310 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5311 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5312 | :term:`PACKAGE_FEED_BASE_PATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5313 | Specifies the base path used when constructing package feed URIs. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5314 | :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] | 5315 | package feed URI used by the OpenEmbedded build system. The base path |
| 5316 | lies between the :term:`PACKAGE_FEED_URIS` |
| 5317 | and :term:`PACKAGE_FEED_ARCHS` variables. |
| 5318 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5319 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5320 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5321 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5322 | |
| 5323 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5324 | https://example.com/packagerepos/updates" |
| 5325 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5326 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5327 | |
| 5328 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5329 | |
| 5330 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5331 | |
| 5332 | https://example.com/packagerepos/release/rpm/all |
| 5333 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5334 | https://example.com/packagerepos/release/rpm-dev/all |
| 5335 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5336 | https://example.com/packagerepos/updates/rpm/all |
| 5337 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5338 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5339 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5340 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5341 | :term:`PACKAGE_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5342 | Specifies the front portion of the package feed URI used by the |
| 5343 | OpenEmbedded build system. Each final package feed URI is comprised |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5344 | of :term:`PACKAGE_FEED_URIS`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5345 | :term:`PACKAGE_FEED_BASE_PATHS`, and |
| 5346 | :term:`PACKAGE_FEED_ARCHS` variables. |
| 5347 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5348 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5349 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5350 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5351 | |
| 5352 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5353 | https://example.com/packagerepos/updates" |
| 5354 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5355 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5356 | |
| 5357 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5358 | |
| 5359 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5360 | |
| 5361 | https://example.com/packagerepos/release/rpm/all |
| 5362 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5363 | https://example.com/packagerepos/release/rpm-dev/all |
| 5364 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5365 | https://example.com/packagerepos/updates/rpm/all |
| 5366 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5367 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5368 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5369 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5370 | :term:`PACKAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5371 | The final list of packages passed to the package manager for |
| 5372 | installation into the image. |
| 5373 | |
| 5374 | Because the package manager controls actual installation of all |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5375 | packages, the list of packages passed using :term:`PACKAGE_INSTALL` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5376 | not the final list of packages that are actually installed. This |
| 5377 | variable is internal to the image construction code. Consequently, in |
| 5378 | general, you should use the |
| 5379 | :term:`IMAGE_INSTALL` variable to specify |
| 5380 | packages for installation. The exception to this is when working with |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5381 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5382 | image. When working with an initial RAM filesystem (initramfs) image, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5383 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5384 | 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] | 5385 | in the Yocto Project Development Tasks Manual. |
| 5386 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5387 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5388 | Specifies a list of packages the OpenEmbedded build system attempts |
| 5389 | to install when creating an image. If a listed package fails to |
| 5390 | install, the build system does not generate an error. This variable |
| 5391 | is generally not user-defined. |
| 5392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5393 | :term:`PACKAGE_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5394 | Specifies a list of functions run to pre-process the |
| 5395 | :term:`PKGD` directory prior to splitting the files out |
| 5396 | to individual packages. |
| 5397 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5398 | :term:`PACKAGE_WRITE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5399 | Specifies a list of dependencies for post-installation and |
| 5400 | pre-installation scripts on native/cross tools. If your |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5401 | post-installation or pre-installation script can execute at root filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5402 | creation time rather than on the target but depends on a native tool |
| 5403 | in order to execute, you need to list the tools in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5404 | :term:`PACKAGE_WRITE_DEPS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5405 | |
| 5406 | For information on running post-installation scripts, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5407 | ":ref:`dev-manual/common-tasks:post-installation scripts`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5408 | section in the Yocto Project Development Tasks Manual. |
| 5409 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5410 | :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5411 | This variable provides a means of enabling or disabling features of a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5412 | recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5413 | recipes when you specify features and then arguments that define |
| 5414 | feature behaviors. Here is the basic block structure (broken over |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5415 | multiple lines for readability):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5416 | |
| 5417 | PACKAGECONFIG ??= "f1 f2 f3 ..." |
| 5418 | PACKAGECONFIG[f1] = "\ |
| 5419 | --with-f1, \ |
| 5420 | --without-f1, \ |
| 5421 | build-deps-for-f1, \ |
| 5422 | runtime-deps-for-f1, \ |
| 5423 | runtime-recommends-for-f1, \ |
| 5424 | packageconfig-conflicts-for-f1" |
| 5425 | PACKAGECONFIG[f2] = "\ |
| 5426 | ... and so on and so on ... |
| 5427 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5428 | The :term:`PACKAGECONFIG` variable itself specifies a space-separated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5429 | list of the features to enable. Following the features, you can |
| 5430 | determine the behavior of each feature by providing up to six |
| 5431 | order-dependent arguments, which are separated by commas. You can |
| 5432 | omit any argument you like but must retain the separating commas. The |
| 5433 | order is important and specifies the following: |
| 5434 | |
| 5435 | 1. Extra arguments that should be added to the configure script |
| 5436 | argument list (:term:`EXTRA_OECONF` or |
| 5437 | :term:`PACKAGECONFIG_CONFARGS`) if |
| 5438 | the feature is enabled. |
| 5439 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5440 | 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or |
| 5441 | :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5442 | |
| 5443 | 3. Additional build dependencies (:term:`DEPENDS`) |
| 5444 | that should be added if the feature is enabled. |
| 5445 | |
| 5446 | 4. Additional runtime dependencies (:term:`RDEPENDS`) |
| 5447 | that should be added if the feature is enabled. |
| 5448 | |
| 5449 | 5. Additional runtime recommendations |
| 5450 | (:term:`RRECOMMENDS`) that should be added if |
| 5451 | the feature is enabled. |
| 5452 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5453 | 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5454 | settings for this feature. |
| 5455 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5456 | Consider the following :term:`PACKAGECONFIG` block taken from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5457 | ``librsvg`` recipe. In this example the feature is ``gtk``, which has |
| 5458 | three arguments that determine the feature's behavior. |
| 5459 | :: |
| 5460 | |
| 5461 | PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" |
| 5462 | |
| 5463 | The |
| 5464 | ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is |
| 5465 | enabled. In this case, ``--with-gtk3`` is added to the configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5466 | 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] | 5467 | other hand, if the feature is disabled say through a ``.bbappend`` |
| 5468 | file in another layer, then the second argument ``--without-gtk3`` is |
| 5469 | added to the configure script instead. |
| 5470 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5471 | The basic :term:`PACKAGECONFIG` structure previously described holds true |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5472 | regardless of whether you are creating a block or changing a block. |
| 5473 | When creating a block, use the structure inside your recipe. |
| 5474 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5475 | 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] | 5476 | so one of two ways: |
| 5477 | |
| 5478 | - *Append file:* Create an append file named |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5479 | ``recipename.bbappend`` in your layer and override the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5480 | :term:`PACKAGECONFIG`. You can either completely override the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5481 | variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5482 | |
| 5483 | PACKAGECONFIG = "f4 f5" |
| 5484 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5485 | Or, you can just append the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5486 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5487 | PACKAGECONFIG:append = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5488 | |
| 5489 | - *Configuration file:* This method is identical to changing the |
| 5490 | block through an append file except you edit your ``local.conf`` |
| 5491 | or ``mydistro.conf`` file. As with append files previously |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5492 | described, you can either completely override the variable:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5493 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5494 | PACKAGECONFIG:pn-recipename = "f4 f5" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5495 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5496 | Or, you can just amend the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5497 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5498 | PACKAGECONFIG:append:pn-recipename = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5499 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5500 | :term:`PACKAGECONFIG_CONFARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5501 | A space-separated list of configuration options generated from the |
| 5502 | :term:`PACKAGECONFIG` setting. |
| 5503 | |
| 5504 | Classes such as :ref:`autotools <ref-classes-autotools>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5505 | :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to |
| 5506 | pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``, |
| 5507 | respectively. If you are using :term:`PACKAGECONFIG` but not a class that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5508 | handles the ``do_configure`` task, then you need to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5509 | :term:`PACKAGECONFIG_CONFARGS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5510 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5511 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5512 | For recipes inheriting the |
| 5513 | :ref:`packagegroup <ref-classes-packagegroup>` class, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5514 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5515 | normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) |
| 5516 | should not be automatically created by the ``packagegroup`` recipe, |
| 5517 | which is the default behavior. |
| 5518 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5519 | :term:`PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5520 | The list of packages the recipe creates. The default value is the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5521 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5522 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 5523 | ${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] | 5524 | |
| 5525 | During packaging, the :ref:`ref-tasks-package` task |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5526 | goes through :term:`PACKAGES` and uses the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5527 | variable corresponding to each package to assign files to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5528 | package. If a file matches the :term:`FILES` variable for more than one |
| 5529 | package in :term:`PACKAGES`, it will be assigned to the earliest |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5530 | (leftmost) package. |
| 5531 | |
| 5532 | 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] | 5533 | the patterns in ``FILES:``\ pkg match any files installed by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5534 | :ref:`ref-tasks-install` task) are not generated, |
| 5535 | unless generation is forced through the |
| 5536 | :term:`ALLOW_EMPTY` variable. |
| 5537 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5538 | :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5539 | A promise that your recipe satisfies runtime dependencies for |
| 5540 | optional modules that are found in other recipes. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5541 | :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5542 | only states that they should be satisfied. For example, if a hard, |
| 5543 | runtime dependency (:term:`RDEPENDS`) of another |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5544 | package is satisfied at build time through the :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5545 | variable, but a package with the module name is never actually |
| 5546 | produced, then the other package will be broken. Thus, if you attempt |
| 5547 | to include that package in an image, you will get a dependency |
| 5548 | failure from the packaging system during the |
| 5549 | :ref:`ref-tasks-rootfs` task. |
| 5550 | |
| 5551 | Typically, if there is a chance that such a situation can occur and |
| 5552 | the package that is not created is valid without the dependency being |
| 5553 | satisfied, then you should use :term:`RRECOMMENDS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5554 | (a soft runtime dependency) instead of :term:`RDEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5555 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5556 | 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] | 5557 | you are splitting packages, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5558 | ":ref:`dev-manual/common-tasks:handling optional module packaging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5559 | section in the Yocto Project Development Tasks Manual. |
| 5560 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5561 | :term:`PACKAGESPLITFUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5562 | Specifies a list of functions run to perform additional splitting of |
| 5563 | files into individual packages. Recipes can either prepend to this |
| 5564 | variable or prepend to the ``populate_packages`` function in order to |
| 5565 | perform additional package splitting. In either case, the function |
| 5566 | should set :term:`PACKAGES`, |
| 5567 | :term:`FILES`, :term:`RDEPENDS` and |
| 5568 | other packaging variables appropriately in order to perform the |
| 5569 | desired splitting. |
| 5570 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5571 | :term:`PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5572 | Extra options passed to the ``make`` command during the |
| 5573 | :ref:`ref-tasks-compile` task in order to specify |
| 5574 | parallel compilation on the local build host. This variable is |
| 5575 | usually in the form "-j x", where x represents the maximum number of |
| 5576 | parallel threads ``make`` can run. |
| 5577 | |
| 5578 | .. note:: |
| 5579 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5580 | In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5581 | called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure |
| 5582 | this is to use the ``oe_runmake`` function. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5583 | |
| 5584 | By default, the OpenEmbedded build system automatically sets this |
| 5585 | variable to be equal to the number of cores the build system uses. |
| 5586 | |
| 5587 | .. note:: |
| 5588 | |
| 5589 | If the software being built experiences dependency issues during |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5590 | the ``do_compile`` task that result in race conditions, you can clear |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5591 | the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5592 | information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5593 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5594 | section in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5595 | |
| 5596 | For single socket systems (i.e. one CPU), you should not have to |
| 5597 | override this variable to gain optimal parallelism during builds. |
| 5598 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5599 | 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] | 5600 | not set higher than "-j 20". |
| 5601 | |
| 5602 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5603 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5604 | section in the Yocto Project Development Tasks Manual. |
| 5605 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5606 | :term:`PARALLEL_MAKEINST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5607 | Extra options passed to the ``make install`` command during the |
| 5608 | :ref:`ref-tasks-install` task in order to specify |
| 5609 | parallel installation. This variable defaults to the value of |
| 5610 | :term:`PARALLEL_MAKE`. |
| 5611 | |
| 5612 | .. note:: |
| 5613 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5614 | In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5615 | be called with |
| 5616 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 5617 | way to ensure this is to use the ``oe_runmake`` function. |
| 5618 | |
| 5619 | If the software being built experiences dependency issues during |
| 5620 | the ``do_install`` task that result in race conditions, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5621 | clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5622 | workaround. For information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5623 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5624 | section in the Yocto Project Development Tasks Manual. |
| 5625 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5626 | :term:`PATCHRESOLVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5627 | Determines the action to take when a patch fails. You can set this |
| 5628 | variable to one of two values: "noop" and "user". |
| 5629 | |
| 5630 | The default value of "noop" causes the build to simply fail when the |
| 5631 | OpenEmbedded build system cannot successfully apply a patch. Setting |
| 5632 | the value to "user" causes the build system to launch a shell and |
| 5633 | places you in the right location so that you can manually resolve the |
| 5634 | conflicts. |
| 5635 | |
| 5636 | Set this variable in your ``local.conf`` file. |
| 5637 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5638 | :term:`PATCHTOOL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5639 | Specifies the utility used to apply patches for a recipe during the |
| 5640 | :ref:`ref-tasks-patch` task. You can specify one of |
| 5641 | three utilities: "patch", "quilt", or "git". The default utility used |
| 5642 | is "quilt" except for the quilt-native recipe itself. Because the |
| 5643 | quilt tool is not available at the time quilt-native is being |
| 5644 | patched, it uses "patch". |
| 5645 | |
| 5646 | 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] | 5647 | the recipe using one of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5648 | |
| 5649 | PATCHTOOL = "patch" |
| 5650 | PATCHTOOL = "quilt" |
| 5651 | PATCHTOOL = "git" |
| 5652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5653 | :term:`PE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5654 | The epoch of the recipe. By default, this variable is unset. The |
| 5655 | variable is used to make upgrades possible when the versioning scheme |
| 5656 | changes in some backwards incompatible way. |
| 5657 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5658 | :term:`PE` is the default value of the :term:`PKGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5659 | |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 5660 | :term:`PEP517_BUILD_API` |
| 5661 | When used by recipes that inherit the :ref:`python_pep517 |
| 5662 | <ref-classes-python_pep517>` class, specifies the entry point to the |
| 5663 | PEP-517 compliant build API (such as ``flit_core.buildapi``). |
| 5664 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5665 | :term:`PEP517_WHEEL_PATH` |
| 5666 | When used by recipes that inherit the |
| 5667 | :ref:`python_pep517 <ref-classes-python_pep517>` class, |
| 5668 | denotes the path to ``dist/`` (short for distribution) where the |
| 5669 | binary archive ``wheel`` is built. |
| 5670 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5671 | :term:`PF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5672 | Specifies the recipe or package name and includes all version and |
| 5673 | revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and |
| 5674 | ``bash-4.2-r1/``). This variable is comprised of the following: |
| 5675 | ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} |
| 5676 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5677 | :term:`PIXBUF_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5678 | When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>` |
| 5679 | class, this variable identifies packages that contain the pixbuf |
| 5680 | loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache`` |
| 5681 | class assumes that the loaders are in the recipe's main package (i.e. |
| 5682 | ``${``\ :term:`PN`\ ``}``). Use this variable if the |
| 5683 | loaders you need are in a package other than that main package. |
| 5684 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5685 | :term:`PKG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5686 | The name of the resulting package created by the OpenEmbedded build |
| 5687 | system. |
| 5688 | |
| 5689 | .. note:: |
| 5690 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5691 | 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] | 5692 | |
| 5693 | For example, when the :ref:`debian <ref-classes-debian>` class |
| 5694 | renames the output package, it does so by setting |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5695 | ``PKG:packagename``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5697 | :term:`PKG_CONFIG_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5698 | The path to ``pkg-config`` files for the current build context. |
| 5699 | ``pkg-config`` reads this variable from the environment. |
| 5700 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5701 | :term:`PKGD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5702 | Points to the destination directory for files to be packaged before |
| 5703 | they are split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5704 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5705 | |
| 5706 | ${WORKDIR}/package |
| 5707 | |
| 5708 | Do not change this default. |
| 5709 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5710 | :term:`PKGDATA_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5711 | Points to a shared, global-state directory that holds data generated |
| 5712 | during the packaging process. During the packaging process, the |
| 5713 | :ref:`ref-tasks-packagedata` task packages data |
| 5714 | for each recipe and installs it into this temporary, shared area. |
| 5715 | This directory defaults to the following, which you should not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5716 | change:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5717 | |
| 5718 | ${STAGING_DIR_HOST}/pkgdata |
| 5719 | |
| 5720 | For examples of how this data is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5721 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5722 | section in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5723 | ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5724 | section in the Yocto Project Development Tasks Manual. For more |
| 5725 | information on the shared, global-state directory, see |
| 5726 | :term:`STAGING_DIR_HOST`. |
| 5727 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5728 | :term:`PKGDEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5729 | Points to the parent directory for files to be packaged after they |
| 5730 | have been split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5731 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5732 | |
| 5733 | ${WORKDIR}/packages-split |
| 5734 | |
| 5735 | Under this directory, the build system creates directories for each |
| 5736 | package specified in :term:`PACKAGES`. Do not change |
| 5737 | this default. |
| 5738 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5739 | :term:`PKGDESTWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5740 | Points to a temporary work area where the |
| 5741 | :ref:`ref-tasks-package` task saves package metadata. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5742 | The :term:`PKGDESTWORK` location defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5743 | |
| 5744 | ${WORKDIR}/pkgdata |
| 5745 | |
| 5746 | Do not change this default. |
| 5747 | |
| 5748 | The :ref:`ref-tasks-packagedata` task copies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5749 | package metadata from :term:`PKGDESTWORK` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5750 | :term:`PKGDATA_DIR` to make it available globally. |
| 5751 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5752 | :term:`PKGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5753 | 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] | 5754 | is set to :term:`PE`. |
| 5755 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5756 | :term:`PKGR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5757 | The revision of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5758 | :term:`PKGR` is set to :term:`PR`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5759 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5760 | :term:`PKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5761 | The version of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5762 | :term:`PKGV` is set to :term:`PV`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5763 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5764 | :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5765 | This variable can have two separate functions depending on the |
| 5766 | context: a recipe name or a resulting package name. |
| 5767 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5768 | :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] | 5769 | OpenEmbedded build system as input to create a package. The name is |
| 5770 | normally extracted from the recipe file name. For example, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5771 | 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] | 5772 | will be "expat". |
| 5773 | |
| 5774 | The variable refers to a package name in the context of a file |
| 5775 | created or produced by the OpenEmbedded build system. |
| 5776 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5777 | If applicable, the :term:`PN` variable also contains any special suffix |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5778 | or prefix. For example, using ``bash`` to build packages for the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5779 | native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5780 | packages for the target and for Multilib, :term:`PN` would be ``bash`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5781 | and ``lib64-bash``, respectively. |
| 5782 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5783 | :term:`POPULATE_SDK_POST_HOST_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5784 | Specifies a list of functions to call once the OpenEmbedded build |
| 5785 | system has created the host part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5786 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5787 | |
| 5788 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " |
| 5789 | |
| 5790 | If you need to pass the SDK path to a command within a function, you |
| 5791 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 5792 | the OpenEmbedded build system when creating SDK output. See the |
| 5793 | :term:`SDK_DIR` variable for more information. |
| 5794 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5795 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5796 | Specifies a list of functions to call once the OpenEmbedded build |
| 5797 | system has created the target part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5798 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5799 | |
| 5800 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " |
| 5801 | |
| 5802 | If you need to pass the SDK path to a command within a function, you |
| 5803 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 5804 | the OpenEmbedded build system when creating SDK output. See the |
| 5805 | :term:`SDK_DIR` variable for more information. |
| 5806 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5807 | :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5808 | The revision of the recipe. The default value for this variable is |
| 5809 | "r0". Subsequent revisions of the recipe conventionally have the |
| 5810 | values "r1", "r2", and so forth. When :term:`PV` increases, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5811 | :term:`PR` is conventionally reset to "r0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5812 | |
| 5813 | .. note:: |
| 5814 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5815 | The OpenEmbedded build system does not need the aid of :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5816 | 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] | 5817 | :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5818 | :ref:`stamp <structure-build-tmp-stamps>` and |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5819 | :ref:`overview-manual/concepts:shared state cache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5820 | mechanisms. |
| 5821 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5822 | The :term:`PR` variable primarily becomes significant when a package |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5823 | manager dynamically installs packages on an already built image. In |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5824 | this case, :term:`PR`, which is the default value of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5825 | :term:`PKGR`, helps the package manager distinguish which |
| 5826 | 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] | 5827 | same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with |
| 5828 | the same :term:`PV` usually means that the packages all install the same |
| 5829 | upstream version, but with later (:term:`PR`) version packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5830 | packaging fixes. |
| 5831 | |
| 5832 | .. note:: |
| 5833 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5834 | :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] | 5835 | package contents or metadata. |
| 5836 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5837 | Because manually managing :term:`PR` can be cumbersome and error-prone, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5838 | an automated solution exists. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5839 | ":ref:`dev-manual/common-tasks:working with a pr service`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5840 | in the Yocto Project Development Tasks Manual for more information. |
| 5841 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5842 | :term:`PREFERRED_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5843 | If multiple recipes provide the same item, this variable determines |
| 5844 | which recipe is preferred and thus provides the item (i.e. the |
| 5845 | preferred provider). You should always suffix this variable with the |
| 5846 | name of the provided item. And, you should define the variable using |
| 5847 | the preferred recipe's name (:term:`PN`). Here is a common |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5848 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5849 | |
| 5850 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 5851 | |
| 5852 | In the previous example, multiple recipes are providing "virtual/kernel". |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5853 | 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] | 5854 | the recipe you prefer to provide "virtual/kernel". |
| 5855 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5856 | Following are more examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5857 | |
| 5858 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
| 5859 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
| 5860 | |
| 5861 | For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5862 | information, see the ":ref:`dev-manual/common-tasks:using virtual providers`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5863 | section in the Yocto Project Development Tasks Manual. |
| 5864 | |
| 5865 | .. note:: |
| 5866 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5867 | If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5868 | recipe that :term:`PROVIDES` that item but is not selected (defined) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5869 | by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5870 | desirable since this mechanism is designed to select between mutually |
| 5871 | exclusive alternative providers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5872 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5873 | :term:`PREFERRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5874 | If there are multiple versions of a recipe available, this variable |
| 5875 | determines which version should be given preference. You must always |
| 5876 | suffix the variable with the :term:`PN` you want to select (`python` in |
| 5877 | the first example below), and you should specify the :term:`PV` |
| 5878 | accordingly (`3.4.0` in the example). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5879 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5880 | The :term:`PREFERRED_VERSION` variable supports limited wildcard use |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5881 | through the "``%``" character. You can use the character to match any |
| 5882 | number of characters, which can be useful when specifying versions |
| 5883 | that contain long revision numbers that potentially change. Here are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5884 | two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5885 | |
| 5886 | PREFERRED_VERSION_python = "3.4.0" |
| 5887 | PREFERRED_VERSION_linux-yocto = "5.0%" |
| 5888 | |
| 5889 | .. note:: |
| 5890 | |
| 5891 | The use of the "%" character is limited in that it only works at the end of the |
| 5892 | string. You cannot use the wildcard character in any other |
| 5893 | location of the string. |
| 5894 | |
| 5895 | The specified version is matched against :term:`PV`, which |
| 5896 | does not necessarily match the version part of the recipe's filename. |
| 5897 | 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] | 5898 | where ``foo_git.bb`` contains the following assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5899 | |
| 5900 | PV = "1.1+git${SRCPV}" |
| 5901 | |
| 5902 | In this case, the correct way to select |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5903 | ``foo_git.bb`` is by using an assignment such as the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5904 | |
| 5905 | PREFERRED_VERSION_foo = "1.1+git%" |
| 5906 | |
| 5907 | Compare that previous example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5908 | against the following incorrect example, which does not work:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5909 | |
| 5910 | PREFERRED_VERSION_foo = "git" |
| 5911 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5912 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5913 | configuration files in a way that is hard to change. You can use |
| 5914 | :term:`OVERRIDES` to set a machine-specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5915 | override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5916 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5917 | PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5918 | |
| 5919 | Although not recommended, worst case, you can also use the |
| 5920 | "forcevariable" override, which is the strongest override possible. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5921 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5922 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5923 | PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5924 | |
| 5925 | .. note:: |
| 5926 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5927 | The ``:forcevariable`` override is not handled specially. This override |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5928 | only works because the default value of :term:`OVERRIDES` includes "forcevariable". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5929 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5930 | If a recipe with the specified version is not available, a warning |
| 5931 | message will be shown. See :term:`REQUIRED_VERSION` if you want this |
| 5932 | to be an error instead. |
| 5933 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5934 | :term:`PREMIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5935 | Specifies additional paths from which the OpenEmbedded build system |
| 5936 | gets source code. When the build system searches for source code, it |
| 5937 | first tries the local download directory. If that location fails, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5938 | build system tries locations defined by :term:`PREMIRRORS`, the upstream |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5939 | source, and then locations specified by |
| 5940 | :term:`MIRRORS` in that order. |
| 5941 | |
| 5942 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5943 | the default value for :term:`PREMIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5944 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 5945 | |
| 5946 | Typically, you could add a specific server for the build system to |
| 5947 | attempt before any others by adding something like the following to |
| 5948 | the ``local.conf`` configuration file in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5949 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5950 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5951 | PREMIRRORS:prepend = "\ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5952 | git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 5953 | ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 5954 | http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 5955 | https://.*/.* &YOCTO_DL_URL;/mirror/sources/" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5956 | |
| 5957 | These changes cause the |
| 5958 | build system to intercept Git, FTP, HTTP, and HTTPS requests and |
| 5959 | direct them to the ``http://`` sources mirror. You can use |
| 5960 | ``file://`` URLs to point to local directories or network shares as |
| 5961 | well. |
| 5962 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5963 | :term:`PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5964 | Indicates the importance of a package. |
| 5965 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5966 | :term:`PRIORITY` is considered to be part of the distribution policy |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5967 | because the importance of any given recipe depends on the purpose for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5968 | which the distribution is being produced. Thus, :term:`PRIORITY` is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5969 | normally set within recipes. |
| 5970 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5971 | You can set :term:`PRIORITY` to "required", "standard", "extra", and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5972 | "optional", which is the default. |
| 5973 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5974 | :term:`PRIVATE_LIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5975 | Specifies libraries installed within a recipe that should be ignored |
| 5976 | by the OpenEmbedded build system's shared library resolver. This |
| 5977 | variable is typically used when software being built by a recipe has |
| 5978 | its own private versions of a library normally provided by another |
| 5979 | recipe. In this case, you would not want the package containing the |
| 5980 | private libraries to be set as a dependency on other unrelated |
| 5981 | packages that should instead depend on the package providing the |
| 5982 | standard version of the library. |
| 5983 | |
| 5984 | Libraries specified in this variable should be specified by their |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5985 | file name. For example, from the Firefox recipe in meta-browser:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5986 | |
| 5987 | PRIVATE_LIBS = "libmozjs.so \ |
| 5988 | libxpcom.so \ |
| 5989 | libnspr4.so \ |
| 5990 | libxul.so \ |
| 5991 | libmozalloc.so \ |
| 5992 | libplc4.so \ |
| 5993 | libplds4.so" |
| 5994 | |
| 5995 | For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5996 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5997 | section in the Yocto Project Overview and Concepts Manual. |
| 5998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5999 | :term:`PROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6000 | 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] | 6001 | default, a recipe's own :term:`PN` is implicitly already in its |
| 6002 | :term:`PROVIDES` list and therefore does not need to mention that it |
| 6003 | provides itself. If a recipe uses :term:`PROVIDES`, the additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6004 | aliases are synonyms for the recipe and can be useful for satisfying |
| 6005 | dependencies of other recipes during the build as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6006 | :term:`DEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6007 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6008 | Consider the following example :term:`PROVIDES` statement from the recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6009 | file ``eudev_3.2.9.bb``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6010 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6011 | PROVIDES += "udev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6012 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6013 | The :term:`PROVIDES` statement |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6014 | results in the "eudev" recipe also being available as simply "udev". |
| 6015 | |
| 6016 | .. note:: |
| 6017 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6018 | A recipe's own recipe name (:term:`PN`) is always implicitly prepended |
| 6019 | to `PROVIDES`, so while using "+=" in the above example may not be |
| 6020 | strictly necessary it is recommended to avoid confusion. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6021 | |
| 6022 | In addition to providing recipes under alternate names, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6023 | :term:`PROVIDES` mechanism is also used to implement virtual targets. A |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6024 | virtual target is a name that corresponds to some particular |
| 6025 | functionality (e.g. a Linux kernel). Recipes that provide the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6026 | functionality in question list the virtual target in :term:`PROVIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6027 | Recipes that depend on the functionality in question can include the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6028 | virtual target in :term:`DEPENDS` to leave the choice of provider open. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6029 | |
| 6030 | Conventionally, virtual targets have names on the form |
| 6031 | "virtual/function" (e.g. "virtual/kernel"). The slash is simply part |
| 6032 | of the name and has no syntactical significance. |
| 6033 | |
| 6034 | The :term:`PREFERRED_PROVIDER` variable is |
| 6035 | used to select which particular recipe provides a virtual target. |
| 6036 | |
| 6037 | .. note:: |
| 6038 | |
| 6039 | A corresponding mechanism for virtual runtime dependencies |
| 6040 | (packages) exists. However, the mechanism does not depend on any |
| 6041 | special functionality beyond ordinary variable assignments. For |
| 6042 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of |
| 6043 | the component that manages the ``/dev`` directory. |
| 6044 | |
| 6045 | Setting the "preferred provider" for runtime dependencies is as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6046 | simple as using the following assignment in a configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6047 | |
| 6048 | VIRTUAL-RUNTIME_dev_manager = "udev" |
| 6049 | |
| 6050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6051 | :term:`PRSERV_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6052 | The network based :term:`PR` service host and port. |
| 6053 | |
| 6054 | The ``conf/local.conf.sample.extended`` configuration file in the |
| 6055 | :term:`Source Directory` shows how the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6056 | :term:`PRSERV_HOST` variable is set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6057 | |
| 6058 | PRSERV_HOST = "localhost:0" |
| 6059 | |
| 6060 | You must |
| 6061 | 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] | 6062 | service <dev-manual/common-tasks:working with a pr service>`. You can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6063 | 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] | 6064 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6065 | |
| 6066 | :term:`PSEUDO_IGNORE_PATHS` |
| 6067 | A comma-separated (without spaces) list of path prefixes that should be ignored |
| 6068 | by pseudo when monitoring and recording file operations, in order to avoid |
| 6069 | problems with files being written to outside of the pseudo context and |
| 6070 | reduce pseudo's overhead. A path is ignored if it matches any prefix in the list |
| 6071 | and can include partial directory (or file) names. |
| 6072 | |
| 6073 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6074 | :term:`PTEST_ENABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6075 | Specifies whether or not :ref:`Package |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6076 | Test <dev-manual/common-tasks:testing packages with ptest>` (ptest) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6077 | functionality is enabled when building a recipe. You should not set |
| 6078 | this variable directly. Enabling and disabling building Package Tests |
| 6079 | at build time should be done by adding "ptest" to (or removing it |
| 6080 | from) :term:`DISTRO_FEATURES`. |
| 6081 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6082 | :term:`PV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6083 | The version of the recipe. The version is normally extracted from the |
| 6084 | recipe filename. For example, if the recipe is named |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6085 | ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1". |
| 6086 | :term:`PV` is generally not overridden within a recipe unless it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6087 | building an unstable (i.e. development) version from a source code |
| 6088 | repository (e.g. Git or Subversion). |
| 6089 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6090 | :term:`PV` is the default value of the :term:`PKGV` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6091 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6092 | :term:`PYTHON_ABI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6093 | When used by recipes that inherit the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6094 | :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6095 | Application Binary Interface (ABI) currently in use for Python. By |
| 6096 | default, the ABI is "m". You do not have to set this variable as the |
| 6097 | OpenEmbedded build system sets it for you. |
| 6098 | |
| 6099 | The OpenEmbedded build system uses the ABI to construct directory |
| 6100 | names used when installing the Python headers and libraries in |
| 6101 | sysroot (e.g. ``.../python3.3m/...``). |
| 6102 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6103 | :term:`PYTHON_PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6104 | When used by recipes that inherit the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6105 | :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6106 | 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] | 6107 | be "python3". You do not have to set this variable as the |
| 6108 | OpenEmbedded build system automatically sets it for you. |
| 6109 | |
| 6110 | The variable allows recipes to use common infrastructure such as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6111 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6112 | |
| 6113 | DEPENDS += "${PYTHON_PN}-native" |
| 6114 | |
| 6115 | In the previous example, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6116 | the version of the dependency is :term:`PYTHON_PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6117 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 6118 | :term:`QA_EMPTY_DIRS` |
| 6119 | Specifies a list of directories that are expected to be empty when |
| 6120 | packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or |
| 6121 | :term:`WARN_QA` these will be checked and an error or warning |
| 6122 | (respectively) will be produced. |
| 6123 | |
| 6124 | The default :term:`QA_EMPTY_DIRS` value is set in |
| 6125 | :ref:`insane.bbclass <ref-classes-insane>`. |
| 6126 | |
| 6127 | :term:`QA_EMPTY_DIRS_RECOMMENDATION` |
| 6128 | Specifies a recommendation for why a directory must be empty, |
| 6129 | which will be included in the error message if a specific directory |
| 6130 | is found to contain files. Must be overridden with the directory |
| 6131 | path to match on. |
| 6132 | |
| 6133 | If no recommendation is specified for a directory, then the default |
| 6134 | "but it is expected to be empty" will be used. |
| 6135 | |
| 6136 | An example message shows if files were present in '/dev':: |
| 6137 | |
| 6138 | QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime" |
| 6139 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6140 | :term:`RANLIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6141 | The minimal command and arguments to run ``ranlib``. |
| 6142 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6143 | :term:`RCONFLICTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6144 | The list of packages that conflict with packages. Note that packages |
| 6145 | will not be installed if conflicting packages are not first removed. |
| 6146 | |
| 6147 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6148 | conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6149 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6150 | RCONFLICTS:${PN} = "another_conflicting_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6151 | |
| 6152 | BitBake, which the OpenEmbedded build system uses, supports |
| 6153 | specifying versioned dependencies. Although the syntax varies |
| 6154 | depending on the packaging format, BitBake hides these differences |
| 6155 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6156 | :term:`RCONFLICTS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6157 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6158 | RCONFLICTS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6159 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6160 | For ``operator``, you can specify the following: |
| 6161 | |
| 6162 | - = |
| 6163 | - < |
| 6164 | - > |
| 6165 | - <= |
| 6166 | - >= |
| 6167 | |
| 6168 | 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] | 6169 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6170 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6171 | RCONFLICTS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6172 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6173 | :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6174 | Lists runtime dependencies of a package. These dependencies are other |
| 6175 | packages that must be installed in order for the package to function |
| 6176 | correctly. As an example, the following assignment declares that the |
| 6177 | package ``foo`` needs the packages ``bar`` and ``baz`` to be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6178 | installed:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6179 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6180 | RDEPENDS:foo = "bar baz" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6181 | |
| 6182 | The most common types of package |
| 6183 | runtime dependencies are automatically detected and added. Therefore, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6184 | most recipes do not need to set :term:`RDEPENDS`. For more information, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6185 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6186 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6187 | section in the Yocto Project Overview and Concepts Manual. |
| 6188 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6189 | The practical effect of the above :term:`RDEPENDS` assignment is that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6190 | ``bar`` and ``baz`` will be declared as dependencies inside the |
| 6191 | package ``foo`` when it is written out by one of the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6192 | :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6193 | Exactly how this is done depends on which package format is used, |
| 6194 | which is determined by |
| 6195 | :term:`PACKAGE_CLASSES`. When the |
| 6196 | corresponding package manager installs the package, it will know to |
| 6197 | also install the packages on which it depends. |
| 6198 | |
| 6199 | To ensure that the packages ``bar`` and ``baz`` get built, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6200 | previous :term:`RDEPENDS` assignment also causes a task dependency to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6201 | added. This dependency is from the recipe's |
| 6202 | :ref:`ref-tasks-build` (not to be confused with |
| 6203 | :ref:`ref-tasks-compile`) task to the |
| 6204 | ``do_package_write_*`` task of the recipes that build ``bar`` and |
| 6205 | ``baz``. |
| 6206 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6207 | The names of the packages you list within :term:`RDEPENDS` must be the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6208 | names of other packages - they cannot be recipe names. Although |
| 6209 | package names and recipe names usually match, the important point |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6210 | here is that you are providing package names within the :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6211 | variable. For an example of the default list of packages created from |
| 6212 | a recipe, see the :term:`PACKAGES` variable. |
| 6213 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6214 | Because the :term:`RDEPENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6215 | you should always use the variable in a form with an attached package |
| 6216 | name (remember that a single recipe can build multiple packages). For |
| 6217 | example, suppose you are building a development package that depends |
| 6218 | on the ``perl`` package. In this case, you would use the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6219 | :term:`RDEPENDS` statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6220 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6221 | RDEPENDS:${PN}-dev += "perl" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6222 | |
| 6223 | In the example, |
| 6224 | the development package depends on the ``perl`` package. Thus, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6225 | :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6226 | the variable. |
| 6227 | |
| 6228 | .. note:: |
| 6229 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6230 | ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6231 | by default. This default is set in the BitBake configuration file |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6232 | (``meta/conf/bitbake.conf``). Be careful not to accidentally remove |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6233 | ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6234 | rather than the "=" operator. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6235 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6236 | The package names you use with :term:`RDEPENDS` must appear as they would |
| 6237 | in the :term:`PACKAGES` variable. The :term:`PKG` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6238 | allows a different name to be used for the final package (e.g. the |
| 6239 | :ref:`debian <ref-classes-debian>` class uses this to rename |
| 6240 | packages), but this final package name cannot be used with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6241 | :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6242 | independent of the package format used. |
| 6243 | |
| 6244 | BitBake, which the OpenEmbedded build system uses, supports |
| 6245 | specifying versioned dependencies. Although the syntax varies |
| 6246 | depending on the packaging format, BitBake hides these differences |
| 6247 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6248 | :term:`RDEPENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6249 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6250 | RDEPENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6251 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6252 | For ``operator``, you can specify the following: |
| 6253 | |
| 6254 | - = |
| 6255 | - < |
| 6256 | - > |
| 6257 | - <= |
| 6258 | - >= |
| 6259 | |
| 6260 | For version, provide the version number. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6261 | |
| 6262 | .. note:: |
| 6263 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6264 | You can use :term:`EXTENDPKGV` to provide a full package version |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6265 | specification. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6266 | |
| 6267 | 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] | 6268 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6269 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6270 | RDEPENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6271 | |
| 6272 | For information on build-time dependencies, see the |
| 6273 | :term:`DEPENDS` variable. You can also see the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 6274 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 6275 | ":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] | 6276 | BitBake User Manual for additional information on tasks and |
| 6277 | dependencies. |
| 6278 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 6279 | :term:`RECIPE_NO_UPDATE_REASON` |
| 6280 | If a recipe should not be replaced by a more recent upstream version, |
| 6281 | putting the reason why in this variable in a recipe allows |
| 6282 | ``devtool check-upgrade-status`` command to display it, as explained |
| 6283 | in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" |
| 6284 | section. |
| 6285 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6286 | :term:`REQUIRED_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6287 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6288 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6289 | class, this variable identifies distribution features that must exist |
| 6290 | in the current configuration in order for the OpenEmbedded build |
| 6291 | system to build the recipe. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6292 | :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not |
| 6293 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6294 | the recipe will be skipped, and if the build system attempts to build |
| 6295 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6296 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6297 | :term:`REQUIRED_VERSION` |
| 6298 | If there are multiple versions of a recipe available, this variable |
| 6299 | determines which version should be given preference. |
| 6300 | :term:`REQUIRED_VERSION` works in exactly the same manner as |
| 6301 | :term:`PREFERRED_VERSION`, except that if the specified version is not |
| 6302 | available then an error message is shown and the build fails |
| 6303 | immediately. |
| 6304 | |
| 6305 | If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set |
| 6306 | for the same recipe, the :term:`REQUIRED_VERSION` value applies. |
| 6307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6308 | :term:`RM_WORK_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6309 | With ``rm_work`` enabled, this variable specifies a list of recipes |
| 6310 | whose work directories should not be removed. See the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6311 | ":ref:`ref-classes-rm-work`" section for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6312 | details. |
| 6313 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6314 | :term:`ROOT_HOME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6315 | Defines the root home directory. By default, this directory is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6316 | follows in the BitBake configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6317 | |
| 6318 | ROOT_HOME ??= "/home/root" |
| 6319 | |
| 6320 | .. note:: |
| 6321 | |
| 6322 | This default value is likely used because some embedded solutions |
| 6323 | prefer to have a read-only root filesystem and prefer to keep |
| 6324 | writeable data in one place. |
| 6325 | |
| 6326 | You can override the default by setting the variable in any layer or |
| 6327 | in the ``local.conf`` file. Because the default is set using a "weak" |
| 6328 | assignment (i.e. "??="), you can use either of the following forms to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6329 | define your override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6330 | |
| 6331 | ROOT_HOME = "/root" |
| 6332 | ROOT_HOME ?= "/root" |
| 6333 | |
| 6334 | These |
| 6335 | override examples use ``/root``, which is probably the most commonly |
| 6336 | used override. |
| 6337 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6338 | :term:`ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6339 | Indicates a filesystem image to include as the root filesystem. |
| 6340 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6341 | The :term:`ROOTFS` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6342 | :ref:`image-live <ref-classes-image-live>` class. |
| 6343 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6344 | :term:`ROOTFS_POSTINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6345 | Specifies a list of functions to call after the OpenEmbedded build |
| 6346 | system has installed packages. You can specify functions separated by |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6347 | semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6348 | |
| 6349 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " |
| 6350 | |
| 6351 | If you need to pass the root filesystem path to a command within a |
| 6352 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6353 | directory that becomes the root filesystem image. See the |
| 6354 | :term:`IMAGE_ROOTFS` variable for more |
| 6355 | information. |
| 6356 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6357 | :term:`ROOTFS_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6358 | Specifies a list of functions to call once the OpenEmbedded build |
| 6359 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6360 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6361 | |
| 6362 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " |
| 6363 | |
| 6364 | If you need to pass the root filesystem path to a command within a |
| 6365 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6366 | directory that becomes the root filesystem image. See the |
| 6367 | :term:`IMAGE_ROOTFS` variable for more |
| 6368 | information. |
| 6369 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6370 | :term:`ROOTFS_POSTUNINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6371 | Specifies a list of functions to call after the OpenEmbedded build |
| 6372 | system has removed unnecessary packages. When runtime package |
| 6373 | management is disabled in the image, several packages are removed |
| 6374 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6375 | You can specify functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6376 | |
| 6377 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " |
| 6378 | |
| 6379 | If you need to pass the root filesystem path to a command within a |
| 6380 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6381 | directory that becomes the root filesystem image. See the |
| 6382 | :term:`IMAGE_ROOTFS` variable for more |
| 6383 | information. |
| 6384 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6385 | :term:`ROOTFS_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6386 | Specifies a list of functions to call before the OpenEmbedded build |
| 6387 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6388 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6389 | |
| 6390 | ROOTFS_PREPROCESS_COMMAND += "function; ... " |
| 6391 | |
| 6392 | If you need to pass the root filesystem path to a command within a |
| 6393 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6394 | directory that becomes the root filesystem image. See the |
| 6395 | :term:`IMAGE_ROOTFS` variable for more |
| 6396 | information. |
| 6397 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6398 | :term:`RPROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6399 | A list of package name aliases that a package also provides. These |
| 6400 | aliases are useful for satisfying runtime dependencies of other |
| 6401 | packages both during the build and on the target (as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6402 | :term:`RDEPENDS`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6403 | |
| 6404 | .. note:: |
| 6405 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6406 | 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] | 6407 | |
| 6408 | As with all package-controlling variables, you must always use the |
| 6409 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6410 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6411 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6412 | RPROVIDES:${PN} = "widget-abi-2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6413 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6414 | :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6415 | A list of packages that extends the usability of a package being |
| 6416 | built. The package being built does not depend on this list of |
| 6417 | packages in order to successfully build, but rather uses them for |
| 6418 | extended usability. To specify runtime dependencies for packages, see |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6419 | the :term:`RDEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6420 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6421 | The package manager will automatically install the :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6422 | list of packages when installing the built package. However, you can |
| 6423 | prevent listed packages from being installed by using the |
| 6424 | :term:`BAD_RECOMMENDATIONS`, |
| 6425 | :term:`NO_RECOMMENDATIONS`, and |
| 6426 | :term:`PACKAGE_EXCLUDE` variables. |
| 6427 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6428 | Packages specified in :term:`RRECOMMENDS` need not actually be produced. |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6429 | However, there must be a recipe providing each package, either |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6430 | through the :term:`PACKAGES` or |
| 6431 | :term:`PACKAGES_DYNAMIC` variables or the |
| 6432 | :term:`RPROVIDES` variable, or an error will occur |
| 6433 | during the build. If such a recipe does exist and the package is not |
| 6434 | produced, the build continues without error. |
| 6435 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6436 | Because the :term:`RRECOMMENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6437 | you should always attach an override to the variable to specify the |
| 6438 | particular package whose usability is being extended. For example, |
| 6439 | suppose you are building a development package that is extended to |
| 6440 | support wireless functionality. In this case, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6441 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6442 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6443 | RRECOMMENDS:${PN}-dev += "wireless_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6444 | |
| 6445 | In the |
| 6446 | example, the package name (``${PN}-dev``) must appear as it would in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6447 | the :term:`PACKAGES` namespace before any renaming of the output package |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 6448 | by classes such as :ref:`ref-classes-debian`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6449 | |
| 6450 | BitBake, which the OpenEmbedded build system uses, supports |
| 6451 | specifying versioned recommends. Although the syntax varies depending |
| 6452 | on the packaging format, BitBake hides these differences from you. |
| 6453 | Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6454 | :term:`RRECOMMENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6455 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6456 | RRECOMMENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6457 | |
| 6458 | For ``operator``, you can specify the following: |
| 6459 | |
| 6460 | - = |
| 6461 | - < |
| 6462 | - > |
| 6463 | - <= |
| 6464 | - >= |
| 6465 | |
| 6466 | 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] | 6467 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6468 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6469 | RRECOMMENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6470 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6471 | :term:`RREPLACES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6472 | A list of packages replaced by a package. The package manager uses |
| 6473 | this variable to determine which package should be installed to |
| 6474 | replace other package(s) during an upgrade. In order to also have the |
| 6475 | 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] | 6476 | the other package to the :term:`RCONFLICTS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6477 | |
| 6478 | As with all package-controlling variables, you must use this variable |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6479 | in conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6480 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6481 | RREPLACES:${PN} = "other_package_being_replaced" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6482 | |
| 6483 | BitBake, which the OpenEmbedded build system uses, supports |
| 6484 | specifying versioned replacements. Although the syntax varies |
| 6485 | depending on the packaging format, BitBake hides these differences |
| 6486 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6487 | :term:`RREPLACES` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6488 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6489 | RREPLACES:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6490 | |
| 6491 | For ``operator``, you can specify the following: |
| 6492 | |
| 6493 | - = |
| 6494 | - < |
| 6495 | - > |
| 6496 | - <= |
| 6497 | - >= |
| 6498 | |
| 6499 | For example, the following sets up a replacement using version 1.2 |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6500 | or greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6501 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6502 | RREPLACES:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6503 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6504 | :term:`RSUGGESTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6505 | A list of additional packages that you can suggest for installation |
| 6506 | by the package manager at the time a package is installed. Not all |
| 6507 | package managers support this functionality. |
| 6508 | |
| 6509 | As with all package-controlling variables, you must always use this |
| 6510 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6511 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6512 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6513 | RSUGGESTS:${PN} = "useful_package another_package" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6514 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6515 | :term:`S` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6516 | The location in the :term:`Build Directory` where |
| 6517 | unpacked recipe source code resides. By default, this directory is |
| 6518 | ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, |
| 6519 | where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe |
| 6520 | version. If the source tarball extracts the code to a directory named |
| 6521 | anything other than ``${BPN}-${PV}``, or if the source code is |
| 6522 | 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] | 6523 | :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] | 6524 | to find the unpacked source. |
| 6525 | |
| 6526 | As an example, assume a :term:`Source Directory` |
| 6527 | top-level folder named ``poky`` and a default Build Directory at |
| 6528 | ``poky/build``. In this case, the work directory the build system |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6529 | uses to keep the unpacked recipe for ``db`` is the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6530 | |
| 6531 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 |
| 6532 | |
| 6533 | The unpacked source code resides in the ``db-5.1.19`` folder. |
| 6534 | |
| 6535 | This next example assumes a Git repository. By default, Git |
| 6536 | repositories are cloned to ``${WORKDIR}/git`` during |
| 6537 | :ref:`ref-tasks-fetch`. Since this path is different |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6538 | 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] | 6539 | source can be located:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6540 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6541 | SRC_URI = "git://path/to/repo.git;branch=main" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6542 | S = "${WORKDIR}/git" |
| 6543 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6544 | :term:`SANITY_REQUIRED_UTILITIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6545 | Specifies a list of command-line utilities that should be checked for |
| 6546 | during the initial sanity checking process when running BitBake. If |
| 6547 | any of the utilities are not installed on the build host, then |
| 6548 | BitBake immediately exits with an error. |
| 6549 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6550 | :term:`SANITY_TESTED_DISTROS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6551 | A list of the host distribution identifiers that the build system has |
| 6552 | been tested against. Identifiers consist of the host distributor ID |
| 6553 | followed by the release, as reported by the ``lsb_release`` tool or |
| 6554 | as read from ``/etc/lsb-release``. Separate the list items with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6555 | explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6556 | not empty and the current value of |
| 6557 | :term:`NATIVELSBSTRING` does not appear in the |
| 6558 | list, then the build system reports a warning that indicates the |
| 6559 | current host distribution has not been tested as a build host. |
| 6560 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6561 | :term:`SDK_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6562 | The target architecture for the SDK. Typically, you do not directly |
| 6563 | set this variable. Instead, use :term:`SDKMACHINE`. |
| 6564 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6565 | :term:`SDK_CUSTOM_TEMPLATECONF` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6566 | When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6567 | "1" and a ``conf/templateconf.conf`` file exists in the build directory |
| 6568 | (:term:`TOPDIR`) then this will be copied into the SDK. |
| 6569 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6570 | :term:`SDK_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6571 | The directory set up and used by the |
| 6572 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which |
| 6573 | the SDK is deployed. The ``populate_sdk_base`` class defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6574 | :term:`SDK_DEPLOY` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6575 | |
| 6576 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
| 6577 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6578 | :term:`SDK_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6579 | The parent directory used by the OpenEmbedded build system when |
| 6580 | creating SDK output. The |
| 6581 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6582 | the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6583 | |
| 6584 | SDK_DIR = "${WORKDIR}/sdk" |
| 6585 | |
| 6586 | .. note:: |
| 6587 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6588 | The :term:`SDK_DIR` directory is a temporary directory as it is part of |
| 6589 | :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6590 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6591 | :term:`SDK_EXT_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6592 | Controls whether or not shared state artifacts are copied into the |
| 6593 | extensible SDK. The default value of "full" copies all of the |
| 6594 | required shared state artifacts into the extensible SDK. The value |
| 6595 | "minimal" leaves these artifacts out of the SDK. |
| 6596 | |
| 6597 | .. note:: |
| 6598 | |
| 6599 | If you set the variable to "minimal", you need to ensure |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6600 | :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the |
| 6601 | artifacts to be fetched as needed. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6603 | :term:`SDK_HOST_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6604 | The manifest file for the host part of the SDK. This file lists all |
| 6605 | the installed packages that make up the host part of the SDK. The |
| 6606 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6607 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6608 | |
| 6609 | packagename packagearch version |
| 6610 | |
| 6611 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6612 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6613 | |
| 6614 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
| 6615 | |
| 6616 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6617 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6618 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6619 | :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6620 | When set to "1", specifies to include the packagedata for all recipes |
| 6621 | in the "world" target in the extensible SDK. Including this data |
| 6622 | allows the ``devtool search`` command to find these recipes in search |
| 6623 | results, as well as allows the ``devtool add`` command to map |
| 6624 | dependencies more effectively. |
| 6625 | |
| 6626 | .. note:: |
| 6627 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6628 | Enabling the :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6629 | variable significantly increases build time because all of world |
| 6630 | needs to be built. Enabling the variable also slightly increases |
| 6631 | the size of the extensible SDK. |
| 6632 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6633 | :term:`SDK_INCLUDE_TOOLCHAIN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6634 | When set to "1", specifies to include the toolchain in the extensible |
| 6635 | SDK. Including the toolchain is useful particularly when |
| 6636 | :term:`SDK_EXT_TYPE` is set to "minimal" to keep |
| 6637 | the SDK reasonably small but you still want to provide a usable |
| 6638 | toolchain. For example, suppose you want to use the toolchain from an |
| 6639 | IDE or from other tools and you do not want to perform additional |
| 6640 | steps to install the toolchain. |
| 6641 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6642 | The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if |
| 6643 | :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if |
| 6644 | :term:`SDK_EXT_TYPE` is set to "full". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6645 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6646 | :term:`SDK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6647 | The base name for SDK output files. The name is derived from the |
| 6648 | :term:`DISTRO`, :term:`TCLIBC`, |
| 6649 | :term:`SDK_ARCH`, |
| 6650 | :term:`IMAGE_BASENAME`, and |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6651 | :term:`TUNE_PKGARCH` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6652 | |
| 6653 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" |
| 6654 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6655 | :term:`SDK_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6656 | Specifies the operating system for which the SDK will be built. The |
| 6657 | default value is the value of :term:`BUILD_OS`. |
| 6658 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6659 | :term:`SDK_OUTPUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6660 | The location used by the OpenEmbedded build system when creating SDK |
| 6661 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6662 | class defines the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6663 | |
| 6664 | SDK_DIR = "${WORKDIR}/sdk" |
| 6665 | SDK_OUTPUT = "${SDK_DIR}/image" |
| 6666 | SDK_DEPLOY = "${DEPLOY_DIR}/sdk" |
| 6667 | |
| 6668 | .. note:: |
| 6669 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6670 | 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] | 6671 | :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is |
| 6672 | :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6673 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6674 | :term:`SDK_PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6675 | Specifies a list of architectures compatible with the SDK machine. |
| 6676 | This variable is set automatically and should not normally be |
| 6677 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6678 | 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] | 6679 | noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". |
| 6680 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6681 | :term:`SDK_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6682 | Specifies a list of functions to call once the OpenEmbedded build |
| 6683 | system creates the SDK. You can specify functions separated by |
| 6684 | semicolons: SDK_POSTPROCESS_COMMAND += "function; ... " |
| 6685 | |
| 6686 | If you need to pass an SDK path to a command within a function, you |
| 6687 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6688 | the OpenEmbedded build system when creating SDK output. See the |
| 6689 | :term:`SDK_DIR` variable for more information. |
| 6690 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6691 | :term:`SDK_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6692 | The toolchain binary prefix used for ``nativesdk`` recipes. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6693 | OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6694 | :term:`TARGET_PREFIX` when building |
| 6695 | ``nativesdk`` recipes. The default value is "${SDK_SYS}-". |
| 6696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6697 | :term:`SDK_RECRDEP_TASKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6698 | A list of shared state tasks added to the extensible SDK. By default, |
| 6699 | the following tasks are added: |
| 6700 | |
| 6701 | - do_populate_lic |
| 6702 | - do_package_qa |
| 6703 | - do_populate_sysroot |
| 6704 | - do_deploy |
| 6705 | |
| 6706 | Despite the default value of "" for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6707 | :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6708 | 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] | 6709 | :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6710 | tasks that are needed in order to build |
| 6711 | :term:`SDK_TARGETS`). |
| 6712 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6713 | :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6714 | Specifies the system, including the architecture and the operating |
| 6715 | system, for which the SDK will be built. |
| 6716 | |
| 6717 | The OpenEmbedded build system automatically sets this variable based |
| 6718 | on :term:`SDK_ARCH`, |
| 6719 | :term:`SDK_VENDOR`, and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6720 | :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] | 6721 | variable yourself. |
| 6722 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6723 | :term:`SDK_TARGET_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6724 | The manifest file for the target part of the SDK. This file lists all |
| 6725 | the installed packages that make up the target part of the SDK. The |
| 6726 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6727 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6728 | |
| 6729 | packagename packagearch version |
| 6730 | |
| 6731 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6732 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6733 | |
| 6734 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
| 6735 | |
| 6736 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6737 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6738 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6739 | :term:`SDK_TARGETS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6740 | A list of targets to install from shared state as part of the |
| 6741 | standard or extensible SDK installation. The default value is "${PN}" |
| 6742 | (i.e. the image from which the SDK is built). |
| 6743 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6744 | The :term:`SDK_TARGETS` variable is an internal variable and typically |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6745 | would not be changed. |
| 6746 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6747 | :term:`SDK_TITLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6748 | The title to be printed when running the SDK installer. By default, |
| 6749 | this title is based on the :term:`DISTRO_NAME` or |
| 6750 | :term:`DISTRO` variable and is set in the |
| 6751 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6752 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6753 | |
| 6754 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
| 6755 | |
| 6756 | For the default distribution "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6757 | :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6758 | |
| 6759 | For information on how to change this default title, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6760 | ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6761 | section in the Yocto Project Application Development and the |
| 6762 | Extensible Software Development Kit (eSDK) manual. |
| 6763 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6764 | :term:`SDK_UPDATE_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6765 | An optional URL for an update server for the extensible SDK. If set, |
| 6766 | the value is used as the default update server when running |
| 6767 | ``devtool sdk-update`` within the extensible SDK. |
| 6768 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6769 | :term:`SDK_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6770 | Specifies the name of the SDK vendor. |
| 6771 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6772 | :term:`SDK_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6773 | Specifies the version of the SDK. The Poky distribution configuration file |
| 6774 | (``/meta-poky/conf/distro/poky.conf``) sets the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6775 | :term:`SDK_VERSION` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6776 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6777 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6778 | |
| 6779 | For additional information, see the |
| 6780 | :term:`DISTRO_VERSION` and |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6781 | :term:`METADATA_REVISION` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6782 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6783 | :term:`SDKEXTPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6784 | The default installation directory for the Extensible SDK. By |
| 6785 | default, this directory is based on the :term:`DISTRO` |
| 6786 | variable and is set in the |
| 6787 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6788 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6789 | |
| 6790 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
| 6791 | |
| 6792 | For the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6793 | default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6794 | |
| 6795 | For information on how to change this default directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6796 | ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6797 | section in the Yocto Project Application Development and the |
| 6798 | Extensible Software Development Kit (eSDK) manual. |
| 6799 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6800 | :term:`SDKIMAGE_FEATURES` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6801 | Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6802 | the SDK generated from an image using the following command:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6803 | |
| 6804 | $ bitbake -c populate_sdk imagename |
| 6805 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6806 | :term:`SDKMACHINE` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6807 | The machine for which the SDK is built. In other words, the SDK is built |
| 6808 | such that it runs on the target you specify with the :term:`SDKMACHINE` |
| 6809 | value. The value points to a corresponding ``.conf`` file under |
| 6810 | ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``, |
| 6811 | ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are |
| 6812 | :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] | 6813 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6814 | The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the |
| 6815 | architecture of the build machine. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6816 | |
| 6817 | .. note:: |
| 6818 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6819 | You cannot set the :term:`SDKMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6820 | variable in your distribution configuration file. If you do, the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6821 | configuration will not take effect. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6822 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6823 | :term:`SDKPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6824 | Defines the path offered to the user for installation of the SDK that |
| 6825 | is generated by the OpenEmbedded build system. The path appears as |
| 6826 | the default location for installing the SDK when you run the SDK's |
| 6827 | installation script. You can override the offered path when you run |
| 6828 | the script. |
| 6829 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6830 | :term:`SDKTARGETSYSROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6831 | The full path to the sysroot used for cross-compilation within an SDK |
| 6832 | as it will be when installed into the default |
| 6833 | :term:`SDKPATH`. |
| 6834 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6835 | :term:`SECTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6836 | The section in which packages should be categorized. Package |
| 6837 | management utilities can make use of this variable. |
| 6838 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6839 | :term:`SELECTED_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6840 | Specifies the optimization flags passed to the C compiler when |
| 6841 | building for the target. The flags are passed through the default |
| 6842 | value of the :term:`TARGET_CFLAGS` variable. |
| 6843 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6844 | The :term:`SELECTED_OPTIMIZATION` variable takes the value of |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6845 | :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which |
| 6846 | case the value of :term:`DEBUG_OPTIMIZATION` is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6847 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6848 | :term:`SERIAL_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6849 | Defines a serial console (TTY) to enable using |
| 6850 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 6851 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6852 | separated by a space. You cannot specify more than one TTY device:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6853 | |
| 6854 | SERIAL_CONSOLE = "115200 ttyS0" |
| 6855 | |
| 6856 | .. note:: |
| 6857 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6858 | The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6859 | :term:`SERIAL_CONSOLES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6860 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6861 | :term:`SERIAL_CONSOLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6862 | Defines a serial console (TTY) to enable using |
| 6863 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 6864 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6865 | separated by a semicolon. Use spaces to separate multiple devices:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6866 | |
| 6867 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" |
| 6868 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6869 | :term:`SERIAL_CONSOLES_CHECK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6870 | Specifies serial consoles, which must be listed in |
| 6871 | :term:`SERIAL_CONSOLES`, to check against |
| 6872 | ``/proc/console`` before enabling them using getty. This variable |
| 6873 | allows aliasing in the format: <device>:<alias>. If a device was |
| 6874 | listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6875 | ``/proc/console``, you would do the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6876 | |
| 6877 | SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0" |
| 6878 | |
| 6879 | This variable is currently only supported with SysVinit (i.e. not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6880 | with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires |
| 6881 | ``/etc/inittab`` to be writable when used with SysVinit. This makes it |
| 6882 | incompatible with customizations such as the following:: |
| 6883 | |
| 6884 | EXTRA_IMAGE_FEATURES += "read-only-rootfs" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6885 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6886 | :term:`SETUPTOOLS_BUILD_ARGS` |
| 6887 | When used by recipes that inherit the |
| 6888 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can |
| 6889 | be used to specify additional arguments to be passed to ``setup.py build`` |
| 6890 | in the ``setuptools3_do_compile()`` task. |
| 6891 | |
| 6892 | :term:`SETUPTOOLS_INSTALL_ARGS` |
| 6893 | When used by recipes that inherit the |
| 6894 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can |
| 6895 | be used to specify additional arguments to be passed to ``setup.py install`` |
| 6896 | in the ``setuptools3_do_install()`` task. |
| 6897 | |
| 6898 | :term:`SETUPTOOLS_SETUP_PATH` |
| 6899 | When used by recipes that inherit the |
| 6900 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should |
| 6901 | be used to specify the directory in which the ``setup.py`` file is |
| 6902 | located if it is not at the root of the source tree (as specified by |
| 6903 | :term:`S`). For example, in a recipe where the sources are fetched from |
| 6904 | a Git repository and ``setup.py`` is in a ``python/pythonmodule`` |
| 6905 | subdirectory, you would have this:: |
| 6906 | |
| 6907 | S = "${WORKDIR}/git" |
| 6908 | SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule" |
| 6909 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6910 | :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6911 | A list of recipe dependencies that should not be used to determine |
| 6912 | signatures of tasks from one recipe when they depend on tasks from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6913 | another recipe. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6914 | |
| 6915 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" |
| 6916 | |
| 6917 | In the previous example, ``intone`` depends on ``mplayer2``. |
| 6918 | |
| 6919 | You can use the special token ``"*"`` on the left-hand side of the |
| 6920 | dependency to match all recipes except the one on the right-hand |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6921 | side. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6922 | |
| 6923 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" |
| 6924 | |
| 6925 | In the previous example, all recipes except ``quilt-native`` ignore |
| 6926 | task signatures from the ``quilt-native`` recipe when determining |
| 6927 | their task signatures. |
| 6928 | |
| 6929 | Use of this variable is one mechanism to remove dependencies that |
| 6930 | affect task signatures and thus force rebuilds when a recipe changes. |
| 6931 | |
| 6932 | .. note:: |
| 6933 | |
| 6934 | If you add an inappropriate dependency for a recipe relationship, |
| 6935 | the software might break during runtime if the interface of the |
| 6936 | second recipe was changed after the first recipe had been built. |
| 6937 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6938 | :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6939 | A list of recipes that are completely stable and will never change. |
| 6940 | The ABI for the recipes in the list are presented by output from the |
| 6941 | tasks run to build the recipe. Use of this variable is one way to |
| 6942 | remove dependencies from one recipe on another that affect task |
| 6943 | signatures and thus force rebuilds when the recipe changes. |
| 6944 | |
| 6945 | .. note:: |
| 6946 | |
| 6947 | If you add an inappropriate variable to this list, the software |
| 6948 | might break at runtime if the interface of the recipe was changed |
| 6949 | after the other had been built. |
| 6950 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6951 | :term:`SITEINFO_BITS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6952 | Specifies the number of bits for the target system CPU. The value |
| 6953 | should be either "32" or "64". |
| 6954 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6955 | :term:`SITEINFO_ENDIANNESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6956 | Specifies the endian byte order of the target system. The value |
| 6957 | should be either "le" for little-endian or "be" for big-endian. |
| 6958 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6959 | :term:`SKIP_FILEDEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6960 | Enables removal of all files from the "Provides" section of an RPM |
| 6961 | package. Removal of these files is required for packages containing |
| 6962 | prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. |
| 6963 | |
| 6964 | To enable file removal, set the variable to "1" in your |
| 6965 | ``conf/local.conf`` configuration file in your: |
| 6966 | :term:`Build Directory`. |
| 6967 | :: |
| 6968 | |
| 6969 | SKIP_FILEDEPS = "1" |
| 6970 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6971 | :term:`SKIP_RECIPE` |
| 6972 | Used to prevent the OpenEmbedded build system from building a given |
| 6973 | recipe. Specify the :term:`PN` value as a variable flag (``varflag``) |
| 6974 | and provide a reason, which will be reported when attempting to |
| 6975 | build the recipe. |
| 6976 | |
| 6977 | To prevent a recipe from being built, use the :term:`SKIP_RECIPE` |
| 6978 | variable in your ``local.conf`` file or distribution configuration. |
| 6979 | Here is an example which prevents ``myrecipe`` from being built:: |
| 6980 | |
| 6981 | SKIP_RECIPE[myrecipe] = "Not supported by our organization." |
| 6982 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6983 | :term:`SOC_FAMILY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6984 | Groups together machines based upon the same family of SOC (System On |
| 6985 | Chip). You typically set this variable in a common ``.inc`` file that |
| 6986 | you include in the configuration files of all the machines. |
| 6987 | |
| 6988 | .. note:: |
| 6989 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6990 | You must include ``conf/machine/include/soc-family.inc`` for this |
| 6991 | variable to appear in :term:`MACHINEOVERRIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6992 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6993 | :term:`SOLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6994 | Defines the suffix for shared libraries used on the target platform. |
| 6995 | By default, this suffix is ".so.*" for all Linux-based systems and is |
| 6996 | defined in the ``meta/conf/bitbake.conf`` configuration file. |
| 6997 | |
| 6998 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6999 | ``FILES:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7000 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7001 | :term:`SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7002 | Defines the suffix for the development symbolic link (symlink) for |
| 7003 | shared libraries on the target platform. By default, this suffix is |
| 7004 | ".so" for Linux-based systems and is defined in the |
| 7005 | ``meta/conf/bitbake.conf`` configuration file. |
| 7006 | |
| 7007 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7008 | ``FILES:${PN}-dev``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7009 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 7010 | :term:`SOURCE_DATE_EPOCH` |
| 7011 | This defines a date expressed in number of seconds since |
| 7012 | the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by |
| 7013 | multiple build systems to force a timestamp in built binaries. |
| 7014 | Many upstream projects already support this variable. |
| 7015 | |
| 7016 | You will find more details in the `official specifications |
| 7017 | <https://reproducible-builds.org/specs/source-date-epoch/>`__. |
| 7018 | |
| 7019 | A value for each recipe is computed from the sources by |
| 7020 | :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`. |
| 7021 | |
| 7022 | If a recipe wishes to override the default behavior, it should set its |
| 7023 | own :term:`SOURCE_DATE_EPOCH` value:: |
| 7024 | |
| 7025 | SOURCE_DATE_EPOCH = "1613559011" |
| 7026 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7027 | :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7028 | 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] | 7029 | creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7030 | your ``local.conf`` configuration file ensures the source for all |
| 7031 | recipes are fetched regardless of whether or not a recipe is |
| 7032 | compatible with the configuration. A recipe is considered |
| 7033 | incompatible with the currently configured machine when either or |
| 7034 | both the :term:`COMPATIBLE_MACHINE` |
| 7035 | variable and :term:`COMPATIBLE_HOST` variables |
| 7036 | specify compatibility with a machine other than that of the current |
| 7037 | machine or host. |
| 7038 | |
| 7039 | .. note:: |
| 7040 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7041 | Do not set the :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7042 | variable unless you are creating a source mirror. In other words, |
| 7043 | do not set the variable during a normal build. |
| 7044 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7045 | :term:`SOURCE_MIRROR_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7046 | Defines your own :term:`PREMIRRORS` from which to |
| 7047 | first fetch source before attempting to fetch from the upstream |
| 7048 | specified in :term:`SRC_URI`. |
| 7049 | |
| 7050 | To use this variable, you must globally inherit the |
| 7051 | :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7052 | the URL to your mirrors. Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7053 | |
| 7054 | INHERIT += "own-mirrors" |
| 7055 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" |
| 7056 | |
| 7057 | .. note:: |
| 7058 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7059 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7060 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7061 | :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7062 | Maps commonly used license names to their SPDX counterparts found in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7063 | ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7064 | mappings, see the ``meta/conf/licenses.conf`` file. |
| 7065 | |
| 7066 | For additional information, see the :term:`LICENSE` |
| 7067 | variable. |
| 7068 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7069 | :term:`SPECIAL_PKGSUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7070 | A list of prefixes for :term:`PN` used by the OpenEmbedded |
| 7071 | build system to create variants of recipes or packages. The list |
| 7072 | specifies the prefixes to strip off during certain circumstances such |
| 7073 | as the generation of the :term:`BPN` variable. |
| 7074 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7075 | :term:`SPL_BINARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7076 | The file type for the Secondary Program Loader (SPL). Some devices |
| 7077 | use an SPL from which to boot (e.g. the BeagleBone development |
| 7078 | board). For such cases, you can declare the file type of the SPL |
| 7079 | binary in the ``u-boot.inc`` include file, which is used in the |
| 7080 | U-Boot recipe. |
| 7081 | |
| 7082 | 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] | 7083 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7084 | |
| 7085 | # Some versions of u-boot build an SPL (Second Program Loader) image that |
| 7086 | # should be packaged along with the u-boot binary as well as placed in the |
| 7087 | # deploy directory. For those versions they can set the following variables |
| 7088 | # to allow packaging the SPL. |
| 7089 | SPL_BINARY ?= "" |
| 7090 | SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" |
| 7091 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" |
| 7092 | SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" |
| 7093 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7094 | The :term:`SPL_BINARY` variable helps form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7095 | various ``SPL_*`` variables used by the OpenEmbedded build system. |
| 7096 | |
| 7097 | See the BeagleBone machine configuration example in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7098 | ":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] | 7099 | section in the Yocto Project Board Support Package Developer's Guide |
| 7100 | for additional information. |
| 7101 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7102 | :term:`SRC_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7103 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7104 | See the BitBake manual for the initial description for this variable: |
| 7105 | :term:`bitbake:SRC_URI`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7106 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7107 | The following features are added by OpenEmbedded and the Yocto Project. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7108 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7109 | There are standard and recipe-specific options. Here are standard ones: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7110 | |
| 7111 | - ``apply`` - Whether to apply the patch or not. The default |
| 7112 | action is to apply the patch. |
| 7113 | |
| 7114 | - ``striplevel`` - Which striplevel to use when applying the |
| 7115 | patch. The default level is 1. |
| 7116 | |
| 7117 | - ``patchdir`` - Specifies the directory in which the patch should |
| 7118 | be applied. The default is ``${``\ :term:`S`\ ``}``. |
| 7119 | |
| 7120 | Here are options specific to recipes building code from a revision |
| 7121 | control system: |
| 7122 | |
| 7123 | - ``mindate`` - Apply the patch only if |
| 7124 | :term:`SRCDATE` is equal to or greater than |
| 7125 | ``mindate``. |
| 7126 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7127 | - ``maxdate`` - Apply the patch only if :term:`SRCDATE` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7128 | than ``maxdate``. |
| 7129 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7130 | - ``minrev`` - Apply the patch only if :term:`SRCREV` is equal to or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7131 | greater than ``minrev``. |
| 7132 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7133 | - ``maxrev`` - Apply the patch only if :term:`SRCREV` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7134 | than ``maxrev``. |
| 7135 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7136 | - ``rev`` - Apply the patch only if :term:`SRCREV` is equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7137 | ``rev``. |
| 7138 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7139 | - ``notrev`` - Apply the patch only if :term:`SRCREV` is not equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7140 | ``rev``. |
| 7141 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7142 | .. note:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7143 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7144 | If you want the build system to pick up files specified through |
| 7145 | a :term:`SRC_URI` statement from your append file, you need to be |
| 7146 | sure to extend the :term:`FILESPATH` variable by also using the |
| 7147 | :term:`FILESEXTRAPATHS` variable from within your append file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7148 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7149 | :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7150 | By default, the OpenEmbedded build system automatically detects |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7151 | whether :term:`SRC_URI` contains files that are machine-specific. If so, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7152 | the build system automatically changes :term:`PACKAGE_ARCH`. Setting this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7153 | variable to "0" disables this behavior. |
| 7154 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7155 | :term:`SRCDATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7156 | The date of the source code used to build the package. This variable |
| 7157 | applies only if the source was fetched from a Source Code Manager |
| 7158 | (SCM). |
| 7159 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7160 | :term:`SRCPV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7161 | Returns the version string of the current package. This string is |
| 7162 | used to help define the value of :term:`PV`. |
| 7163 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7164 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7165 | configuration file in the :term:`Source Directory` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7166 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7167 | |
| 7168 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
| 7169 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7170 | Recipes that need to define :term:`PV` do so with the help of the |
| 7171 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7172 | located in ``meta/recipes-connectivity`` in the Source Directory |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7173 | defines :term:`PV` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7174 | |
| 7175 | PV = "0.12-git${SRCPV}" |
| 7176 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7177 | :term:`SRCREV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7178 | The revision of the source code used to build the package. This |
| 7179 | variable applies to Subversion, Git, Mercurial, and Bazaar only. Note |
| 7180 | that if you want to build a fixed revision and you want to avoid |
| 7181 | performing a query on the remote repository every time BitBake parses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7182 | 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] | 7183 | identifier and not just a tag. |
| 7184 | |
| 7185 | .. note:: |
| 7186 | |
| 7187 | For information on limitations when inheriting the latest revision |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7188 | of software using :term:`SRCREV`, see the :term:`AUTOREV` variable |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7189 | description and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7190 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7191 | section, which is in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7192 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7193 | :term:`SRCTREECOVEREDTASKS` |
| 7194 | A list of tasks that are typically not relevant (and therefore skipped) |
| 7195 | when building using the :ref:`externalsrc <ref-classes-externalsrc>` |
| 7196 | class. The default value as set in that class file is the set of tasks |
| 7197 | that are rarely needed when using external source:: |
| 7198 | |
| 7199 | SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" |
| 7200 | |
| 7201 | The notable exception is when processing external kernel source as |
| 7202 | defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 7203 | class file (formatted for aesthetics):: |
| 7204 | |
| 7205 | SRCTREECOVEREDTASKS += "\ |
| 7206 | do_validate_branches \ |
| 7207 | do_kernel_configcheck \ |
| 7208 | do_kernel_checkout \ |
| 7209 | do_fetch \ |
| 7210 | do_unpack \ |
| 7211 | do_patch \ |
| 7212 | " |
| 7213 | |
| 7214 | See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` |
| 7215 | variables for more information. |
| 7216 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7217 | :term:`SSTATE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7218 | The directory for the shared state cache. |
| 7219 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7220 | :term:`SSTATE_MIRROR_ALLOW_NETWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7221 | If set to "1", allows fetches from mirrors that are specified in |
| 7222 | :term:`SSTATE_MIRRORS` to work even when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7223 | fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to |
| 7224 | "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if |
| 7225 | 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] | 7226 | your shared state cache, but you want to disable any other fetching |
| 7227 | from the network. |
| 7228 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7229 | :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7230 | Configures the OpenEmbedded build system to search other mirror |
| 7231 | locations for prebuilt cache data objects before building out the |
| 7232 | data. This variable works like fetcher :term:`MIRRORS` |
| 7233 | and :term:`PREMIRRORS` and points to the cache |
| 7234 | locations to check for the shared state (sstate) objects. |
| 7235 | |
| 7236 | You can specify a filesystem directory or a remote URL such as HTTP |
| 7237 | or FTP. The locations you specify need to contain the shared state |
| 7238 | cache (sstate-cache) results from previous builds. The sstate-cache |
| 7239 | you point to can also be from builds on other machines. |
| 7240 | |
| 7241 | When pointing to sstate build artifacts on another machine that uses |
| 7242 | a different GCC version for native builds, you must configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7243 | :term:`SSTATE_MIRRORS` with a regular expression that maps local search |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7244 | paths to server paths. The paths need to take into account |
| 7245 | :term:`NATIVELSBSTRING` set by the |
| 7246 | :ref:`uninative <ref-classes-uninative>` class. For example, the |
| 7247 | following maps the local search path ``universal-4.9`` to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7248 | server-provided path server_url_sstate_path:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7249 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7250 | 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] | 7251 | |
| 7252 | If a mirror uses the same structure as |
| 7253 | :term:`SSTATE_DIR`, you need to add "PATH" at the |
| 7254 | end as shown in the examples below. The build system substitutes the |
| 7255 | correct path within the directory structure. |
| 7256 | :: |
| 7257 | |
| 7258 | SSTATE_MIRRORS ?= "\ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7259 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7260 | file://.* file:///some-local-dir/sstate/PATH" |
| 7261 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7262 | :term:`SSTATE_SCAN_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7263 | Controls the list of files the OpenEmbedded build system scans for |
| 7264 | hardcoded installation paths. The variable uses a space-separated |
| 7265 | list of filenames (not paths) with standard wildcard characters |
| 7266 | allowed. |
| 7267 | |
| 7268 | During a build, the OpenEmbedded build system creates a shared state |
| 7269 | (sstate) object during the first stage of preparing the sysroots. |
| 7270 | That object is scanned for hardcoded paths for original installation |
| 7271 | locations. The list of files that are scanned for paths is controlled |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7272 | by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files |
| 7273 | 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] | 7274 | than the variable being comprehensively set. The |
| 7275 | :ref:`sstate <ref-classes-sstate>` class specifies the default list |
| 7276 | of files. |
| 7277 | |
| 7278 | For details on the process, see the |
| 7279 | :ref:`staging <ref-classes-staging>` class. |
| 7280 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7281 | :term:`STAGING_BASE_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7282 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7283 | directory for the build host. |
| 7284 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7285 | :term:`STAGING_BASELIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7286 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7287 | directory for the target for which the current recipe is being built |
| 7288 | (:term:`STAGING_DIR_HOST`). |
| 7289 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7290 | :term:`STAGING_BINDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7291 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7292 | directory for the target for which the current recipe is being built |
| 7293 | (:term:`STAGING_DIR_HOST`). |
| 7294 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7295 | :term:`STAGING_BINDIR_CROSS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7296 | Specifies the path to the directory containing binary configuration |
| 7297 | scripts. These scripts provide configuration information for other |
| 7298 | software that wants to make use of libraries or include files |
| 7299 | provided by the software associated with the script. |
| 7300 | |
| 7301 | .. note:: |
| 7302 | |
| 7303 | This style of build configuration has been largely replaced by |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7304 | ``pkg-config``. Consequently, if ``pkg-config`` is supported by the |
| 7305 | library to which you are linking, it is recommended you use |
| 7306 | ``pkg-config`` instead of a provided configuration script. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7308 | :term:`STAGING_BINDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7309 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7310 | directory for the build host. |
| 7311 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7312 | :term:`STAGING_DATADIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7313 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7314 | directory for the target for which the current recipe is being built |
| 7315 | (:term:`STAGING_DIR_HOST`). |
| 7316 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7317 | :term:`STAGING_DATADIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7318 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7319 | directory for the build host. |
| 7320 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7321 | :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7322 | Helps construct the ``recipe-sysroots`` directory, which is used |
| 7323 | during packaging. |
| 7324 | |
| 7325 | For information on how staging for recipe-specific sysroots occurs, |
| 7326 | see the :ref:`ref-tasks-populate_sysroot` |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7327 | task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7328 | section in the Yocto Project Development Tasks Manual, the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7329 | ":ref:`overview-manual/concepts:configuration, compilation, and staging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7330 | section in the Yocto Project Overview and Concepts Manual, and the |
| 7331 | :term:`SYSROOT_DIRS` variable. |
| 7332 | |
| 7333 | .. note:: |
| 7334 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7335 | Recipes should never write files directly under the :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7336 | directory because the OpenEmbedded build system manages the |
| 7337 | directory automatically. Instead, files should be installed to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7338 | ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7339 | task and then the OpenEmbedded build system will stage a subset of |
| 7340 | those files into the sysroot. |
| 7341 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7342 | :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7343 | Specifies the path to the sysroot directory for the system on which |
| 7344 | the component is built to run (the system that hosts the component). |
| 7345 | For most recipes, this sysroot is the one in which that recipe's |
| 7346 | :ref:`ref-tasks-populate_sysroot` task copies |
| 7347 | files. Exceptions include ``-native`` recipes, where the |
| 7348 | ``do_populate_sysroot`` task instead uses |
| 7349 | :term:`STAGING_DIR_NATIVE`. Depending on |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7350 | 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] | 7351 | have the following values: |
| 7352 | |
| 7353 | - For recipes building for the target machine, the value is |
| 7354 | "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". |
| 7355 | |
| 7356 | - For native recipes building for the build host, the value is empty |
| 7357 | given the assumption that when building for the build host, the |
| 7358 | build host's own directories should be used. |
| 7359 | |
| 7360 | .. note:: |
| 7361 | |
| 7362 | ``-native`` recipes are not installed into host paths like such |
| 7363 | as ``/usr``. Rather, these recipes are installed into |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7364 | :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7365 | standard build environment variables such as |
| 7366 | :term:`CPPFLAGS` and |
| 7367 | :term:`CFLAGS` are set up so that both host paths |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7368 | and :term:`STAGING_DIR_NATIVE` are searched for libraries and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7369 | headers using, for example, GCC's ``-isystem`` option. |
| 7370 | |
| 7371 | Thus, the emphasis is that the ``STAGING_DIR*`` variables |
| 7372 | should be viewed as input variables by tasks such as |
| 7373 | :ref:`ref-tasks-configure`, |
| 7374 | :ref:`ref-tasks-compile`, and |
| 7375 | :ref:`ref-tasks-install`. Having the real system |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7376 | root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7377 | for ``-native`` recipes, as they make use of host headers and |
| 7378 | libraries. |
| 7379 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7380 | :term:`STAGING_DIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7381 | Specifies the path to the sysroot directory used when building |
| 7382 | components that run on the build host itself. |
| 7383 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7384 | :term:`STAGING_DIR_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7385 | Specifies the path to the sysroot used for the system for which the |
| 7386 | component generates code. For components that do not generate code, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7387 | which is the majority, :term:`STAGING_DIR_TARGET` is set to match |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7388 | :term:`STAGING_DIR_HOST`. |
| 7389 | |
| 7390 | Some recipes build binaries that can run on the target system but |
| 7391 | those binaries in turn generate code for another different system |
| 7392 | (e.g. cross-canadian recipes). Using terminology from GNU, the |
| 7393 | primary system is referred to as the "HOST" and the secondary, or |
| 7394 | different, system is referred to as the "TARGET". Thus, the binaries |
| 7395 | run on the "HOST" system and generate binaries for the "TARGET" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7396 | system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used |
| 7397 | for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7398 | sysroot used for the "TARGET" system. |
| 7399 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7400 | :term:`STAGING_ETCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7401 | Specifies the path to the ``/etc`` subdirectory of the sysroot |
| 7402 | directory for the build host. |
| 7403 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7404 | :term:`STAGING_EXECPREFIXDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7405 | Specifies the path to the ``/usr`` subdirectory of the sysroot |
| 7406 | directory for the target for which the current recipe is being built |
| 7407 | (:term:`STAGING_DIR_HOST`). |
| 7408 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7409 | :term:`STAGING_INCDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7410 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7411 | sysroot directory for the target for which the current recipe being |
| 7412 | built (:term:`STAGING_DIR_HOST`). |
| 7413 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7414 | :term:`STAGING_INCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7415 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7416 | sysroot directory for the build host. |
| 7417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7418 | :term:`STAGING_KERNEL_BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7419 | Points to the directory containing the kernel build artifacts. |
| 7420 | Recipes building software that needs to access kernel build artifacts |
| 7421 | (e.g. ``systemtap-uprobes``) can look in the directory specified with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7422 | the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7423 | after the kernel has been built. |
| 7424 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7425 | :term:`STAGING_KERNEL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7426 | The directory with kernel headers that are required to build |
| 7427 | out-of-tree modules. |
| 7428 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7429 | :term:`STAGING_LIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7430 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7431 | directory for the target for which the current recipe is being built |
| 7432 | (:term:`STAGING_DIR_HOST`). |
| 7433 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7434 | :term:`STAGING_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7435 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7436 | directory for the build host. |
| 7437 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7438 | :term:`STAMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7439 | Specifies the base path used to create recipe stamp files. The path |
| 7440 | to an actual stamp file is constructed by evaluating this string and |
| 7441 | then appending additional information. Currently, the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7442 | assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7443 | file is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7444 | |
| 7445 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 7446 | |
| 7447 | For information on how BitBake uses stamp files to determine if a |
| 7448 | task should be rerun, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7449 | ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7450 | section in the Yocto Project Overview and Concepts Manual. |
| 7451 | |
| 7452 | See :term:`STAMPS_DIR`, |
| 7453 | :term:`MULTIMACH_TARGET_SYS`, |
| 7454 | :term:`PN`, :term:`EXTENDPE`, |
| 7455 | :term:`PV`, and :term:`PR` for related variable |
| 7456 | information. |
| 7457 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7458 | :term:`STAMPS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7459 | Specifies the base directory in which the OpenEmbedded build system |
| 7460 | places stamps. The default directory is ``${TMPDIR}/stamps``. |
| 7461 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7462 | :term:`STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7463 | The minimal command and arguments to run ``strip``, which is used to |
| 7464 | strip symbols. |
| 7465 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7466 | :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7467 | The short (72 characters or less) summary of the binary package for |
| 7468 | packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7469 | :term:`SUMMARY` is used to define the |
| 7470 | :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7471 | not set in the recipe. |
| 7472 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7473 | :term:`SVNDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7474 | The directory in which files checked out of a Subversion system are |
| 7475 | stored. |
| 7476 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7477 | :term:`SYSLINUX_DEFAULT_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7478 | Specifies the kernel boot default console. If you want to use a |
| 7479 | console other than the default, set this variable in your recipe as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7480 | follows where "X" is the console number you want to use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7481 | |
| 7482 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" |
| 7483 | |
| 7484 | The :ref:`syslinux <ref-classes-syslinux>` class initially sets |
| 7485 | this variable to null but then checks for a value later. |
| 7486 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7487 | :term:`SYSLINUX_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7488 | Lists additional options to add to the syslinux file. You need to set |
| 7489 | this variable in your recipe. If you want to list multiple options, |
| 7490 | separate the options with a semicolon character (``;``). |
| 7491 | |
| 7492 | The :ref:`syslinux <ref-classes-syslinux>` class uses this variable |
| 7493 | to create a set of options. |
| 7494 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7495 | :term:`SYSLINUX_SERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7496 | Specifies the alternate serial port or turns it off. To turn off |
| 7497 | serial, set this variable to an empty string in your recipe. The |
| 7498 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7499 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7500 | |
| 7501 | SYSLINUX_SERIAL ?= "0 115200" |
| 7502 | |
| 7503 | The class checks for and uses the variable as needed. |
| 7504 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7505 | :term:`SYSLINUX_SERIAL_TTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7506 | Specifies the alternate console=tty... kernel boot argument. The |
| 7507 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7508 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7509 | |
| 7510 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
| 7511 | |
| 7512 | The class checks for and uses the variable as needed. |
| 7513 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7514 | :term:`SYSLINUX_SPLASH` |
| 7515 | An ``.LSS`` file used as the background for the VGA boot menu when |
| 7516 | you use the boot menu. You need to set this variable in your recipe. |
| 7517 | |
| 7518 | The :ref:`syslinux <ref-classes-syslinux>` class checks for this |
| 7519 | variable and if found, the OpenEmbedded build system installs the |
| 7520 | splash screen. |
| 7521 | |
| 7522 | :term:`SYSROOT_DESTDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7523 | Points to the temporary directory under the work directory (default |
| 7524 | "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") |
| 7525 | where the files populated into the sysroot are assembled during the |
| 7526 | :ref:`ref-tasks-populate_sysroot` task. |
| 7527 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7528 | :term:`SYSROOT_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7529 | Directories that are staged into the sysroot by the |
| 7530 | :ref:`ref-tasks-populate_sysroot` task. By |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7531 | default, the following directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7532 | |
| 7533 | SYSROOT_DIRS = " \ |
| 7534 | ${includedir} \ |
| 7535 | ${libdir} \ |
| 7536 | ${base_libdir} \ |
| 7537 | ${nonarch_base_libdir} \ |
| 7538 | ${datadir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7539 | /sysroot-only \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7540 | " |
| 7541 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7542 | :term:`SYSROOT_DIRS_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7543 | Directories that are not staged into the sysroot by the |
| 7544 | :ref:`ref-tasks-populate_sysroot` task. You |
| 7545 | can use this variable to exclude certain subdirectories of |
| 7546 | directories listed in :term:`SYSROOT_DIRS` from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7547 | staging. By default, the following directories are not staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7548 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7549 | SYSROOT_DIRS_IGNORE = " \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7550 | ${mandir} \ |
| 7551 | ${docdir} \ |
| 7552 | ${infodir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7553 | ${datadir}/X11/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7554 | ${datadir}/applications \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7555 | ${datadir}/bash-completion \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7556 | ${datadir}/fonts \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7557 | ${datadir}/gtk-doc/html \ |
| 7558 | ${datadir}/installed-tests \ |
| 7559 | ${datadir}/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7560 | ${datadir}/pixmaps \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7561 | ${datadir}/terminfo \ |
| 7562 | ${libdir}/${BPN}/ptest \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7563 | " |
| 7564 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7565 | :term:`SYSROOT_DIRS_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7566 | Extra directories staged into the sysroot by the |
| 7567 | :ref:`ref-tasks-populate_sysroot` task for |
| 7568 | ``-native`` recipes, in addition to those specified in |
| 7569 | :term:`SYSROOT_DIRS`. By default, the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7570 | extra directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7571 | |
| 7572 | SYSROOT_DIRS_NATIVE = " \ |
| 7573 | ${bindir} \ |
| 7574 | ${sbindir} \ |
| 7575 | ${base_bindir} \ |
| 7576 | ${base_sbindir} \ |
| 7577 | ${libexecdir} \ |
| 7578 | ${sysconfdir} \ |
| 7579 | ${localstatedir} \ |
| 7580 | " |
| 7581 | |
| 7582 | .. note:: |
| 7583 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7584 | Programs built by ``-native`` recipes run directly from the sysroot |
| 7585 | (:term:`STAGING_DIR_NATIVE`), which is why additional directories |
| 7586 | containing program executables and supporting files need to be staged. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7587 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7588 | :term:`SYSROOT_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7589 | A list of functions to execute after files are staged into the |
| 7590 | sysroot. These functions are usually used to apply additional |
| 7591 | processing on the staged files, or to stage additional files. |
| 7592 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7593 | :term:`SYSTEMD_AUTO_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7594 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7595 | this variable specifies whether the specified service in |
| 7596 | :term:`SYSTEMD_SERVICE` should start |
| 7597 | automatically or not. By default, the service is enabled to |
| 7598 | automatically start at boot time. The default setting is in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7599 | :ref:`systemd <ref-classes-systemd>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7600 | |
| 7601 | SYSTEMD_AUTO_ENABLE ??= "enable" |
| 7602 | |
| 7603 | You can disable the service by setting the variable to "disable". |
| 7604 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7605 | :term:`SYSTEMD_BOOT_CFG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7606 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7607 | "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7608 | configuration file that should be used. By default, the |
| 7609 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7610 | :term:`SYSTEMD_BOOT_CFG` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7611 | |
| 7612 | SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf" |
| 7613 | |
| 7614 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7615 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7616 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7617 | :term:`SYSTEMD_BOOT_ENTRIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7618 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7619 | "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7620 | list of entry files (``*.conf``) to install that contain one boot |
| 7621 | entry per file. By default, the |
| 7622 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7623 | :term:`SYSTEMD_BOOT_ENTRIES` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7624 | |
| 7625 | SYSTEMD_BOOT_ENTRIES ?= "" |
| 7626 | |
| 7627 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7628 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7629 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7630 | :term:`SYSTEMD_BOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7631 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7632 | "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7633 | boot menu timeout in seconds. By default, the |
| 7634 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7635 | :term:`SYSTEMD_BOOT_TIMEOUT` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7636 | |
| 7637 | SYSTEMD_BOOT_TIMEOUT ?= "10" |
| 7638 | |
| 7639 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7640 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7641 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7642 | :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7643 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7644 | this variable locates the systemd unit files when they are not found |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7645 | in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7646 | variable is set such that the systemd unit files are assumed to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7647 | reside in the recipes main package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7648 | |
| 7649 | SYSTEMD_PACKAGES ?= "${PN}" |
| 7650 | |
| 7651 | 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] | 7652 | 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] | 7653 | the build system can find the systemd unit files. |
| 7654 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7655 | :term:`SYSTEMD_SERVICE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7656 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7657 | this variable specifies the systemd service name for a package. |
| 7658 | |
| 7659 | When you specify this file in your recipe, use a package name |
| 7660 | override to indicate the package to which the value applies. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7661 | an example from the connman recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7662 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7663 | SYSTEMD_SERVICE:${PN} = "connman.service" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7664 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7665 | :term:`SYSVINIT_ENABLED_GETTYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7666 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7667 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7668 | specifies a space-separated list of the virtual terminals that should |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7669 | run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7670 | (allowing login), assuming :term:`USE_VT` is not set to |
| 7671 | "0". |
| 7672 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7673 | 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] | 7674 | run a getty on the first virtual terminal). |
| 7675 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7676 | :term:`T` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7677 | This variable points to a directory were BitBake places temporary |
| 7678 | files, which consist mostly of task logs and scripts, when building a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7679 | particular recipe. The variable is typically set as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7680 | |
| 7681 | T = "${WORKDIR}/temp" |
| 7682 | |
| 7683 | The :term:`WORKDIR` is the directory into which |
| 7684 | BitBake unpacks and builds the recipe. The default ``bitbake.conf`` |
| 7685 | file sets this variable. |
| 7686 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7687 | The :term:`T` variable is not to be confused with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7688 | :term:`TMPDIR` variable, which points to the root of |
| 7689 | the directory tree where BitBake places the output of an entire |
| 7690 | build. |
| 7691 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7692 | :term:`TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7693 | The target machine's architecture. The OpenEmbedded build system |
| 7694 | supports many architectures. Here is an example list of architectures |
| 7695 | supported. This list is by no means complete as the architecture is |
| 7696 | configurable: |
| 7697 | |
| 7698 | - arm |
| 7699 | - i586 |
| 7700 | - x86_64 |
| 7701 | - powerpc |
| 7702 | - powerpc64 |
| 7703 | - mips |
| 7704 | - mipsel |
| 7705 | |
| 7706 | For additional information on machine architectures, see the |
| 7707 | :term:`TUNE_ARCH` variable. |
| 7708 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7709 | :term:`TARGET_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7710 | Specifies architecture-specific assembler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7711 | system. :term:`TARGET_AS_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7712 | :term:`TUNE_ASARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7713 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7714 | |
| 7715 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
| 7716 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7717 | :term:`TARGET_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7718 | Specifies architecture-specific C compiler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7719 | system. :term:`TARGET_CC_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7720 | :term:`TUNE_CCARGS` by default. |
| 7721 | |
| 7722 | .. note:: |
| 7723 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7724 | It is a common workaround to append :term:`LDFLAGS` to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7725 | :term:`TARGET_CC_ARCH` in recipes that build software for the target that |
| 7726 | would not otherwise respect the exported :term:`LDFLAGS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7727 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7728 | :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7729 | This is a specific kernel compiler flag for a CPU or Application |
| 7730 | Binary Interface (ABI) tune. The flag is used rarely and only for |
| 7731 | cases where a userspace :term:`TUNE_CCARGS` is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7732 | compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7733 | variable allows the kernel (and associated modules) to use a |
| 7734 | different configuration. See the |
| 7735 | ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the |
| 7736 | :term:`Source Directory` for an example. |
| 7737 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7738 | :term:`TARGET_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7739 | Specifies the flags to pass to the C compiler when building for the |
| 7740 | target. When building in the target context, |
| 7741 | :term:`CFLAGS` is set to the value of this variable by |
| 7742 | default. |
| 7743 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7744 | Additionally, the SDK's environment setup script sets the :term:`CFLAGS` |
| 7745 | variable in the environment to the :term:`TARGET_CFLAGS` value so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7746 | executables built using the SDK also have the flags applied. |
| 7747 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7748 | :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7749 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 7750 | C and the C++ compilers) when building for the target. When building |
| 7751 | in the target context, :term:`CPPFLAGS` is set to the |
| 7752 | value of this variable by default. |
| 7753 | |
| 7754 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7755 | :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7756 | value so that executables built using the SDK also have the flags |
| 7757 | applied. |
| 7758 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7759 | :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7760 | Specifies the flags to pass to the C++ compiler when building for the |
| 7761 | target. When building in the target context, |
| 7762 | :term:`CXXFLAGS` is set to the value of this variable |
| 7763 | by default. |
| 7764 | |
| 7765 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7766 | :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7767 | value so that executables built using the SDK also have the flags |
| 7768 | applied. |
| 7769 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7770 | :term:`TARGET_FPU` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7771 | Specifies the method for handling FPU code. For FPU-less targets, |
| 7772 | which include most ARM CPUs, the variable must be set to "soft". If |
| 7773 | not, the kernel emulation gets used, which results in a performance |
| 7774 | penalty. |
| 7775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7776 | :term:`TARGET_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7777 | Specifies architecture-specific linker flags for the target system. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7778 | :term:`TARGET_LD_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7779 | :term:`TUNE_LDARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7780 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7781 | |
| 7782 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
| 7783 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7784 | :term:`TARGET_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7785 | Specifies the flags to pass to the linker when building for the |
| 7786 | target. When building in the target context, |
| 7787 | :term:`LDFLAGS` is set to the value of this variable |
| 7788 | by default. |
| 7789 | |
| 7790 | Additionally, the SDK's environment setup script sets the |
| 7791 | :term:`LDFLAGS` variable in the environment to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7792 | :term:`TARGET_LDFLAGS` value so that executables built using the SDK also |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7793 | have the flags applied. |
| 7794 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7795 | :term:`TARGET_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7796 | Specifies the target's operating system. The variable can be set to |
| 7797 | "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] | 7798 | for musl libc. For ARM/EABI targets, the possible values are |
| 7799 | "linux-gnueabi" and "linux-musleabi". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7800 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7801 | :term:`TARGET_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7802 | Specifies the prefix used for the toolchain binary target tools. |
| 7803 | |
| 7804 | Depending on the type of recipe and the build target, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7805 | :term:`TARGET_PREFIX` is set as follows: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7806 | |
| 7807 | - For recipes building for the target machine, the value is |
| 7808 | "${:term:`TARGET_SYS`}-". |
| 7809 | |
| 7810 | - For native recipes, the build system sets the variable to the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7811 | value of :term:`BUILD_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7812 | |
| 7813 | - For native SDK recipes (``nativesdk``), the build system sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7814 | variable to the value of :term:`SDK_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7815 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7816 | :term:`TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7817 | Specifies the system, including the architecture and the operating |
| 7818 | system, for which the build is occurring in the context of the |
| 7819 | current recipe. |
| 7820 | |
| 7821 | The OpenEmbedded build system automatically sets this variable based |
| 7822 | on :term:`TARGET_ARCH`, |
| 7823 | :term:`TARGET_VENDOR`, and |
| 7824 | :term:`TARGET_OS` variables. |
| 7825 | |
| 7826 | .. note:: |
| 7827 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7828 | You do not need to set the :term:`TARGET_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7829 | |
| 7830 | Consider these two examples: |
| 7831 | |
| 7832 | - Given a native recipe on a 32-bit, x86 machine running Linux, the |
| 7833 | value is "i686-linux". |
| 7834 | |
| 7835 | - Given a recipe being built for a little-endian, MIPS target |
| 7836 | running Linux, the value might be "mipsel-linux". |
| 7837 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7838 | :term:`TARGET_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7839 | Specifies the name of the target vendor. |
| 7840 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7841 | :term:`TCLIBC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7842 | Specifies the GNU standard C library (``libc``) variant to use during |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7843 | the build process. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7844 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7845 | You can select "glibc", "musl", "newlib", or "baremetal". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7846 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7847 | :term:`TCLIBCAPPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7848 | Specifies a suffix to be appended onto the |
| 7849 | :term:`TMPDIR` value. The suffix identifies the |
| 7850 | ``libc`` variant for building. When you are building for multiple |
| 7851 | variants with the same :term:`Build Directory`, this |
| 7852 | mechanism ensures that output for different ``libc`` variants is kept |
| 7853 | separate to avoid potential conflicts. |
| 7854 | |
| 7855 | In the ``defaultsetup.conf`` file, the default value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7856 | :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7857 | which normally only support one ``libc`` variant, set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7858 | :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7859 | in no suffix being applied. |
| 7860 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7861 | :term:`TCMODE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7862 | Specifies the toolchain selector. :term:`TCMODE` controls the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7863 | characteristics of the generated packages and images by telling the |
| 7864 | OpenEmbedded build system which toolchain profile to use. By default, |
| 7865 | the OpenEmbedded build system builds its own internal toolchain. The |
| 7866 | variable's default value is "default", which uses that internal |
| 7867 | toolchain. |
| 7868 | |
| 7869 | .. note:: |
| 7870 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7871 | 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] | 7872 | responsibility to ensure that the toolchain is compatible with the |
| 7873 | default toolchain. Using older or newer versions of these |
| 7874 | components might cause build problems. See the Release Notes for |
| 7875 | the Yocto Project release for the specific components with which |
| 7876 | the toolchain must be compatible. To access the Release Notes, go |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7877 | to the :yocto_home:`Downloads </software-overview/downloads>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7878 | page on the Yocto Project website and click on the "RELEASE |
| 7879 | INFORMATION" link for the appropriate release. |
| 7880 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7881 | The :term:`TCMODE` variable is similar to :term:`TCLIBC`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7882 | which controls the variant of the GNU standard C library (``libc``) |
| 7883 | used during the build process: ``glibc`` or ``musl``. |
| 7884 | |
| 7885 | With additional layers, it is possible to use a pre-compiled external |
| 7886 | toolchain. One example is the Sourcery G++ Toolchain. The support for |
| 7887 | this toolchain resides in the separate Mentor Graphics |
| 7888 | ``meta-sourcery`` layer at |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7889 | https://github.com/MentorEmbedded/meta-sourcery/. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7890 | |
| 7891 | The layer's ``README`` file contains information on how to use the |
| 7892 | Sourcery G++ Toolchain as an external toolchain. In summary, you must |
| 7893 | be sure to add the layer to your ``bblayers.conf`` file in front of |
| 7894 | the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable |
| 7895 | in your ``local.conf`` file to the location in which you installed |
| 7896 | the toolchain. |
| 7897 | |
| 7898 | The fundamentals used for this example apply to any external |
| 7899 | toolchain. You can use ``meta-sourcery`` as a template for adding |
| 7900 | support for other external toolchains. |
| 7901 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 7902 | :term:`TEMPLATECONF` |
| 7903 | Specifies the directory used by the build system to find templates |
| 7904 | from which to build the ``bblayers.conf`` and ``local.conf`` files. |
| 7905 | Use this variable if you wish to customize such files, and the default |
| 7906 | BitBake targets shown when sourcing the ``oe-init-build-env`` script. |
| 7907 | |
| 7908 | For details, see the |
| 7909 | :ref:`dev-manual/common-tasks:creating a custom template configuration directory` |
| 7910 | section in the Yocto Project Development Tasks manual. |
| 7911 | |
| 7912 | .. note:: |
| 7913 | |
| 7914 | You must set this variable in the external environment in order |
| 7915 | for it to work. |
| 7916 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7917 | :term:`TEST_EXPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7918 | The location the OpenEmbedded build system uses to export tests when |
| 7919 | the :term:`TEST_EXPORT_ONLY` variable is set |
| 7920 | to "1". |
| 7921 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7922 | The :term:`TEST_EXPORT_DIR` variable defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7923 | ``"${TMPDIR}/testimage/${PN}"``. |
| 7924 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7925 | :term:`TEST_EXPORT_ONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7926 | Specifies to export the tests only. Set this variable to "1" if you |
| 7927 | do not want to run the tests but you want them to be exported in a |
| 7928 | manner that you to run them outside of the build system. |
| 7929 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7930 | :term:`TEST_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7931 | Holds the SSH log and the boot log for QEMU machines. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7932 | :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7933 | |
| 7934 | .. note:: |
| 7935 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7936 | Actual test results reside in the task log (``log.do_testimage``), |
| 7937 | which is in the ``${WORKDIR}/temp/`` directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7938 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7939 | :term:`TEST_POWERCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7940 | For automated hardware testing, specifies the command to use to |
| 7941 | control the power of the target machine under test. Typically, this |
| 7942 | command would point to a script that performs the appropriate action |
| 7943 | (e.g. interacting with a web-enabled power strip). The specified |
| 7944 | command should expect to receive as the last argument "off", "on" or |
| 7945 | "cycle" specifying to power off, on, or cycle (power off and then |
| 7946 | power on) the device, respectively. |
| 7947 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7948 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7949 | For automated hardware testing, specifies additional arguments to |
| 7950 | pass through to the command specified in |
| 7951 | :term:`TEST_POWERCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7952 | :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] | 7953 | wish, for example, to separate the machine-specific and |
| 7954 | non-machine-specific parts of the arguments. |
| 7955 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7956 | :term:`TEST_QEMUBOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7957 | The time in seconds allowed for an image to boot before automated |
| 7958 | runtime tests begin to run against an image. The default timeout |
| 7959 | period to allow the boot process to reach the login prompt is 500 |
| 7960 | seconds. You can specify a different value in the ``local.conf`` |
| 7961 | file. |
| 7962 | |
| 7963 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7964 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7965 | section in the Yocto Project Development Tasks Manual. |
| 7966 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7967 | :term:`TEST_SERIALCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7968 | For automated hardware testing, specifies the command to use to |
| 7969 | connect to the serial console of the target machine under test. This |
| 7970 | command simply needs to connect to the serial console and forward |
| 7971 | that connection to standard input and output as any normal terminal |
| 7972 | program does. |
| 7973 | |
| 7974 | For example, to use the Picocom terminal program on serial device |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7975 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7976 | |
| 7977 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
| 7978 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7979 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7980 | For automated hardware testing, specifies additional arguments to |
| 7981 | pass through to the command specified in |
| 7982 | :term:`TEST_SERIALCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7983 | :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] | 7984 | wish, for example, to separate the machine-specific and |
| 7985 | non-machine-specific parts of the command. |
| 7986 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7987 | :term:`TEST_SERVER_IP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7988 | The IP address of the build machine (host machine). This IP address |
| 7989 | is usually automatically detected. However, if detection fails, this |
| 7990 | variable needs to be set to the IP address of the build machine (i.e. |
| 7991 | where the build is taking place). |
| 7992 | |
| 7993 | .. note:: |
| 7994 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7995 | 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] | 7996 | tests such as the "dnf" test suite, which needs to download packages |
| 7997 | from ``WORKDIR/oe-rootfs-repo``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7999 | :term:`TEST_SUITES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8000 | An ordered list of tests (modules) to run against an image when |
| 8001 | performing automated runtime testing. |
| 8002 | |
| 8003 | The OpenEmbedded build system provides a core set of tests that can |
| 8004 | be used against images. |
| 8005 | |
| 8006 | .. note:: |
| 8007 | |
| 8008 | Currently, there is only support for running these tests under |
| 8009 | QEMU. |
| 8010 | |
| 8011 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8012 | 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] | 8013 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8014 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8015 | TEST_SUITES:append = " mytest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8016 | |
| 8017 | Alternatively, you can |
| 8018 | provide the "auto" option to have all applicable tests run against |
| 8019 | the image. |
| 8020 | :: |
| 8021 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8022 | TEST_SUITES:append = " auto" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8023 | |
| 8024 | Using this option causes the |
| 8025 | build system to automatically run tests that are applicable to the |
| 8026 | image. Tests that are not applicable are skipped. |
| 8027 | |
| 8028 | The order in which tests are run is important. Tests that depend on |
| 8029 | another test must appear later in the list than the test on which |
| 8030 | they depend. For example, if you append the list of tests with two |
| 8031 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8032 | ``test_A``, then you must order the tests as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8033 | |
| 8034 | TEST_SUITES = "test_A test_B" |
| 8035 | |
| 8036 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8037 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8038 | section in the Yocto Project Development Tasks Manual. |
| 8039 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8040 | :term:`TEST_TARGET` |
| 8041 | Specifies the target controller to use when running tests against a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8042 | test image. The default controller to use is "qemu":: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8043 | |
| 8044 | TEST_TARGET = "qemu" |
| 8045 | |
| 8046 | A target controller is a class that defines how an image gets |
| 8047 | deployed on a target and how a target is started. A layer can extend |
| 8048 | the controllers by adding a module in the layer's |
| 8049 | ``/lib/oeqa/controllers`` directory and by inheriting the |
| 8050 | ``BaseTarget`` class, which is an abstract class that cannot be used |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8051 | as a value of :term:`TEST_TARGET`. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8052 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8053 | You can provide the following arguments with :term:`TEST_TARGET`: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8054 | |
| 8055 | - *"qemu":* Boots a QEMU image and runs the tests. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8056 | ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8057 | in the Yocto Project Development Tasks Manual for more |
| 8058 | information. |
| 8059 | |
| 8060 | - *"simpleremote":* Runs the tests on target hardware that is |
| 8061 | already up and running. The hardware can be on the network or it |
| 8062 | can be a device running an image on QEMU. You must also set |
| 8063 | :term:`TEST_TARGET_IP` when you use |
| 8064 | "simpleremote". |
| 8065 | |
| 8066 | .. note:: |
| 8067 | |
| 8068 | This argument is defined in |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8069 | ``meta/lib/oeqa/controllers/simpleremote.py``. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8070 | |
| 8071 | For information on running tests on hardware, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8072 | ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8073 | section in the Yocto Project Development Tasks Manual. |
| 8074 | |
| 8075 | :term:`TEST_TARGET_IP` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8076 | 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] | 8077 | variable has no effect when :term:`TEST_TARGET` is |
| 8078 | set to "qemu". |
| 8079 | |
| 8080 | 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] | 8081 | an example:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8082 | |
| 8083 | TEST_TARGET_IP = "192.168.1.4:2201" |
| 8084 | |
| 8085 | Specifying a port is |
| 8086 | useful when SSH is started on a non-standard port or in cases when |
| 8087 | your hardware under test is behind a firewall or network that is not |
| 8088 | directly accessible from your host and you need to do port address |
| 8089 | translation. |
| 8090 | |
| 8091 | :term:`TESTIMAGE_AUTO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8092 | Automatically runs the series of automated tests for images when an |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8093 | image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8094 | any image that successfully builds to automatically boot under QEMU. |
| 8095 | Using the variable also adds in dependencies so that any SDK for |
| 8096 | which testing is requested is automatically built first. |
| 8097 | |
| 8098 | These tests are written in Python making use of the ``unittest`` |
| 8099 | module, and the majority of them run commands on the target system |
| 8100 | over ``ssh``. You can set this variable to "1" in your ``local.conf`` |
| 8101 | file in the :term:`Build Directory` to have the |
| 8102 | OpenEmbedded build system automatically run these tests after an |
| 8103 | image successfully builds: |
| 8104 | |
| 8105 | TESTIMAGE_AUTO = "1" |
| 8106 | |
| 8107 | For more information |
| 8108 | on enabling, running, and writing these tests, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8109 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8110 | section in the Yocto Project Development Tasks Manual and the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8111 | ":ref:`ref-classes-testimage*`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8112 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8113 | :term:`THISDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8114 | The directory in which the file BitBake is currently parsing is |
| 8115 | located. Do not manually set this variable. |
| 8116 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8117 | :term:`TIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8118 | The time the build was started. Times appear using the hour, minute, |
| 8119 | and second (HMS) format (e.g. "140159" for one minute and fifty-nine |
| 8120 | seconds past 1400 hours). |
| 8121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8122 | :term:`TMPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8123 | This variable is the base directory the OpenEmbedded build system |
| 8124 | uses for all build output and intermediate files (other than the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8125 | shared state cache). By default, the :term:`TMPDIR` variable points to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8126 | ``tmp`` within the :term:`Build Directory`. |
| 8127 | |
| 8128 | If you want to establish this directory in a location other than the |
| 8129 | default, you can uncomment and edit the following statement in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8130 | ``conf/local.conf`` file in the :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8131 | |
| 8132 | #TMPDIR = "${TOPDIR}/tmp" |
| 8133 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8134 | An example use for this scenario is to set :term:`TMPDIR` to a local disk, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8135 | which does not use NFS, while having the Build Directory use NFS. |
| 8136 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8137 | The filesystem used by :term:`TMPDIR` must have standard filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8138 | semantics (i.e. mixed-case files are unique, POSIX file locking, and |
| 8139 | persistent inodes). Due to various issues with NFS and bugs in some |
| 8140 | implementations, NFS does not meet this minimum requirement. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8141 | Consequently, :term:`TMPDIR` cannot be on NFS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8142 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8143 | :term:`TOOLCHAIN_HOST_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8144 | This variable lists packages the OpenEmbedded build system uses when |
| 8145 | building an SDK, which contains a cross-development environment. The |
| 8146 | packages specified by this variable are part of the toolchain set |
| 8147 | that runs on the :term:`SDKMACHINE`, and each |
| 8148 | package should usually have the prefix ``nativesdk-``. For example, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8149 | consider the following command when building an SDK:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8150 | |
| 8151 | $ bitbake -c populate_sdk imagename |
| 8152 | |
| 8153 | In this case, a default list of packages is |
| 8154 | set in this variable, but you can add additional packages to the |
| 8155 | list. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8156 | ":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] | 8157 | in the Yocto Project Application Development and the Extensible |
| 8158 | Software Development Kit (eSDK) manual for more information. |
| 8159 | |
| 8160 | For background information on cross-development toolchains in the |
| 8161 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8162 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8163 | section in the Yocto Project Overview and Concepts Manual. For |
| 8164 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8165 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8166 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8167 | Note that this variable applies to building an SDK, not an eSDK, |
| 8168 | in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be |
| 8169 | used instead. |
| 8170 | |
| 8171 | :term:`TOOLCHAIN_HOST_TASK_ESDK` |
| 8172 | This variable allows to extend what is installed in the host |
| 8173 | portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK` |
| 8174 | applying to SDKs. |
| 8175 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8176 | :term:`TOOLCHAIN_OUTPUTNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8177 | This variable defines the name used for the toolchain output. The |
| 8178 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8179 | the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8180 | |
| 8181 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" |
| 8182 | |
| 8183 | See |
| 8184 | the :term:`SDK_NAME` and |
| 8185 | :term:`SDK_VERSION` variables for additional |
| 8186 | information. |
| 8187 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8188 | :term:`TOOLCHAIN_TARGET_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8189 | This variable lists packages the OpenEmbedded build system uses when |
| 8190 | it creates the target part of an SDK (i.e. the part built for the |
| 8191 | target hardware), which includes libraries and headers. Use this |
| 8192 | variable to add individual packages to the part of the SDK that runs |
| 8193 | on the target. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8194 | ":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] | 8195 | in the Yocto Project Application Development and the Extensible |
| 8196 | Software Development Kit (eSDK) manual for more information. |
| 8197 | |
| 8198 | For background information on cross-development toolchains in the |
| 8199 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8200 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8201 | section in the Yocto Project Overview and Concepts Manual. For |
| 8202 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8203 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8204 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8205 | :term:`TRANSLATED_TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8206 | A sanitized version of :term:`TARGET_ARCH`. This |
| 8207 | variable is used where the architecture is needed in a value where |
| 8208 | underscores are not allowed, for example within package filenames. In |
| 8209 | this case, dash characters replace any underscore characters used in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8210 | :term:`TARGET_ARCH`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8211 | |
| 8212 | Do not edit this variable. |
| 8213 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8214 | :term:`TUNE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8215 | The GNU canonical architecture for a specific architecture (i.e. |
| 8216 | ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses |
| 8217 | this value to setup configuration. |
| 8218 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8219 | :term:`TUNE_ARCH` definitions are specific to a given architecture. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8220 | definitions can be a single static definition, or can be dynamically |
| 8221 | adjusted. You can see details for a given CPU family by looking at |
| 8222 | the architecture's ``README`` file. For example, the |
| 8223 | ``meta/conf/machine/include/mips/README`` file in the |
| 8224 | :term:`Source Directory` provides information for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8225 | :term:`TUNE_ARCH` specific to the ``mips`` architecture. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8226 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8227 | :term:`TUNE_ARCH` is tied closely to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8228 | :term:`TARGET_ARCH`, which defines the target |
| 8229 | machine's architecture. The BitBake configuration file |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8230 | (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8231 | |
| 8232 | TARGET_ARCH = "${TUNE_ARCH}" |
| 8233 | |
| 8234 | The following list, which is by no means complete since architectures |
| 8235 | are configurable, shows supported machine architectures: |
| 8236 | |
| 8237 | - arm |
| 8238 | - i586 |
| 8239 | - x86_64 |
| 8240 | - powerpc |
| 8241 | - powerpc64 |
| 8242 | - mips |
| 8243 | - mipsel |
| 8244 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8245 | :term:`TUNE_ASARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8246 | Specifies architecture-specific assembler flags for the target |
| 8247 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8248 | :term:`TUNE_ASARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8249 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8250 | through :term:`TUNE_FEATURES`. For example, the |
| 8251 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8252 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8253 | |
| 8254 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" |
| 8255 | |
| 8256 | .. note:: |
| 8257 | |
| 8258 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8259 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8260 | supply its own set of flags). |
| 8261 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8262 | :term:`TUNE_CCARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8263 | Specifies architecture-specific C compiler flags for the target |
| 8264 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8265 | :term:`TUNE_CCARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8266 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8267 | through :term:`TUNE_FEATURES`. |
| 8268 | |
| 8269 | .. note:: |
| 8270 | |
| 8271 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8272 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8273 | supply its own set of flags). |
| 8274 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8275 | :term:`TUNE_FEATURES` |
| 8276 | Features used to "tune" a compiler for optimal use given a specific |
| 8277 | processor. The features are defined within the tune files and allow |
| 8278 | arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on |
| 8279 | the features. |
| 8280 | |
| 8281 | The OpenEmbedded build system verifies the features to be sure they |
| 8282 | are not conflicting and that they are supported. |
| 8283 | |
| 8284 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8285 | :term:`TUNE_FEATURES` as follows:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8286 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8287 | TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8288 | |
| 8289 | See the :term:`DEFAULTTUNE` variable for more information. |
| 8290 | |
| 8291 | :term:`TUNE_LDARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8292 | Specifies architecture-specific linker flags for the target system. |
| 8293 | The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8294 | :term:`TUNE_LDARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8295 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8296 | through :term:`TUNE_FEATURES`. For example, the |
| 8297 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8298 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8299 | |
| 8300 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" |
| 8301 | |
| 8302 | .. note:: |
| 8303 | |
| 8304 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8305 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8306 | supply its own set of flags). |
| 8307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8308 | :term:`TUNE_PKGARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8309 | The package architecture understood by the packaging system to define |
| 8310 | the architecture, ABI, and tuning of output packages. The specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8311 | tune is defined using the "_tune" override as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8312 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8313 | TUNE_PKGARCH:tune-tune = "tune" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8314 | |
| 8315 | These tune-specific package architectures are defined in the machine |
| 8316 | 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] | 8317 | the ``meta/conf/machine/include/x86/tune-core2.inc`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8318 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8319 | TUNE_PKGARCH:tune-core2-32 = "core2-32" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8320 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8321 | :term:`TUNECONFLICTS[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8322 | Specifies CPU or Application Binary Interface (ABI) tuning features |
| 8323 | that conflict with feature. |
| 8324 | |
| 8325 | Known tuning conflicts are specified in the machine include files in |
| 8326 | the :term:`Source Directory`. Here is an example from |
| 8327 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file |
| 8328 | that lists the "o32" and "n64" features as conflicting with the "n32" |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8329 | feature:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8330 | |
| 8331 | TUNECONFLICTS[n32] = "o32 n64" |
| 8332 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8333 | :term:`TUNEVALID[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8334 | Specifies a valid CPU or Application Binary Interface (ABI) tuning |
| 8335 | feature. The specified feature is stored as a flag. Valid features |
| 8336 | are specified in the machine include files (e.g. |
| 8337 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8338 | from that file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8339 | |
| 8340 | TUNEVALID[bigendian] = "Enable big-endian mode." |
| 8341 | |
| 8342 | See the machine include files in the :term:`Source Directory` |
| 8343 | for these features. |
| 8344 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8345 | :term:`UBOOT_CONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8346 | Configures the :term:`UBOOT_MACHINE` and can |
| 8347 | also define :term:`IMAGE_FSTYPES` for individual |
| 8348 | cases. |
| 8349 | |
| 8350 | Following is an example from the ``meta-fsl-arm`` layer. :: |
| 8351 | |
| 8352 | UBOOT_CONFIG ??= "sd" |
| 8353 | UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard" |
| 8354 | UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config" |
| 8355 | UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs" |
| 8356 | UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" |
| 8357 | |
| 8358 | 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] | 8359 | :term:`UBOOT_MACHINE`. The "sd" configuration defines |
| 8360 | "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8361 | "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] | 8362 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8363 | 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] | 8364 | :ref:`uboot-config <ref-classes-uboot-config>` |
| 8365 | class. |
| 8366 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8367 | :term:`UBOOT_DTB_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8368 | 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] | 8369 | image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8370 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify |
| 8371 | the load address to be used in |
| 8372 | creating the dtb sections of Image Tree Source for the FIT image. |
| 8373 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8374 | :term:`UBOOT_DTBO_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8375 | 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] | 8376 | image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8377 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in |
| 8378 | creating the dtbo sections of Image Tree Source for the FIT image. |
| 8379 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8380 | :term:`UBOOT_ENTRYPOINT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8381 | 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] | 8382 | creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8383 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8384 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8385 | :term:`UBOOT_LOADADDRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8386 | 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] | 8387 | creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8388 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8389 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8390 | :term:`UBOOT_LOCALVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8391 | Appends a string to the name of the local version of the U-Boot |
| 8392 | image. For example, assuming the version of the U-Boot image built |
| 8393 | 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] | 8394 | "2013.10-yocto" given the following statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8395 | |
| 8396 | UBOOT_LOCALVERSION = "-yocto" |
| 8397 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8398 | :term:`UBOOT_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8399 | Specifies the value passed on the ``make`` command line when building |
| 8400 | a U-Boot image. The value indicates the target platform |
| 8401 | configuration. You typically set this variable from the machine |
| 8402 | configuration file (i.e. ``conf/machine/machine_name.conf``). |
| 8403 | |
| 8404 | Please see the "Selection of Processor Architecture and Board Type" |
| 8405 | section in the U-Boot README for valid values for this variable. |
| 8406 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8407 | :term:`UBOOT_MAKE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8408 | Specifies the target called in the ``Makefile``. The default target |
| 8409 | is "all". |
| 8410 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8411 | :term:`UBOOT_MKIMAGE` |
| 8412 | Specifies the name of the mkimage command as used by the |
| 8413 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble |
| 8414 | the FIT image. This can be used to substitute an alternative command, wrapper |
| 8415 | script or function if desired. The default is "uboot-mkimage". |
| 8416 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8417 | :term:`UBOOT_MKIMAGE_DTCOPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8418 | Options for the device tree compiler passed to mkimage '-D' |
| 8419 | 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] | 8420 | 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] | 8421 | pass the ``-D`` option to mkimage. |
| 8422 | |
| 8423 | :term:`UBOOT_MKIMAGE_SIGN` |
| 8424 | Specifies the name of the mkimage command as used by the |
| 8425 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign |
| 8426 | the FIT image after it has been assembled (if enabled). This can be used |
| 8427 | to substitute an alternative command, wrapper script or function if |
| 8428 | desired. The default is "${:term:`UBOOT_MKIMAGE`}". |
| 8429 | |
| 8430 | :term:`UBOOT_MKIMAGE_SIGN_ARGS` |
| 8431 | Optionally specifies additional arguments for the |
| 8432 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the |
| 8433 | mkimage command when signing the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8434 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8435 | :term:`UBOOT_RD_ENTRYPOINT` |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8436 | Specifies the entrypoint for the RAM disk image. |
| 8437 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8438 | :term:`UBOOT_RD_ENTRYPOINT` variable is used |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8439 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8440 | entrypoint to be used in creating the Image Tree Source for |
| 8441 | the FIT image. |
| 8442 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8443 | :term:`UBOOT_RD_LOADADDRESS` |
| 8444 | Specifies the load address for the RAM disk image. |
| 8445 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8446 | :term:`UBOOT_RD_LOADADDRESS` variable is used |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8447 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8448 | load address to be used in creating the Image Tree Source for |
| 8449 | the FIT image. |
| 8450 | |
| 8451 | :term:`UBOOT_SIGN_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8452 | Enable signing of FIT image. The default value is "0". |
| 8453 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8454 | :term:`UBOOT_SIGN_KEYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8455 | Location of the directory containing the RSA key and |
| 8456 | certificate used for signing FIT image. |
| 8457 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8458 | :term:`UBOOT_SIGN_KEYNAME` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8459 | 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] | 8460 | :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt |
| 8461 | certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have |
| 8462 | :term:`UBOOT_SIGN_KEYNAME` set to "dev". |
| 8463 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8464 | :term:`UBOOT_SUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8465 | Points to the generated U-Boot extension. For example, ``u-boot.sb`` |
| 8466 | has a ``.sb`` extension. |
| 8467 | |
| 8468 | The default U-Boot extension is ``.bin`` |
| 8469 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8470 | :term:`UBOOT_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8471 | Specifies the target used for building U-Boot. The target is passed |
| 8472 | directly as part of the "make" command (e.g. SPL and AIS). If you do |
| 8473 | not specifically set this variable, the OpenEmbedded build process |
| 8474 | passes and uses "all" for the target during the U-Boot building |
| 8475 | process. |
| 8476 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8477 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8478 | Specifies a list of options that, if reported by the configure script |
| 8479 | as being invalid, should not generate a warning during the |
| 8480 | :ref:`ref-tasks-configure` task. Normally, invalid |
| 8481 | configure options are simply not passed to the configure script (e.g. |
| 8482 | should be removed from :term:`EXTRA_OECONF` or |
| 8483 | :term:`PACKAGECONFIG_CONFARGS`). |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 8484 | However, there are common options that are passed to all |
| 8485 | configure scripts at a class level, but might not be valid for some |
| 8486 | configure scripts. Therefore warnings about these options are useless. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8487 | 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] | 8488 | |
| 8489 | The configure arguments check that uses |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8490 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8491 | :ref:`insane <ref-classes-insane>` class and is only enabled if the |
| 8492 | recipe inherits the :ref:`autotools <ref-classes-autotools>` class. |
| 8493 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8494 | :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8495 | For recipes inheriting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8496 | :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8497 | specifies the package that contains the initscript that is enabled. |
| 8498 | |
| 8499 | The default value is "${PN}". Given that almost all recipes that |
| 8500 | install initscripts package them in the main package for the recipe, |
| 8501 | you rarely need to set this variable in individual recipes. |
| 8502 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8503 | :term:`UPSTREAM_CHECK_COMMITS` |
| 8504 | You can perform a per-recipe check for what the latest upstream |
| 8505 | source code version is by calling ``devtool latest-version recipe``. If |
| 8506 | the recipe source code is provided from Git repositories, but |
| 8507 | releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS` |
| 8508 | to ``1`` in the recipe, and the OpenEmbedded build system |
| 8509 | will compare the latest commit with the one currently specified |
| 8510 | by the recipe (:term:`SRCREV`). |
| 8511 | :: |
| 8512 | |
| 8513 | UPSTREAM_CHECK_COMMITS = "1" |
| 8514 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8515 | :term:`UPSTREAM_CHECK_GITTAGREGEX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8516 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8517 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8518 | the recipe source code is provided from Git repositories, the |
| 8519 | OpenEmbedded build system determines the latest upstream version by |
| 8520 | picking the latest tag from the list of all repository tags. |
| 8521 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8522 | You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8523 | regular expression to filter only the relevant tags should the |
| 8524 | default filter not work correctly. |
| 8525 | :: |
| 8526 | |
| 8527 | UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" |
| 8528 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8529 | :term:`UPSTREAM_CHECK_REGEX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8530 | Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8531 | regular expression instead of the default one when the package |
| 8532 | checking system is parsing the page found using |
| 8533 | :term:`UPSTREAM_CHECK_URI`. |
| 8534 | :: |
| 8535 | |
| 8536 | UPSTREAM_CHECK_REGEX = "package_regex" |
| 8537 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8538 | :term:`UPSTREAM_CHECK_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8539 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8540 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8541 | the source code is provided from tarballs, the latest version is |
| 8542 | determined by fetching the directory listing where the tarball is and |
| 8543 | attempting to find a later tarball. When this approach does not work, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8544 | 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] | 8545 | contains the link to the latest tarball. |
| 8546 | :: |
| 8547 | |
| 8548 | UPSTREAM_CHECK_URI = "recipe_url" |
| 8549 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8550 | :term:`UPSTREAM_VERSION_UNKNOWN` |
| 8551 | You can perform a per-recipe check for what the latest upstream |
| 8552 | source code version is by calling ``devtool latest-version recipe``. |
| 8553 | If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`, |
| 8554 | :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in |
| 8555 | the recipe allows to determine what the latest upstream version is, |
| 8556 | you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe |
| 8557 | to acknowledge that the check cannot be performed. |
| 8558 | :: |
| 8559 | |
| 8560 | UPSTREAM_VERSION_UNKNOWN = "1" |
| 8561 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8562 | :term:`USE_DEVFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8563 | Determines if ``devtmpfs`` is used for ``/dev`` population. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8564 | default value used for :term:`USE_DEVFS` is "1" when no value is |
| 8565 | 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] | 8566 | statically populated ``/dev`` directory. |
| 8567 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8568 | 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] | 8569 | the Yocto Project Development Tasks Manual for information on how to |
| 8570 | use this variable. |
| 8571 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8572 | :term:`USE_VT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8573 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8574 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8575 | determines whether or not to run a |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8576 | `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8577 | virtual terminals in order to enable logging in through those |
| 8578 | terminals. |
| 8579 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8580 | The default value used for :term:`USE_VT` is "1" when no default value is |
| 8581 | 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] | 8582 | machine configuration file for machines that do not have a graphical |
| 8583 | display attached and therefore do not need virtual terminal |
| 8584 | functionality. |
| 8585 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8586 | :term:`USER_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8587 | 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] | 8588 | OpenEmbedded build system to enable extra features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8589 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8590 | The default list is set in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8591 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8592 | USER_CLASSES ?= "buildstats" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8593 | |
| 8594 | For more information, see |
| 8595 | ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`. |
| 8596 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8597 | :term:`USERADD_ERROR_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8598 | If set to ``error``, forces the OpenEmbedded build system to produce |
| 8599 | an error if the user identification (``uid``) and group |
| 8600 | identification (``gid``) values are not defined in any of the files |
| 8601 | listed in :term:`USERADD_UID_TABLES` and |
| 8602 | :term:`USERADD_GID_TABLES`. If set to |
| 8603 | ``warn``, a warning will be issued instead. |
| 8604 | |
| 8605 | The default behavior for the build system is to dynamically apply |
| 8606 | ``uid`` and ``gid`` values. Consequently, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8607 | :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] | 8608 | on using statically assigned ``gid`` and ``uid`` values, you should |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8609 | set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8610 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8611 | |
| 8612 | USERADD_ERROR_DYNAMIC = "error" |
| 8613 | |
| 8614 | Overriding the |
| 8615 | default behavior implies you are going to also take steps to set |
| 8616 | static ``uid`` and ``gid`` values through use of the |
| 8617 | :term:`USERADDEXTENSION`, |
| 8618 | :term:`USERADD_UID_TABLES`, and |
| 8619 | :term:`USERADD_GID_TABLES` variables. |
| 8620 | |
| 8621 | .. note:: |
| 8622 | |
| 8623 | There is a difference in behavior between setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8624 | :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8625 | When it is set to ``warn``, the build system will report a warning for |
| 8626 | every undefined ``uid`` and ``gid`` in any recipe. But when it is set |
| 8627 | to ``error``, it will only report errors for recipes that are actually |
| 8628 | built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8629 | This saves you from having to add static IDs for recipes that you |
| 8630 | know will never be built. |
| 8631 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8632 | :term:`USERADD_GID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8633 | Specifies a password file to use for obtaining static group |
| 8634 | identification (``gid``) values when the OpenEmbedded build system |
| 8635 | adds a group to the system during package installation. |
| 8636 | |
| 8637 | When applying static group identification (``gid``) values, the |
| 8638 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8639 | ``files/group`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8640 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8641 | |
| 8642 | |
| 8643 | USERADD_GID_TABLES = "files/group" |
| 8644 | |
| 8645 | .. note:: |
| 8646 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8647 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8648 | causes the build system to use static ``gid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8649 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8650 | :term:`USERADD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8651 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8652 | this variable specifies the individual packages within the recipe |
| 8653 | that require users and/or groups to be added. |
| 8654 | |
| 8655 | You must set this variable if the recipe inherits the class. For |
| 8656 | example, the following enables adding a user for the main package in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8657 | a recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8658 | |
| 8659 | USERADD_PACKAGES = "${PN}" |
| 8660 | |
| 8661 | .. note:: |
| 8662 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8663 | 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] | 8664 | variable, you need to set one or more of the :term:`USERADD_PARAM`, |
| 8665 | :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8666 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8667 | :term:`USERADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8668 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8669 | this variable specifies for a package what parameters should pass to |
| 8670 | the ``useradd`` command if you add a user to the system when the |
| 8671 | package is installed. |
| 8672 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8673 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8674 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8675 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8676 | --no-create-home --shell /bin/false \ |
| 8677 | --user-group messagebus" |
| 8678 | |
| 8679 | For information on the |
| 8680 | standard Linux shell command ``useradd``, see |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8681 | https://linux.die.net/man/8/useradd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8682 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8683 | :term:`USERADD_UID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8684 | Specifies a password file to use for obtaining static user |
| 8685 | identification (``uid``) values when the OpenEmbedded build system |
| 8686 | adds a user to the system during package installation. |
| 8687 | |
| 8688 | When applying static user identification (``uid``) values, the |
| 8689 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8690 | ``files/passwd`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8691 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8692 | |
| 8693 | USERADD_UID_TABLES = "files/passwd" |
| 8694 | |
| 8695 | .. note:: |
| 8696 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8697 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8698 | causes the build system to use static ``uid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8699 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8700 | :term:`USERADDEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8701 | When set to "useradd-staticids", causes the OpenEmbedded build system |
| 8702 | to base all user and group additions on a static ``passwd`` and |
| 8703 | ``group`` files found in :term:`BBPATH`. |
| 8704 | |
| 8705 | To use static user identification (``uid``) and group identification |
| 8706 | (``gid``) values, set the variable as follows in your ``local.conf`` |
| 8707 | file: USERADDEXTENSION = "useradd-staticids" |
| 8708 | |
| 8709 | .. note:: |
| 8710 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8711 | Setting this variable to use static ``uid`` and ``gid`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8712 | values causes the OpenEmbedded build system to employ the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8713 | :ref:`ref-classes-useradd` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8714 | |
| 8715 | If you use static ``uid`` and ``gid`` information, you must also |
| 8716 | specify the ``files/passwd`` and ``files/group`` files by setting the |
| 8717 | :term:`USERADD_UID_TABLES` and |
| 8718 | :term:`USERADD_GID_TABLES` variables. |
| 8719 | Additionally, you should also set the |
| 8720 | :term:`USERADD_ERROR_DYNAMIC` variable. |
| 8721 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8722 | :term:`VOLATILE_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8723 | Specifies the persistence of the target's ``/var/log`` directory, |
| 8724 | which is used to house postinstall target log files. |
| 8725 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8726 | 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] | 8727 | file is not persistent. You can override this setting by setting the |
| 8728 | variable to "no" to make the log directory persistent. |
| 8729 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8730 | :term:`WARN_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8731 | Specifies the quality assurance checks whose failures are reported as |
| 8732 | warnings by the OpenEmbedded build system. You set this variable in |
| 8733 | your distribution configuration file. For a list of the checks you |
| 8734 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8735 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8736 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8737 | :term:`WKS_FILE` |
| 8738 | Specifies the location of the Wic kickstart file that is used by the |
| 8739 | OpenEmbedded build system to create a partitioned image |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8740 | (``image.wic``). For information on how to create a partitioned |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8741 | image, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8742 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8743 | section in the Yocto Project Development Tasks Manual. For details on |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8744 | the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8745 | |
| 8746 | :term:`WKS_FILE_DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8747 | When placed in the recipe that builds your image, this variable lists |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8748 | build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8749 | applicable when Wic images are active (i.e. when |
| 8750 | :term:`IMAGE_FSTYPES` contains entries related |
| 8751 | to Wic). If your recipe does not create Wic images, the variable has |
| 8752 | no effect. |
| 8753 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8754 | The :term:`WKS_FILE_DEPENDS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8755 | :term:`DEPENDS` variable. When you use the variable in |
| 8756 | your recipe that builds the Wic image, dependencies you list in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8757 | :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8758 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8759 | With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8760 | specify a list of additional dependencies (e.g. native tools, |
| 8761 | bootloaders, and so forth), that are required to build Wic images. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8762 | Following is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8763 | |
| 8764 | WKS_FILE_DEPENDS = "some-native-tool" |
| 8765 | |
| 8766 | In the |
| 8767 | previous example, some-native-tool would be replaced with an actual |
| 8768 | native tool on which the build would depend. |
| 8769 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 8770 | :term:`WKS_FILES` |
| 8771 | Specifies a list of candidate Wic kickstart files to be used by the |
| 8772 | OpenEmbedded build system to create a partitioned image. Only the |
| 8773 | first one that is found, from left to right, will be used. |
| 8774 | |
| 8775 | This is only useful when there are multiple ``.wks`` files that can be |
| 8776 | used to produce an image. A typical case is when multiple layers are |
| 8777 | used for different hardware platforms, each supplying a different |
| 8778 | ``.wks`` file. In this case, you specify all possible ones through |
| 8779 | :term:`WKS_FILES`. |
| 8780 | |
| 8781 | If only one ``.wks`` file is used, set :term:`WKS_FILE` instead. |
| 8782 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8783 | :term:`WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8784 | The pathname of the work directory in which the OpenEmbedded build |
| 8785 | system builds a recipe. This directory is located within the |
| 8786 | :term:`TMPDIR` directory structure and is specific to |
| 8787 | the recipe being built and the system for which it is being built. |
| 8788 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8789 | The :term:`WORKDIR` directory is defined as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8790 | |
| 8791 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
| 8792 | |
| 8793 | The actual directory depends on several things: |
| 8794 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8795 | - :term:`TMPDIR`: The top-level build output directory |
| 8796 | - :term:`MULTIMACH_TARGET_SYS`: The target system identifier |
| 8797 | - :term:`PN`: The recipe name |
| 8798 | - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which |
| 8799 | is usually the case for most recipes, then `EXTENDPE` is blank) |
| 8800 | - :term:`PV`: The recipe version |
| 8801 | - :term:`PR`: The recipe revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8802 | |
| 8803 | As an example, assume a Source Directory top-level folder name |
| 8804 | ``poky``, a default Build Directory at ``poky/build``, and a |
| 8805 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose |
| 8806 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work |
| 8807 | directory the build system uses to build the package would be as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8808 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8809 | |
| 8810 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
| 8811 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8812 | :term:`XSERVER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8813 | Specifies the packages that should be installed to provide an X |
| 8814 | server and drivers for the current machine, assuming your image |
| 8815 | directly includes ``packagegroup-core-x11-xserver`` or, perhaps |
| 8816 | indirectly, includes "x11-base" in |
| 8817 | :term:`IMAGE_FEATURES`. |
| 8818 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8819 | The default value of :term:`XSERVER`, if not specified in the machine |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8820 | configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 8821 | |
| 8822 | :term:`XZ_THREADS` |
| 8823 | Specifies the number of parallel threads that should be used when |
| 8824 | using xz compression. |
| 8825 | |
| 8826 | By default this scales with core count, but is never set less than 2 |
| 8827 | to ensure that multi-threaded mode is always used so that the output |
| 8828 | file contents are deterministic. Builds will work with a value of 1 |
| 8829 | but the output will differ compared to the output from the compression |
| 8830 | generated when more than one thread is used. |
| 8831 | |
| 8832 | On systems where many tasks run in parallel, setting a limit to this |
| 8833 | can be helpful in controlling system resource usage. |
| 8834 | |
| 8835 | :term:`XZ_MEMLIMIT` |
| 8836 | Specifies the maximum memory the xz compression should use as a percentage |
| 8837 | of system memory. If unconstrained the xz compressor can use large amounts of |
| 8838 | memory and become problematic with parallelism elsewhere in the build. |
| 8839 | "50%" has been found to be a good value. |
| 8840 | |
| 8841 | :term:`ZSTD_THREADS` |
| 8842 | Specifies the number of parallel threads that should be used when |
| 8843 | using ZStandard compression. |
| 8844 | |
| 8845 | By default this scales with core count, but is never set less than 2 |
| 8846 | to ensure that multi-threaded mode is always used so that the output |
| 8847 | file contents are deterministic. Builds will work with a value of 1 |
| 8848 | but the output will differ compared to the output from the compression |
| 8849 | generated when more than one thread is used. |
| 8850 | |
| 8851 | On systems where many tasks run in parallel, setting a limit to this |
| 8852 | can be helpful in controlling system resource usage. |
| 8853 | |