blob: 6a7888ab47299b7781470afed9f13ab7acb83553 [file] [log] [blame]
Andrew Geisslerf0343792020-11-18 10:42:21 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
3******************
4Variables Glossary
5******************
6
7This chapter lists common variables used in the OpenEmbedded build
8system and gives an overview of their function and contents.
9
Andrew Geisslerf0343792020-11-18 10:42:21 -060010: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 Geisslerc9f78652020-09-18 14:11:35 -050018
19.. glossary::
Andrew Geissler9aee5002022-03-30 16:27:02 +000020 :sorted:
Andrew Geisslerc9f78652020-09-18 14:11:35 -050021
Andrew Geisslerf0343792020-11-18 10:42:21 -060022 :term:`ABIEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050023 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 Geisslerc926e172021-05-07 16:11:35 -050028 following extension::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050029
30 ABIEXTENSION = "eabi"
31
Andrew Geisslerf0343792020-11-18 10:42:21 -060032 :term:`ALLOW_EMPTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050033 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 Geisslerc926e172021-05-07 16:11:35 -050040 conjunction with a package name override, as in::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050041
Patrick Williams0ca19cc2021-08-16 14:03:13 -050042 ALLOW_EMPTY:${PN} = "1"
43 ALLOW_EMPTY:${PN}-dev = "1"
44 ALLOW_EMPTY:${PN}-staticdev = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050045
Andrew Geisslerf0343792020-11-18 10:42:21 -060046 :term:`ALTERNATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050047 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 IIIac69b482021-06-02 12:28:27 -070053 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 Geisslerc9f78652020-09-18 14:11:35 -050056
Patrick Williams0ca19cc2021-08-16 14:03:13 -050057 ALTERNATIVE:busybox = "sh sed test bracket"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050058
59 For more information on the alternatives system, see the
Andrew Geissler595f6302022-01-24 19:11:47 +000060 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050061 section.
62
Andrew Geisslerf0343792020-11-18 10:42:21 -060063 :term:`ALTERNATIVE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050064 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 Geissler09036742021-06-25 14:25:14 -050067 use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual
Andrew Geisslerc926e172021-05-07 16:11:35 -050068 location::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050069
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 Geissler09036742021-06-25 14:25:14 -050077 If :term:`ALTERNATIVE_LINK_NAME` is not defined, it defaults to ``${bindir}/name``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050078
79 For more information on the alternatives system, see the
Andrew Geissler595f6302022-01-24 19:11:47 +000080 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050081 section.
82
Andrew Geisslerf0343792020-11-18 10:42:21 -060083 :term:`ALTERNATIVE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050084 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 Geisslerc926e172021-05-07 16:11:35 -050089 available syntax forms::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050090
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 Geissler595f6302022-01-24 19:11:47 +000096 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050097 section.
98
Andrew Geisslerf0343792020-11-18 10:42:21 -060099 :term:`ALTERNATIVE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500100 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 Geisslerc926e172021-05-07 16:11:35 -0500105 particular packages. Here are the available syntax forms::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500106
107 ALTERNATIVE_TARGET = "target"
108 ALTERNATIVE_TARGET[name] = "target"
109 ALTERNATIVE_TARGET_pkg[name] = "target"
110
111 .. note::
112
Andrew Geissler09036742021-06-25 14:25:14 -0500113 If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500114 from the :term:`ALTERNATIVE_LINK_NAME` variable.
115
Andrew Geissler09036742021-06-25 14:25:14 -0500116 If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the
117 same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500118 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 Geissler595f6302022-01-24 19:11:47 +0000126 ":ref:`ref-classes-update-alternatives`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500127
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600128 :term:`ANY_OF_DISTRO_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -0600129 When inheriting the :ref:`ref-classes-features_check`
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600130 class, this variable identifies a list of distribution features where
131 at least one must be enabled in the current configuration in order
132 for the OpenEmbedded build system to build the recipe. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -0500133 if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES`
134 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600135 the recipe will be skipped, and if the build system attempts to build
136 the recipe then an error will be triggered.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600137
Andrew Geisslerf0343792020-11-18 10:42:21 -0600138 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500139 An override list of append strings for each target specified with
140 :term:`LABELS`.
141
Andrew Geissler517393d2023-01-13 08:55:19 -0600142 See the :ref:`ref-classes-grub-efi` class for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500143 information on how this variable is used.
144
Andrew Geisslerf0343792020-11-18 10:42:21 -0600145 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500146 The minimal command and arguments used to run ``ar``.
147
Andrew Geisslerf0343792020-11-18 10:42:21 -0600148 :term:`ARCHIVER_MODE`
Andrew Geissler517393d2023-01-13 08:55:19 -0600149 When used with the :ref:`ref-classes-archiver` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500150 determines the type of information used to create a released archive.
151 You can use this variable to create archives of patched source,
152 original source, configured source, and so forth by employing the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500153 following variable flags (varflags)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500154
155 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
156 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
157 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
158 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
159 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
160 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
161 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
162 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
163
164 For information on how the variable works, see the
165 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
166
Andrew Geisslerf0343792020-11-18 10:42:21 -0600167 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500168 Minimal command and arguments needed to run the assembler.
169
Andrew Geisslerf0343792020-11-18 10:42:21 -0600170 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500171 Lists recipe names (:term:`PN` values) BitBake does not
172 attempt to build. Instead, BitBake assumes these recipes have already
173 been built.
174
Andrew Geissler09036742021-06-25 14:25:14 -0500175 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500176 tools that should not be built. An example is ``git-native``, which
177 when specified, allows for the Git binary from the host to be used
178 rather than building ``git-native``.
179
Andrew Geisslerf0343792020-11-18 10:42:21 -0600180 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500181 Provides additional ``shlibs`` provider mapping information, which
182 adds to or overwrites the information provided automatically by the
183 system. Separate multiple entries using spaces.
184
185 As an example, use the following form to add an ``shlib`` provider of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500186 shlibname in packagename with the optional version::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500187
188 shlibname:packagename[_version]
189
190 Here is an example that adds a shared library named ``libEGL.so.1``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500191 as being provided by the ``libegl-implementation`` package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500192
193 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
194
Andrew Geisslerf0343792020-11-18 10:42:21 -0600195 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500196 The email address used to contact the original author or authors in
197 order to send patches and forward bugs.
198
Andrew Geisslerf0343792020-11-18 10:42:21 -0600199 :term:`AUTO_LIBNAME_PKGS`
Andrew Geissler517393d2023-01-13 08:55:19 -0600200 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500201 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500202 packages should be checked for libraries and renamed according to
203 Debian library package naming.
204
Andrew Geissler517393d2023-01-13 08:55:19 -0600205 The default value is "${PACKAGES}", which causes the
206 :ref:`ref-classes-debian` class to act on all packages that are
207 explicitly generated by the recipe.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500208
Andrew Geisslerf0343792020-11-18 10:42:21 -0600209 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500210 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500211 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500212
213 SRCREV = "${AUTOREV}"
214
215 If you use the previous statement to retrieve the latest version of
216 software, you need to be sure :term:`PV` contains
Andrew Geissler517393d2023-01-13 08:55:19 -0600217 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel
218 recipe that inherits the :ref:`ref-classes-kernel` class and you
219 use the previous statement. In this example, ``${SRCPV}`` does not
220 automatically get into :term:`PV`. Consequently, you need to change
221 :term:`PV` in your recipe so that it does contain ``${SRCPV}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500222
223 For more information see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600224 ":ref:`dev-manual/packages:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500225 section in the Yocto Project Development Tasks Manual.
226
Andrew Geissler9aee5002022-03-30 16:27:02 +0000227 :term:`AUTO_SYSLINUXMENU`
228 Enables creating an automatic menu for the syslinux bootloader. You
229 must set this variable in your recipe. The
Andrew Geissler517393d2023-01-13 08:55:19 -0600230 :ref:`ref-classes-syslinux` class checks this variable.
Andrew Geissler9aee5002022-03-30 16:27:02 +0000231
Andrew Geisslerf0343792020-11-18 10:42:21 -0600232 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500233 The list of defined CPU and Application Binary Interface (ABI)
234 tunings (i.e. "tunes") available for use by the OpenEmbedded build
235 system.
236
237 The list simply presents the tunes that are available. Not all tunes
238 may be compatible with a particular machine configuration, or with
239 each other in a
Andrew Geissler517393d2023-01-13 08:55:19 -0600240 :ref:`Multilib <dev-manual/libraries:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500241 configuration.
242
243 To add a tune to the list, be sure to append it with spaces using the
244 "+=" BitBake operator. Do not simply replace the list by using the
245 "=" operator. See the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500246 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500247 User Manual for more information.
248
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500249 :term:`AZ_SAS`
250 Azure Storage Shared Access Signature, when using the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500251 :ref:`Azure Storage fetcher (az://) <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500252 This variable can be defined to be used by the fetcher to authenticate
Andrew Geissler517393d2023-01-13 08:55:19 -0600253 and gain access to non-public artifacts::
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500254
255 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
256
257 For more information see Microsoft's Azure Storage documentation at
258 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
259
Andrew Geisslerf0343792020-11-18 10:42:21 -0600260 :term:`B`
Patrick Williams2390b1b2022-11-03 13:47:49 -0500261 The directory within the :term:`Build Directory` in which the
262 OpenEmbedded build system places generated objects during a recipe's
263 build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500264 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500265
266 S = "${WORKDIR}/${BP}"
267
Andrew Geissler09036742021-06-25 14:25:14 -0500268 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400269 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500270 separating these directories. The build system defaults to using
271 separate directories for ``gcc`` and some kernel recipes.
272
Andrew Geisslerf0343792020-11-18 10:42:21 -0600273 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500274 Lists "recommended-only" packages to not install. Recommended-only
275 packages are packages installed only through the
276 :term:`RRECOMMENDS` variable. You can prevent any
277 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500278 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500279
280 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
281
282 You can set this variable globally in your ``local.conf`` file or you
283 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500284 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500285
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500286 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500287
288 It is important to realize that if you choose to not install packages
289 using this variable and some other packages are dependent on them
290 (i.e. listed in a recipe's :term:`RDEPENDS`
291 variable), the OpenEmbedded build system ignores your request and
292 will install the packages to avoid dependency errors.
293
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700294 This variable is supported only when using the IPK and RPM
295 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500296
297 See the :term:`NO_RECOMMENDATIONS` and the
298 :term:`PACKAGE_EXCLUDE` variables for related
299 information.
300
Andrew Geisslerf0343792020-11-18 10:42:21 -0600301 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500302 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500303 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler517393d2023-01-13 08:55:19 -0600304 context. See the ":ref:`dev-manual/libraries:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500305 section in the Yocto Project Development Tasks Manual for information
306 on Multilib.
307
Andrew Geissler09036742021-06-25 14:25:14 -0500308 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500309 the :term:`Source Directory`. If Multilib is not
310 being used, the value defaults to "lib".
311
Andrew Geisslerf0343792020-11-18 10:42:21 -0600312 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500313 Points to the base of the work directory for all recipes. The default
314 value is "${TMPDIR}/work".
315
Andrew Geisslerf0343792020-11-18 10:42:21 -0600316 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500317 Specifies a space-delimited list of hosts that the fetcher is allowed
318 to use to obtain the required source code. Following are
319 considerations surrounding this variable:
320
Andrew Geissler09036742021-06-25 14:25:14 -0500321 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500322 or set to "0".
323
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700324 - There is limited support for wildcard matching against the beginning of
325 host names. For example, the following setting matches
Andrew Geissler517393d2023-01-13 08:55:19 -0600326 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500327
328 BB_ALLOWED_NETWORKS = "*.gnu.org"
329
330 .. note::
331
332 The use of the "``*``" character only works at the beginning of
333 a host name and it must be isolated from the remainder of the
334 host name. You cannot use the wildcard character in any other
335 location of the name or combined with the front part of the
336 name.
337
338 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
339 is not.
340
341 - Mirrors not in the host list are skipped and logged in debug.
342
343 - Attempts to access networks not in the host list cause a failure.
344
Andrew Geissler09036742021-06-25 14:25:14 -0500345 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500346 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500347 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500348 fetched from an allowed location and avoids raising an error when a
349 host that is not allowed is in a :term:`SRC_URI`
350 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500351 host listed in :term:`SRC_URI` after a successful fetch from the
352 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500353
Andrew Geissler517393d2023-01-13 08:55:19 -0600354 :term:`BB_BASEHASH_IGNORE_VARS`
355 See :term:`bitbake:BB_BASEHASH_IGNORE_VARS` in the BitBake manual.
356
Patrick Williams8e7b46e2023-05-01 14:19:06 -0500357 :term:`BB_CACHEDIR`
358 See :term:`bitbake:BB_CACHEDIR` in the BitBake manual.
359
Andrew Geissler517393d2023-01-13 08:55:19 -0600360 :term:`BB_CHECK_SSL_CERTS`
361 See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual.
362
363 :term:`BB_CONSOLELOG`
364 See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual.
365
366 :term:`BB_CURRENTTASK`
367 See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual.
368
Andrew Geisslerf0343792020-11-18 10:42:21 -0600369 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500370 Defines how BitBake handles situations where an append file
371 (``.bbappend``) has no corresponding recipe file (``.bb``). This
372 condition often occurs when layers get out of sync (e.g. ``oe-core``
373 bumps a recipe version and the old recipe no longer exists and the
374 other layer has not been updated to the new version of the recipe
375 yet).
376
377 The default fatal behavior is safest because it is the sane reaction
378 given something is out of sync. It is important to realize when your
379 changes are no longer being applied.
380
381 You can change the default behavior by setting this variable to "1",
382 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500383 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500384
385 BB_DANGLINGAPPENDS_WARNONLY = "1"
386
Andrew Geissler517393d2023-01-13 08:55:19 -0600387 :term:`BB_DEFAULT_TASK`
388 See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual.
389
390 :term:`BB_DEFAULT_UMASK`
391 See :term:`bitbake:BB_DEFAULT_UMASK` in the BitBake manual.
392
Andrew Geisslerf0343792020-11-18 10:42:21 -0600393 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500394 Monitors disk space and available inodes during the build and allows
395 you to control the build based on these parameters.
396
397 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500398 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500399 found in the :term:`Build Directory`. Use the
400 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500401
402 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500403
404 BB_DISKMON_DIRS = "action,dir,threshold [...]"
405
406 where:
407
408 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000409 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500410 a threshold is broken.
411 STOPTASKS: Stop the build after the currently
412 executing tasks have finished when
413 a threshold is broken.
414 WARN: Issue a warning but continue the
415 build when a threshold is broken.
416 Subsequent warnings are issued as
417 defined by the BB_DISKMON_WARNINTERVAL
418 variable, which must be defined in
419 the conf/local.conf file.
420
421 dir is:
422 Any directory you choose. You can specify one or
423 more directories to monitor by separating the
424 groupings with a space. If two directories are
425 on the same device, only the first directory
426 is monitored.
427
428 threshold is:
429 Either the minimum available disk space,
430 the minimum number of free inodes, or
431 both. You must specify at least one. To
432 omit one or the other, simply omit the value.
433 Specify the threshold using G, M, K for Gbytes,
434 Mbytes, and Kbytes, respectively. If you do
435 not specify G, M, or K, Kbytes is assumed by
436 default. Do not use GB, MB, or KB.
437
Andrew Geisslerc926e172021-05-07 16:11:35 -0500438 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500439
440 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
441 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
442 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
443
444 The first example works only if you also provide the
445 :term:`BB_DISKMON_WARNINTERVAL`
446 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000447 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500448 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
449 below 100 Kbytes. Because two directories are provided with the
450 variable, the build system also issue a warning when the disk space
451 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
452 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500453 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500454 variable.
455
456 The second example stops the build after all currently executing
457 tasks complete when the minimum disk space in the ``${TMPDIR}``
458 directory drops below 1 Gbyte. No disk monitoring occurs for the free
459 inodes in this case.
460
Andrew Geissler595f6302022-01-24 19:11:47 +0000461 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500462 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
463 disk space monitoring for the directory itself occurs in this case.
464
Andrew Geisslerf0343792020-11-18 10:42:21 -0600465 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500466 Defines the disk space and free inode warning intervals. To set these
467 intervals, define the variable in your ``conf/local.conf`` file in
468 the :term:`Build Directory`.
469
Andrew Geissler09036742021-06-25 14:25:14 -0500470 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500471 must also use the :term:`BB_DISKMON_DIRS`
472 variable and define its action as "WARN". During the build,
473 subsequent warnings are issued each time disk space or number of free
474 inodes further reduces by the respective interval.
475
Andrew Geissler09036742021-06-25 14:25:14 -0500476 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
477 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500478 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500479
480 BB_DISKMON_WARNINTERVAL = "50M,5K"
481
482 When specifying the variable in your configuration file, use the
483 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500484
485 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500486
487 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
488
489 where:
490
491 disk_space_interval is:
492 An interval of memory expressed in either
493 G, M, or K for Gbytes, Mbytes, or Kbytes,
494 respectively. You cannot use GB, MB, or KB.
495
496 disk_inode_interval is:
497 An interval of free inodes expressed in either
498 G, M, or K for Gbytes, Mbytes, or Kbytes,
499 respectively. You cannot use GB, MB, or KB.
500
Andrew Geisslerc926e172021-05-07 16:11:35 -0500501 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500502
503 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
504 BB_DISKMON_WARNINTERVAL = "50M,5K"
505
506 These variables cause the
507 OpenEmbedded build system to issue subsequent warnings each time the
508 available disk space further reduces by 50 Mbytes or the number of
509 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
510 directory. Subsequent warnings based on the interval occur each time
511 a respective interval is reached beyond the initial warning (i.e. 1
512 Gbytes and 100 Kbytes).
513
Andrew Geissler517393d2023-01-13 08:55:19 -0600514 :term:`BB_ENV_PASSTHROUGH`
515 See :term:`bitbake:BB_ENV_PASSTHROUGH` in the BitBake manual.
516
517 :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
518 See :term:`bitbake:BB_ENV_PASSTHROUGH_ADDITIONS` in the BitBake manual.
519
520 :term:`BB_FETCH_PREMIRRORONLY`
521 See :term:`bitbake:BB_FETCH_PREMIRRORONLY` in the BitBake manual.
522
523 :term:`BB_FILENAME`
524 See :term:`bitbake:BB_FILENAME` in the BitBake manual.
525
Andrew Geisslerf0343792020-11-18 10:42:21 -0600526 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500527 Causes tarballs of the source control repositories (e.g. Git
528 repositories), including metadata, to be placed in the
529 :term:`DL_DIR` directory.
530
531 For performance reasons, creating and placing tarballs of these
532 repositories is not the default action by the OpenEmbedded build
Andrew Geissler517393d2023-01-13 08:55:19 -0600533 system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500534
535 BB_GENERATE_MIRROR_TARBALLS = "1"
536
537 Set this variable in your
538 ``local.conf`` file in the :term:`Build Directory`.
539
540 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500541 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500542 source control work directories.
543
Andrew Geissler517393d2023-01-13 08:55:19 -0600544 :term:`BB_GENERATE_SHALLOW_TARBALLS`
545 See :term:`bitbake:BB_GENERATE_SHALLOW_TARBALLS` in the BitBake manual.
546
547 :term:`BB_GIT_SHALLOW`
548 See :term:`bitbake:BB_GIT_SHALLOW` in the BitBake manual.
549
550 :term:`BB_GIT_SHALLOW_DEPTH`
551 See :term:`bitbake:BB_GIT_SHALLOW_DEPTH` in the BitBake manual.
552
553 :term:`BB_HASHCHECK_FUNCTION`
554 See :term:`bitbake:BB_HASHCHECK_FUNCTION` in the BitBake manual.
555
556 :term:`BB_HASHCONFIG_IGNORE_VARS`
557 See :term:`bitbake:BB_HASHCONFIG_IGNORE_VARS` in the BitBake manual.
558
559 :term:`BB_HASHSERVE`
560 See :term:`bitbake:BB_HASHSERVE` in the BitBake manual.
561
562 :term:`BB_HASHSERVE_UPSTREAM`
563 See :term:`bitbake:BB_HASHSERVE_UPSTREAM` in the BitBake manual.
564
565 :term:`BB_INVALIDCONF`
566 See :term:`bitbake:BB_INVALIDCONF` in the BitBake manual.
567
568 :term:`BB_LOGCONFIG`
569 See :term:`bitbake:BB_LOGCONFIG` in the BitBake manual.
570
571 :term:`BB_LOGFMT`
572 See :term:`bitbake:BB_LOGFMT` in the BitBake manual.
573
574 :term:`BB_MULTI_PROVIDER_ALLOWED`
575 See :term:`bitbake:BB_MULTI_PROVIDER_ALLOWED` in the BitBake manual.
576
577 :term:`BB_NICE_LEVEL`
578 See :term:`bitbake:BB_NICE_LEVEL` in the BitBake manual.
579
580 :term:`BB_NO_NETWORK`
581 See :term:`bitbake:BB_NO_NETWORK` in the BitBake manual.
582
583 :term:`BB_NUMBER_PARSE_THREADS`
584 See :term:`bitbake:BB_NUMBER_PARSE_THREADS` in the BitBake manual.
585
Andrew Geisslerf0343792020-11-18 10:42:21 -0600586 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500587 The maximum number of tasks BitBake should run in parallel at any one
588 time. The OpenEmbedded build system automatically configures this
589 variable to be equal to the number of cores on the build system. For
590 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500591 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500592 to "4".
593
594 For single socket systems (i.e. one CPU), you should not have to
595 override this variable to gain optimal parallelism during builds.
596 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500597 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500598 is not set higher than "20".
599
600 For more information on speeding up builds, see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600601 ":ref:`dev-manual/speeding-up-build:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500602 section in the Yocto Project Development Tasks Manual.
603
Patrick Williams7784c422022-11-17 07:29:11 -0600604 On the other hand, if your goal is to limit the amount of system
605 resources consumed by BitBake tasks, setting :term:`BB_NUMBER_THREADS`
606 to a number lower than the number of CPU threads in your machine
607 won't be sufficient. That's because each package will still be built
608 and installed through a number of parallel jobs specified by the
609 :term:`PARALLEL_MAKE` variable, which is by default the number of CPU
610 threads in your system, and is not impacted by the
611 :term:`BB_NUMBER_THREADS` value.
612
613 So, if you set :term:`BB_NUMBER_THREADS` to "1" but don't set
614 :term:`PARALLEL_MAKE`, most of your system resources will be consumed
615 anyway.
616
617 Therefore, if you intend to reduce the load of your build system by
618 setting :term:`BB_NUMBER_THREADS` to a relatively low value compared
619 to the number of CPU threads on your system, you should also set
620 :term:`PARALLEL_MAKE` to a similarly low value.
621
622 An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage
623 of build system resources under control is to use the smarter
624 :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or
625 :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake
626 from starting new tasks as long as thresholds are exceeded. Anyway,
627 as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the
628 tasks already being run from using all CPU threads on the system
629 if :term:`PARALLEL_MAKE` is not set to a low value.
630
Andrew Geissler517393d2023-01-13 08:55:19 -0600631 :term:`BB_ORIGENV`
632 See :term:`bitbake:BB_ORIGENV` in the BitBake manual.
633
634 :term:`BB_PRESERVE_ENV`
635 See :term:`bitbake:BB_PRESERVE_ENV` in the BitBake manual.
636
637 :term:`BB_PRESSURE_MAX_CPU`
638 See :term:`bitbake:BB_PRESSURE_MAX_CPU` in the BitBake manual.
639
640 :term:`BB_PRESSURE_MAX_IO`
641 See :term:`bitbake:BB_PRESSURE_MAX_IO` in the BitBake manual.
642
643 :term:`BB_PRESSURE_MAX_MEMORY`
644 See :term:`bitbake:BB_PRESSURE_MAX_MEMORY` in the BitBake manual.
645
646 :term:`BB_RUNFMT`
647 See :term:`bitbake:BB_RUNFMT` in the BitBake manual.
648
649 :term:`BB_RUNTASK`
650 See :term:`bitbake:BB_RUNTASK` in the BitBake manual.
651
652 :term:`BB_SCHEDULER`
653 See :term:`bitbake:BB_SCHEDULER` in the BitBake manual.
654
655 :term:`BB_SCHEDULERS`
656 See :term:`bitbake:BB_SCHEDULERS` in the BitBake manual.
657
Andrew Geisslerf0343792020-11-18 10:42:21 -0600658 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500659 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500660 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500661 long the BitBake server stays resident between invocations.
662
663 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500664 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500665
666 BB_SERVER_TIMEOUT = "20"
667
668 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400669 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500670
Andrew Geissler517393d2023-01-13 08:55:19 -0600671 :term:`BB_SETSCENE_DEPVALID`
672 See :term:`bitbake:BB_SETSCENE_DEPVALID` in the BitBake manual.
673
674 :term:`BB_SIGNATURE_EXCLUDE_FLAGS`
675 See :term:`bitbake:BB_SIGNATURE_EXCLUDE_FLAGS` in the BitBake manual.
676
677 :term:`BB_SIGNATURE_HANDLER`
678 See :term:`bitbake:BB_SIGNATURE_HANDLER` in the BitBake manual.
679
680 :term:`BB_SRCREV_POLICY`
681 See :term:`bitbake:BB_SRCREV_POLICY` in the BitBake manual.
682
683 :term:`BB_STRICT_CHECKSUM`
684 See :term:`bitbake:BB_STRICT_CHECKSUM` in the BitBake manual.
685
686 :term:`BB_TASK_IONICE_LEVEL`
687 See :term:`bitbake:BB_TASK_IONICE_LEVEL` in the BitBake manual.
688
689 :term:`BB_TASK_NICE_LEVEL`
690 See :term:`bitbake:BB_TASK_NICE_LEVEL` in the BitBake manual.
691
692 :term:`BB_TASKHASH`
693 See :term:`bitbake:BB_TASKHASH` in the BitBake manual.
694
695 :term:`BB_VERBOSE_LOGS`
696 See :term:`bitbake:BB_VERBOSE_LOGS` in the BitBake manual.
697
698 :term:`BB_WORKERCONTEXT`
699 See :term:`bitbake:BB_WORKERCONTEXT` in the BitBake manual.
700
Andrew Geisslerf0343792020-11-18 10:42:21 -0600701 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500702 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700703 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500704 ``quilt-native``, which is a copy of Quilt built to run on the build
705 system; "crosses" such as ``gcc-cross``, which is a compiler built to
706 run on the build machine but produces binaries that run on the target
Andrew Geissler517393d2023-01-13 08:55:19 -0600707 :term:`MACHINE`; ":ref:`ref-classes-nativesdk`", which
708 targets the SDK machine instead of :term:`MACHINE`; and "mulitlibs" in
709 the form "``multilib:``\ multilib_name".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500710
711 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500712 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500713
714 BBCLASSEXTEND =+ "native nativesdk"
715 BBCLASSEXTEND =+ "multilib:multilib_name"
716
717 .. note::
718
Andrew Geissler09036742021-06-25 14:25:14 -0500719 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500720 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500721 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500722 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400723 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500724
Andrew Geissler09036742021-06-25 14:25:14 -0500725 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500726 Parsing once adds some limitations. For example, it is not
727 possible to include a different file depending on the variant,
728 since ``include`` statements are processed when the recipe is
729 parsed.
730
Andrew Geissler517393d2023-01-13 08:55:19 -0600731 :term:`BBDEBUG`
732 See :term:`bitbake:BBDEBUG` in the BitBake manual.
733
Andrew Geisslerf0343792020-11-18 10:42:21 -0600734 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500735 Lists the names of configured layers. These names are used to find
736 the other ``BBFILE_*`` variables. Typically, each layer will append
737 its name to this variable in its ``conf/layer.conf`` file.
738
Andrew Geisslerf0343792020-11-18 10:42:21 -0600739 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500740 Variable that expands to match files from
741 :term:`BBFILES` in a particular layer. This variable
742 is used in the ``conf/layer.conf`` file and must be suffixed with the
743 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
744
Andrew Geisslerf0343792020-11-18 10:42:21 -0600745 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500746 Assigns the priority for recipe files in each layer.
747
748 This variable is useful in situations where the same recipe appears
749 in more than one layer. Setting this variable allows you to
750 prioritize a layer against other layers that contain the same recipe
Andrew Geissler615f2f12022-07-15 14:00:58 -0500751 --- effectively letting you control the precedence for the multiple
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500752 layers. The precedence established through this variable stands
753 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500754 example, a layer that has a recipe with a higher :term:`PV` value but for
755 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500756 has a lower precedence.
757
Andrew Geissler09036742021-06-25 14:25:14 -0500758 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500759 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500760 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
761 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500762 for more information. The default priority, if unspecified for a
763 layer with no dependencies, is the lowest defined priority + 1 (or 1
764 if no priorities are defined).
765
766 .. tip::
767
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500768 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500769 to list all configured layers along with their priorities.
770
Andrew Geisslerf0343792020-11-18 10:42:21 -0600771 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500772 A space-separated list of recipe files BitBake uses to build
773 software.
774
775 When specifying recipe files, you can pattern match using Python's
Patrick Williams2390b1b2022-11-03 13:47:49 -0500776 `glob <https://docs.python.org/3/library/glob.html>`__ syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500777 For details on the syntax, see the documentation by following the
778 previous link.
779
Andrew Geisslerf0343792020-11-18 10:42:21 -0600780 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500781 Activates content when identified layers are present. You identify
782 the layers by the collections that the layers define.
783
Andrew Geissler09036742021-06-25 14:25:14 -0500784 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500785 whose corresponding ``.bb`` file is in a layer that attempts to
786 modify other layers through ``.bbappend`` but does not want to
787 introduce a hard dependency on those other layers.
788
Andrew Geissler09036742021-06-25 14:25:14 -0500789 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000790 ``collection_name:filename_pattern``.
791
792 The following example identifies two collection names and two
793 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500794
795 BBFILES_DYNAMIC += " \
796 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
797 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
798 "
799
800 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000801 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500802
803 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500804
805 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
806 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
807 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
808
Andrew Geissler517393d2023-01-13 08:55:19 -0600809 :term:`BBINCLUDED`
810 See :term:`bitbake:BBINCLUDED` in the BitBake manual.
811
Andrew Geisslerf0343792020-11-18 10:42:21 -0600812 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500813 Variable that controls how BitBake displays logs on build failure.
814
Andrew Geisslerf0343792020-11-18 10:42:21 -0600815 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500816 If :term:`BBINCLUDELOGS` is set, specifies the
817 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500818 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500819 the entire log is printed.
820
Andrew Geisslerf0343792020-11-18 10:42:21 -0600821 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500822 Lists the layers to enable during the build. This variable is defined
823 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500824 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500825
826 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500827 /home/scottrif/poky/meta \
828 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500829 /home/scottrif/poky/meta-yocto-bsp \
830 /home/scottrif/poky/meta-mykernel \
831 "
832
833 This example enables four layers, one of which is a custom,
834 user-defined layer named ``meta-mykernel``.
835
Andrew Geissler517393d2023-01-13 08:55:19 -0600836 :term:`BBLAYERS_FETCH_DIR`
837 See :term:`bitbake:BBLAYERS_FETCH_DIR` in the BitBake manual.
838
Andrew Geisslerf0343792020-11-18 10:42:21 -0600839 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500840 Prevents BitBake from processing recipes and recipe append files.
841
Andrew Geissler09036742021-06-25 14:25:14 -0500842 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500843 ``.bbappend`` files. BitBake ignores any recipe or recipe append
844 files that match any of the expressions. It is as if BitBake does not
845 see them at all. Consequently, matching files are not parsed or
846 otherwise used by BitBake.
847
848 The values you provide are passed to Python's regular expression
849 compiler. Consequently, the syntax follows Python's Regular
850 Expression (re) syntax. The expressions are compared against the full
851 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500852 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500853
854 The following example uses a complete regular expression to tell
855 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500856 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500857
858 BBMASK = "meta-ti/recipes-misc/"
859
860 If you want to mask out multiple directories or recipes, you can
861 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500862 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500863
864 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
865 BBMASK += "/meta-oe/recipes-support/"
866 BBMASK += "/meta-foo/.*/openldap"
867 BBMASK += "opencv.*\.bbappend"
868 BBMASK += "lzma"
869
870 .. note::
871
872 When specifying a directory name, use the trailing slash character
873 to ensure you match just that directory name.
874
Andrew Geisslerf0343792020-11-18 10:42:21 -0600875 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500876 Specifies each additional separate configuration when you are
877 building targets with multiple configurations. Use this variable in
878 your ``conf/local.conf`` configuration file. Specify a
879 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500880 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500881
882 BBMULTICONFIG = "configA configB configC"
883
Andrew Geissler615f2f12022-07-15 14:00:58 -0500884 Each configuration file you use must reside in a ``multiconfig``
885 subdirectory of a configuration directory within a layer, or
886 within the :term:`Build Directory` (e.g.
887 ``build_directory/conf/multiconfig/configA.conf`` or
888 ``mylayer/conf/multiconfig/configB.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500889
Andrew Geissler09036742021-06-25 14:25:14 -0500890 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500891 that supports building targets with multiple configurations, see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600892 ":ref:`dev-manual/building:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500893 section in the Yocto Project Development Tasks Manual.
894
Andrew Geissler517393d2023-01-13 08:55:19 -0600895 :term:`BBPATH`
896 See :term:`bitbake:BBPATH` in the BitBake manual.
897
Andrew Geisslerf0343792020-11-18 10:42:21 -0600898 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500899 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500900 BitBake remote server.
901
902 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500903 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500904
905 export BBSERVER=localhost:$port
906
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000907 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500908 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500909 data.
910
Andrew Geissler517393d2023-01-13 08:55:19 -0600911 :term:`BBTARGETS`
912 See :term:`bitbake:BBTARGETS` in the BitBake manual.
913
Andrew Geisslerf0343792020-11-18 10:42:21 -0600914 :term:`BINCONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -0600915 When inheriting the :ref:`ref-classes-binconfig-disabled` class, this
916 variable specifies binary configuration scripts to disable in favor of
917 using ``pkg-config`` to query the information. The
918 :ref:`ref-classes-binconfig-disabled` class will modify the specified
919 scripts to return an error so that calls to them can be easily found
920 and replaced.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500921
922 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500923 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500924
925 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
926
Andrew Geisslerf0343792020-11-18 10:42:21 -0600927 :term:`BINCONFIG_GLOB`
Andrew Geissler517393d2023-01-13 08:55:19 -0600928 When inheriting the :ref:`ref-classes-binconfig` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500929 this variable specifies a wildcard for configuration scripts that
930 need editing. The scripts are edited to correct any paths that have
931 been set up during compilation so that they are correct for use when
932 installed into the sysroot and called by the build processes of other
933 recipes.
934
935 .. note::
936
Andrew Geissler09036742021-06-25 14:25:14 -0500937 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500938 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
939 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500940 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500941 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
942 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500943
944 For more information on how this variable works, see
Patrick Williams975a06f2022-10-21 14:42:47 -0500945 ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500946 You can also find general
947 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000948 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500949
Andrew Geissler517393d2023-01-13 08:55:19 -0600950 :term:`BITBAKE_UI`
951 See :term:`bitbake:BITBAKE_UI` in the BitBake manual.
952
Andrew Geisslerf0343792020-11-18 10:42:21 -0600953 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500954 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500955 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500956 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500957
958 ${BPN}-${PV}
959
Andrew Geisslerf0343792020-11-18 10:42:21 -0600960 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500961 This variable is a version of the :term:`PN` variable with
962 common prefixes and suffixes removed, such as ``nativesdk-``,
963 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
964 The exact lists of prefixes and suffixes removed are specified by the
965 :term:`MLPREFIX` and
966 :term:`SPECIAL_PKGSUFFIX` variables,
967 respectively.
968
Andrew Geisslerf0343792020-11-18 10:42:21 -0600969 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500970 Specifies a URL for an upstream bug tracking website for a recipe.
971 The OpenEmbedded build system does not use this variable. Rather, the
972 variable is a useful pointer in case a bug in the software being
973 built needs to be manually reported.
974
Andrew Geisslerf0343792020-11-18 10:42:21 -0600975 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500976 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500977 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500978 machine name reported by the ``uname`` command.
979
Andrew Geisslerf0343792020-11-18 10:42:21 -0600980 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500981 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500982 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500983
Andrew Geisslerf0343792020-11-18 10:42:21 -0600984 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500985 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500986 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500987
Andrew Geisslerf0343792020-11-18 10:42:21 -0600988 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500989 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500990 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500991 points to GCC and passes as arguments the value of
992 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500993 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500994
Andrew Geisslerf0343792020-11-18 10:42:21 -0600995 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500996 Specifies the flags to pass to the C compiler when building for the
997 build host. When building in the ``-native`` context,
998 :term:`CFLAGS` is set to the value of this variable by
999 default.
1000
Andrew Geisslerf0343792020-11-18 10:42:21 -06001001 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001002 Specifies the flags to pass to the C preprocessor (i.e. to both the C
1003 and the C++ compilers) when building for the build host. When
1004 building in the ``-native`` context, :term:`CPPFLAGS`
1005 is set to the value of this variable by default.
1006
Andrew Geisslerf0343792020-11-18 10:42:21 -06001007 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001008 Specifies the flags to pass to the C++ compiler when building for the
1009 build host. When building in the ``-native`` context,
1010 :term:`CXXFLAGS` is set to the value of this variable
1011 by default.
1012
Andrew Geisslerf0343792020-11-18 10:42:21 -06001013 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001014 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -05001015 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001016 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -05001017 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001018
Andrew Geisslerf0343792020-11-18 10:42:21 -06001019 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001020 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05001021 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001022 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -05001023 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001024
Andrew Geisslerf0343792020-11-18 10:42:21 -06001025 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001026 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -05001027 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001028
Andrew Geisslerf0343792020-11-18 10:42:21 -06001029 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001030 Specifies the flags to pass to the linker when building for the build
1031 host. When building in the ``-native`` context,
1032 :term:`LDFLAGS` is set to the value of this variable
1033 by default.
1034
Andrew Geisslerf0343792020-11-18 10:42:21 -06001035 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001036 Specifies the optimization flags passed to the C compiler when
1037 building for the build host or the SDK. The flags are passed through
1038 the :term:`BUILD_CFLAGS` and
1039 :term:`BUILDSDK_CFLAGS` default values.
1040
Andrew Geissler5f350902021-07-23 13:09:54 -04001041 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001042 -pipe".
1043
Andrew Geisslerf0343792020-11-18 10:42:21 -06001044 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001045 Specifies the operating system in use on the build host (e.g.
1046 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler615f2f12022-07-15 14:00:58 -05001047 :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001048 first word, converted to lower-case characters.
1049
Andrew Geisslerf0343792020-11-18 10:42:21 -06001050 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001051 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -05001052 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geissler517393d2023-01-13 08:55:19 -06001053 :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001054
Andrew Geisslerf0343792020-11-18 10:42:21 -06001055 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001056 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -05001057 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001058 points to
1059 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
1060
Andrew Geisslerf0343792020-11-18 10:42:21 -06001061 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001062 Specifies the system, including the architecture and the operating
1063 system, to use when building for the build host (i.e. when building
Andrew Geissler517393d2023-01-13 08:55:19 -06001064 :ref:`ref-classes-native` recipes).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001065
1066 The OpenEmbedded build system automatically sets this variable based
1067 on :term:`BUILD_ARCH`,
1068 :term:`BUILD_VENDOR`, and
1069 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -05001070 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001071
Andrew Geisslerf0343792020-11-18 10:42:21 -06001072 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001073 Specifies the vendor name to use when building for the build host.
1074 The default value is an empty string ("").
1075
Andrew Geisslerf0343792020-11-18 10:42:21 -06001076 :term:`BUILDDIR`
Patrick Williams2390b1b2022-11-03 13:47:49 -05001077 Points to the location of the :term:`Build Directory`. You can define
1078 this directory indirectly through the :ref:`structure-core-script` script
1079 by passing in a :term:`Build Directory` path when you run the script. If
1080 you run the script and do not provide a :term:`Build Directory` path, the
1081 :term:`BUILDDIR` defaults to ``build`` in the current directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001082
Andrew Geisslerf0343792020-11-18 10:42:21 -06001083 :term:`BUILDHISTORY_COMMIT`
Andrew Geissler517393d2023-01-13 08:55:19 -06001084 When inheriting the :ref:`ref-classes-buildhistory` class, this variable
1085 specifies whether or not to commit the build history output in a local
1086 Git repository. If set to "1", this local repository will be maintained
1087 automatically by the :ref:`ref-classes-buildhistory` class and a commit
1088 will be created on every build for changes to each top-level subdirectory
1089 of the build history output (images, packages, and sdk). If you want to
1090 track changes to build history over time, you should set this value to
1091 "1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001092
Andrew Geissler517393d2023-01-13 08:55:19 -06001093 By default, the :ref:`ref-classes-buildhistory` class
Patrick Williams975a06f2022-10-21 14:42:47 -05001094 enables committing the buildhistory output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001095
Patrick Williams975a06f2022-10-21 14:42:47 -05001096 BUILDHISTORY_COMMIT ?= "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001097
Andrew Geisslerf0343792020-11-18 10:42:21 -06001098 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geissler517393d2023-01-13 08:55:19 -06001099 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001100 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -05001101 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001102 :term:`BUILDHISTORY_COMMIT` variable must
1103 be set to "1".
1104
1105 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -05001106 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001107 email@host". Providing an email address or host that is not valid
1108 does not produce an error.
1109
Andrew Geissler517393d2023-01-13 08:55:19 -06001110 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1111 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001112
1113 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
1114
Andrew Geisslerf0343792020-11-18 10:42:21 -06001115 :term:`BUILDHISTORY_DIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06001116 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001117 class, this variable specifies the directory in which build history
1118 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001119 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001120
Andrew Geissler517393d2023-01-13 08:55:19 -06001121 By default, the :ref:`ref-classes-buildhistory` class sets the directory
1122 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001123
1124 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
1125
Andrew Geisslerf0343792020-11-18 10:42:21 -06001126 :term:`BUILDHISTORY_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001127 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001128 class, this variable specifies the build history features to be
1129 enabled. For more information on how build history works, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06001130 ":ref:`dev-manual/build-quality:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001131 section in the Yocto Project Development Tasks Manual.
1132
1133 You can specify these features in the form of a space-separated list:
1134
1135 - *image:* Analysis of the contents of images, which includes the
1136 list of installed packages among other things.
1137
1138 - *package:* Analysis of the contents of individual packages.
1139
1140 - *sdk:* Analysis of the contents of the software development kit
1141 (SDK).
1142
1143 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -06001144 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001145 (sstate) tasks.
1146 This saves one file per task and lists the SHA-256 checksums for
1147 each file staged (i.e. the output of the task).
1148
Andrew Geissler517393d2023-01-13 08:55:19 -06001149 By default, the :ref:`ref-classes-buildhistory` class enables the
1150 following features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001151
1152 BUILDHISTORY_FEATURES ?= "image package sdk"
1153
Andrew Geisslerf0343792020-11-18 10:42:21 -06001154 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001155 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001156 class, this variable specifies a list of paths to files copied from
1157 the image contents into the build history directory under an
1158 "image-files" directory in the directory for the image, so that you
1159 can track the contents of each file. The default is to copy
1160 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1161 changes in user and group entries. You can modify the list to include
1162 any file. Specifying an invalid path does not produce an error.
1163 Consequently, you can include files that might not always be present.
1164
Andrew Geissler517393d2023-01-13 08:55:19 -06001165 By default, the :ref:`ref-classes-buildhistory` class provides paths to
1166 the following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001167
1168 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1169
Andrew Geissler5f350902021-07-23 13:09:54 -04001170 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
Andrew Geissler517393d2023-01-13 08:55:19 -06001171 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geissler5f350902021-07-23 13:09:54 -04001172 class, this variable specifies a common path prefix that should be
1173 stripped off the beginning of paths in the task signature list when the
1174 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1175 useful when build history is populated from multiple sources that may not
1176 all use the same top level directory.
1177
Andrew Geissler517393d2023-01-13 08:55:19 -06001178 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1179 as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001180
1181 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1182
1183 In this case, no prefixes will be stripped.
1184
Andrew Geisslerf0343792020-11-18 10:42:21 -06001185 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geissler517393d2023-01-13 08:55:19 -06001186 When inheriting the :ref:`ref-classes-buildhistory` class, this variable
1187 optionally specifies a remote repository to which build history pushes
1188 Git changes. In order for :term:`BUILDHISTORY_PUSH_REPO` to work,
1189 :term:`BUILDHISTORY_COMMIT` must be set to "1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001190
1191 The repository should correspond to a remote address that specifies a
1192 repository as understood by Git, or alternatively to a remote name
1193 that you have set up manually using ``git remote`` within the local
1194 repository.
1195
Andrew Geissler517393d2023-01-13 08:55:19 -06001196 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1197 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001198
1199 BUILDHISTORY_PUSH_REPO ?= ""
1200
Andrew Geissler517393d2023-01-13 08:55:19 -06001201 :term:`BUILDNAME`
1202 See :term:`bitbake:BUILDNAME` in the BitBake manual.
1203
Andrew Geisslerf0343792020-11-18 10:42:21 -06001204 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001205 Specifies the flags to pass to the C compiler when building for the
1206 SDK. When building in the ``nativesdk-`` context,
1207 :term:`CFLAGS` is set to the value of this variable by
1208 default.
1209
Andrew Geisslerf0343792020-11-18 10:42:21 -06001210 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001211 Specifies the flags to pass to the C pre-processor (i.e. to both the
1212 C and the C++ compilers) when building for the SDK. When building in
1213 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1214 to the value of this variable by default.
1215
Andrew Geisslerf0343792020-11-18 10:42:21 -06001216 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001217 Specifies the flags to pass to the C++ compiler when building for the
1218 SDK. When building in the ``nativesdk-`` context,
1219 :term:`CXXFLAGS` is set to the value of this variable
1220 by default.
1221
Andrew Geisslerf0343792020-11-18 10:42:21 -06001222 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001223 Specifies the flags to pass to the linker when building for the SDK.
1224 When building in the ``nativesdk-`` context,
1225 :term:`LDFLAGS` is set to the value of this variable
1226 by default.
1227
Andrew Geisslerf0343792020-11-18 10:42:21 -06001228 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001229 Points to the location of the directory that holds build statistics
Andrew Geissler517393d2023-01-13 08:55:19 -06001230 when you use and enable the :ref:`ref-classes-buildstats` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001231 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001232 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1233
Andrew Geisslerf0343792020-11-18 10:42:21 -06001234 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001235 For the BusyBox recipe, specifies whether to split the output
1236 executable file into two parts: one for features that require
1237 ``setuid root``, and one for the remaining features (i.e. those that
1238 do not require ``setuid root``).
1239
Andrew Geissler09036742021-06-25 14:25:14 -05001240 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001241 splitting the output executable file. Set the variable to "0" to get
1242 a single output executable file.
1243
Andrew Geissler517393d2023-01-13 08:55:19 -06001244 :term:`BZRDIR`
1245 See :term:`bitbake:BZRDIR` in the BitBake manual.
1246
Andrew Geisslerf0343792020-11-18 10:42:21 -06001247 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001248 Specifies the directory BitBake uses to store a cache of the
1249 :term:`Metadata` so it does not need to be parsed every time
1250 BitBake is started.
1251
Andrew Geisslerf0343792020-11-18 10:42:21 -06001252 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001253 The minimal command and arguments used to run the C compiler.
1254
Andrew Geisslerf0343792020-11-18 10:42:21 -06001255 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001256 Specifies the flags to pass to the C compiler. This variable is
1257 exported to an environment variable and thus made visible to the
1258 software being built during the compilation step.
1259
Andrew Geissler09036742021-06-25 14:25:14 -05001260 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001261 being built:
1262
1263 - :term:`TARGET_CFLAGS` when building for the
1264 target
1265
1266 - :term:`BUILD_CFLAGS` when building for the
1267 build host (i.e. ``-native``)
1268
1269 - :term:`BUILDSDK_CFLAGS` when building for
1270 an SDK (i.e. ``nativesdk-``)
1271
Andrew Geisslerf0343792020-11-18 10:42:21 -06001272 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001273 An internal variable specifying the special class override that
1274 should currently apply (e.g. "class-target", "class-native", and so
1275 forth). The classes that use this variable (e.g.
Andrew Geissler517393d2023-01-13 08:55:19 -06001276 :ref:`ref-classes-native`, :ref:`ref-classes-nativesdk`, and so forth)
1277 set the variable to appropriate values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001278
1279 .. note::
1280
Andrew Geissler5f350902021-07-23 13:09:54 -04001281 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001282 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001283
1284 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001285 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001286
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001287 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001288 install my-extra-file ${D}${sysconfdir}
1289 }
1290
1291 Here is an example where ``FOO`` is set to
1292 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001293 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001294
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001295 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001296 FOO = "other"
1297
Andrew Geissler09036742021-06-25 14:25:14 -05001298 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001299 that it is included in the default value of
1300 :term:`OVERRIDES`.
1301
Andrew Geisslerf0343792020-11-18 10:42:21 -06001302 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001303 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001304 ``make clean`` command does not work for the software being built.
1305 Consequently, the OpenEmbedded build system will not try to run
1306 ``make clean`` during the :ref:`ref-tasks-configure`
1307 task, which is the default behavior.
1308
Andrew Geisslerf0343792020-11-18 10:42:21 -06001309 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001310 Provides a list of hardware features that are enabled in both
1311 :term:`MACHINE_FEATURES` and
1312 :term:`DISTRO_FEATURES`. This select list of
1313 features contains features that make sense to be controlled both at
1314 the machine and distribution configuration level. For example, the
1315 "bluetooth" feature requires hardware support but should also be
1316 optional at the distribution level, in case the hardware supports
1317 Bluetooth but you do not ever intend to use it.
1318
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001319 :term:`COMMERCIAL_AUDIO_PLUGINS`
1320 This variable is specific to the :yocto_git:`GStreamer recipes
1321 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`.
1322 It allows to build the GStreamer `"ugly"
1323 <https://github.com/GStreamer/gst-plugins-ugly>`__ and
1324 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ audio plugins.
1325
1326 See the :ref:`dev-manual/licenses:other variables related to commercial licenses`
1327 section for usage details.
1328
1329 :term:`COMMERCIAL_VIDEO_PLUGINS`
1330 This variable is specific to the :yocto_git:`GStreamer recipes
1331 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`.
1332 It allows to build the GStreamer `"ugly"
1333 <https://github.com/GStreamer/gst-plugins-ugly>`__ and
1334 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ video plugins.
1335
1336 See the :ref:`dev-manual/licenses:other variables related to commercial licenses`
1337 section for usage details.
1338
Andrew Geisslerf0343792020-11-18 10:42:21 -06001339 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001340 Points to ``meta/files/common-licenses`` in the
1341 :term:`Source Directory`, which is where generic license
1342 files reside.
1343
Andrew Geisslerf0343792020-11-18 10:42:21 -06001344 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001345 A regular expression that resolves to one or more hosts (when the
1346 recipe is native) or one or more targets (when the recipe is
1347 non-native) with which a recipe is compatible. The regular expression
1348 is matched against :term:`HOST_SYS`. You can use the
1349 variable to stop recipes from being built for classes of systems with
1350 which the recipes are not compatible. Stopping these builds is
1351 particularly useful with kernels. The variable also helps to increase
1352 parsing speed since the build system skips parsing recipes not
1353 compatible with the current system.
1354
Andrew Geisslerf0343792020-11-18 10:42:21 -06001355 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001356 A regular expression that resolves to one or more target machines
1357 with which a recipe is compatible. The regular expression is matched
1358 against :term:`MACHINEOVERRIDES`. You can use
1359 the variable to stop recipes from being built for machines with which
1360 the recipes are not compatible. Stopping these builds is particularly
1361 useful with kernels. The variable also helps to increase parsing
1362 speed since the build system skips parsing recipes not compatible
1363 with the current machine.
1364
Andrew Geisslerf0343792020-11-18 10:42:21 -06001365 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001366 Defines wildcards to match when installing a list of complementary
1367 packages for all the packages explicitly (or implicitly) installed in
1368 an image.
1369
Patrick Williams975a06f2022-10-21 14:42:47 -05001370 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
1371 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1372 which is similar to the Unix style pathname pattern expansion
1373 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001374
1375 The resulting list of complementary packages is associated with an
1376 item that can be added to
1377 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001378 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001379 will install -dev packages (containing headers and other development
1380 files) for every package in the image.
1381
1382 To add a new feature item pointing to a wildcard, use a variable flag
1383 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001384 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001385
1386 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1387
Patrick Williams975a06f2022-10-21 14:42:47 -05001388 .. note::
1389
1390 When installing complementary packages, recommends relationships
1391 (set via :term:`RRECOMMENDS`) are always ignored.
1392
Andrew Geisslerf0343792020-11-18 10:42:21 -06001393 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001394 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001395 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001396 sysroots for other recipes.
1397
1398 The default is
1399 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1400 (i.e.
1401 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1402
Andrew Geisslerf0343792020-11-18 10:42:21 -06001403 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001404 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001405 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001406 ``build/conf/`` compatibility changes.
1407
Andrew Geisslerf0343792020-11-18 10:42:21 -06001408 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001409 Identifies editable or configurable files that are part of a package.
1410 If the Package Management System (PMS) is being used to update
1411 packages on the target system, it is possible that configuration
1412 files you have changed after the original installation and that you
1413 now want to remain unchanged are overwritten. In other words,
1414 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001415 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001416 variable to list the files in the package that you wish to prevent
1417 the PMS from overwriting during this update process.
1418
Andrew Geissler09036742021-06-25 14:25:14 -05001419 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001420 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001421 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001422
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001423 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001424 ${sysconfdir}/file2 ${sysconfdir}/file3"
1425
Andrew Geissler09036742021-06-25 14:25:14 -05001426 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1427 variables. The files listed within :term:`CONFFILES` must be a subset of
1428 the files listed within :term:`FILES`. Because the configuration files
1429 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001430 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001431 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001432 variable.
1433
1434 .. note::
1435
Andrew Geissler09036742021-06-25 14:25:14 -05001436 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001437 good practice to use appropriate path variables.
1438 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1439 rather than ``/usr/bin``. You can find a list of these variables at
1440 the top of the ``meta/conf/bitbake.conf`` file in the
1441 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001442
Andrew Geisslerf0343792020-11-18 10:42:21 -06001443 :term:`CONFIG_INITRAMFS_SOURCE`
Patrick Williams2194f502022-10-16 14:26:09 -05001444 Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001445 OpenEmbedded build system receives and uses this kernel Kconfig
1446 variable as an environment variable. By default, the variable is set
1447 to null ("").
1448
Andrew Geissler09036742021-06-25 14:25:14 -05001449 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001450 with a ``.cpio`` suffix or a space-separated list of directories and
Patrick Williams2194f502022-10-16 14:26:09 -05001451 files for building the :term:`Initramfs` image. A cpio archive should contain
1452 a filesystem archive to be used as an :term:`Initramfs` image. Directories
1453 should contain a filesystem layout to be included in the :term:`Initramfs`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001454 image. Files should contain entries according to the format described
1455 by the ``usr/gen_init_cpio`` program in the kernel tree.
1456
Patrick Williams2194f502022-10-16 14:26:09 -05001457 If you specify multiple directories and files, the :term:`Initramfs` image
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001458 will be the aggregate of all of them.
1459
Patrick Williams2194f502022-10-16 14:26:09 -05001460 For information on creating an :term:`Initramfs`, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06001461 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001462 in the Yocto Project Development Tasks Manual.
1463
Andrew Geisslerf0343792020-11-18 10:42:21 -06001464 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001465 A list of files that contains ``autoconf`` test results relevant to
1466 the current build. This variable is used by the Autotools utilities
1467 when running ``configure``.
1468
Andrew Geisslerf0343792020-11-18 10:42:21 -06001469 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001470 The minimal arguments for GNU configure.
1471
Andrew Geisslerf0343792020-11-18 10:42:21 -06001472 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001473 When inheriting the :ref:`ref-classes-features_check`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001474 class, this variable identifies distribution features that would be
1475 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001476 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1477 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001478 the recipe will be skipped, and if the build system attempts to build
1479 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001480
Andrew Geissler615f2f12022-07-15 14:00:58 -05001481 :term:`CONVERSION_CMD`
1482 This variable is used for storing image conversion commands.
1483 Image conversion can convert an image into different objects like:
1484
1485 - Compressed version of the image
1486
1487 - Checksums for the image
1488
Andrew Geissler517393d2023-01-13 08:55:19 -06001489 An example of :term:`CONVERSION_CMD` from :ref:`ref-classes-image_types`
1490 class is::
Andrew Geissler615f2f12022-07-15 14:00:58 -05001491
1492 CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
1493
Andrew Geissler9aee5002022-03-30 16:27:02 +00001494 :term:`COPY_LIC_DIRS`
1495 If set to "1" along with the
1496 :term:`COPY_LIC_MANIFEST` variable, the
1497 OpenEmbedded build system copies into the image the license files,
1498 which are located in ``/usr/share/common-licenses``, for each
1499 package. The license files are placed in directories within the image
1500 itself during build time.
1501
1502 .. note::
1503
1504 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1505 newly installed packages to an image, which might be most suitable for
1506 read-only filesystems that cannot be upgraded. See the
1507 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler517393d2023-01-13 08:55:19 -06001508 You can also reference the ":ref:`dev-manual/licenses:providing license text`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00001509 section in the Yocto Project Development Tasks Manual for
1510 information on providing license text.
1511
1512 :term:`COPY_LIC_MANIFEST`
1513 If set to "1", the OpenEmbedded build system copies the license
1514 manifest for the image to
1515 ``/usr/share/common-licenses/license.manifest`` within the image
1516 itself during build time.
1517
1518 .. note::
1519
1520 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1521 newly installed packages to an image, which might be most suitable for
1522 read-only filesystems that cannot be upgraded. See the
1523 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler517393d2023-01-13 08:55:19 -06001524 You can also reference the ":ref:`dev-manual/licenses:providing license text`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00001525 section in the Yocto Project Development Tasks Manual for
1526 information on providing license text.
1527
Andrew Geisslerf0343792020-11-18 10:42:21 -06001528 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geissler517393d2023-01-13 08:55:19 -06001529 A space-separated list of licenses to exclude from the source archived by
1530 the :ref:`ref-classes-archiver` class. In other words, if a license in a
1531 recipe's :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001532 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001533 class.
1534
1535 .. note::
1536
Andrew Geissler09036742021-06-25 14:25:14 -05001537 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001538 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001539
1540 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001541 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001542 :ref:`ref-classes-copyleft_filter` class, which
1543 is inherited by the :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001544
Andrew Geisslerf0343792020-11-18 10:42:21 -06001545 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001546 A space-separated list of licenses to include in the source archived
Andrew Geissler517393d2023-01-13 08:55:19 -06001547 by the :ref:`ref-classes-archiver` class. In other
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001548 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001549 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001550 source is archived by the class.
1551
Andrew Geissler517393d2023-01-13 08:55:19 -06001552 The default value is set by the :ref:`ref-classes-copyleft_filter` class,
1553 which is inherited by the :ref:`ref-classes-archiver` class. The default
1554 value includes "GPL*", "LGPL*", and "AGPL*".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001555
Andrew Geisslerf0343792020-11-18 10:42:21 -06001556 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001557 A list of recipes to exclude in the source archived by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001558 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_EXCLUDE`
1559 variable overrides the license inclusion and exclusion caused through the
1560 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001561 variables, respectively.
1562
1563 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001564 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001565 :ref:`ref-classes-copyleft_filter` class, which is inherited by the
1566 :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001567
Andrew Geisslerf0343792020-11-18 10:42:21 -06001568 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001569 A list of recipes to include in the source archived by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001570 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_INCLUDE`
1571 variable overrides the license inclusion and exclusion caused through the
1572 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001573 variables, respectively.
1574
1575 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001576 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001577 :ref:`ref-classes-copyleft_filter` class, which is inherited by the
1578 :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001579
Andrew Geisslerf0343792020-11-18 10:42:21 -06001580 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001581 A space-separated list of recipe types to include in the source
1582 archived by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geissler517393d2023-01-13 08:55:19 -06001583 Recipe types are ``target``, :ref:`ref-classes-native`,
1584 :ref:`ref-classes-nativesdk`, :ref:`ref-classes-cross`,
1585 :ref:`ref-classes-crosssdk`, and :ref:`ref-classes-cross-canadian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001586
Andrew Geissler09036742021-06-25 14:25:14 -05001587 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001588 is set by the :ref:`ref-classes-copyleft_filter` class, which is
1589 inherited by the :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001590
Andrew Geisslerf0343792020-11-18 10:42:21 -06001591 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001592 Specifies the list of packages to be added to the image. You should
1593 only set this variable in the ``local.conf`` configuration file found
1594 in the :term:`Build Directory`.
1595
1596 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1597 supported.
1598
Andrew Geisslerf0343792020-11-18 10:42:21 -06001599 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001600 Specifies the parent directory of the OpenEmbedded-Core Metadata
1601 layer (i.e. ``meta``).
1602
Andrew Geissler09036742021-06-25 14:25:14 -05001603 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001604 of this layer and not the layer itself. Consider an example where you
1605 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001606 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001607 points to the ``poky`` folder because it is the parent directory of
1608 the ``poky/meta`` layer.
1609
Andrew Geisslerf0343792020-11-18 10:42:21 -06001610 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001611 Lists files from the :term:`COREBASE` directory that
1612 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001613 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001614 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001615 into the extensible SDK.
1616
Andrew Geissler09036742021-06-25 14:25:14 -05001617 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001618 typically contains build directories and other files that should not
1619 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001620 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001621 are actually needed.
1622
Andrew Geisslerf0343792020-11-18 10:42:21 -06001623 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001624 The minimal command and arguments used to run the C preprocessor.
1625
Andrew Geisslerf0343792020-11-18 10:42:21 -06001626 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001627 Specifies the flags to pass to the C pre-processor (i.e. to both the
1628 C and the C++ compilers). This variable is exported to an environment
1629 variable and thus made visible to the software being built during the
1630 compilation step.
1631
Andrew Geissler09036742021-06-25 14:25:14 -05001632 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001633 being built:
1634
1635 - :term:`TARGET_CPPFLAGS` when building for
1636 the target
1637
1638 - :term:`BUILD_CPPFLAGS` when building for the
1639 build host (i.e. ``-native``)
1640
1641 - :term:`BUILDSDK_CPPFLAGS` when building
1642 for an SDK (i.e. ``nativesdk-``)
1643
Andrew Geisslerf0343792020-11-18 10:42:21 -06001644 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001645 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001646 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001647 :term:`TARGET_PREFIX` variable.
1648
1649 .. note::
1650
Andrew Geissler09036742021-06-25 14:25:14 -05001651 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001652 variable only in certain contexts (e.g. when building for kernel
1653 and kernel module recipes).
1654
Andrew Geissler9aee5002022-03-30 16:27:02 +00001655 :term:`CVE_CHECK_IGNORE`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001656 The list of CVE IDs which are ignored. Here is
1657 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1658
1659 # This is windows only issue.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001660 CVE_CHECK_IGNORE += "CVE-2020-15523"
1661
Patrick Williams975a06f2022-10-21 14:42:47 -05001662 :term:`CVE_CHECK_SHOW_WARNINGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06001663 Specifies whether or not the :ref:`ref-classes-cve-check`
Patrick Williams975a06f2022-10-21 14:42:47 -05001664 class should generate warning messages on the console when unpatched
1665 CVEs are found. The default is "1", but you may wish to set it to "0" if
1666 you are already examining/processing the logs after the build has
1667 completed and thus do not need the warning messages.
1668
Andrew Geissler9aee5002022-03-30 16:27:02 +00001669 :term:`CVE_CHECK_SKIP_RECIPE`
1670 The list of package names (:term:`PN`) for which
1671 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001672
Patrick Williams975a06f2022-10-21 14:42:47 -05001673 :term:`CVE_DB_UPDATE_INTERVAL`
1674 Specifies the CVE database update interval in seconds, as used by
1675 ``cve-update-db-native``. The default value is "86400" i.e. once a day
1676 (24*60*60). If the value is set to "0" then the update will be forced
1677 every time. Alternatively, a negative value e.g. "-1" will disable
1678 updates entirely.
1679
Patrick Williams213cb262021-08-07 19:21:33 -05001680 :term:`CVE_PRODUCT`
1681 In a recipe, defines the name used to match the recipe name
1682 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1683
Patrick Williams975a06f2022-10-21 14:42:47 -05001684 The default is ${:term:`BPN`} (except for recipes that inherit the
Andrew Geissler517393d2023-01-13 08:55:19 -06001685 :ref:`ref-classes-pypi` class where it is set based upon
Patrick Williams975a06f2022-10-21 14:42:47 -05001686 :term:`PYPI_PACKAGE`). If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001687 database or matches with multiple entries in the database, the default
1688 value needs to be changed.
1689
1690 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1691
1692 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1693
Patrick Williams03907ee2022-05-01 06:28:52 -05001694 Sometimes the product name is not specific enough, for example
1695 "tar" has been matching CVEs for the GNU ``tar`` package and also
1696 the ``node-tar`` node.js extension. To avoid this problem, use the
1697 vendor name as a prefix. The syntax for this is::
1698
1699 CVE_PRODUCT = "vendor:package"
1700
Patrick Williams2390b1b2022-11-03 13:47:49 -05001701 :term:`CVE_VERSION`
1702 In a recipe, defines the version used to match the recipe version
1703 against the version in the `NIST CVE database <https://nvd.nist.gov/>`__
Andrew Geissler517393d2023-01-13 08:55:19 -06001704 when usign :ref:`ref-classes-cve-check`.
Patrick Williams2390b1b2022-11-03 13:47:49 -05001705
1706 The default is ${:term:`PV`} but if recipes use custom version numbers
1707 which do not map to upstream software component release versions and the versions
1708 used in the CVE database, then this variable can be used to set the
Andrew Geissler517393d2023-01-13 08:55:19 -06001709 version number for :ref:`ref-classes-cve-check`. Example::
Patrick Williams2390b1b2022-11-03 13:47:49 -05001710
1711 CVE_VERSION = "2.39"
1712
Andrew Geisslerf0343792020-11-18 10:42:21 -06001713 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001714 The directory in which files checked out under the CVS system are
1715 stored.
1716
Andrew Geisslerf0343792020-11-18 10:42:21 -06001717 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001718 The minimal command and arguments used to run the C++ compiler.
1719
Andrew Geisslerf0343792020-11-18 10:42:21 -06001720 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001721 Specifies the flags to pass to the C++ compiler. This variable is
1722 exported to an environment variable and thus made visible to the
1723 software being built during the compilation step.
1724
Andrew Geissler09036742021-06-25 14:25:14 -05001725 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001726 being built:
1727
1728 - :term:`TARGET_CXXFLAGS` when building for
1729 the target
1730
1731 - :term:`BUILD_CXXFLAGS` when building for the
1732 build host (i.e. ``-native``)
1733
1734 - :term:`BUILDSDK_CXXFLAGS` when building
1735 for an SDK (i.e. ``nativesdk-``)
1736
Andrew Geisslerf0343792020-11-18 10:42:21 -06001737 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001738 The destination directory. The location in the :term:`Build Directory`
1739 where components are installed by the
1740 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001741 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001742
1743 ${WORKDIR}/image
1744
1745 .. note::
1746
1747 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001748 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001749
Andrew Geisslerf0343792020-11-18 10:42:21 -06001750 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001751 The date the build was started. Dates appear using the year, month,
1752 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1753
Andrew Geisslerf0343792020-11-18 10:42:21 -06001754 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001755 The date and time on which the current build started. The format is
1756 suitable for timestamps.
1757
Andrew Geisslerf0343792020-11-18 10:42:21 -06001758 :term:`DEBIAN_NOAUTONAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06001759 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001760 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001761 particular package should not be renamed according to Debian library
1762 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001763 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001764
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001765 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001766
Andrew Geisslerf0343792020-11-18 10:42:21 -06001767 :term:`DEBIANNAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06001768 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001769 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001770 the library name for an individual package. Overriding the library
1771 name in these cases is rare. You must use the package name as an
1772 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001773 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001774
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001775 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001776
Andrew Geisslerf0343792020-11-18 10:42:21 -06001777 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001778 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001779 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001780
Andrew Geisslerf0343792020-11-18 10:42:21 -06001781 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001782 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001783 compiling a system for debugging. This variable defaults to "-O
1784 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1785
Andrew Geisslereff27472021-10-29 15:35:00 -05001786 :term:`DEBUG_PREFIX_MAP`
1787 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1788 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1789 replace build-time paths by install-time ones in the debugging sections
1790 of binaries. This makes compiler output files location independent,
1791 at the cost of having to pass an extra command to tell the debugger
1792 where source files are.
1793
1794 This is used by the Yocto Project to guarantee
1795 :doc:`/test-manual/reproducible-builds` even when the source code of
1796 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1797 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1798 website for details.
1799
1800 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1801 not intended to be user-configurable.
1802
Andrew Geissler9aee5002022-03-30 16:27:02 +00001803 :term:`DEFAULT_PREFERENCE`
1804 Specifies a weak bias for recipe selection priority.
1805
1806 The most common usage of this is variable is to set it to "-1" within
1807 a recipe for a development version of a piece of software. Using the
1808 variable in this way causes the stable version of the recipe to build
1809 by default in the absence of :term:`PREFERRED_VERSION` being used to
1810 build the development version.
1811
1812 .. note::
1813
1814 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1815 by :term:`BBFILE_PRIORITY` if that variable is different between two
1816 layers that contain different versions of the same recipe.
1817
Andrew Geisslerf0343792020-11-18 10:42:21 -06001818 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001819 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1820 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001821 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001822 :term:`TUNE_FEATURES`.
1823
1824 The default tune is either implicitly or explicitly set by the
1825 machine (:term:`MACHINE`). However, you can override
1826 the setting using available tunes as defined with
1827 :term:`AVAILTUNES`.
1828
Andrew Geisslerf0343792020-11-18 10:42:21 -06001829 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001830 Lists a recipe's build-time dependencies. These are dependencies on
1831 other recipes whose contents (e.g. headers and shared libraries) are
1832 needed by the recipe at build time.
1833
1834 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001835 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001836
1837 DEPENDS = "bar"
1838
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05001839 The practical effect of the previous assignment is that all files
1840 installed by bar will be available in the appropriate staging sysroot,
1841 given by the :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time
1842 the :ref:`ref-tasks-configure` task for ``foo`` runs. This mechanism is
1843 implemented by having :ref:`ref-tasks-configure` depend on the
1844 :ref:`ref-tasks-populate_sysroot` task of each recipe listed in
1845 :term:`DEPENDS`, through a
1846 ``[``\ :ref:`deptask <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
Andrew Geissler517393d2023-01-13 08:55:19 -06001847 declaration in the :ref:`ref-classes-base` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001848
1849 .. note::
1850
Andrew Geissler09036742021-06-25 14:25:14 -05001851 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001852 explicitly. The standard classes and build-related variables are
1853 configured to automatically use the appropriate staging sysroots.
1854
Andrew Geissler09036742021-06-25 14:25:14 -05001855 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001856 that run on the build machine during the build. For example, a recipe
1857 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001858 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001859
1860 DEPENDS = "codegen-native"
1861
1862 For more
Andrew Geissler517393d2023-01-13 08:55:19 -06001863 information, see the :ref:`ref-classes-native` class and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001864 the :term:`EXTRANATIVEPATH` variable.
1865
1866 .. note::
1867
Andrew Geissler09036742021-06-25 14:25:14 -05001868 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001869 it is a list of :term:`PROVIDES` names, which
1870 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001871 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001872 instead, as this will put files from all the packages that make
1873 up ``foo``, which includes those from ``foo-dev``, into the
1874 sysroot.
1875
Andrew Geissler09036742021-06-25 14:25:14 -05001876 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001877 itself add any runtime dependencies between the packages
1878 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001879 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001880 section in the Yocto Project Overview and Concepts Manual,
1881 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001882 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001883
Andrew Geissler09036742021-06-25 14:25:14 -05001884 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001885 recipes that install precompiled components. For example, if
1886 ``libfoo`` is a precompiled library that links against
1887 ``libbar``, then linking against ``libfoo`` requires both
1888 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001889 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001890 to the recipe that installs ``libbar``, other recipes might
1891 fail to link against ``libfoo``.
1892
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05001893 For information on runtime dependencies, see the :term:`RDEPENDS`
1894 variable. You can also see the
1895 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1896 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`"
1897 sections in the BitBake User Manual for additional information on tasks
1898 and dependencies.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001899
Andrew Geisslerf0343792020-11-18 10:42:21 -06001900 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001901 Points to the general area that the OpenEmbedded build system uses to
1902 place images, packages, SDKs, and other output files that are ready
1903 to be used outside of the build system. By default, this directory
Patrick Williams2390b1b2022-11-03 13:47:49 -05001904 resides within the :term:`Build Directory` as ``${TMPDIR}/deploy``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001905
1906 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001907 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001908 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001909 ":ref:`overview-manual/concepts:images`",
1910 ":ref:`overview-manual/concepts:package feeds`", and
1911 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001912 Yocto Project Overview and Concepts Manual.
1913
Andrew Geisslerf0343792020-11-18 10:42:21 -06001914 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001915 Points to the area that the OpenEmbedded build system uses to place
1916 Debian packages that are ready to be used outside of the build
Andrew Geissler517393d2023-01-13 08:55:19 -06001917 system. This variable applies only when :term:`PACKAGE_CLASSES` contains
1918 ":ref:`ref-classes-package_deb`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001919
1920 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001921 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001922 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001923
1924 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1925
Andrew Geissler517393d2023-01-13 08:55:19 -06001926 The :ref:`ref-classes-package_deb` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001927 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001928 :ref:`ref-tasks-package_write_deb` task
1929 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001930 information on how packaging works, see the
1931 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001932 in the Yocto Project Overview and Concepts Manual.
1933
Andrew Geisslerf0343792020-11-18 10:42:21 -06001934 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001935 Points to the area that the OpenEmbedded build system uses to place
1936 images and other associated output files that are ready to be
1937 deployed onto the target machine. The directory is machine-specific
1938 as it contains the ``${MACHINE}`` name. By default, this directory
1939 resides within the :term:`Build Directory` as
1940 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1941
Andrew Geissler09036742021-06-25 14:25:14 -05001942 It must not be used directly in recipes when deploying files. Instead,
1943 it's only useful when a recipe needs to "read" a file already deployed
1944 by a dependency. So, it should be filled with the contents of
Andrew Geissler517393d2023-01-13 08:55:19 -06001945 :term:`DEPLOYDIR` by the :ref:`ref-classes-deploy` class or with the
1946 contents of :term:`IMGDEPLOYDIR` by the :ref:`ref-classes-image` class.
Andrew Geissler09036742021-06-25 14:25:14 -05001947
Patrick Williams2390b1b2022-11-03 13:47:49 -05001948 For more information on the structure of the :term:`Build Directory`, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001949 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001950 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001951 ":ref:`overview-manual/concepts:images`" and
1952 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001953 the Yocto Project Overview and Concepts Manual.
1954
Andrew Geisslerf0343792020-11-18 10:42:21 -06001955 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001956 Points to the area that the OpenEmbedded build system uses to place
1957 IPK packages that are ready to be used outside of the build system.
Andrew Geissler517393d2023-01-13 08:55:19 -06001958 This variable applies only when :term:`PACKAGE_CLASSES` contains
1959 ":ref:`ref-classes-package_ipk`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001960
1961 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001962 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001963
1964 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1965
Andrew Geissler517393d2023-01-13 08:55:19 -06001966 The :ref:`ref-classes-package_ipk` class uses the :term:`DEPLOY_DIR_IPK`
1967 variable to make sure the :ref:`ref-tasks-package_write_ipk` task
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001968 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001969 on how packaging works, see the
1970 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001971 in the Yocto Project Overview and Concepts Manual.
1972
Andrew Geisslerf0343792020-11-18 10:42:21 -06001973 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001974 Points to the area that the OpenEmbedded build system uses to place
1975 RPM packages that are ready to be used outside of the build system.
Andrew Geissler517393d2023-01-13 08:55:19 -06001976 This variable applies only when :term:`PACKAGE_CLASSES` contains
1977 ":ref:`ref-classes-package_rpm`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001978
1979 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001980 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001981
1982 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1983
Andrew Geissler517393d2023-01-13 08:55:19 -06001984 The :ref:`ref-classes-package_rpm` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001985 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001986 :ref:`ref-tasks-package_write_rpm` task
1987 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001988 on how packaging works, see the
1989 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001990 in the Yocto Project Overview and Concepts Manual.
1991
Andrew Geisslerf0343792020-11-18 10:42:21 -06001992 :term:`DEPLOYDIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06001993 When inheriting the :ref:`ref-classes-deploy` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001994 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler517393d2023-01-13 08:55:19 -06001995 is set in the :ref:`ref-classes-deploy` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001996
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001997 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001998
Andrew Geissler517393d2023-01-13 08:55:19 -06001999 Recipes inheriting the :ref:`ref-classes-deploy` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05002000 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002001 them into :term:`DEPLOY_DIR_IMAGE`
2002 afterwards.
2003
Andrew Geisslerf0343792020-11-18 10:42:21 -06002004 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002005 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05002006 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002007 variable.
2008
Patrick Williams975a06f2022-10-21 14:42:47 -05002009 :term:`DEV_PKG_DEPENDENCY`
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002010 Provides an easy way for recipes to disable or adjust the runtime recommendation
2011 (:term:`RRECOMMENDS`) of the ``${PN}-dev`` package on the main
2012 (``${PN}``) package.
Patrick Williams975a06f2022-10-21 14:42:47 -05002013
2014 :term:`DISABLE_STATIC`
2015 Used in order to disable static linking by default (in order to save
2016 space, since static libraries are often unused in embedded systems.)
2017 The default value is " --disable-static", however it can be set to ""
2018 in order to enable static linking if desired. Certain recipes do this
2019 individually, and also there is a
2020 ``meta/conf/distro/include/no-static-libs.inc`` include file that
2021 disables static linking for a number of recipes. Some software
2022 packages or build tools (such as CMake) have explicit support for
2023 enabling / disabling static linking, and in those cases
2024 :term:`DISABLE_STATIC` is not used.
2025
Andrew Geisslerf0343792020-11-18 10:42:21 -06002026 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002027 The short name of the distribution. For information on the long name
2028 of the distribution, see the :term:`DISTRO_NAME`
2029 variable.
2030
Andrew Geissler09036742021-06-25 14:25:14 -05002031 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002032 file whose root name is the same as the variable's argument and whose
2033 filename extension is ``.conf``. For example, the distribution
2034 configuration file for the Poky distribution is named ``poky.conf``
2035 and resides in the ``meta-poky/conf/distro`` directory of the
2036 :term:`Source Directory`.
2037
Andrew Geissler09036742021-06-25 14:25:14 -05002038 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002039 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002040
2041 DISTRO = "poky"
2042
2043 Distribution configuration files are located in a ``conf/distro``
2044 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05002045 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002046 spaces, and is typically all lower-case.
2047
2048 .. note::
2049
Andrew Geissler09036742021-06-25 14:25:14 -05002050 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002051 are used, which are specified within
2052 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002053
Andrew Geisslerf0343792020-11-18 10:42:21 -06002054 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002055 Specifies a codename for the distribution being built.
2056
Andrew Geisslerf0343792020-11-18 10:42:21 -06002057 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002058 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00002059 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002060 variable only really applies to the more full-featured images that
2061 include ``packagegroup-base``. You can use this variable to keep
2062 distro policy out of generic images. As with all other distro
2063 variables, you set this variable in the distro ``.conf`` file.
2064
Andrew Geisslerf0343792020-11-18 10:42:21 -06002065 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002066 Specifies a list of distro-specific packages to add to all images if
2067 the packages exist. The packages might not exist or be empty (e.g.
2068 kernel modules). The list of packages are automatically installed but
2069 you can remove them.
2070
Andrew Geisslerf0343792020-11-18 10:42:21 -06002071 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002072 The software support you want in your distribution for various
2073 features. You define your distribution features in the distribution
2074 configuration file.
2075
2076 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05002077 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002078 to the configure script during the
2079 :ref:`ref-tasks-configure` task for recipes that
2080 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05002081 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002082 target that can optionally support X11 to have its X11 support
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05002083 enabled.
2084
2085 .. note::
2086
2087 Just enabling :term:`DISTRO_FEATURES` alone doesn't
2088 enable feature support for packages. Mechanisms such as making
2089 :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used
2090 to enable/disable package features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002091
2092 Two more examples are Bluetooth and NFS support. For a more complete
2093 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002094 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002095
Andrew Geisslerf0343792020-11-18 10:42:21 -06002096 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002097 A space-separated list of features to be added to :term:`DISTRO_FEATURES`
2098 if not also present in :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002099
2100 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
2101 not intended to be user-configurable. It is best to just reference
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002102 the variable to see which distro features are being
2103 :ref:`backfilled <ref-features-backfill>` for all distro configurations.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002104
Andrew Geisslerf0343792020-11-18 10:42:21 -06002105 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002106 A space-separated list of features from :term:`DISTRO_FEATURES_BACKFILL`
2107 that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added
2108 to :term:`DISTRO_FEATURES`) during the build.
2109
2110 This corresponds to an opt-out mechanism. When new default distro
2111 features are introduced, distribution maintainers can review (`consider`)
2112 them and decide to exclude them from the
2113 :ref:`backfilled <ref-features-backfill>` features. Therefore, the
2114 combination of :term:`DISTRO_FEATURES_BACKFILL` and
2115 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` makes it possible to
2116 add new default features without breaking existing distributions.
2117
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002118
Andrew Geisslerf0343792020-11-18 10:42:21 -06002119 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002120 A convenience variable that gives you the default list of distro
2121 features with the exception of any features specific to the C library
2122 (``libc``).
2123
2124 When creating a custom distribution, you might find it useful to be
2125 able to reuse the default
2126 :term:`DISTRO_FEATURES` options without the
2127 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05002128 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002129
2130 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
2131
Andrew Geisslerf0343792020-11-18 10:42:21 -06002132 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002133 Specifies a list of features that if present in the target
2134 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05002135 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002136 variable is used in addition to the features filtered using the
2137 :term:`DISTRO_FEATURES_NATIVE`
2138 variable.
2139
Andrew Geisslerf0343792020-11-18 10:42:21 -06002140 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002141 Specifies a list of features that if present in the target
Andrew Geissler517393d2023-01-13 08:55:19 -06002142 :term:`DISTRO_FEATURES` value should be included in
2143 :term:`DISTRO_FEATURES` when building :ref:`ref-classes-nativesdk`
2144 recipes. This variable is used in addition to the features filtered using
2145 the :term:`DISTRO_FEATURES_NATIVESDK` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002146
Andrew Geisslerf0343792020-11-18 10:42:21 -06002147 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002148 Specifies a list of features that should be included in
2149 :term:`DISTRO_FEATURES` when building native
2150 recipes. This variable is used in addition to the features filtered
2151 using the
2152 :term:`DISTRO_FEATURES_FILTER_NATIVE`
2153 variable.
2154
Andrew Geisslerf0343792020-11-18 10:42:21 -06002155 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002156 Specifies a list of features that should be included in
2157 :term:`DISTRO_FEATURES` when building
Andrew Geissler517393d2023-01-13 08:55:19 -06002158 :ref:`ref-classes-nativesdk` recipes. This variable is used
2159 in addition to the features filtered using the
2160 :term:`DISTRO_FEATURES_FILTER_NATIVESDK` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002161
Andrew Geisslerf0343792020-11-18 10:42:21 -06002162 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002163 The long name of the distribution. For information on the short name
2164 of the distribution, see the :term:`DISTRO` variable.
2165
Andrew Geissler09036742021-06-25 14:25:14 -05002166 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002167 configuration file whose root name is the same as the variable's
2168 argument and whose filename extension is ``.conf``. For example, the
2169 distribution configuration file for the Poky distribution is named
2170 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
2171 of the :term:`Source Directory`.
2172
Andrew Geissler09036742021-06-25 14:25:14 -05002173 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05002174 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002175
2176 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
2177
2178 Distribution configuration files are located in a ``conf/distro``
2179 directory within the :term:`Metadata` that contains the
2180 distribution configuration.
2181
2182 .. note::
2183
Andrew Geissler09036742021-06-25 14:25:14 -05002184 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002185 configurations are used, which are specified within
2186 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002187
Andrew Geisslerf0343792020-11-18 10:42:21 -06002188 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002189 The version of the distribution.
2190
Andrew Geisslerf0343792020-11-18 10:42:21 -06002191 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002192 A colon-separated list of overrides specific to the current
2193 distribution. By default, this list includes the value of
2194 :term:`DISTRO`.
2195
Andrew Geissler09036742021-06-25 14:25:14 -05002196 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002197 apply to the distribution.
2198
Andrew Geissler09036742021-06-25 14:25:14 -05002199 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002200 is included in the default value of
2201 :term:`OVERRIDES`.
2202
Andrew Geisslerf0343792020-11-18 10:42:21 -06002203 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002204 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05002205 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002206 for everything except Git repositories. If you want tarballs of Git
2207 repositories, use the
2208 :term:`BB_GENERATE_MIRROR_TARBALLS`
2209 variable.
2210
Andrew Geissler09036742021-06-25 14:25:14 -05002211 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002212 ``conf/local.conf`` file. This directory is self-maintaining and you
2213 should not have to touch it. By default, the directory is
Patrick Williams2390b1b2022-11-03 13:47:49 -05002214 ``downloads`` in the :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002215
2216 #DL_DIR ?= "${TOPDIR}/downloads"
2217
2218 To specify a different download directory,
2219 simply remove the comment from the line and provide your directory.
2220
2221 During a first build, the system downloads many different source code
2222 tarballs from various upstream projects. Downloading can take a
2223 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002224 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002225 system looks there first to find source tarballs.
2226
2227 .. note::
2228
2229 When wiping and rebuilding, you can preserve this directory to
2230 speed up this part of subsequent builds.
2231
2232 You can safely share this directory between multiple builds on the
2233 same development machine. For additional information on how the build
2234 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002235 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002236 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002237 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002238 Wiki page.
2239
Andrew Geisslerf0343792020-11-18 10:42:21 -06002240 :term:`DOC_COMPRESS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002241 When inheriting the :ref:`ref-classes-compress_doc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002242 class, this variable sets the compression policy used when the
2243 OpenEmbedded build system compresses man pages and info pages. By
2244 default, the compression method used is gz (gzip). Other policies
2245 available are xz and bz2.
2246
2247 For information on policies and on how to use this variable, see the
Patrick Williams975a06f2022-10-21 14:42:47 -05002248 comments in the ``meta/classes-recipe/compress_doc.bbclass`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002249
Patrick Williamsb542dec2023-06-09 01:26:37 -05002250 :term:`DT_FILES`
2251 Space-separated list of device tree source files to compile using
2252 a recipe that inherits the :ref:`ref-classes-devicetree` class. These
2253 are relative to the :term:`DT_FILES_PATH`.
2254
2255 For convenience, both ``.dts`` and ``.dtb`` extensions can be used.
2256
2257 Use an empty string (default) to build all device tree sources within
2258 the :term:`DT_FILES_PATH` directory.
2259
2260 :term:`DT_FILES_PATH`
2261 When compiling out-of-tree device tree sources using a recipe that
2262 inherits the :ref:`ref-classes-devicetree` class, this variable specifies
2263 the path to the directory containing dts files to build.
2264
2265 Defaults to the :term:`S` directory.
2266
2267 :term:`DT_PADDING_SIZE`
2268 When inheriting the :ref:`ref-classes-devicetree` class, this variable
2269 specifies the size of padding appended to the device tree blob, used as
2270 extra space typically for additional properties during boot.
2271
Andrew Geisslerf0343792020-11-18 10:42:21 -06002272 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002273 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2274 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002275 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002276 default is "grub-efi", but "systemd-boot" can be used instead.
2277
Andrew Geissler517393d2023-01-13 08:55:19 -06002278 See the :ref:`ref-classes-systemd-boot` and :ref:`ref-classes-image-live`
2279 classes for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002280
Andrew Geisslerf0343792020-11-18 10:42:21 -06002281 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002282 Variable that controls which locales for ``glibc`` are generated
2283 during the build (useful if the target device has 64Mbytes of RAM or
2284 less).
2285
Andrew Geisslerf0343792020-11-18 10:42:21 -06002286 :term:`ERR_REPORT_DIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06002287 When used with the :ref:`ref-classes-report-error` class, specifies the
2288 path used for storing the debug files created by the :ref:`error reporting
2289 tool <dev-manual/error-reporting-tool:using the error reporting tool>`,
2290 which allows you to submit build errors you encounter to a central
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002291 database. By default, the value of this variable is
2292 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2293
Andrew Geissler09036742021-06-25 14:25:14 -05002294 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002295 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002296 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002297
2298 ERR_REPORT_DIR = "path"
2299
Andrew Geisslerf0343792020-11-18 10:42:21 -06002300 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002301 Specifies the quality assurance checks whose failures are reported as
2302 errors by the OpenEmbedded build system. You set this variable in
2303 your distribution configuration file. For a list of the checks you
2304 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002305 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002306
Andrew Geissler9aee5002022-03-30 16:27:02 +00002307 :term:`ESDK_CLASS_INHERIT_DISABLE`
2308 A list of classes to remove from the :term:`INHERIT`
2309 value globally within the extensible SDK configuration. The
2310 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2311 default value::
2312
2313 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2314
2315 Some classes are not generally applicable within the extensible SDK
2316 context. You can use this variable to disable those classes.
2317
2318 For additional information on how to customize the extensible SDK's
2319 configuration, see the
2320 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2321 section in the Yocto Project Application Development and the
2322 Extensible Software Development Kit (eSDK) manual.
2323
2324 :term:`ESDK_LOCALCONF_ALLOW`
2325 A list of variables allowed through from the OpenEmbedded build
2326 system configuration into the extensible SDK configuration. By
2327 default, the list of variables is empty and is set in the
2328 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2329
2330 This list overrides the variables specified using the
2331 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2332 other variables automatically added due to the "/" character
2333 being found at the start of the
2334 value, which is usually indicative of being a path and thus might not
2335 be valid on the system where the SDK is installed.
2336
2337 For additional information on how to customize the extensible SDK's
2338 configuration, see the
2339 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2340 section in the Yocto Project Application Development and the
2341 Extensible Software Development Kit (eSDK) manual.
2342
2343 :term:`ESDK_LOCALCONF_REMOVE`
2344 A list of variables not allowed through from the OpenEmbedded build
2345 system configuration into the extensible SDK configuration. Usually,
2346 these are variables that are specific to the machine on which the
2347 build system is running and thus would be potentially problematic
2348 within the extensible SDK.
2349
2350 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2351 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2352 excludes the following variables:
2353
2354 - :term:`CONF_VERSION`
2355 - :term:`BB_NUMBER_THREADS`
2356 - :term:`BB_NUMBER_PARSE_THREADS`
2357 - :term:`PARALLEL_MAKE`
2358 - :term:`PRSERV_HOST`
2359 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2360 - :term:`SSTATE_DIR` :term:`TMPDIR`
2361 - :term:`BB_SERVER_TIMEOUT`
2362
2363 For additional information on how to customize the extensible SDK's
2364 configuration, see the
2365 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2366 section in the Yocto Project Application Development and the
2367 Extensible Software Development Kit (eSDK) manual.
2368
Andrew Geisslerf0343792020-11-18 10:42:21 -06002369 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002370 Triggers the OpenEmbedded build system's shared libraries resolver to
2371 exclude an entire package when scanning for shared libraries.
2372
2373 .. note::
2374
2375 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002376 the internal function ``package_do_shlibs``, which is part of the
2377 :ref:`ref-tasks-package` task. You should be aware that the shared
2378 libraries resolver might implicitly define some dependencies between
2379 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002380
Andrew Geissler09036742021-06-25 14:25:14 -05002381 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002382 :term:`PRIVATE_LIBS` variable, which excludes a
2383 package's particular libraries only and not the whole package.
2384
Andrew Geissler09036742021-06-25 14:25:14 -05002385 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002386 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002387
2388 EXCLUDE_FROM_SHLIBS = "1"
2389
Andrew Geisslerf0343792020-11-18 10:42:21 -06002390 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002391 Directs BitBake to exclude a recipe from world builds (i.e.
2392 ``bitbake world``). During world builds, BitBake locates, parses and
2393 builds all recipes found in every layer exposed in the
2394 ``bblayers.conf`` configuration file.
2395
2396 To exclude a recipe from a world build using this variable, set the
2397 variable to "1" in the recipe.
2398
2399 .. note::
2400
Andrew Geissler09036742021-06-25 14:25:14 -05002401 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002402 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002403 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002404 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002405
Andrew Geisslerf0343792020-11-18 10:42:21 -06002406 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002407 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002408 version based on the recipe's :term:`PE` value. If :term:`PE`
2409 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2410 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2411 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2412 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002413
2414 See the :term:`STAMP` variable for an example.
2415
Andrew Geisslerf0343792020-11-18 10:42:21 -06002416 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002417 The full package version specification as it appears on the final
2418 packages produced by a recipe. The variable's value is normally used
2419 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002420 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002421
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002422 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002423
2424 The dependency relationships are intended to force the package
2425 manager to upgrade these types of packages in lock-step.
2426
Andrew Geisslerf0343792020-11-18 10:42:21 -06002427 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002428 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002429 tools are not in the source tree.
2430
2431 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002432 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002433 variable tells the OpenEmbedded build system to prefer the installed
Andrew Geissler517393d2023-01-13 08:55:19 -06002434 external tools. See the :ref:`ref-classes-kernel-yocto` class in
Patrick Williams975a06f2022-10-21 14:42:47 -05002435 ``meta/classes-recipe`` to see how the variable is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002436
Andrew Geissler517393d2023-01-13 08:55:19 -06002437 :term:`EXTERNAL_TOOLCHAIN`
2438 When you intend to use an
2439 :ref:`external toolchain <dev-manual/external-toolchain:optionally using an external toolchain>`,
2440 this variable allows to specify the directory where this toolchain was
2441 installed.
2442
Andrew Geisslerf0343792020-11-18 10:42:21 -06002443 :term:`EXTERNALSRC`
Andrew Geissler517393d2023-01-13 08:55:19 -06002444 When inheriting the :ref:`ref-classes-externalsrc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002445 class, this variable points to the source tree, which is outside of
2446 the OpenEmbedded build system. When set, this variable sets the
2447 :term:`S` variable, which is what the OpenEmbedded build
2448 system uses to locate unpacked recipe source code.
2449
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002450 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002451 can also find information on how to use this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06002452 ":ref:`dev-manual/building:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002453 section in the Yocto Project Development Tasks Manual.
2454
Andrew Geisslerf0343792020-11-18 10:42:21 -06002455 :term:`EXTERNALSRC_BUILD`
Andrew Geissler517393d2023-01-13 08:55:19 -06002456 When inheriting the :ref:`ref-classes-externalsrc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002457 class, this variable points to the directory in which the recipe's
2458 source code is built, which is outside of the OpenEmbedded build
2459 system. When set, this variable sets the :term:`B` variable,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002460 which is what the OpenEmbedded build system uses to locate the
2461 :term:`Build Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002462
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002463 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002464 can also find information on how to use this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06002465 ":ref:`dev-manual/building:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002466 section in the Yocto Project Development Tasks Manual.
2467
Andrew Geisslerf0343792020-11-18 10:42:21 -06002468 :term:`EXTRA_AUTORECONF`
Andrew Geissler517393d2023-01-13 08:55:19 -06002469 For recipes inheriting the :ref:`ref-classes-autotools`
Andrew Geissler09036742021-06-25 14:25:14 -05002470 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002471 pass to the ``autoreconf`` command that is executed during the
2472 :ref:`ref-tasks-configure` task.
2473
2474 The default value is "--exclude=autopoint".
2475
Andrew Geisslerf0343792020-11-18 10:42:21 -06002476 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002477 A list of additional features to include in an image. When listing
2478 more than one feature, separate them with a space.
2479
2480 Typically, you configure this variable in your ``local.conf`` file,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002481 which is found in the :term:`Build Directory`. Although you can use this
2482 variable from within a recipe, best practices dictate that you do not.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002483
2484 .. note::
2485
2486 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002487 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002488
2489 Here are some examples of features you can add:
2490
Andrew Geissler615f2f12022-07-15 14:00:58 -05002491 - "dbg-pkgs" --- adds -dbg packages for all installed packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002492 symbol information for debugging and profiling.
2493
Andrew Geissler615f2f12022-07-15 14:00:58 -05002494 - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002495 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002496 'post-install-logging' features in the ":ref:`ref-features-image`"
2497 section for more information.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002498 - "dev-pkgs" --- adds -dev packages for all installed packages. This is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002499 useful if you want to develop against the libraries in the image.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002500 - "read-only-rootfs" --- creates an image whose root filesystem is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002501 read-only. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06002502 ":ref:`dev-manual/read-only-rootfs:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002503 section in the Yocto Project Development Tasks Manual for more
2504 information
Andrew Geissler615f2f12022-07-15 14:00:58 -05002505 - "tools-debug" --- adds debugging tools such as gdb and strace.
2506 - "tools-sdk" --- adds development tools such as gcc, make,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002507 pkgconfig and so forth.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002508 - "tools-testapps" --- adds useful testing tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002509 such as ts_print, aplay, arecord and so forth.
2510
2511 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002512 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002513
2514 For an example that shows how to customize your image by using this
Andrew Geissler517393d2023-01-13 08:55:19 -06002515 variable, see the ":ref:`dev-manual/customizing-images:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002516 section in the Yocto Project Development Tasks Manual.
2517
Andrew Geisslerf0343792020-11-18 10:42:21 -06002518 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002519 Specifies additional options for the image creation command that has
2520 been specified in :term:`IMAGE_CMD`. When setting
2521 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002522 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002523
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002524 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002525
Andrew Geisslerf0343792020-11-18 10:42:21 -06002526 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002527 A list of recipes to build that do not provide packages for
2528 installing into the root filesystem.
2529
2530 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002531 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002532 variable to list these recipes and thus specify the dependencies. A
2533 typical example is a required bootloader in a machine configuration.
2534
2535 .. note::
2536
2537 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002538 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002539
Andrew Geisslerf0343792020-11-18 10:42:21 -06002540 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002541 Additional `CMake <https://cmake.org/overview/>`__ options. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06002542 :ref:`ref-classes-cmake` class for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002543
Andrew Geisslerf0343792020-11-18 10:42:21 -06002544 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002545 Additional ``configure`` script options. See
2546 :term:`PACKAGECONFIG_CONFARGS` for
2547 additional information on passing configure script options.
2548
Andrew Geisslerf0343792020-11-18 10:42:21 -06002549 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002550 Additional GNU ``make`` options.
2551
Andrew Geissler09036742021-06-25 14:25:14 -05002552 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002553 variable to specify any required GNU options.
2554
2555 :term:`PARALLEL_MAKE` and
2556 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002557 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002558
Andrew Geisslerf0343792020-11-18 10:42:21 -06002559 :term:`EXTRA_OESCONS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002560 When inheriting the :ref:`ref-classes-scons` class, this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002561 variable specifies additional configuration options you want to pass
2562 to the ``scons`` command line.
2563
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002564 :term:`EXTRA_OEMESON`
2565 Additional `Meson <https://mesonbuild.com/>`__ options. See the
2566 :ref:`ref-classes-meson` class for additional information.
2567
2568 In addition to standard Meson options, such options correspond to
2569 `Meson build options <https://mesonbuild.com/Build-options.html>`__
2570 defined in the ``meson_options.txt`` file in the sources to build.
2571 Here is an example::
2572
2573 EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
2574
2575 Note that any custom value for the Meson ``--buildtype`` option
2576 should be set through the :term:`MESON_BUILDTYPE` variable.
2577
Andrew Geisslerf0343792020-11-18 10:42:21 -06002578 :term:`EXTRA_USERS_PARAMS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002579 When inheriting the :ref:`ref-classes-extrausers`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002580 class, this variable provides image level user and group operations.
2581 This is a more global method of providing user and group
2582 configuration as compared to using the
Andrew Geissler517393d2023-01-13 08:55:19 -06002583 :ref:`ref-classes-useradd` class, which ties user and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002584 group configurations to a specific recipe.
2585
2586 The set list of commands you can configure using the
Andrew Geissler517393d2023-01-13 08:55:19 -06002587 :term:`EXTRA_USERS_PARAMS` is shown in the
2588 :ref:`ref-classes-extrausers` class. These commands map to the normal
2589 Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002590
2591 # EXTRA_USERS_PARAMS = "\
2592 # useradd -p '' tester; \
2593 # groupadd developers; \
2594 # userdel nobody; \
2595 # groupdel -g video; \
2596 # groupmod -g 1020 developers; \
2597 # usermod -s /bin/sh tester; \
2598 # "
2599
Patrick Williams03907ee2022-05-01 06:28:52 -05002600 Hardcoded passwords are supported via the ``-p`` parameters for
2601 ``useradd`` or ``usermod``, but only hashed.
2602
2603 Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
2604 passwords. First on host, create the (escaped) password hash::
2605
2606 printf "%q" $(mkpasswd -m sha256crypt tester01)
2607
2608 The resulting hash is set to a variable and used in ``useradd`` command parameters::
2609
2610 inherit extrausers
2611 PASSWD = "\$X\$ABC123\$A-Long-Hash"
2612 EXTRA_USERS_PARAMS = "\
2613 useradd -p '${PASSWD}' tester-jim; \
2614 useradd -p '${PASSWD}' tester-sue; \
2615 "
2616
2617 Finally, here is an example that sets the root password::
2618
2619 inherit extrausers
2620 EXTRA_USERS_PARAMS = "\
2621 usermod -p '${PASSWD}' root; \
2622 "
2623
2624 .. note::
2625
2626 From a security perspective, hardcoding a default password is not
Andrew Geissler87f5cff2022-09-30 13:13:31 -05002627 generally a good idea or even legal in some jurisdictions. It is
2628 recommended that you do not do this if you are building a production
Patrick Williams03907ee2022-05-01 06:28:52 -05002629 image.
2630
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002631 Additionally there is a special ``passwd-expire`` command that will
2632 cause the password for a user to be expired and thus force changing it
2633 on first login, for example::
2634
2635 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2636
2637 .. note::
2638
2639 At present, ``passwd-expire`` may only work for remote logins when
2640 using OpenSSH and not dropbear as an SSH server.
2641
Andrew Geissler9aee5002022-03-30 16:27:02 +00002642 :term:`EXTRANATIVEPATH`
2643 A list of subdirectories of
2644 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2645 added to the beginning of the environment variable ``PATH``. As an
2646 example, the following prepends
2647 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2648 ``PATH``::
2649
2650 EXTRANATIVEPATH = "foo bar"
2651
Andrew Geissler517393d2023-01-13 08:55:19 -06002652 :term:`FAKEROOT`
2653 See :term:`bitbake:FAKEROOT` in the BitBake manual.
2654
2655 :term:`FAKEROOTBASEENV`
2656 See :term:`bitbake:FAKEROOTBASEENV` in the BitBake manual.
2657
2658 :term:`FAKEROOTCMD`
2659 See :term:`bitbake:FAKEROOTCMD` in the BitBake manual.
2660
2661 :term:`FAKEROOTDIRS`
2662 See :term:`bitbake:FAKEROOTDIRS` in the BitBake manual.
2663
2664 :term:`FAKEROOTENV`
2665 See :term:`bitbake:FAKEROOTENV` in the BitBake manual.
2666
2667 :term:`FAKEROOTNOENV`
2668 See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual.
2669
Andrew Geisslerf0343792020-11-18 10:42:21 -06002670 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002671 Defines one or more packages to include in an image when a specific
2672 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002673 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002674 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002675
2676 FEATURE_PACKAGES_widget = "package1 package2"
2677
Andrew Geissler09036742021-06-25 14:25:14 -05002678 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002679 package1 and package2 would be included in the image.
2680
2681 .. note::
2682
Andrew Geissler09036742021-06-25 14:25:14 -05002683 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002684 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002685 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002686 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002687
Andrew Geisslerf0343792020-11-18 10:42:21 -06002688 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002689 Points to the base URL of the server and location within the
2690 document-root that provides the metadata and packages required by
2691 OPKG to support runtime package management of IPK packages. You set
2692 this variable in your ``local.conf`` file.
2693
Andrew Geisslerc926e172021-05-07 16:11:35 -05002694 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002695
2696 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2697
2698 This example assumes you are serving
2699 your packages over HTTP and your databases are located in a directory
2700 named ``BOARD-dir``, which is underneath your HTTP server's
2701 document-root. In this case, the OpenEmbedded build system generates
2702 a set of configuration files for you in your target that work with
2703 the feed.
2704
Andrew Geissler517393d2023-01-13 08:55:19 -06002705 :term:`FETCHCMD`
2706 See :term:`bitbake:FETCHCMD` in the BitBake manual.
2707
2708 :term:`FILE`
2709 See :term:`bitbake:FILE` in the BitBake manual.
2710
Andrew Geisslerf0343792020-11-18 10:42:21 -06002711 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002712 The list of files and directories that are placed in a package. The
2713 :term:`PACKAGES` variable lists the packages
2714 generated by a recipe.
2715
Andrew Geissler09036742021-06-25 14:25:14 -05002716 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002717 identifies the resulting package. Then, provide a space-separated
2718 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002719 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002720
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002721 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002722
2723 .. note::
2724
2725 - When specifying files or paths, you can pattern match using
2726 Python's
Patrick Williams2390b1b2022-11-03 13:47:49 -05002727 `glob <https://docs.python.org/3/library/glob.html>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002728 syntax. For details on the syntax, see the documentation by
2729 following the previous link.
2730
Andrew Geissler09036742021-06-25 14:25:14 -05002731 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002732 good practice to use appropriate path variables. For example,
2733 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2734 rather than ``/usr/bin``. You can find a list of these
2735 variables at the top of the ``meta/conf/bitbake.conf`` file in
2736 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002737 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002738 this file.
2739
Andrew Geissler09036742021-06-25 14:25:14 -05002740 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002741 editable and you know they should not be overwritten during the
2742 package update process by the Package Management System (PMS), you
2743 can identify these files so that the PMS will not overwrite them. See
2744 the :term:`CONFFILES` variable for information on
2745 how to identify these files to the PMS.
2746
Andrew Geisslerf0343792020-11-18 10:42:21 -06002747 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002748 Defines the file specification to match
2749 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002750 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002751 symbolic link (symlink) for shared libraries on the target platform.
2752
2753 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002754 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002755
2756 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2757
Andrew Geisslerf0343792020-11-18 10:42:21 -06002758 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002759 Extends the search path the OpenEmbedded build system uses when
2760 looking for files and patches as it processes recipes and append
2761 files. The default directories BitBake uses when it processes recipes
2762 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002763 variable. You can extend :term:`FILESPATH` variable by using
2764 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002765
2766 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002767 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002768 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002769
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002770 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002771
2772 In the above example, the build system first
2773 looks for files in a directory that has the same name as the
2774 corresponding append file.
2775
2776 .. note::
2777
Andrew Geissler09036742021-06-25 14:25:14 -05002778 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002779 expansion (``:=``) operator. Immediate expansion makes sure that
2780 BitBake evaluates :term:`THISDIR` at the time the
2781 directive is encountered rather than at some later time when
2782 expansion might result in a directory that does not contain the
2783 files you need.
2784
2785 Also, include the trailing separating colon character if you are
2786 prepending. The trailing colon character is necessary because you
2787 are directing BitBake to extend the path by prepending directories
2788 to the search path.
2789
Andrew Geisslerc926e172021-05-07 16:11:35 -05002790 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002791
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002792 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002793
2794 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002795 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002796 in the same directory as the corresponding append file.
2797
Andrew Geisslerc926e172021-05-07 16:11:35 -05002798 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002799
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002800 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002801
2802 A final example shows how you can extend the search path and include
2803 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002804 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002805
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002806 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002807
2808 The previous statement appears in the
2809 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002810 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002811 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2812 override is a special :term:`PACKAGE_ARCH`
2813 definition for multiple ``meta-intel`` machines.
2814
2815 .. note::
2816
2817 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002818 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002819
2820 By prepending paths in ``.bbappend`` files, you allow multiple append
2821 files that reside in different layers but are used for the same
2822 recipe to correctly extend the path.
2823
Andrew Geisslerf0343792020-11-18 10:42:21 -06002824 :term:`FILESOVERRIDES`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002825 A subset of :term:`OVERRIDES` used by the OpenEmbedded build system for
2826 creating :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable uses
2827 overrides to automatically extend the :term:`FILESPATH` variable. For an
2828 example of how that works, see the :term:`FILESPATH` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002829 description. Additionally, you find more information on how overrides
2830 are handled in the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002831 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002832 section of the BitBake User Manual.
2833
Andrew Geissler09036742021-06-25 14:25:14 -05002834 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002835
2836 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2837
2838 .. note::
2839
Andrew Geissler09036742021-06-25 14:25:14 -05002840 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002841 with expected overrides and are used in an expected manner by the
2842 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002843
Andrew Geisslerf0343792020-11-18 10:42:21 -06002844 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002845 The default set of directories the OpenEmbedded build system uses
2846 when searching for patches and files.
2847
2848 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002849 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002850 patches specified by each ``file://`` URI in a recipe's
2851 :term:`SRC_URI` statements.
2852
Andrew Geissler09036742021-06-25 14:25:14 -05002853 The default value for the :term:`FILESPATH` variable is defined in the
Patrick Williams975a06f2022-10-21 14:42:47 -05002854 :ref:`ref-classes-base` class found in ``meta/classes-global`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002855 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002856
2857 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2858 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2859
2860 The
Andrew Geissler09036742021-06-25 14:25:14 -05002861 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002862 from the :term:`FILESOVERRIDES` variable.
2863
2864 .. note::
2865
Andrew Geissler09036742021-06-25 14:25:14 -05002866 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002867 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002868 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002869 :term:`FILESEXTRAPATHS` variable.
2870
Andrew Geissler09036742021-06-25 14:25:14 -05002871 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002872 to directories in custom layers where append files
2873 (``.bbappend``) are used. If you want the build system to find
2874 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002875 to extend the :term:`FILESPATH` variable by using the
2876 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002877
2878 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002879 example, consider a case where there is the following directory structure
2880 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002881
2882 files/defconfig
2883 files/MACHINEA/defconfig
2884 files/MACHINEB/defconfig
2885
Andrew Geissler09036742021-06-25 14:25:14 -05002886 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002887 "file://defconfig". Given this scenario, you can set
2888 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002889 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002890 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2891 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2892 build system uses files from ``files/defconfig``.
2893
2894 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002895 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002896 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler517393d2023-01-13 08:55:19 -06002897 ":ref:`dev-manual/new-recipe:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002898 the Yocto Project Development Tasks Manual. See the
2899 :ref:`ref-tasks-patch` task as well.
2900
Andrew Geisslerf0343792020-11-18 10:42:21 -06002901 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002902 Allows you to define your own file permissions settings table as part
2903 of your configuration for the packaging process. For example, suppose
2904 you need a consistent set of custom permissions for a set of groups
2905 and users across an entire work project. It is best to do this in the
2906 packages themselves but this is not always possible.
2907
2908 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2909 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2910 If you create your own file
2911 permissions setting table, you should place it in your layer or the
2912 distro's layer.
2913
Andrew Geissler09036742021-06-25 14:25:14 -05002914 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002915 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002916 to point to your custom ``fs-perms.txt``. You can specify more than a
2917 single file permissions setting table. The paths you specify to these
2918 files must be defined within the :term:`BBPATH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002919
2920 For guidance on how to create your own file permissions settings
2921 table file, examine the existing ``fs-perms.txt``.
2922
Andrew Geissler3eeda902023-05-19 10:14:02 -05002923 :term:`FIT_ADDRESS_CELLS`
Andrew Geissler3eeda902023-05-19 10:14:02 -05002924 Specifies the value of the ``#address-cells`` value for the
Patrick Williamsb542dec2023-06-09 01:26:37 -05002925 description of the FIT image.
Andrew Geissler3eeda902023-05-19 10:14:02 -05002926
2927 The default value is set to "1" by the :ref:`ref-classes-kernel-fitimage`
2928 class, which corresponds to 32 bit addresses.
2929
Patrick Williamsb542dec2023-06-09 01:26:37 -05002930 For platforms that need to set 64 bit addresses, for example in
Andrew Geissler3eeda902023-05-19 10:14:02 -05002931 :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to
2932 set this value to "2", as two 32 bit values (cells) will be needed
2933 to represent such addresses.
2934
2935 Here is an example setting "0x400000000" as a load address::
2936
2937 FIT_ADDRESS_CELLS = "2"
2938 UBOOT_LOADADDRESS= "0x04 0x00000000"
2939
2940 See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__.
2941
Patrick Williams8e7b46e2023-05-01 14:19:06 -05002942 :term:`FIT_CONF_DEFAULT_DTB`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002943 Specifies the default device tree binary (dtb) file for a FIT image
2944 when multiple ones are provided.
2945
2946 This variable is used in the :ref:`ref-classes-kernel-fitimage` class.
Patrick Williams8e7b46e2023-05-01 14:19:06 -05002947
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002948 :term:`FIT_DESC`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002949 Specifies the description string encoded into a FIT image. The
2950 default value is set by the :ref:`ref-classes-kernel-fitimage` class as
2951 follows::
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002952
2953 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2954
Andrew Geisslerf0343792020-11-18 10:42:21 -06002955 :term:`FIT_GENERATE_KEYS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002956 Decides whether to generate the keys for signing the FIT image if
2957 they don't already exist. The keys are created in
2958 :term:`UBOOT_SIGN_KEYDIR`. The default value is set to "0"
2959 by the :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002960
Andrew Geisslerf0343792020-11-18 10:42:21 -06002961 :term:`FIT_HASH_ALG`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002962 Specifies the hash algorithm used in creating the FIT Image.
2963 This variable is set by default to "sha256" by the
2964 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002965
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002966 :term:`FIT_KERNEL_COMP_ALG`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002967 The compression algorithm to use for the kernel image inside the FIT Image.
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002968 At present, the only supported values are "gzip" (default), "lzo" or "none".
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002969 If you set this variable to anything other than "none" you may also need
2970 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2971
Patrick Williamsb542dec2023-06-09 01:26:37 -05002972 This variable is used in the :ref:`ref-classes-kernel-uboot` class.
2973
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002974 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2975 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
Patrick Williamsb542dec2023-06-09 01:26:37 -05002976 value is set ".gz" by the :ref:`ref-classes-kernel-uboot` class. If you
2977 set :term:`FIT_KERNEL_COMP_ALG` to "lzo", you may want to set this
2978 variable to ".lzo".
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002979
Andrew Geisslerf0343792020-11-18 10:42:21 -06002980 :term:`FIT_KEY_GENRSA_ARGS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002981 Arguments to ``openssl genrsa`` for generating a RSA private key for
2982 signing the FIT image. The default value is set to "-F4" by the
2983 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002984
Andrew Geisslerf0343792020-11-18 10:42:21 -06002985 :term:`FIT_KEY_REQ_ARGS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002986 Arguments to ``openssl req`` for generating a certificate for signing
2987 the FIT image. The default value is "-batch -new" by the
2988 :ref:`ref-classes-kernel-fitimage` class, "batch" for
2989 non interactive mode and "new" for generating new keys.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002990
Andrew Geisslerf0343792020-11-18 10:42:21 -06002991 :term:`FIT_KEY_SIGN_PKCS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05002992 Format for the public key certificate used for signing the FIT image.
2993 The default value is set to "x509" by the
2994 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002995
Andrew Geisslerf0343792020-11-18 10:42:21 -06002996 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002997 Specifies the signature algorithm used in creating the FIT Image.
Patrick Williamsb542dec2023-06-09 01:26:37 -05002998 This variable is set by default to "rsa2048" by the
2999 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003000
Patrick Williams975a06f2022-10-21 14:42:47 -05003001 :term:`FIT_PAD_ALG`
3002 Specifies the padding algorithm used in creating the FIT Image.
Patrick Williamsb542dec2023-06-09 01:26:37 -05003003 The default value is set to "pkcs-1.5" by the
3004 :ref:`ref-classes-kernel-fitimage` class.
Patrick Williams975a06f2022-10-21 14:42:47 -05003005
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003006 :term:`FIT_SIGN_INDIVIDUAL`
Andrew Geissler517393d2023-01-13 08:55:19 -06003007 If set to "1", then the :ref:`ref-classes-kernel-fitimage`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003008 class will sign the kernel, dtb and ramdisk images individually in addition
Patrick Williamsb542dec2023-06-09 01:26:37 -05003009 to signing the FIT image itself. This could be useful if you are
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003010 intending to verify signatures in another context than booting via
3011 U-Boot.
3012
Patrick Williamsb542dec2023-06-09 01:26:37 -05003013 This variable is set to "0" by default.
3014
Andrew Geissler9aee5002022-03-30 16:27:02 +00003015 :term:`FIT_SIGN_NUMBITS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003016 Size of the private key used in the FIT image, in number of bits.
3017 The default value for this variable is set to "2048"
3018 by the :ref:`ref-classes-kernel-fitimage` class.
Andrew Geissler9aee5002022-03-30 16:27:02 +00003019
Andrew Geisslerf0343792020-11-18 10:42:21 -06003020 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geissler517393d2023-01-13 08:55:19 -06003021 When inheriting the :ref:`ref-classes-fontcache` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003022 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04003023 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003024
Andrew Geisslerf0343792020-11-18 10:42:21 -06003025 :term:`FONT_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06003026 When inheriting the :ref:`ref-classes-fontcache` class, this variable
3027 identifies packages containing font files that need to be cached by
3028 Fontconfig. By default, the :ref:`ref-classes-fontcache` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003029 that fonts are in the recipe's main package (i.e.
3030 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
3031 need are in a package other than that main package.
3032
Andrew Geisslerf0343792020-11-18 10:42:21 -06003033 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003034 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
3035 during the generation of the root filesystem.
3036
3037 Set the variable to "1" to force the removal of these packages.
3038
Andrew Geisslerf0343792020-11-18 10:42:21 -06003039 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003040 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003041 compiling an optimized system. This variable defaults to "-O2 -pipe
3042 ${DEBUG_FLAGS}".
3043
Andrew Geisslerf0343792020-11-18 10:42:21 -06003044 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003045 Enables Position Independent Executables (PIE) within the GNU C
3046 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
3047 Programming (ROP) attacks much more difficult to execute.
3048
3049 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003050 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003051
3052 GCCPIE ?= "--enable-default-pie"
3053
Andrew Geisslerf0343792020-11-18 10:42:21 -06003054 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003055 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05003056 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003057 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003058
3059 GCCVERSION ?= "8.%"
3060
3061 You can override this value by setting it in a
3062 configuration file such as the ``local.conf``.
3063
Andrew Geisslerf0343792020-11-18 10:42:21 -06003064 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003065 The minimal command and arguments to run the GNU Debugger.
3066
Andrew Geissler595f6302022-01-24 19:11:47 +00003067 :term:`GIR_EXTRA_LIBS_PATH`
3068 Allows to specify an extra search path for ``.so`` files
3069 in GLib related recipes using GObject introspection,
3070 and which do not compile without this setting.
Andrew Geissler517393d2023-01-13 08:55:19 -06003071 See the ":ref:`dev-manual/gobject-introspection:enabling gobject introspection support`"
Andrew Geissler595f6302022-01-24 19:11:47 +00003072 section for details.
3073
Andrew Geisslerf0343792020-11-18 10:42:21 -06003074 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003075 The directory in which a local copy of a Git repository is stored
3076 when it is cloned.
3077
Patrick Williams975a06f2022-10-21 14:42:47 -05003078 :term:`GITHUB_BASE_URI`
Andrew Geissler517393d2023-01-13 08:55:19 -06003079 When inheriting the :ref:`ref-classes-github-releases`
Patrick Williams975a06f2022-10-21 14:42:47 -05003080 class, specifies the base URL for fetching releases for the github
3081 project you wish to fetch sources from. The default value is as follows::
3082
3083 GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/"
3084
Andrew Geisslerf0343792020-11-18 10:42:21 -06003085 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003086 Specifies the list of GLIBC locales to generate should you not wish
3087 to generate all LIBC locals, which can be time consuming.
3088
3089 .. note::
3090
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003091 If you specifically remove the locale ``en_US.UTF-8``, you must set
3092 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003093
Andrew Geissler09036742021-06-25 14:25:14 -05003094 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geissler517393d2023-01-13 08:55:19 -06003095 By default, all locales are generated::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003096
3097 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
3098
Andrew Geisslerc5535c92023-01-27 16:10:19 -06003099 :term:`GO_IMPORT`
3100 When inheriting the :ref:`ref-classes-go` class, this mandatory variable
3101 sets the import path for the Go package that will be created for the code
3102 to build. If you have a ``go.mod`` file in the source directory, this
3103 typically matches the path in the ``module`` line in this file.
3104
3105 Other Go programs importing this package will use this path.
3106
3107 Here is an example setting from the
3108 :yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
3109 recipe::
3110
3111 GO_IMPORT = "golang.org/x/example"
3112
3113 :term:`GO_INSTALL`
3114 When inheriting the :ref:`ref-classes-go` class, this optional variable
3115 specifies which packages in the sources should be compiled and
3116 installed in the Go build space by the
3117 `go install <https://go.dev/ref/mod#go-install>`__ command.
3118
3119 Here is an example setting from the
3120 :oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>`
3121 recipe::
3122
3123 GO_INSTALL = "\
3124 ${GO_IMPORT}/cmd/crucible \
3125 ${GO_IMPORT}/cmd/habtool \
3126 "
3127
3128 By default, :term:`GO_INSTALL` is defined as::
3129
3130 GO_INSTALL ?= "${GO_IMPORT}/..."
3131
3132 The ``...`` wildcard means that it will catch all
3133 packages found in the sources.
3134
3135 See the :term:`GO_INSTALL_FILTEROUT` variable for
3136 filtering out unwanted packages from the ones
3137 found from the :term:`GO_INSTALL` value.
3138
3139 :term:`GO_INSTALL_FILTEROUT`
3140 When using the Go "vendor" mechanism to bring in dependencies for a Go
3141 package, the default :term:`GO_INSTALL` setting, which uses the ``...``
3142 wildcard, will include the vendored packages in the build, which produces
3143 incorrect results.
3144
3145 There are also some Go packages that are structured poorly, so that the
3146 ``...`` wildcard results in building example or test code that should not
3147 be included in the build, or could fail to build.
3148
3149 This optional variable allows for filtering out a subset of the sources.
3150 It defaults to excluding everything under the ``vendor`` subdirectory
3151 under package's main directory. This is the normal location for vendored
3152 packages, but it can be overridden by a recipe to filter out other
3153 subdirectories if needed.
3154
3155 :term:`GO_WORKDIR`
3156 When using Go Modules, the current working directory must be the directory
3157 containing the ``go.mod`` file, or one of its subdirectories. When the
3158 ``go`` tool is used, it will automatically look for the ``go.mod`` file
3159 in the Go working directory or in any parent directory, but not in
3160 subdirectories.
3161
3162 When using the :ref:`ref-classes-go-mod` class to use Go modules,
3163 the optional :term:`GO_WORKDIR` variable, defaulting to the value
3164 of :term:`GO_IMPORT`, allows to specify a different Go working directory.
3165
Andrew Geisslerf0343792020-11-18 10:42:21 -06003166 :term:`GROUPADD_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06003167 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003168 this variable specifies for a package what parameters should be
3169 passed to the ``groupadd`` command if you wish to add a group to the
3170 system when the package is installed.
3171
Andrew Geisslerc926e172021-05-07 16:11:35 -05003172 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003173
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003174 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003175
3176 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003177 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003178
Andrew Geisslerf0343792020-11-18 10:42:21 -06003179 :term:`GROUPMEMS_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06003180 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003181 this variable specifies for a package what parameters should be
3182 passed to the ``groupmems`` command if you wish to modify the members
3183 of a group when the package is installed.
3184
3185 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003186 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003187
Andrew Geisslerf0343792020-11-18 10:42:21 -06003188 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003189 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
3190 and serial in the boot menu. Set this variable to "1" in your
3191 ``local.conf`` or distribution configuration file to enable graphics
3192 and serial in the menu.
3193
Andrew Geissler517393d2023-01-13 08:55:19 -06003194 See the :ref:`ref-classes-grub-efi` class for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003195 information on how this variable is used.
3196
Andrew Geisslerf0343792020-11-18 10:42:21 -06003197 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003198 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
3199 configuration. Use a semi-colon character (``;``) to separate
3200 multiple options.
3201
Andrew Geissler09036742021-06-25 14:25:14 -05003202 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06003203 :ref:`ref-classes-grub-efi` class for more information
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003204 on how this variable is used.
3205
Andrew Geisslerf0343792020-11-18 10:42:21 -06003206 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003207 Specifies the timeout before executing the default ``LABEL`` in the
3208 GNU GRand Unified Bootloader (GRUB).
3209
Andrew Geissler09036742021-06-25 14:25:14 -05003210 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06003211 :ref:`ref-classes-grub-efi` class for more information
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003212 on how this variable is used.
3213
Andrew Geisslerf0343792020-11-18 10:42:21 -06003214 :term:`GTKIMMODULES_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06003215 When inheriting the :ref:`ref-classes-gtk-immodules-cache` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003216 this variable specifies the packages that contain the GTK+ input
3217 method modules being installed when the modules are in packages other
3218 than the main package.
3219
Andrew Geissler517393d2023-01-13 08:55:19 -06003220 :term:`HGDIR`
3221 See :term:`bitbake:HGDIR` in the BitBake manual.
3222
Andrew Geisslerf0343792020-11-18 10:42:21 -06003223 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003224 Website where more information about the software the recipe is
3225 building can be found.
3226
Andrew Geisslerf0343792020-11-18 10:42:21 -06003227 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003228 The name of the target architecture, which is normally the same as
3229 :term:`TARGET_ARCH`. The OpenEmbedded build system
3230 supports many architectures. Here is an example list of architectures
3231 supported. This list is by no means complete as the architecture is
3232 configurable:
3233
3234 - arm
3235 - i586
3236 - x86_64
3237 - powerpc
3238 - powerpc64
3239 - mips
3240 - mipsel
3241
Andrew Geisslerf0343792020-11-18 10:42:21 -06003242 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003243 Specifies architecture-specific compiler flags that are passed to the
3244 C compiler.
3245
Andrew Geissler09036742021-06-25 14:25:14 -05003246 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003247 is being built:
3248
3249 - :term:`TARGET_CC_ARCH` when building for the
3250 target
3251
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003252 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003253 ``-native``)
3254
3255 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
3256 ``nativesdk-``)
3257
Andrew Geisslerf0343792020-11-18 10:42:21 -06003258 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003259 Specifies the name of the target operating system, which is normally
3260 the same as the :term:`TARGET_OS`. The variable can
3261 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
3262 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
3263 "linux-musleabi" values possible.
3264
Andrew Geisslerf0343792020-11-18 10:42:21 -06003265 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05003266 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003267 is normally the same as :term:`TARGET_PREFIX`.
3268
Andrew Geisslerf0343792020-11-18 10:42:21 -06003269 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003270 Specifies the system, including the architecture and the operating
3271 system, for which the build is occurring in the context of the
3272 current recipe.
3273
3274 The OpenEmbedded build system automatically sets this variable based
3275 on :term:`HOST_ARCH`,
3276 :term:`HOST_VENDOR`, and
3277 :term:`HOST_OS` variables.
3278
3279 .. note::
3280
3281 You do not need to set the variable yourself.
3282
3283 Consider these two examples:
3284
3285 - Given a native recipe on a 32-bit x86 machine running Linux, the
3286 value is "i686-linux".
3287
3288 - Given a recipe being built for a little-endian MIPS target running
3289 Linux, the value might be "mipsel-linux".
3290
Andrew Geissler9aee5002022-03-30 16:27:02 +00003291 :term:`HOST_VENDOR`
3292 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
3293 same as :term:`TARGET_VENDOR`.
3294
Andrew Geisslerf0343792020-11-18 10:42:21 -06003295 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003296 A space-separated list (filter) of tools on the build host that
3297 should be allowed to be called from within build tasks. Using this
3298 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05003299 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003300 host, the OpenEmbedded build system produces an error and the build
3301 is not started.
3302
3303 For additional information, see
3304 :term:`HOSTTOOLS_NONFATAL`.
3305
Andrew Geisslerf0343792020-11-18 10:42:21 -06003306 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003307 A space-separated list (filter) of tools on the build host that
3308 should be allowed to be called from within build tasks. Using this
3309 filter helps reduce the possibility of host contamination. Unlike
3310 :term:`HOSTTOOLS`, the OpenEmbedded build system
3311 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05003312 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
3313 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003314
Andrew Geissler9aee5002022-03-30 16:27:02 +00003315 :term:`ICECC_CLASS_DISABLE`
3316 Identifies user classes that you do not want the Icecream distributed
3317 compile support to consider. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003318 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geissler9aee5002022-03-30 16:27:02 +00003319 your ``local.conf`` file.
3320
3321 When you list classes using this variable, the recipes inheriting
3322 those classes will not benefit from distributed compilation across
3323 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003324
Andrew Geisslerf0343792020-11-18 10:42:21 -06003325 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003326 Disables or enables the ``icecc`` (Icecream) function. For more
3327 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00003328 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003329 section.
3330
3331 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003332 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003333
3334 ICECC_DISABLED ??= "1"
3335
Andrew Geisslerc926e172021-05-07 16:11:35 -05003336 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003337
3338 ICECC_DISABLED = ""
3339
Andrew Geisslerf0343792020-11-18 10:42:21 -06003340 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003341 Points to the ``icecc-create-env`` script that you provide. This
Andrew Geissler517393d2023-01-13 08:55:19 -06003342 variable is used by the :ref:`ref-classes-icecc` class. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003343 set this variable in your ``local.conf`` file.
3344
3345 If you do not point to a script that you provide, the OpenEmbedded
3346 build system uses the default script provided by the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003347 :oe_git:`icecc-create-env_0.1.bb
3348 </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>`
3349 recipe, which is a modified version and not the one that comes with
3350 ``icecream``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003351
Andrew Geisslerf0343792020-11-18 10:42:21 -06003352 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003353 Extra options passed to the ``make`` command during the
3354 :ref:`ref-tasks-compile` task that specify parallel
3355 compilation. This variable usually takes the form of "-j x", where x
3356 represents the maximum number of parallel threads ``make`` can run.
3357
3358 .. note::
3359
3360 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003361 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003362
3363 If your enabled machines support multiple cores, coming up with the
3364 maximum number of parallel threads that gives you the best
3365 performance could take some experimentation since machine speed,
3366 network lag, available memory, and existing machine loads can all
3367 affect build time. Consequently, unlike the
3368 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05003369 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003370 performance.
3371
Andrew Geissler09036742021-06-25 14:25:14 -05003372 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003373 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05003374 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003375
Andrew Geisslerf0343792020-11-18 10:42:21 -06003376 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003377 The location of the ``icecc`` binary. You can set this variable in
3378 your ``local.conf`` file. If your ``local.conf`` file does not define
Andrew Geissler517393d2023-01-13 08:55:19 -06003379 this variable, the :ref:`ref-classes-icecc` class attempts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003380 to define it by locating ``icecc`` using ``which``.
3381
Andrew Geissler9aee5002022-03-30 16:27:02 +00003382 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003383 Identifies user recipes that you do not want the Icecream distributed
3384 compile support to consider. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003385 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003386 your ``local.conf`` file.
3387
Andrew Geissler595f6302022-01-24 19:11:47 +00003388 When you list recipes using this variable, you are excluding them
3389 from distributed compilation across remote hosts. Instead they will
3390 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003391
Andrew Geissler9aee5002022-03-30 16:27:02 +00003392 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003393 Identifies user recipes that use an empty
3394 :term:`PARALLEL_MAKE` variable that you want to
3395 force remote distributed compilation on using the Icecream
3396 distributed compile support. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003397 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003398 your ``local.conf`` file.
3399
Andrew Geisslerf0343792020-11-18 10:42:21 -06003400 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003401 The base name of image output files. This variable defaults to the
3402 recipe name (``${``\ :term:`PN`\ ``}``).
3403
Andrew Geisslerf0343792020-11-18 10:42:21 -06003404 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003405 A space-separated list of files installed into the boot partition
3406 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003407 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003408 the files are
3409 installed under the same name as the source files. To change the
3410 installed name, separate it from the original name with a semi-colon
3411 (;). Source files need to be located in
3412 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003413 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003414
3415 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3416 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3417
3418 Alternatively, source files can be picked up using a glob pattern. In
3419 this case, the destination file must have the same name as the base
3420 name of the source file path. To install files into a directory
3421 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05003422 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003423
3424 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
3425 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
3426
3427 The first example
3428 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3429 into the root of the target partition. The second example installs
3430 the same files into a ``boot`` directory within the target partition.
3431
3432 You can find information on how to use the Wic tool in the
Andrew Geissler517393d2023-01-13 08:55:19 -06003433 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003434 section of the Yocto Project Development Tasks Manual. Reference
3435 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003436 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003437
Patrick Williams975a06f2022-10-21 14:42:47 -05003438 :term:`IMAGE_BUILDINFO_FILE`
Andrew Geissler517393d2023-01-13 08:55:19 -06003439 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05003440 specifies the file in the image to write the build information into. The
3441 default value is "``${sysconfdir}/buildinfo``".
3442
3443 :term:`IMAGE_BUILDINFO_VARS`
Andrew Geissler517393d2023-01-13 08:55:19 -06003444 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05003445 specifies the list of variables to include in the `Build Configuration`
3446 section of the output file (as a space-separated list). Defaults to
3447 ":term:`DISTRO` :term:`DISTRO_VERSION`".
3448
Andrew Geisslerf0343792020-11-18 10:42:21 -06003449 :term:`IMAGE_CLASSES`
Patrick Williams975a06f2022-10-21 14:42:47 -05003450 A list of classes that all images should inherit. This is typically used
3451 to enable functionality across all image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003452
Patrick Williams975a06f2022-10-21 14:42:47 -05003453 Classes specified in :term:`IMAGE_CLASSES` must be located in the
3454 ``classes-recipe/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003455
Andrew Geisslerf0343792020-11-18 10:42:21 -06003456 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003457 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003458 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003459 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3460 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003461 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003462
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003463 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003464 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003465 ${EXTRA_IMAGECMD}"
3466
3467 You typically do not need to set this variable unless you are adding
3468 support for a new image type. For more examples on how to set this
Andrew Geissler517393d2023-01-13 08:55:19 -06003469 variable, see the :ref:`ref-classes-image_types`
Patrick Williams975a06f2022-10-21 14:42:47 -05003470 class file, which is ``meta/classes-recipe/image_types.bbclass``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003471
Andrew Geisslerf0343792020-11-18 10:42:21 -06003472 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003473 Specifies one or more files that contain custom device tables that
3474 are passed to the ``makedevs`` command as part of creating an image.
3475 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003476 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003477 ``files/device_table-minimal.txt`` is used, which is located by
3478 :term:`BBPATH`. For details on how you should write
3479 device table files, see ``meta/files/device_table-minimal.txt`` as an
3480 example.
3481
Andrew Geissler9aee5002022-03-30 16:27:02 +00003482 :term:`IMAGE_EFI_BOOT_FILES`
3483 A space-separated list of files installed into the boot partition
3484 when preparing an image using the Wic tool with the
3485 ``bootimg-efi`` source plugin. By default,
3486 the files are
3487 installed under the same name as the source files. To change the
3488 installed name, separate it from the original name with a semi-colon
3489 (;). Source files need to be located in
3490 :term:`DEPLOY_DIR_IMAGE`. Here are two
3491 examples::
3492
3493 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3494 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3495
3496 Alternatively, source files can be picked up using a glob pattern. In
3497 this case, the destination file must have the same name as the base
3498 name of the source file path. To install files into a directory
3499 within the target location, pass its name after a semi-colon (;).
3500 Here are two examples::
3501
3502 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3503 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3504
3505 The first example
3506 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3507 into the root of the target partition. The second example installs
3508 the same files into a ``boot`` directory within the target partition.
3509
3510 You can find information on how to use the Wic tool in the
Andrew Geissler517393d2023-01-13 08:55:19 -06003511 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00003512 section of the Yocto Project Development Tasks Manual. Reference
3513 material for Wic is located in the
3514 ":doc:`/ref-manual/kickstart`" chapter.
3515
Andrew Geisslerf0343792020-11-18 10:42:21 -06003516 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003517 The primary list of features to include in an image. Typically, you
3518 configure this variable in an image recipe. Although you can use this
3519 variable from your ``local.conf`` file, which is found in the
3520 :term:`Build Directory`, best practices dictate that you do
3521 not.
3522
3523 .. note::
3524
3525 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003526 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003527
3528 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003529 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003530
3531 For an example that shows how to customize your image by using this
Andrew Geissler517393d2023-01-13 08:55:19 -06003532 variable, see the ":ref:`dev-manual/customizing-images:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003533 section in the Yocto Project Development Tasks Manual.
3534
Andrew Geisslerf0343792020-11-18 10:42:21 -06003535 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003536 Specifies the formats the OpenEmbedded build system uses during the
3537 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003538 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003539 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003540
3541 IMAGE_FSTYPES = "ext3 tar.bz2"
3542
3543 For the complete list of supported image formats from which you can
3544 choose, see :term:`IMAGE_TYPES`.
3545
3546 .. note::
3547
3548 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003549 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003550 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003551
3552 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003553 variable, you cannot update its contents by using ``:append``
3554 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003555 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003556
Andrew Geisslerf0343792020-11-18 10:42:21 -06003557 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003558 Used by recipes to specify the packages to install into an image
Andrew Geissler517393d2023-01-13 08:55:19 -06003559 through the :ref:`ref-classes-image` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003560 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003561
Andrew Geissler09036742021-06-25 14:25:14 -05003562 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003563 install into an image through :ref:`ref-classes-image`. Additionally,
Andrew Geissler517393d2023-01-13 08:55:19 -06003564 there are "helper" classes such as the :ref:`ref-classes-core-image`
3565 class which can take lists used with :term:`IMAGE_FEATURES` and turn
3566 them into auto-generated entries in :term:`IMAGE_INSTALL` in addition
3567 to its default contents.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003568
Andrew Geisslerc926e172021-05-07 16:11:35 -05003569 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003570
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003571 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003572
3573 Be sure to include the space
3574 between the quotation character and the start of the package name or
3575 names.
3576
3577 .. note::
3578
3579 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003580 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003581 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003582 packages for installation. Instead, use the
3583 :term:`PACKAGE_INSTALL` variable, which
Patrick Williams2194f502022-10-16 14:26:09 -05003584 allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003585 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Patrick Williams2194f502022-10-16 14:26:09 -05003586 For information on creating an :term:`Initramfs`, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06003587 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003588 section in the Yocto Project Development Tasks Manual.
3589
Andrew Geissler09036742021-06-25 14:25:14 -05003590 - Using :term:`IMAGE_INSTALL` with the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003591 :ref:`+= <bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003592 BitBake operator within the ``/conf/local.conf`` file or from
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003593 within an image recipe is not recommended. Use of this operator in
3594 these ways can cause ordering issues. Since
3595 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a
3596 default value using the
3597 :ref:`?= <bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003598 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003599 results in unexpected behavior when used within
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003600 ``conf/local.conf``. Furthermore, the same operation from within an
3601 image recipe may or may not succeed depending on the specific
3602 situation. In both these cases, the behavior is contrary to how
3603 most users expect the ``+=`` operator to work.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003604
Andrew Geisslerf0343792020-11-18 10:42:21 -06003605 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003606 Specifies the list of locales to install into the image during the
3607 root filesystem construction process. The OpenEmbedded build system
3608 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003609 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003610 ensures that any locale packages that correspond to packages already
3611 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003612 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003613
3614 IMAGE_LINGUAS = "pt-br de-de"
3615
3616 In this example, the build system ensures any Brazilian Portuguese
3617 and German locale files that correspond to packages in the image are
3618 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3619 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3620 only provide locale files by language and not by country-specific
3621 language).
3622
3623 See the :term:`GLIBC_GENERATE_LOCALES`
3624 variable for information on generating GLIBC locales.
3625
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003626
3627 :term:`IMAGE_LINK_NAME`
3628 The name of the output image symlink (which does not include
3629 the version part as :term:`IMAGE_NAME` does). The default value
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003630 is derived using the :term:`IMAGE_BASENAME` and
3631 :term:`IMAGE_MACHINE_SUFFIX` variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003632
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003633 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003634
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003635 .. note::
3636
3637 It is possible to set this to "" to disable symlink creation,
3638 however, you also need to set :term:`IMAGE_NAME` to still have
3639 a reasonable value e.g.::
3640
3641 IMAGE_LINK_NAME = ""
3642 IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
3643
3644 :term:`IMAGE_MACHINE_SUFFIX`
3645 Specifies the by default machine-specific suffix for image file names
3646 (before the extension). The default value is set as follows::
3647
3648 IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}"
3649
3650 The default :term:`DEPLOY_DIR_IMAGE` already has a :term:`MACHINE`
3651 subdirectory, so you may find it unnecessary to also include this suffix
3652 in the name of every image file. If you prefer to remove the suffix you
3653 can set this variable to an empty string::
3654
3655 IMAGE_MACHINE_SUFFIX = ""
3656
3657 (Not to be confused with :term:`IMAGE_NAME_SUFFIX`.)
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003658
Andrew Geisslerf0343792020-11-18 10:42:21 -06003659 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003660 The manifest file for the image. This file lists all the installed
3661 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003662 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003663
3664 packagename packagearch version
3665
Andrew Geissler09036742021-06-25 14:25:14 -05003666 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003667 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003668
Andrew Geissler09036742021-06-25 14:25:14 -05003669 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003670
3671 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003672 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003673 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003674 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003675 section in the Yocto Project Overview and Concepts Manual.
3676
Andrew Geisslerf0343792020-11-18 10:42:21 -06003677 :term:`IMAGE_NAME`
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003678 The name of the output image files minus the extension. By default
3679 this variable is set using the :term:`IMAGE_LINK_NAME`, and
3680 :term:`IMAGE_VERSION_SUFFIX` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003681
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003682 IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003683
3684 :term:`IMAGE_NAME_SUFFIX`
Andrew Geissler615f2f12022-07-15 14:00:58 -05003685 Suffix used for the image output filename --- defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003686 to distinguish the image file from other files created during image
3687 building; however if this suffix is redundant or not desired you can
3688 clear the value of this variable (set the value to ""). For example,
Patrick Williams2194f502022-10-16 14:26:09 -05003689 this is typically cleared in :term:`Initramfs` image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003690
Andrew Geisslerf0343792020-11-18 10:42:21 -06003691 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003692 Defines a multiplier that the build system applies to the initial
3693 image size for cases when the multiplier times the returned disk
3694 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003695 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003696 the multiplier applied to the initial image size creates free disk
3697 space in the image as overhead. By default, the build process uses a
3698 multiplier of 1.3 for this variable. This default value results in
3699 30% free disk space added to the image when this method is used to
3700 determine the final generated image size. You should be aware that
3701 post install scripts and the package management system uses disk
3702 space inside this overhead area. Consequently, the multiplier does
3703 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003704 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003705 determines the overall image size.
3706
3707 The default 30% free disk space typically gives the image enough room
3708 to boot and allows for basic post installs while still leaving a
3709 small amount of free disk space. If 30% free space is inadequate, you
3710 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003711 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003712
3713 IMAGE_OVERHEAD_FACTOR = "1.5"
3714
3715 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003716 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003717 variable.
3718
Andrew Geisslerf0343792020-11-18 10:42:21 -06003719 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003720 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3721 OpenEmbedded build system. The variable is defined appropriately by
Andrew Geissler517393d2023-01-13 08:55:19 -06003722 the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`,
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003723 or :ref:`ref-classes-package_ipk` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003724
Andrew Geissler517393d2023-01-13 08:55:19 -06003725 The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image`
3726 classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003727
Andrew Geissler09036742021-06-25 14:25:14 -05003728 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003729 variable is set indirectly through the appropriate
3730 :ref:`package_* <ref-classes-package>` class using the
3731 :term:`PACKAGE_CLASSES` variable. The
3732 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3733 or IPK) that appears with the variable
3734
3735 .. note::
3736
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003737 Files using the ``.tar`` format are never used as a substitute
3738 packaging format for DEB, RPM, and IPK formatted files for your image
3739 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003740
Andrew Geisslerf0343792020-11-18 10:42:21 -06003741 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003742 Specifies a list of functions to call once the OpenEmbedded build
3743 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003744 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003745
3746 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3747
3748 If you need to pass the root filesystem path to a command within the
3749 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3750 directory that becomes the root filesystem image. See the
3751 :term:`IMAGE_ROOTFS` variable for more
3752 information.
3753
Andrew Geisslerf0343792020-11-18 10:42:21 -06003754 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003755 Specifies a list of functions to call before the OpenEmbedded build
3756 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003757 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003758
3759 IMAGE_PREPROCESS_COMMAND += "function; ... "
3760
3761 If you need to pass the root filesystem path to a command within the
3762 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3763 directory that becomes the root filesystem image. See the
3764 :term:`IMAGE_ROOTFS` variable for more
3765 information.
3766
Andrew Geisslerf0343792020-11-18 10:42:21 -06003767 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003768 The location of the root filesystem while it is under construction
3769 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3770 variable is not configurable. Do not change it.
3771
Andrew Geisslerf0343792020-11-18 10:42:21 -06003772 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003773 Specifies the alignment for the output image file in Kbytes. If the
3774 size of the image is not a multiple of this value, then the size is
3775 rounded up to the nearest multiple of the value. The default value is
3776 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3777 additional information.
3778
Andrew Geisslerf0343792020-11-18 10:42:21 -06003779 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003780 Defines additional free disk space created in the image in Kbytes. By
3781 default, this variable is set to "0". This free disk space is added
3782 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003783 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003784
3785 This variable is particularly useful when you want to ensure that a
3786 specific amount of free disk space is available on a device after an
3787 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003788 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003789
3790 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3791
3792 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003793 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003794
3795 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3796
Andrew Geisslerf0343792020-11-18 10:42:21 -06003797 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003798 Defines the size in Kbytes for the generated image. The OpenEmbedded
3799 build system determines the final size for the generated image using
3800 an algorithm that takes into account the initial disk space used for
3801 the generated image, a requested size for the image, and requested
3802 additional free disk space to be added to the image. Programatically,
3803 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003804 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003805
3806 if (image-du * overhead) < rootfs-size:
3807 internal-rootfs-size = rootfs-size + xspace
3808 else:
3809 internal-rootfs-size = (image-du * overhead) + xspace
3810 where:
3811 image-du = Returned value of the du command on the image.
3812 overhead = IMAGE_OVERHEAD_FACTOR
3813 rootfs-size = IMAGE_ROOTFS_SIZE
3814 internal-rootfs-size = Initial root filesystem size before any modifications.
3815 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3816
3817 See the :term:`IMAGE_OVERHEAD_FACTOR`
3818 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3819 variables for related information.
3820
Andrew Geisslerf0343792020-11-18 10:42:21 -06003821 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003822 Specifies a dependency from one image type on another. Here is an
Andrew Geissler517393d2023-01-13 08:55:19 -06003823 example from the :ref:`ref-classes-image-live` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003824
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003825 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003826
3827 In the previous example, the variable ensures that when "live" is
3828 listed with the :term:`IMAGE_FSTYPES` variable,
3829 the OpenEmbedded build system produces an ``ext3`` image first since
3830 one of the components of the live image is an ``ext3`` formatted
3831 partition containing the root filesystem.
3832
Andrew Geisslerf0343792020-11-18 10:42:21 -06003833 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003834 Specifies the complete list of supported image types by default:
3835
3836 - btrfs
3837 - container
3838 - cpio
3839 - cpio.gz
3840 - cpio.lz4
3841 - cpio.lzma
3842 - cpio.xz
3843 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003844 - erofs
3845 - erofs-lz4
3846 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003847 - ext2
3848 - ext2.bz2
3849 - ext2.gz
3850 - ext2.lzma
3851 - ext3
3852 - ext3.gz
3853 - ext4
3854 - ext4.gz
3855 - f2fs
3856 - hddimg
3857 - iso
3858 - jffs2
3859 - jffs2.sum
3860 - multiubi
3861 - squashfs
3862 - squashfs-lz4
3863 - squashfs-lzo
3864 - squashfs-xz
3865 - tar
3866 - tar.bz2
3867 - tar.gz
3868 - tar.lz4
3869 - tar.xz
3870 - tar.zst
3871 - ubi
3872 - ubifs
3873 - wic
3874 - wic.bz2
3875 - wic.gz
3876 - wic.lzma
3877
3878 For more information about these types of images, see
Patrick Williams975a06f2022-10-21 14:42:47 -05003879 ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003880
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003881 :term:`IMAGE_VERSION_SUFFIX`
3882 Version suffix that is part of the default :term:`IMAGE_NAME` and
3883 :term:`KERNEL_ARTIFACT_NAME` values.
3884 Defaults to ``"-${DATETIME}"``, however you could set this to a
3885 version string that comes from your external build environment if
3886 desired, and this suffix would then be used consistently across
3887 the build artifacts.
3888
Andrew Geissler09036742021-06-25 14:25:14 -05003889 :term:`IMGDEPLOYDIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06003890 When inheriting the :ref:`ref-classes-image` class directly or
3891 through the :ref:`ref-classes-core-image` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003892 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003893 that is set in the ``image`` class as follows::
3894
3895 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3896
Andrew Geissler517393d2023-01-13 08:55:19 -06003897 Recipes inheriting the :ref:`ref-classes-image` class should copy
3898 files to be deployed into :term:`IMGDEPLOYDIR`, and the class will take
3899 care of copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
Andrew Geissler09036742021-06-25 14:25:14 -05003900
Andrew Geisslerf0343792020-11-18 10:42:21 -06003901 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003902 Specifies a space-separated list of license names (as they would
3903 appear in :term:`LICENSE`) that should be excluded
3904 from the build. Recipes that provide no alternatives to listed
3905 incompatible licenses are not built. Packages that are individually
3906 licensed with the specified incompatible licenses will be deleted.
3907
Patrick Williams03907ee2022-05-01 06:28:52 -05003908 There is some support for wildcards in this variable's value,
3909 however it is restricted to specific licenses. Currently only
3910 these wildcards are allowed and expand as follows:
3911
3912 - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later``
3913 - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
3914 - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
3915
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003916 .. note::
3917
3918 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003919 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003920
Andrew Geissler9aee5002022-03-30 16:27:02 +00003921 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003922
3923
3924 Although you can use other settings, you might be required to
Patrick Williams975a06f2022-10-21 14:42:47 -05003925 remove dependencies on (or provide alternatives to) components that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003926 are required to produce a functional system image.
3927
Andrew Geissler615f2f12022-07-15 14:00:58 -05003928 :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
3929 Specifies a space-separated list of package and license pairs that
3930 are allowed to be used even if the license is specified in
3931 :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are
3932 separated using a colon. Example::
3933
3934 INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only"
3935
Andrew Geisslerf0343792020-11-18 10:42:21 -06003936 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003937 Causes the named class or classes to be inherited globally. Anonymous
3938 functions in the class or classes are not executed for the base
3939 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003940 system ignores changes to :term:`INHERIT` in individual recipes.
Patrick Williams975a06f2022-10-21 14:42:47 -05003941 Classes inherited using :term:`INHERIT` must be located in the
3942 ``classes-global/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003943
Andrew Geissler09036742021-06-25 14:25:14 -05003944 For more information on :term:`INHERIT`, see the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003945 :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
Andrew Geisslerd5838332022-05-27 11:33:10 -05003946 section in the BitBake User Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003947
Andrew Geisslerf0343792020-11-18 10:42:21 -06003948 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003949 Lists classes that will be inherited at the distribution level. It is
3950 unlikely that you want to edit this variable.
3951
Patrick Williams975a06f2022-10-21 14:42:47 -05003952 Classes specified in :term:`INHERIT_DISTRO` must be located in the
3953 ``classes-global/`` or ``classes/`` subdirectories.
3954
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003955 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003956 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003957
3958 INHERIT_DISTRO ?= "debian devshell sstate license"
3959
Andrew Geisslerf0343792020-11-18 10:42:21 -06003960 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003961 Prevents the default dependencies, namely the C compiler and standard
3962 C library (libc), from being added to :term:`DEPENDS`.
3963 This variable is usually used within recipes that do not require any
3964 compilation using the C compiler.
3965
3966 Set the variable to "1" to prevent the default dependencies from
3967 being added.
3968
Andrew Geisslerf0343792020-11-18 10:42:21 -06003969 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003970 Prevents the OpenEmbedded build system from splitting out debug
3971 information during packaging. By default, the build system splits out
3972 debugging information during the
3973 :ref:`ref-tasks-package` task. For more information on
3974 how debug information is split out, see the
3975 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3976 variable.
3977
3978 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003979 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003980 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003981
3982 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3983
Andrew Geisslerf0343792020-11-18 10:42:21 -06003984 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003985 If set to "1", causes the build to not strip binaries in resulting
3986 packages and prevents the ``-dbg`` package from containing the source
3987 files.
3988
3989 By default, the OpenEmbedded build system strips binaries and puts
3990 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003991 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003992 plan to debug in general.
3993
Andrew Geisslerf0343792020-11-18 10:42:21 -06003994 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003995 If set to "1", causes the build to not strip binaries in the
3996 resulting sysroot.
3997
3998 By default, the OpenEmbedded build system strips binaries in the
3999 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05004000 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004001 this stripping.
4002
Andrew Geissler517393d2023-01-13 08:55:19 -06004003 If you want to use this variable, include the :ref:`ref-classes-staging`
4004 class. This class uses a ``sys_strip()`` function to test for the variable
4005 and acts accordingly.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004006
4007 .. note::
4008
Andrew Geissler09036742021-06-25 14:25:14 -05004009 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004010 special circumstances. For example, suppose you are building
4011 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004012 even if the toolchain's binaries are strippable, there are other files
4013 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004014
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004015 :term:`INIT_MANAGER`
4016 Specifies the system init manager to use. Available options are:
Patrick Williams2194f502022-10-16 14:26:09 -05004017
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004018 - ``sysvinit``
4019 - ``systemd``
4020 - ``mdev-busybox``
Patrick Williams2194f502022-10-16 14:26:09 -05004021
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004022 With ``sysvinit``, the init manager is set to
4023 :wikipedia:`SysVinit <Init#SysV-style>`, the traditional UNIX init
4024 system. This is the default choice in the Poky distribution, together with
4025 the Udev device manager (see the ":ref:`device-manager`" section).
Patrick Williams2194f502022-10-16 14:26:09 -05004026
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004027 With ``systemd``, the init manager becomes :wikipedia:`systemd <Systemd>`,
4028 which comes with the :wikipedia:`udev <Udev>` device manager.
Patrick Williams2194f502022-10-16 14:26:09 -05004029
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004030 With ``mdev-busybox``, the init manager becomes the much simpler BusyBox
4031 init, together with the BusyBox mdev device manager. This is the simplest
4032 and lightest solution, and probably the best choice for low-end systems
4033 with a rather slow CPU and a limited amount of RAM.
Patrick Williams2194f502022-10-16 14:26:09 -05004034
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004035 More concretely, this is used to include
4036 ``conf/distro/include/init-manager-${INIT_MANAGER}.inc`` into the global
4037 configuration. You can have a look at the
4038 :yocto_git:`meta/conf/distro/include/init-manager-*.inc </poky/tree/meta/conf/distro/include>`
4039 files for more information, and also the ":ref:`init-manager`"
Patrick Williams2194f502022-10-16 14:26:09 -05004040 section in the Yocto Project Development Tasks Manual.
4041
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004042 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
Andrew Geissler517393d2023-01-13 08:55:19 -06004043 Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs`
4044 where the :term:`INITRAMFS_IMAGE` will be fetched from. This variable is
4045 set by default to ``${DEPLOY_DIR_IMAGE}`` in the
4046 :ref:`ref-classes-kernel` class and it's only meant to be changed when
4047 building an :term:`Initramfs` image from a separate multiconfig via
4048 :term:`INITRAMFS_MULTICONFIG`.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004049
Andrew Geisslerf0343792020-11-18 10:42:21 -06004050 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004051 Defines the format for the output image of an initial RAM filesystem
Patrick Williams2194f502022-10-16 14:26:09 -05004052 (:term:`Initramfs`), which is used during boot. Supported formats are the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004053 same as those supported by the
4054 :term:`IMAGE_FSTYPES` variable.
4055
4056 The default value of this variable, which is set in the
4057 ``meta/conf/bitbake.conf`` configuration file in the
4058 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
Patrick Williams2194f502022-10-16 14:26:09 -05004059 :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem
Patrick Williams7784c422022-11-17 07:29:11 -06004060 :wikipedia:`initrd <Initrd>` mechanism, expects
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004061 an optionally compressed cpio archive.
4062
Andrew Geisslerf0343792020-11-18 10:42:21 -06004063 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004064 Specifies the :term:`PROVIDES` name of an image
Patrick Williams2194f502022-10-16 14:26:09 -05004065 recipe that is used to build an initial RAM filesystem (:term:`Initramfs`)
Andrew Geissler09036742021-06-25 14:25:14 -05004066 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004067 additional recipe to be built as a dependency to whatever root
4068 filesystem recipe you might be using (e.g. ``core-image-sato``). The
Patrick Williams2194f502022-10-16 14:26:09 -05004069 :term:`Initramfs` image recipe you provide should set
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004070 :term:`IMAGE_FSTYPES` to
4071 :term:`INITRAMFS_FSTYPES`.
4072
Patrick Williams2194f502022-10-16 14:26:09 -05004073 An :term:`Initramfs` image provides a temporary root filesystem used for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004074 early system initialization (e.g. loading of modules needed to locate
4075 and mount the "real" root filesystem).
4076
4077 .. note::
4078
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004079 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
4080 recipe in the :term:`Source Directory`
Patrick Williams2194f502022-10-16 14:26:09 -05004081 for an example :term:`Initramfs` recipe. To select this sample recipe as
4082 the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004083 to "core-image-minimal-initramfs".
4084
4085 You can also find more information by referencing the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004086 ``meta-poky/conf/templates/default/local.conf.sample.extended``
Andrew Geissler517393d2023-01-13 08:55:19 -06004087 configuration file in the Source Directory, the :ref:`ref-classes-image`
4088 class, and the :ref:`ref-classes-kernel` class to see how to use the
4089 :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004090
Andrew Geissler09036742021-06-25 14:25:14 -05004091 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Patrick Williams2194f502022-10-16 14:26:09 -05004092 :term:`Initramfs` image is built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004093
4094 For more information, you can also see the
4095 :term:`INITRAMFS_IMAGE_BUNDLE`
4096 variable, which allows the generated image to be bundled inside the
Patrick Williams2194f502022-10-16 14:26:09 -05004097 kernel image. Additionally, for information on creating an :term:`Initramfs`
Andrew Geissler517393d2023-01-13 08:55:19 -06004098 image, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004099 in the Yocto Project Development Tasks Manual.
4100
Andrew Geisslerf0343792020-11-18 10:42:21 -06004101 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004102 Controls whether or not the image recipe specified by
4103 :term:`INITRAMFS_IMAGE` is run through an
4104 extra pass
4105 (:ref:`ref-tasks-bundle_initramfs`) during
4106 kernel compilation in order to build a single binary that contains
Patrick Williams2194f502022-10-16 14:26:09 -05004107 both the kernel image and the initial RAM filesystem (:term:`Initramfs`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004108 image. This makes use of the
4109 :term:`CONFIG_INITRAMFS_SOURCE` kernel
4110 feature.
4111
4112 .. note::
4113
Patrick Williams2194f502022-10-16 14:26:09 -05004114 Bundling the :term:`Initramfs` with the kernel conflates the code in the
4115 :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
4116 compatible software may be part of a bundled :term:`Initramfs`.
Patrick Williams93c203f2021-10-06 16:15:23 -05004117
4118 .. note::
4119
Patrick Williams2194f502022-10-16 14:26:09 -05004120 Using an extra compilation pass to bundle the :term:`Initramfs` avoids a
4121 circular dependency between the kernel recipe and the :term:`Initramfs`
4122 recipe should the :term:`Initramfs` include kernel modules. Should that be
4123 the case, the :term:`Initramfs` recipe depends on the kernel for the
4124 kernel modules, and the kernel depends on the :term:`Initramfs` recipe
4125 since the :term:`Initramfs` is bundled inside the kernel image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004126
4127 The combined binary is deposited into the ``tmp/deploy`` directory,
4128 which is part of the :term:`Build Directory`.
4129
4130 Setting the variable to "1" in a configuration file causes the
4131 OpenEmbedded build system to generate a kernel image with the
Patrick Williams2194f502022-10-16 14:26:09 -05004132 :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004133
4134 INITRAMFS_IMAGE_BUNDLE = "1"
4135
Andrew Geissler517393d2023-01-13 08:55:19 -06004136 By default, the :ref:`ref-classes-kernel` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004137 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004138
4139 INITRAMFS_IMAGE_BUNDLE ?= ""
4140
4141 .. note::
4142
Andrew Geissler09036742021-06-25 14:25:14 -05004143 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004144 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004145
4146 See the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004147 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004148 file for additional information. Also, for information on creating an
Andrew Geissler517393d2023-01-13 08:55:19 -06004149 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004150 in the Yocto Project Development Tasks Manual.
4151
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004152 :term:`INITRAMFS_IMAGE_NAME`
4153
4154 This value needs to stay in sync with :term:`IMAGE_LINK_NAME`, but with
4155 :term:`INITRAMFS_IMAGE` instead of :term:`IMAGE_BASENAME`. The default value
4156 is set as follows:
4157
4158 INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
4159
4160 That is, if :term:`INITRAMFS_IMAGE` is set, the value of
4161 :term:`INITRAMFS_IMAGE_NAME` will be set based upon
4162 :term:`INITRAMFS_IMAGE` and :term:`IMAGE_MACHINE_SUFFIX`.
4163
4164
Andrew Geisslerf0343792020-11-18 10:42:21 -06004165 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004166 The link name of the initial RAM filesystem image. This variable is
Patrick Williams975a06f2022-10-21 14:42:47 -05004167 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004168 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004169
4170 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
4171
4172 The value of the
4173 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004174 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004175
4176 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4177
4178 See the :term:`MACHINE` variable for additional
4179 information.
4180
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004181 :term:`INITRAMFS_MULTICONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -06004182 Defines the multiconfig to create a multiconfig dependency to be used by
4183 the :ref:`ref-classes-kernel` class.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004184
4185 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
4186 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
4187
Patrick Williams2194f502022-10-16 14:26:09 -05004188 For more information on how to bundle an :term:`Initramfs` image from a separate
Andrew Geissler517393d2023-01-13 08:55:19 -06004189 multiconfig see the ":ref:`dev-manual/building:Bundling an Initramfs Image From a Separate Multiconfig`"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004190 section in the Yocto Project Development Tasks Manual.
4191
Andrew Geisslerf0343792020-11-18 10:42:21 -06004192 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004193 The base name of the initial RAM filesystem image. This variable is
Patrick Williams975a06f2022-10-21 14:42:47 -05004194 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004195 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004196
4197 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
4198
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004199 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004200
Andrew Geisslerf0343792020-11-18 10:42:21 -06004201 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004202 Indicates list of filesystem images to concatenate and use as an
4203 initial RAM disk (``initrd``).
4204
Andrew Geissler09036742021-06-25 14:25:14 -05004205 The :term:`INITRD` variable is an optional variable used with the
Andrew Geissler517393d2023-01-13 08:55:19 -06004206 :ref:`ref-classes-image-live` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004207
Andrew Geisslerf0343792020-11-18 10:42:21 -06004208 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004209 When building a "live" bootable image (i.e. when
4210 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05004211 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004212 provide the initial RAM disk image. The default value is
4213 "core-image-minimal-initramfs".
4214
Andrew Geissler517393d2023-01-13 08:55:19 -06004215 See the :ref:`ref-classes-image-live` class for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004216
Andrew Geisslerf0343792020-11-18 10:42:21 -06004217 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004218 The filename of the initialization script as installed to
4219 ``${sysconfdir}/init.d``.
4220
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004221 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004222 The variable is mandatory.
4223
Andrew Geisslerf0343792020-11-18 10:42:21 -06004224 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004225 A list of the packages that contain initscripts. If multiple packages
4226 are specified, you need to append the package name to the other
4227 ``INITSCRIPT_*`` as an override.
4228
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004229 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004230 The variable is optional and defaults to the :term:`PN`
4231 variable.
4232
Andrew Geisslerf0343792020-11-18 10:42:21 -06004233 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004234 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004235
4236 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
4237
4238 In this example, the script has a runlevel of 99, starts the script
4239 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
4240
4241 The variable's default value is "defaults", which is set in the
Andrew Geissler517393d2023-01-13 08:55:19 -06004242 :ref:`ref-classes-update-rc.d` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004243
Andrew Geissler09036742021-06-25 14:25:14 -05004244 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004245 ``update-rc.d`` command. For more information on valid parameters,
4246 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05004247 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004248
Andrew Geisslerf0343792020-11-18 10:42:21 -06004249 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004250 Specifies the QA checks to skip for a specific package within a
4251 recipe. For example, to skip the check for symbolic link ``.so``
4252 files in the main package of a recipe, add the following to the
4253 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05004254 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004255
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004256 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004257
Andrew Geissler595f6302022-01-24 19:11:47 +00004258 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004259 list of the valid QA checks you can specify using this variable.
4260
Andrew Geisslerf0343792020-11-18 10:42:21 -06004261 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004262 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05004263 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004264 configuration level to disable this behavior.
4265
Andrew Geisslerf0343792020-11-18 10:42:21 -06004266 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004267 When the IPK backend is in use and package management is enabled on
4268 the target, you can use this variable to set up ``opkg`` in the
4269 target image to point to package feeds on a nominated server. Once
4270 the feed is established, you can perform installations or upgrades
4271 using the package manager at runtime.
4272
Andrew Geisslerf0343792020-11-18 10:42:21 -06004273 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004274 Defines the kernel architecture used when assembling the
4275 configuration. Architectures supported for this release are:
4276
4277 - powerpc
4278 - i386
4279 - x86_64
4280 - arm
4281 - qemu
4282 - mips
4283
Andrew Geissler5f350902021-07-23 13:09:54 -04004284 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004285
Andrew Geisslerf0343792020-11-18 10:42:21 -06004286 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004287 A regular expression used by the build process to explicitly identify
4288 the kernel branch that is validated, patched, and configured during a
4289 build. You must set this variable to ensure the exact kernel branch
4290 you want is being used by the build process.
4291
4292 Values for this variable are set in the kernel's recipe file and the
4293 kernel's append file. For example, if you are using the
4294 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05004295 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004296 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004297
4298 KBRANCH ?= "standard/base"
4299
4300 This variable is also used from the kernel's append file to identify
4301 the kernel branch specific to a particular machine or target
4302 hardware. Continuing with the previous kernel example, the kernel's
4303 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
4304 BSP layer for a given machine. For example, the append file for the
4305 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
4306 machines (``meta-yocto-bsp``) is named
4307 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004308 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004309
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004310 KBRANCH:genericx86 = "standard/base"
4311 KBRANCH:genericx86-64 = "standard/base"
4312 KBRANCH:edgerouter = "standard/edgerouter"
4313 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004314
Andrew Geissler09036742021-06-25 14:25:14 -05004315 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004316 identify the kernel branch to use when building for each supported
4317 BSP.
4318
Andrew Geisslerf0343792020-11-18 10:42:21 -06004319 :term:`KBUILD_DEFCONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -06004320 When used with the :ref:`ref-classes-kernel-yocto`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004321 class, specifies an "in-tree" kernel configuration file for use
4322 during a kernel build.
4323
4324 Typically, when using a ``defconfig`` to configure a kernel during a
4325 build, you place the file in your layer in the same manner as you
4326 would place patch files and configuration fragment files (i.e.
4327 "out-of-tree"). However, if you want to use a ``defconfig`` file that
4328 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05004329 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004330 :term:`KMACHINE` variable to point to the
4331 ``defconfig`` file.
4332
4333 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05004334 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004335
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004336 KBUILD_DEFCONFIG:<machine> ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004337
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004338 Here is an example from a "raspberrypi2" :term:`MACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05004339 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004340
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004341 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004342
Andrew Geisslerc926e172021-05-07 16:11:35 -05004343 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004344
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004345 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004346
4347 For more
Andrew Geissler09036742021-06-25 14:25:14 -05004348 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004349 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004350 section in the Yocto Project Linux Kernel Development Manual.
4351
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004352 :term:`KCONFIG_MODE`
Andrew Geissler517393d2023-01-13 08:55:19 -06004353 When used with the :ref:`ref-classes-kernel-yocto`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004354 class, specifies the kernel configuration values to use for options
4355 not specified in the provided ``defconfig`` file. Valid options are::
4356
4357 KCONFIG_MODE = "alldefconfig"
4358 KCONFIG_MODE = "allnoconfig"
4359
4360 In ``alldefconfig`` mode the options not explicitly specified will be
4361 assigned their Kconfig default value. In ``allnoconfig`` mode the
4362 options not explicitly specified will be disabled in the kernel
4363 config.
4364
Andrew Geissler09036742021-06-25 14:25:14 -05004365 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004366 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
4367 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
4368 in ``${WORKDIR}`` through a meta-layer will be handled in
4369 ``allnoconfig`` mode.
4370
4371 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05004372 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004373 be explicitly set.
4374
4375 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
4376 generated by copying the ``.config`` file from a working Linux kernel
4377 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05004378 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004379 not need to be explicitly set.
4380
4381 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
4382 generated using the
4383 :ref:`ref-tasks-savedefconfig`
4384 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05004385 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004386
4387 KCONFIG_MODE = "alldefconfig"
4388
Andrew Geisslerf0343792020-11-18 10:42:21 -06004389 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004390 Specifies an alternate kernel image type for creation in addition to
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004391 the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and
4392 :term:`KERNEL_IMAGETYPES` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004393
Andrew Geisslerf0343792020-11-18 10:42:21 -06004394 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004395 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05004396 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004397 variable.
4398
Andrew Geissler09036742021-06-25 14:25:14 -05004399 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004400 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004401 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004402
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004403 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004404
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004405 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`IMAGE_MACHINE_SUFFIX`
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004406 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004407
Andrew Geisslerf0343792020-11-18 10:42:21 -06004408 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004409 A list of classes defining kernel image types that the
Andrew Geissler517393d2023-01-13 08:55:19 -06004410 :ref:`ref-classes-kernel` class should inherit. You typically
4411 append this variable to enable extended image types. An example is
4412 ":ref:`ref-classes-kernel-fitimage`", which enables
Patrick Williamsb542dec2023-06-09 01:26:37 -05004413 FIT image support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``.
Andrew Geissler517393d2023-01-13 08:55:19 -06004414 You can register custom kernel image types with the
4415 :ref:`ref-classes-kernel` class using this variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004416
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004417 :term:`KERNEL_DANGLING_FEATURES_WARN_ONLY`
4418 When kernel configuration fragments are missing for some
4419 :term:`KERNEL_FEATURES` specified by layers or BSPs,
4420 building and configuring the kernel stops with an error.
4421
4422 You can turn these errors into warnings by setting the
4423 following in ``conf/local.conf``::
4424
4425 KERNEL_DANGLING_FEATURES_WARN_ONLY = "1"
4426
4427 You will still be warned that runtime issues may occur,
4428 but at least the kernel configuration and build process will
4429 be allowed to continue.
4430
Patrick Williams03907ee2022-05-01 06:28:52 -05004431 :term:`KERNEL_DEBUG_TIMESTAMPS`
4432 If set to "1", enables timestamping functionality during building
4433 the kernel. The default is "0" to disable this for reproducibility
4434 reasons.
4435
Patrick Williams975a06f2022-10-21 14:42:47 -05004436 :term:`KERNEL_DEPLOY_DEPEND`
4437 Provides a means of controlling the dependency of an image recipe
4438 on the kernel. The default value is "virtual/kernel:do_deploy",
4439 however for a small initramfs image or other images that do not
4440 need the kernel, this can be set to "" in the image recipe.
4441
Andrew Geisslerf0343792020-11-18 10:42:21 -06004442 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004443 Specifies the name of the generated Linux kernel device tree (i.e.
4444 the ``.dtb``) file.
4445
4446 .. note::
4447
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004448 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004449 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004450
Andrew Geissler517393d2023-01-13 08:55:19 -06004451 In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
4452 class must be inherited.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004453
Patrick Williamsb542dec2023-06-09 01:26:37 -05004454 :term:`KERNEL_DEVICETREE_BUNDLE`
4455 When set to "1", this variable allows to bundle the Linux kernel
4456 and the Device Tree Binary together in a single file.
4457
4458 This feature is currently only supported on the "arm" (32 bit)
4459 architecture.
4460
4461 This variable is set to "0" by default by the
4462 :ref:`ref-classes-kernel-devicetree` class.
4463
Andrew Geisslerf0343792020-11-18 10:42:21 -06004464 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004465 The link name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004466 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004467 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004468
4469 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4470
4471 The
4472 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004473 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004474
4475 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4476
4477 See the :term:`MACHINE` variable for additional
4478 information.
4479
Andrew Geisslerf0343792020-11-18 10:42:21 -06004480 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004481 The base name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004482 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004483 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004484
4485 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4486
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004487 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004488
Patrick Williamsb542dec2023-06-09 01:26:37 -05004489 :term:`KERNEL_DTBDEST`
4490 This variable, used by the :ref:`ref-classes-kernel-devicetree`
4491 class, allows to change the installation directory of the DTB
4492 (Device Tree Binary) files.
4493
4494 It is set by default to "${KERNEL_IMAGEDEST}" by the
4495 :ref:`ref-classes-kernel` class.
4496
4497 :term:`KERNEL_DTBVENDORED`
4498 This variable, used by the :ref:`ref-classes-kernel-devicetree`,
4499 allows to ignore vendor subdirectories when installing DTB
4500 (Device Tree Binary) files, when it is set to "false".
4501
4502 To keep vendor subdirectories, set this variable to "true".
4503
4504 It is set by default to "false" by the :ref:`ref-classes-kernel` class.
4505
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004506 :term:`KERNEL_DTC_FLAGS`
4507 Specifies the ``dtc`` flags that are passed to the Linux kernel build
4508 system when generating the device trees (via ``DTC_FLAGS`` environment
4509 variable).
4510
Andrew Geissler517393d2023-01-13 08:55:19 -06004511 In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
4512 class must be inherited.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004513
Andrew Geisslerf0343792020-11-18 10:42:21 -06004514 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004515 Specifies additional ``make`` command-line arguments the OpenEmbedded
4516 build system passes on when compiling the kernel.
4517
Andrew Geisslerf0343792020-11-18 10:42:21 -06004518 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004519 Includes additional kernel metadata. In the OpenEmbedded build
4520 system, the default Board Support Packages (BSPs)
4521 :term:`Metadata` is provided through the
4522 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004523 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004524 the kernel recipe or kernel append file to further add metadata for
4525 all BSPs or specific BSPs.
4526
4527 The metadata you add through this variable includes config fragments
4528 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004529 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004530 variable for a specific machine. In this way, you can provide
4531 validated, but optional, sets of kernel configurations and features.
4532
4533 For example, the following example from the ``linux-yocto-rt_4.12``
4534 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4535 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004536 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004537
4538 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004539 KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
4540 KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc"
4541 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4542 KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004543
Andrew Geisslerf0343792020-11-18 10:42:21 -06004544 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004545 The link name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004546 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004547 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004548
4549 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4550
4551 The value of the
4552 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004553 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004554
4555 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4556
4557 See the :term:`MACHINE` variable for additional
4558 information.
4559
Andrew Geisslerf0343792020-11-18 10:42:21 -06004560 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004561 The base name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004562 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004563 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004564
4565 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4566
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004567 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004568
Andrew Geisslerf0343792020-11-18 10:42:21 -06004569 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004570 The link name for the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004571 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004572
4573 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4574
4575 The value of
4576 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004577 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004578
4579 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4580
4581 See the :term:`MACHINE` variable for additional
4582 information.
4583
Andrew Geisslerf0343792020-11-18 10:42:21 -06004584 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004585 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004586 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004587 checked against the set value during the
4588 :ref:`ref-tasks-sizecheck` task. The task fails if
4589 the kernel image file is larger than the setting.
4590
Andrew Geissler09036742021-06-25 14:25:14 -05004591 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004592 limited amount of space in which the kernel image must be stored.
4593
4594 By default, this variable is not set, which means the size of the
4595 kernel image is not checked.
4596
Andrew Geisslerf0343792020-11-18 10:42:21 -06004597 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004598 The base name of the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004599 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004600
4601 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4602
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004603 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004604
Andrew Geisslerf0343792020-11-18 10:42:21 -06004605 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004606 The type of kernel to build for a device, usually set by the machine
4607 configuration files and defaults to "zImage". This variable is used
4608 when building the kernel and is passed to ``make`` as the target to
4609 build.
4610
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004611 To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
4612
4613 :term:`KERNEL_IMAGETYPES`
4614 Lists additional types of kernel images to build for a device in addition
4615 to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
4616 machine configuration files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004617
Andrew Geisslerf0343792020-11-18 10:42:21 -06004618 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004619 Lists kernel modules that need to be auto-loaded during boot.
4620
4621 .. note::
4622
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004623 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004624 variable.
4625
Andrew Geissler09036742021-06-25 14:25:14 -05004626 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004627 can be recognized by the kernel recipe or by an out-of-tree kernel
4628 module recipe (e.g. a machine configuration file, a distribution
4629 configuration file, an append file for the recipe, or the recipe
4630 itself).
4631
Andrew Geisslerc926e172021-05-07 16:11:35 -05004632 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004633
4634 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4635
Andrew Geissler09036742021-06-25 14:25:14 -05004636 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004637 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4638 the list of modules to be auto-loaded on boot. The modules appear
4639 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004640 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004641
4642 KERNEL_MODULE_AUTOLOAD += "module_name"
4643
4644 For information on how to populate the ``modname.conf`` file with
4645 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4646
Andrew Geisslerf0343792020-11-18 10:42:21 -06004647 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004648 Provides a list of modules for which the OpenEmbedded build system
4649 expects to find ``module_conf_``\ modname values that specify
4650 configuration for each of the modules. For information on how to
4651 provide those module configurations, see the
4652 :term:`module_conf_* <module_conf>` variable.
4653
Patrick Williamsb542dec2023-06-09 01:26:37 -05004654 :term:`KERNEL_PACKAGE_NAME`
4655 Specifies the base name of the kernel packages, such as "kernel"
4656 in the kernel packages such as "kernel-modules", "kernel-image" and
4657 "kernel-dbg".
4658
4659 The default value for this variable is set to "kernel" by the
4660 :ref:`ref-classes-kernel` class.
4661
Andrew Geisslerf0343792020-11-18 10:42:21 -06004662 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004663 The location of the kernel sources. This variable is set to the value
Andrew Geissler517393d2023-01-13 08:55:19 -06004664 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
4665 class. For information on how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004666 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004667 section in the Yocto Project Linux Kernel Development Manual.
4668
4669 To help maximize compatibility with out-of-tree drivers used to build
4670 modules, the OpenEmbedded build system also recognizes and uses the
4671 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004672 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004673 used by external Makefiles to point to the kernel source directory.
4674
Andrew Geisslerf0343792020-11-18 10:42:21 -06004675 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004676 The location of the kernel sources. This variable is set to the value
Andrew Geissler517393d2023-01-13 08:55:19 -06004677 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
4678 class. For information on how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004679 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004680 section in the Yocto Project Linux Kernel Development Manual.
4681
4682 To help maximize compatibility with out-of-tree drivers used to build
4683 modules, the OpenEmbedded build system also recognizes and uses the
4684 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004685 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004686 used by external Makefiles to point to the kernel source directory.
4687
Andrew Geisslerf0343792020-11-18 10:42:21 -06004688 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004689 Specifies the version of the kernel as extracted from ``version.h``
4690 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004691 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004692 configured. Consequently, attempting to refer to this variable in
4693 contexts prior to configuration will not work.
4694
Andrew Geisslerf0343792020-11-18 10:42:21 -06004695 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004696 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004697 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004698 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004699 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004700 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Patrick Williams2194f502022-10-16 14:26:09 -05004701 :term:`Initramfs` recipe. Setting the variable there when the data is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004702 needed avoids a potential dependency loop.
4703
Andrew Geisslerf0343792020-11-18 10:42:21 -06004704 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004705 Provides a short description of a configuration fragment. You use
4706 this variable in the ``.scc`` file that describes a configuration
4707 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004708 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004709
4710 define KFEATURE_DESCRIPTION "Enable SMP"
4711
Andrew Geisslerf0343792020-11-18 10:42:21 -06004712 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004713 The machine as known by the kernel. Sometimes the machine name used
4714 by the kernel does not match the machine name used by the
4715 OpenEmbedded build system. For example, the machine name that the
4716 OpenEmbedded build system understands as ``core2-32-intel-common``
4717 goes by a different name in the Linux Yocto kernel. The kernel
4718 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004719 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004720 OpenEmbedded build system machine name.
4721
4722 These mappings between different names occur in the Yocto Linux
4723 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004724 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004725
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004726 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4727 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4728 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4729 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4730 KMACHINE:core2-32-intel-common = "intel-core2-32"
4731 KBRANCH:core2-32-intel-common = "standard/base"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004732 KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004733
Andrew Geissler09036742021-06-25 14:25:14 -05004734 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004735 that the kernel understands the machine name as "intel-core2-32".
4736 However, the OpenEmbedded build system understands the machine as
4737 "core2-32-intel-common".
4738
Andrew Geisslerf0343792020-11-18 10:42:21 -06004739 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004740 Defines the kernel type to be used in assembling the configuration.
4741 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004742 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004743 section in the
4744 Yocto Project Linux Kernel Development Manual for more information on
4745 kernel types.
4746
Andrew Geissler09036742021-06-25 14:25:14 -05004747 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004748 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004749 value you use must match the value used for the
4750 :term:`LINUX_KERNEL_TYPE` value used by the
4751 kernel recipe.
4752
Andrew Geisslerf0343792020-11-18 10:42:21 -06004753 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004754 Provides a list of targets for automatic configuration.
4755
Andrew Geissler517393d2023-01-13 08:55:19 -06004756 See the :ref:`ref-classes-grub-efi` class for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004757 information on how this variable is used.
4758
Andrew Geisslerf0343792020-11-18 10:42:21 -06004759 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004760 Lists the layers, separated by spaces, on which this recipe depends.
4761 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004762 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004763
4764 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4765
4766 In this previous example,
4767 version 3 of "anotherlayer" is compared against
4768 :term:`LAYERVERSION`\ ``_anotherlayer``.
4769
4770 An error is produced if any dependency is missing or the version
4771 numbers (if specified) do not match exactly. This variable is used in
4772 the ``conf/layer.conf`` file and must be suffixed with the name of
4773 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4774
Andrew Geisslerf0343792020-11-18 10:42:21 -06004775 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004776 When used inside the ``layer.conf`` configuration file, this variable
4777 provides the path of the current layer. This variable is not
4778 available outside of ``layer.conf`` and references are expanded
4779 immediately when parsing of the file completes.
4780
Andrew Geissler517393d2023-01-13 08:55:19 -06004781 :term:`LAYERDIR_RE`
4782 See :term:`bitbake:LAYERDIR_RE` in the BitBake manual.
4783
Andrew Geisslerf0343792020-11-18 10:42:21 -06004784 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004785 Lists the layers, separated by spaces, recommended for use with this
4786 layer.
4787
4788 Optionally, you can specify a specific layer version for a
4789 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004790 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004791
4792 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4793
4794 In this previous example, version 3 of "anotherlayer" is compared
4795 against ``LAYERVERSION_anotherlayer``.
4796
4797 This variable is used in the ``conf/layer.conf`` file and must be
4798 suffixed with the name of the specific layer (e.g.
4799 ``LAYERRECOMMENDS_mylayer``).
4800
Andrew Geisslerf0343792020-11-18 10:42:21 -06004801 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05004802 See :term:`bitbake:LAYERSERIES_COMPAT` in the BitBake manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004803
Andrew Geisslerf0343792020-11-18 10:42:21 -06004804 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004805 Optionally specifies the version of a layer as a single number. You
4806 can use this within :term:`LAYERDEPENDS` for
4807 another layer in order to depend on a specific version of the layer.
4808 This variable is used in the ``conf/layer.conf`` file and must be
4809 suffixed with the name of the specific layer (e.g.
4810 ``LAYERVERSION_mylayer``).
4811
Andrew Geisslerf0343792020-11-18 10:42:21 -06004812 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004813 The minimal command and arguments used to run the linker.
4814
Andrew Geisslerf0343792020-11-18 10:42:21 -06004815 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004816 Specifies the flags to pass to the linker. This variable is exported
4817 to an environment variable and thus made visible to the software
4818 being built during the compilation step.
4819
Andrew Geissler09036742021-06-25 14:25:14 -05004820 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004821 being built:
4822
4823 - :term:`TARGET_LDFLAGS` when building for the
4824 target
4825
4826 - :term:`BUILD_LDFLAGS` when building for the
4827 build host (i.e. ``-native``)
4828
4829 - :term:`BUILDSDK_LDFLAGS` when building for
4830 an SDK (i.e. ``nativesdk-``)
4831
Andrew Geisslerf0343792020-11-18 10:42:21 -06004832 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004833 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
Andrew Geissler517393d2023-01-13 08:55:19 -06004834 that the :ref:`ref-classes-debian` class applies its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004835 naming policy to given a recipe that packages multiple libraries.
4836
Andrew Geissler517393d2023-01-13 08:55:19 -06004837 This variable works in conjunction with the :ref:`ref-classes-debian`
4838 class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004839
Andrew Geisslerf0343792020-11-18 10:42:21 -06004840 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004841 Checksums of the license text in the recipe source code.
4842
4843 This variable tracks changes in license text of the source code
4844 files. If the license text is changed, it will trigger a build
4845 failure, which gives the developer an opportunity to review any
4846 license change.
4847
4848 This variable must be defined for all recipes (unless
4849 :term:`LICENSE` is set to "CLOSED").
4850
Andrew Geissler517393d2023-01-13 08:55:19 -06004851 For more information, see the ":ref:`dev-manual/licenses:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004852 section in the Yocto Project Development Tasks Manual.
4853
Andrew Geisslerf0343792020-11-18 10:42:21 -06004854 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004855 The list of source licenses for the recipe. Follow these rules:
4856
4857 - Do not use spaces within individual license names.
4858
4859 - Separate license names using \| (pipe) when there is a choice
4860 between licenses.
4861
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004862 - Separate license names using & (ampersand) when there are
4863 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004864
4865 - You can use spaces between license names.
4866
4867 - For standard licenses, use the names of the files in
4868 ``meta/files/common-licenses/`` or the
4869 :term:`SPDXLICENSEMAP` flag names defined in
4870 ``meta/conf/licenses.conf``.
4871
Andrew Geisslerc926e172021-05-07 16:11:35 -05004872 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004873
Andrew Geissler9aee5002022-03-30 16:27:02 +00004874 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4875 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4876 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004877
4878 The first example is from the
4879 recipes for Qt, which the user may choose to distribute under either
4880 the LGPL version 2.1 or GPL version 3. The second example is from
4881 Cairo where two licenses cover different parts of the source code.
4882 The final example is from ``sysstat``, which presents a single
4883 license.
4884
4885 You can also specify licenses on a per-package basis to handle
4886 situations where components of the output have different licenses.
4887 For example, a piece of software whose code is licensed under GPLv2
4888 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004889 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004890
Andrew Geissler9aee5002022-03-30 16:27:02 +00004891 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4892 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004893 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004894
Andrew Geisslerf0343792020-11-18 10:42:21 -06004895 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004896 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004897 build system to create an extra package (i.e.
4898 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4899 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004900 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004901
4902 The ``${PN}-lic`` package installs a directory in
4903 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4904 name, and installs files in that directory that contain license and
4905 copyright information (i.e. copies of the appropriate license files
4906 from ``meta/common-licenses`` that match the licenses specified in
4907 the :term:`LICENSE` variable of the recipe metadata
4908 and copies of files marked in
4909 :term:`LIC_FILES_CHKSUM` as containing
4910 license text).
4911
4912 For related information on providing license text, see the
4913 :term:`COPY_LIC_DIRS` variable, the
4914 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler517393d2023-01-13 08:55:19 -06004915 ":ref:`dev-manual/licenses:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004916 section in the Yocto Project Development Tasks Manual.
4917
Andrew Geisslerf0343792020-11-18 10:42:21 -06004918 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004919 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00004920 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004921 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004922 separate them with spaces.
4923
4924 This value is independent of :term:`LICENSE` and is
4925 typically used to mark recipes that might require additional licenses
4926 in order to be used in a commercial product. For more information,
4927 see the
Andrew Geissler517393d2023-01-13 08:55:19 -06004928 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004929 section in the Yocto Project Development Tasks Manual.
4930
Andrew Geissler9aee5002022-03-30 16:27:02 +00004931 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004932 Lists license flags that when specified in
4933 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004934 prevent that recipe from being built. For more information, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06004935 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004936 section in the Yocto Project Development Tasks Manual.
4937
Andrew Geisslerf0343792020-11-18 10:42:21 -06004938 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004939 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004940 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004941 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004942 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004943 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004944
4945 LICENSE_PATH += "path-to-additional-common-licenses"
4946
Andrew Geisslerf0343792020-11-18 10:42:21 -06004947 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004948 Defines the kernel type to be used in assembling the configuration.
4949 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004950 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004951 section in the
4952 Yocto Project Linux Kernel Development Manual for more information on
4953 kernel types.
4954
Andrew Geissler09036742021-06-25 14:25:14 -05004955 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004956 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004957 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004958 the kernel tools to find the appropriate description within the
4959 kernel :term:`Metadata` with which to build out the sources
4960 and configuration.
4961
Andrew Geisslerf0343792020-11-18 10:42:21 -06004962 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004963 The Linux version from ``kernel.org`` on which the Linux kernel image
4964 being built using the OpenEmbedded build system is based. You define
4965 this variable in the kernel recipe. For example, the
4966 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004967 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004968
4969 LINUX_VERSION ?= "3.4.24"
4970
Andrew Geissler09036742021-06-25 14:25:14 -05004971 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004972 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004973
4974 PV = "${LINUX_VERSION}+git${SRCPV}"
4975
Andrew Geisslerf0343792020-11-18 10:42:21 -06004976 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004977 A string extension compiled into the version string of the Linux
4978 kernel built with the OpenEmbedded build system. You define this
4979 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004980 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004981
4982 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4983
4984 Defining this variable essentially sets the Linux kernel
4985 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4986 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004987 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004988
4989 $ uname -r
4990 3.7.0-rc8-custom
4991
Andrew Geisslerf0343792020-11-18 10:42:21 -06004992 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004993 Specifies the directory to which the OpenEmbedded build system writes
4994 overall log files. The default directory is ``${TMPDIR}/log``.
4995
4996 For the directory containing logs specific to each task, see the
4997 :term:`T` variable.
4998
Andrew Geisslerf0343792020-11-18 10:42:21 -06004999 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005000 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05005001 :term:`MACHINE` in the ``local.conf`` file found in the
5002 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005003 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05005004 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005005
5006 MACHINE ?= "qemux86"
5007
5008 The variable corresponds to a machine configuration file of the same
5009 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05005010 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005011 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005012 the :term:`Source Directory` in
5013 ``meta/conf/machine``.
5014
5015 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05005016 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005017
5018 MACHINE ?= "qemuarm"
5019 MACHINE ?= "qemuarm64"
5020 MACHINE ?= "qemumips"
5021 MACHINE ?= "qemumips64"
5022 MACHINE ?= "qemuppc"
5023 MACHINE ?= "qemux86"
5024 MACHINE ?= "qemux86-64"
5025 MACHINE ?= "genericx86"
5026 MACHINE ?= "genericx86-64"
5027 MACHINE ?= "beaglebone"
5028 MACHINE ?= "edgerouter"
5029
5030 The last five are Yocto Project reference hardware
5031 boards, which are provided in the ``meta-yocto-bsp`` layer.
5032
5033 .. note::
5034
5035 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05005036 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005037
Andrew Geisslerf0343792020-11-18 10:42:21 -06005038 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005039 Specifies the name of the machine-specific architecture. This
5040 variable is set automatically from :term:`MACHINE` or
5041 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05005042 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005043
Andrew Geisslerf0343792020-11-18 10:42:21 -06005044 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005045 A list of required machine-specific packages to install as part of
5046 the image being built. The build process depends on these packages
5047 being present. Furthermore, because this is a "machine-essential"
5048 variable, the list of packages are essential for the machine to boot.
5049 The impact of this variable affects images based on
5050 ``packagegroup-core-boot``, including the ``core-image-minimal``
5051 image.
5052
5053 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05005054 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005055 that the image being built has a build dependency on the variable's
5056 list of packages. In other words, the image will not build if a file
5057 in this list is not found.
5058
5059 As an example, suppose the machine for which you are building
5060 requires ``example-init`` to be run during boot to initialize the
5061 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05005062 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005063
5064 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
5065
Andrew Geisslerf0343792020-11-18 10:42:21 -06005066 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005067 A list of recommended machine-specific packages to install as part of
5068 the image being built. The build process does not depend on these
5069 packages being present. However, because this is a
5070 "machine-essential" variable, the list of packages are essential for
5071 the machine to boot. The impact of this variable affects images based
5072 on ``packagegroup-core-boot``, including the ``core-image-minimal``
5073 image.
5074
Andrew Geissler09036742021-06-25 14:25:14 -05005075 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005076 variable with the exception that the image being built does not have
5077 a build dependency on the variable's list of packages. In other
5078 words, the image will still build if a package in this list is not
5079 found. Typically, this variable is used to handle essential kernel
5080 modules, whose functionality may be selected to be built into the
5081 kernel rather than as a module, in which case a package will not be
5082 produced.
5083
5084 Consider an example where you have a custom kernel where a specific
5085 touchscreen driver is required for the machine to be usable. However,
5086 the driver can be built as a module or into the kernel depending on
5087 the kernel configuration. If the driver is built as a module, you
5088 want it to be installed. But, when the driver is built into the
5089 kernel, you still want the build to succeed. This variable sets up a
5090 "recommends" relationship so that in the latter case, the build will
5091 not fail due to the missing package. To accomplish this, assuming the
5092 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05005093 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005094
5095 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
5096
5097 .. note::
5098
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005099 In this example, the ``kernel-module-ab123`` recipe needs to
5100 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
5101 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
5102 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005103
5104 Some examples of these machine essentials are flash, screen,
5105 keyboard, mouse, or touchscreen drivers (depending on the machine).
5106
Andrew Geisslerf0343792020-11-18 10:42:21 -06005107 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005108 A list of machine-specific packages to install as part of the image
5109 being built that are not essential for the machine to boot. However,
5110 the build process for more fully-featured images depends on the
5111 packages being present.
5112
5113 This variable affects all images based on ``packagegroup-base``,
5114 which does not include the ``core-image-minimal`` or
5115 ``core-image-full-cmdline`` images.
5116
Andrew Geissler09036742021-06-25 14:25:14 -05005117 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005118 with the exception that the image being built has a build dependency
5119 on the variable's list of packages. In other words, the image will
5120 not build if a file in this list is not found.
5121
5122 An example is a machine that has WiFi capability but is not essential
5123 for the machine to boot the image. However, if you are building a
5124 more fully-featured image, you want to enable the WiFi. The package
5125 containing the firmware for the WiFi hardware is always expected to
5126 exist, so it is acceptable for the build process to depend upon
5127 finding the package. In this case, assuming the package for the
5128 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005129 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005130
5131 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
5132
Andrew Geisslerf0343792020-11-18 10:42:21 -06005133 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005134 A list of machine-specific packages to install as part of the image
5135 being built that are not essential for booting the machine. The image
5136 being built has no build dependency on this list of packages.
5137
5138 This variable affects only images based on ``packagegroup-base``,
5139 which does not include the ``core-image-minimal`` or
5140 ``core-image-full-cmdline`` images.
5141
Andrew Geissler09036742021-06-25 14:25:14 -05005142 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005143 with the exception that the image being built does not have a build
5144 dependency on the variable's list of packages. In other words, the
5145 image will build if a file in this list is not found.
5146
5147 An example is a machine that has WiFi capability but is not essential
5148 For the machine to boot the image. However, if you are building a
5149 more fully-featured image, you want to enable WiFi. In this case, the
5150 package containing the WiFi kernel module will not be produced if the
5151 WiFi driver is built into the kernel, in which case you still want
5152 the build to succeed instead of failing as a result of the package
5153 not being found. To accomplish this, assuming the package for the
5154 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005155 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005156
5157 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
5158
Andrew Geisslerf0343792020-11-18 10:42:21 -06005159 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005160 Specifies the list of hardware features the
5161 :term:`MACHINE` is capable of supporting. For related
5162 information on enabling features, see the
5163 :term:`DISTRO_FEATURES`,
5164 :term:`COMBINED_FEATURES`, and
5165 :term:`IMAGE_FEATURES` variables.
5166
5167 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005168 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005169
Andrew Geisslerf0343792020-11-18 10:42:21 -06005170 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005171 A list of space-separated features to be added to
5172 :term:`MACHINE_FEATURES` if not also present in
Andrew Geissler09036742021-06-25 14:25:14 -05005173 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005174
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005175 This variable is set in the ``meta/conf/bitbake.conf`` file. It is not
5176 intended to be user-configurable. It is best to just reference the
5177 variable to see which machine features are being
5178 :ref:`backfilled <ref-features-backfill>` for all machine configurations.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005179
Andrew Geisslerf0343792020-11-18 10:42:21 -06005180 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005181 A list of space-separated features from :term:`MACHINE_FEATURES_BACKFILL`
5182 that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added
5183 to :term:`MACHINE_FEATURES`) during the build.
5184
5185 This corresponds to an opt-out mechanism. When new default machine
5186 features are introduced, machine definition maintainers can review
5187 (`consider`) them and decide to exclude them from the
5188 :ref:`backfilled <ref-features-backfill>` features. Therefore, the
5189 combination of :term:`MACHINE_FEATURES_BACKFILL` and
5190 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` makes it possible to
5191 add new default features without breaking existing machine definitions.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005192
Andrew Geisslerf0343792020-11-18 10:42:21 -06005193 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005194 A colon-separated list of overrides that apply to the current
5195 machine. By default, this list includes the value of
5196 :term:`MACHINE`.
5197
Andrew Geissler09036742021-06-25 14:25:14 -05005198 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005199 should apply to a machine. For example, all machines emulated in QEMU
5200 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
5201 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05005202 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005203
5204 MACHINEOVERRIDES =. "qemuall:"
5205
5206 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005207 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005208 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005209 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005210
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005211 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005212 file://wired-setup \
5213 "
5214
5215 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05005216 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005217 value of :term:`OVERRIDES`.
5218
Andrew Geisslerf0343792020-11-18 10:42:21 -06005219 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005220 The email address of the distribution maintainer.
5221
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06005222 :term:`MESON_BUILDTYPE`
5223 Value of the Meson ``--buildtype`` argument used by the
5224 :ref:`ref-classes-meson` class. It defaults to ``debug`` if
5225 :term:`DEBUG_BUILD` is set to "1", and ``plain`` otherwise.
5226
5227 See `Meson build options <https://mesonbuild.com/Builtin-options.html>`__
5228 for the values you could set in a recipe. Values such as ``plain``,
5229 ``debug``, ``debugoptimized``, ``release`` and ``minsize`` allow
5230 you to specify the inclusion of debugging symbols and the compiler
5231 optimizations (none, performance or size).
5232
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005233 :term:`METADATA_BRANCH`
5234 The branch currently checked out for the OpenEmbedded-Core layer (path
5235 determined by :term:`COREBASE`).
5236
5237 :term:`METADATA_REVISION`
5238 The revision currently checked out for the OpenEmbedded-Core layer (path
5239 determined by :term:`COREBASE`).
5240
Patrick Williams7784c422022-11-17 07:29:11 -06005241 :term:`MIME_XDG_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06005242 The current implementation of the :ref:`ref-classes-mime-xdg`
Patrick Williams7784c422022-11-17 07:29:11 -06005243 class cannot detect ``.desktop`` files installed through absolute
5244 symbolic links. Use this setting to make the class create post-install
5245 and post-remove scripts for these packages anyway, to invoke the
5246 ``update-destop-database`` command.
5247
Andrew Geisslerf0343792020-11-18 10:42:21 -06005248 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005249 Specifies additional paths from which the OpenEmbedded build system
5250 gets source code. When the build system searches for source code, it
5251 first tries the local download directory. If that location fails, the
5252 build system tries locations defined by
5253 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05005254 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005255
5256 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005257 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005258 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5259
Andrew Geisslerf0343792020-11-18 10:42:21 -06005260 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005261 Specifies a prefix has been added to :term:`PN` to create a
5262 special version of a recipe or package (i.e. a Multilib version). The
5263 variable is used in places where the prefix needs to be added to or
Andrew Geisslerc5535c92023-01-27 16:10:19 -06005264 removed from a name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05005265 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005266
5267 .. note::
5268
Andrew Geissler517393d2023-01-13 08:55:19 -06005269 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation
5270 is historical and comes from a time when ":ref:`ref-classes-nativesdk`"
5271 was a suffix rather than a prefix on the recipe name. When
5272 ":ref:`ref-classes-nativesdk`" was turned into a prefix, it made sense
5273 to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005274
Andrew Geissler09036742021-06-25 14:25:14 -05005275 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geissler517393d2023-01-13 08:55:19 -06005276 :term:`BBCLASSEXTEND` is used to provide a :ref:`ref-classes-nativesdk`
5277 version of a recipe in addition to the target version. If that recipe
5278 declares build-time dependencies on tasks in other recipes by using
5279 :term:`DEPENDS`, then a dependency on "foo" will automatically get
5280 rewritten to a dependency on "nativesdk-foo". However, dependencies like
5281 the following will not get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005282
5283 do_foo[depends] += "recipe:do_foo"
5284
5285 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005286 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005287
5288 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
5289
Andrew Geissler09036742021-06-25 14:25:14 -05005290 :term:`module_autoload`
5291 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04005292 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05005293 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005294
5295 module_autoload_rfcomm = "rfcomm"
5296
Andrew Geisslerc926e172021-05-07 16:11:35 -05005297 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005298
5299 KERNEL_MODULE_AUTOLOAD += "rfcomm"
5300
5301 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
5302
Andrew Geissler09036742021-06-25 14:25:14 -05005303 :term:`module_conf`
Patrick Williams2390b1b2022-11-03 13:47:49 -05005304 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005305 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
5306 file.
5307
5308 You can use this variable anywhere that it can be recognized by the
5309 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
5310 configuration file, a distribution configuration file, an append file
5311 for the recipe, or the recipe itself). If you use this variable, you
5312 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00005313 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005314 variable.
5315
Andrew Geisslerc926e172021-05-07 16:11:35 -05005316 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005317
5318 module_conf_module_name = "modprobe.d-syntax"
5319
5320 You must use the kernel module name override.
5321
5322 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04005323 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005324
Andrew Geissler5f350902021-07-23 13:09:54 -04005325 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005326 populate the ``/etc/modprobe.d/modname.conf`` file with
5327 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05005328 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005329
5330 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
5331
5332 For information on how to specify kernel modules to auto-load on
5333 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
5334
Andrew Geisslerf0343792020-11-18 10:42:21 -06005335 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005336 Controls creation of the ``modules-*.tgz`` file. Set this variable to
5337 "0" to disable creation of this file, which contains all of the
5338 kernel modules resulting from a kernel build.
5339
Andrew Geisslerf0343792020-11-18 10:42:21 -06005340 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005341 The link name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05005342 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005343
5344 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
5345
5346 The value
5347 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005348 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005349
5350 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
5351
5352 See the :term:`MACHINE` variable for additional information.
5353
Andrew Geisslerf0343792020-11-18 10:42:21 -06005354 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005355 The base name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05005356 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005357
5358 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
5359
Patrick Williams8e7b46e2023-05-01 14:19:06 -05005360 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005361
Patrick Williams975a06f2022-10-21 14:42:47 -05005362 :term:`MOUNT_BASE`
5363 On non-systemd systems (where ``udev-extraconf`` is being used),
5364 specifies the base directory for auto-mounting filesystems. The
5365 default value is "/run/media".
5366
Andrew Geisslerf0343792020-11-18 10:42:21 -06005367 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005368 Uniquely identifies the type of the target system for which packages
5369 are being built. This variable allows output for different types of
5370 target systems to be put into different subdirectories of the same
5371 output directory.
5372
Andrew Geisslerc926e172021-05-07 16:11:35 -05005373 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005374
5375 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
5376
Andrew Geissler517393d2023-01-13 08:55:19 -06005377 Some classes (e.g. :ref:`ref-classes-cross-canadian`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05005378 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005379
5380 See the :term:`STAMP` variable for an example. See the
5381 :term:`STAGING_DIR_TARGET` variable for more information.
5382
Andrew Geisslerf0343792020-11-18 10:42:21 -06005383 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005384 A string identifying the host distribution. Strings consist of the
5385 host distributor ID followed by the release, as reported by the
5386 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
5387 example, when running a build on Ubuntu 12.10, the value is
5388 "Ubuntu-12.10". If this information is unable to be determined, the
5389 value resolves to "Unknown".
5390
5391 This variable is used by default to isolate native shared state
5392 packages for different distributions (e.g. to avoid problems with
5393 ``glibc`` version incompatibilities). Additionally, the variable is
5394 checked against
5395 :term:`SANITY_TESTED_DISTROS` if that
5396 variable is set.
5397
Andrew Geisslerf0343792020-11-18 10:42:21 -06005398 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005399 The minimal command and arguments to run ``nm``.
5400
Andrew Geisslerf0343792020-11-18 10:42:21 -06005401 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005402 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005403 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005404 licenses that are not in any way common. Also, new licenses are added
5405 occasionally to avoid introducing a lot of common license files,
5406 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05005407 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005408 not exist in common licenses.
5409
Andrew Geissler09036742021-06-25 14:25:14 -05005410 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05005411 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005412
5413 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
5414
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005415 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005416 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05005417 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005418
5419 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
5420
Andrew Geisslerf0343792020-11-18 10:42:21 -06005421 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005422 Prevents installation of all "recommended-only" packages.
5423 Recommended-only packages are packages installed only through the
5424 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05005425 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005426
5427 NO_RECOMMENDATIONS = "1"
5428
5429 You can set this variable globally in your ``local.conf`` file or you
5430 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005431 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005432
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005433 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005434
5435 It is important to realize that if you choose to not install packages
5436 using this variable and some other packages are dependent on them
5437 (i.e. listed in a recipe's :term:`RDEPENDS`
5438 variable), the OpenEmbedded build system ignores your request and
5439 will install the packages to avoid dependency errors.
5440
5441 .. note::
5442
5443 Some recommended packages might be required for certain system
5444 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005445 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005446
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005447 This variable is only supported when using the IPK and RPM
5448 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005449
5450 See the :term:`BAD_RECOMMENDATIONS` and
5451 the :term:`PACKAGE_EXCLUDE` variables for
5452 related information.
5453
Andrew Geisslerf0343792020-11-18 10:42:21 -06005454 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005455 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005456 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05005457 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005458 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005459
5460 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005461 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
5462 FILES:${PN}-dbg = "/usr/src/debug/"
5463 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005464
Andrew Geissler09036742021-06-25 14:25:14 -05005465 :term:`NON_MULTILIB_RECIPES`
5466 A list of recipes that should not be built for multilib. OE-Core's
5467 ``multilib.conf`` file defines a reasonable starting point for this
5468 list with::
5469
5470 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
5471
Andrew Geisslerf0343792020-11-18 10:42:21 -06005472 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005473 The minimal command and arguments to run ``objcopy``.
5474
Andrew Geisslerf0343792020-11-18 10:42:21 -06005475 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005476 The minimal command and arguments to run ``objdump``.
5477
Andrew Geisslerf0343792020-11-18 10:42:21 -06005478 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005479 When inheriting the :ref:`ref-classes-binconfig` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005480 this variable specifies additional arguments passed to the "sed"
5481 command. The sed command alters any paths in configuration scripts
5482 that have been set up during compilation. Inheriting this class
5483 results in all paths in these scripts being changed to point into the
5484 ``sysroots/`` directory so that all builds that use the script will
5485 use the correct directories for the cross compiling layout.
5486
Patrick Williams975a06f2022-10-21 14:42:47 -05005487 See the ``meta/classes-recipe/binconfig.bbclass`` in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005488 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00005489 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005490
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06005491 :term:`OECMAKE_GENERATOR`
5492 A variable for the :ref:`ref-classes-cmake` class, allowing to choose
5493 which back-end will be generated by CMake to build an application.
5494
5495 By default, this variable is set to ``Ninja``, which is faster than GNU
5496 make, but if building is broken with Ninja, a recipe can use this
5497 variable to use GNU make instead::
5498
5499 OECMAKE_GENERATOR = "Unix Makefiles"
5500
Andrew Geisslerf0343792020-11-18 10:42:21 -06005501 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005502 An internal variable used to tell the OpenEmbedded build system what
5503 Python modules to import for every Python function run by the system.
5504
5505 .. note::
5506
5507 Do not set this variable. It is for internal use only.
5508
Andrew Geisslerf0343792020-11-18 10:42:21 -06005509 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005510 The name of the build environment setup script for the purposes of
5511 setting up the environment within the extensible SDK. The default
5512 value is "oe-init-build-env".
5513
5514 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05005515 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005516
Andrew Geisslerf0343792020-11-18 10:42:21 -06005517 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005518 Controls how the OpenEmbedded build system spawns interactive
5519 terminals on the host development system (e.g. using the BitBake
5520 command with the ``-c devshell`` command-line option). For more
Andrew Geissler517393d2023-01-13 08:55:19 -06005521 information, see the ":ref:`dev-manual/development-shell:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005522 the Yocto Project Development Tasks Manual.
5523
Andrew Geissler5f350902021-07-23 13:09:54 -04005524 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005525
5526 - auto
5527 - gnome
5528 - xfce
5529 - rxvt
5530 - screen
5531 - konsole
5532 - none
5533
Andrew Geisslerf0343792020-11-18 10:42:21 -06005534 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005535 The directory from which the top-level build environment setup script
5536 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005537 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05005538 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005539 contains the script.
5540
5541 For additional information on how this variable is used, see the
5542 initialization script.
5543
Andrew Geisslerf0343792020-11-18 10:42:21 -06005544 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005545 Declares the oldest version of the Linux kernel that the produced
5546 binaries must support. This variable is passed into the build of the
5547 Embedded GNU C Library (``glibc``).
5548
5549 The default for this variable comes from the
5550 ``meta/conf/bitbake.conf`` configuration file. You can override this
5551 default by setting the variable in a custom distribution
5552 configuration file.
5553
Patrick Williams975a06f2022-10-21 14:42:47 -05005554 :term:`OVERLAYFS_ETC_DEVICE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005555 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005556 inherited, specifies the device to be mounted for the read/write
5557 layer of ``/etc``. There is no default, so you must set this if you
Andrew Geissler517393d2023-01-13 08:55:19 -06005558 wish to enable :ref:`ref-classes-overlayfs-etc`, for
Patrick Williams975a06f2022-10-21 14:42:47 -05005559 example, assuming ``/dev/mmcblk0p2`` was the desired device::
5560
5561 OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2"
5562
5563 :term:`OVERLAYFS_ETC_EXPOSE_LOWER`
Andrew Geissler517393d2023-01-13 08:55:19 -06005564 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005565 inherited, if set to "1" then a read-only access to the original
5566 ``/etc`` content will be provided as a ``lower/`` subdirectory of
5567 :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0".
5568
5569 :term:`OVERLAYFS_ETC_FSTYPE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005570 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005571 inherited, specifies the file system type for the read/write
5572 layer of ``/etc``. There is no default, so you must set this if you
Andrew Geissler517393d2023-01-13 08:55:19 -06005573 wish to enable :ref:`ref-classes-overlayfs-etc`,
Patrick Williams975a06f2022-10-21 14:42:47 -05005574 for example, assuming the file system is ext4::
5575
5576 OVERLAYFS_ETC_FSTYPE = "ext4"
5577
5578 :term:`OVERLAYFS_ETC_MOUNT_OPTIONS`
Andrew Geissler517393d2023-01-13 08:55:19 -06005579 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005580 inherited, specifies the mount options for the read-write layer.
5581 The default value is "defaults".
5582
5583 :term:`OVERLAYFS_ETC_MOUNT_POINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06005584 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005585 inherited, specifies the parent mount path for the filesystem layers.
5586 There is no default, so you must set this if you wish to enable
Andrew Geissler517393d2023-01-13 08:55:19 -06005587 :ref:`ref-classes-overlayfs-etc`, for example if the desired path is
5588 "/data"::
Patrick Williams975a06f2022-10-21 14:42:47 -05005589
5590 OVERLAYFS_ETC_MOUNT_POINT = "/data"
5591
5592 :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06005593 When the :ref:`ref-classes-overlayfs-etc` class is inherited, controls
5594 how the generated init will be named. For more information, see the
5595 :ref:`ref-classes-overlayfs-etc` class documentation. The default value
5596 is "1".
Patrick Williams975a06f2022-10-21 14:42:47 -05005597
5598 :term:`OVERLAYFS_MOUNT_POINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06005599 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005600 specifies mount point(s) to be used. For example::
5601
5602 OVERLAYFS_MOUNT_POINT[data] = "/data"
5603
Andrew Geissler517393d2023-01-13 08:55:19 -06005604 The assumes you have a ``data.mount`` systemd unit defined elsewhere in
5605 your BSP (e.g. in ``systemd-machine-units`` recipe) and it is installed
5606 into the image. For more information see :ref:`ref-classes-overlayfs`.
Patrick Williams975a06f2022-10-21 14:42:47 -05005607
5608 .. note::
5609
Andrew Geissler517393d2023-01-13 08:55:19 -06005610 Although the :ref:`ref-classes-overlayfs` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005611 inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT`
5612 should be set in your machine configuration.
5613
5614 :term:`OVERLAYFS_QA_SKIP`
Andrew Geissler517393d2023-01-13 08:55:19 -06005615 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005616 provides the ability to disable QA checks for particular overlayfs
5617 mounts. For example::
5618
5619 OVERLAYFS_QA_SKIP[data] = "mount-configured"
5620
5621 .. note::
5622
Andrew Geissler517393d2023-01-13 08:55:19 -06005623 Although the :ref:`ref-classes-overlayfs` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005624 inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP`
5625 should be set in your machine configuration.
5626
5627 :term:`OVERLAYFS_WRITABLE_PATHS`
Andrew Geissler517393d2023-01-13 08:55:19 -06005628 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005629 specifies writable paths used at runtime for the recipe. For
5630 example::
5631
5632 OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application"
5633
Andrew Geisslerf0343792020-11-18 10:42:21 -06005634 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005635 A colon-separated list of overrides that currently apply. Overrides
5636 are a BitBake mechanism that allows variables to be selectively
5637 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005638 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005639 the current recipe being built, the machine for which it is being
5640 built, and so forth.
5641
5642 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005643 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005644 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005645 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005646
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005647 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005648
5649 See the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005650 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005651 section in the BitBake User Manual for more information on the
5652 overrides mechanism.
5653
Andrew Geissler09036742021-06-25 14:25:14 -05005654 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005655 :term:`CLASSOVERRIDE`,
5656 :term:`MACHINEOVERRIDES`, and
5657 :term:`DISTROOVERRIDES` variables. Another
5658 important override included by default is ``pn-${PN}``. This override
5659 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005660 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005661
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005662 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005663
5664 .. note::
5665
Andrew Geissler09036742021-06-25 14:25:14 -05005666 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005667 in the output of the ``bitbake -e`` command. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06005668 ":ref:`dev-manual/debugging:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005669 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005670
Andrew Geisslerf0343792020-11-18 10:42:21 -06005671 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005672 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005673
5674 ${PN}-${PV}
5675
Andrew Geissler517393d2023-01-13 08:55:19 -06005676 :term:`P4DIR`
5677 See :term:`bitbake:P4DIR` in the BitBake manual.
5678
Andrew Geisslerf0343792020-11-18 10:42:21 -06005679 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005680 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005681
5682 You may find you need to inject additional metadata into packages.
5683 This variable allows you to do that by setting the injected data as
5684 the value. Multiple fields can be added by splitting the content with
5685 the literal separator "\n".
5686
5687 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5688 to do package type specific settings. It can also be made package
5689 specific by using the package name as a suffix.
5690
5691 You can find out more about applying this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06005692 ":ref:`dev-manual/packages:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005693 section in the Yocto Project Development Tasks Manual.
5694
Andrew Geisslerf0343792020-11-18 10:42:21 -06005695 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005696 The architecture of the resulting package or packages.
5697
5698 By default, the value of this variable is set to
5699 :term:`TUNE_PKGARCH` when building for the
5700 target, :term:`BUILD_ARCH` when building for the
5701 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5702 SDK.
5703
5704 .. note::
5705
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005706 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005707
5708 However, if your recipe's output packages are built specific to the
5709 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005710 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005711 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005712
5713 PACKAGE_ARCH = "${MACHINE_ARCH}"
5714
Andrew Geisslerf0343792020-11-18 10:42:21 -06005715 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005716 Specifies a list of architectures compatible with the target machine.
5717 This variable is set automatically and should not normally be
5718 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005719 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005720 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5721
Andrew Geisslerf0343792020-11-18 10:42:21 -06005722 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005723 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005724 that those added packages can pick up files that would normally be
5725 included in the default package.
5726
Andrew Geisslerf0343792020-11-18 10:42:21 -06005727 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005728 This variable, which is set in the ``local.conf`` configuration file
5729 found in the ``conf`` folder of the
5730 :term:`Build Directory`, specifies the package manager the
5731 OpenEmbedded build system uses when packaging data.
5732
5733 You can provide one or more of the following arguments for the
Andrew Geissler517393d2023-01-13 08:55:19 -06005734 variable::
5735
Patrick Williams8e7b46e2023-05-01 14:19:06 -05005736 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005737
5738 The build system uses only the first argument in the list as the
5739 package manager when creating your image or SDK. However, packages
5740 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005741 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005742
5743 PACKAGE_CLASSES ?= "package_ipk"
5744
5745 The OpenEmbedded build system uses
5746 the IPK package manager to create your image or SDK.
5747
5748 For information on packaging and build performance effects as a
5749 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005750 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005751
Andrew Geisslerf0343792020-11-18 10:42:21 -06005752 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005753 Determines how to split up and package debug and source information
5754 when creating debugging packages to be used with the GNU Project
5755 Debugger (GDB). In general, based on the value of this variable,
5756 you can combine the source and debug info in a single package,
5757 you can break out the source into a separate package that can be
5758 installed independently, or you can choose to not have the source
5759 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005760
Patrick Williams93c203f2021-10-06 16:15:23 -05005761 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005762
Patrick Williams93c203f2021-10-06 16:15:23 -05005763 - "``.debug``": All debugging and source info is placed in a single
5764 ``*-dbg`` package; debug symbol files are placed next to the
5765 binary in a ``.debug`` directory so that, if a binary is installed
5766 into ``/bin``, the corresponding debug symbol file is installed
5767 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5768 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005769
Patrick Williams93c203f2021-10-06 16:15:23 -05005770 - "``debug-file-directory``": As above, all debugging and source info
5771 is placed in a single ``*-dbg`` package; debug symbol files are
5772 placed entirely under the directory ``/usr/lib/debug`` and separated
5773 by the path from where the binary is installed, so that if a binary
5774 is installed in ``/bin``, the corresponding debug symbols are installed
5775 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5776 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005777
Patrick Williams93c203f2021-10-06 16:15:23 -05005778 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5779 ``*-dbg`` package as with the ``.debug`` value, while source is
5780 placed in a separate ``*-src`` package, which can be installed
5781 independently. This is the default setting for this variable,
5782 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005783
Patrick Williams93c203f2021-10-06 16:15:23 -05005784 - "``debug-without-src``": The same behavior as with the ``.debug``
5785 setting, but no source is packaged at all.
5786
5787 .. note::
5788
5789 Much of the above package splitting can be overridden via
5790 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005791
5792 You can find out more about debugging using GDB by reading the
Andrew Geissler517393d2023-01-13 08:55:19 -06005793 ":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005794 in the Yocto Project Development Tasks Manual.
5795
Andrew Geisslerf0343792020-11-18 10:42:21 -06005796 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005797 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005798 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005799
5800 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5801
5802 You can set this variable globally in your ``local.conf`` file or you
5803 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005804 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005805
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005806 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005807
5808 If you choose to not install a package using this variable and some
5809 other package is dependent on it (i.e. listed in a recipe's
5810 :term:`RDEPENDS` variable), the OpenEmbedded build
5811 system generates a fatal installation error. Because the build system
5812 halts the process with a fatal error, you can use the variable with
5813 an iterative development process to remove specific components from a
5814 system.
5815
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005816 This variable is supported only when using the IPK and RPM
5817 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005818
5819 See the :term:`NO_RECOMMENDATIONS` and the
5820 :term:`BAD_RECOMMENDATIONS` variables for
5821 related information.
5822
Andrew Geissler9aee5002022-03-30 16:27:02 +00005823 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5824 Prevents specific packages from being installed when you are
5825 installing complementary packages.
5826
5827 You might find that you want to prevent installing certain packages
5828 when you are installing complementary packages. For example, if you
5829 are using :term:`IMAGE_FEATURES` to install
5830 ``dev-pkgs``, you might not want to install all packages from a
5831 particular multilib. If you find yourself in this situation, you can
5832 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5833 expressions to match the packages you want to exclude.
5834
Andrew Geisslerf0343792020-11-18 10:42:21 -06005835 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005836 Specifies the list of architectures compatible with the device CPU.
5837 This variable is useful when you build for several different devices
5838 that use miscellaneous processors such as XScale and ARM926-EJS.
5839
Andrew Geisslerf0343792020-11-18 10:42:21 -06005840 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005841 Optionally specifies the package architectures used as part of the
5842 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005843 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005844 URI, which is constructed using the
5845 :term:`PACKAGE_FEED_URIS` and
5846 :term:`PACKAGE_FEED_BASE_PATHS`
5847 variables.
5848
5849 .. note::
5850
Andrew Geissler09036742021-06-25 14:25:14 -05005851 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005852 variable to allow specific package architectures. If you do
5853 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005854 case, you can omit this variable. Omitting the variable results in
5855 all available architectures for the current machine being included
5856 into remote package feeds.
5857
Andrew Geissler09036742021-06-25 14:25:14 -05005858 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5859 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005860 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005861
5862 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5863 https://example.com/packagerepos/updates"
5864 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5865 PACKAGE_FEED_ARCHS = "all core2-64"
5866
5867 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005868
5869 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005870
5871 https://example.com/packagerepos/release/rpm/all
5872 https://example.com/packagerepos/release/rpm/core2-64
5873 https://example.com/packagerepos/release/rpm-dev/all
5874 https://example.com/packagerepos/release/rpm-dev/core2-64
5875 https://example.com/packagerepos/updates/rpm/all
5876 https://example.com/packagerepos/updates/rpm/core2-64
5877 https://example.com/packagerepos/updates/rpm-dev/all
5878 https://example.com/packagerepos/updates/rpm-dev/core2-64
5879
Andrew Geisslerf0343792020-11-18 10:42:21 -06005880 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005881 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005882 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005883 package feed URI used by the OpenEmbedded build system. The base path
5884 lies between the :term:`PACKAGE_FEED_URIS`
5885 and :term:`PACKAGE_FEED_ARCHS` variables.
5886
Andrew Geissler09036742021-06-25 14:25:14 -05005887 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5888 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005889 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005890
5891 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5892 https://example.com/packagerepos/updates"
5893 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5894 PACKAGE_FEED_ARCHS = "all core2-64"
5895
5896 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005897
5898 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005899
5900 https://example.com/packagerepos/release/rpm/all
5901 https://example.com/packagerepos/release/rpm/core2-64
5902 https://example.com/packagerepos/release/rpm-dev/all
5903 https://example.com/packagerepos/release/rpm-dev/core2-64
5904 https://example.com/packagerepos/updates/rpm/all
5905 https://example.com/packagerepos/updates/rpm/core2-64
5906 https://example.com/packagerepos/updates/rpm-dev/all
5907 https://example.com/packagerepos/updates/rpm-dev/core2-64
5908
Andrew Geisslerf0343792020-11-18 10:42:21 -06005909 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005910 Specifies the front portion of the package feed URI used by the
5911 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005912 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005913 :term:`PACKAGE_FEED_BASE_PATHS`, and
5914 :term:`PACKAGE_FEED_ARCHS` variables.
5915
Andrew Geissler09036742021-06-25 14:25:14 -05005916 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5917 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005918 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005919
5920 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5921 https://example.com/packagerepos/updates"
5922 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5923 PACKAGE_FEED_ARCHS = "all core2-64"
5924
5925 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005926
5927 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005928
5929 https://example.com/packagerepos/release/rpm/all
5930 https://example.com/packagerepos/release/rpm/core2-64
5931 https://example.com/packagerepos/release/rpm-dev/all
5932 https://example.com/packagerepos/release/rpm-dev/core2-64
5933 https://example.com/packagerepos/updates/rpm/all
5934 https://example.com/packagerepos/updates/rpm/core2-64
5935 https://example.com/packagerepos/updates/rpm-dev/all
5936 https://example.com/packagerepos/updates/rpm-dev/core2-64
5937
Andrew Geisslerf0343792020-11-18 10:42:21 -06005938 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005939 The final list of packages passed to the package manager for
5940 installation into the image.
5941
5942 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005943 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005944 not the final list of packages that are actually installed. This
5945 variable is internal to the image construction code. Consequently, in
5946 general, you should use the
5947 :term:`IMAGE_INSTALL` variable to specify
5948 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005949 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Patrick Williams2194f502022-10-16 14:26:09 -05005950 image. When working with an initial RAM filesystem (:term:`Initramfs`) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005951 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler517393d2023-01-13 08:55:19 -06005952 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005953 in the Yocto Project Development Tasks Manual.
5954
Andrew Geisslerf0343792020-11-18 10:42:21 -06005955 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005956 Specifies a list of packages the OpenEmbedded build system attempts
5957 to install when creating an image. If a listed package fails to
5958 install, the build system does not generate an error. This variable
5959 is generally not user-defined.
5960
Andrew Geisslerf0343792020-11-18 10:42:21 -06005961 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005962 Specifies a list of functions run to pre-process the
5963 :term:`PKGD` directory prior to splitting the files out
5964 to individual packages.
5965
Andrew Geisslerf0343792020-11-18 10:42:21 -06005966 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005967 Specifies a list of dependencies for post-installation and
5968 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005969 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005970 creation time rather than on the target but depends on a native tool
5971 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005972 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005973
5974 For information on running post-installation scripts, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06005975 ":ref:`dev-manual/new-recipe:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005976 section in the Yocto Project Development Tasks Manual.
5977
Andrew Geisslerf0343792020-11-18 10:42:21 -06005978 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005979 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005980 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005981 recipes when you specify features and then arguments that define
5982 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005983 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005984
5985 PACKAGECONFIG ??= "f1 f2 f3 ..."
5986 PACKAGECONFIG[f1] = "\
5987 --with-f1, \
5988 --without-f1, \
5989 build-deps-for-f1, \
5990 runtime-deps-for-f1, \
5991 runtime-recommends-for-f1, \
5992 packageconfig-conflicts-for-f1"
5993 PACKAGECONFIG[f2] = "\
5994 ... and so on and so on ...
5995
Andrew Geissler5f350902021-07-23 13:09:54 -04005996 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005997 list of the features to enable. Following the features, you can
5998 determine the behavior of each feature by providing up to six
5999 order-dependent arguments, which are separated by commas. You can
6000 omit any argument you like but must retain the separating commas. The
6001 order is important and specifies the following:
6002
Andrew Geissler517393d2023-01-13 08:55:19 -06006003 #. Extra arguments that should be added to the configure script
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006004 argument list (:term:`EXTRA_OECONF` or
6005 :term:`PACKAGECONFIG_CONFARGS`) if
6006 the feature is enabled.
6007
Andrew Geissler517393d2023-01-13 08:55:19 -06006008 #. Extra arguments that should be added to :term:`EXTRA_OECONF` or
Andrew Geissler09036742021-06-25 14:25:14 -05006009 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006010
Andrew Geissler517393d2023-01-13 08:55:19 -06006011 #. Additional build dependencies (:term:`DEPENDS`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006012 that should be added if the feature is enabled.
6013
Andrew Geissler517393d2023-01-13 08:55:19 -06006014 #. Additional runtime dependencies (:term:`RDEPENDS`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006015 that should be added if the feature is enabled.
6016
Andrew Geissler517393d2023-01-13 08:55:19 -06006017 #. Additional runtime recommendations
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006018 (:term:`RRECOMMENDS`) that should be added if
6019 the feature is enabled.
6020
Andrew Geissler517393d2023-01-13 08:55:19 -06006021 #. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006022 settings for this feature.
6023
Andrew Geissler09036742021-06-25 14:25:14 -05006024 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006025 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
Andrew Geissler517393d2023-01-13 08:55:19 -06006026 three arguments that determine the feature's behavior::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006027
6028 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
6029
6030 The
6031 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
6032 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05006033 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006034 other hand, if the feature is disabled say through a ``.bbappend``
6035 file in another layer, then the second argument ``--without-gtk3`` is
6036 added to the configure script instead.
6037
Andrew Geissler09036742021-06-25 14:25:14 -05006038 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006039 regardless of whether you are creating a block or changing a block.
6040 When creating a block, use the structure inside your recipe.
6041
Andrew Geissler09036742021-06-25 14:25:14 -05006042 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006043 so one of two ways:
6044
6045 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05006046 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05006047 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006048 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006049
6050 PACKAGECONFIG = "f4 f5"
6051
Andrew Geisslerc926e172021-05-07 16:11:35 -05006052 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006053
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006054 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006055
6056 - *Configuration file:* This method is identical to changing the
6057 block through an append file except you edit your ``local.conf``
6058 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05006059 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006060
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006061 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006062
Andrew Geisslerc926e172021-05-07 16:11:35 -05006063 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006064
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006065 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006066
Andrew Geisslerf0343792020-11-18 10:42:21 -06006067 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006068 A space-separated list of configuration options generated from the
6069 :term:`PACKAGECONFIG` setting.
6070
Andrew Geissler517393d2023-01-13 08:55:19 -06006071 Classes such as :ref:`ref-classes-autotools` and :ref:`ref-classes-cmake`
6072 use :term:`PACKAGECONFIG_CONFARGS` to pass :term:`PACKAGECONFIG` options
6073 to ``configure`` and ``cmake``, respectively. If you are using
6074 :term:`PACKAGECONFIG` but not a class that handles the
6075 :ref:`ref-tasks-configure` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05006076 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006077
Andrew Geisslerf0343792020-11-18 10:42:21 -06006078 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geissler517393d2023-01-13 08:55:19 -06006079 For recipes inheriting the :ref:`ref-classes-packagegroup` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05006080 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006081 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
6082 should not be automatically created by the ``packagegroup`` recipe,
6083 which is the default behavior.
6084
Andrew Geisslerf0343792020-11-18 10:42:21 -06006085 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006086 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006087 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006088
Andrew Geissler5199d832021-09-24 16:47:35 -05006089 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006090
6091 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05006092 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006093 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05006094 package. If a file matches the :term:`FILES` variable for more than one
6095 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006096 (leftmost) package.
6097
6098 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006099 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006100 :ref:`ref-tasks-install` task) are not generated,
6101 unless generation is forced through the
6102 :term:`ALLOW_EMPTY` variable.
6103
Andrew Geisslerf0343792020-11-18 10:42:21 -06006104 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006105 A promise that your recipe satisfies runtime dependencies for
6106 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05006107 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006108 only states that they should be satisfied. For example, if a hard,
6109 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05006110 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006111 variable, but a package with the module name is never actually
6112 produced, then the other package will be broken. Thus, if you attempt
6113 to include that package in an image, you will get a dependency
6114 failure from the packaging system during the
6115 :ref:`ref-tasks-rootfs` task.
6116
6117 Typically, if there is a chance that such a situation can occur and
6118 the package that is not created is valid without the dependency being
6119 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05006120 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006121
Andrew Geissler09036742021-06-25 14:25:14 -05006122 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006123 you are splitting packages, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006124 ":ref:`dev-manual/packages:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006125 section in the Yocto Project Development Tasks Manual.
6126
Andrew Geisslerf0343792020-11-18 10:42:21 -06006127 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006128 Specifies a list of functions run to perform additional splitting of
6129 files into individual packages. Recipes can either prepend to this
6130 variable or prepend to the ``populate_packages`` function in order to
6131 perform additional package splitting. In either case, the function
6132 should set :term:`PACKAGES`,
6133 :term:`FILES`, :term:`RDEPENDS` and
6134 other packaging variables appropriately in order to perform the
6135 desired splitting.
6136
Andrew Geisslerf0343792020-11-18 10:42:21 -06006137 :term:`PARALLEL_MAKE`
Patrick Williams7784c422022-11-17 07:29:11 -06006138
6139 Extra options passed to the build tool command (``make``,
6140 ``ninja`` or more specific build engines, like the Go language one)
6141 during the :ref:`ref-tasks-compile` task, to specify parallel compilation
6142 on the local build host. This variable is usually in the form "-j x",
6143 where x represents the maximum number of parallel threads such engines
6144 can run.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006145
6146 .. note::
6147
Patrick Williams7784c422022-11-17 07:29:11 -06006148 For software compiled by ``make``, in order for :term:`PARALLEL_MAKE`
6149 to be effective, ``make`` must be called with
6150 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
6151 way to ensure this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006152
6153 By default, the OpenEmbedded build system automatically sets this
6154 variable to be equal to the number of cores the build system uses.
6155
6156 .. note::
6157
6158 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05006159 the :ref:`ref-tasks-compile` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05006160 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006161 information on addressing race conditions, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006162 ":ref:`dev-manual/debugging:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006163 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006164
6165 For single socket systems (i.e. one CPU), you should not have to
6166 override this variable to gain optimal parallelism during builds.
6167 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05006168 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006169 not set higher than "-j 20".
6170
6171 For more information on speeding up builds, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006172 ":ref:`dev-manual/speeding-up-build:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006173 section in the Yocto Project Development Tasks Manual.
6174
Andrew Geisslerf0343792020-11-18 10:42:21 -06006175 :term:`PARALLEL_MAKEINST`
Patrick Williams7784c422022-11-17 07:29:11 -06006176 Extra options passed to the build tool install command
6177 (``make install``, ``ninja install`` or more specific ones)
6178 during the :ref:`ref-tasks-install` task in order to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006179 parallel installation. This variable defaults to the value of
6180 :term:`PARALLEL_MAKE`.
6181
6182 .. note::
6183
Patrick Williams7784c422022-11-17 07:29:11 -06006184 For software compiled by ``make``, in order for :term:`PARALLEL_MAKEINST`
6185 to be effective, ``make`` must be called with
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006186 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
6187 way to ensure this is to use the ``oe_runmake`` function.
6188
6189 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05006190 the :ref:`ref-tasks-install` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05006191 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006192 workaround. For information on addressing race conditions, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006193 ":ref:`dev-manual/debugging:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006194 section in the Yocto Project Development Tasks Manual.
6195
Andrew Geisslerf0343792020-11-18 10:42:21 -06006196 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006197 Determines the action to take when a patch fails. You can set this
6198 variable to one of two values: "noop" and "user".
6199
6200 The default value of "noop" causes the build to simply fail when the
6201 OpenEmbedded build system cannot successfully apply a patch. Setting
6202 the value to "user" causes the build system to launch a shell and
6203 places you in the right location so that you can manually resolve the
6204 conflicts.
6205
6206 Set this variable in your ``local.conf`` file.
6207
Andrew Geisslerf0343792020-11-18 10:42:21 -06006208 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006209 Specifies the utility used to apply patches for a recipe during the
6210 :ref:`ref-tasks-patch` task. You can specify one of
6211 three utilities: "patch", "quilt", or "git". The default utility used
6212 is "quilt" except for the quilt-native recipe itself. Because the
6213 quilt tool is not available at the time quilt-native is being
6214 patched, it uses "patch".
6215
6216 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006217 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006218
6219 PATCHTOOL = "patch"
6220 PATCHTOOL = "quilt"
6221 PATCHTOOL = "git"
6222
Andrew Geisslerf0343792020-11-18 10:42:21 -06006223 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006224 The epoch of the recipe. By default, this variable is unset. The
6225 variable is used to make upgrades possible when the versioning scheme
6226 changes in some backwards incompatible way.
6227
Andrew Geissler09036742021-06-25 14:25:14 -05006228 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006229
Andrew Geissler9aee5002022-03-30 16:27:02 +00006230 :term:`PEP517_WHEEL_PATH`
Andrew Geissler517393d2023-01-13 08:55:19 -06006231 When used by recipes that inherit the :ref:`ref-classes-python_pep517`
6232 class, denotes the path to ``dist/`` (short for distribution) where the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006233 binary archive ``wheel`` is built.
6234
Andrew Geissler517393d2023-01-13 08:55:19 -06006235 :term:`PERSISTENT_DIR`
6236 See :term:`bitbake:PERSISTENT_DIR` in the BitBake manual.
6237
Andrew Geisslerf0343792020-11-18 10:42:21 -06006238 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006239 Specifies the recipe or package name and includes all version and
6240 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
6241 ``bash-4.2-r1/``). This variable is comprised of the following:
6242 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
6243
Andrew Geisslerf0343792020-11-18 10:42:21 -06006244 :term:`PIXBUF_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06006245 When inheriting the :ref:`ref-classes-pixbufcache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006246 class, this variable identifies packages that contain the pixbuf
Andrew Geissler517393d2023-01-13 08:55:19 -06006247 loaders used with ``gdk-pixbuf``. By default, the
6248 :ref:`ref-classes-pixbufcache` class assumes that
6249 the loaders are in the recipe's main package (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006250 ``${``\ :term:`PN`\ ``}``). Use this variable if the
6251 loaders you need are in a package other than that main package.
6252
Andrew Geisslerf0343792020-11-18 10:42:21 -06006253 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006254 The name of the resulting package created by the OpenEmbedded build
6255 system.
6256
6257 .. note::
6258
Andrew Geissler09036742021-06-25 14:25:14 -05006259 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006260
Andrew Geissler517393d2023-01-13 08:55:19 -06006261 For example, when the :ref:`ref-classes-debian` class renames the output
6262 package, it does so by setting ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006263
Andrew Geisslerf0343792020-11-18 10:42:21 -06006264 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006265 The path to ``pkg-config`` files for the current build context.
6266 ``pkg-config`` reads this variable from the environment.
6267
Andrew Geisslerf0343792020-11-18 10:42:21 -06006268 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006269 Points to the destination directory for files to be packaged before
6270 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006271 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006272
6273 ${WORKDIR}/package
6274
6275 Do not change this default.
6276
Andrew Geisslerf0343792020-11-18 10:42:21 -06006277 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006278 Points to a shared, global-state directory that holds data generated
6279 during the packaging process. During the packaging process, the
6280 :ref:`ref-tasks-packagedata` task packages data
6281 for each recipe and installs it into this temporary, shared area.
6282 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006283 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006284
6285 ${STAGING_DIR_HOST}/pkgdata
6286
6287 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006288 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006289 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler517393d2023-01-13 08:55:19 -06006290 ":ref:`dev-manual/debugging:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006291 section in the Yocto Project Development Tasks Manual. For more
6292 information on the shared, global-state directory, see
6293 :term:`STAGING_DIR_HOST`.
6294
Andrew Geisslerf0343792020-11-18 10:42:21 -06006295 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006296 Points to the parent directory for files to be packaged after they
6297 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006298 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006299
6300 ${WORKDIR}/packages-split
6301
6302 Under this directory, the build system creates directories for each
6303 package specified in :term:`PACKAGES`. Do not change
6304 this default.
6305
Andrew Geisslerf0343792020-11-18 10:42:21 -06006306 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006307 Points to a temporary work area where the
6308 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05006309 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006310
6311 ${WORKDIR}/pkgdata
6312
6313 Do not change this default.
6314
6315 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05006316 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006317 :term:`PKGDATA_DIR` to make it available globally.
6318
Andrew Geisslerf0343792020-11-18 10:42:21 -06006319 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05006320 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006321 is set to :term:`PE`.
6322
Andrew Geisslerf0343792020-11-18 10:42:21 -06006323 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006324 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05006325 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006326
Andrew Geisslerf0343792020-11-18 10:42:21 -06006327 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006328 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05006329 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006330
Andrew Geisslerf0343792020-11-18 10:42:21 -06006331 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006332 This variable can have two separate functions depending on the
6333 context: a recipe name or a resulting package name.
6334
Andrew Geissler09036742021-06-25 14:25:14 -05006335 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006336 OpenEmbedded build system as input to create a package. The name is
6337 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006338 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006339 will be "expat".
6340
6341 The variable refers to a package name in the context of a file
6342 created or produced by the OpenEmbedded build system.
6343
Andrew Geissler09036742021-06-25 14:25:14 -05006344 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006345 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04006346 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05006347 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006348 and ``lib64-bash``, respectively.
6349
Andrew Geisslerf0343792020-11-18 10:42:21 -06006350 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006351 Specifies a list of functions to call once the OpenEmbedded build
6352 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05006353 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006354
6355 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
6356
6357 If you need to pass the SDK path to a command within a function, you
6358 can use ``${SDK_DIR}``, which points to the parent directory used by
6359 the OpenEmbedded build system when creating SDK output. See the
6360 :term:`SDK_DIR` variable for more information.
6361
Andrew Geisslerf0343792020-11-18 10:42:21 -06006362 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006363 Specifies a list of functions to call once the OpenEmbedded build
6364 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05006365 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006366
6367 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
6368
6369 If you need to pass the SDK path to a command within a function, you
6370 can use ``${SDK_DIR}``, which points to the parent directory used by
6371 the OpenEmbedded build system when creating SDK output. See the
6372 :term:`SDK_DIR` variable for more information.
6373
Andrew Geisslerf0343792020-11-18 10:42:21 -06006374 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006375 The revision of the recipe. The default value for this variable is
6376 "r0". Subsequent revisions of the recipe conventionally have the
6377 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05006378 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006379
6380 .. note::
6381
Andrew Geissler09036742021-06-25 14:25:14 -05006382 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006383 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06006384 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006385 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06006386 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006387 mechanisms.
6388
Andrew Geissler09036742021-06-25 14:25:14 -05006389 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006390 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05006391 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006392 :term:`PKGR`, helps the package manager distinguish which
6393 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05006394 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
6395 the same :term:`PV` usually means that the packages all install the same
6396 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006397 packaging fixes.
6398
6399 .. note::
6400
Andrew Geissler09036742021-06-25 14:25:14 -05006401 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006402 package contents or metadata.
6403
Andrew Geissler5f350902021-07-23 13:09:54 -04006404 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006405 an automated solution exists. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06006406 ":ref:`dev-manual/packages:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006407 in the Yocto Project Development Tasks Manual for more information.
6408
Andrew Geisslerf0343792020-11-18 10:42:21 -06006409 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006410 If multiple recipes provide the same item, this variable determines
6411 which recipe is preferred and thus provides the item (i.e. the
6412 preferred provider). You should always suffix this variable with the
6413 name of the provided item. And, you should define the variable using
6414 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05006415 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006416
6417 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
6418
6419 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05006420 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006421 the recipe you prefer to provide "virtual/kernel".
6422
Andrew Geisslerc926e172021-05-07 16:11:35 -05006423 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006424
6425 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
6426 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
6427
6428 For more
Andrew Geissler517393d2023-01-13 08:55:19 -06006429 information, see the ":ref:`dev-manual/new-recipe:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006430 section in the Yocto Project Development Tasks Manual.
6431
6432 .. note::
6433
Andrew Geissler09036742021-06-25 14:25:14 -05006434 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006435 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05006436 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006437 desirable since this mechanism is designed to select between mutually
6438 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006439
Andrew Geissler517393d2023-01-13 08:55:19 -06006440 :term:`PREFERRED_PROVIDERS`
6441 See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual.
6442
Andrew Geisslerf0343792020-11-18 10:42:21 -06006443 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006444 If there are multiple versions of a recipe available, this variable
6445 determines which version should be given preference. You must always
6446 suffix the variable with the :term:`PN` you want to select (`python` in
6447 the first example below), and you should specify the :term:`PV`
6448 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006449
Andrew Geissler09036742021-06-25 14:25:14 -05006450 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006451 through the "``%``" character. You can use the character to match any
6452 number of characters, which can be useful when specifying versions
6453 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05006454 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006455
6456 PREFERRED_VERSION_python = "3.4.0"
6457 PREFERRED_VERSION_linux-yocto = "5.0%"
6458
6459 .. note::
6460
6461 The use of the "%" character is limited in that it only works at the end of the
6462 string. You cannot use the wildcard character in any other
6463 location of the string.
6464
6465 The specified version is matched against :term:`PV`, which
6466 does not necessarily match the version part of the recipe's filename.
6467 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05006468 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006469
6470 PV = "1.1+git${SRCPV}"
6471
6472 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05006473 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006474
6475 PREFERRED_VERSION_foo = "1.1+git%"
6476
6477 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05006478 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006479
6480 PREFERRED_VERSION_foo = "git"
6481
Andrew Geissler09036742021-06-25 14:25:14 -05006482 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006483 configuration files in a way that is hard to change. You can use
6484 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05006485 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006486
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006487 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006488
6489 Although not recommended, worst case, you can also use the
6490 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006491 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006492
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006493 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006494
6495 .. note::
6496
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006497 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05006498 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006499
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006500 If a recipe with the specified version is not available, a warning
6501 message will be shown. See :term:`REQUIRED_VERSION` if you want this
6502 to be an error instead.
6503
Andrew Geisslerf0343792020-11-18 10:42:21 -06006504 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006505 Specifies additional paths from which the OpenEmbedded build system
6506 gets source code. When the build system searches for source code, it
6507 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05006508 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006509 source, and then locations specified by
6510 :term:`MIRRORS` in that order.
6511
6512 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006513 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006514 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
6515
6516 Typically, you could add a specific server for the build system to
6517 attempt before any others by adding something like the following to
6518 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006519 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006520
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006521 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00006522 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6523 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6524 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6525 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006526
6527 These changes cause the
6528 build system to intercept Git, FTP, HTTP, and HTTPS requests and
6529 direct them to the ``http://`` sources mirror. You can use
6530 ``file://`` URLs to point to local directories or network shares as
6531 well.
6532
Andrew Geisslerf0343792020-11-18 10:42:21 -06006533 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006534 Indicates the importance of a package.
6535
Andrew Geissler09036742021-06-25 14:25:14 -05006536 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006537 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05006538 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006539 normally set within recipes.
6540
Andrew Geissler09036742021-06-25 14:25:14 -05006541 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006542 "optional", which is the default.
6543
Andrew Geisslerf0343792020-11-18 10:42:21 -06006544 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006545 Specifies libraries installed within a recipe that should be ignored
6546 by the OpenEmbedded build system's shared library resolver. This
6547 variable is typically used when software being built by a recipe has
6548 its own private versions of a library normally provided by another
6549 recipe. In this case, you would not want the package containing the
6550 private libraries to be set as a dependency on other unrelated
6551 packages that should instead depend on the package providing the
6552 standard version of the library.
6553
6554 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05006555 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006556
6557 PRIVATE_LIBS = "libmozjs.so \
6558 libxpcom.so \
6559 libnspr4.so \
6560 libxul.so \
6561 libmozalloc.so \
6562 libplc4.so \
6563 libplds4.so"
6564
6565 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006566 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006567 section in the Yocto Project Overview and Concepts Manual.
6568
Andrew Geisslerf0343792020-11-18 10:42:21 -06006569 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006570 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05006571 default, a recipe's own :term:`PN` is implicitly already in its
6572 :term:`PROVIDES` list and therefore does not need to mention that it
6573 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006574 aliases are synonyms for the recipe and can be useful for satisfying
6575 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006576 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006577
Andrew Geissler09036742021-06-25 14:25:14 -05006578 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05006579 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006580
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006581 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006582
Andrew Geissler09036742021-06-25 14:25:14 -05006583 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006584 results in the "eudev" recipe also being available as simply "udev".
6585
6586 .. note::
6587
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006588 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
Andrew Geissler517393d2023-01-13 08:55:19 -06006589 to :term:`PROVIDES`, so while using "+=" in the above example may not be
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006590 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006591
6592 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05006593 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006594 virtual target is a name that corresponds to some particular
6595 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05006596 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006597 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05006598 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006599
6600 Conventionally, virtual targets have names on the form
6601 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6602 of the name and has no syntactical significance.
6603
6604 The :term:`PREFERRED_PROVIDER` variable is
6605 used to select which particular recipe provides a virtual target.
6606
6607 .. note::
6608
6609 A corresponding mechanism for virtual runtime dependencies
6610 (packages) exists. However, the mechanism does not depend on any
6611 special functionality beyond ordinary variable assignments. For
6612 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6613 the component that manages the ``/dev`` directory.
6614
6615 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006616 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006617
6618 VIRTUAL-RUNTIME_dev_manager = "udev"
6619
6620
Andrew Geisslerf0343792020-11-18 10:42:21 -06006621 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006622 The network based :term:`PR` service host and port.
6623
Andrew Geissler87f5cff2022-09-30 13:13:31 -05006624 The ``conf/templates/default/local.conf.sample.extended`` configuration
6625 file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST`
6626 variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006627
6628 PRSERV_HOST = "localhost:0"
6629
6630 You must
6631 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler517393d2023-01-13 08:55:19 -06006632 service <dev-manual/packages:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006633 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006634
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006635
6636 :term:`PSEUDO_IGNORE_PATHS`
6637 A comma-separated (without spaces) list of path prefixes that should be ignored
6638 by pseudo when monitoring and recording file operations, in order to avoid
6639 problems with files being written to outside of the pseudo context and
6640 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6641 and can include partial directory (or file) names.
6642
6643
Andrew Geisslerf0343792020-11-18 10:42:21 -06006644 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006645 Specifies whether or not :ref:`Package
Andrew Geissler517393d2023-01-13 08:55:19 -06006646 Test <dev-manual/packages:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006647 functionality is enabled when building a recipe. You should not set
6648 this variable directly. Enabling and disabling building Package Tests
6649 at build time should be done by adding "ptest" to (or removing it
6650 from) :term:`DISTRO_FEATURES`.
6651
Andrew Geisslerf0343792020-11-18 10:42:21 -06006652 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006653 The version of the recipe. The version is normally extracted from the
6654 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006655 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6656 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006657 building an unstable (i.e. development) version from a source code
6658 repository (e.g. Git or Subversion).
6659
Andrew Geissler09036742021-06-25 14:25:14 -05006660 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006661
Patrick Williams975a06f2022-10-21 14:42:47 -05006662 :term:`PYPI_PACKAGE`
Andrew Geissler517393d2023-01-13 08:55:19 -06006663 When inheriting the :ref:`ref-classes-pypi` class, specifies the
Patrick Williams975a06f2022-10-21 14:42:47 -05006664 `PyPI <https://pypi.org/>`__ package name to be built. The default value
6665 is set based upon :term:`BPN` (stripping any "python-" or "python3-"
6666 prefix off if present), however for some packages it will need to be set
6667 explicitly if that will not match the package name (e.g. where the
6668 package name has a prefix, underscores, uppercase letters etc.)
6669
Andrew Geisslerf0343792020-11-18 10:42:21 -06006670 :term:`PYTHON_ABI`
Andrew Geissler517393d2023-01-13 08:55:19 -06006671 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
6672 class, denotes the Application Binary Interface (ABI) currently in use
6673 for Python. By default, the ABI is "m". You do not have to set this
6674 variable as the OpenEmbedded build system sets it for you.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006675
6676 The OpenEmbedded build system uses the ABI to construct directory
6677 names used when installing the Python headers and libraries in
6678 sysroot (e.g. ``.../python3.3m/...``).
6679
Andrew Geisslerf0343792020-11-18 10:42:21 -06006680 :term:`PYTHON_PN`
Andrew Geissler517393d2023-01-13 08:55:19 -06006681 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
6682 class, specifies the major Python version being built. For Python 3.x,
6683 :term:`PYTHON_PN` would be "python3". You do not have to set this
6684 variable as the OpenEmbedded build system automatically sets it for you.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006685
6686 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006687 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006688
6689 DEPENDS += "${PYTHON_PN}-native"
6690
6691 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006692 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006693
Patrick Williams03907ee2022-05-01 06:28:52 -05006694 :term:`QA_EMPTY_DIRS`
6695 Specifies a list of directories that are expected to be empty when
6696 packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or
6697 :term:`WARN_QA` these will be checked and an error or warning
6698 (respectively) will be produced.
6699
6700 The default :term:`QA_EMPTY_DIRS` value is set in
6701 :ref:`insane.bbclass <ref-classes-insane>`.
6702
6703 :term:`QA_EMPTY_DIRS_RECOMMENDATION`
6704 Specifies a recommendation for why a directory must be empty,
6705 which will be included in the error message if a specific directory
6706 is found to contain files. Must be overridden with the directory
6707 path to match on.
6708
6709 If no recommendation is specified for a directory, then the default
6710 "but it is expected to be empty" will be used.
6711
6712 An example message shows if files were present in '/dev'::
6713
6714 QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime"
6715
Andrew Geisslerf0343792020-11-18 10:42:21 -06006716 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006717 The minimal command and arguments to run ``ranlib``.
6718
Andrew Geisslerf0343792020-11-18 10:42:21 -06006719 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006720 The list of packages that conflict with packages. Note that packages
6721 will not be installed if conflicting packages are not first removed.
6722
6723 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006724 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006725
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006726 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006727
6728 BitBake, which the OpenEmbedded build system uses, supports
6729 specifying versioned dependencies. Although the syntax varies
6730 depending on the packaging format, BitBake hides these differences
6731 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006732 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006733
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006734 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006735
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006736 For ``operator``, you can specify the following:
6737
6738 - =
6739 - <
6740 - >
6741 - <=
6742 - >=
6743
6744 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006745 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006746
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006747 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006748
Andrew Geisslerf0343792020-11-18 10:42:21 -06006749 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006750 Lists runtime dependencies of a package. These dependencies are other
6751 packages that must be installed in order for the package to function
6752 correctly. As an example, the following assignment declares that the
6753 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006754 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006755
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006756 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006757
6758 The most common types of package
6759 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006760 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006761 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006762 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006763 section in the Yocto Project Overview and Concepts Manual.
6764
Andrew Geissler09036742021-06-25 14:25:14 -05006765 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006766 ``bar`` and ``baz`` will be declared as dependencies inside the
6767 package ``foo`` when it is written out by one of the
Patrick Williams2194f502022-10-16 14:26:09 -05006768 :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006769 Exactly how this is done depends on which package format is used,
6770 which is determined by
6771 :term:`PACKAGE_CLASSES`. When the
6772 corresponding package manager installs the package, it will know to
6773 also install the packages on which it depends.
6774
6775 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006776 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006777 added. This dependency is from the recipe's
6778 :ref:`ref-tasks-build` (not to be confused with
6779 :ref:`ref-tasks-compile`) task to the
Patrick Williams2194f502022-10-16 14:26:09 -05006780 :ref:`do_package_write_* <ref-tasks-package_write_deb>` task of the recipes that build ``bar`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006781 ``baz``.
6782
Andrew Geissler09036742021-06-25 14:25:14 -05006783 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geissler615f2f12022-07-15 14:00:58 -05006784 names of other packages --- they cannot be recipe names. Although
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006785 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006786 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006787 variable. For an example of the default list of packages created from
6788 a recipe, see the :term:`PACKAGES` variable.
6789
Andrew Geissler09036742021-06-25 14:25:14 -05006790 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006791 you should always use the variable in a form with an attached package
6792 name (remember that a single recipe can build multiple packages). For
6793 example, suppose you are building a development package that depends
6794 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006795 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006796
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006797 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006798
6799 In the example,
6800 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006801 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006802 the variable.
6803
6804 .. note::
6805
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006806 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006807 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006808 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006809 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006810 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006811
Andrew Geissler09036742021-06-25 14:25:14 -05006812 The package names you use with :term:`RDEPENDS` must appear as they would
6813 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006814 allows a different name to be used for the final package (e.g. the
Andrew Geissler517393d2023-01-13 08:55:19 -06006815 :ref:`ref-classes-debian` class uses this to rename
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006816 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006817 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006818 independent of the package format used.
6819
6820 BitBake, which the OpenEmbedded build system uses, supports
6821 specifying versioned dependencies. Although the syntax varies
6822 depending on the packaging format, BitBake hides these differences
6823 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006824 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006825
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006826 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006827
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006828 For ``operator``, you can specify the following:
6829
6830 - =
6831 - <
6832 - >
6833 - <=
6834 - >=
6835
6836 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006837
6838 .. note::
6839
Andrew Geissler09036742021-06-25 14:25:14 -05006840 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006841 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006842
6843 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006844 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006845
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006846 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006847
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05006848 For information on build-time dependencies, see the :term:`DEPENDS`
6849 variable. You can also see the
6850 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6851 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
6852 BitBake User Manual for additional information on tasks and dependencies.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006853
Andrew Geissler5199d832021-09-24 16:47:35 -05006854 :term:`RECIPE_NO_UPDATE_REASON`
6855 If a recipe should not be replaced by a more recent upstream version,
6856 putting the reason why in this variable in a recipe allows
6857 ``devtool check-upgrade-status`` command to display it, as explained
6858 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6859 section.
6860
Andrew Geissler517393d2023-01-13 08:55:19 -06006861 :term:`REPODIR`
6862 See :term:`bitbake:REPODIR` in the BitBake manual.
6863
Andrew Geisslerf0343792020-11-18 10:42:21 -06006864 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06006865 When inheriting the :ref:`ref-classes-features_check`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006866 class, this variable identifies distribution features that must exist
6867 in the current configuration in order for the OpenEmbedded build
6868 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006869 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6870 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006871 the recipe will be skipped, and if the build system attempts to build
6872 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006873
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006874 :term:`REQUIRED_VERSION`
6875 If there are multiple versions of a recipe available, this variable
6876 determines which version should be given preference.
6877 :term:`REQUIRED_VERSION` works in exactly the same manner as
6878 :term:`PREFERRED_VERSION`, except that if the specified version is not
6879 available then an error message is shown and the build fails
6880 immediately.
6881
6882 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6883 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6884
Andrew Geisslerf0343792020-11-18 10:42:21 -06006885 :term:`RM_WORK_EXCLUDE`
Andrew Geissler517393d2023-01-13 08:55:19 -06006886 With :ref:`ref-classes-rm-work` enabled, this variable
6887 specifies a list of recipes whose work directories should not be removed.
6888 See the ":ref:`ref-classes-rm-work`" section for more details.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006889
Andrew Geisslerf0343792020-11-18 10:42:21 -06006890 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006891 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006892 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006893
6894 ROOT_HOME ??= "/home/root"
6895
6896 .. note::
6897
6898 This default value is likely used because some embedded solutions
6899 prefer to have a read-only root filesystem and prefer to keep
6900 writeable data in one place.
6901
6902 You can override the default by setting the variable in any layer or
6903 in the ``local.conf`` file. Because the default is set using a "weak"
6904 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006905 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006906
6907 ROOT_HOME = "/root"
6908 ROOT_HOME ?= "/root"
6909
6910 These
6911 override examples use ``/root``, which is probably the most commonly
6912 used override.
6913
Andrew Geisslerf0343792020-11-18 10:42:21 -06006914 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006915 Indicates a filesystem image to include as the root filesystem.
6916
Andrew Geissler09036742021-06-25 14:25:14 -05006917 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geissler517393d2023-01-13 08:55:19 -06006918 :ref:`ref-classes-image-live` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006919
Andrew Geisslerf0343792020-11-18 10:42:21 -06006920 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006921 Specifies a list of functions to call after the OpenEmbedded build
6922 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006923 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006924
6925 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6926
6927 If you need to pass the root filesystem path to a command within a
6928 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6929 directory that becomes the root filesystem image. See the
6930 :term:`IMAGE_ROOTFS` variable for more
6931 information.
6932
Andrew Geisslerf0343792020-11-18 10:42:21 -06006933 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006934 Specifies a list of functions to call once the OpenEmbedded build
6935 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006936 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006937
6938 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6939
6940 If you need to pass the root filesystem path to a command within a
6941 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6942 directory that becomes the root filesystem image. See the
6943 :term:`IMAGE_ROOTFS` variable for more
6944 information.
6945
Andrew Geisslerf0343792020-11-18 10:42:21 -06006946 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006947 Specifies a list of functions to call after the OpenEmbedded build
6948 system has removed unnecessary packages. When runtime package
6949 management is disabled in the image, several packages are removed
6950 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006951 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006952
6953 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6954
6955 If you need to pass the root filesystem path to a command within a
6956 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6957 directory that becomes the root filesystem image. See the
6958 :term:`IMAGE_ROOTFS` variable for more
6959 information.
6960
Andrew Geisslerf0343792020-11-18 10:42:21 -06006961 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006962 Specifies a list of functions to call before the OpenEmbedded build
6963 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006964 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006965
6966 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6967
6968 If you need to pass the root filesystem path to a command within a
6969 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6970 directory that becomes the root filesystem image. See the
6971 :term:`IMAGE_ROOTFS` variable for more
6972 information.
6973
Andrew Geisslerf0343792020-11-18 10:42:21 -06006974 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006975 A list of package name aliases that a package also provides. These
6976 aliases are useful for satisfying runtime dependencies of other
6977 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006978 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006979
6980 .. note::
6981
Andrew Geissler09036742021-06-25 14:25:14 -05006982 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006983
6984 As with all package-controlling variables, you must always use the
6985 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006986 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006987
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006988 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006989
Andrew Geisslerf0343792020-11-18 10:42:21 -06006990 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006991 A list of packages that extends the usability of a package being
6992 built. The package being built does not depend on this list of
6993 packages in order to successfully build, but rather uses them for
6994 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006995 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006996
Andrew Geissler09036742021-06-25 14:25:14 -05006997 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006998 list of packages when installing the built package. However, you can
6999 prevent listed packages from being installed by using the
7000 :term:`BAD_RECOMMENDATIONS`,
7001 :term:`NO_RECOMMENDATIONS`, and
7002 :term:`PACKAGE_EXCLUDE` variables.
7003
Andrew Geissler09036742021-06-25 14:25:14 -05007004 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007005 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007006 through the :term:`PACKAGES` or
7007 :term:`PACKAGES_DYNAMIC` variables or the
7008 :term:`RPROVIDES` variable, or an error will occur
7009 during the build. If such a recipe does exist and the package is not
7010 produced, the build continues without error.
7011
Andrew Geissler09036742021-06-25 14:25:14 -05007012 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007013 you should always attach an override to the variable to specify the
7014 particular package whose usability is being extended. For example,
7015 suppose you are building a development package that is extended to
7016 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007017 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007018
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007019 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007020
7021 In the
7022 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05007023 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007024 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007025
7026 BitBake, which the OpenEmbedded build system uses, supports
7027 specifying versioned recommends. Although the syntax varies depending
7028 on the packaging format, BitBake hides these differences from you.
7029 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05007030 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007031
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007032 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007033
7034 For ``operator``, you can specify the following:
7035
7036 - =
7037 - <
7038 - >
7039 - <=
7040 - >=
7041
7042 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05007043 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007044
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007045 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007046
Andrew Geisslerf0343792020-11-18 10:42:21 -06007047 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007048 A list of packages replaced by a package. The package manager uses
7049 this variable to determine which package should be installed to
7050 replace other package(s) during an upgrade. In order to also have the
7051 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05007052 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007053
7054 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05007055 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007056
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007057 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007058
7059 BitBake, which the OpenEmbedded build system uses, supports
7060 specifying versioned replacements. Although the syntax varies
7061 depending on the packaging format, BitBake hides these differences
7062 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05007063 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007064
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007065 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007066
7067 For ``operator``, you can specify the following:
7068
7069 - =
7070 - <
7071 - >
7072 - <=
7073 - >=
7074
7075 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05007076 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007077
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007078 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007079
Andrew Geisslerf0343792020-11-18 10:42:21 -06007080 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007081 A list of additional packages that you can suggest for installation
7082 by the package manager at the time a package is installed. Not all
7083 package managers support this functionality.
7084
7085 As with all package-controlling variables, you must always use this
7086 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05007087 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007088
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007089 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007090
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007091 :term:`RUST_CHANNEL`
7092 Specifies which version of Rust to build - "stable", "beta" or "nightly".
7093 The default value is "stable". Set this at your own risk, as values other
7094 than "stable" are not guaranteed to work at a given time.
7095
Andrew Geisslerf0343792020-11-18 10:42:21 -06007096 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007097 The location in the :term:`Build Directory` where
7098 unpacked recipe source code resides. By default, this directory is
7099 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
7100 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
7101 version. If the source tarball extracts the code to a directory named
7102 anything other than ``${BPN}-${PV}``, or if the source code is
7103 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05007104 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007105 to find the unpacked source.
7106
7107 As an example, assume a :term:`Source Directory`
Patrick Williams2390b1b2022-11-03 13:47:49 -05007108 top-level folder named ``poky`` and a default :term:`Build Directory` at
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007109 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05007110 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007111
7112 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
7113
7114 The unpacked source code resides in the ``db-5.1.19`` folder.
7115
7116 This next example assumes a Git repository. By default, Git
7117 repositories are cloned to ``${WORKDIR}/git`` during
7118 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05007119 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007120 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007121
Andrew Geissler9aee5002022-03-30 16:27:02 +00007122 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007123 S = "${WORKDIR}/git"
7124
Andrew Geisslerf0343792020-11-18 10:42:21 -06007125 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007126 Specifies a list of command-line utilities that should be checked for
7127 during the initial sanity checking process when running BitBake. If
7128 any of the utilities are not installed on the build host, then
7129 BitBake immediately exits with an error.
7130
Andrew Geisslerf0343792020-11-18 10:42:21 -06007131 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007132 A list of the host distribution identifiers that the build system has
7133 been tested against. Identifiers consist of the host distributor ID
7134 followed by the release, as reported by the ``lsb_release`` tool or
7135 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05007136 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007137 not empty and the current value of
7138 :term:`NATIVELSBSTRING` does not appear in the
7139 list, then the build system reports a warning that indicates the
7140 current host distribution has not been tested as a build host.
7141
Andrew Geisslerf0343792020-11-18 10:42:21 -06007142 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007143 The target architecture for the SDK. Typically, you do not directly
7144 set this variable. Instead, use :term:`SDKMACHINE`.
7145
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007146 :term:`SDK_ARCHIVE_TYPE`
7147 Specifies the type of archive to create for the SDK. Valid values:
7148
7149 - ``tar.xz`` (default)
7150 - ``zip``
7151
7152 Only one archive type can be specified.
7153
Patrick Williams975a06f2022-10-21 14:42:47 -05007154 :term:`SDK_BUILDINFO_FILE`
Andrew Geissler517393d2023-01-13 08:55:19 -06007155 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05007156 specifies the file in the SDK to write the build information into. The
7157 default value is "``/buildinfo``".
7158
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007159 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05007160 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Patrick Williams2390b1b2022-11-03 13:47:49 -05007161 "1" and a ``conf/templateconf.cfg`` file exists in the :term:`Build Directory`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007162 (:term:`TOPDIR`) then this will be copied into the SDK.
7163
Andrew Geisslerf0343792020-11-18 10:42:21 -06007164 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007165 The directory set up and used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06007166 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which the
7167 SDK is deployed. The :ref:`populate_sdk_base <ref-classes-populate-sdk>`
7168 class defines :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007169
7170 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
7171
Andrew Geisslerf0343792020-11-18 10:42:21 -06007172 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007173 The parent directory used by the OpenEmbedded build system when
7174 creating SDK output. The
7175 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05007176 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007177
7178 SDK_DIR = "${WORKDIR}/sdk"
7179
7180 .. note::
7181
Andrew Geissler09036742021-06-25 14:25:14 -05007182 The :term:`SDK_DIR` directory is a temporary directory as it is part of
7183 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007184
Andrew Geisslerf0343792020-11-18 10:42:21 -06007185 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007186 Controls whether or not shared state artifacts are copied into the
7187 extensible SDK. The default value of "full" copies all of the
7188 required shared state artifacts into the extensible SDK. The value
7189 "minimal" leaves these artifacts out of the SDK.
7190
7191 .. note::
7192
7193 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007194 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
7195 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007196
Andrew Geisslerf0343792020-11-18 10:42:21 -06007197 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007198 The manifest file for the host part of the SDK. This file lists all
7199 the installed packages that make up the host part of the SDK. The
7200 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007201 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007202
7203 packagename packagearch version
7204
7205 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05007206 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007207
7208 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
7209
7210 The location is derived using the :term:`SDK_DEPLOY` and
7211 :term:`TOOLCHAIN_OUTPUTNAME` variables.
7212
Andrew Geisslerf0343792020-11-18 10:42:21 -06007213 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007214 When set to "1", specifies to include the packagedata for all recipes
7215 in the "world" target in the extensible SDK. Including this data
7216 allows the ``devtool search`` command to find these recipes in search
7217 results, as well as allows the ``devtool add`` command to map
7218 dependencies more effectively.
7219
7220 .. note::
7221
Andrew Geissler09036742021-06-25 14:25:14 -05007222 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007223 variable significantly increases build time because all of world
7224 needs to be built. Enabling the variable also slightly increases
7225 the size of the extensible SDK.
7226
Andrew Geisslerf0343792020-11-18 10:42:21 -06007227 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007228 When set to "1", specifies to include the toolchain in the extensible
7229 SDK. Including the toolchain is useful particularly when
7230 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
7231 the SDK reasonably small but you still want to provide a usable
7232 toolchain. For example, suppose you want to use the toolchain from an
7233 IDE or from other tools and you do not want to perform additional
7234 steps to install the toolchain.
7235
Andrew Geissler09036742021-06-25 14:25:14 -05007236 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
7237 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
7238 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007239
Andrew Geisslerf0343792020-11-18 10:42:21 -06007240 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007241 The base name for SDK output files. The name is derived from the
7242 :term:`DISTRO`, :term:`TCLIBC`,
7243 :term:`SDK_ARCH`,
7244 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05007245 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007246
7247 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
7248
Andrew Geisslerf0343792020-11-18 10:42:21 -06007249 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007250 Specifies the operating system for which the SDK will be built. The
7251 default value is the value of :term:`BUILD_OS`.
7252
Andrew Geisslerf0343792020-11-18 10:42:21 -06007253 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007254 The location used by the OpenEmbedded build system when creating SDK
7255 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05007256 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007257
7258 SDK_DIR = "${WORKDIR}/sdk"
7259 SDK_OUTPUT = "${SDK_DIR}/image"
7260 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
7261
7262 .. note::
7263
Andrew Geissler09036742021-06-25 14:25:14 -05007264 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007265 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
7266 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007267
Andrew Geisslerf0343792020-11-18 10:42:21 -06007268 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007269 Specifies a list of architectures compatible with the SDK machine.
7270 This variable is set automatically and should not normally be
7271 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05007272 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007273 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
7274
Andrew Geisslerf0343792020-11-18 10:42:21 -06007275 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007276 Specifies a list of functions to call once the OpenEmbedded build
7277 system creates the SDK. You can specify functions separated by
7278 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
7279
7280 If you need to pass an SDK path to a command within a function, you
7281 can use ``${SDK_DIR}``, which points to the parent directory used by
7282 the OpenEmbedded build system when creating SDK output. See the
7283 :term:`SDK_DIR` variable for more information.
7284
Andrew Geisslerf0343792020-11-18 10:42:21 -06007285 :term:`SDK_PREFIX`
Andrew Geissler517393d2023-01-13 08:55:19 -06007286 The toolchain binary prefix used for
7287 :ref:`ref-classes-nativesdk` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05007288 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007289 :term:`TARGET_PREFIX` when building
7290 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
7291
Andrew Geisslerf0343792020-11-18 10:42:21 -06007292 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007293 A list of shared state tasks added to the extensible SDK. By default,
7294 the following tasks are added:
7295
Patrick Williams2194f502022-10-16 14:26:09 -05007296 - :ref:`ref-tasks-populate_lic`
7297 - :ref:`ref-tasks-package_qa`
7298 - :ref:`ref-tasks-populate_sysroot`
7299 - :ref:`ref-tasks-deploy`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007300
7301 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05007302 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007303 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05007304 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007305 tasks that are needed in order to build
7306 :term:`SDK_TARGETS`).
7307
Andrew Geisslerf0343792020-11-18 10:42:21 -06007308 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007309 Specifies the system, including the architecture and the operating
7310 system, for which the SDK will be built.
7311
7312 The OpenEmbedded build system automatically sets this variable based
7313 on :term:`SDK_ARCH`,
7314 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05007315 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007316 variable yourself.
7317
Andrew Geisslerf0343792020-11-18 10:42:21 -06007318 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007319 The manifest file for the target part of the SDK. This file lists all
7320 the installed packages that make up the target part of the SDK. The
7321 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007322 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007323
7324 packagename packagearch version
7325
7326 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05007327 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007328
7329 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
7330
7331 The location is derived using the :term:`SDK_DEPLOY` and
7332 :term:`TOOLCHAIN_OUTPUTNAME` variables.
7333
Andrew Geisslerf0343792020-11-18 10:42:21 -06007334 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007335 A list of targets to install from shared state as part of the
7336 standard or extensible SDK installation. The default value is "${PN}"
7337 (i.e. the image from which the SDK is built).
7338
Andrew Geissler09036742021-06-25 14:25:14 -05007339 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007340 would not be changed.
7341
Andrew Geisslerf0343792020-11-18 10:42:21 -06007342 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007343 The title to be printed when running the SDK installer. By default,
7344 this title is based on the :term:`DISTRO_NAME` or
7345 :term:`DISTRO` variable and is set in the
7346 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007347 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007348
7349 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
7350
7351 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05007352 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007353
7354 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007355 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007356 section in the Yocto Project Application Development and the
7357 Extensible Software Development Kit (eSDK) manual.
7358
Patrick Williams975a06f2022-10-21 14:42:47 -05007359 :term:`SDK_TOOLCHAIN_LANGS`
7360 Specifies programming languages to support in the SDK, as a
7361 space-separated list. Currently supported items are ``rust`` and ``go``.
7362
Andrew Geisslerf0343792020-11-18 10:42:21 -06007363 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007364 An optional URL for an update server for the extensible SDK. If set,
7365 the value is used as the default update server when running
7366 ``devtool sdk-update`` within the extensible SDK.
7367
Andrew Geisslerf0343792020-11-18 10:42:21 -06007368 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007369 Specifies the name of the SDK vendor.
7370
Andrew Geisslerf0343792020-11-18 10:42:21 -06007371 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007372 Specifies the version of the SDK. The Poky distribution configuration file
7373 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05007374 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007375
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007376 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007377
7378 For additional information, see the
7379 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007380 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007381
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007382 :term:`SDK_ZIP_OPTIONS`
7383 Specifies extra options to pass to the ``zip`` command when zipping the SDK
7384 (i.e. when :term:`SDK_ARCHIVE_TYPE` is set to "zip"). The default value is
7385 "-y".
7386
Andrew Geisslerf0343792020-11-18 10:42:21 -06007387 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007388 The default installation directory for the Extensible SDK. By
7389 default, this directory is based on the :term:`DISTRO`
7390 variable and is set in the
7391 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007392 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007393
7394 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
7395
7396 For the
Andrew Geissler09036742021-06-25 14:25:14 -05007397 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007398
7399 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007400 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007401 section in the Yocto Project Application Development and the
7402 Extensible Software Development Kit (eSDK) manual.
7403
Andrew Geisslerf0343792020-11-18 10:42:21 -06007404 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05007405 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007406 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007407
7408 $ bitbake -c populate_sdk imagename
7409
Andrew Geisslerf0343792020-11-18 10:42:21 -06007410 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00007411 The machine for which the SDK is built. In other words, the SDK is built
7412 such that it runs on the target you specify with the :term:`SDKMACHINE`
7413 value. The value points to a corresponding ``.conf`` file under
7414 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
7415 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
7416 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007417
Andrew Geissler595f6302022-01-24 19:11:47 +00007418 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
7419 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007420
7421 .. note::
7422
Andrew Geissler09036742021-06-25 14:25:14 -05007423 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007424 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00007425 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007426
Andrew Geisslerf0343792020-11-18 10:42:21 -06007427 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007428 Defines the path offered to the user for installation of the SDK that
7429 is generated by the OpenEmbedded build system. The path appears as
7430 the default location for installing the SDK when you run the SDK's
7431 installation script. You can override the offered path when you run
7432 the script.
7433
Andrew Geisslerf0343792020-11-18 10:42:21 -06007434 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007435 The full path to the sysroot used for cross-compilation within an SDK
7436 as it will be when installed into the default
7437 :term:`SDKPATH`.
7438
Andrew Geisslerf0343792020-11-18 10:42:21 -06007439 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007440 The section in which packages should be categorized. Package
7441 management utilities can make use of this variable.
7442
Andrew Geisslerf0343792020-11-18 10:42:21 -06007443 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007444 Specifies the optimization flags passed to the C compiler when
7445 building for the target. The flags are passed through the default
7446 value of the :term:`TARGET_CFLAGS` variable.
7447
Andrew Geissler09036742021-06-25 14:25:14 -05007448 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007449 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
7450 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007451
Andrew Geisslerf0343792020-11-18 10:42:21 -06007452 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007453 Defines a serial console (TTY) to enable using
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007454 :wikipedia:`getty <Getty_(Unix)>`. Provide a value that specifies the
7455 baud rate followed by the TTY device name separated by a semicolon.
7456 Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007457
7458 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
7459
Andrew Geisslerf0343792020-11-18 10:42:21 -06007460 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007461 Specifies serial consoles, which must be listed in
7462 :term:`SERIAL_CONSOLES`, to check against
7463 ``/proc/console`` before enabling them using getty. This variable
7464 allows aliasing in the format: <device>:<alias>. If a device was
7465 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05007466 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007467
7468 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
7469
7470 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05007471 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
7472 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
7473 incompatible with customizations such as the following::
7474
7475 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007476
Andrew Geissler595f6302022-01-24 19:11:47 +00007477 :term:`SETUPTOOLS_BUILD_ARGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06007478 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7479 class, this variable can be used to specify additional arguments to be
7480 passed to ``setup.py build`` in the ``setuptools3_do_compile()`` task.
Andrew Geissler595f6302022-01-24 19:11:47 +00007481
7482 :term:`SETUPTOOLS_INSTALL_ARGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06007483 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7484 class, this variable can be used to specify additional arguments to be
7485 passed to ``setup.py install`` in the ``setuptools3_do_install()`` task.
Andrew Geissler595f6302022-01-24 19:11:47 +00007486
7487 :term:`SETUPTOOLS_SETUP_PATH`
Andrew Geissler517393d2023-01-13 08:55:19 -06007488 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7489 class, this variable should be used to specify the directory in which
7490 the ``setup.py`` file is located if it is not at the root of the source
7491 tree (as specified by :term:`S`). For example, in a recipe where the
7492 sources are fetched from a Git repository and ``setup.py`` is in a
7493 ``python/pythonmodule`` subdirectory, you would have this::
Andrew Geissler595f6302022-01-24 19:11:47 +00007494
7495 S = "${WORKDIR}/git"
7496 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
7497
Andrew Geisslerf0343792020-11-18 10:42:21 -06007498 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007499 A list of recipe dependencies that should not be used to determine
7500 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007501 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007502
7503 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
7504
7505 In the previous example, ``intone`` depends on ``mplayer2``.
7506
7507 You can use the special token ``"*"`` on the left-hand side of the
7508 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05007509 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007510
7511 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
7512
7513 In the previous example, all recipes except ``quilt-native`` ignore
7514 task signatures from the ``quilt-native`` recipe when determining
7515 their task signatures.
7516
7517 Use of this variable is one mechanism to remove dependencies that
7518 affect task signatures and thus force rebuilds when a recipe changes.
7519
7520 .. note::
7521
7522 If you add an inappropriate dependency for a recipe relationship,
7523 the software might break during runtime if the interface of the
7524 second recipe was changed after the first recipe had been built.
7525
Andrew Geisslerf0343792020-11-18 10:42:21 -06007526 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007527 A list of recipes that are completely stable and will never change.
7528 The ABI for the recipes in the list are presented by output from the
7529 tasks run to build the recipe. Use of this variable is one way to
7530 remove dependencies from one recipe on another that affect task
7531 signatures and thus force rebuilds when the recipe changes.
7532
7533 .. note::
7534
7535 If you add an inappropriate variable to this list, the software
7536 might break at runtime if the interface of the recipe was changed
7537 after the other had been built.
7538
Andrew Geisslerf0343792020-11-18 10:42:21 -06007539 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007540 Specifies the number of bits for the target system CPU. The value
7541 should be either "32" or "64".
7542
Andrew Geisslerf0343792020-11-18 10:42:21 -06007543 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007544 Specifies the endian byte order of the target system. The value
7545 should be either "le" for little-endian or "be" for big-endian.
7546
Andrew Geisslerf0343792020-11-18 10:42:21 -06007547 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007548 Enables removal of all files from the "Provides" section of an RPM
7549 package. Removal of these files is required for packages containing
7550 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
7551
7552 To enable file removal, set the variable to "1" in your
7553 ``conf/local.conf`` configuration file in your:
Patrick Williams2390b1b2022-11-03 13:47:49 -05007554 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007555
7556 SKIP_FILEDEPS = "1"
7557
Andrew Geissler9aee5002022-03-30 16:27:02 +00007558 :term:`SKIP_RECIPE`
7559 Used to prevent the OpenEmbedded build system from building a given
7560 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
7561 and provide a reason, which will be reported when attempting to
7562 build the recipe.
7563
7564 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
7565 variable in your ``local.conf`` file or distribution configuration.
7566 Here is an example which prevents ``myrecipe`` from being built::
7567
7568 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
7569
Andrew Geisslerf0343792020-11-18 10:42:21 -06007570 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007571 Groups together machines based upon the same family of SOC (System On
7572 Chip). You typically set this variable in a common ``.inc`` file that
7573 you include in the configuration files of all the machines.
7574
7575 .. note::
7576
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007577 You must include ``conf/machine/include/soc-family.inc`` for this
7578 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007579
Andrew Geisslerf0343792020-11-18 10:42:21 -06007580 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007581 Defines the suffix for shared libraries used on the target platform.
7582 By default, this suffix is ".so.*" for all Linux-based systems and is
7583 defined in the ``meta/conf/bitbake.conf`` configuration file.
7584
7585 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007586 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007587
Andrew Geisslerf0343792020-11-18 10:42:21 -06007588 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007589 Defines the suffix for the development symbolic link (symlink) for
7590 shared libraries on the target platform. By default, this suffix is
7591 ".so" for Linux-based systems and is defined in the
7592 ``meta/conf/bitbake.conf`` configuration file.
7593
7594 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007595 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007596
Andrew Geisslereff27472021-10-29 15:35:00 -05007597 :term:`SOURCE_DATE_EPOCH`
7598 This defines a date expressed in number of seconds since
7599 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
7600 multiple build systems to force a timestamp in built binaries.
7601 Many upstream projects already support this variable.
7602
7603 You will find more details in the `official specifications
7604 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
7605
7606 A value for each recipe is computed from the sources by
7607 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
7608
7609 If a recipe wishes to override the default behavior, it should set its
7610 own :term:`SOURCE_DATE_EPOCH` value::
7611
7612 SOURCE_DATE_EPOCH = "1613559011"
7613
Andrew Geisslerf0343792020-11-18 10:42:21 -06007614 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007615 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05007616 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007617 your ``local.conf`` configuration file ensures the source for all
7618 recipes are fetched regardless of whether or not a recipe is
7619 compatible with the configuration. A recipe is considered
7620 incompatible with the currently configured machine when either or
7621 both the :term:`COMPATIBLE_MACHINE`
7622 variable and :term:`COMPATIBLE_HOST` variables
7623 specify compatibility with a machine other than that of the current
7624 machine or host.
7625
7626 .. note::
7627
Andrew Geissler09036742021-06-25 14:25:14 -05007628 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007629 variable unless you are creating a source mirror. In other words,
7630 do not set the variable during a normal build.
7631
Andrew Geisslerf0343792020-11-18 10:42:21 -06007632 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007633 Defines your own :term:`PREMIRRORS` from which to
7634 first fetch source before attempting to fetch from the upstream
7635 specified in :term:`SRC_URI`.
7636
7637 To use this variable, you must globally inherit the
Andrew Geissler517393d2023-01-13 08:55:19 -06007638 :ref:`ref-classes-own-mirrors` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007639 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007640
7641 INHERIT += "own-mirrors"
7642 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7643
7644 .. note::
7645
Andrew Geissler09036742021-06-25 14:25:14 -05007646 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007647
Patrick Williams7784c422022-11-17 07:29:11 -06007648 :term:`SPDX_ARCHIVE_PACKAGED`
7649 This option allows to add to :term:`SPDX` output compressed archives
7650 of the files in the generated target packages.
7651
7652 Such archives are available in
7653 ``tmp/deploy/spdx/MACHINE/packages/packagename.tar.zst``
7654 under the :term:`Build Directory`.
7655
7656 Enable this option as follows::
7657
7658 SPDX_ARCHIVE_PACKAGED = "1"
7659
7660 According to our tests on release 4.1 "langdale", building
7661 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling this
7662 option multiplied the size of the ``tmp/deploy/spdx`` directory by a
7663 factor of 13 (+1.6 GiB for this image), compared to just using the
Andrew Geissler517393d2023-01-13 08:55:19 -06007664 :ref:`ref-classes-create-spdx` class with no option.
Patrick Williams7784c422022-11-17 07:29:11 -06007665
7666 Note that this option doesn't increase the size of :term:`SPDX`
7667 files in ``tmp/deploy/images/MACHINE``.
7668
7669 :term:`SPDX_ARCHIVE_SOURCES`
7670 This option allows to add to :term:`SPDX` output compressed archives
7671 of the sources for packages installed on the target. It currently
7672 only works when :term:`SPDX_INCLUDE_SOURCES` is set.
7673
7674 This is one way of fulfilling "source code access" license
7675 requirements.
7676
7677 Such source archives are available in
7678 ``tmp/deploy/spdx/MACHINE/recipes/recipe-packagename.tar.zst``
7679 under the :term:`Build Directory`.
7680
7681 Enable this option as follows::
7682
7683 SPDX_INCLUDE_SOURCES = "1"
7684 SPDX_ARCHIVE_SOURCES = "1"
7685
7686 According to our tests on release 4.1 "langdale", building
7687 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7688 these options multiplied the size of the ``tmp/deploy/spdx``
7689 directory by a factor of 11 (+1.4 GiB for this image),
Andrew Geissler517393d2023-01-13 08:55:19 -06007690 compared to just using the :ref:`ref-classes-create-spdx`
Patrick Williams7784c422022-11-17 07:29:11 -06007691 class with no option.
7692
7693 Note that using this option only marginally increases the size
7694 of the :term:`SPDX` output in ``tmp/deploy/images/MACHINE/``
7695 (+ 0.07\% with the tested image), compared to just enabling
7696 :term:`SPDX_INCLUDE_SOURCES`.
7697
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007698 :term:`SPDX_CUSTOM_ANNOTATION_VARS`
7699 This option allows to associate `SPDX annotations
7700 <https://spdx.github.io/spdx-spec/v2.3/annotations/>`__ to a recipe,
7701 using the values of variables in the recipe::
7702
7703 ANNOTATION1 = "First annotation for recipe"
7704 ANNOTATION2 = "Second annotation for recipe"
7705 SPDX_CUSTOM_ANNOTATION_VARS = "ANNOTATION1 ANNOTATION2"
7706
7707 This will add a new block to the recipe ``.sdpx.json`` output::
7708
7709 "annotations": [
7710 {
7711 "annotationDate": "2023-04-18T08:32:12Z",
7712 "annotationType": "OTHER",
7713 "annotator": "Tool: oe-spdx-creator - 1.0",
7714 "comment": "ANNOTATION1=First annotation for recipe"
7715 },
7716 {
7717 "annotationDate": "2023-04-18T08:32:12Z",
7718 "annotationType": "OTHER",
7719 "annotator": "Tool: oe-spdx-creator - 1.0",
7720 "comment": "ANNOTATION2=Second annotation for recipe"
7721 }
7722 ],
7723
Patrick Williams7784c422022-11-17 07:29:11 -06007724 :term:`SPDX_INCLUDE_SOURCES`
7725 This option allows to add a description of the source files used to build
7726 the host tools and the target packages, to the ``spdx.json`` files in
7727 ``tmp/deploy/spdx/MACHINE/recipes/`` under the :term:`Build Directory`.
7728 As a consequence, the ``spdx.json`` files under the ``by-namespace`` and
7729 ``packages`` subdirectories in ``tmp/deploy/spdx/MACHINE`` are also
7730 modified to include references to such source file descriptions.
7731
7732 Enable this option as follows::
7733
7734 SPDX_INCLUDE_SOURCES = "1"
7735
7736 According to our tests on release 4.1 "langdale", building
7737 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7738 this option multiplied the total size of the ``tmp/deploy/spdx``
7739 directory by a factor of 3 (+291 MiB for this image),
7740 and the size of the ``IMAGE-MACHINE.spdx.tar.zst`` in
7741 ``tmp/deploy/images/MACHINE`` by a factor of 130 (+15 MiB for this
Andrew Geissler517393d2023-01-13 08:55:19 -06007742 image), compared to just using the :ref:`ref-classes-create-spdx` class
7743 with no option.
Patrick Williams7784c422022-11-17 07:29:11 -06007744
7745 :term:`SPDX_PRETTY`
7746 This option makes the SPDX output more human-readable, using
7747 identation and newlines, instead of the default output in a
7748 single line::
7749
7750 SPDX_PRETTY = "1"
7751
7752 The generated SPDX files are approximately 20% bigger, but
7753 this option is recommended if you want to inspect the SPDX
7754 output files with a text editor.
7755
Andrew Geisslerf0343792020-11-18 10:42:21 -06007756 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007757 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007758 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007759 mappings, see the ``meta/conf/licenses.conf`` file.
7760
7761 For additional information, see the :term:`LICENSE`
7762 variable.
7763
Andrew Geisslerf0343792020-11-18 10:42:21 -06007764 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007765 A list of prefixes for :term:`PN` used by the OpenEmbedded
7766 build system to create variants of recipes or packages. The list
7767 specifies the prefixes to strip off during certain circumstances such
7768 as the generation of the :term:`BPN` variable.
7769
Andrew Geisslerf0343792020-11-18 10:42:21 -06007770 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007771 The file type for the Secondary Program Loader (SPL). Some devices
7772 use an SPL from which to boot (e.g. the BeagleBone development
7773 board). For such cases, you can declare the file type of the SPL
7774 binary in the ``u-boot.inc`` include file, which is used in the
7775 U-Boot recipe.
7776
7777 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007778 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007779
7780 # Some versions of u-boot build an SPL (Second Program Loader) image that
7781 # should be packaged along with the u-boot binary as well as placed in the
7782 # deploy directory. For those versions they can set the following variables
7783 # to allow packaging the SPL.
7784 SPL_BINARY ?= ""
7785 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7786 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7787 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7788
Andrew Geissler09036742021-06-25 14:25:14 -05007789 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007790 various ``SPL_*`` variables used by the OpenEmbedded build system.
7791
7792 See the BeagleBone machine configuration example in the
Andrew Geissler517393d2023-01-13 08:55:19 -06007793 ":ref:`dev-manual/layers:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007794 section in the Yocto Project Board Support Package Developer's Guide
7795 for additional information.
7796
Patrick Williamsb542dec2023-06-09 01:26:37 -05007797 :term:`SPL_MKIMAGE_DTCOPTS`
7798 Options for the device tree compiler passed to ``mkimage -D`` feature
7799 while creating a FIT image with the :ref:`ref-classes-uboot-sign`
7800 class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the
7801 :ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option
7802 to ``mkimage``.
7803
7804 The default value is set to "" by the :ref:`ref-classes-uboot-config`
7805 class.
7806
7807 :term:`SPL_SIGN_ENABLE`
7808 Enable signing of the U-Boot FIT image. The default value is "0".
7809 This variable is used by the :ref:`ref-classes-uboot-sign` class.
7810
7811 :term:`SPL_SIGN_KEYDIR`
7812 Location of the directory containing the RSA key and certificate used for
7813 signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign`
7814 class.
7815
7816 :term:`SPL_SIGN_KEYNAME`
7817 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
7818 for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR`
7819 directory. If we have for example a ``dev.key`` key and a ``dev.crt``
7820 certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will
7821 have to set :term:`SPL_SIGN_KEYNAME` to ``dev``.
7822
7823 :term:`SPLASH`
7824 This variable, used by the :ref:`ref-classes-image` class, allows
7825 to choose splashscreen applications. Set it to the names of packages
7826 for such applications to use. This variable is set by default to
7827 ``psplash``.
7828
7829 :term:`SPLASH_IMAGES`
7830 This variable, used by the ``psplash`` recipe, allows to customize
7831 the default splashscreen image.
7832
7833 Specified images in PNG format are converted to ``.h`` files by the recipe,
7834 and are included in the ``psplash`` binary, so you won't find them in
7835 the root filesystem.
7836
7837 To make such a change, it is recommended to customize the
7838 ``psplash`` recipe in a custom layer. Here is an example structure for
7839 an ``ACME`` board::
7840
7841 meta-acme/recipes-core/psplash
7842 ├── files
7843 │   └── logo-acme.png
7844 └── psplash_%.bbappend
7845
7846 And here are the contents of the ``psplash_%.bbappend`` file in
7847 this example::
7848
7849 SPLASH_IMAGES = "file://logo-acme.png;outsuffix=default"
7850 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
7851
7852 You could even add specific configuration options for ``psplash``,
7853 for example::
7854
7855 EXTRA_OECONF += "--disable-startup-msg --enable-img-fullscreen"
7856
7857 For information on append files, see the
7858 ":ref:`dev-manual/layers:appending other layers metadata with your layer`"
7859 section.
7860
Andrew Geissler517393d2023-01-13 08:55:19 -06007861 :term:`SRCREV_FORMAT`
7862 See :term:`bitbake:SRCREV_FORMAT` in the BitBake manual.
7863
Andrew Geisslerf0343792020-11-18 10:42:21 -06007864 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007865
Andrew Geissler595f6302022-01-24 19:11:47 +00007866 See the BitBake manual for the initial description for this variable:
7867 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007868
Andrew Geissler595f6302022-01-24 19:11:47 +00007869 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007870
Andrew Geissler595f6302022-01-24 19:11:47 +00007871 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007872
Andrew Geissler615f2f12022-07-15 14:00:58 -05007873 - ``apply`` --- whether to apply the patch or not. The default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007874 action is to apply the patch.
7875
Andrew Geissler615f2f12022-07-15 14:00:58 -05007876 - ``striplevel`` --- which striplevel to use when applying the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007877 patch. The default level is 1.
7878
Andrew Geissler615f2f12022-07-15 14:00:58 -05007879 - ``patchdir`` --- specifies the directory in which the patch should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007880 be applied. The default is ``${``\ :term:`S`\ ``}``.
7881
7882 Here are options specific to recipes building code from a revision
7883 control system:
7884
Andrew Geissler615f2f12022-07-15 14:00:58 -05007885 - ``mindate`` --- apply the patch only if
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007886 :term:`SRCDATE` is equal to or greater than
7887 ``mindate``.
7888
Andrew Geissler615f2f12022-07-15 14:00:58 -05007889 - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007890 than ``maxdate``.
7891
Andrew Geissler615f2f12022-07-15 14:00:58 -05007892 - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007893 greater than ``minrev``.
7894
Andrew Geissler615f2f12022-07-15 14:00:58 -05007895 - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007896 than ``maxrev``.
7897
Andrew Geissler615f2f12022-07-15 14:00:58 -05007898 - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007899 ``rev``.
7900
Andrew Geissler615f2f12022-07-15 14:00:58 -05007901 - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007902 ``rev``.
7903
Andrew Geissler595f6302022-01-24 19:11:47 +00007904 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007905
Andrew Geissler595f6302022-01-24 19:11:47 +00007906 If you want the build system to pick up files specified through
7907 a :term:`SRC_URI` statement from your append file, you need to be
7908 sure to extend the :term:`FILESPATH` variable by also using the
7909 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007910
Andrew Geisslerf0343792020-11-18 10:42:21 -06007911 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007912 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007913 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007914 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007915 variable to "0" disables this behavior.
7916
Andrew Geisslerf0343792020-11-18 10:42:21 -06007917 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007918 The date of the source code used to build the package. This variable
7919 applies only if the source was fetched from a Source Code Manager
7920 (SCM).
7921
Andrew Geisslerf0343792020-11-18 10:42:21 -06007922 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007923 Returns the version string of the current package. This string is
7924 used to help define the value of :term:`PV`.
7925
Andrew Geissler09036742021-06-25 14:25:14 -05007926 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007927 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007928 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007929
7930 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7931
Andrew Geissler09036742021-06-25 14:25:14 -05007932 Recipes that need to define :term:`PV` do so with the help of the
7933 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007934 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007935 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007936
7937 PV = "0.12-git${SRCPV}"
7938
Andrew Geisslerf0343792020-11-18 10:42:21 -06007939 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007940 The revision of the source code used to build the package. This
7941 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7942 that if you want to build a fixed revision and you want to avoid
7943 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007944 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007945 identifier and not just a tag.
7946
7947 .. note::
7948
7949 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007950 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007951 description and the
Andrew Geissler517393d2023-01-13 08:55:19 -06007952 ":ref:`dev-manual/packages:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007953 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007954
Andrew Geissler09036742021-06-25 14:25:14 -05007955 :term:`SRCTREECOVEREDTASKS`
7956 A list of tasks that are typically not relevant (and therefore skipped)
Andrew Geissler517393d2023-01-13 08:55:19 -06007957 when building using the :ref:`ref-classes-externalsrc`
Andrew Geissler09036742021-06-25 14:25:14 -05007958 class. The default value as set in that class file is the set of tasks
7959 that are rarely needed when using external source::
7960
7961 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7962
7963 The notable exception is when processing external kernel source as
Andrew Geissler517393d2023-01-13 08:55:19 -06007964 defined in the :ref:`ref-classes-kernel-yocto` class file (formatted for
7965 aesthetics)::
Andrew Geissler09036742021-06-25 14:25:14 -05007966
7967 SRCTREECOVEREDTASKS += "\
7968 do_validate_branches \
7969 do_kernel_configcheck \
7970 do_kernel_checkout \
7971 do_fetch \
7972 do_unpack \
7973 do_patch \
7974 "
7975
7976 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7977 variables for more information.
7978
Andrew Geisslerf0343792020-11-18 10:42:21 -06007979 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007980 The directory for the shared state cache.
7981
Andrew Geissler615f2f12022-07-15 14:00:58 -05007982 :term:`SSTATE_EXCLUDEDEPS_SYSROOT`
7983 This variable allows to specify indirect dependencies to exclude
7984 from sysroots, for example to avoid the situations when a dependency on
7985 any ``-native`` recipe will pull in all dependencies of that recipe
7986 in the recipe sysroot. This behaviour might not always be wanted,
7987 for example when that ``-native`` recipe depends on build tools
7988 that are not relevant for the current recipe.
7989
7990 This way, irrelevant dependencies are ignored, which could have
7991 prevented the reuse of prebuilt artifacts stored in the Shared
7992 State Cache.
7993
Andrew Geissler517393d2023-01-13 08:55:19 -06007994 :term:`SSTATE_EXCLUDEDEPS_SYSROOT` is evaluated as two regular
Andrew Geissler615f2f12022-07-15 14:00:58 -05007995 expressions of recipe and dependency to ignore. An example
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06007996 is the rule in :oe_git:`meta/conf/layer.conf </openembedded-core/tree/meta/conf/layer.conf>`::
Andrew Geissler615f2f12022-07-15 14:00:58 -05007997
7998 # Nothing needs to depend on libc-initial
7999 # base-passwd/shadow-sysroot don't need their dependencies
8000 SSTATE_EXCLUDEDEPS_SYSROOT += "\
8001 .*->.*-initial.* \
8002 .*(base-passwd|shadow-sysroot)->.* \
8003 "
8004
8005 The ``->`` substring represents the dependency between
8006 the two regular expressions.
8007
Andrew Geisslerf0343792020-11-18 10:42:21 -06008008 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008009 If set to "1", allows fetches from mirrors that are specified in
8010 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05008011 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
8012 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
8013 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008014 your shared state cache, but you want to disable any other fetching
8015 from the network.
8016
Andrew Geisslerf0343792020-11-18 10:42:21 -06008017 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008018 Configures the OpenEmbedded build system to search other mirror
8019 locations for prebuilt cache data objects before building out the
8020 data. This variable works like fetcher :term:`MIRRORS`
8021 and :term:`PREMIRRORS` and points to the cache
8022 locations to check for the shared state (sstate) objects.
8023
8024 You can specify a filesystem directory or a remote URL such as HTTP
8025 or FTP. The locations you specify need to contain the shared state
8026 cache (sstate-cache) results from previous builds. The sstate-cache
8027 you point to can also be from builds on other machines.
8028
8029 When pointing to sstate build artifacts on another machine that uses
8030 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05008031 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008032 paths to server paths. The paths need to take into account
Andrew Geissler517393d2023-01-13 08:55:19 -06008033 :term:`NATIVELSBSTRING` set by the :ref:`ref-classes-uninative` class.
8034 For example, the following maps the local search path ``universal-4.9``
8035 to the server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008036
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008037 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008038
8039 If a mirror uses the same structure as
8040 :term:`SSTATE_DIR`, you need to add "PATH" at the
8041 end as shown in the examples below. The build system substitutes the
Andrew Geissler517393d2023-01-13 08:55:19 -06008042 correct path within the directory structure::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008043
8044 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008045 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008046 file://.* file:///some-local-dir/sstate/PATH"
8047
Andrew Geisslerf0343792020-11-18 10:42:21 -06008048 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008049 Controls the list of files the OpenEmbedded build system scans for
8050 hardcoded installation paths. The variable uses a space-separated
8051 list of filenames (not paths) with standard wildcard characters
8052 allowed.
8053
8054 During a build, the OpenEmbedded build system creates a shared state
8055 (sstate) object during the first stage of preparing the sysroots.
8056 That object is scanned for hardcoded paths for original installation
8057 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05008058 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
8059 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008060 than the variable being comprehensively set. The
Andrew Geissler517393d2023-01-13 08:55:19 -06008061 :ref:`ref-classes-sstate` class specifies the default list of files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008062
Andrew Geissler517393d2023-01-13 08:55:19 -06008063 For details on the process, see the :ref:`ref-classes-staging` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008064
Andrew Geisslerf0343792020-11-18 10:42:21 -06008065 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008066 Specifies the path to the ``/lib`` subdirectory of the sysroot
8067 directory for the build host.
8068
Andrew Geisslerf0343792020-11-18 10:42:21 -06008069 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008070 Specifies the path to the ``/lib`` subdirectory of the sysroot
8071 directory for the target for which the current recipe is being built
8072 (:term:`STAGING_DIR_HOST`).
8073
Andrew Geisslerf0343792020-11-18 10:42:21 -06008074 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008075 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
8076 directory for the target for which the current recipe is being built
8077 (:term:`STAGING_DIR_HOST`).
8078
Andrew Geisslerf0343792020-11-18 10:42:21 -06008079 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008080 Specifies the path to the directory containing binary configuration
8081 scripts. These scripts provide configuration information for other
8082 software that wants to make use of libraries or include files
8083 provided by the software associated with the script.
8084
8085 .. note::
8086
8087 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008088 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
8089 library to which you are linking, it is recommended you use
8090 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008091
Andrew Geisslerf0343792020-11-18 10:42:21 -06008092 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008093 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
8094 directory for the build host.
8095
Andrew Geisslerf0343792020-11-18 10:42:21 -06008096 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008097 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
8098 directory for the target for which the current recipe is being built
8099 (:term:`STAGING_DIR_HOST`).
8100
Andrew Geisslerf0343792020-11-18 10:42:21 -06008101 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008102 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
8103 directory for the build host.
8104
Andrew Geisslerf0343792020-11-18 10:42:21 -06008105 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008106 Helps construct the ``recipe-sysroots`` directory, which is used
8107 during packaging.
8108
8109 For information on how staging for recipe-specific sysroots occurs,
8110 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06008111 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008112 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008113 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008114 section in the Yocto Project Overview and Concepts Manual, and the
8115 :term:`SYSROOT_DIRS` variable.
8116
8117 .. note::
8118
Andrew Geissler09036742021-06-25 14:25:14 -05008119 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008120 directory because the OpenEmbedded build system manages the
8121 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008122 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008123 task and then the OpenEmbedded build system will stage a subset of
8124 those files into the sysroot.
8125
Andrew Geisslerf0343792020-11-18 10:42:21 -06008126 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008127 Specifies the path to the sysroot directory for the system on which
8128 the component is built to run (the system that hosts the component).
8129 For most recipes, this sysroot is the one in which that recipe's
8130 :ref:`ref-tasks-populate_sysroot` task copies
8131 files. Exceptions include ``-native`` recipes, where the
Patrick Williams2194f502022-10-16 14:26:09 -05008132 :ref:`ref-tasks-populate_sysroot` task instead uses
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008133 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05008134 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008135 have the following values:
8136
8137 - For recipes building for the target machine, the value is
8138 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
8139
8140 - For native recipes building for the build host, the value is empty
8141 given the assumption that when building for the build host, the
8142 build host's own directories should be used.
8143
8144 .. note::
8145
8146 ``-native`` recipes are not installed into host paths like such
8147 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04008148 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008149 standard build environment variables such as
8150 :term:`CPPFLAGS` and
8151 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05008152 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008153 headers using, for example, GCC's ``-isystem`` option.
8154
8155 Thus, the emphasis is that the ``STAGING_DIR*`` variables
8156 should be viewed as input variables by tasks such as
8157 :ref:`ref-tasks-configure`,
8158 :ref:`ref-tasks-compile`, and
8159 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05008160 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008161 for ``-native`` recipes, as they make use of host headers and
8162 libraries.
8163
Andrew Geisslerf0343792020-11-18 10:42:21 -06008164 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008165 Specifies the path to the sysroot directory used when building
8166 components that run on the build host itself.
8167
Andrew Geisslerf0343792020-11-18 10:42:21 -06008168 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008169 Specifies the path to the sysroot used for the system for which the
8170 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05008171 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008172 :term:`STAGING_DIR_HOST`.
8173
Andrew Geissler517393d2023-01-13 08:55:19 -06008174 Some recipes build binaries that can run on the target system but those
8175 binaries in turn generate code for another different system (e.g.
8176 :ref:`ref-classes-cross-canadian` recipes). Using terminology from GNU,
8177 the primary system is referred to as the "HOST" and the secondary, or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008178 different, system is referred to as the "TARGET". Thus, the binaries
8179 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05008180 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
8181 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008182 sysroot used for the "TARGET" system.
8183
Andrew Geisslerf0343792020-11-18 10:42:21 -06008184 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008185 Specifies the path to the ``/etc`` subdirectory of the sysroot
8186 directory for the build host.
8187
Andrew Geisslerf0343792020-11-18 10:42:21 -06008188 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008189 Specifies the path to the ``/usr`` subdirectory of the sysroot
8190 directory for the target for which the current recipe is being built
8191 (:term:`STAGING_DIR_HOST`).
8192
Andrew Geisslerf0343792020-11-18 10:42:21 -06008193 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008194 Specifies the path to the ``/usr/include`` subdirectory of the
8195 sysroot directory for the target for which the current recipe being
8196 built (:term:`STAGING_DIR_HOST`).
8197
Andrew Geisslerf0343792020-11-18 10:42:21 -06008198 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008199 Specifies the path to the ``/usr/include`` subdirectory of the
8200 sysroot directory for the build host.
8201
Andrew Geisslerf0343792020-11-18 10:42:21 -06008202 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008203 Points to the directory containing the kernel build artifacts.
8204 Recipes building software that needs to access kernel build artifacts
8205 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05008206 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008207 after the kernel has been built.
8208
Andrew Geisslerf0343792020-11-18 10:42:21 -06008209 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008210 The directory with kernel headers that are required to build
8211 out-of-tree modules.
8212
Andrew Geisslerf0343792020-11-18 10:42:21 -06008213 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008214 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
8215 directory for the target for which the current recipe is being built
8216 (:term:`STAGING_DIR_HOST`).
8217
Andrew Geisslerf0343792020-11-18 10:42:21 -06008218 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008219 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
8220 directory for the build host.
8221
Andrew Geisslerf0343792020-11-18 10:42:21 -06008222 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008223 Specifies the base path used to create recipe stamp files. The path
8224 to an actual stamp file is constructed by evaluating this string and
8225 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05008226 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008227 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008228
8229 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
8230
8231 For information on how BitBake uses stamp files to determine if a
8232 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008233 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008234 section in the Yocto Project Overview and Concepts Manual.
8235
8236 See :term:`STAMPS_DIR`,
8237 :term:`MULTIMACH_TARGET_SYS`,
8238 :term:`PN`, :term:`EXTENDPE`,
8239 :term:`PV`, and :term:`PR` for related variable
8240 information.
8241
Andrew Geissler517393d2023-01-13 08:55:19 -06008242 :term:`STAMPCLEAN`
8243 See :term:`bitbake:STAMPCLEAN` in the BitBake manual.
8244
Andrew Geisslerf0343792020-11-18 10:42:21 -06008245 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008246 Specifies the base directory in which the OpenEmbedded build system
8247 places stamps. The default directory is ``${TMPDIR}/stamps``.
8248
Andrew Geisslerf0343792020-11-18 10:42:21 -06008249 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008250 The minimal command and arguments to run ``strip``, which is used to
8251 strip symbols.
8252
Andrew Geisslerf0343792020-11-18 10:42:21 -06008253 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008254 The short (72 characters or less) summary of the binary package for
8255 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05008256 :term:`SUMMARY` is used to define the
8257 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008258 not set in the recipe.
8259
Andrew Geisslerf0343792020-11-18 10:42:21 -06008260 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008261 The directory in which files checked out of a Subversion system are
8262 stored.
8263
Andrew Geisslerf0343792020-11-18 10:42:21 -06008264 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008265 Specifies the kernel boot default console. If you want to use a
8266 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008267 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008268
8269 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
8270
Andrew Geissler517393d2023-01-13 08:55:19 -06008271 The :ref:`ref-classes-syslinux` class initially sets
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008272 this variable to null but then checks for a value later.
8273
Andrew Geisslerf0343792020-11-18 10:42:21 -06008274 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008275 Lists additional options to add to the syslinux file. You need to set
8276 this variable in your recipe. If you want to list multiple options,
8277 separate the options with a semicolon character (``;``).
8278
Andrew Geissler517393d2023-01-13 08:55:19 -06008279 The :ref:`ref-classes-syslinux` class uses this variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008280 to create a set of options.
8281
Andrew Geisslerf0343792020-11-18 10:42:21 -06008282 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008283 Specifies the alternate serial port or turns it off. To turn off
8284 serial, set this variable to an empty string in your recipe. The
8285 variable's default value is set in the
Andrew Geissler517393d2023-01-13 08:55:19 -06008286 :ref:`ref-classes-syslinux` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008287
8288 SYSLINUX_SERIAL ?= "0 115200"
8289
8290 The class checks for and uses the variable as needed.
8291
Andrew Geisslerf0343792020-11-18 10:42:21 -06008292 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008293 Specifies the alternate console=tty... kernel boot argument. The
Andrew Geissler517393d2023-01-13 08:55:19 -06008294 variable's default value is set in the :ref:`ref-classes-syslinux`
8295 class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008296
8297 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
8298
8299 The class checks for and uses the variable as needed.
8300
Andrew Geisslerf0343792020-11-18 10:42:21 -06008301 :term:`SYSLINUX_SPLASH`
8302 An ``.LSS`` file used as the background for the VGA boot menu when
8303 you use the boot menu. You need to set this variable in your recipe.
8304
Andrew Geissler517393d2023-01-13 08:55:19 -06008305 The :ref:`ref-classes-syslinux` class checks for this
Andrew Geisslerf0343792020-11-18 10:42:21 -06008306 variable and if found, the OpenEmbedded build system installs the
8307 splash screen.
8308
8309 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008310 Points to the temporary directory under the work directory (default
8311 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
8312 where the files populated into the sysroot are assembled during the
8313 :ref:`ref-tasks-populate_sysroot` task.
8314
Andrew Geisslerf0343792020-11-18 10:42:21 -06008315 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008316 Directories that are staged into the sysroot by the
8317 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05008318 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008319
8320 SYSROOT_DIRS = " \
8321 ${includedir} \
8322 ${libdir} \
8323 ${base_libdir} \
8324 ${nonarch_base_libdir} \
8325 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05008326 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008327 "
8328
Andrew Geissler9aee5002022-03-30 16:27:02 +00008329 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008330 Directories that are not staged into the sysroot by the
8331 :ref:`ref-tasks-populate_sysroot` task. You
8332 can use this variable to exclude certain subdirectories of
8333 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05008334 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008335
Andrew Geissler9aee5002022-03-30 16:27:02 +00008336 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008337 ${mandir} \
8338 ${docdir} \
8339 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05008340 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008341 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05008342 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008343 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05008344 ${datadir}/gtk-doc/html \
8345 ${datadir}/installed-tests \
8346 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008347 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05008348 ${datadir}/terminfo \
8349 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008350 "
8351
Andrew Geisslerf0343792020-11-18 10:42:21 -06008352 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008353 Extra directories staged into the sysroot by the
8354 :ref:`ref-tasks-populate_sysroot` task for
8355 ``-native`` recipes, in addition to those specified in
8356 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05008357 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008358
8359 SYSROOT_DIRS_NATIVE = " \
8360 ${bindir} \
8361 ${sbindir} \
8362 ${base_bindir} \
8363 ${base_sbindir} \
8364 ${libexecdir} \
8365 ${sysconfdir} \
8366 ${localstatedir} \
8367 "
8368
8369 .. note::
8370
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008371 Programs built by ``-native`` recipes run directly from the sysroot
8372 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
8373 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008374
Andrew Geisslerf0343792020-11-18 10:42:21 -06008375 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008376 A list of functions to execute after files are staged into the
8377 sysroot. These functions are usually used to apply additional
8378 processing on the staged files, or to stage additional files.
8379
Andrew Geisslerf0343792020-11-18 10:42:21 -06008380 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geissler517393d2023-01-13 08:55:19 -06008381 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008382 this variable specifies whether the specified service in
8383 :term:`SYSTEMD_SERVICE` should start
8384 automatically or not. By default, the service is enabled to
8385 automatically start at boot time. The default setting is in the
Andrew Geissler517393d2023-01-13 08:55:19 -06008386 :ref:`ref-classes-systemd` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008387
8388 SYSTEMD_AUTO_ENABLE ??= "enable"
8389
8390 You can disable the service by setting the variable to "disable".
8391
Andrew Geisslerf0343792020-11-18 10:42:21 -06008392 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008393 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008394 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008395 configuration file that should be used. By default, the
Andrew Geissler517393d2023-01-13 08:55:19 -06008396 :ref:`ref-classes-systemd-boot` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008397 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008398
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05008399 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008400
8401 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008402 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008403
Andrew Geisslerf0343792020-11-18 10:42:21 -06008404 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008405 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008406 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008407 list of entry files (``*.conf``) to install that contain one boot
Andrew Geissler517393d2023-01-13 08:55:19 -06008408 entry per file. By default, the :ref:`ref-classes-systemd-boot` class
8409 sets the :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008410
8411 SYSTEMD_BOOT_ENTRIES ?= ""
8412
8413 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008414 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008415
Andrew Geisslerf0343792020-11-18 10:42:21 -06008416 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008417 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008418 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008419 boot menu timeout in seconds. By default, the
Andrew Geissler517393d2023-01-13 08:55:19 -06008420 :ref:`ref-classes-systemd-boot` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008421 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008422
8423 SYSTEMD_BOOT_TIMEOUT ?= "10"
8424
8425 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008426 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008427
Andrew Geissler615f2f12022-07-15 14:00:58 -05008428 :term:`SYSTEMD_DEFAULT_TARGET`
8429
8430 This variable allows to set the default unit that systemd starts at bootup.
8431 Usually, this is either ``multi-user.target`` or ``graphical.target``.
8432 This works by creating a ``default.target`` symbolic link to the chosen systemd
8433 target file.
8434
8435 See `systemd's documentation
8436 <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__
8437 for details.
8438
Patrick Williams2390b1b2022-11-03 13:47:49 -05008439 For example, this variable is used in the :oe_git:`core-image-minimal-xfce.bb
8440 </meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>`
Andrew Geissler615f2f12022-07-15 14:00:58 -05008441 recipe::
8442
8443 SYSTEMD_DEFAULT_TARGET = "graphical.target"
8444
Andrew Geisslerf0343792020-11-18 10:42:21 -06008445 :term:`SYSTEMD_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06008446 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008447 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05008448 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008449 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05008450 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008451
8452 SYSTEMD_PACKAGES ?= "${PN}"
8453
8454 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05008455 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008456 the build system can find the systemd unit files.
8457
Andrew Geisslerf0343792020-11-18 10:42:21 -06008458 :term:`SYSTEMD_SERVICE`
Andrew Geissler517393d2023-01-13 08:55:19 -06008459 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008460 this variable specifies the systemd service name for a package.
8461
Andrew Geissler615f2f12022-07-15 14:00:58 -05008462 Multiple services can be specified, each one separated by a space.
8463
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008464 When you specify this file in your recipe, use a package name
8465 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008466 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008467
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008468 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008469
Andrew Geissler615f2f12022-07-15 14:00:58 -05008470 The package overrides that can be specified are directly related to the value of
Andrew Geissler517393d2023-01-13 08:55:19 -06008471 :term:`SYSTEMD_PACKAGES`. Overrides not included in :term:`SYSTEMD_PACKAGES`
Andrew Geissler615f2f12022-07-15 14:00:58 -05008472 will be silently ignored.
8473
Andrew Geisslerf0343792020-11-18 10:42:21 -06008474 :term:`SYSVINIT_ENABLED_GETTYS`
Patrick Williams8e7b46e2023-05-01 14:19:06 -05008475 When using :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008476 specifies a space-separated list of the virtual terminals that should
Patrick Williams8e7b46e2023-05-01 14:19:06 -05008477 run a :wikipedia:`getty <Getty_(Unix)>` (allowing login), assuming
8478 :term:`USE_VT` is not set to "0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008479
Andrew Geissler09036742021-06-25 14:25:14 -05008480 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008481 run a getty on the first virtual terminal).
8482
Andrew Geisslerf0343792020-11-18 10:42:21 -06008483 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008484 This variable points to a directory were BitBake places temporary
8485 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008486 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008487
8488 T = "${WORKDIR}/temp"
8489
8490 The :term:`WORKDIR` is the directory into which
8491 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
8492 file sets this variable.
8493
Andrew Geissler09036742021-06-25 14:25:14 -05008494 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008495 :term:`TMPDIR` variable, which points to the root of
8496 the directory tree where BitBake places the output of an entire
8497 build.
8498
Andrew Geisslerf0343792020-11-18 10:42:21 -06008499 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008500 The target machine's architecture. The OpenEmbedded build system
8501 supports many architectures. Here is an example list of architectures
8502 supported. This list is by no means complete as the architecture is
8503 configurable:
8504
8505 - arm
8506 - i586
8507 - x86_64
8508 - powerpc
8509 - powerpc64
8510 - mips
8511 - mipsel
8512
8513 For additional information on machine architectures, see the
8514 :term:`TUNE_ARCH` variable.
8515
Andrew Geisslerf0343792020-11-18 10:42:21 -06008516 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008517 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05008518 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008519 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05008520 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008521
8522 TARGET_AS_ARCH = "${TUNE_ASARGS}"
8523
Andrew Geisslerf0343792020-11-18 10:42:21 -06008524 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008525 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05008526 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008527 :term:`TUNE_CCARGS` by default.
8528
8529 .. note::
8530
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008531 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05008532 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
8533 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008534
Andrew Geisslerf0343792020-11-18 10:42:21 -06008535 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008536 This is a specific kernel compiler flag for a CPU or Application
8537 Binary Interface (ABI) tune. The flag is used rarely and only for
8538 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05008539 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008540 variable allows the kernel (and associated modules) to use a
8541 different configuration. See the
8542 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
8543 :term:`Source Directory` for an example.
8544
Andrew Geisslerf0343792020-11-18 10:42:21 -06008545 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008546 Specifies the flags to pass to the C compiler when building for the
8547 target. When building in the target context,
8548 :term:`CFLAGS` is set to the value of this variable by
8549 default.
8550
Andrew Geissler09036742021-06-25 14:25:14 -05008551 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
8552 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008553 executables built using the SDK also have the flags applied.
8554
Andrew Geisslerf0343792020-11-18 10:42:21 -06008555 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008556 Specifies the flags to pass to the C pre-processor (i.e. to both the
8557 C and the C++ compilers) when building for the target. When building
8558 in the target context, :term:`CPPFLAGS` is set to the
8559 value of this variable by default.
8560
8561 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008562 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008563 value so that executables built using the SDK also have the flags
8564 applied.
8565
Andrew Geisslerf0343792020-11-18 10:42:21 -06008566 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008567 Specifies the flags to pass to the C++ compiler when building for the
8568 target. When building in the target context,
8569 :term:`CXXFLAGS` is set to the value of this variable
8570 by default.
8571
8572 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008573 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008574 value so that executables built using the SDK also have the flags
8575 applied.
8576
Andrew Geisslerf0343792020-11-18 10:42:21 -06008577 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008578 Specifies the method for handling FPU code. For FPU-less targets,
8579 which include most ARM CPUs, the variable must be set to "soft". If
8580 not, the kernel emulation gets used, which results in a performance
8581 penalty.
8582
Andrew Geisslerf0343792020-11-18 10:42:21 -06008583 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008584 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05008585 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008586 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05008587 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008588
8589 TARGET_LD_ARCH = "${TUNE_LDARGS}"
8590
Andrew Geisslerf0343792020-11-18 10:42:21 -06008591 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008592 Specifies the flags to pass to the linker when building for the
8593 target. When building in the target context,
8594 :term:`LDFLAGS` is set to the value of this variable
8595 by default.
8596
8597 Additionally, the SDK's environment setup script sets the
8598 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05008599 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008600 have the flags applied.
8601
Andrew Geisslerf0343792020-11-18 10:42:21 -06008602 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008603 Specifies the target's operating system. The variable can be set to
8604 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008605 for musl libc. For ARM/EABI targets, the possible values are
8606 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008607
Andrew Geisslerf0343792020-11-18 10:42:21 -06008608 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008609 Specifies the prefix used for the toolchain binary target tools.
8610
8611 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04008612 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008613
8614 - For recipes building for the target machine, the value is
8615 "${:term:`TARGET_SYS`}-".
8616
8617 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04008618 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008619
Andrew Geissler517393d2023-01-13 08:55:19 -06008620 - For native SDK recipes (:ref:`ref-classes-nativesdk`),
8621 the build system sets the variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008622
Andrew Geisslerf0343792020-11-18 10:42:21 -06008623 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008624 Specifies the system, including the architecture and the operating
8625 system, for which the build is occurring in the context of the
8626 current recipe.
8627
8628 The OpenEmbedded build system automatically sets this variable based
8629 on :term:`TARGET_ARCH`,
8630 :term:`TARGET_VENDOR`, and
8631 :term:`TARGET_OS` variables.
8632
8633 .. note::
8634
Andrew Geissler09036742021-06-25 14:25:14 -05008635 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008636
8637 Consider these two examples:
8638
8639 - Given a native recipe on a 32-bit, x86 machine running Linux, the
8640 value is "i686-linux".
8641
8642 - Given a recipe being built for a little-endian, MIPS target
8643 running Linux, the value might be "mipsel-linux".
8644
Andrew Geisslerf0343792020-11-18 10:42:21 -06008645 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008646 Specifies the name of the target vendor.
8647
Andrew Geisslerf0343792020-11-18 10:42:21 -06008648 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008649 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008650 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008651
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008652 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008653
Andrew Geisslerf0343792020-11-18 10:42:21 -06008654 :term:`TCLIBCAPPEND`
Patrick Williams2390b1b2022-11-03 13:47:49 -05008655 Specifies a suffix to be appended onto the :term:`TMPDIR` value. The
8656 suffix identifies the ``libc`` variant for building. When you are
8657 building for multiple variants with the same :term:`Build Directory`,
8658 this mechanism ensures that output for different ``libc`` variants is
8659 kept separate to avoid potential conflicts.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008660
8661 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04008662 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008663 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05008664 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008665 in no suffix being applied.
8666
Andrew Geisslerf0343792020-11-18 10:42:21 -06008667 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05008668 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008669 characteristics of the generated packages and images by telling the
8670 OpenEmbedded build system which toolchain profile to use. By default,
8671 the OpenEmbedded build system builds its own internal toolchain. The
8672 variable's default value is "default", which uses that internal
8673 toolchain.
8674
8675 .. note::
8676
Andrew Geissler09036742021-06-25 14:25:14 -05008677 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008678 responsibility to ensure that the toolchain is compatible with the
8679 default toolchain. Using older or newer versions of these
Andrew Geissler517393d2023-01-13 08:55:19 -06008680 components might cause build problems. See
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06008681 :doc:`Release Information </migration-guides/index>` for your
Andrew Geissler517393d2023-01-13 08:55:19 -06008682 version of the Yocto Project, to find the specific components with
8683 which the toolchain must be compatible.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008684
Andrew Geissler09036742021-06-25 14:25:14 -05008685 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008686 which controls the variant of the GNU standard C library (``libc``)
8687 used during the build process: ``glibc`` or ``musl``.
8688
8689 With additional layers, it is possible to use a pre-compiled external
8690 toolchain. One example is the Sourcery G++ Toolchain. The support for
8691 this toolchain resides in the separate Mentor Graphics
8692 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008693 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008694
8695 The layer's ``README`` file contains information on how to use the
Andrew Geissler517393d2023-01-13 08:55:19 -06008696 Sourcery G++ Toolchain as an external toolchain. You will have to
8697 add the layer to your ``bblayers.conf`` file and then set the
8698 :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file to
8699 the location of the toolchain.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008700
8701 The fundamentals used for this example apply to any external
8702 toolchain. You can use ``meta-sourcery`` as a template for adding
8703 support for other external toolchains.
8704
Andrew Geissler517393d2023-01-13 08:55:19 -06008705 In addition to toolchain configuration, you will also need a
8706 corresponding toolchain recipe file. This recipe file needs to package
8707 up any pre-built objects in the toolchain such as ``libgcc``,
8708 ``libstdcc++``, any locales, and ``libc``.
8709
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008710 :term:`TC_CXX_RUNTIME`
8711 Specifies the C/C++ STL and runtime variant to use during
8712 the build process. Default value is 'gnu'
8713
8714 You can select "gnu", "llvm", or "android".
8715
Andrew Geisslerd5838332022-05-27 11:33:10 -05008716 :term:`TEMPLATECONF`
8717 Specifies the directory used by the build system to find templates
8718 from which to build the ``bblayers.conf`` and ``local.conf`` files.
8719 Use this variable if you wish to customize such files, and the default
8720 BitBake targets shown when sourcing the ``oe-init-build-env`` script.
8721
8722 For details, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008723 :ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory`
Andrew Geisslerd5838332022-05-27 11:33:10 -05008724 section in the Yocto Project Development Tasks manual.
8725
8726 .. note::
8727
8728 You must set this variable in the external environment in order
8729 for it to work.
8730
Andrew Geisslerf0343792020-11-18 10:42:21 -06008731 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008732 The location the OpenEmbedded build system uses to export tests when
8733 the :term:`TEST_EXPORT_ONLY` variable is set
8734 to "1".
8735
Andrew Geissler09036742021-06-25 14:25:14 -05008736 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008737 ``"${TMPDIR}/testimage/${PN}"``.
8738
Andrew Geisslerf0343792020-11-18 10:42:21 -06008739 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008740 Specifies to export the tests only. Set this variable to "1" if you
8741 do not want to run the tests but you want them to be exported in a
8742 manner that you to run them outside of the build system.
8743
Andrew Geisslerf0343792020-11-18 10:42:21 -06008744 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008745 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05008746 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008747
8748 .. note::
8749
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008750 Actual test results reside in the task log (``log.do_testimage``),
8751 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008752
Andrew Geisslerf0343792020-11-18 10:42:21 -06008753 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008754 For automated hardware testing, specifies the command to use to
8755 control the power of the target machine under test. Typically, this
8756 command would point to a script that performs the appropriate action
8757 (e.g. interacting with a web-enabled power strip). The specified
8758 command should expect to receive as the last argument "off", "on" or
8759 "cycle" specifying to power off, on, or cycle (power off and then
8760 power on) the device, respectively.
8761
Andrew Geisslerf0343792020-11-18 10:42:21 -06008762 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008763 For automated hardware testing, specifies additional arguments to
8764 pass through to the command specified in
8765 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008766 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008767 wish, for example, to separate the machine-specific and
8768 non-machine-specific parts of the arguments.
8769
Andrew Geisslerf0343792020-11-18 10:42:21 -06008770 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008771 The time in seconds allowed for an image to boot before automated
8772 runtime tests begin to run against an image. The default timeout
8773 period to allow the boot process to reach the login prompt is 500
8774 seconds. You can specify a different value in the ``local.conf``
8775 file.
8776
8777 For more information on testing images, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008778 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008779 section in the Yocto Project Development Tasks Manual.
8780
Andrew Geisslerf0343792020-11-18 10:42:21 -06008781 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008782 For automated hardware testing, specifies the command to use to
8783 connect to the serial console of the target machine under test. This
8784 command simply needs to connect to the serial console and forward
8785 that connection to standard input and output as any normal terminal
8786 program does.
8787
8788 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05008789 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008790
8791 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8792
Andrew Geisslerf0343792020-11-18 10:42:21 -06008793 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008794 For automated hardware testing, specifies additional arguments to
8795 pass through to the command specified in
8796 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008797 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008798 wish, for example, to separate the machine-specific and
8799 non-machine-specific parts of the command.
8800
Andrew Geisslerf0343792020-11-18 10:42:21 -06008801 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008802 The IP address of the build machine (host machine). This IP address
8803 is usually automatically detected. However, if detection fails, this
8804 variable needs to be set to the IP address of the build machine (i.e.
8805 where the build is taking place).
8806
8807 .. note::
8808
Andrew Geissler09036742021-06-25 14:25:14 -05008809 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008810 tests such as the "dnf" test suite, which needs to download packages
8811 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008812
Andrew Geisslerf0343792020-11-18 10:42:21 -06008813 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008814 An ordered list of tests (modules) to run against an image when
8815 performing automated runtime testing.
8816
8817 The OpenEmbedded build system provides a core set of tests that can
8818 be used against images.
8819
8820 .. note::
8821
8822 Currently, there is only support for running these tests under
8823 QEMU.
8824
8825 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05008826 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008827 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008828
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008829 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008830
8831 Alternatively, you can
8832 provide the "auto" option to have all applicable tests run against
Andrew Geissler517393d2023-01-13 08:55:19 -06008833 the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008834
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008835 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008836
8837 Using this option causes the
8838 build system to automatically run tests that are applicable to the
8839 image. Tests that are not applicable are skipped.
8840
8841 The order in which tests are run is important. Tests that depend on
8842 another test must appear later in the list than the test on which
8843 they depend. For example, if you append the list of tests with two
8844 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05008845 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008846
8847 TEST_SUITES = "test_A test_B"
8848
8849 For more information on testing images, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008850 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008851 section in the Yocto Project Development Tasks Manual.
8852
Andrew Geisslerf0343792020-11-18 10:42:21 -06008853 :term:`TEST_TARGET`
8854 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008855 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008856
8857 TEST_TARGET = "qemu"
8858
8859 A target controller is a class that defines how an image gets
8860 deployed on a target and how a target is started. A layer can extend
8861 the controllers by adding a module in the layer's
8862 ``/lib/oeqa/controllers`` directory and by inheriting the
8863 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05008864 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008865
Andrew Geissler5f350902021-07-23 13:09:54 -04008866 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06008867
8868 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06008869 ":ref:`dev-manual/runtime-testing:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06008870 in the Yocto Project Development Tasks Manual for more
8871 information.
8872
8873 - *"simpleremote":* Runs the tests on target hardware that is
8874 already up and running. The hardware can be on the network or it
8875 can be a device running an image on QEMU. You must also set
8876 :term:`TEST_TARGET_IP` when you use
8877 "simpleremote".
8878
8879 .. note::
8880
8881 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008882 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008883
8884 For information on running tests on hardware, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008885 ":ref:`dev-manual/runtime-testing:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008886 section in the Yocto Project Development Tasks Manual.
8887
8888 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05008889 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06008890 variable has no effect when :term:`TEST_TARGET` is
8891 set to "qemu".
8892
8893 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008894 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008895
8896 TEST_TARGET_IP = "192.168.1.4:2201"
8897
8898 Specifying a port is
8899 useful when SSH is started on a non-standard port or in cases when
8900 your hardware under test is behind a firewall or network that is not
8901 directly accessible from your host and you need to do port address
8902 translation.
8903
8904 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008905 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008906 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008907 any image that successfully builds to automatically boot under QEMU.
8908 Using the variable also adds in dependencies so that any SDK for
8909 which testing is requested is automatically built first.
8910
8911 These tests are written in Python making use of the ``unittest``
8912 module, and the majority of them run commands on the target system
8913 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8914 file in the :term:`Build Directory` to have the
8915 OpenEmbedded build system automatically run these tests after an
8916 image successfully builds:
8917
8918 TESTIMAGE_AUTO = "1"
8919
8920 For more information
8921 on enabling, running, and writing these tests, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008922 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008923 section in the Yocto Project Development Tasks Manual and the
Patrick Williams975a06f2022-10-21 14:42:47 -05008924 ":ref:`ref-classes-testimage`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008925
Andrew Geisslerf0343792020-11-18 10:42:21 -06008926 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008927 The directory in which the file BitBake is currently parsing is
8928 located. Do not manually set this variable.
8929
Andrew Geisslerf0343792020-11-18 10:42:21 -06008930 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008931 The time the build was started. Times appear using the hour, minute,
8932 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8933 seconds past 1400 hours).
8934
Andrew Geisslerf0343792020-11-18 10:42:21 -06008935 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008936 This variable is the base directory the OpenEmbedded build system
8937 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008938 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008939 ``tmp`` within the :term:`Build Directory`.
8940
8941 If you want to establish this directory in a location other than the
8942 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008943 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008944
8945 #TMPDIR = "${TOPDIR}/tmp"
8946
Andrew Geissler09036742021-06-25 14:25:14 -05008947 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Patrick Williams2390b1b2022-11-03 13:47:49 -05008948 which does not use NFS, while having the :term:`Build Directory` use NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008949
Andrew Geissler09036742021-06-25 14:25:14 -05008950 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008951 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8952 persistent inodes). Due to various issues with NFS and bugs in some
8953 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008954 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008955
Andrew Geisslerf0343792020-11-18 10:42:21 -06008956 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008957 This variable lists packages the OpenEmbedded build system uses when
8958 building an SDK, which contains a cross-development environment. The
8959 packages specified by this variable are part of the toolchain set
8960 that runs on the :term:`SDKMACHINE`, and each
8961 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008962 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008963
8964 $ bitbake -c populate_sdk imagename
8965
8966 In this case, a default list of packages is
8967 set in this variable, but you can add additional packages to the
8968 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008969 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008970 in the Yocto Project Application Development and the Extensible
8971 Software Development Kit (eSDK) manual for more information.
8972
8973 For background information on cross-development toolchains in the
8974 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008975 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008976 section in the Yocto Project Overview and Concepts Manual. For
8977 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008978 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008979
Andrew Geisslereff27472021-10-29 15:35:00 -05008980 Note that this variable applies to building an SDK, not an eSDK,
Andrew Geissler517393d2023-01-13 08:55:19 -06008981 in which case the :term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
Andrew Geisslereff27472021-10-29 15:35:00 -05008982 used instead.
8983
8984 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8985 This variable allows to extend what is installed in the host
8986 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8987 applying to SDKs.
8988
Andrew Geisslerf0343792020-11-18 10:42:21 -06008989 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008990 This variable defines the name used for the toolchain output. The
8991 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008992 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008993
8994 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8995
8996 See
8997 the :term:`SDK_NAME` and
8998 :term:`SDK_VERSION` variables for additional
8999 information.
9000
Andrew Geisslerf0343792020-11-18 10:42:21 -06009001 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009002 This variable lists packages the OpenEmbedded build system uses when
9003 it creates the target part of an SDK (i.e. the part built for the
9004 target hardware), which includes libraries and headers. Use this
9005 variable to add individual packages to the part of the SDK that runs
9006 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009007 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009008 in the Yocto Project Application Development and the Extensible
9009 Software Development Kit (eSDK) manual for more information.
9010
9011 For background information on cross-development toolchains in the
9012 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009013 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009014 section in the Yocto Project Overview and Concepts Manual. For
9015 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009016 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009017
Andrew Geissler517393d2023-01-13 08:55:19 -06009018 :term:`TOPDIR`
9019 See :term:`bitbake:TOPDIR` in the BitBake manual.
9020
Andrew Geisslerf0343792020-11-18 10:42:21 -06009021 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009022 A sanitized version of :term:`TARGET_ARCH`. This
9023 variable is used where the architecture is needed in a value where
9024 underscores are not allowed, for example within package filenames. In
9025 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05009026 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009027
9028 Do not edit this variable.
9029
Andrew Geisslerf0343792020-11-18 10:42:21 -06009030 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009031 The GNU canonical architecture for a specific architecture (i.e.
9032 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
9033 this value to setup configuration.
9034
Andrew Geissler09036742021-06-25 14:25:14 -05009035 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009036 definitions can be a single static definition, or can be dynamically
9037 adjusted. You can see details for a given CPU family by looking at
9038 the architecture's ``README`` file. For example, the
9039 ``meta/conf/machine/include/mips/README`` file in the
9040 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05009041 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009042
Andrew Geissler09036742021-06-25 14:25:14 -05009043 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009044 :term:`TARGET_ARCH`, which defines the target
9045 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05009046 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009047
9048 TARGET_ARCH = "${TUNE_ARCH}"
9049
9050 The following list, which is by no means complete since architectures
9051 are configurable, shows supported machine architectures:
9052
9053 - arm
9054 - i586
9055 - x86_64
9056 - powerpc
9057 - powerpc64
9058 - mips
9059 - mipsel
9060
Andrew Geisslerf0343792020-11-18 10:42:21 -06009061 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009062 Specifies architecture-specific assembler flags for the target
9063 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05009064 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009065 typically under ``meta/conf/machine/include/`` and are influenced
9066 through :term:`TUNE_FEATURES`. For example, the
9067 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05009068 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009069
9070 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
9071
9072 .. note::
9073
9074 Board Support Packages (BSPs) select the tune. The selected tune,
9075 in turn, affects the tune variables themselves (i.e. the tune can
9076 supply its own set of flags).
9077
Andrew Geisslerf0343792020-11-18 10:42:21 -06009078 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009079 Specifies architecture-specific C compiler flags for the target
9080 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05009081 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009082 typically under ``meta/conf/machine/include/`` and are influenced
9083 through :term:`TUNE_FEATURES`.
9084
9085 .. note::
9086
9087 Board Support Packages (BSPs) select the tune. The selected tune,
9088 in turn, affects the tune variables themselves (i.e. the tune can
9089 supply its own set of flags).
9090
Andrew Geisslerf0343792020-11-18 10:42:21 -06009091 :term:`TUNE_FEATURES`
9092 Features used to "tune" a compiler for optimal use given a specific
9093 processor. The features are defined within the tune files and allow
9094 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
9095 the features.
9096
9097 The OpenEmbedded build system verifies the features to be sure they
9098 are not conflicting and that they are supported.
9099
9100 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05009101 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06009102
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009103 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06009104
9105 See the :term:`DEFAULTTUNE` variable for more information.
9106
9107 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009108 Specifies architecture-specific linker flags for the target system.
9109 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05009110 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009111 typically under ``meta/conf/machine/include/`` and are influenced
9112 through :term:`TUNE_FEATURES`. For example, the
9113 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05009114 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009115
9116 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
9117
9118 .. note::
9119
9120 Board Support Packages (BSPs) select the tune. The selected tune,
9121 in turn, affects the tune variables themselves (i.e. the tune can
9122 supply its own set of flags).
9123
Andrew Geisslerf0343792020-11-18 10:42:21 -06009124 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009125 The package architecture understood by the packaging system to define
9126 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05009127 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009128
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009129 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009130
9131 These tune-specific package architectures are defined in the machine
9132 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05009133 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009134
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009135 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009136
Andrew Geisslerf0343792020-11-18 10:42:21 -06009137 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009138 Specifies CPU or Application Binary Interface (ABI) tuning features
9139 that conflict with feature.
9140
9141 Known tuning conflicts are specified in the machine include files in
9142 the :term:`Source Directory`. Here is an example from
9143 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
9144 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05009145 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009146
9147 TUNECONFLICTS[n32] = "o32 n64"
9148
Andrew Geisslerf0343792020-11-18 10:42:21 -06009149 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009150 Specifies a valid CPU or Application Binary Interface (ABI) tuning
9151 feature. The specified feature is stored as a flag. Valid features
9152 are specified in the machine include files (e.g.
9153 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05009154 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009155
9156 TUNEVALID[bigendian] = "Enable big-endian mode."
9157
9158 See the machine include files in the :term:`Source Directory`
9159 for these features.
9160
Andrew Geisslerf0343792020-11-18 10:42:21 -06009161 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009162 Configures the :term:`UBOOT_MACHINE` and can
9163 also define :term:`IMAGE_FSTYPES` for individual
9164 cases.
9165
9166 Following is an example from the ``meta-fsl-arm`` layer. ::
9167
9168 UBOOT_CONFIG ??= "sd"
9169 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
9170 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
9171 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
9172 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
9173
9174 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05009175 :term:`UBOOT_MACHINE`. The "sd" configuration defines
9176 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04009177 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009178
Andrew Geissler09036742021-06-25 14:25:14 -05009179 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009180 :ref:`ref-classes-uboot-config` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009181
Andrew Geisslerf0343792020-11-18 10:42:21 -06009182 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009183 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05009184 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geissler517393d2023-01-13 08:55:19 -06009185 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be
9186 used in creating the dtb sections of Image Tree Source for the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009187
Andrew Geisslerf0343792020-11-18 10:42:21 -06009188 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009189 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05009190 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geissler517393d2023-01-13 08:55:19 -06009191 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be
9192 used in creating the dtbo sections of Image Tree Source for the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009193
Andrew Geisslerf0343792020-11-18 10:42:21 -06009194 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009195 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05009196 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009197 command-line parameter to the ``uboot-mkimage`` utility.
9198
Patrick Williamsb542dec2023-06-09 01:26:37 -05009199 To pass a 64 bit address for FIT image creation, you will need to set:
9200 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation.
9201 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation.
Andrew Geissler3eeda902023-05-19 10:14:02 -05009202
Patrick Williamsb542dec2023-06-09 01:26:37 -05009203 This variable is used by the :ref:`ref-classes-kernel-fitimage`,
9204 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`,
9205 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
9206 classes.
9207
9208 :term:`UBOOT_FIT_ADDRESS_CELLS`
9209 Specifies the value of the ``#address-cells`` value for the
9210 description of the U-Boot FIT image.
9211
9212 The default value is set to "1" by the :ref:`ref-classes-uboot-sign`
9213 class, which corresponds to 32 bit addresses.
9214
9215 For platforms that need to set 64 bit addresses in
9216 :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to
9217 set this value to "2", as two 32 bit values (cells) will be needed
9218 to represent such addresses.
9219
9220 Here is an example setting "0x400000000" as a load address::
9221
9222 UBOOT_FIT_ADDRESS_CELLS = "2"
9223 UBOOT_LOADADDRESS= "0x04 0x00000000"
9224
9225 See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__.
9226
9227 :term:`UBOOT_FIT_DESC`
9228 Specifies the description string encoded into a U-Boot fitImage. The default
9229 value is set by the :ref:`ref-classes-uboot-sign` class as follows::
9230
9231 UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
9232
9233 :term:`UBOOT_FIT_GENERATE_KEYS`
9234 Decides whether to generate the keys for signing the U-Boot fitImage if
9235 they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`.
9236 The default value is "0".
9237
9238 Enable this as follows::
9239
9240 UBOOT_FIT_GENERATE_KEYS = "1"
9241
9242 This variable is used in the :ref:`ref-classes-uboot-sign` class.
9243
9244 :term:`UBOOT_FIT_HASH_ALG`
9245 Specifies the hash algorithm used in creating the U-Boot FIT Image.
9246 It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign`
9247 class.
9248
9249 :term:`UBOOT_FIT_KEY_GENRSA_ARGS`
9250 Arguments to ``openssl genrsa`` for generating a RSA private key for
9251 signing the U-Boot FIT image. The default value of this variable
9252 is set to "-F4" by the :ref:`ref-classes-uboot-sign` class.
9253
9254 :term:`UBOOT_FIT_KEY_REQ_ARGS`
9255 Arguments to ``openssl req`` for generating a certificate for signing
9256 the U-Boot FIT image. The default value is "-batch -new" by the
9257 :ref:`ref-classes-uboot-sign` class, "batch" for
9258 non interactive mode and "new" for generating new keys.
9259
9260 :term:`UBOOT_FIT_KEY_SIGN_PKCS`
9261 Format for the public key certificate used for signing the U-Boot FIT
9262 image. The default value is set to "x509" by the
9263 :ref:`ref-classes-uboot-sign` class.
9264
9265 :term:`UBOOT_FIT_SIGN_ALG`
9266 Specifies the signature algorithm used in creating the U-Boot FIT Image.
9267 This variable is set by default to "rsa2048" by the
9268 :ref:`ref-classes-uboot-sign` class.
9269
9270 :term:`UBOOT_FIT_SIGN_NUMBITS`
9271 Size of the private key used in signing the U-Boot FIT image, in number
9272 of bits. The default value for this variable is set to "2048"
9273 by the :ref:`ref-classes-uboot-sign` class.
9274
9275 :term:`UBOOT_FITIMAGE_ENABLE`
9276 This variable allows to generate a FIT image for U-Boot, which is one
9277 of the ways to implement a verified boot process.
9278
9279 Its default value is "0", so set it to "1" to enable this functionality::
9280
9281 UBOOT_FITIMAGE_ENABLE = "1"
9282
9283 See the :ref:`ref-classes-uboot-sign` class for details.
9284
Andrew Geisslerf0343792020-11-18 10:42:21 -06009285 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009286 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05009287 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009288 command-line parameter to the ``uboot-mkimage`` utility.
9289
Patrick Williamsb542dec2023-06-09 01:26:37 -05009290 To pass a 64 bit address, you will also need to set:
9291
9292 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation.
9293 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation.
9294
9295 This variable is used by the :ref:`ref-classes-kernel-fitimage`,
9296 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`,
9297 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
9298 classes.
Andrew Geissler3eeda902023-05-19 10:14:02 -05009299
Andrew Geisslerf0343792020-11-18 10:42:21 -06009300 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009301 Appends a string to the name of the local version of the U-Boot
9302 image. For example, assuming the version of the U-Boot image built
9303 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05009304 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009305
9306 UBOOT_LOCALVERSION = "-yocto"
9307
Andrew Geisslerf0343792020-11-18 10:42:21 -06009308 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009309 Specifies the value passed on the ``make`` command line when building
9310 a U-Boot image. The value indicates the target platform
9311 configuration. You typically set this variable from the machine
9312 configuration file (i.e. ``conf/machine/machine_name.conf``).
9313
9314 Please see the "Selection of Processor Architecture and Board Type"
9315 section in the U-Boot README for valid values for this variable.
9316
Andrew Geisslerf0343792020-11-18 10:42:21 -06009317 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009318 Specifies the target called in the ``Makefile``. The default target
9319 is "all".
9320
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009321 :term:`UBOOT_MKIMAGE`
9322 Specifies the name of the mkimage command as used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06009323 :ref:`ref-classes-kernel-fitimage` class to assemble
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009324 the FIT image. This can be used to substitute an alternative command, wrapper
9325 script or function if desired. The default is "uboot-mkimage".
9326
Andrew Geisslerf0343792020-11-18 10:42:21 -06009327 :term:`UBOOT_MKIMAGE_DTCOPTS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05009328 Options for the device tree compiler passed to ``mkimage -D`` feature
9329 while creating a FIT image with the :ref:`ref-classes-kernel-fitimage`
9330 class. If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then the
9331 :ref:`ref-classes-kernel-fitimage` class will not pass the ``-D`` option
9332 to ``mkimage``.
9333
9334 This variable is also used by the :ref:`ref-classes-uboot-sign` class.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009335
Patrick Williams975a06f2022-10-21 14:42:47 -05009336 :term:`UBOOT_MKIMAGE_KERNEL_TYPE`
9337 Specifies the type argument for the kernel as passed to ``uboot-mkimage``.
9338 The default value is "kernel".
9339
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009340 :term:`UBOOT_MKIMAGE_SIGN`
9341 Specifies the name of the mkimage command as used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06009342 :ref:`ref-classes-kernel-fitimage` class to sign
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009343 the FIT image after it has been assembled (if enabled). This can be used
9344 to substitute an alternative command, wrapper script or function if
9345 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
9346
9347 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
9348 Optionally specifies additional arguments for the
Andrew Geissler517393d2023-01-13 08:55:19 -06009349 :ref:`ref-classes-kernel-fitimage` class to pass to the
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009350 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009351
Andrew Geisslerf0343792020-11-18 10:42:21 -06009352 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06009353 Specifies the entrypoint for the RAM disk image. During FIT image
9354 creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in
9355 :ref:`ref-classes-kernel-fitimage` class to specify the entrypoint to be
9356 used in creating the Image Tree Source for the FIT image.
Andrew Geissler4873add2020-11-02 18:44:49 -06009357
Andrew Geisslerf0343792020-11-18 10:42:21 -06009358 :term:`UBOOT_RD_LOADADDRESS`
Andrew Geissler517393d2023-01-13 08:55:19 -06009359 Specifies the load address for the RAM disk image. During FIT image
9360 creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in
9361 :ref:`ref-classes-kernel-fitimage` class to specify the load address to
9362 be used in creating the Image Tree Source for the FIT image.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009363
9364 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009365 Enable signing of FIT image. The default value is "0".
9366
Patrick Williamsb542dec2023-06-09 01:26:37 -05009367 This variable is used by the :ref:`ref-classes-kernel-fitimage`,
9368 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
9369 classes.
9370
Andrew Geisslerf0343792020-11-18 10:42:21 -06009371 :term:`UBOOT_SIGN_KEYDIR`
Patrick Williamsb542dec2023-06-09 01:26:37 -05009372 Location of the directory containing the RSA key and certificate used for
9373 signing FIT image, used by the :ref:`ref-classes-kernel-fitimage` and
9374 :ref:`ref-classes-uboot-sign` classes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009375
Andrew Geisslerf0343792020-11-18 10:42:21 -06009376 :term:`UBOOT_SIGN_KEYNAME`
Patrick Williamsb542dec2023-06-09 01:26:37 -05009377 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
9378 for signing U-Boot FIT image stored in the :term:`UBOOT_SIGN_KEYDIR`
9379 directory. If we have for example a ``dev.key`` key and a ``dev.crt``
9380 certificate stored in the :term:`UBOOT_SIGN_KEYDIR` directory, you will
9381 have to set :term:`UBOOT_SIGN_KEYNAME` to ``dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009382
Andrew Geisslerf0343792020-11-18 10:42:21 -06009383 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009384 Points to the generated U-Boot extension. For example, ``u-boot.sb``
9385 has a ``.sb`` extension.
9386
9387 The default U-Boot extension is ``.bin``
9388
Andrew Geisslerf0343792020-11-18 10:42:21 -06009389 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009390 Specifies the target used for building U-Boot. The target is passed
9391 directly as part of the "make" command (e.g. SPL and AIS). If you do
9392 not specifically set this variable, the OpenEmbedded build process
9393 passes and uses "all" for the target during the U-Boot building
9394 process.
9395
Andrew Geissler9aee5002022-03-30 16:27:02 +00009396 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009397 Specifies a list of options that, if reported by the configure script
9398 as being invalid, should not generate a warning during the
9399 :ref:`ref-tasks-configure` task. Normally, invalid
9400 configure options are simply not passed to the configure script (e.g.
9401 should be removed from :term:`EXTRA_OECONF` or
9402 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07009403 However, there are common options that are passed to all
9404 configure scripts at a class level, but might not be valid for some
9405 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00009406 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009407
9408 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00009409 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geissler517393d2023-01-13 08:55:19 -06009410 :ref:`ref-classes-insane` class and is only enabled if the
9411 recipe inherits the :ref:`ref-classes-autotools` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009412
Andrew Geisslerf0343792020-11-18 10:42:21 -06009413 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009414 For recipes inheriting the
Andrew Geissler517393d2023-01-13 08:55:19 -06009415 :ref:`ref-classes-update-rc.d` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009416 specifies the package that contains the initscript that is enabled.
9417
9418 The default value is "${PN}". Given that almost all recipes that
9419 install initscripts package them in the main package for the recipe,
9420 you rarely need to set this variable in individual recipes.
9421
Andrew Geissler5199d832021-09-24 16:47:35 -05009422 :term:`UPSTREAM_CHECK_COMMITS`
9423 You can perform a per-recipe check for what the latest upstream
9424 source code version is by calling ``devtool latest-version recipe``. If
9425 the recipe source code is provided from Git repositories, but
9426 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
9427 to ``1`` in the recipe, and the OpenEmbedded build system
9428 will compare the latest commit with the one currently specified
Andrew Geissler517393d2023-01-13 08:55:19 -06009429 by the recipe (:term:`SRCREV`)::
Andrew Geissler5199d832021-09-24 16:47:35 -05009430
9431 UPSTREAM_CHECK_COMMITS = "1"
9432
Andrew Geisslerf0343792020-11-18 10:42:21 -06009433 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009434 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05009435 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009436 the recipe source code is provided from Git repositories, the
9437 OpenEmbedded build system determines the latest upstream version by
9438 picking the latest tag from the list of all repository tags.
9439
Andrew Geissler09036742021-06-25 14:25:14 -05009440 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009441 regular expression to filter only the relevant tags should the
Andrew Geissler517393d2023-01-13 08:55:19 -06009442 default filter not work correctly::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009443
9444 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
9445
Andrew Geisslerf0343792020-11-18 10:42:21 -06009446 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05009447 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009448 regular expression instead of the default one when the package
9449 checking system is parsing the page found using
Andrew Geissler517393d2023-01-13 08:55:19 -06009450 :term:`UPSTREAM_CHECK_URI`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009451
9452 UPSTREAM_CHECK_REGEX = "package_regex"
9453
Andrew Geisslerf0343792020-11-18 10:42:21 -06009454 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009455 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05009456 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009457 the source code is provided from tarballs, the latest version is
9458 determined by fetching the directory listing where the tarball is and
9459 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05009460 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geissler517393d2023-01-13 08:55:19 -06009461 contains the link to the latest tarball::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009462
9463 UPSTREAM_CHECK_URI = "recipe_url"
9464
Andrew Geissler5199d832021-09-24 16:47:35 -05009465 :term:`UPSTREAM_VERSION_UNKNOWN`
9466 You can perform a per-recipe check for what the latest upstream
9467 source code version is by calling ``devtool latest-version recipe``.
9468 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
9469 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
9470 the recipe allows to determine what the latest upstream version is,
9471 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
Andrew Geissler517393d2023-01-13 08:55:19 -06009472 to acknowledge that the check cannot be performed::
Andrew Geissler5199d832021-09-24 16:47:35 -05009473
9474 UPSTREAM_VERSION_UNKNOWN = "1"
9475
Andrew Geisslerf0343792020-11-18 10:42:21 -06009476 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009477 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05009478 default value used for :term:`USE_DEVFS` is "1" when no value is
9479 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009480 statically populated ``/dev`` directory.
9481
Andrew Geissler517393d2023-01-13 08:55:19 -06009482 See the ":ref:`dev-manual/device-manager:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009483 the Yocto Project Development Tasks Manual for information on how to
9484 use this variable.
9485
Andrew Geisslerf0343792020-11-18 10:42:21 -06009486 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009487 When using
Andrew Geissler517393d2023-01-13 08:55:19 -06009488 :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`,
Patrick Williams8e7b46e2023-05-01 14:19:06 -05009489 determines whether or not to run a :wikipedia:`getty <Getty_(Unix)>`
9490 on any virtual terminals in order to enable logging in through those
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009491 terminals.
9492
Andrew Geissler09036742021-06-25 14:25:14 -05009493 The default value used for :term:`USE_VT` is "1" when no default value is
9494 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009495 machine configuration file for machines that do not have a graphical
9496 display attached and therefore do not need virtual terminal
9497 functionality.
9498
Andrew Geisslerf0343792020-11-18 10:42:21 -06009499 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009500 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00009501 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009502
Patrick Williams975a06f2022-10-21 14:42:47 -05009503 Classes inherited using :term:`USER_CLASSES` must be located in the
9504 ``classes-global/`` or ``classes/`` subdirectories.
9505
Andrew Geisslerc926e172021-05-07 16:11:35 -05009506 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009507
Andrew Geissler9aee5002022-03-30 16:27:02 +00009508 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009509
9510 For more information, see
Andrew Geissler87f5cff2022-09-30 13:13:31 -05009511 ``meta-poky/conf/templates/default/local.conf.sample`` in the
9512 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009513
Andrew Geisslerf0343792020-11-18 10:42:21 -06009514 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009515 If set to ``error``, forces the OpenEmbedded build system to produce
9516 an error if the user identification (``uid``) and group
9517 identification (``gid``) values are not defined in any of the files
9518 listed in :term:`USERADD_UID_TABLES` and
9519 :term:`USERADD_GID_TABLES`. If set to
9520 ``warn``, a warning will be issued instead.
9521
9522 The default behavior for the build system is to dynamically apply
9523 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05009524 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009525 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05009526 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05009527 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009528
9529 USERADD_ERROR_DYNAMIC = "error"
9530
9531 Overriding the
9532 default behavior implies you are going to also take steps to set
9533 static ``uid`` and ``gid`` values through use of the
9534 :term:`USERADDEXTENSION`,
9535 :term:`USERADD_UID_TABLES`, and
9536 :term:`USERADD_GID_TABLES` variables.
9537
9538 .. note::
9539
9540 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05009541 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009542 When it is set to ``warn``, the build system will report a warning for
9543 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
9544 to ``error``, it will only report errors for recipes that are actually
9545 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009546 This saves you from having to add static IDs for recipes that you
9547 know will never be built.
9548
Andrew Geisslerf0343792020-11-18 10:42:21 -06009549 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009550 Specifies a password file to use for obtaining static group
9551 identification (``gid``) values when the OpenEmbedded build system
9552 adds a group to the system during package installation.
9553
9554 When applying static group identification (``gid``) values, the
9555 OpenEmbedded build system looks in :term:`BBPATH` for a
9556 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05009557 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009558
9559
9560 USERADD_GID_TABLES = "files/group"
9561
9562 .. note::
9563
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009564 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
9565 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009566
Andrew Geisslerf0343792020-11-18 10:42:21 -06009567 :term:`USERADD_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06009568 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009569 this variable specifies the individual packages within the recipe
9570 that require users and/or groups to be added.
9571
9572 You must set this variable if the recipe inherits the class. For
9573 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05009574 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009575
9576 USERADD_PACKAGES = "${PN}"
9577
9578 .. note::
9579
Andrew Geissler09036742021-06-25 14:25:14 -05009580 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009581 variable, you need to set one or more of the :term:`USERADD_PARAM`,
9582 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009583
Andrew Geisslerf0343792020-11-18 10:42:21 -06009584 :term:`USERADD_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06009585 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009586 this variable specifies for a package what parameters should pass to
9587 the ``useradd`` command if you add a user to the system when the
9588 package is installed.
9589
Andrew Geisslerc926e172021-05-07 16:11:35 -05009590 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009591
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009592 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009593 --no-create-home --shell /bin/false \
9594 --user-group messagebus"
9595
9596 For information on the
9597 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009598 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009599
Andrew Geisslerf0343792020-11-18 10:42:21 -06009600 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009601 Specifies a password file to use for obtaining static user
9602 identification (``uid``) values when the OpenEmbedded build system
9603 adds a user to the system during package installation.
9604
9605 When applying static user identification (``uid``) values, the
9606 OpenEmbedded build system looks in :term:`BBPATH` for a
9607 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05009608 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009609
9610 USERADD_UID_TABLES = "files/passwd"
9611
9612 .. note::
9613
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009614 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
9615 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009616
Andrew Geisslerf0343792020-11-18 10:42:21 -06009617 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009618 When set to "useradd-staticids", causes the OpenEmbedded build system
9619 to base all user and group additions on a static ``passwd`` and
9620 ``group`` files found in :term:`BBPATH`.
9621
9622 To use static user identification (``uid``) and group identification
9623 (``gid``) values, set the variable as follows in your ``local.conf``
9624 file: USERADDEXTENSION = "useradd-staticids"
9625
9626 .. note::
9627
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009628 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009629 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009630 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009631
9632 If you use static ``uid`` and ``gid`` information, you must also
9633 specify the ``files/passwd`` and ``files/group`` files by setting the
9634 :term:`USERADD_UID_TABLES` and
9635 :term:`USERADD_GID_TABLES` variables.
9636 Additionally, you should also set the
9637 :term:`USERADD_ERROR_DYNAMIC` variable.
9638
Andrew Geisslerf0343792020-11-18 10:42:21 -06009639 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009640 Specifies the persistence of the target's ``/var/log`` directory,
9641 which is used to house postinstall target log files.
9642
Andrew Geissler09036742021-06-25 14:25:14 -05009643 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009644 file is not persistent. You can override this setting by setting the
9645 variable to "no" to make the log directory persistent.
9646
Patrick Williams8e7b46e2023-05-01 14:19:06 -05009647 :term:`VOLATILE_TMP_DIR`
9648 Specifies the persistence of the target's ``/tmp`` directory.
9649
9650 By default, :term:`VOLATILE_TMP_DIR` is set to "yes", in which case
9651 ``/tmp`` links to a directory which resides in RAM in a ``tmpfs``
9652 filesystem.
9653
9654 If instead, you want the ``/tmp`` directory to be persistent, set the
9655 variable to "no" to make it a regular directory in the root filesystem.
9656
9657 This supports both sysvinit and systemd based systems.
9658
Andrew Geisslerf0343792020-11-18 10:42:21 -06009659 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009660 Specifies the quality assurance checks whose failures are reported as
9661 warnings by the OpenEmbedded build system. You set this variable in
9662 your distribution configuration file. For a list of the checks you
9663 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00009664 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009665
Patrick Williams975a06f2022-10-21 14:42:47 -05009666 :term:`WATCHDOG_TIMEOUT`
9667 Specifies the timeout in seconds used by the ``watchdog`` recipe and
9668 also by ``systemd`` during reboot. The default is 60 seconds.
9669
9670 :term:`WIRELESS_DAEMON`
9671 For ``connman`` and ``packagegroup-base``, specifies the wireless
9672 daemon to use. The default is "wpa-supplicant" (note that the value
9673 uses a dash and not an underscore).
9674
Andrew Geisslerf0343792020-11-18 10:42:21 -06009675 :term:`WKS_FILE`
9676 Specifies the location of the Wic kickstart file that is used by the
9677 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05009678 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06009679 image, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009680 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06009681 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06009682 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009683
9684 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009685 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05009686 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009687 applicable when Wic images are active (i.e. when
9688 :term:`IMAGE_FSTYPES` contains entries related
9689 to Wic). If your recipe does not create Wic images, the variable has
9690 no effect.
9691
Andrew Geissler09036742021-06-25 14:25:14 -05009692 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009693 :term:`DEPENDS` variable. When you use the variable in
9694 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05009695 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009696
Andrew Geissler09036742021-06-25 14:25:14 -05009697 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009698 specify a list of additional dependencies (e.g. native tools,
9699 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05009700 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009701
9702 WKS_FILE_DEPENDS = "some-native-tool"
9703
9704 In the
9705 previous example, some-native-tool would be replaced with an actual
9706 native tool on which the build would depend.
9707
Andrew Geisslerd5838332022-05-27 11:33:10 -05009708 :term:`WKS_FILES`
9709 Specifies a list of candidate Wic kickstart files to be used by the
9710 OpenEmbedded build system to create a partitioned image. Only the
9711 first one that is found, from left to right, will be used.
9712
9713 This is only useful when there are multiple ``.wks`` files that can be
9714 used to produce an image. A typical case is when multiple layers are
9715 used for different hardware platforms, each supplying a different
9716 ``.wks`` file. In this case, you specify all possible ones through
9717 :term:`WKS_FILES`.
9718
9719 If only one ``.wks`` file is used, set :term:`WKS_FILE` instead.
9720
Andrew Geisslerf0343792020-11-18 10:42:21 -06009721 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009722 The pathname of the work directory in which the OpenEmbedded build
9723 system builds a recipe. This directory is located within the
9724 :term:`TMPDIR` directory structure and is specific to
9725 the recipe being built and the system for which it is being built.
9726
Andrew Geissler09036742021-06-25 14:25:14 -05009727 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009728
9729 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
9730
9731 The actual directory depends on several things:
9732
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009733 - :term:`TMPDIR`: The top-level build output directory
9734 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
9735 - :term:`PN`: The recipe name
Andrew Geissler615f2f12022-07-15 14:00:58 -05009736 - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which
Andrew Geissler517393d2023-01-13 08:55:19 -06009737 is usually the case for most recipes, then :term:`EXTENDPE` is blank.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009738 - :term:`PV`: The recipe version
9739 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009740
9741 As an example, assume a Source Directory top-level folder name
Patrick Williams2390b1b2022-11-03 13:47:49 -05009742 ``poky``, a default :term:`Build Directory` at ``poky/build``, and a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009743 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
9744 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
9745 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05009746 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009747
9748 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
9749
Andrew Geisslerf0343792020-11-18 10:42:21 -06009750 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009751 Specifies the packages that should be installed to provide an X
9752 server and drivers for the current machine, assuming your image
9753 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
9754 indirectly, includes "x11-base" in
9755 :term:`IMAGE_FEATURES`.
9756
Andrew Geissler09036742021-06-25 14:25:14 -05009757 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009758 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
Patrick Williams03907ee2022-05-01 06:28:52 -05009759
9760 :term:`XZ_THREADS`
9761 Specifies the number of parallel threads that should be used when
9762 using xz compression.
9763
9764 By default this scales with core count, but is never set less than 2
9765 to ensure that multi-threaded mode is always used so that the output
9766 file contents are deterministic. Builds will work with a value of 1
9767 but the output will differ compared to the output from the compression
9768 generated when more than one thread is used.
9769
9770 On systems where many tasks run in parallel, setting a limit to this
9771 can be helpful in controlling system resource usage.
9772
Andrew Geissler517393d2023-01-13 08:55:19 -06009773 :term:`XZ_MEMLIMIT`
Patrick Williams03907ee2022-05-01 06:28:52 -05009774 Specifies the maximum memory the xz compression should use as a percentage
9775 of system memory. If unconstrained the xz compressor can use large amounts of
9776 memory and become problematic with parallelism elsewhere in the build.
9777 "50%" has been found to be a good value.
9778
9779 :term:`ZSTD_THREADS`
9780 Specifies the number of parallel threads that should be used when
9781 using ZStandard compression.
9782
9783 By default this scales with core count, but is never set less than 2
9784 to ensure that multi-threaded mode is always used so that the output
9785 file contents are deterministic. Builds will work with a value of 1
9786 but the output will differ compared to the output from the compression
9787 generated when more than one thread is used.
9788
9789 On systems where many tasks run in parallel, setting a limit to this
9790 can be helpful in controlling system resource usage.