blob: 9b581599e39fc2a2553a97c3aa00806d18d8cd6e [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
Patrick Williams213cb262021-08-07 19:21:33 -0500246 ":ref:`bitbake: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
251 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
252 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
357 :term:`BB_CHECK_SSL_CERTS`
358 See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual.
359
360 :term:`BB_CONSOLELOG`
361 See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual.
362
363 :term:`BB_CURRENTTASK`
364 See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual.
365
Andrew Geisslerf0343792020-11-18 10:42:21 -0600366 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500367 Defines how BitBake handles situations where an append file
368 (``.bbappend``) has no corresponding recipe file (``.bb``). This
369 condition often occurs when layers get out of sync (e.g. ``oe-core``
370 bumps a recipe version and the old recipe no longer exists and the
371 other layer has not been updated to the new version of the recipe
372 yet).
373
374 The default fatal behavior is safest because it is the sane reaction
375 given something is out of sync. It is important to realize when your
376 changes are no longer being applied.
377
378 You can change the default behavior by setting this variable to "1",
379 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500380 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500381
382 BB_DANGLINGAPPENDS_WARNONLY = "1"
383
Andrew Geissler517393d2023-01-13 08:55:19 -0600384 :term:`BB_DEFAULT_TASK`
385 See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual.
386
387 :term:`BB_DEFAULT_UMASK`
388 See :term:`bitbake:BB_DEFAULT_UMASK` in the BitBake manual.
389
Andrew Geisslerf0343792020-11-18 10:42:21 -0600390 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500391 Monitors disk space and available inodes during the build and allows
392 you to control the build based on these parameters.
393
394 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500395 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500396 found in the :term:`Build Directory`. Use the
397 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500398
399 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500400
401 BB_DISKMON_DIRS = "action,dir,threshold [...]"
402
403 where:
404
405 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000406 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500407 a threshold is broken.
408 STOPTASKS: Stop the build after the currently
409 executing tasks have finished when
410 a threshold is broken.
411 WARN: Issue a warning but continue the
412 build when a threshold is broken.
413 Subsequent warnings are issued as
414 defined by the BB_DISKMON_WARNINTERVAL
415 variable, which must be defined in
416 the conf/local.conf file.
417
418 dir is:
419 Any directory you choose. You can specify one or
420 more directories to monitor by separating the
421 groupings with a space. If two directories are
422 on the same device, only the first directory
423 is monitored.
424
425 threshold is:
426 Either the minimum available disk space,
427 the minimum number of free inodes, or
428 both. You must specify at least one. To
429 omit one or the other, simply omit the value.
430 Specify the threshold using G, M, K for Gbytes,
431 Mbytes, and Kbytes, respectively. If you do
432 not specify G, M, or K, Kbytes is assumed by
433 default. Do not use GB, MB, or KB.
434
Andrew Geisslerc926e172021-05-07 16:11:35 -0500435 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500436
437 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
438 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
439 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
440
441 The first example works only if you also provide the
442 :term:`BB_DISKMON_WARNINTERVAL`
443 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000444 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500445 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
446 below 100 Kbytes. Because two directories are provided with the
447 variable, the build system also issue a warning when the disk space
448 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
449 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500450 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500451 variable.
452
453 The second example stops the build after all currently executing
454 tasks complete when the minimum disk space in the ``${TMPDIR}``
455 directory drops below 1 Gbyte. No disk monitoring occurs for the free
456 inodes in this case.
457
Andrew Geissler595f6302022-01-24 19:11:47 +0000458 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500459 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
460 disk space monitoring for the directory itself occurs in this case.
461
Andrew Geisslerf0343792020-11-18 10:42:21 -0600462 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500463 Defines the disk space and free inode warning intervals. To set these
464 intervals, define the variable in your ``conf/local.conf`` file in
465 the :term:`Build Directory`.
466
Andrew Geissler09036742021-06-25 14:25:14 -0500467 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500468 must also use the :term:`BB_DISKMON_DIRS`
469 variable and define its action as "WARN". During the build,
470 subsequent warnings are issued each time disk space or number of free
471 inodes further reduces by the respective interval.
472
Andrew Geissler09036742021-06-25 14:25:14 -0500473 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
474 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500475 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500476
477 BB_DISKMON_WARNINTERVAL = "50M,5K"
478
479 When specifying the variable in your configuration file, use the
480 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500481
482 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500483
484 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
485
486 where:
487
488 disk_space_interval is:
489 An interval of memory expressed in either
490 G, M, or K for Gbytes, Mbytes, or Kbytes,
491 respectively. You cannot use GB, MB, or KB.
492
493 disk_inode_interval is:
494 An interval of free inodes expressed in either
495 G, M, or K for Gbytes, Mbytes, or Kbytes,
496 respectively. You cannot use GB, MB, or KB.
497
Andrew Geisslerc926e172021-05-07 16:11:35 -0500498 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500499
500 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
501 BB_DISKMON_WARNINTERVAL = "50M,5K"
502
503 These variables cause the
504 OpenEmbedded build system to issue subsequent warnings each time the
505 available disk space further reduces by 50 Mbytes or the number of
506 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
507 directory. Subsequent warnings based on the interval occur each time
508 a respective interval is reached beyond the initial warning (i.e. 1
509 Gbytes and 100 Kbytes).
510
Andrew Geissler517393d2023-01-13 08:55:19 -0600511 :term:`BB_ENV_PASSTHROUGH`
512 See :term:`bitbake:BB_ENV_PASSTHROUGH` in the BitBake manual.
513
514 :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
515 See :term:`bitbake:BB_ENV_PASSTHROUGH_ADDITIONS` in the BitBake manual.
516
517 :term:`BB_FETCH_PREMIRRORONLY`
518 See :term:`bitbake:BB_FETCH_PREMIRRORONLY` in the BitBake manual.
519
520 :term:`BB_FILENAME`
521 See :term:`bitbake:BB_FILENAME` in the BitBake manual.
522
Andrew Geisslerf0343792020-11-18 10:42:21 -0600523 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500524 Causes tarballs of the source control repositories (e.g. Git
525 repositories), including metadata, to be placed in the
526 :term:`DL_DIR` directory.
527
528 For performance reasons, creating and placing tarballs of these
529 repositories is not the default action by the OpenEmbedded build
Andrew Geissler517393d2023-01-13 08:55:19 -0600530 system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500531
532 BB_GENERATE_MIRROR_TARBALLS = "1"
533
534 Set this variable in your
535 ``local.conf`` file in the :term:`Build Directory`.
536
537 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500538 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500539 source control work directories.
540
Andrew Geissler517393d2023-01-13 08:55:19 -0600541 :term:`BB_GENERATE_SHALLOW_TARBALLS`
542 See :term:`bitbake:BB_GENERATE_SHALLOW_TARBALLS` in the BitBake manual.
543
544 :term:`BB_GIT_SHALLOW`
545 See :term:`bitbake:BB_GIT_SHALLOW` in the BitBake manual.
546
547 :term:`BB_GIT_SHALLOW_DEPTH`
548 See :term:`bitbake:BB_GIT_SHALLOW_DEPTH` in the BitBake manual.
549
550 :term:`BB_HASHCHECK_FUNCTION`
551 See :term:`bitbake:BB_HASHCHECK_FUNCTION` in the BitBake manual.
552
553 :term:`BB_HASHCONFIG_IGNORE_VARS`
554 See :term:`bitbake:BB_HASHCONFIG_IGNORE_VARS` in the BitBake manual.
555
556 :term:`BB_HASHSERVE`
557 See :term:`bitbake:BB_HASHSERVE` in the BitBake manual.
558
559 :term:`BB_HASHSERVE_UPSTREAM`
560 See :term:`bitbake:BB_HASHSERVE_UPSTREAM` in the BitBake manual.
561
562 :term:`BB_INVALIDCONF`
563 See :term:`bitbake:BB_INVALIDCONF` in the BitBake manual.
564
565 :term:`BB_LOGCONFIG`
566 See :term:`bitbake:BB_LOGCONFIG` in the BitBake manual.
567
568 :term:`BB_LOGFMT`
569 See :term:`bitbake:BB_LOGFMT` in the BitBake manual.
570
571 :term:`BB_MULTI_PROVIDER_ALLOWED`
572 See :term:`bitbake:BB_MULTI_PROVIDER_ALLOWED` in the BitBake manual.
573
574 :term:`BB_NICE_LEVEL`
575 See :term:`bitbake:BB_NICE_LEVEL` in the BitBake manual.
576
577 :term:`BB_NO_NETWORK`
578 See :term:`bitbake:BB_NO_NETWORK` in the BitBake manual.
579
580 :term:`BB_NUMBER_PARSE_THREADS`
581 See :term:`bitbake:BB_NUMBER_PARSE_THREADS` in the BitBake manual.
582
Andrew Geisslerf0343792020-11-18 10:42:21 -0600583 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500584 The maximum number of tasks BitBake should run in parallel at any one
585 time. The OpenEmbedded build system automatically configures this
586 variable to be equal to the number of cores on the build system. For
587 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500588 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500589 to "4".
590
591 For single socket systems (i.e. one CPU), you should not have to
592 override this variable to gain optimal parallelism during builds.
593 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500594 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500595 is not set higher than "20".
596
597 For more information on speeding up builds, see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600598 ":ref:`dev-manual/speeding-up-build:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500599 section in the Yocto Project Development Tasks Manual.
600
Patrick Williams7784c422022-11-17 07:29:11 -0600601 On the other hand, if your goal is to limit the amount of system
602 resources consumed by BitBake tasks, setting :term:`BB_NUMBER_THREADS`
603 to a number lower than the number of CPU threads in your machine
604 won't be sufficient. That's because each package will still be built
605 and installed through a number of parallel jobs specified by the
606 :term:`PARALLEL_MAKE` variable, which is by default the number of CPU
607 threads in your system, and is not impacted by the
608 :term:`BB_NUMBER_THREADS` value.
609
610 So, if you set :term:`BB_NUMBER_THREADS` to "1" but don't set
611 :term:`PARALLEL_MAKE`, most of your system resources will be consumed
612 anyway.
613
614 Therefore, if you intend to reduce the load of your build system by
615 setting :term:`BB_NUMBER_THREADS` to a relatively low value compared
616 to the number of CPU threads on your system, you should also set
617 :term:`PARALLEL_MAKE` to a similarly low value.
618
619 An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage
620 of build system resources under control is to use the smarter
621 :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or
622 :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake
623 from starting new tasks as long as thresholds are exceeded. Anyway,
624 as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the
625 tasks already being run from using all CPU threads on the system
626 if :term:`PARALLEL_MAKE` is not set to a low value.
627
Andrew Geissler517393d2023-01-13 08:55:19 -0600628 :term:`BB_ORIGENV`
629 See :term:`bitbake:BB_ORIGENV` in the BitBake manual.
630
631 :term:`BB_PRESERVE_ENV`
632 See :term:`bitbake:BB_PRESERVE_ENV` in the BitBake manual.
633
634 :term:`BB_PRESSURE_MAX_CPU`
635 See :term:`bitbake:BB_PRESSURE_MAX_CPU` in the BitBake manual.
636
637 :term:`BB_PRESSURE_MAX_IO`
638 See :term:`bitbake:BB_PRESSURE_MAX_IO` in the BitBake manual.
639
640 :term:`BB_PRESSURE_MAX_MEMORY`
641 See :term:`bitbake:BB_PRESSURE_MAX_MEMORY` in the BitBake manual.
642
643 :term:`BB_RUNFMT`
644 See :term:`bitbake:BB_RUNFMT` in the BitBake manual.
645
646 :term:`BB_RUNTASK`
647 See :term:`bitbake:BB_RUNTASK` in the BitBake manual.
648
649 :term:`BB_SCHEDULER`
650 See :term:`bitbake:BB_SCHEDULER` in the BitBake manual.
651
652 :term:`BB_SCHEDULERS`
653 See :term:`bitbake:BB_SCHEDULERS` in the BitBake manual.
654
Andrew Geisslerf0343792020-11-18 10:42:21 -0600655 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500656 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500657 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500658 long the BitBake server stays resident between invocations.
659
660 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500661 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500662
663 BB_SERVER_TIMEOUT = "20"
664
665 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400666 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500667
Andrew Geissler517393d2023-01-13 08:55:19 -0600668 :term:`BB_SETSCENE_DEPVALID`
669 See :term:`bitbake:BB_SETSCENE_DEPVALID` in the BitBake manual.
670
671 :term:`BB_SIGNATURE_EXCLUDE_FLAGS`
672 See :term:`bitbake:BB_SIGNATURE_EXCLUDE_FLAGS` in the BitBake manual.
673
674 :term:`BB_SIGNATURE_HANDLER`
675 See :term:`bitbake:BB_SIGNATURE_HANDLER` in the BitBake manual.
676
677 :term:`BB_SRCREV_POLICY`
678 See :term:`bitbake:BB_SRCREV_POLICY` in the BitBake manual.
679
680 :term:`BB_STRICT_CHECKSUM`
681 See :term:`bitbake:BB_STRICT_CHECKSUM` in the BitBake manual.
682
683 :term:`BB_TASK_IONICE_LEVEL`
684 See :term:`bitbake:BB_TASK_IONICE_LEVEL` in the BitBake manual.
685
686 :term:`BB_TASK_NICE_LEVEL`
687 See :term:`bitbake:BB_TASK_NICE_LEVEL` in the BitBake manual.
688
689 :term:`BB_TASKHASH`
690 See :term:`bitbake:BB_TASKHASH` in the BitBake manual.
691
692 :term:`BB_VERBOSE_LOGS`
693 See :term:`bitbake:BB_VERBOSE_LOGS` in the BitBake manual.
694
695 :term:`BB_WORKERCONTEXT`
696 See :term:`bitbake:BB_WORKERCONTEXT` in the BitBake manual.
697
Andrew Geisslerf0343792020-11-18 10:42:21 -0600698 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500699 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700700 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500701 ``quilt-native``, which is a copy of Quilt built to run on the build
702 system; "crosses" such as ``gcc-cross``, which is a compiler built to
703 run on the build machine but produces binaries that run on the target
Andrew Geissler517393d2023-01-13 08:55:19 -0600704 :term:`MACHINE`; ":ref:`ref-classes-nativesdk`", which
705 targets the SDK machine instead of :term:`MACHINE`; and "mulitlibs" in
706 the form "``multilib:``\ multilib_name".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500707
708 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500709 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500710
711 BBCLASSEXTEND =+ "native nativesdk"
712 BBCLASSEXTEND =+ "multilib:multilib_name"
713
714 .. note::
715
Andrew Geissler09036742021-06-25 14:25:14 -0500716 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500717 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500718 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500719 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400720 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500721
Andrew Geissler09036742021-06-25 14:25:14 -0500722 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500723 Parsing once adds some limitations. For example, it is not
724 possible to include a different file depending on the variant,
725 since ``include`` statements are processed when the recipe is
726 parsed.
727
Andrew Geissler517393d2023-01-13 08:55:19 -0600728 :term:`BBDEBUG`
729 See :term:`bitbake:BBDEBUG` in the BitBake manual.
730
Andrew Geisslerf0343792020-11-18 10:42:21 -0600731 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500732 Lists the names of configured layers. These names are used to find
733 the other ``BBFILE_*`` variables. Typically, each layer will append
734 its name to this variable in its ``conf/layer.conf`` file.
735
Andrew Geisslerf0343792020-11-18 10:42:21 -0600736 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500737 Variable that expands to match files from
738 :term:`BBFILES` in a particular layer. This variable
739 is used in the ``conf/layer.conf`` file and must be suffixed with the
740 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
741
Andrew Geisslerf0343792020-11-18 10:42:21 -0600742 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500743 Assigns the priority for recipe files in each layer.
744
745 This variable is useful in situations where the same recipe appears
746 in more than one layer. Setting this variable allows you to
747 prioritize a layer against other layers that contain the same recipe
Andrew Geissler615f2f12022-07-15 14:00:58 -0500748 --- effectively letting you control the precedence for the multiple
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500749 layers. The precedence established through this variable stands
750 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500751 example, a layer that has a recipe with a higher :term:`PV` value but for
752 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500753 has a lower precedence.
754
Andrew Geissler09036742021-06-25 14:25:14 -0500755 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500756 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500757 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
758 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500759 for more information. The default priority, if unspecified for a
760 layer with no dependencies, is the lowest defined priority + 1 (or 1
761 if no priorities are defined).
762
763 .. tip::
764
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500765 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500766 to list all configured layers along with their priorities.
767
Andrew Geisslerf0343792020-11-18 10:42:21 -0600768 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500769 A space-separated list of recipe files BitBake uses to build
770 software.
771
772 When specifying recipe files, you can pattern match using Python's
Patrick Williams2390b1b2022-11-03 13:47:49 -0500773 `glob <https://docs.python.org/3/library/glob.html>`__ syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500774 For details on the syntax, see the documentation by following the
775 previous link.
776
Andrew Geisslerf0343792020-11-18 10:42:21 -0600777 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500778 Activates content when identified layers are present. You identify
779 the layers by the collections that the layers define.
780
Andrew Geissler09036742021-06-25 14:25:14 -0500781 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500782 whose corresponding ``.bb`` file is in a layer that attempts to
783 modify other layers through ``.bbappend`` but does not want to
784 introduce a hard dependency on those other layers.
785
Andrew Geissler09036742021-06-25 14:25:14 -0500786 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000787 ``collection_name:filename_pattern``.
788
789 The following example identifies two collection names and two
790 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500791
792 BBFILES_DYNAMIC += " \
793 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
794 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
795 "
796
797 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000798 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500799
800 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500801
802 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
803 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
804 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
805
Andrew Geissler517393d2023-01-13 08:55:19 -0600806 :term:`BBINCLUDED`
807 See :term:`bitbake:BBINCLUDED` in the BitBake manual.
808
Andrew Geisslerf0343792020-11-18 10:42:21 -0600809 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500810 Variable that controls how BitBake displays logs on build failure.
811
Andrew Geisslerf0343792020-11-18 10:42:21 -0600812 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500813 If :term:`BBINCLUDELOGS` is set, specifies the
814 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500815 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500816 the entire log is printed.
817
Andrew Geisslerf0343792020-11-18 10:42:21 -0600818 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500819 Lists the layers to enable during the build. This variable is defined
820 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500821 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500822
823 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500824 /home/scottrif/poky/meta \
825 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500826 /home/scottrif/poky/meta-yocto-bsp \
827 /home/scottrif/poky/meta-mykernel \
828 "
829
830 This example enables four layers, one of which is a custom,
831 user-defined layer named ``meta-mykernel``.
832
Andrew Geissler517393d2023-01-13 08:55:19 -0600833 :term:`BBLAYERS_FETCH_DIR`
834 See :term:`bitbake:BBLAYERS_FETCH_DIR` in the BitBake manual.
835
Andrew Geisslerf0343792020-11-18 10:42:21 -0600836 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500837 Prevents BitBake from processing recipes and recipe append files.
838
Andrew Geissler09036742021-06-25 14:25:14 -0500839 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500840 ``.bbappend`` files. BitBake ignores any recipe or recipe append
841 files that match any of the expressions. It is as if BitBake does not
842 see them at all. Consequently, matching files are not parsed or
843 otherwise used by BitBake.
844
845 The values you provide are passed to Python's regular expression
846 compiler. Consequently, the syntax follows Python's Regular
847 Expression (re) syntax. The expressions are compared against the full
848 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500849 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500850
851 The following example uses a complete regular expression to tell
852 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500853 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500854
855 BBMASK = "meta-ti/recipes-misc/"
856
857 If you want to mask out multiple directories or recipes, you can
858 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500859 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500860
861 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
862 BBMASK += "/meta-oe/recipes-support/"
863 BBMASK += "/meta-foo/.*/openldap"
864 BBMASK += "opencv.*\.bbappend"
865 BBMASK += "lzma"
866
867 .. note::
868
869 When specifying a directory name, use the trailing slash character
870 to ensure you match just that directory name.
871
Andrew Geisslerf0343792020-11-18 10:42:21 -0600872 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500873 Specifies each additional separate configuration when you are
874 building targets with multiple configurations. Use this variable in
875 your ``conf/local.conf`` configuration file. Specify a
876 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500877 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500878
879 BBMULTICONFIG = "configA configB configC"
880
Andrew Geissler615f2f12022-07-15 14:00:58 -0500881 Each configuration file you use must reside in a ``multiconfig``
882 subdirectory of a configuration directory within a layer, or
883 within the :term:`Build Directory` (e.g.
884 ``build_directory/conf/multiconfig/configA.conf`` or
885 ``mylayer/conf/multiconfig/configB.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500886
Andrew Geissler09036742021-06-25 14:25:14 -0500887 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500888 that supports building targets with multiple configurations, see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600889 ":ref:`dev-manual/building:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500890 section in the Yocto Project Development Tasks Manual.
891
Andrew Geissler517393d2023-01-13 08:55:19 -0600892 :term:`BBPATH`
893 See :term:`bitbake:BBPATH` in the BitBake manual.
894
Andrew Geisslerf0343792020-11-18 10:42:21 -0600895 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500896 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500897 BitBake remote server.
898
899 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500900 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500901
902 export BBSERVER=localhost:$port
903
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000904 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500905 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500906 data.
907
Andrew Geissler517393d2023-01-13 08:55:19 -0600908 :term:`BBTARGETS`
909 See :term:`bitbake:BBTARGETS` in the BitBake manual.
910
Andrew Geisslerf0343792020-11-18 10:42:21 -0600911 :term:`BINCONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -0600912 When inheriting the :ref:`ref-classes-binconfig-disabled` class, this
913 variable specifies binary configuration scripts to disable in favor of
914 using ``pkg-config`` to query the information. The
915 :ref:`ref-classes-binconfig-disabled` class will modify the specified
916 scripts to return an error so that calls to them can be easily found
917 and replaced.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500918
919 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500920 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500921
922 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
923
Andrew Geisslerf0343792020-11-18 10:42:21 -0600924 :term:`BINCONFIG_GLOB`
Andrew Geissler517393d2023-01-13 08:55:19 -0600925 When inheriting the :ref:`ref-classes-binconfig` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500926 this variable specifies a wildcard for configuration scripts that
927 need editing. The scripts are edited to correct any paths that have
928 been set up during compilation so that they are correct for use when
929 installed into the sysroot and called by the build processes of other
930 recipes.
931
932 .. note::
933
Andrew Geissler09036742021-06-25 14:25:14 -0500934 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500935 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
936 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500937 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500938 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
939 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500940
941 For more information on how this variable works, see
Patrick Williams975a06f2022-10-21 14:42:47 -0500942 ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500943 You can also find general
944 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000945 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500946
Andrew Geissler517393d2023-01-13 08:55:19 -0600947 :term:`BITBAKE_UI`
948 See :term:`bitbake:BITBAKE_UI` in the BitBake manual.
949
Andrew Geisslerf0343792020-11-18 10:42:21 -0600950 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500951 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500952 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500953 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500954
955 ${BPN}-${PV}
956
Andrew Geisslerf0343792020-11-18 10:42:21 -0600957 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500958 This variable is a version of the :term:`PN` variable with
959 common prefixes and suffixes removed, such as ``nativesdk-``,
960 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
961 The exact lists of prefixes and suffixes removed are specified by the
962 :term:`MLPREFIX` and
963 :term:`SPECIAL_PKGSUFFIX` variables,
964 respectively.
965
Andrew Geisslerf0343792020-11-18 10:42:21 -0600966 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500967 Specifies a URL for an upstream bug tracking website for a recipe.
968 The OpenEmbedded build system does not use this variable. Rather, the
969 variable is a useful pointer in case a bug in the software being
970 built needs to be manually reported.
971
Andrew Geisslerf0343792020-11-18 10:42:21 -0600972 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500973 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500974 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500975 machine name reported by the ``uname`` command.
976
Andrew Geisslerf0343792020-11-18 10:42:21 -0600977 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500978 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500979 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500980
Andrew Geisslerf0343792020-11-18 10:42:21 -0600981 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500982 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500983 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500984
Andrew Geisslerf0343792020-11-18 10:42:21 -0600985 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500986 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500987 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500988 points to GCC and passes as arguments the value of
989 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500990 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500991
Andrew Geisslerf0343792020-11-18 10:42:21 -0600992 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500993 Specifies the flags to pass to the C compiler when building for the
994 build host. When building in the ``-native`` context,
995 :term:`CFLAGS` is set to the value of this variable by
996 default.
997
Andrew Geisslerf0343792020-11-18 10:42:21 -0600998 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500999 Specifies the flags to pass to the C preprocessor (i.e. to both the C
1000 and the C++ compilers) when building for the build host. When
1001 building in the ``-native`` context, :term:`CPPFLAGS`
1002 is set to the value of this variable by default.
1003
Andrew Geisslerf0343792020-11-18 10:42:21 -06001004 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001005 Specifies the flags to pass to the C++ compiler when building for the
1006 build host. When building in the ``-native`` context,
1007 :term:`CXXFLAGS` is set to the value of this variable
1008 by default.
1009
Andrew Geisslerf0343792020-11-18 10:42:21 -06001010 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001011 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -05001012 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001013 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -05001014 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001015
Andrew Geisslerf0343792020-11-18 10:42:21 -06001016 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001017 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05001018 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001019 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -05001020 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001021
Andrew Geisslerf0343792020-11-18 10:42:21 -06001022 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001023 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -05001024 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001025
Andrew Geisslerf0343792020-11-18 10:42:21 -06001026 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001027 Specifies the flags to pass to the linker when building for the build
1028 host. When building in the ``-native`` context,
1029 :term:`LDFLAGS` is set to the value of this variable
1030 by default.
1031
Andrew Geisslerf0343792020-11-18 10:42:21 -06001032 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001033 Specifies the optimization flags passed to the C compiler when
1034 building for the build host or the SDK. The flags are passed through
1035 the :term:`BUILD_CFLAGS` and
1036 :term:`BUILDSDK_CFLAGS` default values.
1037
Andrew Geissler5f350902021-07-23 13:09:54 -04001038 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001039 -pipe".
1040
Andrew Geisslerf0343792020-11-18 10:42:21 -06001041 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001042 Specifies the operating system in use on the build host (e.g.
1043 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler615f2f12022-07-15 14:00:58 -05001044 :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001045 first word, converted to lower-case characters.
1046
Andrew Geisslerf0343792020-11-18 10:42:21 -06001047 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001048 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -05001049 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geissler517393d2023-01-13 08:55:19 -06001050 :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001051
Andrew Geisslerf0343792020-11-18 10:42:21 -06001052 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001053 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -05001054 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001055 points to
1056 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
1057
Andrew Geisslerf0343792020-11-18 10:42:21 -06001058 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001059 Specifies the system, including the architecture and the operating
1060 system, to use when building for the build host (i.e. when building
Andrew Geissler517393d2023-01-13 08:55:19 -06001061 :ref:`ref-classes-native` recipes).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001062
1063 The OpenEmbedded build system automatically sets this variable based
1064 on :term:`BUILD_ARCH`,
1065 :term:`BUILD_VENDOR`, and
1066 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -05001067 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001068
Andrew Geisslerf0343792020-11-18 10:42:21 -06001069 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001070 Specifies the vendor name to use when building for the build host.
1071 The default value is an empty string ("").
1072
Andrew Geisslerf0343792020-11-18 10:42:21 -06001073 :term:`BUILDDIR`
Patrick Williams2390b1b2022-11-03 13:47:49 -05001074 Points to the location of the :term:`Build Directory`. You can define
1075 this directory indirectly through the :ref:`structure-core-script` script
1076 by passing in a :term:`Build Directory` path when you run the script. If
1077 you run the script and do not provide a :term:`Build Directory` path, the
1078 :term:`BUILDDIR` defaults to ``build`` in the current directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001079
Andrew Geisslerf0343792020-11-18 10:42:21 -06001080 :term:`BUILDHISTORY_COMMIT`
Andrew Geissler517393d2023-01-13 08:55:19 -06001081 When inheriting the :ref:`ref-classes-buildhistory` class, this variable
1082 specifies whether or not to commit the build history output in a local
1083 Git repository. If set to "1", this local repository will be maintained
1084 automatically by the :ref:`ref-classes-buildhistory` class and a commit
1085 will be created on every build for changes to each top-level subdirectory
1086 of the build history output (images, packages, and sdk). If you want to
1087 track changes to build history over time, you should set this value to
1088 "1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001089
Andrew Geissler517393d2023-01-13 08:55:19 -06001090 By default, the :ref:`ref-classes-buildhistory` class
Patrick Williams975a06f2022-10-21 14:42:47 -05001091 enables committing the buildhistory output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001092
Patrick Williams975a06f2022-10-21 14:42:47 -05001093 BUILDHISTORY_COMMIT ?= "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001094
Andrew Geisslerf0343792020-11-18 10:42:21 -06001095 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geissler517393d2023-01-13 08:55:19 -06001096 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001097 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -05001098 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001099 :term:`BUILDHISTORY_COMMIT` variable must
1100 be set to "1".
1101
1102 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -05001103 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001104 email@host". Providing an email address or host that is not valid
1105 does not produce an error.
1106
Andrew Geissler517393d2023-01-13 08:55:19 -06001107 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1108 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001109
1110 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
1111
Andrew Geisslerf0343792020-11-18 10:42:21 -06001112 :term:`BUILDHISTORY_DIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06001113 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001114 class, this variable specifies the directory in which build history
1115 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001116 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001117
Andrew Geissler517393d2023-01-13 08:55:19 -06001118 By default, the :ref:`ref-classes-buildhistory` class sets the directory
1119 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001120
1121 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
1122
Andrew Geisslerf0343792020-11-18 10:42:21 -06001123 :term:`BUILDHISTORY_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001124 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001125 class, this variable specifies the build history features to be
1126 enabled. For more information on how build history works, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06001127 ":ref:`dev-manual/build-quality:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001128 section in the Yocto Project Development Tasks Manual.
1129
1130 You can specify these features in the form of a space-separated list:
1131
1132 - *image:* Analysis of the contents of images, which includes the
1133 list of installed packages among other things.
1134
1135 - *package:* Analysis of the contents of individual packages.
1136
1137 - *sdk:* Analysis of the contents of the software development kit
1138 (SDK).
1139
1140 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -06001141 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001142 (sstate) tasks.
1143 This saves one file per task and lists the SHA-256 checksums for
1144 each file staged (i.e. the output of the task).
1145
Andrew Geissler517393d2023-01-13 08:55:19 -06001146 By default, the :ref:`ref-classes-buildhistory` class enables the
1147 following features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001148
1149 BUILDHISTORY_FEATURES ?= "image package sdk"
1150
Andrew Geisslerf0343792020-11-18 10:42:21 -06001151 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001152 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001153 class, this variable specifies a list of paths to files copied from
1154 the image contents into the build history directory under an
1155 "image-files" directory in the directory for the image, so that you
1156 can track the contents of each file. The default is to copy
1157 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1158 changes in user and group entries. You can modify the list to include
1159 any file. Specifying an invalid path does not produce an error.
1160 Consequently, you can include files that might not always be present.
1161
Andrew Geissler517393d2023-01-13 08:55:19 -06001162 By default, the :ref:`ref-classes-buildhistory` class provides paths to
1163 the following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001164
1165 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1166
Andrew Geissler5f350902021-07-23 13:09:54 -04001167 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
Andrew Geissler517393d2023-01-13 08:55:19 -06001168 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geissler5f350902021-07-23 13:09:54 -04001169 class, this variable specifies a common path prefix that should be
1170 stripped off the beginning of paths in the task signature list when the
1171 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1172 useful when build history is populated from multiple sources that may not
1173 all use the same top level directory.
1174
Andrew Geissler517393d2023-01-13 08:55:19 -06001175 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1176 as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001177
1178 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1179
1180 In this case, no prefixes will be stripped.
1181
Andrew Geisslerf0343792020-11-18 10:42:21 -06001182 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geissler517393d2023-01-13 08:55:19 -06001183 When inheriting the :ref:`ref-classes-buildhistory` class, this variable
1184 optionally specifies a remote repository to which build history pushes
1185 Git changes. In order for :term:`BUILDHISTORY_PUSH_REPO` to work,
1186 :term:`BUILDHISTORY_COMMIT` must be set to "1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001187
1188 The repository should correspond to a remote address that specifies a
1189 repository as understood by Git, or alternatively to a remote name
1190 that you have set up manually using ``git remote`` within the local
1191 repository.
1192
Andrew Geissler517393d2023-01-13 08:55:19 -06001193 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1194 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001195
1196 BUILDHISTORY_PUSH_REPO ?= ""
1197
Andrew Geissler517393d2023-01-13 08:55:19 -06001198 :term:`BUILDNAME`
1199 See :term:`bitbake:BUILDNAME` in the BitBake manual.
1200
Andrew Geisslerf0343792020-11-18 10:42:21 -06001201 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001202 Specifies the flags to pass to the C compiler when building for the
1203 SDK. When building in the ``nativesdk-`` context,
1204 :term:`CFLAGS` is set to the value of this variable by
1205 default.
1206
Andrew Geisslerf0343792020-11-18 10:42:21 -06001207 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001208 Specifies the flags to pass to the C pre-processor (i.e. to both the
1209 C and the C++ compilers) when building for the SDK. When building in
1210 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1211 to the value of this variable by default.
1212
Andrew Geisslerf0343792020-11-18 10:42:21 -06001213 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001214 Specifies the flags to pass to the C++ compiler when building for the
1215 SDK. When building in the ``nativesdk-`` context,
1216 :term:`CXXFLAGS` is set to the value of this variable
1217 by default.
1218
Andrew Geisslerf0343792020-11-18 10:42:21 -06001219 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001220 Specifies the flags to pass to the linker when building for the SDK.
1221 When building in the ``nativesdk-`` context,
1222 :term:`LDFLAGS` is set to the value of this variable
1223 by default.
1224
Andrew Geisslerf0343792020-11-18 10:42:21 -06001225 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001226 Points to the location of the directory that holds build statistics
Andrew Geissler517393d2023-01-13 08:55:19 -06001227 when you use and enable the :ref:`ref-classes-buildstats` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001228 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001229 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1230
Andrew Geisslerf0343792020-11-18 10:42:21 -06001231 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001232 For the BusyBox recipe, specifies whether to split the output
1233 executable file into two parts: one for features that require
1234 ``setuid root``, and one for the remaining features (i.e. those that
1235 do not require ``setuid root``).
1236
Andrew Geissler09036742021-06-25 14:25:14 -05001237 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001238 splitting the output executable file. Set the variable to "0" to get
1239 a single output executable file.
1240
Andrew Geissler517393d2023-01-13 08:55:19 -06001241 :term:`BZRDIR`
1242 See :term:`bitbake:BZRDIR` in the BitBake manual.
1243
Andrew Geisslerf0343792020-11-18 10:42:21 -06001244 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001245 Specifies the directory BitBake uses to store a cache of the
1246 :term:`Metadata` so it does not need to be parsed every time
1247 BitBake is started.
1248
Andrew Geisslerf0343792020-11-18 10:42:21 -06001249 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001250 The minimal command and arguments used to run the C compiler.
1251
Andrew Geisslerf0343792020-11-18 10:42:21 -06001252 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001253 Specifies the flags to pass to the C compiler. This variable is
1254 exported to an environment variable and thus made visible to the
1255 software being built during the compilation step.
1256
Andrew Geissler09036742021-06-25 14:25:14 -05001257 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001258 being built:
1259
1260 - :term:`TARGET_CFLAGS` when building for the
1261 target
1262
1263 - :term:`BUILD_CFLAGS` when building for the
1264 build host (i.e. ``-native``)
1265
1266 - :term:`BUILDSDK_CFLAGS` when building for
1267 an SDK (i.e. ``nativesdk-``)
1268
Andrew Geisslerf0343792020-11-18 10:42:21 -06001269 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001270 An internal variable specifying the special class override that
1271 should currently apply (e.g. "class-target", "class-native", and so
1272 forth). The classes that use this variable (e.g.
Andrew Geissler517393d2023-01-13 08:55:19 -06001273 :ref:`ref-classes-native`, :ref:`ref-classes-nativesdk`, and so forth)
1274 set the variable to appropriate values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001275
1276 .. note::
1277
Andrew Geissler5f350902021-07-23 13:09:54 -04001278 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001279 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001280
1281 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001282 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001283
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001284 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001285 install my-extra-file ${D}${sysconfdir}
1286 }
1287
1288 Here is an example where ``FOO`` is set to
1289 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001290 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001291
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001292 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001293 FOO = "other"
1294
Andrew Geissler09036742021-06-25 14:25:14 -05001295 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001296 that it is included in the default value of
1297 :term:`OVERRIDES`.
1298
Andrew Geisslerf0343792020-11-18 10:42:21 -06001299 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001300 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001301 ``make clean`` command does not work for the software being built.
1302 Consequently, the OpenEmbedded build system will not try to run
1303 ``make clean`` during the :ref:`ref-tasks-configure`
1304 task, which is the default behavior.
1305
Andrew Geisslerf0343792020-11-18 10:42:21 -06001306 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001307 Provides a list of hardware features that are enabled in both
1308 :term:`MACHINE_FEATURES` and
1309 :term:`DISTRO_FEATURES`. This select list of
1310 features contains features that make sense to be controlled both at
1311 the machine and distribution configuration level. For example, the
1312 "bluetooth" feature requires hardware support but should also be
1313 optional at the distribution level, in case the hardware supports
1314 Bluetooth but you do not ever intend to use it.
1315
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001316 :term:`COMMERCIAL_AUDIO_PLUGINS`
1317 This variable is specific to the :yocto_git:`GStreamer recipes
1318 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`.
1319 It allows to build the GStreamer `"ugly"
1320 <https://github.com/GStreamer/gst-plugins-ugly>`__ and
1321 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ audio plugins.
1322
1323 See the :ref:`dev-manual/licenses:other variables related to commercial licenses`
1324 section for usage details.
1325
1326 :term:`COMMERCIAL_VIDEO_PLUGINS`
1327 This variable is specific to the :yocto_git:`GStreamer recipes
1328 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`.
1329 It allows to build the GStreamer `"ugly"
1330 <https://github.com/GStreamer/gst-plugins-ugly>`__ and
1331 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ video plugins.
1332
1333 See the :ref:`dev-manual/licenses:other variables related to commercial licenses`
1334 section for usage details.
1335
Andrew Geisslerf0343792020-11-18 10:42:21 -06001336 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001337 Points to ``meta/files/common-licenses`` in the
1338 :term:`Source Directory`, which is where generic license
1339 files reside.
1340
Andrew Geisslerf0343792020-11-18 10:42:21 -06001341 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001342 A regular expression that resolves to one or more hosts (when the
1343 recipe is native) or one or more targets (when the recipe is
1344 non-native) with which a recipe is compatible. The regular expression
1345 is matched against :term:`HOST_SYS`. You can use the
1346 variable to stop recipes from being built for classes of systems with
1347 which the recipes are not compatible. Stopping these builds is
1348 particularly useful with kernels. The variable also helps to increase
1349 parsing speed since the build system skips parsing recipes not
1350 compatible with the current system.
1351
Andrew Geisslerf0343792020-11-18 10:42:21 -06001352 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001353 A regular expression that resolves to one or more target machines
1354 with which a recipe is compatible. The regular expression is matched
1355 against :term:`MACHINEOVERRIDES`. You can use
1356 the variable to stop recipes from being built for machines with which
1357 the recipes are not compatible. Stopping these builds is particularly
1358 useful with kernels. The variable also helps to increase parsing
1359 speed since the build system skips parsing recipes not compatible
1360 with the current machine.
1361
Andrew Geisslerf0343792020-11-18 10:42:21 -06001362 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001363 Defines wildcards to match when installing a list of complementary
1364 packages for all the packages explicitly (or implicitly) installed in
1365 an image.
1366
Patrick Williams975a06f2022-10-21 14:42:47 -05001367 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
1368 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1369 which is similar to the Unix style pathname pattern expansion
1370 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001371
1372 The resulting list of complementary packages is associated with an
1373 item that can be added to
1374 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001375 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001376 will install -dev packages (containing headers and other development
1377 files) for every package in the image.
1378
1379 To add a new feature item pointing to a wildcard, use a variable flag
1380 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001381 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001382
1383 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1384
Patrick Williams975a06f2022-10-21 14:42:47 -05001385 .. note::
1386
1387 When installing complementary packages, recommends relationships
1388 (set via :term:`RRECOMMENDS`) are always ignored.
1389
Andrew Geisslerf0343792020-11-18 10:42:21 -06001390 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001391 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001392 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001393 sysroots for other recipes.
1394
1395 The default is
1396 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1397 (i.e.
1398 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1399
Andrew Geisslerf0343792020-11-18 10:42:21 -06001400 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001401 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001402 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001403 ``build/conf/`` compatibility changes.
1404
Andrew Geisslerf0343792020-11-18 10:42:21 -06001405 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001406 Identifies editable or configurable files that are part of a package.
1407 If the Package Management System (PMS) is being used to update
1408 packages on the target system, it is possible that configuration
1409 files you have changed after the original installation and that you
1410 now want to remain unchanged are overwritten. In other words,
1411 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001412 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001413 variable to list the files in the package that you wish to prevent
1414 the PMS from overwriting during this update process.
1415
Andrew Geissler09036742021-06-25 14:25:14 -05001416 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001417 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001418 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001419
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001420 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001421 ${sysconfdir}/file2 ${sysconfdir}/file3"
1422
Andrew Geissler09036742021-06-25 14:25:14 -05001423 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1424 variables. The files listed within :term:`CONFFILES` must be a subset of
1425 the files listed within :term:`FILES`. Because the configuration files
1426 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001427 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001428 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001429 variable.
1430
1431 .. note::
1432
Andrew Geissler09036742021-06-25 14:25:14 -05001433 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001434 good practice to use appropriate path variables.
1435 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1436 rather than ``/usr/bin``. You can find a list of these variables at
1437 the top of the ``meta/conf/bitbake.conf`` file in the
1438 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001439
Andrew Geisslerf0343792020-11-18 10:42:21 -06001440 :term:`CONFIG_INITRAMFS_SOURCE`
Patrick Williams2194f502022-10-16 14:26:09 -05001441 Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001442 OpenEmbedded build system receives and uses this kernel Kconfig
1443 variable as an environment variable. By default, the variable is set
1444 to null ("").
1445
Andrew Geissler09036742021-06-25 14:25:14 -05001446 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001447 with a ``.cpio`` suffix or a space-separated list of directories and
Patrick Williams2194f502022-10-16 14:26:09 -05001448 files for building the :term:`Initramfs` image. A cpio archive should contain
1449 a filesystem archive to be used as an :term:`Initramfs` image. Directories
1450 should contain a filesystem layout to be included in the :term:`Initramfs`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001451 image. Files should contain entries according to the format described
1452 by the ``usr/gen_init_cpio`` program in the kernel tree.
1453
Patrick Williams2194f502022-10-16 14:26:09 -05001454 If you specify multiple directories and files, the :term:`Initramfs` image
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001455 will be the aggregate of all of them.
1456
Patrick Williams2194f502022-10-16 14:26:09 -05001457 For information on creating an :term:`Initramfs`, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06001458 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001459 in the Yocto Project Development Tasks Manual.
1460
Andrew Geisslerf0343792020-11-18 10:42:21 -06001461 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001462 A list of files that contains ``autoconf`` test results relevant to
1463 the current build. This variable is used by the Autotools utilities
1464 when running ``configure``.
1465
Andrew Geisslerf0343792020-11-18 10:42:21 -06001466 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001467 The minimal arguments for GNU configure.
1468
Andrew Geisslerf0343792020-11-18 10:42:21 -06001469 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001470 When inheriting the :ref:`ref-classes-features_check`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001471 class, this variable identifies distribution features that would be
1472 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001473 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1474 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001475 the recipe will be skipped, and if the build system attempts to build
1476 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001477
Andrew Geissler615f2f12022-07-15 14:00:58 -05001478 :term:`CONVERSION_CMD`
1479 This variable is used for storing image conversion commands.
1480 Image conversion can convert an image into different objects like:
1481
1482 - Compressed version of the image
1483
1484 - Checksums for the image
1485
Andrew Geissler517393d2023-01-13 08:55:19 -06001486 An example of :term:`CONVERSION_CMD` from :ref:`ref-classes-image_types`
1487 class is::
Andrew Geissler615f2f12022-07-15 14:00:58 -05001488
1489 CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
1490
Andrew Geissler9aee5002022-03-30 16:27:02 +00001491 :term:`COPY_LIC_DIRS`
1492 If set to "1" along with the
1493 :term:`COPY_LIC_MANIFEST` variable, the
1494 OpenEmbedded build system copies into the image the license files,
1495 which are located in ``/usr/share/common-licenses``, for each
1496 package. The license files are placed in directories within the image
1497 itself during build time.
1498
1499 .. note::
1500
1501 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1502 newly installed packages to an image, which might be most suitable for
1503 read-only filesystems that cannot be upgraded. See the
1504 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler517393d2023-01-13 08:55:19 -06001505 You can also reference the ":ref:`dev-manual/licenses:providing license text`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00001506 section in the Yocto Project Development Tasks Manual for
1507 information on providing license text.
1508
1509 :term:`COPY_LIC_MANIFEST`
1510 If set to "1", the OpenEmbedded build system copies the license
1511 manifest for the image to
1512 ``/usr/share/common-licenses/license.manifest`` within the image
1513 itself during build time.
1514
1515 .. note::
1516
1517 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1518 newly installed packages to an image, which might be most suitable for
1519 read-only filesystems that cannot be upgraded. See the
1520 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler517393d2023-01-13 08:55:19 -06001521 You can also reference the ":ref:`dev-manual/licenses:providing license text`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00001522 section in the Yocto Project Development Tasks Manual for
1523 information on providing license text.
1524
Andrew Geisslerf0343792020-11-18 10:42:21 -06001525 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geissler517393d2023-01-13 08:55:19 -06001526 A space-separated list of licenses to exclude from the source archived by
1527 the :ref:`ref-classes-archiver` class. In other words, if a license in a
1528 recipe's :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001529 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001530 class.
1531
1532 .. note::
1533
Andrew Geissler09036742021-06-25 14:25:14 -05001534 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001535 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001536
1537 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001538 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001539 :ref:`ref-classes-copyleft_filter` class, which
1540 is inherited by the :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001541
Andrew Geisslerf0343792020-11-18 10:42:21 -06001542 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001543 A space-separated list of licenses to include in the source archived
Andrew Geissler517393d2023-01-13 08:55:19 -06001544 by the :ref:`ref-classes-archiver` class. In other
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001545 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001546 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001547 source is archived by the class.
1548
Andrew Geissler517393d2023-01-13 08:55:19 -06001549 The default value is set by the :ref:`ref-classes-copyleft_filter` class,
1550 which is inherited by the :ref:`ref-classes-archiver` class. The default
1551 value includes "GPL*", "LGPL*", and "AGPL*".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001552
Andrew Geisslerf0343792020-11-18 10:42:21 -06001553 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001554 A list of recipes to exclude in the source archived by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001555 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_EXCLUDE`
1556 variable overrides the license inclusion and exclusion caused through the
1557 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001558 variables, respectively.
1559
1560 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001561 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001562 :ref:`ref-classes-copyleft_filter` class, which is inherited by the
1563 :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001564
Andrew Geisslerf0343792020-11-18 10:42:21 -06001565 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001566 A list of recipes to include in the source archived by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001567 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_INCLUDE`
1568 variable overrides the license inclusion and exclusion caused through the
1569 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001570 variables, respectively.
1571
1572 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001573 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001574 :ref:`ref-classes-copyleft_filter` class, which is inherited by the
1575 :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001576
Andrew Geisslerf0343792020-11-18 10:42:21 -06001577 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001578 A space-separated list of recipe types to include in the source
1579 archived by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geissler517393d2023-01-13 08:55:19 -06001580 Recipe types are ``target``, :ref:`ref-classes-native`,
1581 :ref:`ref-classes-nativesdk`, :ref:`ref-classes-cross`,
1582 :ref:`ref-classes-crosssdk`, and :ref:`ref-classes-cross-canadian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001583
Andrew Geissler09036742021-06-25 14:25:14 -05001584 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001585 is set by the :ref:`ref-classes-copyleft_filter` class, which is
1586 inherited by the :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001587
Andrew Geisslerf0343792020-11-18 10:42:21 -06001588 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001589 Specifies the list of packages to be added to the image. You should
1590 only set this variable in the ``local.conf`` configuration file found
1591 in the :term:`Build Directory`.
1592
1593 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1594 supported.
1595
Andrew Geisslerf0343792020-11-18 10:42:21 -06001596 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001597 Specifies the parent directory of the OpenEmbedded-Core Metadata
1598 layer (i.e. ``meta``).
1599
Andrew Geissler09036742021-06-25 14:25:14 -05001600 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001601 of this layer and not the layer itself. Consider an example where you
1602 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001603 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001604 points to the ``poky`` folder because it is the parent directory of
1605 the ``poky/meta`` layer.
1606
Andrew Geisslerf0343792020-11-18 10:42:21 -06001607 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001608 Lists files from the :term:`COREBASE` directory that
1609 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001610 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001611 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001612 into the extensible SDK.
1613
Andrew Geissler09036742021-06-25 14:25:14 -05001614 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001615 typically contains build directories and other files that should not
1616 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001617 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001618 are actually needed.
1619
Andrew Geisslerf0343792020-11-18 10:42:21 -06001620 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001621 The minimal command and arguments used to run the C preprocessor.
1622
Andrew Geisslerf0343792020-11-18 10:42:21 -06001623 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001624 Specifies the flags to pass to the C pre-processor (i.e. to both the
1625 C and the C++ compilers). This variable is exported to an environment
1626 variable and thus made visible to the software being built during the
1627 compilation step.
1628
Andrew Geissler09036742021-06-25 14:25:14 -05001629 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001630 being built:
1631
1632 - :term:`TARGET_CPPFLAGS` when building for
1633 the target
1634
1635 - :term:`BUILD_CPPFLAGS` when building for the
1636 build host (i.e. ``-native``)
1637
1638 - :term:`BUILDSDK_CPPFLAGS` when building
1639 for an SDK (i.e. ``nativesdk-``)
1640
Andrew Geisslerf0343792020-11-18 10:42:21 -06001641 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001642 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001643 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001644 :term:`TARGET_PREFIX` variable.
1645
1646 .. note::
1647
Andrew Geissler09036742021-06-25 14:25:14 -05001648 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001649 variable only in certain contexts (e.g. when building for kernel
1650 and kernel module recipes).
1651
Andrew Geissler9aee5002022-03-30 16:27:02 +00001652 :term:`CVE_CHECK_IGNORE`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001653 The list of CVE IDs which are ignored. Here is
1654 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1655
1656 # This is windows only issue.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001657 CVE_CHECK_IGNORE += "CVE-2020-15523"
1658
Patrick Williams975a06f2022-10-21 14:42:47 -05001659 :term:`CVE_CHECK_SHOW_WARNINGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06001660 Specifies whether or not the :ref:`ref-classes-cve-check`
Patrick Williams975a06f2022-10-21 14:42:47 -05001661 class should generate warning messages on the console when unpatched
1662 CVEs are found. The default is "1", but you may wish to set it to "0" if
1663 you are already examining/processing the logs after the build has
1664 completed and thus do not need the warning messages.
1665
Andrew Geissler9aee5002022-03-30 16:27:02 +00001666 :term:`CVE_CHECK_SKIP_RECIPE`
1667 The list of package names (:term:`PN`) for which
1668 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001669
Patrick Williams975a06f2022-10-21 14:42:47 -05001670 :term:`CVE_DB_UPDATE_INTERVAL`
1671 Specifies the CVE database update interval in seconds, as used by
1672 ``cve-update-db-native``. The default value is "86400" i.e. once a day
1673 (24*60*60). If the value is set to "0" then the update will be forced
1674 every time. Alternatively, a negative value e.g. "-1" will disable
1675 updates entirely.
1676
Patrick Williams213cb262021-08-07 19:21:33 -05001677 :term:`CVE_PRODUCT`
1678 In a recipe, defines the name used to match the recipe name
1679 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1680
Patrick Williams975a06f2022-10-21 14:42:47 -05001681 The default is ${:term:`BPN`} (except for recipes that inherit the
Andrew Geissler517393d2023-01-13 08:55:19 -06001682 :ref:`ref-classes-pypi` class where it is set based upon
Patrick Williams975a06f2022-10-21 14:42:47 -05001683 :term:`PYPI_PACKAGE`). If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001684 database or matches with multiple entries in the database, the default
1685 value needs to be changed.
1686
1687 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1688
1689 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1690
Patrick Williams03907ee2022-05-01 06:28:52 -05001691 Sometimes the product name is not specific enough, for example
1692 "tar" has been matching CVEs for the GNU ``tar`` package and also
1693 the ``node-tar`` node.js extension. To avoid this problem, use the
1694 vendor name as a prefix. The syntax for this is::
1695
1696 CVE_PRODUCT = "vendor:package"
1697
Patrick Williams2390b1b2022-11-03 13:47:49 -05001698 :term:`CVE_VERSION`
1699 In a recipe, defines the version used to match the recipe version
1700 against the version in the `NIST CVE database <https://nvd.nist.gov/>`__
Andrew Geissler517393d2023-01-13 08:55:19 -06001701 when usign :ref:`ref-classes-cve-check`.
Patrick Williams2390b1b2022-11-03 13:47:49 -05001702
1703 The default is ${:term:`PV`} but if recipes use custom version numbers
1704 which do not map to upstream software component release versions and the versions
1705 used in the CVE database, then this variable can be used to set the
Andrew Geissler517393d2023-01-13 08:55:19 -06001706 version number for :ref:`ref-classes-cve-check`. Example::
Patrick Williams2390b1b2022-11-03 13:47:49 -05001707
1708 CVE_VERSION = "2.39"
1709
Andrew Geisslerf0343792020-11-18 10:42:21 -06001710 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001711 The directory in which files checked out under the CVS system are
1712 stored.
1713
Andrew Geisslerf0343792020-11-18 10:42:21 -06001714 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001715 The minimal command and arguments used to run the C++ compiler.
1716
Andrew Geisslerf0343792020-11-18 10:42:21 -06001717 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001718 Specifies the flags to pass to the C++ compiler. This variable is
1719 exported to an environment variable and thus made visible to the
1720 software being built during the compilation step.
1721
Andrew Geissler09036742021-06-25 14:25:14 -05001722 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001723 being built:
1724
1725 - :term:`TARGET_CXXFLAGS` when building for
1726 the target
1727
1728 - :term:`BUILD_CXXFLAGS` when building for the
1729 build host (i.e. ``-native``)
1730
1731 - :term:`BUILDSDK_CXXFLAGS` when building
1732 for an SDK (i.e. ``nativesdk-``)
1733
Andrew Geisslerf0343792020-11-18 10:42:21 -06001734 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001735 The destination directory. The location in the :term:`Build Directory`
1736 where components are installed by the
1737 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001738 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001739
1740 ${WORKDIR}/image
1741
1742 .. note::
1743
1744 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001745 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001746
Andrew Geisslerf0343792020-11-18 10:42:21 -06001747 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001748 The date the build was started. Dates appear using the year, month,
1749 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1750
Andrew Geisslerf0343792020-11-18 10:42:21 -06001751 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001752 The date and time on which the current build started. The format is
1753 suitable for timestamps.
1754
Andrew Geisslerf0343792020-11-18 10:42:21 -06001755 :term:`DEBIAN_NOAUTONAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06001756 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001757 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001758 particular package should not be renamed according to Debian library
1759 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001760 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001761
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001762 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001763
Andrew Geisslerf0343792020-11-18 10:42:21 -06001764 :term:`DEBIANNAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06001765 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001766 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001767 the library name for an individual package. Overriding the library
1768 name in these cases is rare. You must use the package name as an
1769 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001770 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001771
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001772 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001773
Andrew Geisslerf0343792020-11-18 10:42:21 -06001774 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001775 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001776 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001777
Andrew Geisslerf0343792020-11-18 10:42:21 -06001778 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001779 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001780 compiling a system for debugging. This variable defaults to "-O
1781 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1782
Andrew Geisslereff27472021-10-29 15:35:00 -05001783 :term:`DEBUG_PREFIX_MAP`
1784 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1785 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1786 replace build-time paths by install-time ones in the debugging sections
1787 of binaries. This makes compiler output files location independent,
1788 at the cost of having to pass an extra command to tell the debugger
1789 where source files are.
1790
1791 This is used by the Yocto Project to guarantee
1792 :doc:`/test-manual/reproducible-builds` even when the source code of
1793 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1794 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1795 website for details.
1796
1797 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1798 not intended to be user-configurable.
1799
Andrew Geissler9aee5002022-03-30 16:27:02 +00001800 :term:`DEFAULT_PREFERENCE`
1801 Specifies a weak bias for recipe selection priority.
1802
1803 The most common usage of this is variable is to set it to "-1" within
1804 a recipe for a development version of a piece of software. Using the
1805 variable in this way causes the stable version of the recipe to build
1806 by default in the absence of :term:`PREFERRED_VERSION` being used to
1807 build the development version.
1808
1809 .. note::
1810
1811 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1812 by :term:`BBFILE_PRIORITY` if that variable is different between two
1813 layers that contain different versions of the same recipe.
1814
Andrew Geisslerf0343792020-11-18 10:42:21 -06001815 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001816 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1817 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001818 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001819 :term:`TUNE_FEATURES`.
1820
1821 The default tune is either implicitly or explicitly set by the
1822 machine (:term:`MACHINE`). However, you can override
1823 the setting using available tunes as defined with
1824 :term:`AVAILTUNES`.
1825
Andrew Geisslerf0343792020-11-18 10:42:21 -06001826 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001827 Lists a recipe's build-time dependencies. These are dependencies on
1828 other recipes whose contents (e.g. headers and shared libraries) are
1829 needed by the recipe at build time.
1830
1831 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001832 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001833
1834 DEPENDS = "bar"
1835
1836 The practical effect of the previous
1837 assignment is that all files installed by bar will be available in
1838 the appropriate staging sysroot, given by the
1839 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1840 :ref:`ref-tasks-configure` task for ``foo`` runs.
Patrick Williams2194f502022-10-16 14:26:09 -05001841 This mechanism is implemented by having :ref:`ref-tasks-configure` depend on
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001842 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001843 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001844 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
Andrew Geissler517393d2023-01-13 08:55:19 -06001845 declaration in the :ref:`ref-classes-base` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001846
1847 .. note::
1848
Andrew Geissler09036742021-06-25 14:25:14 -05001849 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001850 explicitly. The standard classes and build-related variables are
1851 configured to automatically use the appropriate staging sysroots.
1852
Andrew Geissler09036742021-06-25 14:25:14 -05001853 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001854 that run on the build machine during the build. For example, a recipe
1855 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001856 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001857
1858 DEPENDS = "codegen-native"
1859
1860 For more
Andrew Geissler517393d2023-01-13 08:55:19 -06001861 information, see the :ref:`ref-classes-native` class and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001862 the :term:`EXTRANATIVEPATH` variable.
1863
1864 .. note::
1865
Andrew Geissler09036742021-06-25 14:25:14 -05001866 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001867 it is a list of :term:`PROVIDES` names, which
1868 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001869 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001870 instead, as this will put files from all the packages that make
1871 up ``foo``, which includes those from ``foo-dev``, into the
1872 sysroot.
1873
Andrew Geissler09036742021-06-25 14:25:14 -05001874 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001875 itself add any runtime dependencies between the packages
1876 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001877 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001878 section in the Yocto Project Overview and Concepts Manual,
1879 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001880 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001881
Andrew Geissler09036742021-06-25 14:25:14 -05001882 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001883 recipes that install precompiled components. For example, if
1884 ``libfoo`` is a precompiled library that links against
1885 ``libbar``, then linking against ``libfoo`` requires both
1886 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001887 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001888 to the recipe that installs ``libbar``, other recipes might
1889 fail to link against ``libfoo``.
1890
1891 For information on runtime dependencies, see the
1892 :term:`RDEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05001893 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1894 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001895 BitBake User Manual for additional information on tasks and
1896 dependencies.
1897
Andrew Geisslerf0343792020-11-18 10:42:21 -06001898 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001899 Points to the general area that the OpenEmbedded build system uses to
1900 place images, packages, SDKs, and other output files that are ready
1901 to be used outside of the build system. By default, this directory
Patrick Williams2390b1b2022-11-03 13:47:49 -05001902 resides within the :term:`Build Directory` as ``${TMPDIR}/deploy``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001903
1904 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001905 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001906 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001907 ":ref:`overview-manual/concepts:images`",
1908 ":ref:`overview-manual/concepts:package feeds`", and
1909 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001910 Yocto Project Overview and Concepts Manual.
1911
Andrew Geisslerf0343792020-11-18 10:42:21 -06001912 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001913 Points to the area that the OpenEmbedded build system uses to place
1914 Debian packages that are ready to be used outside of the build
Andrew Geissler517393d2023-01-13 08:55:19 -06001915 system. This variable applies only when :term:`PACKAGE_CLASSES` contains
1916 ":ref:`ref-classes-package_deb`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001917
1918 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001919 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001920 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001921
1922 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1923
Andrew Geissler517393d2023-01-13 08:55:19 -06001924 The :ref:`ref-classes-package_deb` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001925 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001926 :ref:`ref-tasks-package_write_deb` task
1927 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001928 information on how packaging works, see the
1929 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001930 in the Yocto Project Overview and Concepts Manual.
1931
Andrew Geisslerf0343792020-11-18 10:42:21 -06001932 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001933 Points to the area that the OpenEmbedded build system uses to place
1934 images and other associated output files that are ready to be
1935 deployed onto the target machine. The directory is machine-specific
1936 as it contains the ``${MACHINE}`` name. By default, this directory
1937 resides within the :term:`Build Directory` as
1938 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1939
Andrew Geissler09036742021-06-25 14:25:14 -05001940 It must not be used directly in recipes when deploying files. Instead,
1941 it's only useful when a recipe needs to "read" a file already deployed
1942 by a dependency. So, it should be filled with the contents of
Andrew Geissler517393d2023-01-13 08:55:19 -06001943 :term:`DEPLOYDIR` by the :ref:`ref-classes-deploy` class or with the
1944 contents of :term:`IMGDEPLOYDIR` by the :ref:`ref-classes-image` class.
Andrew Geissler09036742021-06-25 14:25:14 -05001945
Patrick Williams2390b1b2022-11-03 13:47:49 -05001946 For more information on the structure of the :term:`Build Directory`, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001947 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001948 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001949 ":ref:`overview-manual/concepts:images`" and
1950 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001951 the Yocto Project Overview and Concepts Manual.
1952
Andrew Geisslerf0343792020-11-18 10:42:21 -06001953 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001954 Points to the area that the OpenEmbedded build system uses to place
1955 IPK packages that are ready to be used outside of the build system.
Andrew Geissler517393d2023-01-13 08:55:19 -06001956 This variable applies only when :term:`PACKAGE_CLASSES` contains
1957 ":ref:`ref-classes-package_ipk`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001958
1959 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001960 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001961
1962 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1963
Andrew Geissler517393d2023-01-13 08:55:19 -06001964 The :ref:`ref-classes-package_ipk` class uses the :term:`DEPLOY_DIR_IPK`
1965 variable to make sure the :ref:`ref-tasks-package_write_ipk` task
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001966 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001967 on how packaging works, see the
1968 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001969 in the Yocto Project Overview and Concepts Manual.
1970
Andrew Geisslerf0343792020-11-18 10:42:21 -06001971 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001972 Points to the area that the OpenEmbedded build system uses to place
1973 RPM packages that are ready to be used outside of the build system.
Andrew Geissler517393d2023-01-13 08:55:19 -06001974 This variable applies only when :term:`PACKAGE_CLASSES` contains
1975 ":ref:`ref-classes-package_rpm`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001976
1977 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001978 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001979
1980 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1981
Andrew Geissler517393d2023-01-13 08:55:19 -06001982 The :ref:`ref-classes-package_rpm` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001983 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001984 :ref:`ref-tasks-package_write_rpm` task
1985 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001986 on how packaging works, see the
1987 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001988 in the Yocto Project Overview and Concepts Manual.
1989
Andrew Geisslerf0343792020-11-18 10:42:21 -06001990 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001991 Points to the area that the OpenEmbedded build system uses to place
1992 tarballs that are ready to be used outside of the build system. This
Andrew Geissler517393d2023-01-13 08:55:19 -06001993 variable applies only when :term:`PACKAGE_CLASSES` contains
1994 ":ref:`ref-classes-package_tar`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001995
1996 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001997 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001998
1999 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
2000
Andrew Geissler517393d2023-01-13 08:55:19 -06002001 The :ref:`ref-classes-package_tar` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05002002 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002003 :ref:`ref-tasks-package_write_tar` task
2004 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06002005 on how packaging works, see the
2006 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002007 in the Yocto Project Overview and Concepts Manual.
2008
Andrew Geisslerf0343792020-11-18 10:42:21 -06002009 :term:`DEPLOYDIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06002010 When inheriting the :ref:`ref-classes-deploy` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05002011 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler517393d2023-01-13 08:55:19 -06002012 is set in the :ref:`ref-classes-deploy` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002013
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002014 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002015
Andrew Geissler517393d2023-01-13 08:55:19 -06002016 Recipes inheriting the :ref:`ref-classes-deploy` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05002017 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002018 them into :term:`DEPLOY_DIR_IMAGE`
2019 afterwards.
2020
Andrew Geisslerf0343792020-11-18 10:42:21 -06002021 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002022 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05002023 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002024 variable.
2025
Patrick Williams975a06f2022-10-21 14:42:47 -05002026 :term:`DEV_PKG_DEPENDENCY`
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002027 Provides an easy way for recipes to disable or adjust the runtime recommendation
2028 (:term:`RRECOMMENDS`) of the ``${PN}-dev`` package on the main
2029 (``${PN}``) package.
Patrick Williams975a06f2022-10-21 14:42:47 -05002030
2031 :term:`DISABLE_STATIC`
2032 Used in order to disable static linking by default (in order to save
2033 space, since static libraries are often unused in embedded systems.)
2034 The default value is " --disable-static", however it can be set to ""
2035 in order to enable static linking if desired. Certain recipes do this
2036 individually, and also there is a
2037 ``meta/conf/distro/include/no-static-libs.inc`` include file that
2038 disables static linking for a number of recipes. Some software
2039 packages or build tools (such as CMake) have explicit support for
2040 enabling / disabling static linking, and in those cases
2041 :term:`DISABLE_STATIC` is not used.
2042
Andrew Geisslerf0343792020-11-18 10:42:21 -06002043 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002044 The short name of the distribution. For information on the long name
2045 of the distribution, see the :term:`DISTRO_NAME`
2046 variable.
2047
Andrew Geissler09036742021-06-25 14:25:14 -05002048 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002049 file whose root name is the same as the variable's argument and whose
2050 filename extension is ``.conf``. For example, the distribution
2051 configuration file for the Poky distribution is named ``poky.conf``
2052 and resides in the ``meta-poky/conf/distro`` directory of the
2053 :term:`Source Directory`.
2054
Andrew Geissler09036742021-06-25 14:25:14 -05002055 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002056 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002057
2058 DISTRO = "poky"
2059
2060 Distribution configuration files are located in a ``conf/distro``
2061 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05002062 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002063 spaces, and is typically all lower-case.
2064
2065 .. note::
2066
Andrew Geissler09036742021-06-25 14:25:14 -05002067 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002068 are used, which are specified within
2069 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002070
Andrew Geisslerf0343792020-11-18 10:42:21 -06002071 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002072 Specifies a codename for the distribution being built.
2073
Andrew Geisslerf0343792020-11-18 10:42:21 -06002074 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002075 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00002076 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002077 variable only really applies to the more full-featured images that
2078 include ``packagegroup-base``. You can use this variable to keep
2079 distro policy out of generic images. As with all other distro
2080 variables, you set this variable in the distro ``.conf`` file.
2081
Andrew Geisslerf0343792020-11-18 10:42:21 -06002082 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002083 Specifies a list of distro-specific packages to add to all images if
2084 the packages exist. The packages might not exist or be empty (e.g.
2085 kernel modules). The list of packages are automatically installed but
2086 you can remove them.
2087
Andrew Geisslerf0343792020-11-18 10:42:21 -06002088 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002089 The software support you want in your distribution for various
2090 features. You define your distribution features in the distribution
2091 configuration file.
2092
2093 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05002094 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002095 to the configure script during the
2096 :ref:`ref-tasks-configure` task for recipes that
2097 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05002098 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002099 target that can optionally support X11 to have its X11 support
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05002100 enabled.
2101
2102 .. note::
2103
2104 Just enabling :term:`DISTRO_FEATURES` alone doesn't
2105 enable feature support for packages. Mechanisms such as making
2106 :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used
2107 to enable/disable package features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002108
2109 Two more examples are Bluetooth and NFS support. For a more complete
2110 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002111 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002112
Andrew Geisslerf0343792020-11-18 10:42:21 -06002113 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05002114 Features to be added to :term:`DISTRO_FEATURES` if not also present in
2115 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002116
2117 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
2118 not intended to be user-configurable. It is best to just reference
2119 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002120 all distro configurations. See the ":ref:`ref-features-backfill`" section
2121 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002122
Andrew Geisslerf0343792020-11-18 10:42:21 -06002123 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05002124 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
2125 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002126 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002127
Andrew Geisslerf0343792020-11-18 10:42:21 -06002128 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002129 A convenience variable that gives you the default list of distro
2130 features with the exception of any features specific to the C library
2131 (``libc``).
2132
2133 When creating a custom distribution, you might find it useful to be
2134 able to reuse the default
2135 :term:`DISTRO_FEATURES` options without the
2136 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05002137 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002138
2139 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
2140
Andrew Geisslerf0343792020-11-18 10:42:21 -06002141 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002142 Specifies a list of features that if present in the target
2143 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05002144 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002145 variable is used in addition to the features filtered using the
2146 :term:`DISTRO_FEATURES_NATIVE`
2147 variable.
2148
Andrew Geisslerf0343792020-11-18 10:42:21 -06002149 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002150 Specifies a list of features that if present in the target
Andrew Geissler517393d2023-01-13 08:55:19 -06002151 :term:`DISTRO_FEATURES` value should be included in
2152 :term:`DISTRO_FEATURES` when building :ref:`ref-classes-nativesdk`
2153 recipes. This variable is used in addition to the features filtered using
2154 the :term:`DISTRO_FEATURES_NATIVESDK` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002155
Andrew Geisslerf0343792020-11-18 10:42:21 -06002156 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002157 Specifies a list of features that should be included in
2158 :term:`DISTRO_FEATURES` when building native
2159 recipes. This variable is used in addition to the features filtered
2160 using the
2161 :term:`DISTRO_FEATURES_FILTER_NATIVE`
2162 variable.
2163
Andrew Geisslerf0343792020-11-18 10:42:21 -06002164 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002165 Specifies a list of features that should be included in
2166 :term:`DISTRO_FEATURES` when building
Andrew Geissler517393d2023-01-13 08:55:19 -06002167 :ref:`ref-classes-nativesdk` recipes. This variable is used
2168 in addition to the features filtered using the
2169 :term:`DISTRO_FEATURES_FILTER_NATIVESDK` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002170
Andrew Geisslerf0343792020-11-18 10:42:21 -06002171 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002172 The long name of the distribution. For information on the short name
2173 of the distribution, see the :term:`DISTRO` variable.
2174
Andrew Geissler09036742021-06-25 14:25:14 -05002175 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002176 configuration file whose root name is the same as the variable's
2177 argument and whose filename extension is ``.conf``. For example, the
2178 distribution configuration file for the Poky distribution is named
2179 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
2180 of the :term:`Source Directory`.
2181
Andrew Geissler09036742021-06-25 14:25:14 -05002182 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05002183 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002184
2185 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
2186
2187 Distribution configuration files are located in a ``conf/distro``
2188 directory within the :term:`Metadata` that contains the
2189 distribution configuration.
2190
2191 .. note::
2192
Andrew Geissler09036742021-06-25 14:25:14 -05002193 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002194 configurations are used, which are specified within
2195 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002196
Andrew Geisslerf0343792020-11-18 10:42:21 -06002197 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002198 The version of the distribution.
2199
Andrew Geisslerf0343792020-11-18 10:42:21 -06002200 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002201 A colon-separated list of overrides specific to the current
2202 distribution. By default, this list includes the value of
2203 :term:`DISTRO`.
2204
Andrew Geissler09036742021-06-25 14:25:14 -05002205 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002206 apply to the distribution.
2207
Andrew Geissler09036742021-06-25 14:25:14 -05002208 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002209 is included in the default value of
2210 :term:`OVERRIDES`.
2211
Andrew Geisslerf0343792020-11-18 10:42:21 -06002212 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002213 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05002214 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002215 for everything except Git repositories. If you want tarballs of Git
2216 repositories, use the
2217 :term:`BB_GENERATE_MIRROR_TARBALLS`
2218 variable.
2219
Andrew Geissler09036742021-06-25 14:25:14 -05002220 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002221 ``conf/local.conf`` file. This directory is self-maintaining and you
2222 should not have to touch it. By default, the directory is
Patrick Williams2390b1b2022-11-03 13:47:49 -05002223 ``downloads`` in the :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002224
2225 #DL_DIR ?= "${TOPDIR}/downloads"
2226
2227 To specify a different download directory,
2228 simply remove the comment from the line and provide your directory.
2229
2230 During a first build, the system downloads many different source code
2231 tarballs from various upstream projects. Downloading can take a
2232 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002233 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002234 system looks there first to find source tarballs.
2235
2236 .. note::
2237
2238 When wiping and rebuilding, you can preserve this directory to
2239 speed up this part of subsequent builds.
2240
2241 You can safely share this directory between multiple builds on the
2242 same development machine. For additional information on how the build
2243 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002244 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002245 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002246 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002247 Wiki page.
2248
Andrew Geisslerf0343792020-11-18 10:42:21 -06002249 :term:`DOC_COMPRESS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002250 When inheriting the :ref:`ref-classes-compress_doc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002251 class, this variable sets the compression policy used when the
2252 OpenEmbedded build system compresses man pages and info pages. By
2253 default, the compression method used is gz (gzip). Other policies
2254 available are xz and bz2.
2255
2256 For information on policies and on how to use this variable, see the
Patrick Williams975a06f2022-10-21 14:42:47 -05002257 comments in the ``meta/classes-recipe/compress_doc.bbclass`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002258
Andrew Geisslerf0343792020-11-18 10:42:21 -06002259 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002260 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2261 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002262 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002263 default is "grub-efi", but "systemd-boot" can be used instead.
2264
Andrew Geissler517393d2023-01-13 08:55:19 -06002265 See the :ref:`ref-classes-systemd-boot` and :ref:`ref-classes-image-live`
2266 classes for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002267
Andrew Geisslerf0343792020-11-18 10:42:21 -06002268 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002269 Variable that controls which locales for ``glibc`` are generated
2270 during the build (useful if the target device has 64Mbytes of RAM or
2271 less).
2272
Andrew Geisslerf0343792020-11-18 10:42:21 -06002273 :term:`ERR_REPORT_DIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06002274 When used with the :ref:`ref-classes-report-error` class, specifies the
2275 path used for storing the debug files created by the :ref:`error reporting
2276 tool <dev-manual/error-reporting-tool:using the error reporting tool>`,
2277 which allows you to submit build errors you encounter to a central
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002278 database. By default, the value of this variable is
2279 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2280
Andrew Geissler09036742021-06-25 14:25:14 -05002281 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002282 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002283 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002284
2285 ERR_REPORT_DIR = "path"
2286
Andrew Geisslerf0343792020-11-18 10:42:21 -06002287 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002288 Specifies the quality assurance checks whose failures are reported as
2289 errors by the OpenEmbedded build system. You set this variable in
2290 your distribution configuration file. For a list of the checks you
2291 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002292 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002293
Andrew Geissler9aee5002022-03-30 16:27:02 +00002294 :term:`ESDK_CLASS_INHERIT_DISABLE`
2295 A list of classes to remove from the :term:`INHERIT`
2296 value globally within the extensible SDK configuration. The
2297 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2298 default value::
2299
2300 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2301
2302 Some classes are not generally applicable within the extensible SDK
2303 context. You can use this variable to disable those classes.
2304
2305 For additional information on how to customize the extensible SDK's
2306 configuration, see the
2307 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2308 section in the Yocto Project Application Development and the
2309 Extensible Software Development Kit (eSDK) manual.
2310
2311 :term:`ESDK_LOCALCONF_ALLOW`
2312 A list of variables allowed through from the OpenEmbedded build
2313 system configuration into the extensible SDK configuration. By
2314 default, the list of variables is empty and is set in the
2315 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2316
2317 This list overrides the variables specified using the
2318 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2319 other variables automatically added due to the "/" character
2320 being found at the start of the
2321 value, which is usually indicative of being a path and thus might not
2322 be valid on the system where the SDK is installed.
2323
2324 For additional information on how to customize the extensible SDK's
2325 configuration, see the
2326 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2327 section in the Yocto Project Application Development and the
2328 Extensible Software Development Kit (eSDK) manual.
2329
2330 :term:`ESDK_LOCALCONF_REMOVE`
2331 A list of variables not allowed through from the OpenEmbedded build
2332 system configuration into the extensible SDK configuration. Usually,
2333 these are variables that are specific to the machine on which the
2334 build system is running and thus would be potentially problematic
2335 within the extensible SDK.
2336
2337 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2338 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2339 excludes the following variables:
2340
2341 - :term:`CONF_VERSION`
2342 - :term:`BB_NUMBER_THREADS`
2343 - :term:`BB_NUMBER_PARSE_THREADS`
2344 - :term:`PARALLEL_MAKE`
2345 - :term:`PRSERV_HOST`
2346 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2347 - :term:`SSTATE_DIR` :term:`TMPDIR`
2348 - :term:`BB_SERVER_TIMEOUT`
2349
2350 For additional information on how to customize the extensible SDK's
2351 configuration, see the
2352 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2353 section in the Yocto Project Application Development and the
2354 Extensible Software Development Kit (eSDK) manual.
2355
Andrew Geisslerf0343792020-11-18 10:42:21 -06002356 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002357 Triggers the OpenEmbedded build system's shared libraries resolver to
2358 exclude an entire package when scanning for shared libraries.
2359
2360 .. note::
2361
2362 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002363 the internal function ``package_do_shlibs``, which is part of the
2364 :ref:`ref-tasks-package` task. You should be aware that the shared
2365 libraries resolver might implicitly define some dependencies between
2366 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002367
Andrew Geissler09036742021-06-25 14:25:14 -05002368 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002369 :term:`PRIVATE_LIBS` variable, which excludes a
2370 package's particular libraries only and not the whole package.
2371
Andrew Geissler09036742021-06-25 14:25:14 -05002372 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002373 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002374
2375 EXCLUDE_FROM_SHLIBS = "1"
2376
Andrew Geisslerf0343792020-11-18 10:42:21 -06002377 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002378 Directs BitBake to exclude a recipe from world builds (i.e.
2379 ``bitbake world``). During world builds, BitBake locates, parses and
2380 builds all recipes found in every layer exposed in the
2381 ``bblayers.conf`` configuration file.
2382
2383 To exclude a recipe from a world build using this variable, set the
2384 variable to "1" in the recipe.
2385
2386 .. note::
2387
Andrew Geissler09036742021-06-25 14:25:14 -05002388 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002389 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002390 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002391 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002392
Andrew Geisslerf0343792020-11-18 10:42:21 -06002393 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002394 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002395 version based on the recipe's :term:`PE` value. If :term:`PE`
2396 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2397 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2398 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2399 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002400
2401 See the :term:`STAMP` variable for an example.
2402
Andrew Geisslerf0343792020-11-18 10:42:21 -06002403 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002404 The full package version specification as it appears on the final
2405 packages produced by a recipe. The variable's value is normally used
2406 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002407 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002408
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002409 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002410
2411 The dependency relationships are intended to force the package
2412 manager to upgrade these types of packages in lock-step.
2413
Andrew Geisslerf0343792020-11-18 10:42:21 -06002414 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002415 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002416 tools are not in the source tree.
2417
2418 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002419 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002420 variable tells the OpenEmbedded build system to prefer the installed
Andrew Geissler517393d2023-01-13 08:55:19 -06002421 external tools. See the :ref:`ref-classes-kernel-yocto` class in
Patrick Williams975a06f2022-10-21 14:42:47 -05002422 ``meta/classes-recipe`` to see how the variable is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002423
Andrew Geissler517393d2023-01-13 08:55:19 -06002424 :term:`EXTERNAL_TOOLCHAIN`
2425 When you intend to use an
2426 :ref:`external toolchain <dev-manual/external-toolchain:optionally using an external toolchain>`,
2427 this variable allows to specify the directory where this toolchain was
2428 installed.
2429
Andrew Geisslerf0343792020-11-18 10:42:21 -06002430 :term:`EXTERNALSRC`
Andrew Geissler517393d2023-01-13 08:55:19 -06002431 When inheriting the :ref:`ref-classes-externalsrc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002432 class, this variable points to the source tree, which is outside of
2433 the OpenEmbedded build system. When set, this variable sets the
2434 :term:`S` variable, which is what the OpenEmbedded build
2435 system uses to locate unpacked recipe source code.
2436
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002437 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002438 can also find information on how to use this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06002439 ":ref:`dev-manual/building:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002440 section in the Yocto Project Development Tasks Manual.
2441
Andrew Geisslerf0343792020-11-18 10:42:21 -06002442 :term:`EXTERNALSRC_BUILD`
Andrew Geissler517393d2023-01-13 08:55:19 -06002443 When inheriting the :ref:`ref-classes-externalsrc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002444 class, this variable points to the directory in which the recipe's
2445 source code is built, which is outside of the OpenEmbedded build
2446 system. When set, this variable sets the :term:`B` variable,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002447 which is what the OpenEmbedded build system uses to locate the
2448 :term:`Build Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002449
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:`EXTRA_AUTORECONF`
Andrew Geissler517393d2023-01-13 08:55:19 -06002456 For recipes inheriting the :ref:`ref-classes-autotools`
Andrew Geissler09036742021-06-25 14:25:14 -05002457 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002458 pass to the ``autoreconf`` command that is executed during the
2459 :ref:`ref-tasks-configure` task.
2460
2461 The default value is "--exclude=autopoint".
2462
Andrew Geisslerf0343792020-11-18 10:42:21 -06002463 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002464 A list of additional features to include in an image. When listing
2465 more than one feature, separate them with a space.
2466
2467 Typically, you configure this variable in your ``local.conf`` file,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002468 which is found in the :term:`Build Directory`. Although you can use this
2469 variable from within a recipe, best practices dictate that you do not.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002470
2471 .. note::
2472
2473 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002474 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002475
2476 Here are some examples of features you can add:
2477
Andrew Geissler615f2f12022-07-15 14:00:58 -05002478 - "dbg-pkgs" --- adds -dbg packages for all installed packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002479 symbol information for debugging and profiling.
2480
Andrew Geissler615f2f12022-07-15 14:00:58 -05002481 - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002482 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002483 'post-install-logging' features in the ":ref:`ref-features-image`"
2484 section for more information.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002485 - "dev-pkgs" --- adds -dev packages for all installed packages. This is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002486 useful if you want to develop against the libraries in the image.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002487 - "read-only-rootfs" --- creates an image whose root filesystem is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002488 read-only. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06002489 ":ref:`dev-manual/read-only-rootfs:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002490 section in the Yocto Project Development Tasks Manual for more
2491 information
Andrew Geissler615f2f12022-07-15 14:00:58 -05002492 - "tools-debug" --- adds debugging tools such as gdb and strace.
2493 - "tools-sdk" --- adds development tools such as gcc, make,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002494 pkgconfig and so forth.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002495 - "tools-testapps" --- adds useful testing tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002496 such as ts_print, aplay, arecord and so forth.
2497
2498 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002499 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002500
2501 For an example that shows how to customize your image by using this
Andrew Geissler517393d2023-01-13 08:55:19 -06002502 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 -05002503 section in the Yocto Project Development Tasks Manual.
2504
Andrew Geisslerf0343792020-11-18 10:42:21 -06002505 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002506 Specifies additional options for the image creation command that has
2507 been specified in :term:`IMAGE_CMD`. When setting
2508 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002509 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002510
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002511 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002512
Andrew Geisslerf0343792020-11-18 10:42:21 -06002513 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002514 A list of recipes to build that do not provide packages for
2515 installing into the root filesystem.
2516
2517 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002518 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002519 variable to list these recipes and thus specify the dependencies. A
2520 typical example is a required bootloader in a machine configuration.
2521
2522 .. note::
2523
2524 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002525 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002526
Andrew Geisslerf0343792020-11-18 10:42:21 -06002527 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002528 Additional `CMake <https://cmake.org/overview/>`__ options. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06002529 :ref:`ref-classes-cmake` class for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002530
Andrew Geisslerf0343792020-11-18 10:42:21 -06002531 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002532 Additional ``configure`` script options. See
2533 :term:`PACKAGECONFIG_CONFARGS` for
2534 additional information on passing configure script options.
2535
Andrew Geisslerf0343792020-11-18 10:42:21 -06002536 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002537 Additional GNU ``make`` options.
2538
Andrew Geissler09036742021-06-25 14:25:14 -05002539 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002540 variable to specify any required GNU options.
2541
2542 :term:`PARALLEL_MAKE` and
2543 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002544 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002545
Andrew Geisslerf0343792020-11-18 10:42:21 -06002546 :term:`EXTRA_OESCONS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002547 When inheriting the :ref:`ref-classes-scons` class, this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002548 variable specifies additional configuration options you want to pass
2549 to the ``scons`` command line.
2550
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002551 :term:`EXTRA_OEMESON`
2552 Additional `Meson <https://mesonbuild.com/>`__ options. See the
2553 :ref:`ref-classes-meson` class for additional information.
2554
2555 In addition to standard Meson options, such options correspond to
2556 `Meson build options <https://mesonbuild.com/Build-options.html>`__
2557 defined in the ``meson_options.txt`` file in the sources to build.
2558 Here is an example::
2559
2560 EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
2561
2562 Note that any custom value for the Meson ``--buildtype`` option
2563 should be set through the :term:`MESON_BUILDTYPE` variable.
2564
Andrew Geisslerf0343792020-11-18 10:42:21 -06002565 :term:`EXTRA_USERS_PARAMS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002566 When inheriting the :ref:`ref-classes-extrausers`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002567 class, this variable provides image level user and group operations.
2568 This is a more global method of providing user and group
2569 configuration as compared to using the
Andrew Geissler517393d2023-01-13 08:55:19 -06002570 :ref:`ref-classes-useradd` class, which ties user and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002571 group configurations to a specific recipe.
2572
2573 The set list of commands you can configure using the
Andrew Geissler517393d2023-01-13 08:55:19 -06002574 :term:`EXTRA_USERS_PARAMS` is shown in the
2575 :ref:`ref-classes-extrausers` class. These commands map to the normal
2576 Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002577
2578 # EXTRA_USERS_PARAMS = "\
2579 # useradd -p '' tester; \
2580 # groupadd developers; \
2581 # userdel nobody; \
2582 # groupdel -g video; \
2583 # groupmod -g 1020 developers; \
2584 # usermod -s /bin/sh tester; \
2585 # "
2586
Patrick Williams03907ee2022-05-01 06:28:52 -05002587 Hardcoded passwords are supported via the ``-p`` parameters for
2588 ``useradd`` or ``usermod``, but only hashed.
2589
2590 Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
2591 passwords. First on host, create the (escaped) password hash::
2592
2593 printf "%q" $(mkpasswd -m sha256crypt tester01)
2594
2595 The resulting hash is set to a variable and used in ``useradd`` command parameters::
2596
2597 inherit extrausers
2598 PASSWD = "\$X\$ABC123\$A-Long-Hash"
2599 EXTRA_USERS_PARAMS = "\
2600 useradd -p '${PASSWD}' tester-jim; \
2601 useradd -p '${PASSWD}' tester-sue; \
2602 "
2603
2604 Finally, here is an example that sets the root password::
2605
2606 inherit extrausers
2607 EXTRA_USERS_PARAMS = "\
2608 usermod -p '${PASSWD}' root; \
2609 "
2610
2611 .. note::
2612
2613 From a security perspective, hardcoding a default password is not
Andrew Geissler87f5cff2022-09-30 13:13:31 -05002614 generally a good idea or even legal in some jurisdictions. It is
2615 recommended that you do not do this if you are building a production
Patrick Williams03907ee2022-05-01 06:28:52 -05002616 image.
2617
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002618 Additionally there is a special ``passwd-expire`` command that will
2619 cause the password for a user to be expired and thus force changing it
2620 on first login, for example::
2621
2622 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2623
2624 .. note::
2625
2626 At present, ``passwd-expire`` may only work for remote logins when
2627 using OpenSSH and not dropbear as an SSH server.
2628
Andrew Geissler9aee5002022-03-30 16:27:02 +00002629 :term:`EXTRANATIVEPATH`
2630 A list of subdirectories of
2631 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2632 added to the beginning of the environment variable ``PATH``. As an
2633 example, the following prepends
2634 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2635 ``PATH``::
2636
2637 EXTRANATIVEPATH = "foo bar"
2638
Andrew Geissler517393d2023-01-13 08:55:19 -06002639 :term:`FAKEROOT`
2640 See :term:`bitbake:FAKEROOT` in the BitBake manual.
2641
2642 :term:`FAKEROOTBASEENV`
2643 See :term:`bitbake:FAKEROOTBASEENV` in the BitBake manual.
2644
2645 :term:`FAKEROOTCMD`
2646 See :term:`bitbake:FAKEROOTCMD` in the BitBake manual.
2647
2648 :term:`FAKEROOTDIRS`
2649 See :term:`bitbake:FAKEROOTDIRS` in the BitBake manual.
2650
2651 :term:`FAKEROOTENV`
2652 See :term:`bitbake:FAKEROOTENV` in the BitBake manual.
2653
2654 :term:`FAKEROOTNOENV`
2655 See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual.
2656
Andrew Geisslerf0343792020-11-18 10:42:21 -06002657 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002658 Defines one or more packages to include in an image when a specific
2659 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002660 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002661 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002662
2663 FEATURE_PACKAGES_widget = "package1 package2"
2664
Andrew Geissler09036742021-06-25 14:25:14 -05002665 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002666 package1 and package2 would be included in the image.
2667
2668 .. note::
2669
Andrew Geissler09036742021-06-25 14:25:14 -05002670 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002671 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002672 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002673 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002674
Andrew Geisslerf0343792020-11-18 10:42:21 -06002675 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002676 Points to the base URL of the server and location within the
2677 document-root that provides the metadata and packages required by
2678 OPKG to support runtime package management of IPK packages. You set
2679 this variable in your ``local.conf`` file.
2680
Andrew Geisslerc926e172021-05-07 16:11:35 -05002681 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002682
2683 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2684
2685 This example assumes you are serving
2686 your packages over HTTP and your databases are located in a directory
2687 named ``BOARD-dir``, which is underneath your HTTP server's
2688 document-root. In this case, the OpenEmbedded build system generates
2689 a set of configuration files for you in your target that work with
2690 the feed.
2691
Andrew Geissler517393d2023-01-13 08:55:19 -06002692 :term:`FETCHCMD`
2693 See :term:`bitbake:FETCHCMD` in the BitBake manual.
2694
2695 :term:`FILE`
2696 See :term:`bitbake:FILE` in the BitBake manual.
2697
Andrew Geisslerf0343792020-11-18 10:42:21 -06002698 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002699 The list of files and directories that are placed in a package. The
2700 :term:`PACKAGES` variable lists the packages
2701 generated by a recipe.
2702
Andrew Geissler09036742021-06-25 14:25:14 -05002703 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002704 identifies the resulting package. Then, provide a space-separated
2705 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002706 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002707
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002708 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002709
2710 .. note::
2711
2712 - When specifying files or paths, you can pattern match using
2713 Python's
Patrick Williams2390b1b2022-11-03 13:47:49 -05002714 `glob <https://docs.python.org/3/library/glob.html>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002715 syntax. For details on the syntax, see the documentation by
2716 following the previous link.
2717
Andrew Geissler09036742021-06-25 14:25:14 -05002718 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002719 good practice to use appropriate path variables. For example,
2720 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2721 rather than ``/usr/bin``. You can find a list of these
2722 variables at the top of the ``meta/conf/bitbake.conf`` file in
2723 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002724 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002725 this file.
2726
Andrew Geissler09036742021-06-25 14:25:14 -05002727 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002728 editable and you know they should not be overwritten during the
2729 package update process by the Package Management System (PMS), you
2730 can identify these files so that the PMS will not overwrite them. See
2731 the :term:`CONFFILES` variable for information on
2732 how to identify these files to the PMS.
2733
Andrew Geisslerf0343792020-11-18 10:42:21 -06002734 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002735 Defines the file specification to match
2736 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002737 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002738 symbolic link (symlink) for shared libraries on the target platform.
2739
2740 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002741 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002742
2743 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2744
Andrew Geisslerf0343792020-11-18 10:42:21 -06002745 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002746 Extends the search path the OpenEmbedded build system uses when
2747 looking for files and patches as it processes recipes and append
2748 files. The default directories BitBake uses when it processes recipes
2749 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002750 variable. You can extend :term:`FILESPATH` variable by using
2751 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002752
2753 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002754 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002755 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002756
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002757 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002758
2759 In the above example, the build system first
2760 looks for files in a directory that has the same name as the
2761 corresponding append file.
2762
2763 .. note::
2764
Andrew Geissler09036742021-06-25 14:25:14 -05002765 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002766 expansion (``:=``) operator. Immediate expansion makes sure that
2767 BitBake evaluates :term:`THISDIR` at the time the
2768 directive is encountered rather than at some later time when
2769 expansion might result in a directory that does not contain the
2770 files you need.
2771
2772 Also, include the trailing separating colon character if you are
2773 prepending. The trailing colon character is necessary because you
2774 are directing BitBake to extend the path by prepending directories
2775 to the search path.
2776
Andrew Geisslerc926e172021-05-07 16:11:35 -05002777 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002778
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002779 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002780
2781 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002782 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002783 in the same directory as the corresponding append file.
2784
Andrew Geisslerc926e172021-05-07 16:11:35 -05002785 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002786
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002787 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002788
2789 A final example shows how you can extend the search path and include
2790 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002791 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002792
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002793 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002794
2795 The previous statement appears in the
2796 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002797 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002798 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2799 override is a special :term:`PACKAGE_ARCH`
2800 definition for multiple ``meta-intel`` machines.
2801
2802 .. note::
2803
2804 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002805 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002806
2807 By prepending paths in ``.bbappend`` files, you allow multiple append
2808 files that reside in different layers but are used for the same
2809 recipe to correctly extend the path.
2810
Andrew Geisslerf0343792020-11-18 10:42:21 -06002811 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002812 A subset of :term:`OVERRIDES` used by the
2813 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002814 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002815 uses overrides to automatically extend the
2816 :term:`FILESPATH` variable. For an example of how
2817 that works, see the :term:`FILESPATH` variable
2818 description. Additionally, you find more information on how overrides
2819 are handled in the
2820 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2821 section of the BitBake User Manual.
2822
Andrew Geissler09036742021-06-25 14:25:14 -05002823 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002824
2825 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2826
2827 .. note::
2828
Andrew Geissler09036742021-06-25 14:25:14 -05002829 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002830 with expected overrides and are used in an expected manner by the
2831 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002832
Andrew Geisslerf0343792020-11-18 10:42:21 -06002833 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002834 The default set of directories the OpenEmbedded build system uses
2835 when searching for patches and files.
2836
2837 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002838 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002839 patches specified by each ``file://`` URI in a recipe's
2840 :term:`SRC_URI` statements.
2841
Andrew Geissler09036742021-06-25 14:25:14 -05002842 The default value for the :term:`FILESPATH` variable is defined in the
Patrick Williams975a06f2022-10-21 14:42:47 -05002843 :ref:`ref-classes-base` class found in ``meta/classes-global`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002844 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002845
2846 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2847 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2848
2849 The
Andrew Geissler09036742021-06-25 14:25:14 -05002850 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002851 from the :term:`FILESOVERRIDES` variable.
2852
2853 .. note::
2854
Andrew Geissler09036742021-06-25 14:25:14 -05002855 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002856 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002857 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002858 :term:`FILESEXTRAPATHS` variable.
2859
Andrew Geissler09036742021-06-25 14:25:14 -05002860 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002861 to directories in custom layers where append files
2862 (``.bbappend``) are used. If you want the build system to find
2863 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002864 to extend the :term:`FILESPATH` variable by using the
2865 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002866
2867 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002868 example, consider a case where there is the following directory structure
2869 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002870
2871 files/defconfig
2872 files/MACHINEA/defconfig
2873 files/MACHINEB/defconfig
2874
Andrew Geissler09036742021-06-25 14:25:14 -05002875 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002876 "file://defconfig". Given this scenario, you can set
2877 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002878 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002879 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2880 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2881 build system uses files from ``files/defconfig``.
2882
2883 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002884 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002885 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler517393d2023-01-13 08:55:19 -06002886 ":ref:`dev-manual/new-recipe:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002887 the Yocto Project Development Tasks Manual. See the
2888 :ref:`ref-tasks-patch` task as well.
2889
Andrew Geisslerf0343792020-11-18 10:42:21 -06002890 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002891 Allows you to define your own file permissions settings table as part
2892 of your configuration for the packaging process. For example, suppose
2893 you need a consistent set of custom permissions for a set of groups
2894 and users across an entire work project. It is best to do this in the
2895 packages themselves but this is not always possible.
2896
2897 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2898 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2899 If you create your own file
2900 permissions setting table, you should place it in your layer or the
2901 distro's layer.
2902
Andrew Geissler09036742021-06-25 14:25:14 -05002903 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002904 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002905 to point to your custom ``fs-perms.txt``. You can specify more than a
2906 single file permissions setting table. The paths you specify to these
2907 files must be defined within the :term:`BBPATH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002908
2909 For guidance on how to create your own file permissions settings
2910 table file, examine the existing ``fs-perms.txt``.
2911
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002912 :term:`FIT_DESC`
2913 Specifies the description string encoded into a fitImage. The default
Andrew Geissler517393d2023-01-13 08:55:19 -06002914 value is set by the :ref:`ref-classes-kernel-fitimage`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002915 class as follows::
2916
2917 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2918
Andrew Geisslerf0343792020-11-18 10:42:21 -06002919 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002920 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002921 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002922 The default value is 0.
2923
Andrew Geisslerf0343792020-11-18 10:42:21 -06002924 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002925 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2926
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002927 :term:`FIT_KERNEL_COMP_ALG`
2928 Compression algorithm to use for the kernel image inside the FIT Image.
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002929 At present, the only supported values are "gzip" (default), "lzo" or "none".
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002930 If you set this variable to anything other than "none" you may also need
2931 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2932
2933 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2934 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002935 value is ".gz". If you set :term:`FIT_KERNEL_COMP_ALG` to "lzo",
2936 you may want to set this variable to ".lzo".
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002937
Andrew Geisslerf0343792020-11-18 10:42:21 -06002938 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002939 Arguments to openssl genrsa for generating RSA private key for signing
2940 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2941 use.
2942
Andrew Geisslerf0343792020-11-18 10:42:21 -06002943 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002944 Arguments to openssl req for generating certificate for signing fitImage.
2945 The default value is "-batch -new". batch for non interactive mode
2946 and new for generating new keys.
2947
Andrew Geisslerf0343792020-11-18 10:42:21 -06002948 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002949 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002950 The default value is "x509".
2951
Andrew Geisslerf0343792020-11-18 10:42:21 -06002952 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002953 Specifies the signature algorithm used in creating the FIT Image.
2954 For e.g. rsa2048.
2955
Patrick Williams975a06f2022-10-21 14:42:47 -05002956 :term:`FIT_PAD_ALG`
2957 Specifies the padding algorithm used in creating the FIT Image.
2958 The default value is "pkcs-1.5".
2959
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002960 :term:`FIT_SIGN_INDIVIDUAL`
Andrew Geissler517393d2023-01-13 08:55:19 -06002961 If set to "1", then the :ref:`ref-classes-kernel-fitimage`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002962 class will sign the kernel, dtb and ramdisk images individually in addition
2963 to signing the fitImage itself. This could be useful if you are
2964 intending to verify signatures in another context than booting via
2965 U-Boot.
2966
Andrew Geissler9aee5002022-03-30 16:27:02 +00002967 :term:`FIT_SIGN_NUMBITS`
2968 Size of private key in number of bits used in fitImage. The default
2969 value is "2048".
2970
Andrew Geisslerf0343792020-11-18 10:42:21 -06002971 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002972 When inheriting the :ref:`ref-classes-fontcache` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002973 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04002974 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002975
Andrew Geisslerf0343792020-11-18 10:42:21 -06002976 :term:`FONT_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06002977 When inheriting the :ref:`ref-classes-fontcache` class, this variable
2978 identifies packages containing font files that need to be cached by
2979 Fontconfig. By default, the :ref:`ref-classes-fontcache` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002980 that fonts are in the recipe's main package (i.e.
2981 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2982 need are in a package other than that main package.
2983
Andrew Geisslerf0343792020-11-18 10:42:21 -06002984 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002985 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2986 during the generation of the root filesystem.
2987
2988 Set the variable to "1" to force the removal of these packages.
2989
Andrew Geisslerf0343792020-11-18 10:42:21 -06002990 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002991 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002992 compiling an optimized system. This variable defaults to "-O2 -pipe
2993 ${DEBUG_FLAGS}".
2994
Andrew Geisslerf0343792020-11-18 10:42:21 -06002995 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002996 Enables Position Independent Executables (PIE) within the GNU C
2997 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2998 Programming (ROP) attacks much more difficult to execute.
2999
3000 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003001 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003002
3003 GCCPIE ?= "--enable-default-pie"
3004
Andrew Geisslerf0343792020-11-18 10:42:21 -06003005 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003006 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05003007 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003008 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003009
3010 GCCVERSION ?= "8.%"
3011
3012 You can override this value by setting it in a
3013 configuration file such as the ``local.conf``.
3014
Andrew Geisslerf0343792020-11-18 10:42:21 -06003015 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003016 The minimal command and arguments to run the GNU Debugger.
3017
Andrew Geissler595f6302022-01-24 19:11:47 +00003018 :term:`GIR_EXTRA_LIBS_PATH`
3019 Allows to specify an extra search path for ``.so`` files
3020 in GLib related recipes using GObject introspection,
3021 and which do not compile without this setting.
Andrew Geissler517393d2023-01-13 08:55:19 -06003022 See the ":ref:`dev-manual/gobject-introspection:enabling gobject introspection support`"
Andrew Geissler595f6302022-01-24 19:11:47 +00003023 section for details.
3024
Andrew Geisslerf0343792020-11-18 10:42:21 -06003025 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003026 The directory in which a local copy of a Git repository is stored
3027 when it is cloned.
3028
Patrick Williams975a06f2022-10-21 14:42:47 -05003029 :term:`GITHUB_BASE_URI`
Andrew Geissler517393d2023-01-13 08:55:19 -06003030 When inheriting the :ref:`ref-classes-github-releases`
Patrick Williams975a06f2022-10-21 14:42:47 -05003031 class, specifies the base URL for fetching releases for the github
3032 project you wish to fetch sources from. The default value is as follows::
3033
3034 GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/"
3035
Andrew Geisslerf0343792020-11-18 10:42:21 -06003036 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003037 Specifies the list of GLIBC locales to generate should you not wish
3038 to generate all LIBC locals, which can be time consuming.
3039
3040 .. note::
3041
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003042 If you specifically remove the locale ``en_US.UTF-8``, you must set
3043 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003044
Andrew Geissler09036742021-06-25 14:25:14 -05003045 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geissler517393d2023-01-13 08:55:19 -06003046 By default, all locales are generated::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003047
3048 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
3049
Andrew Geisslerc5535c92023-01-27 16:10:19 -06003050 :term:`GO_IMPORT`
3051 When inheriting the :ref:`ref-classes-go` class, this mandatory variable
3052 sets the import path for the Go package that will be created for the code
3053 to build. If you have a ``go.mod`` file in the source directory, this
3054 typically matches the path in the ``module`` line in this file.
3055
3056 Other Go programs importing this package will use this path.
3057
3058 Here is an example setting from the
3059 :yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
3060 recipe::
3061
3062 GO_IMPORT = "golang.org/x/example"
3063
3064 :term:`GO_INSTALL`
3065 When inheriting the :ref:`ref-classes-go` class, this optional variable
3066 specifies which packages in the sources should be compiled and
3067 installed in the Go build space by the
3068 `go install <https://go.dev/ref/mod#go-install>`__ command.
3069
3070 Here is an example setting from the
3071 :oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>`
3072 recipe::
3073
3074 GO_INSTALL = "\
3075 ${GO_IMPORT}/cmd/crucible \
3076 ${GO_IMPORT}/cmd/habtool \
3077 "
3078
3079 By default, :term:`GO_INSTALL` is defined as::
3080
3081 GO_INSTALL ?= "${GO_IMPORT}/..."
3082
3083 The ``...`` wildcard means that it will catch all
3084 packages found in the sources.
3085
3086 See the :term:`GO_INSTALL_FILTEROUT` variable for
3087 filtering out unwanted packages from the ones
3088 found from the :term:`GO_INSTALL` value.
3089
3090 :term:`GO_INSTALL_FILTEROUT`
3091 When using the Go "vendor" mechanism to bring in dependencies for a Go
3092 package, the default :term:`GO_INSTALL` setting, which uses the ``...``
3093 wildcard, will include the vendored packages in the build, which produces
3094 incorrect results.
3095
3096 There are also some Go packages that are structured poorly, so that the
3097 ``...`` wildcard results in building example or test code that should not
3098 be included in the build, or could fail to build.
3099
3100 This optional variable allows for filtering out a subset of the sources.
3101 It defaults to excluding everything under the ``vendor`` subdirectory
3102 under package's main directory. This is the normal location for vendored
3103 packages, but it can be overridden by a recipe to filter out other
3104 subdirectories if needed.
3105
3106 :term:`GO_WORKDIR`
3107 When using Go Modules, the current working directory must be the directory
3108 containing the ``go.mod`` file, or one of its subdirectories. When the
3109 ``go`` tool is used, it will automatically look for the ``go.mod`` file
3110 in the Go working directory or in any parent directory, but not in
3111 subdirectories.
3112
3113 When using the :ref:`ref-classes-go-mod` class to use Go modules,
3114 the optional :term:`GO_WORKDIR` variable, defaulting to the value
3115 of :term:`GO_IMPORT`, allows to specify a different Go working directory.
3116
Andrew Geisslerf0343792020-11-18 10:42:21 -06003117 :term:`GROUPADD_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06003118 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003119 this variable specifies for a package what parameters should be
3120 passed to the ``groupadd`` command if you wish to add a group to the
3121 system when the package is installed.
3122
Andrew Geisslerc926e172021-05-07 16:11:35 -05003123 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003124
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003125 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003126
3127 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003128 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003129
Andrew Geisslerf0343792020-11-18 10:42:21 -06003130 :term:`GROUPMEMS_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06003131 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003132 this variable specifies for a package what parameters should be
3133 passed to the ``groupmems`` command if you wish to modify the members
3134 of a group when the package is installed.
3135
3136 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003137 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003138
Andrew Geisslerf0343792020-11-18 10:42:21 -06003139 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003140 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
3141 and serial in the boot menu. Set this variable to "1" in your
3142 ``local.conf`` or distribution configuration file to enable graphics
3143 and serial in the menu.
3144
Andrew Geissler517393d2023-01-13 08:55:19 -06003145 See the :ref:`ref-classes-grub-efi` class for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003146 information on how this variable is used.
3147
Andrew Geisslerf0343792020-11-18 10:42:21 -06003148 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003149 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
3150 configuration. Use a semi-colon character (``;``) to separate
3151 multiple options.
3152
Andrew Geissler09036742021-06-25 14:25:14 -05003153 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06003154 :ref:`ref-classes-grub-efi` class for more information
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003155 on how this variable is used.
3156
Andrew Geisslerf0343792020-11-18 10:42:21 -06003157 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003158 Specifies the timeout before executing the default ``LABEL`` in the
3159 GNU GRand Unified Bootloader (GRUB).
3160
Andrew Geissler09036742021-06-25 14:25:14 -05003161 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06003162 :ref:`ref-classes-grub-efi` class for more information
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003163 on how this variable is used.
3164
Andrew Geisslerf0343792020-11-18 10:42:21 -06003165 :term:`GTKIMMODULES_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06003166 When inheriting the :ref:`ref-classes-gtk-immodules-cache` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003167 this variable specifies the packages that contain the GTK+ input
3168 method modules being installed when the modules are in packages other
3169 than the main package.
3170
Andrew Geissler517393d2023-01-13 08:55:19 -06003171 :term:`HGDIR`
3172 See :term:`bitbake:HGDIR` in the BitBake manual.
3173
Andrew Geisslerf0343792020-11-18 10:42:21 -06003174 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003175 Website where more information about the software the recipe is
3176 building can be found.
3177
Andrew Geisslerf0343792020-11-18 10:42:21 -06003178 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003179 The name of the target architecture, which is normally the same as
3180 :term:`TARGET_ARCH`. The OpenEmbedded build system
3181 supports many architectures. Here is an example list of architectures
3182 supported. This list is by no means complete as the architecture is
3183 configurable:
3184
3185 - arm
3186 - i586
3187 - x86_64
3188 - powerpc
3189 - powerpc64
3190 - mips
3191 - mipsel
3192
Andrew Geisslerf0343792020-11-18 10:42:21 -06003193 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003194 Specifies architecture-specific compiler flags that are passed to the
3195 C compiler.
3196
Andrew Geissler09036742021-06-25 14:25:14 -05003197 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003198 is being built:
3199
3200 - :term:`TARGET_CC_ARCH` when building for the
3201 target
3202
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003203 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003204 ``-native``)
3205
3206 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
3207 ``nativesdk-``)
3208
Andrew Geisslerf0343792020-11-18 10:42:21 -06003209 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003210 Specifies the name of the target operating system, which is normally
3211 the same as the :term:`TARGET_OS`. The variable can
3212 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
3213 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
3214 "linux-musleabi" values possible.
3215
Andrew Geisslerf0343792020-11-18 10:42:21 -06003216 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05003217 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003218 is normally the same as :term:`TARGET_PREFIX`.
3219
Andrew Geisslerf0343792020-11-18 10:42:21 -06003220 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003221 Specifies the system, including the architecture and the operating
3222 system, for which the build is occurring in the context of the
3223 current recipe.
3224
3225 The OpenEmbedded build system automatically sets this variable based
3226 on :term:`HOST_ARCH`,
3227 :term:`HOST_VENDOR`, and
3228 :term:`HOST_OS` variables.
3229
3230 .. note::
3231
3232 You do not need to set the variable yourself.
3233
3234 Consider these two examples:
3235
3236 - Given a native recipe on a 32-bit x86 machine running Linux, the
3237 value is "i686-linux".
3238
3239 - Given a recipe being built for a little-endian MIPS target running
3240 Linux, the value might be "mipsel-linux".
3241
Andrew Geissler9aee5002022-03-30 16:27:02 +00003242 :term:`HOST_VENDOR`
3243 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
3244 same as :term:`TARGET_VENDOR`.
3245
Andrew Geisslerf0343792020-11-18 10:42:21 -06003246 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003247 A space-separated list (filter) of tools on the build host that
3248 should be allowed to be called from within build tasks. Using this
3249 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05003250 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003251 host, the OpenEmbedded build system produces an error and the build
3252 is not started.
3253
3254 For additional information, see
3255 :term:`HOSTTOOLS_NONFATAL`.
3256
Andrew Geisslerf0343792020-11-18 10:42:21 -06003257 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003258 A space-separated list (filter) of tools on the build host that
3259 should be allowed to be called from within build tasks. Using this
3260 filter helps reduce the possibility of host contamination. Unlike
3261 :term:`HOSTTOOLS`, the OpenEmbedded build system
3262 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05003263 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
3264 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003265
Andrew Geissler9aee5002022-03-30 16:27:02 +00003266 :term:`ICECC_CLASS_DISABLE`
3267 Identifies user classes that you do not want the Icecream distributed
3268 compile support to consider. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003269 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geissler9aee5002022-03-30 16:27:02 +00003270 your ``local.conf`` file.
3271
3272 When you list classes using this variable, the recipes inheriting
3273 those classes will not benefit from distributed compilation across
3274 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003275
Andrew Geisslerf0343792020-11-18 10:42:21 -06003276 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003277 Disables or enables the ``icecc`` (Icecream) function. For more
3278 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00003279 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003280 section.
3281
3282 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003283 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003284
3285 ICECC_DISABLED ??= "1"
3286
Andrew Geisslerc926e172021-05-07 16:11:35 -05003287 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003288
3289 ICECC_DISABLED = ""
3290
Andrew Geisslerf0343792020-11-18 10:42:21 -06003291 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003292 Points to the ``icecc-create-env`` script that you provide. This
Andrew Geissler517393d2023-01-13 08:55:19 -06003293 variable is used by the :ref:`ref-classes-icecc` class. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003294 set this variable in your ``local.conf`` file.
3295
3296 If you do not point to a script that you provide, the OpenEmbedded
3297 build system uses the default script provided by the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003298 :oe_git:`icecc-create-env_0.1.bb
3299 </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>`
3300 recipe, which is a modified version and not the one that comes with
3301 ``icecream``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003302
Andrew Geisslerf0343792020-11-18 10:42:21 -06003303 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003304 Extra options passed to the ``make`` command during the
3305 :ref:`ref-tasks-compile` task that specify parallel
3306 compilation. This variable usually takes the form of "-j x", where x
3307 represents the maximum number of parallel threads ``make`` can run.
3308
3309 .. note::
3310
3311 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003312 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003313
3314 If your enabled machines support multiple cores, coming up with the
3315 maximum number of parallel threads that gives you the best
3316 performance could take some experimentation since machine speed,
3317 network lag, available memory, and existing machine loads can all
3318 affect build time. Consequently, unlike the
3319 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05003320 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003321 performance.
3322
Andrew Geissler09036742021-06-25 14:25:14 -05003323 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003324 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05003325 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003326
Andrew Geisslerf0343792020-11-18 10:42:21 -06003327 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003328 The location of the ``icecc`` binary. You can set this variable in
3329 your ``local.conf`` file. If your ``local.conf`` file does not define
Andrew Geissler517393d2023-01-13 08:55:19 -06003330 this variable, the :ref:`ref-classes-icecc` class attempts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003331 to define it by locating ``icecc`` using ``which``.
3332
Andrew Geissler9aee5002022-03-30 16:27:02 +00003333 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003334 Identifies user recipes that you do not want the Icecream distributed
3335 compile support to consider. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003336 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003337 your ``local.conf`` file.
3338
Andrew Geissler595f6302022-01-24 19:11:47 +00003339 When you list recipes using this variable, you are excluding them
3340 from distributed compilation across remote hosts. Instead they will
3341 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003342
Andrew Geissler9aee5002022-03-30 16:27:02 +00003343 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003344 Identifies user recipes that use an empty
3345 :term:`PARALLEL_MAKE` variable that you want to
3346 force remote distributed compilation on using the Icecream
3347 distributed compile support. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003348 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003349 your ``local.conf`` file.
3350
Andrew Geisslerf0343792020-11-18 10:42:21 -06003351 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003352 The base name of image output files. This variable defaults to the
3353 recipe name (``${``\ :term:`PN`\ ``}``).
3354
Andrew Geisslerf0343792020-11-18 10:42:21 -06003355 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003356 A space-separated list of files installed into the boot partition
3357 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003358 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003359 the files are
3360 installed under the same name as the source files. To change the
3361 installed name, separate it from the original name with a semi-colon
3362 (;). Source files need to be located in
3363 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003364 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003365
3366 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3367 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3368
3369 Alternatively, source files can be picked up using a glob pattern. In
3370 this case, the destination file must have the same name as the base
3371 name of the source file path. To install files into a directory
3372 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05003373 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003374
3375 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
3376 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
3377
3378 The first example
3379 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3380 into the root of the target partition. The second example installs
3381 the same files into a ``boot`` directory within the target partition.
3382
3383 You can find information on how to use the Wic tool in the
Andrew Geissler517393d2023-01-13 08:55:19 -06003384 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003385 section of the Yocto Project Development Tasks Manual. Reference
3386 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003387 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003388
Patrick Williams975a06f2022-10-21 14:42:47 -05003389 :term:`IMAGE_BUILDINFO_FILE`
Andrew Geissler517393d2023-01-13 08:55:19 -06003390 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05003391 specifies the file in the image to write the build information into. The
3392 default value is "``${sysconfdir}/buildinfo``".
3393
3394 :term:`IMAGE_BUILDINFO_VARS`
Andrew Geissler517393d2023-01-13 08:55:19 -06003395 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05003396 specifies the list of variables to include in the `Build Configuration`
3397 section of the output file (as a space-separated list). Defaults to
3398 ":term:`DISTRO` :term:`DISTRO_VERSION`".
3399
Andrew Geisslerf0343792020-11-18 10:42:21 -06003400 :term:`IMAGE_CLASSES`
Patrick Williams975a06f2022-10-21 14:42:47 -05003401 A list of classes that all images should inherit. This is typically used
3402 to enable functionality across all image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003403
Patrick Williams975a06f2022-10-21 14:42:47 -05003404 Classes specified in :term:`IMAGE_CLASSES` must be located in the
3405 ``classes-recipe/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003406
Andrew Geisslerf0343792020-11-18 10:42:21 -06003407 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003408 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003409 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003410 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3411 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003412 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003413
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003414 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003415 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003416 ${EXTRA_IMAGECMD}"
3417
3418 You typically do not need to set this variable unless you are adding
3419 support for a new image type. For more examples on how to set this
Andrew Geissler517393d2023-01-13 08:55:19 -06003420 variable, see the :ref:`ref-classes-image_types`
Patrick Williams975a06f2022-10-21 14:42:47 -05003421 class file, which is ``meta/classes-recipe/image_types.bbclass``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003422
Andrew Geisslerf0343792020-11-18 10:42:21 -06003423 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003424 Specifies one or more files that contain custom device tables that
3425 are passed to the ``makedevs`` command as part of creating an image.
3426 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003427 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003428 ``files/device_table-minimal.txt`` is used, which is located by
3429 :term:`BBPATH`. For details on how you should write
3430 device table files, see ``meta/files/device_table-minimal.txt`` as an
3431 example.
3432
Andrew Geissler9aee5002022-03-30 16:27:02 +00003433 :term:`IMAGE_EFI_BOOT_FILES`
3434 A space-separated list of files installed into the boot partition
3435 when preparing an image using the Wic tool with the
3436 ``bootimg-efi`` source plugin. By default,
3437 the files are
3438 installed under the same name as the source files. To change the
3439 installed name, separate it from the original name with a semi-colon
3440 (;). Source files need to be located in
3441 :term:`DEPLOY_DIR_IMAGE`. Here are two
3442 examples::
3443
3444 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3445 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3446
3447 Alternatively, source files can be picked up using a glob pattern. In
3448 this case, the destination file must have the same name as the base
3449 name of the source file path. To install files into a directory
3450 within the target location, pass its name after a semi-colon (;).
3451 Here are two examples::
3452
3453 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3454 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3455
3456 The first example
3457 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3458 into the root of the target partition. The second example installs
3459 the same files into a ``boot`` directory within the target partition.
3460
3461 You can find information on how to use the Wic tool in the
Andrew Geissler517393d2023-01-13 08:55:19 -06003462 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00003463 section of the Yocto Project Development Tasks Manual. Reference
3464 material for Wic is located in the
3465 ":doc:`/ref-manual/kickstart`" chapter.
3466
Andrew Geisslerf0343792020-11-18 10:42:21 -06003467 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003468 The primary list of features to include in an image. Typically, you
3469 configure this variable in an image recipe. Although you can use this
3470 variable from your ``local.conf`` file, which is found in the
3471 :term:`Build Directory`, best practices dictate that you do
3472 not.
3473
3474 .. note::
3475
3476 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003477 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003478
3479 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003480 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003481
3482 For an example that shows how to customize your image by using this
Andrew Geissler517393d2023-01-13 08:55:19 -06003483 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 -05003484 section in the Yocto Project Development Tasks Manual.
3485
Andrew Geisslerf0343792020-11-18 10:42:21 -06003486 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003487 Specifies the formats the OpenEmbedded build system uses during the
3488 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003489 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003490 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003491
3492 IMAGE_FSTYPES = "ext3 tar.bz2"
3493
3494 For the complete list of supported image formats from which you can
3495 choose, see :term:`IMAGE_TYPES`.
3496
3497 .. note::
3498
3499 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003500 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003501 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003502
3503 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003504 variable, you cannot update its contents by using ``:append``
3505 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003506 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003507
Andrew Geisslerf0343792020-11-18 10:42:21 -06003508 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003509 Used by recipes to specify the packages to install into an image
Andrew Geissler517393d2023-01-13 08:55:19 -06003510 through the :ref:`ref-classes-image` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003511 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003512
Andrew Geissler09036742021-06-25 14:25:14 -05003513 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003514 install into an image through :ref:`ref-classes-image`. Additionally,
Andrew Geissler517393d2023-01-13 08:55:19 -06003515 there are "helper" classes such as the :ref:`ref-classes-core-image`
3516 class which can take lists used with :term:`IMAGE_FEATURES` and turn
3517 them into auto-generated entries in :term:`IMAGE_INSTALL` in addition
3518 to its default contents.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003519
Andrew Geisslerc926e172021-05-07 16:11:35 -05003520 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003521
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003522 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003523
3524 Be sure to include the space
3525 between the quotation character and the start of the package name or
3526 names.
3527
3528 .. note::
3529
3530 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003531 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003532 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003533 packages for installation. Instead, use the
3534 :term:`PACKAGE_INSTALL` variable, which
Patrick Williams2194f502022-10-16 14:26:09 -05003535 allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003536 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Patrick Williams2194f502022-10-16 14:26:09 -05003537 For information on creating an :term:`Initramfs`, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06003538 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003539 section in the Yocto Project Development Tasks Manual.
3540
Andrew Geissler09036742021-06-25 14:25:14 -05003541 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003542 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003543 BitBake operator within the ``/conf/local.conf`` file or from
3544 within an image recipe is not recommended. Use of this operator
3545 in these ways can cause ordering issues. Since
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003546 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003547 value using the
3548 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003549 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003550 results in unexpected behavior when used within
3551 ``conf/local.conf``. Furthermore, the same operation from
3552 within an image recipe may or may not succeed depending on the
3553 specific situation. In both these cases, the behavior is
3554 contrary to how most users expect the ``+=`` operator to work.
3555
Andrew Geisslerf0343792020-11-18 10:42:21 -06003556 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003557 Specifies the list of locales to install into the image during the
3558 root filesystem construction process. The OpenEmbedded build system
3559 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003560 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003561 ensures that any locale packages that correspond to packages already
3562 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003563 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003564
3565 IMAGE_LINGUAS = "pt-br de-de"
3566
3567 In this example, the build system ensures any Brazilian Portuguese
3568 and German locale files that correspond to packages in the image are
3569 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3570 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3571 only provide locale files by language and not by country-specific
3572 language).
3573
3574 See the :term:`GLIBC_GENERATE_LOCALES`
3575 variable for information on generating GLIBC locales.
3576
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003577
3578 :term:`IMAGE_LINK_NAME`
3579 The name of the output image symlink (which does not include
3580 the version part as :term:`IMAGE_NAME` does). The default value
3581 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003582 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003583
3584 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3585
3586
Andrew Geisslerf0343792020-11-18 10:42:21 -06003587 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003588 The manifest file for the image. This file lists all the installed
3589 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003590 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003591
3592 packagename packagearch version
3593
Andrew Geissler09036742021-06-25 14:25:14 -05003594 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003595 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003596
Andrew Geissler09036742021-06-25 14:25:14 -05003597 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003598
3599 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003600 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003601 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003602 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003603 section in the Yocto Project Overview and Concepts Manual.
3604
Andrew Geisslerf0343792020-11-18 10:42:21 -06003605 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003606 The name of the output image files minus the extension. This variable
3607 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003608 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003609 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003610
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003611 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3612
3613 :term:`IMAGE_NAME_SUFFIX`
Andrew Geissler615f2f12022-07-15 14:00:58 -05003614 Suffix used for the image output filename --- defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003615 to distinguish the image file from other files created during image
3616 building; however if this suffix is redundant or not desired you can
3617 clear the value of this variable (set the value to ""). For example,
Patrick Williams2194f502022-10-16 14:26:09 -05003618 this is typically cleared in :term:`Initramfs` image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003619
Andrew Geisslerf0343792020-11-18 10:42:21 -06003620 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003621 Defines a multiplier that the build system applies to the initial
3622 image size for cases when the multiplier times the returned disk
3623 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003624 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003625 the multiplier applied to the initial image size creates free disk
3626 space in the image as overhead. By default, the build process uses a
3627 multiplier of 1.3 for this variable. This default value results in
3628 30% free disk space added to the image when this method is used to
3629 determine the final generated image size. You should be aware that
3630 post install scripts and the package management system uses disk
3631 space inside this overhead area. Consequently, the multiplier does
3632 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003633 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003634 determines the overall image size.
3635
3636 The default 30% free disk space typically gives the image enough room
3637 to boot and allows for basic post installs while still leaving a
3638 small amount of free disk space. If 30% free space is inadequate, you
3639 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003640 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003641
3642 IMAGE_OVERHEAD_FACTOR = "1.5"
3643
3644 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003645 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003646 variable.
3647
Andrew Geisslerf0343792020-11-18 10:42:21 -06003648 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003649 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3650 OpenEmbedded build system. The variable is defined appropriately by
Andrew Geissler517393d2023-01-13 08:55:19 -06003651 the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`,
3652 :ref:`ref-classes-package_ipk`, or :ref:`ref-classes-package_tar` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003653
3654 .. note::
3655
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003656 The ``package_tar`` class is broken and is not supported. It is
3657 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003658
Andrew Geissler517393d2023-01-13 08:55:19 -06003659 The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image`
3660 classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003661
Andrew Geissler09036742021-06-25 14:25:14 -05003662 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003663 variable is set indirectly through the appropriate
3664 :ref:`package_* <ref-classes-package>` class using the
3665 :term:`PACKAGE_CLASSES` variable. The
3666 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3667 or IPK) that appears with the variable
3668
3669 .. note::
3670
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003671 Files using the ``.tar`` format are never used as a substitute
3672 packaging format for DEB, RPM, and IPK formatted files for your image
3673 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003674
Andrew Geisslerf0343792020-11-18 10:42:21 -06003675 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003676 Specifies a list of functions to call once the OpenEmbedded build
3677 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003678 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003679
3680 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3681
3682 If you need to pass the root filesystem path to a command within the
3683 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3684 directory that becomes the root filesystem image. See the
3685 :term:`IMAGE_ROOTFS` variable for more
3686 information.
3687
Andrew Geisslerf0343792020-11-18 10:42:21 -06003688 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003689 Specifies a list of functions to call before the OpenEmbedded build
3690 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003691 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003692
3693 IMAGE_PREPROCESS_COMMAND += "function; ... "
3694
3695 If you need to pass the root filesystem path to a command within the
3696 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3697 directory that becomes the root filesystem image. See the
3698 :term:`IMAGE_ROOTFS` variable for more
3699 information.
3700
Andrew Geisslerf0343792020-11-18 10:42:21 -06003701 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003702 The location of the root filesystem while it is under construction
3703 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3704 variable is not configurable. Do not change it.
3705
Andrew Geisslerf0343792020-11-18 10:42:21 -06003706 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003707 Specifies the alignment for the output image file in Kbytes. If the
3708 size of the image is not a multiple of this value, then the size is
3709 rounded up to the nearest multiple of the value. The default value is
3710 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3711 additional information.
3712
Andrew Geisslerf0343792020-11-18 10:42:21 -06003713 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003714 Defines additional free disk space created in the image in Kbytes. By
3715 default, this variable is set to "0". This free disk space is added
3716 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003717 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003718
3719 This variable is particularly useful when you want to ensure that a
3720 specific amount of free disk space is available on a device after an
3721 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003722 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003723
3724 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3725
3726 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003727 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003728
3729 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3730
Andrew Geisslerf0343792020-11-18 10:42:21 -06003731 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003732 Defines the size in Kbytes for the generated image. The OpenEmbedded
3733 build system determines the final size for the generated image using
3734 an algorithm that takes into account the initial disk space used for
3735 the generated image, a requested size for the image, and requested
3736 additional free disk space to be added to the image. Programatically,
3737 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003738 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003739
3740 if (image-du * overhead) < rootfs-size:
3741 internal-rootfs-size = rootfs-size + xspace
3742 else:
3743 internal-rootfs-size = (image-du * overhead) + xspace
3744 where:
3745 image-du = Returned value of the du command on the image.
3746 overhead = IMAGE_OVERHEAD_FACTOR
3747 rootfs-size = IMAGE_ROOTFS_SIZE
3748 internal-rootfs-size = Initial root filesystem size before any modifications.
3749 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3750
3751 See the :term:`IMAGE_OVERHEAD_FACTOR`
3752 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3753 variables for related information.
3754
Andrew Geisslerf0343792020-11-18 10:42:21 -06003755 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003756 Specifies a dependency from one image type on another. Here is an
Andrew Geissler517393d2023-01-13 08:55:19 -06003757 example from the :ref:`ref-classes-image-live` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003758
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003759 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003760
3761 In the previous example, the variable ensures that when "live" is
3762 listed with the :term:`IMAGE_FSTYPES` variable,
3763 the OpenEmbedded build system produces an ``ext3`` image first since
3764 one of the components of the live image is an ``ext3`` formatted
3765 partition containing the root filesystem.
3766
Andrew Geisslerf0343792020-11-18 10:42:21 -06003767 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003768 Specifies the complete list of supported image types by default:
3769
3770 - btrfs
3771 - container
3772 - cpio
3773 - cpio.gz
3774 - cpio.lz4
3775 - cpio.lzma
3776 - cpio.xz
3777 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003778 - erofs
3779 - erofs-lz4
3780 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003781 - ext2
3782 - ext2.bz2
3783 - ext2.gz
3784 - ext2.lzma
3785 - ext3
3786 - ext3.gz
3787 - ext4
3788 - ext4.gz
3789 - f2fs
3790 - hddimg
3791 - iso
3792 - jffs2
3793 - jffs2.sum
3794 - multiubi
3795 - squashfs
3796 - squashfs-lz4
3797 - squashfs-lzo
3798 - squashfs-xz
3799 - tar
3800 - tar.bz2
3801 - tar.gz
3802 - tar.lz4
3803 - tar.xz
3804 - tar.zst
3805 - ubi
3806 - ubifs
3807 - wic
3808 - wic.bz2
3809 - wic.gz
3810 - wic.lzma
3811
3812 For more information about these types of images, see
Patrick Williams975a06f2022-10-21 14:42:47 -05003813 ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003814
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003815 :term:`IMAGE_VERSION_SUFFIX`
3816 Version suffix that is part of the default :term:`IMAGE_NAME` and
3817 :term:`KERNEL_ARTIFACT_NAME` values.
3818 Defaults to ``"-${DATETIME}"``, however you could set this to a
3819 version string that comes from your external build environment if
3820 desired, and this suffix would then be used consistently across
3821 the build artifacts.
3822
Andrew Geissler09036742021-06-25 14:25:14 -05003823 :term:`IMGDEPLOYDIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06003824 When inheriting the :ref:`ref-classes-image` class directly or
3825 through the :ref:`ref-classes-core-image` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003826 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003827 that is set in the ``image`` class as follows::
3828
3829 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3830
Andrew Geissler517393d2023-01-13 08:55:19 -06003831 Recipes inheriting the :ref:`ref-classes-image` class should copy
3832 files to be deployed into :term:`IMGDEPLOYDIR`, and the class will take
3833 care of copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
Andrew Geissler09036742021-06-25 14:25:14 -05003834
Andrew Geisslerf0343792020-11-18 10:42:21 -06003835 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003836 Helps define the recipe revision for recipes that share a common
3837 ``include`` file. You can think of this variable as part of the
3838 recipe revision as set from within an include file.
3839
3840 Suppose, for example, you have a set of recipes that are used across
3841 several projects. And, within each of those recipes the revision (its
3842 :term:`PR` value) is set accordingly. In this case, when
3843 the revision of those recipes changes, the burden is on you to find
3844 all those recipes and be sure that they get changed to reflect the
3845 updated version of the recipe. In this scenario, it can get
3846 complicated when recipes that are used in many places and provide
3847 common functionality are upgraded to a new revision.
3848
3849 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003850 :term:`INC_PR` variable inside the ``include`` files that the recipes
3851 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003852 help define the recipe revision.
3853
3854 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003855 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003856 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003857 can use the variable to set the :term:`PR` values in each recipe. You
3858 will notice that when you set a recipe's :term:`PR` you can provide more
3859 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003860
3861 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3862 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3863 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3864 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3865
3866 The
3867 first line of the example establishes the baseline revision to be
3868 used for all recipes that use the ``include`` file. The remaining
3869 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003870 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003871
Andrew Geisslerf0343792020-11-18 10:42:21 -06003872 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003873 Specifies a space-separated list of license names (as they would
3874 appear in :term:`LICENSE`) that should be excluded
3875 from the build. Recipes that provide no alternatives to listed
3876 incompatible licenses are not built. Packages that are individually
3877 licensed with the specified incompatible licenses will be deleted.
3878
Patrick Williams03907ee2022-05-01 06:28:52 -05003879 There is some support for wildcards in this variable's value,
3880 however it is restricted to specific licenses. Currently only
3881 these wildcards are allowed and expand as follows:
3882
3883 - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later``
3884 - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
3885 - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
3886
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003887 .. note::
3888
3889 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003890 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003891
Andrew Geissler9aee5002022-03-30 16:27:02 +00003892 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003893
3894
3895 Although you can use other settings, you might be required to
Patrick Williams975a06f2022-10-21 14:42:47 -05003896 remove dependencies on (or provide alternatives to) components that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003897 are required to produce a functional system image.
3898
Andrew Geissler615f2f12022-07-15 14:00:58 -05003899 :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
3900 Specifies a space-separated list of package and license pairs that
3901 are allowed to be used even if the license is specified in
3902 :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are
3903 separated using a colon. Example::
3904
3905 INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only"
3906
Andrew Geisslerf0343792020-11-18 10:42:21 -06003907 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003908 Causes the named class or classes to be inherited globally. Anonymous
3909 functions in the class or classes are not executed for the base
3910 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003911 system ignores changes to :term:`INHERIT` in individual recipes.
Patrick Williams975a06f2022-10-21 14:42:47 -05003912 Classes inherited using :term:`INHERIT` must be located in the
3913 ``classes-global/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003914
Andrew Geissler09036742021-06-25 14:25:14 -05003915 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003916 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
Andrew Geisslerd5838332022-05-27 11:33:10 -05003917 section in the BitBake User Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003918
Andrew Geisslerf0343792020-11-18 10:42:21 -06003919 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003920 Lists classes that will be inherited at the distribution level. It is
3921 unlikely that you want to edit this variable.
3922
Patrick Williams975a06f2022-10-21 14:42:47 -05003923 Classes specified in :term:`INHERIT_DISTRO` must be located in the
3924 ``classes-global/`` or ``classes/`` subdirectories.
3925
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003926 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003927 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003928
3929 INHERIT_DISTRO ?= "debian devshell sstate license"
3930
Andrew Geisslerf0343792020-11-18 10:42:21 -06003931 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003932 Prevents the default dependencies, namely the C compiler and standard
3933 C library (libc), from being added to :term:`DEPENDS`.
3934 This variable is usually used within recipes that do not require any
3935 compilation using the C compiler.
3936
3937 Set the variable to "1" to prevent the default dependencies from
3938 being added.
3939
Andrew Geisslerf0343792020-11-18 10:42:21 -06003940 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003941 Prevents the OpenEmbedded build system from splitting out debug
3942 information during packaging. By default, the build system splits out
3943 debugging information during the
3944 :ref:`ref-tasks-package` task. For more information on
3945 how debug information is split out, see the
3946 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3947 variable.
3948
3949 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003950 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003951 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003952
3953 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3954
Andrew Geisslerf0343792020-11-18 10:42:21 -06003955 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003956 If set to "1", causes the build to not strip binaries in resulting
3957 packages and prevents the ``-dbg`` package from containing the source
3958 files.
3959
3960 By default, the OpenEmbedded build system strips binaries and puts
3961 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003962 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003963 plan to debug in general.
3964
Andrew Geisslerf0343792020-11-18 10:42:21 -06003965 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003966 If set to "1", causes the build to not strip binaries in the
3967 resulting sysroot.
3968
3969 By default, the OpenEmbedded build system strips binaries in the
3970 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003971 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003972 this stripping.
3973
Andrew Geissler517393d2023-01-13 08:55:19 -06003974 If you want to use this variable, include the :ref:`ref-classes-staging`
3975 class. This class uses a ``sys_strip()`` function to test for the variable
3976 and acts accordingly.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003977
3978 .. note::
3979
Andrew Geissler09036742021-06-25 14:25:14 -05003980 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003981 special circumstances. For example, suppose you are building
3982 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003983 even if the toolchain's binaries are strippable, there are other files
3984 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003985
Patrick Williams2194f502022-10-16 14:26:09 -05003986 :term:`Initramfs`
3987 An Initial RAM Filesystem (:term:`Initramfs`) is an optionally compressed
Patrick Williams7784c422022-11-17 07:29:11 -06003988 :wikipedia:`cpio <Cpio>` archive which is extracted
3989 by the Linux kernel into RAM in a special :wikipedia:`tmpfs <Tmpfs>`
Patrick Williams2194f502022-10-16 14:26:09 -05003990 instance, used as the initial root filesystem.
3991
3992 This is a replacement for the legacy init RAM disk ("initrd")
3993 technique, booting on an emulated block device in RAM, but being less
3994 efficient because of the overhead of going through a filesystem and
3995 having to duplicate accessed file contents in the file cache in RAM,
3996 as for any block device.
3997
3998 .. note:
3999
4000 As far as bootloaders are concerned, :term:`Initramfs` and "initrd"
4001 images are still copied to RAM in the same way. That's why most
4002 most bootloaders refer to :term:`Initramfs` images as "initrd"
4003 or "init RAM disk".
4004
4005 This kind of mechanism is typically used for two reasons:
4006
4007 - For booting the same kernel binary on multiple systems requiring
Andrew Geissler517393d2023-01-13 08:55:19 -06004008 different device drivers. The :term:`Initramfs` image is then customized
Patrick Williams2194f502022-10-16 14:26:09 -05004009 for each type of system, to include the specific kernel modules
4010 necessary to access the final root filesystem. This technique
4011 is used on all GNU / Linux distributions for desktops and servers.
4012
4013 - For booting faster. As the root filesystem is extracted into RAM,
4014 accessing the first user-space applications is very fast, compared
4015 to having to initialize a block device, to access multiple blocks
4016 from it, and to go through a filesystem having its own overhead.
4017 For example, this allows to display a splashscreen very early,
4018 and to later take care of mounting the final root filesystem and
4019 loading less time-critical kernel drivers.
4020
4021 This cpio archive can either be loaded to RAM by the bootloader,
4022 or be included in the kernel binary.
4023
4024 For information on creating and using an :term:`Initramfs`, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06004025 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`"
Patrick Williams2194f502022-10-16 14:26:09 -05004026 section in the Yocto Project Development Tasks Manual.
4027
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004028 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
Andrew Geissler517393d2023-01-13 08:55:19 -06004029 Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs`
4030 where the :term:`INITRAMFS_IMAGE` will be fetched from. This variable is
4031 set by default to ``${DEPLOY_DIR_IMAGE}`` in the
4032 :ref:`ref-classes-kernel` class and it's only meant to be changed when
4033 building an :term:`Initramfs` image from a separate multiconfig via
4034 :term:`INITRAMFS_MULTICONFIG`.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004035
Andrew Geisslerf0343792020-11-18 10:42:21 -06004036 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004037 Defines the format for the output image of an initial RAM filesystem
Patrick Williams2194f502022-10-16 14:26:09 -05004038 (:term:`Initramfs`), which is used during boot. Supported formats are the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004039 same as those supported by the
4040 :term:`IMAGE_FSTYPES` variable.
4041
4042 The default value of this variable, which is set in the
4043 ``meta/conf/bitbake.conf`` configuration file in the
4044 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
Patrick Williams2194f502022-10-16 14:26:09 -05004045 :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem
Patrick Williams7784c422022-11-17 07:29:11 -06004046 :wikipedia:`initrd <Initrd>` mechanism, expects
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004047 an optionally compressed cpio archive.
4048
Andrew Geisslerf0343792020-11-18 10:42:21 -06004049 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004050 Specifies the :term:`PROVIDES` name of an image
Patrick Williams2194f502022-10-16 14:26:09 -05004051 recipe that is used to build an initial RAM filesystem (:term:`Initramfs`)
Andrew Geissler09036742021-06-25 14:25:14 -05004052 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004053 additional recipe to be built as a dependency to whatever root
4054 filesystem recipe you might be using (e.g. ``core-image-sato``). The
Patrick Williams2194f502022-10-16 14:26:09 -05004055 :term:`Initramfs` image recipe you provide should set
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004056 :term:`IMAGE_FSTYPES` to
4057 :term:`INITRAMFS_FSTYPES`.
4058
Patrick Williams2194f502022-10-16 14:26:09 -05004059 An :term:`Initramfs` image provides a temporary root filesystem used for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004060 early system initialization (e.g. loading of modules needed to locate
4061 and mount the "real" root filesystem).
4062
4063 .. note::
4064
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004065 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
4066 recipe in the :term:`Source Directory`
Patrick Williams2194f502022-10-16 14:26:09 -05004067 for an example :term:`Initramfs` recipe. To select this sample recipe as
4068 the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004069 to "core-image-minimal-initramfs".
4070
4071 You can also find more information by referencing the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004072 ``meta-poky/conf/templates/default/local.conf.sample.extended``
Andrew Geissler517393d2023-01-13 08:55:19 -06004073 configuration file in the Source Directory, the :ref:`ref-classes-image`
4074 class, and the :ref:`ref-classes-kernel` class to see how to use the
4075 :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004076
Andrew Geissler09036742021-06-25 14:25:14 -05004077 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Patrick Williams2194f502022-10-16 14:26:09 -05004078 :term:`Initramfs` image is built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004079
4080 For more information, you can also see the
4081 :term:`INITRAMFS_IMAGE_BUNDLE`
4082 variable, which allows the generated image to be bundled inside the
Patrick Williams2194f502022-10-16 14:26:09 -05004083 kernel image. Additionally, for information on creating an :term:`Initramfs`
Andrew Geissler517393d2023-01-13 08:55:19 -06004084 image, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004085 in the Yocto Project Development Tasks Manual.
4086
Andrew Geisslerf0343792020-11-18 10:42:21 -06004087 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004088 Controls whether or not the image recipe specified by
4089 :term:`INITRAMFS_IMAGE` is run through an
4090 extra pass
4091 (:ref:`ref-tasks-bundle_initramfs`) during
4092 kernel compilation in order to build a single binary that contains
Patrick Williams2194f502022-10-16 14:26:09 -05004093 both the kernel image and the initial RAM filesystem (:term:`Initramfs`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004094 image. This makes use of the
4095 :term:`CONFIG_INITRAMFS_SOURCE` kernel
4096 feature.
4097
4098 .. note::
4099
Patrick Williams2194f502022-10-16 14:26:09 -05004100 Bundling the :term:`Initramfs` with the kernel conflates the code in the
4101 :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
4102 compatible software may be part of a bundled :term:`Initramfs`.
Patrick Williams93c203f2021-10-06 16:15:23 -05004103
4104 .. note::
4105
Patrick Williams2194f502022-10-16 14:26:09 -05004106 Using an extra compilation pass to bundle the :term:`Initramfs` avoids a
4107 circular dependency between the kernel recipe and the :term:`Initramfs`
4108 recipe should the :term:`Initramfs` include kernel modules. Should that be
4109 the case, the :term:`Initramfs` recipe depends on the kernel for the
4110 kernel modules, and the kernel depends on the :term:`Initramfs` recipe
4111 since the :term:`Initramfs` is bundled inside the kernel image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004112
4113 The combined binary is deposited into the ``tmp/deploy`` directory,
4114 which is part of the :term:`Build Directory`.
4115
4116 Setting the variable to "1" in a configuration file causes the
4117 OpenEmbedded build system to generate a kernel image with the
Patrick Williams2194f502022-10-16 14:26:09 -05004118 :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004119
4120 INITRAMFS_IMAGE_BUNDLE = "1"
4121
Andrew Geissler517393d2023-01-13 08:55:19 -06004122 By default, the :ref:`ref-classes-kernel` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004123 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004124
4125 INITRAMFS_IMAGE_BUNDLE ?= ""
4126
4127 .. note::
4128
Andrew Geissler09036742021-06-25 14:25:14 -05004129 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004130 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004131
4132 See the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004133 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004134 file for additional information. Also, for information on creating an
Andrew Geissler517393d2023-01-13 08:55:19 -06004135 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004136 in the Yocto Project Development Tasks Manual.
4137
Andrew Geisslerf0343792020-11-18 10:42:21 -06004138 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004139 The link name of the initial RAM filesystem image. This variable is
Patrick Williams975a06f2022-10-21 14:42:47 -05004140 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004141 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004142
4143 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
4144
4145 The value of the
4146 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004147 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004148
4149 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4150
4151 See the :term:`MACHINE` variable for additional
4152 information.
4153
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004154 :term:`INITRAMFS_MULTICONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -06004155 Defines the multiconfig to create a multiconfig dependency to be used by
4156 the :ref:`ref-classes-kernel` class.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004157
4158 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
4159 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
4160
Patrick Williams2194f502022-10-16 14:26:09 -05004161 For more information on how to bundle an :term:`Initramfs` image from a separate
Andrew Geissler517393d2023-01-13 08:55:19 -06004162 multiconfig see the ":ref:`dev-manual/building:Bundling an Initramfs Image From a Separate Multiconfig`"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004163 section in the Yocto Project Development Tasks Manual.
4164
Andrew Geisslerf0343792020-11-18 10:42:21 -06004165 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004166 The base 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_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
4171
4172 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004173 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004174
4175 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4176
Andrew Geisslerf0343792020-11-18 10:42:21 -06004177 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004178 Indicates list of filesystem images to concatenate and use as an
4179 initial RAM disk (``initrd``).
4180
Andrew Geissler09036742021-06-25 14:25:14 -05004181 The :term:`INITRD` variable is an optional variable used with the
Andrew Geissler517393d2023-01-13 08:55:19 -06004182 :ref:`ref-classes-image-live` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004183
Andrew Geisslerf0343792020-11-18 10:42:21 -06004184 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004185 When building a "live" bootable image (i.e. when
4186 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05004187 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004188 provide the initial RAM disk image. The default value is
4189 "core-image-minimal-initramfs".
4190
Andrew Geissler517393d2023-01-13 08:55:19 -06004191 See the :ref:`ref-classes-image-live` class for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004192
Andrew Geisslerf0343792020-11-18 10:42:21 -06004193 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004194 The filename of the initialization script as installed to
4195 ``${sysconfdir}/init.d``.
4196
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004197 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004198 The variable is mandatory.
4199
Andrew Geisslerf0343792020-11-18 10:42:21 -06004200 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004201 A list of the packages that contain initscripts. If multiple packages
4202 are specified, you need to append the package name to the other
4203 ``INITSCRIPT_*`` as an override.
4204
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004205 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004206 The variable is optional and defaults to the :term:`PN`
4207 variable.
4208
Andrew Geisslerf0343792020-11-18 10:42:21 -06004209 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004210 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004211
4212 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
4213
4214 In this example, the script has a runlevel of 99, starts the script
4215 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
4216
4217 The variable's default value is "defaults", which is set in the
Andrew Geissler517393d2023-01-13 08:55:19 -06004218 :ref:`ref-classes-update-rc.d` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004219
Andrew Geissler09036742021-06-25 14:25:14 -05004220 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004221 ``update-rc.d`` command. For more information on valid parameters,
4222 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05004223 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004224
Andrew Geisslerf0343792020-11-18 10:42:21 -06004225 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004226 Specifies the QA checks to skip for a specific package within a
4227 recipe. For example, to skip the check for symbolic link ``.so``
4228 files in the main package of a recipe, add the following to the
4229 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05004230 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004231
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004232 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004233
Andrew Geissler595f6302022-01-24 19:11:47 +00004234 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004235 list of the valid QA checks you can specify using this variable.
4236
Andrew Geisslerf0343792020-11-18 10:42:21 -06004237 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004238 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05004239 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004240 configuration level to disable this behavior.
4241
Andrew Geisslerf0343792020-11-18 10:42:21 -06004242 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004243 When the IPK backend is in use and package management is enabled on
4244 the target, you can use this variable to set up ``opkg`` in the
4245 target image to point to package feeds on a nominated server. Once
4246 the feed is established, you can perform installations or upgrades
4247 using the package manager at runtime.
4248
Andrew Geisslerf0343792020-11-18 10:42:21 -06004249 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004250 Defines the kernel architecture used when assembling the
4251 configuration. Architectures supported for this release are:
4252
4253 - powerpc
4254 - i386
4255 - x86_64
4256 - arm
4257 - qemu
4258 - mips
4259
Andrew Geissler5f350902021-07-23 13:09:54 -04004260 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004261
Andrew Geisslerf0343792020-11-18 10:42:21 -06004262 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004263 A regular expression used by the build process to explicitly identify
4264 the kernel branch that is validated, patched, and configured during a
4265 build. You must set this variable to ensure the exact kernel branch
4266 you want is being used by the build process.
4267
4268 Values for this variable are set in the kernel's recipe file and the
4269 kernel's append file. For example, if you are using the
4270 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05004271 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004272 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004273
4274 KBRANCH ?= "standard/base"
4275
4276 This variable is also used from the kernel's append file to identify
4277 the kernel branch specific to a particular machine or target
4278 hardware. Continuing with the previous kernel example, the kernel's
4279 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
4280 BSP layer for a given machine. For example, the append file for the
4281 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
4282 machines (``meta-yocto-bsp``) is named
4283 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004284 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004285
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004286 KBRANCH:genericx86 = "standard/base"
4287 KBRANCH:genericx86-64 = "standard/base"
4288 KBRANCH:edgerouter = "standard/edgerouter"
4289 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004290
Andrew Geissler09036742021-06-25 14:25:14 -05004291 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004292 identify the kernel branch to use when building for each supported
4293 BSP.
4294
Andrew Geisslerf0343792020-11-18 10:42:21 -06004295 :term:`KBUILD_DEFCONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -06004296 When used with the :ref:`ref-classes-kernel-yocto`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004297 class, specifies an "in-tree" kernel configuration file for use
4298 during a kernel build.
4299
4300 Typically, when using a ``defconfig`` to configure a kernel during a
4301 build, you place the file in your layer in the same manner as you
4302 would place patch files and configuration fragment files (i.e.
4303 "out-of-tree"). However, if you want to use a ``defconfig`` file that
4304 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05004305 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004306 :term:`KMACHINE` variable to point to the
4307 ``defconfig`` file.
4308
4309 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05004310 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004311
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004312 KBUILD_DEFCONFIG:<machine> ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004313
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004314 Here is an example from a "raspberrypi2" :term:`MACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05004315 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004316
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004317 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004318
Andrew Geisslerc926e172021-05-07 16:11:35 -05004319 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004320
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004321 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004322
4323 For more
Andrew Geissler09036742021-06-25 14:25:14 -05004324 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004325 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004326 section in the Yocto Project Linux Kernel Development Manual.
4327
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004328 :term:`KCONFIG_MODE`
Andrew Geissler517393d2023-01-13 08:55:19 -06004329 When used with the :ref:`ref-classes-kernel-yocto`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004330 class, specifies the kernel configuration values to use for options
4331 not specified in the provided ``defconfig`` file. Valid options are::
4332
4333 KCONFIG_MODE = "alldefconfig"
4334 KCONFIG_MODE = "allnoconfig"
4335
4336 In ``alldefconfig`` mode the options not explicitly specified will be
4337 assigned their Kconfig default value. In ``allnoconfig`` mode the
4338 options not explicitly specified will be disabled in the kernel
4339 config.
4340
Andrew Geissler09036742021-06-25 14:25:14 -05004341 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004342 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
4343 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
4344 in ``${WORKDIR}`` through a meta-layer will be handled in
4345 ``allnoconfig`` mode.
4346
4347 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05004348 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004349 be explicitly set.
4350
4351 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
4352 generated by copying the ``.config`` file from a working Linux kernel
4353 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05004354 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004355 not need to be explicitly set.
4356
4357 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
4358 generated using the
4359 :ref:`ref-tasks-savedefconfig`
4360 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05004361 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004362
4363 KCONFIG_MODE = "alldefconfig"
4364
Andrew Geisslerf0343792020-11-18 10:42:21 -06004365 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004366 Specifies an alternate kernel image type for creation in addition to
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004367 the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and
4368 :term:`KERNEL_IMAGETYPES` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004369
Andrew Geisslerf0343792020-11-18 10:42:21 -06004370 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004371 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05004372 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004373 variable.
4374
Andrew Geissler09036742021-06-25 14:25:14 -05004375 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004376 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004377 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004378
4379 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4380
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004381 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
4382 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004383
Andrew Geisslerf0343792020-11-18 10:42:21 -06004384 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004385 A list of classes defining kernel image types that the
Andrew Geissler517393d2023-01-13 08:55:19 -06004386 :ref:`ref-classes-kernel` class should inherit. You typically
4387 append this variable to enable extended image types. An example is
4388 ":ref:`ref-classes-kernel-fitimage`", which enables
4389 fitImage support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``.
4390 You can register custom kernel image types with the
4391 :ref:`ref-classes-kernel` class using this variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004392
Patrick Williams03907ee2022-05-01 06:28:52 -05004393 :term:`KERNEL_DEBUG_TIMESTAMPS`
4394 If set to "1", enables timestamping functionality during building
4395 the kernel. The default is "0" to disable this for reproducibility
4396 reasons.
4397
Patrick Williams975a06f2022-10-21 14:42:47 -05004398 :term:`KERNEL_DEPLOY_DEPEND`
4399 Provides a means of controlling the dependency of an image recipe
4400 on the kernel. The default value is "virtual/kernel:do_deploy",
4401 however for a small initramfs image or other images that do not
4402 need the kernel, this can be set to "" in the image recipe.
4403
Andrew Geisslerf0343792020-11-18 10:42:21 -06004404 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004405 Specifies the name of the generated Linux kernel device tree (i.e.
4406 the ``.dtb``) file.
4407
4408 .. note::
4409
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004410 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004411 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004412
Andrew Geissler517393d2023-01-13 08:55:19 -06004413 In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
4414 class must be inherited.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004415
Andrew Geisslerf0343792020-11-18 10:42:21 -06004416 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004417 The link name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004418 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004419 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004420
4421 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4422
4423 The
4424 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004425 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004426
4427 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4428
4429 See the :term:`MACHINE` variable for additional
4430 information.
4431
Andrew Geisslerf0343792020-11-18 10:42:21 -06004432 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004433 The base name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004434 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004435 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004436
4437 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4438
4439 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004440 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004441
4442 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4443
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004444 :term:`KERNEL_DTC_FLAGS`
4445 Specifies the ``dtc`` flags that are passed to the Linux kernel build
4446 system when generating the device trees (via ``DTC_FLAGS`` environment
4447 variable).
4448
Andrew Geissler517393d2023-01-13 08:55:19 -06004449 In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
4450 class must be inherited.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004451
Andrew Geisslerf0343792020-11-18 10:42:21 -06004452 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004453 Specifies additional ``make`` command-line arguments the OpenEmbedded
4454 build system passes on when compiling the kernel.
4455
Andrew Geisslerf0343792020-11-18 10:42:21 -06004456 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004457 Includes additional kernel metadata. In the OpenEmbedded build
4458 system, the default Board Support Packages (BSPs)
4459 :term:`Metadata` is provided through the
4460 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004461 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004462 the kernel recipe or kernel append file to further add metadata for
4463 all BSPs or specific BSPs.
4464
4465 The metadata you add through this variable includes config fragments
4466 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004467 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004468 variable for a specific machine. In this way, you can provide
4469 validated, but optional, sets of kernel configurations and features.
4470
4471 For example, the following example from the ``linux-yocto-rt_4.12``
4472 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4473 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004474 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004475
4476 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004477 KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
4478 KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc"
4479 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4480 KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004481
Andrew Geisslerf0343792020-11-18 10:42:21 -06004482 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004483 The link name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004484 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004485 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004486
4487 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4488
4489 The value of the
4490 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004491 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004492
4493 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4494
4495 See the :term:`MACHINE` variable for additional
4496 information.
4497
Andrew Geisslerf0343792020-11-18 10:42:21 -06004498 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004499 The base name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004500 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004501 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004502
4503 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4504
4505 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004506 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004507
4508 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4509
Andrew Geisslerf0343792020-11-18 10:42:21 -06004510 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004511 The link name for the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004512 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004513
4514 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4515
4516 The value of
4517 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004518 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004519
4520 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4521
4522 See the :term:`MACHINE` variable for additional
4523 information.
4524
Andrew Geisslerf0343792020-11-18 10:42:21 -06004525 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004526 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004527 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004528 checked against the set value during the
4529 :ref:`ref-tasks-sizecheck` task. The task fails if
4530 the kernel image file is larger than the setting.
4531
Andrew Geissler09036742021-06-25 14:25:14 -05004532 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004533 limited amount of space in which the kernel image must be stored.
4534
4535 By default, this variable is not set, which means the size of the
4536 kernel image is not checked.
4537
Andrew Geisslerf0343792020-11-18 10:42:21 -06004538 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004539 The base name of the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004540 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004541
4542 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4543
4544 The value of the
4545 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004546 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004547
4548 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4549
Andrew Geisslerf0343792020-11-18 10:42:21 -06004550 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004551 The type of kernel to build for a device, usually set by the machine
4552 configuration files and defaults to "zImage". This variable is used
4553 when building the kernel and is passed to ``make`` as the target to
4554 build.
4555
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004556 To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
4557
4558 :term:`KERNEL_IMAGETYPES`
4559 Lists additional types of kernel images to build for a device in addition
4560 to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
4561 machine configuration files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004562
Andrew Geisslerf0343792020-11-18 10:42:21 -06004563 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004564 Lists kernel modules that need to be auto-loaded during boot.
4565
4566 .. note::
4567
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004568 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004569 variable.
4570
Andrew Geissler09036742021-06-25 14:25:14 -05004571 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004572 can be recognized by the kernel recipe or by an out-of-tree kernel
4573 module recipe (e.g. a machine configuration file, a distribution
4574 configuration file, an append file for the recipe, or the recipe
4575 itself).
4576
Andrew Geisslerc926e172021-05-07 16:11:35 -05004577 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004578
4579 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4580
Andrew Geissler09036742021-06-25 14:25:14 -05004581 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004582 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4583 the list of modules to be auto-loaded on boot. The modules appear
4584 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004585 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004586
4587 KERNEL_MODULE_AUTOLOAD += "module_name"
4588
4589 For information on how to populate the ``modname.conf`` file with
4590 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4591
Andrew Geisslerf0343792020-11-18 10:42:21 -06004592 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004593 Provides a list of modules for which the OpenEmbedded build system
4594 expects to find ``module_conf_``\ modname values that specify
4595 configuration for each of the modules. For information on how to
4596 provide those module configurations, see the
4597 :term:`module_conf_* <module_conf>` variable.
4598
Andrew Geisslerf0343792020-11-18 10:42:21 -06004599 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004600 The location of the kernel sources. This variable is set to the value
Andrew Geissler517393d2023-01-13 08:55:19 -06004601 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
4602 class. For information on how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004603 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004604 section in the Yocto Project Linux Kernel Development Manual.
4605
4606 To help maximize compatibility with out-of-tree drivers used to build
4607 modules, the OpenEmbedded build system also recognizes and uses the
4608 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004609 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004610 used by external Makefiles to point to the kernel source directory.
4611
Andrew Geisslerf0343792020-11-18 10:42:21 -06004612 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004613 The location of the kernel sources. This variable is set to the value
Andrew Geissler517393d2023-01-13 08:55:19 -06004614 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
4615 class. For information on how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004616 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004617 section in the Yocto Project Linux Kernel Development Manual.
4618
4619 To help maximize compatibility with out-of-tree drivers used to build
4620 modules, the OpenEmbedded build system also recognizes and uses the
4621 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004622 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004623 used by external Makefiles to point to the kernel source directory.
4624
Andrew Geisslerf0343792020-11-18 10:42:21 -06004625 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004626 Specifies the version of the kernel as extracted from ``version.h``
4627 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004628 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004629 configured. Consequently, attempting to refer to this variable in
4630 contexts prior to configuration will not work.
4631
Andrew Geisslerf0343792020-11-18 10:42:21 -06004632 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004633 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004634 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004635 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004636 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004637 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Patrick Williams2194f502022-10-16 14:26:09 -05004638 :term:`Initramfs` recipe. Setting the variable there when the data is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004639 needed avoids a potential dependency loop.
4640
Andrew Geisslerf0343792020-11-18 10:42:21 -06004641 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004642 Provides a short description of a configuration fragment. You use
4643 this variable in the ``.scc`` file that describes a configuration
4644 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004645 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004646
4647 define KFEATURE_DESCRIPTION "Enable SMP"
4648
Andrew Geisslerf0343792020-11-18 10:42:21 -06004649 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004650 The machine as known by the kernel. Sometimes the machine name used
4651 by the kernel does not match the machine name used by the
4652 OpenEmbedded build system. For example, the machine name that the
4653 OpenEmbedded build system understands as ``core2-32-intel-common``
4654 goes by a different name in the Linux Yocto kernel. The kernel
4655 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004656 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004657 OpenEmbedded build system machine name.
4658
4659 These mappings between different names occur in the Yocto Linux
4660 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004661 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004662
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004663 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4664 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4665 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4666 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4667 KMACHINE:core2-32-intel-common = "intel-core2-32"
4668 KBRANCH:core2-32-intel-common = "standard/base"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004669 KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004670
Andrew Geissler09036742021-06-25 14:25:14 -05004671 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004672 that the kernel understands the machine name as "intel-core2-32".
4673 However, the OpenEmbedded build system understands the machine as
4674 "core2-32-intel-common".
4675
Andrew Geisslerf0343792020-11-18 10:42:21 -06004676 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004677 Defines the kernel type to be used in assembling the configuration.
4678 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004679 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004680 section in the
4681 Yocto Project Linux Kernel Development Manual for more information on
4682 kernel types.
4683
Andrew Geissler09036742021-06-25 14:25:14 -05004684 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004685 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004686 value you use must match the value used for the
4687 :term:`LINUX_KERNEL_TYPE` value used by the
4688 kernel recipe.
4689
Andrew Geisslerf0343792020-11-18 10:42:21 -06004690 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004691 Provides a list of targets for automatic configuration.
4692
Andrew Geissler517393d2023-01-13 08:55:19 -06004693 See the :ref:`ref-classes-grub-efi` class for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004694 information on how this variable is used.
4695
Andrew Geisslerf0343792020-11-18 10:42:21 -06004696 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004697 Lists the layers, separated by spaces, on which this recipe depends.
4698 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004699 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004700
4701 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4702
4703 In this previous example,
4704 version 3 of "anotherlayer" is compared against
4705 :term:`LAYERVERSION`\ ``_anotherlayer``.
4706
4707 An error is produced if any dependency is missing or the version
4708 numbers (if specified) do not match exactly. This variable is used in
4709 the ``conf/layer.conf`` file and must be suffixed with the name of
4710 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4711
Andrew Geisslerf0343792020-11-18 10:42:21 -06004712 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004713 When used inside the ``layer.conf`` configuration file, this variable
4714 provides the path of the current layer. This variable is not
4715 available outside of ``layer.conf`` and references are expanded
4716 immediately when parsing of the file completes.
4717
Andrew Geissler517393d2023-01-13 08:55:19 -06004718 :term:`LAYERDIR_RE`
4719 See :term:`bitbake:LAYERDIR_RE` in the BitBake manual.
4720
Andrew Geisslerf0343792020-11-18 10:42:21 -06004721 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004722 Lists the layers, separated by spaces, recommended for use with this
4723 layer.
4724
4725 Optionally, you can specify a specific layer version for a
4726 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004727 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004728
4729 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4730
4731 In this previous example, version 3 of "anotherlayer" is compared
4732 against ``LAYERVERSION_anotherlayer``.
4733
4734 This variable is used in the ``conf/layer.conf`` file and must be
4735 suffixed with the name of the specific layer (e.g.
4736 ``LAYERRECOMMENDS_mylayer``).
4737
Andrew Geisslerf0343792020-11-18 10:42:21 -06004738 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004739 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004740 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004741 allows the layer maintainer to indicate which combinations of the
4742 layer and OE-Core can be expected to work. The variable gives the
4743 system a way to detect when a layer has not been tested with new
4744 releases of OE-Core (e.g. the layer is not maintained).
4745
4746 To specify the OE-Core versions for which a layer is compatible, use
4747 this variable in your layer's ``conf/layer.conf`` configuration file.
4748 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004749 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004750 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004751 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004752
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004753 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004754
4755 .. note::
4756
Andrew Geissler09036742021-06-25 14:25:14 -05004757 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004758 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004759 The OpenEmbedded build system produces a warning if the variable
4760 is not set for any given layer.
4761
Andrew Geissler517393d2023-01-13 08:55:19 -06004762 See the ":ref:`dev-manual/layers:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004763 section in the Yocto Project Development Tasks Manual.
4764
Andrew Geisslerf0343792020-11-18 10:42:21 -06004765 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004766 Optionally specifies the version of a layer as a single number. You
4767 can use this within :term:`LAYERDEPENDS` for
4768 another layer in order to depend on a specific version of the layer.
4769 This variable is used in the ``conf/layer.conf`` file and must be
4770 suffixed with the name of the specific layer (e.g.
4771 ``LAYERVERSION_mylayer``).
4772
Andrew Geisslerf0343792020-11-18 10:42:21 -06004773 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004774 The minimal command and arguments used to run the linker.
4775
Andrew Geisslerf0343792020-11-18 10:42:21 -06004776 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004777 Specifies the flags to pass to the linker. This variable is exported
4778 to an environment variable and thus made visible to the software
4779 being built during the compilation step.
4780
Andrew Geissler09036742021-06-25 14:25:14 -05004781 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004782 being built:
4783
4784 - :term:`TARGET_LDFLAGS` when building for the
4785 target
4786
4787 - :term:`BUILD_LDFLAGS` when building for the
4788 build host (i.e. ``-native``)
4789
4790 - :term:`BUILDSDK_LDFLAGS` when building for
4791 an SDK (i.e. ``nativesdk-``)
4792
Andrew Geisslerf0343792020-11-18 10:42:21 -06004793 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004794 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
Andrew Geissler517393d2023-01-13 08:55:19 -06004795 that the :ref:`ref-classes-debian` class applies its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004796 naming policy to given a recipe that packages multiple libraries.
4797
Andrew Geissler517393d2023-01-13 08:55:19 -06004798 This variable works in conjunction with the :ref:`ref-classes-debian`
4799 class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004800
Andrew Geisslerf0343792020-11-18 10:42:21 -06004801 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004802 Checksums of the license text in the recipe source code.
4803
4804 This variable tracks changes in license text of the source code
4805 files. If the license text is changed, it will trigger a build
4806 failure, which gives the developer an opportunity to review any
4807 license change.
4808
4809 This variable must be defined for all recipes (unless
4810 :term:`LICENSE` is set to "CLOSED").
4811
Andrew Geissler517393d2023-01-13 08:55:19 -06004812 For more information, see the ":ref:`dev-manual/licenses:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004813 section in the Yocto Project Development Tasks Manual.
4814
Andrew Geisslerf0343792020-11-18 10:42:21 -06004815 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004816 The list of source licenses for the recipe. Follow these rules:
4817
4818 - Do not use spaces within individual license names.
4819
4820 - Separate license names using \| (pipe) when there is a choice
4821 between licenses.
4822
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004823 - Separate license names using & (ampersand) when there are
4824 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004825
4826 - You can use spaces between license names.
4827
4828 - For standard licenses, use the names of the files in
4829 ``meta/files/common-licenses/`` or the
4830 :term:`SPDXLICENSEMAP` flag names defined in
4831 ``meta/conf/licenses.conf``.
4832
Andrew Geisslerc926e172021-05-07 16:11:35 -05004833 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004834
Andrew Geissler9aee5002022-03-30 16:27:02 +00004835 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4836 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4837 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004838
4839 The first example is from the
4840 recipes for Qt, which the user may choose to distribute under either
4841 the LGPL version 2.1 or GPL version 3. The second example is from
4842 Cairo where two licenses cover different parts of the source code.
4843 The final example is from ``sysstat``, which presents a single
4844 license.
4845
4846 You can also specify licenses on a per-package basis to handle
4847 situations where components of the output have different licenses.
4848 For example, a piece of software whose code is licensed under GPLv2
4849 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004850 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004851
Andrew Geissler9aee5002022-03-30 16:27:02 +00004852 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4853 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004854 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004855
Andrew Geisslerf0343792020-11-18 10:42:21 -06004856 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004857 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004858 build system to create an extra package (i.e.
4859 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4860 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004861 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004862
4863 The ``${PN}-lic`` package installs a directory in
4864 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4865 name, and installs files in that directory that contain license and
4866 copyright information (i.e. copies of the appropriate license files
4867 from ``meta/common-licenses`` that match the licenses specified in
4868 the :term:`LICENSE` variable of the recipe metadata
4869 and copies of files marked in
4870 :term:`LIC_FILES_CHKSUM` as containing
4871 license text).
4872
4873 For related information on providing license text, see the
4874 :term:`COPY_LIC_DIRS` variable, the
4875 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler517393d2023-01-13 08:55:19 -06004876 ":ref:`dev-manual/licenses:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004877 section in the Yocto Project Development Tasks Manual.
4878
Andrew Geisslerf0343792020-11-18 10:42:21 -06004879 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004880 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00004881 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004882 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004883 separate them with spaces.
4884
4885 This value is independent of :term:`LICENSE` and is
4886 typically used to mark recipes that might require additional licenses
4887 in order to be used in a commercial product. For more information,
4888 see the
Andrew Geissler517393d2023-01-13 08:55:19 -06004889 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004890 section in the Yocto Project Development Tasks Manual.
4891
Andrew Geissler9aee5002022-03-30 16:27:02 +00004892 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004893 Lists license flags that when specified in
4894 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004895 prevent that recipe from being built. For more information, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06004896 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004897 section in the Yocto Project Development Tasks Manual.
4898
Andrew Geisslerf0343792020-11-18 10:42:21 -06004899 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004900 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004901 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004902 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004903 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004904 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004905
4906 LICENSE_PATH += "path-to-additional-common-licenses"
4907
Andrew Geisslerf0343792020-11-18 10:42:21 -06004908 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004909 Defines the kernel type to be used in assembling the configuration.
4910 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004911 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004912 section in the
4913 Yocto Project Linux Kernel Development Manual for more information on
4914 kernel types.
4915
Andrew Geissler09036742021-06-25 14:25:14 -05004916 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004917 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004918 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004919 the kernel tools to find the appropriate description within the
4920 kernel :term:`Metadata` with which to build out the sources
4921 and configuration.
4922
Andrew Geisslerf0343792020-11-18 10:42:21 -06004923 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004924 The Linux version from ``kernel.org`` on which the Linux kernel image
4925 being built using the OpenEmbedded build system is based. You define
4926 this variable in the kernel recipe. For example, the
4927 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004928 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004929
4930 LINUX_VERSION ?= "3.4.24"
4931
Andrew Geissler09036742021-06-25 14:25:14 -05004932 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004933 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004934
4935 PV = "${LINUX_VERSION}+git${SRCPV}"
4936
Andrew Geisslerf0343792020-11-18 10:42:21 -06004937 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004938 A string extension compiled into the version string of the Linux
4939 kernel built with the OpenEmbedded build system. You define this
4940 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004941 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004942
4943 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4944
4945 Defining this variable essentially sets the Linux kernel
4946 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4947 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004948 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004949
4950 $ uname -r
4951 3.7.0-rc8-custom
4952
Andrew Geisslerf0343792020-11-18 10:42:21 -06004953 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004954 Specifies the directory to which the OpenEmbedded build system writes
4955 overall log files. The default directory is ``${TMPDIR}/log``.
4956
4957 For the directory containing logs specific to each task, see the
4958 :term:`T` variable.
4959
Andrew Geisslerf0343792020-11-18 10:42:21 -06004960 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004961 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004962 :term:`MACHINE` in the ``local.conf`` file found in the
4963 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004964 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004965 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004966
4967 MACHINE ?= "qemux86"
4968
4969 The variable corresponds to a machine configuration file of the same
4970 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004971 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004972 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004973 the :term:`Source Directory` in
4974 ``meta/conf/machine``.
4975
4976 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004977 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004978
4979 MACHINE ?= "qemuarm"
4980 MACHINE ?= "qemuarm64"
4981 MACHINE ?= "qemumips"
4982 MACHINE ?= "qemumips64"
4983 MACHINE ?= "qemuppc"
4984 MACHINE ?= "qemux86"
4985 MACHINE ?= "qemux86-64"
4986 MACHINE ?= "genericx86"
4987 MACHINE ?= "genericx86-64"
4988 MACHINE ?= "beaglebone"
4989 MACHINE ?= "edgerouter"
4990
4991 The last five are Yocto Project reference hardware
4992 boards, which are provided in the ``meta-yocto-bsp`` layer.
4993
4994 .. note::
4995
4996 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004997 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004998
Andrew Geisslerf0343792020-11-18 10:42:21 -06004999 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005000 Specifies the name of the machine-specific architecture. This
5001 variable is set automatically from :term:`MACHINE` or
5002 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05005003 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005004
Andrew Geisslerf0343792020-11-18 10:42:21 -06005005 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005006 A list of required machine-specific packages to install as part of
5007 the image being built. The build process depends on these packages
5008 being present. Furthermore, because this is a "machine-essential"
5009 variable, the list of packages are essential for the machine to boot.
5010 The impact of this variable affects images based on
5011 ``packagegroup-core-boot``, including the ``core-image-minimal``
5012 image.
5013
5014 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05005015 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005016 that the image being built has a build dependency on the variable's
5017 list of packages. In other words, the image will not build if a file
5018 in this list is not found.
5019
5020 As an example, suppose the machine for which you are building
5021 requires ``example-init`` to be run during boot to initialize the
5022 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05005023 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005024
5025 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
5026
Andrew Geisslerf0343792020-11-18 10:42:21 -06005027 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005028 A list of recommended machine-specific packages to install as part of
5029 the image being built. The build process does not depend on these
5030 packages being present. However, because this is a
5031 "machine-essential" variable, the list of packages are essential for
5032 the machine to boot. The impact of this variable affects images based
5033 on ``packagegroup-core-boot``, including the ``core-image-minimal``
5034 image.
5035
Andrew Geissler09036742021-06-25 14:25:14 -05005036 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005037 variable with the exception that the image being built does not have
5038 a build dependency on the variable's list of packages. In other
5039 words, the image will still build if a package in this list is not
5040 found. Typically, this variable is used to handle essential kernel
5041 modules, whose functionality may be selected to be built into the
5042 kernel rather than as a module, in which case a package will not be
5043 produced.
5044
5045 Consider an example where you have a custom kernel where a specific
5046 touchscreen driver is required for the machine to be usable. However,
5047 the driver can be built as a module or into the kernel depending on
5048 the kernel configuration. If the driver is built as a module, you
5049 want it to be installed. But, when the driver is built into the
5050 kernel, you still want the build to succeed. This variable sets up a
5051 "recommends" relationship so that in the latter case, the build will
5052 not fail due to the missing package. To accomplish this, assuming the
5053 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05005054 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005055
5056 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
5057
5058 .. note::
5059
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005060 In this example, the ``kernel-module-ab123`` recipe needs to
5061 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
5062 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
5063 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005064
5065 Some examples of these machine essentials are flash, screen,
5066 keyboard, mouse, or touchscreen drivers (depending on the machine).
5067
Andrew Geisslerf0343792020-11-18 10:42:21 -06005068 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005069 A list of machine-specific packages to install as part of the image
5070 being built that are not essential for the machine to boot. However,
5071 the build process for more fully-featured images depends on the
5072 packages being present.
5073
5074 This variable affects all images based on ``packagegroup-base``,
5075 which does not include the ``core-image-minimal`` or
5076 ``core-image-full-cmdline`` images.
5077
Andrew Geissler09036742021-06-25 14:25:14 -05005078 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005079 with the exception that the image being built has a build dependency
5080 on the variable's list of packages. In other words, the image will
5081 not build if a file in this list is not found.
5082
5083 An example is a machine that has WiFi capability but is not essential
5084 for the machine to boot the image. However, if you are building a
5085 more fully-featured image, you want to enable the WiFi. The package
5086 containing the firmware for the WiFi hardware is always expected to
5087 exist, so it is acceptable for the build process to depend upon
5088 finding the package. In this case, assuming the package for the
5089 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005090 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005091
5092 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
5093
Andrew Geisslerf0343792020-11-18 10:42:21 -06005094 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005095 A list of machine-specific packages to install as part of the image
5096 being built that are not essential for booting the machine. The image
5097 being built has no build dependency on this list of packages.
5098
5099 This variable affects only images based on ``packagegroup-base``,
5100 which does not include the ``core-image-minimal`` or
5101 ``core-image-full-cmdline`` images.
5102
Andrew Geissler09036742021-06-25 14:25:14 -05005103 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005104 with the exception that the image being built does not have a build
5105 dependency on the variable's list of packages. In other words, the
5106 image will build if a file in this list is not found.
5107
5108 An example is a machine that has WiFi capability but is not essential
5109 For the machine to boot the image. However, if you are building a
5110 more fully-featured image, you want to enable WiFi. In this case, the
5111 package containing the WiFi kernel module will not be produced if the
5112 WiFi driver is built into the kernel, in which case you still want
5113 the build to succeed instead of failing as a result of the package
5114 not being found. To accomplish this, assuming the package for the
5115 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005116 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005117
5118 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
5119
Andrew Geisslerf0343792020-11-18 10:42:21 -06005120 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005121 Specifies the list of hardware features the
5122 :term:`MACHINE` is capable of supporting. For related
5123 information on enabling features, see the
5124 :term:`DISTRO_FEATURES`,
5125 :term:`COMBINED_FEATURES`, and
5126 :term:`IMAGE_FEATURES` variables.
5127
5128 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005129 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005130
Andrew Geisslerf0343792020-11-18 10:42:21 -06005131 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05005132 Features to be added to :term:`MACHINE_FEATURES` if not also present in
5133 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005134
5135 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
5136 not intended to be user-configurable. It is best to just reference
5137 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005138 all machine configurations. See the ":ref:`ref-features-backfill`"
5139 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005140
Andrew Geisslerf0343792020-11-18 10:42:21 -06005141 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05005142 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
5143 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005144 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005145
Andrew Geisslerf0343792020-11-18 10:42:21 -06005146 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005147 A colon-separated list of overrides that apply to the current
5148 machine. By default, this list includes the value of
5149 :term:`MACHINE`.
5150
Andrew Geissler09036742021-06-25 14:25:14 -05005151 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005152 should apply to a machine. For example, all machines emulated in QEMU
5153 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
5154 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05005155 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005156
5157 MACHINEOVERRIDES =. "qemuall:"
5158
5159 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005160 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005161 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005162 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005163
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005164 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005165 file://wired-setup \
5166 "
5167
5168 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05005169 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005170 value of :term:`OVERRIDES`.
5171
Andrew Geisslerf0343792020-11-18 10:42:21 -06005172 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005173 The email address of the distribution maintainer.
5174
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06005175 :term:`MESON_BUILDTYPE`
5176 Value of the Meson ``--buildtype`` argument used by the
5177 :ref:`ref-classes-meson` class. It defaults to ``debug`` if
5178 :term:`DEBUG_BUILD` is set to "1", and ``plain`` otherwise.
5179
5180 See `Meson build options <https://mesonbuild.com/Builtin-options.html>`__
5181 for the values you could set in a recipe. Values such as ``plain``,
5182 ``debug``, ``debugoptimized``, ``release`` and ``minsize`` allow
5183 you to specify the inclusion of debugging symbols and the compiler
5184 optimizations (none, performance or size).
5185
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005186 :term:`METADATA_BRANCH`
5187 The branch currently checked out for the OpenEmbedded-Core layer (path
5188 determined by :term:`COREBASE`).
5189
5190 :term:`METADATA_REVISION`
5191 The revision currently checked out for the OpenEmbedded-Core layer (path
5192 determined by :term:`COREBASE`).
5193
Patrick Williams7784c422022-11-17 07:29:11 -06005194 :term:`MIME_XDG_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06005195 The current implementation of the :ref:`ref-classes-mime-xdg`
Patrick Williams7784c422022-11-17 07:29:11 -06005196 class cannot detect ``.desktop`` files installed through absolute
5197 symbolic links. Use this setting to make the class create post-install
5198 and post-remove scripts for these packages anyway, to invoke the
5199 ``update-destop-database`` command.
5200
Andrew Geisslerf0343792020-11-18 10:42:21 -06005201 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005202 Specifies additional paths from which the OpenEmbedded build system
5203 gets source code. When the build system searches for source code, it
5204 first tries the local download directory. If that location fails, the
5205 build system tries locations defined by
5206 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05005207 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005208
5209 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005210 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005211 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5212
Andrew Geisslerf0343792020-11-18 10:42:21 -06005213 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005214 Specifies a prefix has been added to :term:`PN` to create a
5215 special version of a recipe or package (i.e. a Multilib version). The
5216 variable is used in places where the prefix needs to be added to or
Andrew Geisslerc5535c92023-01-27 16:10:19 -06005217 removed from a name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05005218 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005219
5220 .. note::
5221
Andrew Geissler517393d2023-01-13 08:55:19 -06005222 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation
5223 is historical and comes from a time when ":ref:`ref-classes-nativesdk`"
5224 was a suffix rather than a prefix on the recipe name. When
5225 ":ref:`ref-classes-nativesdk`" was turned into a prefix, it made sense
5226 to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005227
Andrew Geissler09036742021-06-25 14:25:14 -05005228 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geissler517393d2023-01-13 08:55:19 -06005229 :term:`BBCLASSEXTEND` is used to provide a :ref:`ref-classes-nativesdk`
5230 version of a recipe in addition to the target version. If that recipe
5231 declares build-time dependencies on tasks in other recipes by using
5232 :term:`DEPENDS`, then a dependency on "foo" will automatically get
5233 rewritten to a dependency on "nativesdk-foo". However, dependencies like
5234 the following will not get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005235
5236 do_foo[depends] += "recipe:do_foo"
5237
5238 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005239 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005240
5241 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
5242
Andrew Geissler09036742021-06-25 14:25:14 -05005243 :term:`module_autoload`
5244 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04005245 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05005246 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005247
5248 module_autoload_rfcomm = "rfcomm"
5249
Andrew Geisslerc926e172021-05-07 16:11:35 -05005250 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005251
5252 KERNEL_MODULE_AUTOLOAD += "rfcomm"
5253
5254 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
5255
Andrew Geissler09036742021-06-25 14:25:14 -05005256 :term:`module_conf`
Patrick Williams2390b1b2022-11-03 13:47:49 -05005257 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005258 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
5259 file.
5260
5261 You can use this variable anywhere that it can be recognized by the
5262 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
5263 configuration file, a distribution configuration file, an append file
5264 for the recipe, or the recipe itself). If you use this variable, you
5265 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00005266 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005267 variable.
5268
Andrew Geisslerc926e172021-05-07 16:11:35 -05005269 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005270
5271 module_conf_module_name = "modprobe.d-syntax"
5272
5273 You must use the kernel module name override.
5274
5275 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04005276 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005277
Andrew Geissler5f350902021-07-23 13:09:54 -04005278 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005279 populate the ``/etc/modprobe.d/modname.conf`` file with
5280 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05005281 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005282
5283 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
5284
5285 For information on how to specify kernel modules to auto-load on
5286 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
5287
Andrew Geisslerf0343792020-11-18 10:42:21 -06005288 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005289 Controls creation of the ``modules-*.tgz`` file. Set this variable to
5290 "0" to disable creation of this file, which contains all of the
5291 kernel modules resulting from a kernel build.
5292
Andrew Geisslerf0343792020-11-18 10:42:21 -06005293 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005294 The link name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05005295 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005296
5297 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
5298
5299 The value
5300 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005301 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005302
5303 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
5304
5305 See the :term:`MACHINE` variable for additional information.
5306
Andrew Geisslerf0343792020-11-18 10:42:21 -06005307 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005308 The base name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05005309 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005310
5311 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
5312
5313 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05005314 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005315
5316 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
5317
Patrick Williams975a06f2022-10-21 14:42:47 -05005318 :term:`MOUNT_BASE`
5319 On non-systemd systems (where ``udev-extraconf`` is being used),
5320 specifies the base directory for auto-mounting filesystems. The
5321 default value is "/run/media".
5322
Andrew Geisslerf0343792020-11-18 10:42:21 -06005323 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005324 Uniquely identifies the type of the target system for which packages
5325 are being built. This variable allows output for different types of
5326 target systems to be put into different subdirectories of the same
5327 output directory.
5328
Andrew Geisslerc926e172021-05-07 16:11:35 -05005329 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005330
5331 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
5332
Andrew Geissler517393d2023-01-13 08:55:19 -06005333 Some classes (e.g. :ref:`ref-classes-cross-canadian`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05005334 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005335
5336 See the :term:`STAMP` variable for an example. See the
5337 :term:`STAGING_DIR_TARGET` variable for more information.
5338
Andrew Geisslerf0343792020-11-18 10:42:21 -06005339 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005340 A string identifying the host distribution. Strings consist of the
5341 host distributor ID followed by the release, as reported by the
5342 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
5343 example, when running a build on Ubuntu 12.10, the value is
5344 "Ubuntu-12.10". If this information is unable to be determined, the
5345 value resolves to "Unknown".
5346
5347 This variable is used by default to isolate native shared state
5348 packages for different distributions (e.g. to avoid problems with
5349 ``glibc`` version incompatibilities). Additionally, the variable is
5350 checked against
5351 :term:`SANITY_TESTED_DISTROS` if that
5352 variable is set.
5353
Andrew Geisslerf0343792020-11-18 10:42:21 -06005354 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005355 The minimal command and arguments to run ``nm``.
5356
Andrew Geisslerf0343792020-11-18 10:42:21 -06005357 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005358 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005359 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005360 licenses that are not in any way common. Also, new licenses are added
5361 occasionally to avoid introducing a lot of common license files,
5362 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05005363 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005364 not exist in common licenses.
5365
Andrew Geissler09036742021-06-25 14:25:14 -05005366 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05005367 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005368
5369 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
5370
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005371 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005372 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05005373 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005374
5375 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
5376
Andrew Geisslerf0343792020-11-18 10:42:21 -06005377 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005378 Prevents installation of all "recommended-only" packages.
5379 Recommended-only packages are packages installed only through the
5380 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05005381 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005382
5383 NO_RECOMMENDATIONS = "1"
5384
5385 You can set this variable globally in your ``local.conf`` file or you
5386 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005387 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005388
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005389 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005390
5391 It is important to realize that if you choose to not install packages
5392 using this variable and some other packages are dependent on them
5393 (i.e. listed in a recipe's :term:`RDEPENDS`
5394 variable), the OpenEmbedded build system ignores your request and
5395 will install the packages to avoid dependency errors.
5396
5397 .. note::
5398
5399 Some recommended packages might be required for certain system
5400 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005401 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005402
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005403 This variable is only supported when using the IPK and RPM
5404 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005405
5406 See the :term:`BAD_RECOMMENDATIONS` and
5407 the :term:`PACKAGE_EXCLUDE` variables for
5408 related information.
5409
Andrew Geisslerf0343792020-11-18 10:42:21 -06005410 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005411 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005412 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05005413 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005414 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005415
5416 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005417 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
5418 FILES:${PN}-dbg = "/usr/src/debug/"
5419 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005420
Andrew Geissler09036742021-06-25 14:25:14 -05005421 :term:`NON_MULTILIB_RECIPES`
5422 A list of recipes that should not be built for multilib. OE-Core's
5423 ``multilib.conf`` file defines a reasonable starting point for this
5424 list with::
5425
5426 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
5427
Andrew Geisslerf0343792020-11-18 10:42:21 -06005428 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005429 The minimal command and arguments to run ``objcopy``.
5430
Andrew Geisslerf0343792020-11-18 10:42:21 -06005431 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005432 The minimal command and arguments to run ``objdump``.
5433
Andrew Geisslerf0343792020-11-18 10:42:21 -06005434 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005435 When inheriting the :ref:`ref-classes-binconfig` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005436 this variable specifies additional arguments passed to the "sed"
5437 command. The sed command alters any paths in configuration scripts
5438 that have been set up during compilation. Inheriting this class
5439 results in all paths in these scripts being changed to point into the
5440 ``sysroots/`` directory so that all builds that use the script will
5441 use the correct directories for the cross compiling layout.
5442
Patrick Williams975a06f2022-10-21 14:42:47 -05005443 See the ``meta/classes-recipe/binconfig.bbclass`` in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005444 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00005445 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005446
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06005447 :term:`OECMAKE_GENERATOR`
5448 A variable for the :ref:`ref-classes-cmake` class, allowing to choose
5449 which back-end will be generated by CMake to build an application.
5450
5451 By default, this variable is set to ``Ninja``, which is faster than GNU
5452 make, but if building is broken with Ninja, a recipe can use this
5453 variable to use GNU make instead::
5454
5455 OECMAKE_GENERATOR = "Unix Makefiles"
5456
Andrew Geisslerf0343792020-11-18 10:42:21 -06005457 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005458 An internal variable used to tell the OpenEmbedded build system what
5459 Python modules to import for every Python function run by the system.
5460
5461 .. note::
5462
5463 Do not set this variable. It is for internal use only.
5464
Andrew Geisslerf0343792020-11-18 10:42:21 -06005465 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005466 The name of the build environment setup script for the purposes of
5467 setting up the environment within the extensible SDK. The default
5468 value is "oe-init-build-env".
5469
5470 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05005471 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005472
Andrew Geisslerf0343792020-11-18 10:42:21 -06005473 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005474 Controls how the OpenEmbedded build system spawns interactive
5475 terminals on the host development system (e.g. using the BitBake
5476 command with the ``-c devshell`` command-line option). For more
Andrew Geissler517393d2023-01-13 08:55:19 -06005477 information, see the ":ref:`dev-manual/development-shell:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005478 the Yocto Project Development Tasks Manual.
5479
Andrew Geissler5f350902021-07-23 13:09:54 -04005480 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005481
5482 - auto
5483 - gnome
5484 - xfce
5485 - rxvt
5486 - screen
5487 - konsole
5488 - none
5489
Andrew Geisslerf0343792020-11-18 10:42:21 -06005490 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005491 The directory from which the top-level build environment setup script
5492 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005493 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05005494 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005495 contains the script.
5496
5497 For additional information on how this variable is used, see the
5498 initialization script.
5499
Andrew Geisslerf0343792020-11-18 10:42:21 -06005500 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005501 Declares the oldest version of the Linux kernel that the produced
5502 binaries must support. This variable is passed into the build of the
5503 Embedded GNU C Library (``glibc``).
5504
5505 The default for this variable comes from the
5506 ``meta/conf/bitbake.conf`` configuration file. You can override this
5507 default by setting the variable in a custom distribution
5508 configuration file.
5509
Patrick Williams975a06f2022-10-21 14:42:47 -05005510 :term:`OVERLAYFS_ETC_DEVICE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005511 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005512 inherited, specifies the device to be mounted for the read/write
5513 layer of ``/etc``. There is no default, so you must set this if you
Andrew Geissler517393d2023-01-13 08:55:19 -06005514 wish to enable :ref:`ref-classes-overlayfs-etc`, for
Patrick Williams975a06f2022-10-21 14:42:47 -05005515 example, assuming ``/dev/mmcblk0p2`` was the desired device::
5516
5517 OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2"
5518
5519 :term:`OVERLAYFS_ETC_EXPOSE_LOWER`
Andrew Geissler517393d2023-01-13 08:55:19 -06005520 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005521 inherited, if set to "1" then a read-only access to the original
5522 ``/etc`` content will be provided as a ``lower/`` subdirectory of
5523 :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0".
5524
5525 :term:`OVERLAYFS_ETC_FSTYPE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005526 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005527 inherited, specifies the file system type for the read/write
5528 layer of ``/etc``. There is no default, so you must set this if you
Andrew Geissler517393d2023-01-13 08:55:19 -06005529 wish to enable :ref:`ref-classes-overlayfs-etc`,
Patrick Williams975a06f2022-10-21 14:42:47 -05005530 for example, assuming the file system is ext4::
5531
5532 OVERLAYFS_ETC_FSTYPE = "ext4"
5533
5534 :term:`OVERLAYFS_ETC_MOUNT_OPTIONS`
Andrew Geissler517393d2023-01-13 08:55:19 -06005535 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005536 inherited, specifies the mount options for the read-write layer.
5537 The default value is "defaults".
5538
5539 :term:`OVERLAYFS_ETC_MOUNT_POINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06005540 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005541 inherited, specifies the parent mount path for the filesystem layers.
5542 There is no default, so you must set this if you wish to enable
Andrew Geissler517393d2023-01-13 08:55:19 -06005543 :ref:`ref-classes-overlayfs-etc`, for example if the desired path is
5544 "/data"::
Patrick Williams975a06f2022-10-21 14:42:47 -05005545
5546 OVERLAYFS_ETC_MOUNT_POINT = "/data"
5547
5548 :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06005549 When the :ref:`ref-classes-overlayfs-etc` class is inherited, controls
5550 how the generated init will be named. For more information, see the
5551 :ref:`ref-classes-overlayfs-etc` class documentation. The default value
5552 is "1".
Patrick Williams975a06f2022-10-21 14:42:47 -05005553
5554 :term:`OVERLAYFS_MOUNT_POINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06005555 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005556 specifies mount point(s) to be used. For example::
5557
5558 OVERLAYFS_MOUNT_POINT[data] = "/data"
5559
Andrew Geissler517393d2023-01-13 08:55:19 -06005560 The assumes you have a ``data.mount`` systemd unit defined elsewhere in
5561 your BSP (e.g. in ``systemd-machine-units`` recipe) and it is installed
5562 into the image. For more information see :ref:`ref-classes-overlayfs`.
Patrick Williams975a06f2022-10-21 14:42:47 -05005563
5564 .. note::
5565
Andrew Geissler517393d2023-01-13 08:55:19 -06005566 Although the :ref:`ref-classes-overlayfs` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005567 inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT`
5568 should be set in your machine configuration.
5569
5570 :term:`OVERLAYFS_QA_SKIP`
Andrew Geissler517393d2023-01-13 08:55:19 -06005571 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005572 provides the ability to disable QA checks for particular overlayfs
5573 mounts. For example::
5574
5575 OVERLAYFS_QA_SKIP[data] = "mount-configured"
5576
5577 .. note::
5578
Andrew Geissler517393d2023-01-13 08:55:19 -06005579 Although the :ref:`ref-classes-overlayfs` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005580 inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP`
5581 should be set in your machine configuration.
5582
5583 :term:`OVERLAYFS_WRITABLE_PATHS`
Andrew Geissler517393d2023-01-13 08:55:19 -06005584 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005585 specifies writable paths used at runtime for the recipe. For
5586 example::
5587
5588 OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application"
5589
Andrew Geisslerf0343792020-11-18 10:42:21 -06005590 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005591 A colon-separated list of overrides that currently apply. Overrides
5592 are a BitBake mechanism that allows variables to be selectively
5593 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005594 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005595 the current recipe being built, the machine for which it is being
5596 built, and so forth.
5597
5598 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005599 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005600 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005601 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005602
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005603 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005604
5605 See the
5606 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5607 section in the BitBake User Manual for more information on the
5608 overrides mechanism.
5609
Andrew Geissler09036742021-06-25 14:25:14 -05005610 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005611 :term:`CLASSOVERRIDE`,
5612 :term:`MACHINEOVERRIDES`, and
5613 :term:`DISTROOVERRIDES` variables. Another
5614 important override included by default is ``pn-${PN}``. This override
5615 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005616 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005617
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005618 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005619
5620 .. note::
5621
Andrew Geissler09036742021-06-25 14:25:14 -05005622 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005623 in the output of the ``bitbake -e`` command. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06005624 ":ref:`dev-manual/debugging:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005625 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005626
Andrew Geisslerf0343792020-11-18 10:42:21 -06005627 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005628 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005629
5630 ${PN}-${PV}
5631
Andrew Geissler517393d2023-01-13 08:55:19 -06005632 :term:`P4DIR`
5633 See :term:`bitbake:P4DIR` in the BitBake manual.
5634
Andrew Geisslerf0343792020-11-18 10:42:21 -06005635 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005636 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005637
5638 You may find you need to inject additional metadata into packages.
5639 This variable allows you to do that by setting the injected data as
5640 the value. Multiple fields can be added by splitting the content with
5641 the literal separator "\n".
5642
5643 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5644 to do package type specific settings. It can also be made package
5645 specific by using the package name as a suffix.
5646
5647 You can find out more about applying this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06005648 ":ref:`dev-manual/packages:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005649 section in the Yocto Project Development Tasks Manual.
5650
Andrew Geisslerf0343792020-11-18 10:42:21 -06005651 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005652 The architecture of the resulting package or packages.
5653
5654 By default, the value of this variable is set to
5655 :term:`TUNE_PKGARCH` when building for the
5656 target, :term:`BUILD_ARCH` when building for the
5657 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5658 SDK.
5659
5660 .. note::
5661
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005662 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005663
5664 However, if your recipe's output packages are built specific to the
5665 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005666 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005667 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005668
5669 PACKAGE_ARCH = "${MACHINE_ARCH}"
5670
Andrew Geisslerf0343792020-11-18 10:42:21 -06005671 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005672 Specifies a list of architectures compatible with the target machine.
5673 This variable is set automatically and should not normally be
5674 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005675 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005676 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5677
Andrew Geisslerf0343792020-11-18 10:42:21 -06005678 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005679 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005680 that those added packages can pick up files that would normally be
5681 included in the default package.
5682
Andrew Geisslerf0343792020-11-18 10:42:21 -06005683 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005684 This variable, which is set in the ``local.conf`` configuration file
5685 found in the ``conf`` folder of the
5686 :term:`Build Directory`, specifies the package manager the
5687 OpenEmbedded build system uses when packaging data.
5688
5689 You can provide one or more of the following arguments for the
Andrew Geissler517393d2023-01-13 08:55:19 -06005690 variable::
5691
5692 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk package_tar"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005693
5694 .. note::
5695
Andrew Geissler517393d2023-01-13 08:55:19 -06005696 While it is a legal option, the :ref:`ref-classes-package_tar`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005697 class has limited functionality due to no support for package
5698 dependencies by that backend. Therefore, it is recommended that
5699 you do not use it.
5700
5701 The build system uses only the first argument in the list as the
5702 package manager when creating your image or SDK. However, packages
5703 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005704 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005705
5706 PACKAGE_CLASSES ?= "package_ipk"
5707
5708 The OpenEmbedded build system uses
5709 the IPK package manager to create your image or SDK.
5710
5711 For information on packaging and build performance effects as a
5712 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005713 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005714
Andrew Geisslerf0343792020-11-18 10:42:21 -06005715 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005716 Determines how to split up and package debug and source information
5717 when creating debugging packages to be used with the GNU Project
5718 Debugger (GDB). In general, based on the value of this variable,
5719 you can combine the source and debug info in a single package,
5720 you can break out the source into a separate package that can be
5721 installed independently, or you can choose to not have the source
5722 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005723
Patrick Williams93c203f2021-10-06 16:15:23 -05005724 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005725
Patrick Williams93c203f2021-10-06 16:15:23 -05005726 - "``.debug``": All debugging and source info is placed in a single
5727 ``*-dbg`` package; debug symbol files are placed next to the
5728 binary in a ``.debug`` directory so that, if a binary is installed
5729 into ``/bin``, the corresponding debug symbol file is installed
5730 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5731 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005732
Patrick Williams93c203f2021-10-06 16:15:23 -05005733 - "``debug-file-directory``": As above, all debugging and source info
5734 is placed in a single ``*-dbg`` package; debug symbol files are
5735 placed entirely under the directory ``/usr/lib/debug`` and separated
5736 by the path from where the binary is installed, so that if a binary
5737 is installed in ``/bin``, the corresponding debug symbols are installed
5738 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5739 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005740
Patrick Williams93c203f2021-10-06 16:15:23 -05005741 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5742 ``*-dbg`` package as with the ``.debug`` value, while source is
5743 placed in a separate ``*-src`` package, which can be installed
5744 independently. This is the default setting for this variable,
5745 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005746
Patrick Williams93c203f2021-10-06 16:15:23 -05005747 - "``debug-without-src``": The same behavior as with the ``.debug``
5748 setting, but no source is packaged at all.
5749
5750 .. note::
5751
5752 Much of the above package splitting can be overridden via
5753 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005754
5755 You can find out more about debugging using GDB by reading the
Andrew Geissler517393d2023-01-13 08:55:19 -06005756 ":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005757 in the Yocto Project Development Tasks Manual.
5758
Andrew Geisslerf0343792020-11-18 10:42:21 -06005759 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005760 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005761 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005762
5763 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5764
5765 You can set this variable globally in your ``local.conf`` file or you
5766 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005767 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005768
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005769 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005770
5771 If you choose to not install a package using this variable and some
5772 other package is dependent on it (i.e. listed in a recipe's
5773 :term:`RDEPENDS` variable), the OpenEmbedded build
5774 system generates a fatal installation error. Because the build system
5775 halts the process with a fatal error, you can use the variable with
5776 an iterative development process to remove specific components from a
5777 system.
5778
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005779 This variable is supported only when using the IPK and RPM
5780 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005781
5782 See the :term:`NO_RECOMMENDATIONS` and the
5783 :term:`BAD_RECOMMENDATIONS` variables for
5784 related information.
5785
Andrew Geissler9aee5002022-03-30 16:27:02 +00005786 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5787 Prevents specific packages from being installed when you are
5788 installing complementary packages.
5789
5790 You might find that you want to prevent installing certain packages
5791 when you are installing complementary packages. For example, if you
5792 are using :term:`IMAGE_FEATURES` to install
5793 ``dev-pkgs``, you might not want to install all packages from a
5794 particular multilib. If you find yourself in this situation, you can
5795 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5796 expressions to match the packages you want to exclude.
5797
Andrew Geisslerf0343792020-11-18 10:42:21 -06005798 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005799 Specifies the list of architectures compatible with the device CPU.
5800 This variable is useful when you build for several different devices
5801 that use miscellaneous processors such as XScale and ARM926-EJS.
5802
Andrew Geisslerf0343792020-11-18 10:42:21 -06005803 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005804 Optionally specifies the package architectures used as part of the
5805 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005806 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005807 URI, which is constructed using the
5808 :term:`PACKAGE_FEED_URIS` and
5809 :term:`PACKAGE_FEED_BASE_PATHS`
5810 variables.
5811
5812 .. note::
5813
Andrew Geissler09036742021-06-25 14:25:14 -05005814 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005815 variable to allow specific package architectures. If you do
5816 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005817 case, you can omit this variable. Omitting the variable results in
5818 all available architectures for the current machine being included
5819 into remote package feeds.
5820
Andrew Geissler09036742021-06-25 14:25:14 -05005821 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5822 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005823 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005824
5825 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5826 https://example.com/packagerepos/updates"
5827 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5828 PACKAGE_FEED_ARCHS = "all core2-64"
5829
5830 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005831
5832 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005833
5834 https://example.com/packagerepos/release/rpm/all
5835 https://example.com/packagerepos/release/rpm/core2-64
5836 https://example.com/packagerepos/release/rpm-dev/all
5837 https://example.com/packagerepos/release/rpm-dev/core2-64
5838 https://example.com/packagerepos/updates/rpm/all
5839 https://example.com/packagerepos/updates/rpm/core2-64
5840 https://example.com/packagerepos/updates/rpm-dev/all
5841 https://example.com/packagerepos/updates/rpm-dev/core2-64
5842
Andrew Geisslerf0343792020-11-18 10:42:21 -06005843 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005844 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005845 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005846 package feed URI used by the OpenEmbedded build system. The base path
5847 lies between the :term:`PACKAGE_FEED_URIS`
5848 and :term:`PACKAGE_FEED_ARCHS` variables.
5849
Andrew Geissler09036742021-06-25 14:25:14 -05005850 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5851 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005852 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005853
5854 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5855 https://example.com/packagerepos/updates"
5856 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5857 PACKAGE_FEED_ARCHS = "all core2-64"
5858
5859 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005860
5861 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005862
5863 https://example.com/packagerepos/release/rpm/all
5864 https://example.com/packagerepos/release/rpm/core2-64
5865 https://example.com/packagerepos/release/rpm-dev/all
5866 https://example.com/packagerepos/release/rpm-dev/core2-64
5867 https://example.com/packagerepos/updates/rpm/all
5868 https://example.com/packagerepos/updates/rpm/core2-64
5869 https://example.com/packagerepos/updates/rpm-dev/all
5870 https://example.com/packagerepos/updates/rpm-dev/core2-64
5871
Andrew Geisslerf0343792020-11-18 10:42:21 -06005872 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005873 Specifies the front portion of the package feed URI used by the
5874 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005875 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005876 :term:`PACKAGE_FEED_BASE_PATHS`, and
5877 :term:`PACKAGE_FEED_ARCHS` variables.
5878
Andrew Geissler09036742021-06-25 14:25:14 -05005879 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5880 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005881 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005882
5883 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5884 https://example.com/packagerepos/updates"
5885 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5886 PACKAGE_FEED_ARCHS = "all core2-64"
5887
5888 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005889
5890 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005891
5892 https://example.com/packagerepos/release/rpm/all
5893 https://example.com/packagerepos/release/rpm/core2-64
5894 https://example.com/packagerepos/release/rpm-dev/all
5895 https://example.com/packagerepos/release/rpm-dev/core2-64
5896 https://example.com/packagerepos/updates/rpm/all
5897 https://example.com/packagerepos/updates/rpm/core2-64
5898 https://example.com/packagerepos/updates/rpm-dev/all
5899 https://example.com/packagerepos/updates/rpm-dev/core2-64
5900
Andrew Geisslerf0343792020-11-18 10:42:21 -06005901 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005902 The final list of packages passed to the package manager for
5903 installation into the image.
5904
5905 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005906 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005907 not the final list of packages that are actually installed. This
5908 variable is internal to the image construction code. Consequently, in
5909 general, you should use the
5910 :term:`IMAGE_INSTALL` variable to specify
5911 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005912 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Patrick Williams2194f502022-10-16 14:26:09 -05005913 image. When working with an initial RAM filesystem (:term:`Initramfs`) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005914 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler517393d2023-01-13 08:55:19 -06005915 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005916 in the Yocto Project Development Tasks Manual.
5917
Andrew Geisslerf0343792020-11-18 10:42:21 -06005918 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005919 Specifies a list of packages the OpenEmbedded build system attempts
5920 to install when creating an image. If a listed package fails to
5921 install, the build system does not generate an error. This variable
5922 is generally not user-defined.
5923
Andrew Geisslerf0343792020-11-18 10:42:21 -06005924 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005925 Specifies a list of functions run to pre-process the
5926 :term:`PKGD` directory prior to splitting the files out
5927 to individual packages.
5928
Andrew Geisslerf0343792020-11-18 10:42:21 -06005929 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005930 Specifies a list of dependencies for post-installation and
5931 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005932 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005933 creation time rather than on the target but depends on a native tool
5934 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005935 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005936
5937 For information on running post-installation scripts, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06005938 ":ref:`dev-manual/new-recipe:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005939 section in the Yocto Project Development Tasks Manual.
5940
Andrew Geisslerf0343792020-11-18 10:42:21 -06005941 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005942 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005943 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005944 recipes when you specify features and then arguments that define
5945 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005946 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005947
5948 PACKAGECONFIG ??= "f1 f2 f3 ..."
5949 PACKAGECONFIG[f1] = "\
5950 --with-f1, \
5951 --without-f1, \
5952 build-deps-for-f1, \
5953 runtime-deps-for-f1, \
5954 runtime-recommends-for-f1, \
5955 packageconfig-conflicts-for-f1"
5956 PACKAGECONFIG[f2] = "\
5957 ... and so on and so on ...
5958
Andrew Geissler5f350902021-07-23 13:09:54 -04005959 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005960 list of the features to enable. Following the features, you can
5961 determine the behavior of each feature by providing up to six
5962 order-dependent arguments, which are separated by commas. You can
5963 omit any argument you like but must retain the separating commas. The
5964 order is important and specifies the following:
5965
Andrew Geissler517393d2023-01-13 08:55:19 -06005966 #. Extra arguments that should be added to the configure script
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005967 argument list (:term:`EXTRA_OECONF` or
5968 :term:`PACKAGECONFIG_CONFARGS`) if
5969 the feature is enabled.
5970
Andrew Geissler517393d2023-01-13 08:55:19 -06005971 #. Extra arguments that should be added to :term:`EXTRA_OECONF` or
Andrew Geissler09036742021-06-25 14:25:14 -05005972 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005973
Andrew Geissler517393d2023-01-13 08:55:19 -06005974 #. Additional build dependencies (:term:`DEPENDS`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005975 that should be added if the feature is enabled.
5976
Andrew Geissler517393d2023-01-13 08:55:19 -06005977 #. Additional runtime dependencies (:term:`RDEPENDS`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005978 that should be added if the feature is enabled.
5979
Andrew Geissler517393d2023-01-13 08:55:19 -06005980 #. Additional runtime recommendations
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005981 (:term:`RRECOMMENDS`) that should be added if
5982 the feature is enabled.
5983
Andrew Geissler517393d2023-01-13 08:55:19 -06005984 #. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005985 settings for this feature.
5986
Andrew Geissler09036742021-06-25 14:25:14 -05005987 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005988 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
Andrew Geissler517393d2023-01-13 08:55:19 -06005989 three arguments that determine the feature's behavior::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005990
5991 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5992
5993 The
5994 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5995 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005996 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005997 other hand, if the feature is disabled say through a ``.bbappend``
5998 file in another layer, then the second argument ``--without-gtk3`` is
5999 added to the configure script instead.
6000
Andrew Geissler09036742021-06-25 14:25:14 -05006001 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006002 regardless of whether you are creating a block or changing a block.
6003 When creating a block, use the structure inside your recipe.
6004
Andrew Geissler09036742021-06-25 14:25:14 -05006005 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006006 so one of two ways:
6007
6008 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05006009 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05006010 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006011 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006012
6013 PACKAGECONFIG = "f4 f5"
6014
Andrew Geisslerc926e172021-05-07 16:11:35 -05006015 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006016
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006017 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006018
6019 - *Configuration file:* This method is identical to changing the
6020 block through an append file except you edit your ``local.conf``
6021 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05006022 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006023
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006024 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006025
Andrew Geisslerc926e172021-05-07 16:11:35 -05006026 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006027
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006028 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006029
Andrew Geisslerf0343792020-11-18 10:42:21 -06006030 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006031 A space-separated list of configuration options generated from the
6032 :term:`PACKAGECONFIG` setting.
6033
Andrew Geissler517393d2023-01-13 08:55:19 -06006034 Classes such as :ref:`ref-classes-autotools` and :ref:`ref-classes-cmake`
6035 use :term:`PACKAGECONFIG_CONFARGS` to pass :term:`PACKAGECONFIG` options
6036 to ``configure`` and ``cmake``, respectively. If you are using
6037 :term:`PACKAGECONFIG` but not a class that handles the
6038 :ref:`ref-tasks-configure` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05006039 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006040
Andrew Geisslerf0343792020-11-18 10:42:21 -06006041 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geissler517393d2023-01-13 08:55:19 -06006042 For recipes inheriting the :ref:`ref-classes-packagegroup` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05006043 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006044 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
6045 should not be automatically created by the ``packagegroup`` recipe,
6046 which is the default behavior.
6047
Andrew Geisslerf0343792020-11-18 10:42:21 -06006048 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006049 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006050 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006051
Andrew Geissler5199d832021-09-24 16:47:35 -05006052 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006053
6054 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05006055 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006056 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05006057 package. If a file matches the :term:`FILES` variable for more than one
6058 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006059 (leftmost) package.
6060
6061 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006062 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006063 :ref:`ref-tasks-install` task) are not generated,
6064 unless generation is forced through the
6065 :term:`ALLOW_EMPTY` variable.
6066
Andrew Geisslerf0343792020-11-18 10:42:21 -06006067 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006068 A promise that your recipe satisfies runtime dependencies for
6069 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05006070 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006071 only states that they should be satisfied. For example, if a hard,
6072 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05006073 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006074 variable, but a package with the module name is never actually
6075 produced, then the other package will be broken. Thus, if you attempt
6076 to include that package in an image, you will get a dependency
6077 failure from the packaging system during the
6078 :ref:`ref-tasks-rootfs` task.
6079
6080 Typically, if there is a chance that such a situation can occur and
6081 the package that is not created is valid without the dependency being
6082 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05006083 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006084
Andrew Geissler09036742021-06-25 14:25:14 -05006085 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006086 you are splitting packages, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006087 ":ref:`dev-manual/packages:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006088 section in the Yocto Project Development Tasks Manual.
6089
Andrew Geisslerf0343792020-11-18 10:42:21 -06006090 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006091 Specifies a list of functions run to perform additional splitting of
6092 files into individual packages. Recipes can either prepend to this
6093 variable or prepend to the ``populate_packages`` function in order to
6094 perform additional package splitting. In either case, the function
6095 should set :term:`PACKAGES`,
6096 :term:`FILES`, :term:`RDEPENDS` and
6097 other packaging variables appropriately in order to perform the
6098 desired splitting.
6099
Andrew Geisslerf0343792020-11-18 10:42:21 -06006100 :term:`PARALLEL_MAKE`
Patrick Williams7784c422022-11-17 07:29:11 -06006101
6102 Extra options passed to the build tool command (``make``,
6103 ``ninja`` or more specific build engines, like the Go language one)
6104 during the :ref:`ref-tasks-compile` task, to specify parallel compilation
6105 on the local build host. This variable is usually in the form "-j x",
6106 where x represents the maximum number of parallel threads such engines
6107 can run.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006108
6109 .. note::
6110
Patrick Williams7784c422022-11-17 07:29:11 -06006111 For software compiled by ``make``, in order for :term:`PARALLEL_MAKE`
6112 to be effective, ``make`` must be called with
6113 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
6114 way to ensure this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006115
6116 By default, the OpenEmbedded build system automatically sets this
6117 variable to be equal to the number of cores the build system uses.
6118
6119 .. note::
6120
6121 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05006122 the :ref:`ref-tasks-compile` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05006123 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006124 information on addressing race conditions, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006125 ":ref:`dev-manual/debugging:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006126 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006127
6128 For single socket systems (i.e. one CPU), you should not have to
6129 override this variable to gain optimal parallelism during builds.
6130 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05006131 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006132 not set higher than "-j 20".
6133
6134 For more information on speeding up builds, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006135 ":ref:`dev-manual/speeding-up-build:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006136 section in the Yocto Project Development Tasks Manual.
6137
Andrew Geisslerf0343792020-11-18 10:42:21 -06006138 :term:`PARALLEL_MAKEINST`
Patrick Williams7784c422022-11-17 07:29:11 -06006139 Extra options passed to the build tool install command
6140 (``make install``, ``ninja install`` or more specific ones)
6141 during the :ref:`ref-tasks-install` task in order to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006142 parallel installation. This variable defaults to the value of
6143 :term:`PARALLEL_MAKE`.
6144
6145 .. note::
6146
Patrick Williams7784c422022-11-17 07:29:11 -06006147 For software compiled by ``make``, in order for :term:`PARALLEL_MAKEINST`
6148 to be effective, ``make`` must be called with
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006149 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
6150 way to ensure this is to use the ``oe_runmake`` function.
6151
6152 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05006153 the :ref:`ref-tasks-install` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05006154 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006155 workaround. For information on addressing race conditions, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006156 ":ref:`dev-manual/debugging:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006157 section in the Yocto Project Development Tasks Manual.
6158
Andrew Geisslerf0343792020-11-18 10:42:21 -06006159 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006160 Determines the action to take when a patch fails. You can set this
6161 variable to one of two values: "noop" and "user".
6162
6163 The default value of "noop" causes the build to simply fail when the
6164 OpenEmbedded build system cannot successfully apply a patch. Setting
6165 the value to "user" causes the build system to launch a shell and
6166 places you in the right location so that you can manually resolve the
6167 conflicts.
6168
6169 Set this variable in your ``local.conf`` file.
6170
Andrew Geisslerf0343792020-11-18 10:42:21 -06006171 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006172 Specifies the utility used to apply patches for a recipe during the
6173 :ref:`ref-tasks-patch` task. You can specify one of
6174 three utilities: "patch", "quilt", or "git". The default utility used
6175 is "quilt" except for the quilt-native recipe itself. Because the
6176 quilt tool is not available at the time quilt-native is being
6177 patched, it uses "patch".
6178
6179 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006180 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006181
6182 PATCHTOOL = "patch"
6183 PATCHTOOL = "quilt"
6184 PATCHTOOL = "git"
6185
Andrew Geisslerf0343792020-11-18 10:42:21 -06006186 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006187 The epoch of the recipe. By default, this variable is unset. The
6188 variable is used to make upgrades possible when the versioning scheme
6189 changes in some backwards incompatible way.
6190
Andrew Geissler09036742021-06-25 14:25:14 -05006191 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006192
Andrew Geissler9aee5002022-03-30 16:27:02 +00006193 :term:`PEP517_WHEEL_PATH`
Andrew Geissler517393d2023-01-13 08:55:19 -06006194 When used by recipes that inherit the :ref:`ref-classes-python_pep517`
6195 class, denotes the path to ``dist/`` (short for distribution) where the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006196 binary archive ``wheel`` is built.
6197
Andrew Geissler517393d2023-01-13 08:55:19 -06006198 :term:`PERSISTENT_DIR`
6199 See :term:`bitbake:PERSISTENT_DIR` in the BitBake manual.
6200
Andrew Geisslerf0343792020-11-18 10:42:21 -06006201 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006202 Specifies the recipe or package name and includes all version and
6203 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
6204 ``bash-4.2-r1/``). This variable is comprised of the following:
6205 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
6206
Andrew Geisslerf0343792020-11-18 10:42:21 -06006207 :term:`PIXBUF_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06006208 When inheriting the :ref:`ref-classes-pixbufcache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006209 class, this variable identifies packages that contain the pixbuf
Andrew Geissler517393d2023-01-13 08:55:19 -06006210 loaders used with ``gdk-pixbuf``. By default, the
6211 :ref:`ref-classes-pixbufcache` class assumes that
6212 the loaders are in the recipe's main package (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006213 ``${``\ :term:`PN`\ ``}``). Use this variable if the
6214 loaders you need are in a package other than that main package.
6215
Andrew Geisslerf0343792020-11-18 10:42:21 -06006216 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006217 The name of the resulting package created by the OpenEmbedded build
6218 system.
6219
6220 .. note::
6221
Andrew Geissler09036742021-06-25 14:25:14 -05006222 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006223
Andrew Geissler517393d2023-01-13 08:55:19 -06006224 For example, when the :ref:`ref-classes-debian` class renames the output
6225 package, it does so by setting ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006226
Andrew Geisslerf0343792020-11-18 10:42:21 -06006227 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006228 The path to ``pkg-config`` files for the current build context.
6229 ``pkg-config`` reads this variable from the environment.
6230
Andrew Geisslerf0343792020-11-18 10:42:21 -06006231 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006232 Points to the destination directory for files to be packaged before
6233 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006234 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006235
6236 ${WORKDIR}/package
6237
6238 Do not change this default.
6239
Andrew Geisslerf0343792020-11-18 10:42:21 -06006240 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006241 Points to a shared, global-state directory that holds data generated
6242 during the packaging process. During the packaging process, the
6243 :ref:`ref-tasks-packagedata` task packages data
6244 for each recipe and installs it into this temporary, shared area.
6245 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006246 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006247
6248 ${STAGING_DIR_HOST}/pkgdata
6249
6250 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006251 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006252 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler517393d2023-01-13 08:55:19 -06006253 ":ref:`dev-manual/debugging:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006254 section in the Yocto Project Development Tasks Manual. For more
6255 information on the shared, global-state directory, see
6256 :term:`STAGING_DIR_HOST`.
6257
Andrew Geisslerf0343792020-11-18 10:42:21 -06006258 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006259 Points to the parent directory for files to be packaged after they
6260 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006261 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006262
6263 ${WORKDIR}/packages-split
6264
6265 Under this directory, the build system creates directories for each
6266 package specified in :term:`PACKAGES`. Do not change
6267 this default.
6268
Andrew Geisslerf0343792020-11-18 10:42:21 -06006269 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006270 Points to a temporary work area where the
6271 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05006272 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006273
6274 ${WORKDIR}/pkgdata
6275
6276 Do not change this default.
6277
6278 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05006279 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006280 :term:`PKGDATA_DIR` to make it available globally.
6281
Andrew Geisslerf0343792020-11-18 10:42:21 -06006282 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05006283 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006284 is set to :term:`PE`.
6285
Andrew Geisslerf0343792020-11-18 10:42:21 -06006286 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006287 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05006288 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006289
Andrew Geisslerf0343792020-11-18 10:42:21 -06006290 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006291 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05006292 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006293
Andrew Geisslerf0343792020-11-18 10:42:21 -06006294 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006295 This variable can have two separate functions depending on the
6296 context: a recipe name or a resulting package name.
6297
Andrew Geissler09036742021-06-25 14:25:14 -05006298 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006299 OpenEmbedded build system as input to create a package. The name is
6300 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006301 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006302 will be "expat".
6303
6304 The variable refers to a package name in the context of a file
6305 created or produced by the OpenEmbedded build system.
6306
Andrew Geissler09036742021-06-25 14:25:14 -05006307 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006308 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04006309 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05006310 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006311 and ``lib64-bash``, respectively.
6312
Andrew Geisslerf0343792020-11-18 10:42:21 -06006313 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006314 Specifies a list of functions to call once the OpenEmbedded build
6315 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05006316 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006317
6318 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
6319
6320 If you need to pass the SDK path to a command within a function, you
6321 can use ``${SDK_DIR}``, which points to the parent directory used by
6322 the OpenEmbedded build system when creating SDK output. See the
6323 :term:`SDK_DIR` variable for more information.
6324
Andrew Geisslerf0343792020-11-18 10:42:21 -06006325 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006326 Specifies a list of functions to call once the OpenEmbedded build
6327 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05006328 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006329
6330 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
6331
6332 If you need to pass the SDK path to a command within a function, you
6333 can use ``${SDK_DIR}``, which points to the parent directory used by
6334 the OpenEmbedded build system when creating SDK output. See the
6335 :term:`SDK_DIR` variable for more information.
6336
Andrew Geisslerf0343792020-11-18 10:42:21 -06006337 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006338 The revision of the recipe. The default value for this variable is
6339 "r0". Subsequent revisions of the recipe conventionally have the
6340 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05006341 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006342
6343 .. note::
6344
Andrew Geissler09036742021-06-25 14:25:14 -05006345 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006346 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06006347 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006348 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06006349 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006350 mechanisms.
6351
Andrew Geissler09036742021-06-25 14:25:14 -05006352 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006353 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05006354 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006355 :term:`PKGR`, helps the package manager distinguish which
6356 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05006357 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
6358 the same :term:`PV` usually means that the packages all install the same
6359 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006360 packaging fixes.
6361
6362 .. note::
6363
Andrew Geissler09036742021-06-25 14:25:14 -05006364 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006365 package contents or metadata.
6366
Andrew Geissler5f350902021-07-23 13:09:54 -04006367 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006368 an automated solution exists. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06006369 ":ref:`dev-manual/packages:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006370 in the Yocto Project Development Tasks Manual for more information.
6371
Andrew Geisslerf0343792020-11-18 10:42:21 -06006372 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006373 If multiple recipes provide the same item, this variable determines
6374 which recipe is preferred and thus provides the item (i.e. the
6375 preferred provider). You should always suffix this variable with the
6376 name of the provided item. And, you should define the variable using
6377 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05006378 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006379
6380 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
6381
6382 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05006383 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006384 the recipe you prefer to provide "virtual/kernel".
6385
Andrew Geisslerc926e172021-05-07 16:11:35 -05006386 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006387
6388 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
6389 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
6390
6391 For more
Andrew Geissler517393d2023-01-13 08:55:19 -06006392 information, see the ":ref:`dev-manual/new-recipe:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006393 section in the Yocto Project Development Tasks Manual.
6394
6395 .. note::
6396
Andrew Geissler09036742021-06-25 14:25:14 -05006397 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006398 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05006399 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006400 desirable since this mechanism is designed to select between mutually
6401 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006402
Andrew Geissler517393d2023-01-13 08:55:19 -06006403 :term:`PREFERRED_PROVIDERS`
6404 See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual.
6405
Andrew Geisslerf0343792020-11-18 10:42:21 -06006406 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006407 If there are multiple versions of a recipe available, this variable
6408 determines which version should be given preference. You must always
6409 suffix the variable with the :term:`PN` you want to select (`python` in
6410 the first example below), and you should specify the :term:`PV`
6411 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006412
Andrew Geissler09036742021-06-25 14:25:14 -05006413 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006414 through the "``%``" character. You can use the character to match any
6415 number of characters, which can be useful when specifying versions
6416 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05006417 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006418
6419 PREFERRED_VERSION_python = "3.4.0"
6420 PREFERRED_VERSION_linux-yocto = "5.0%"
6421
6422 .. note::
6423
6424 The use of the "%" character is limited in that it only works at the end of the
6425 string. You cannot use the wildcard character in any other
6426 location of the string.
6427
6428 The specified version is matched against :term:`PV`, which
6429 does not necessarily match the version part of the recipe's filename.
6430 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05006431 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006432
6433 PV = "1.1+git${SRCPV}"
6434
6435 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05006436 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006437
6438 PREFERRED_VERSION_foo = "1.1+git%"
6439
6440 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05006441 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006442
6443 PREFERRED_VERSION_foo = "git"
6444
Andrew Geissler09036742021-06-25 14:25:14 -05006445 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006446 configuration files in a way that is hard to change. You can use
6447 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05006448 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006449
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006450 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006451
6452 Although not recommended, worst case, you can also use the
6453 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006454 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006455
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006456 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006457
6458 .. note::
6459
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006460 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05006461 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006462
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006463 If a recipe with the specified version is not available, a warning
6464 message will be shown. See :term:`REQUIRED_VERSION` if you want this
6465 to be an error instead.
6466
Andrew Geisslerf0343792020-11-18 10:42:21 -06006467 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006468 Specifies additional paths from which the OpenEmbedded build system
6469 gets source code. When the build system searches for source code, it
6470 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05006471 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006472 source, and then locations specified by
6473 :term:`MIRRORS` in that order.
6474
6475 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006476 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006477 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
6478
6479 Typically, you could add a specific server for the build system to
6480 attempt before any others by adding something like the following to
6481 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006482 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006483
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006484 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00006485 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6486 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6487 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6488 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006489
6490 These changes cause the
6491 build system to intercept Git, FTP, HTTP, and HTTPS requests and
6492 direct them to the ``http://`` sources mirror. You can use
6493 ``file://`` URLs to point to local directories or network shares as
6494 well.
6495
Andrew Geisslerf0343792020-11-18 10:42:21 -06006496 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006497 Indicates the importance of a package.
6498
Andrew Geissler09036742021-06-25 14:25:14 -05006499 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006500 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05006501 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006502 normally set within recipes.
6503
Andrew Geissler09036742021-06-25 14:25:14 -05006504 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006505 "optional", which is the default.
6506
Andrew Geisslerf0343792020-11-18 10:42:21 -06006507 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006508 Specifies libraries installed within a recipe that should be ignored
6509 by the OpenEmbedded build system's shared library resolver. This
6510 variable is typically used when software being built by a recipe has
6511 its own private versions of a library normally provided by another
6512 recipe. In this case, you would not want the package containing the
6513 private libraries to be set as a dependency on other unrelated
6514 packages that should instead depend on the package providing the
6515 standard version of the library.
6516
6517 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05006518 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006519
6520 PRIVATE_LIBS = "libmozjs.so \
6521 libxpcom.so \
6522 libnspr4.so \
6523 libxul.so \
6524 libmozalloc.so \
6525 libplc4.so \
6526 libplds4.so"
6527
6528 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006529 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006530 section in the Yocto Project Overview and Concepts Manual.
6531
Andrew Geisslerf0343792020-11-18 10:42:21 -06006532 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006533 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05006534 default, a recipe's own :term:`PN` is implicitly already in its
6535 :term:`PROVIDES` list and therefore does not need to mention that it
6536 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006537 aliases are synonyms for the recipe and can be useful for satisfying
6538 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006539 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006540
Andrew Geissler09036742021-06-25 14:25:14 -05006541 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05006542 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006543
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006544 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006545
Andrew Geissler09036742021-06-25 14:25:14 -05006546 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006547 results in the "eudev" recipe also being available as simply "udev".
6548
6549 .. note::
6550
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006551 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
Andrew Geissler517393d2023-01-13 08:55:19 -06006552 to :term:`PROVIDES`, so while using "+=" in the above example may not be
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006553 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006554
6555 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05006556 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006557 virtual target is a name that corresponds to some particular
6558 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05006559 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006560 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05006561 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006562
6563 Conventionally, virtual targets have names on the form
6564 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6565 of the name and has no syntactical significance.
6566
6567 The :term:`PREFERRED_PROVIDER` variable is
6568 used to select which particular recipe provides a virtual target.
6569
6570 .. note::
6571
6572 A corresponding mechanism for virtual runtime dependencies
6573 (packages) exists. However, the mechanism does not depend on any
6574 special functionality beyond ordinary variable assignments. For
6575 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6576 the component that manages the ``/dev`` directory.
6577
6578 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006579 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006580
6581 VIRTUAL-RUNTIME_dev_manager = "udev"
6582
6583
Andrew Geisslerf0343792020-11-18 10:42:21 -06006584 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006585 The network based :term:`PR` service host and port.
6586
Andrew Geissler87f5cff2022-09-30 13:13:31 -05006587 The ``conf/templates/default/local.conf.sample.extended`` configuration
6588 file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST`
6589 variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006590
6591 PRSERV_HOST = "localhost:0"
6592
6593 You must
6594 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler517393d2023-01-13 08:55:19 -06006595 service <dev-manual/packages:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006596 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006597
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006598
6599 :term:`PSEUDO_IGNORE_PATHS`
6600 A comma-separated (without spaces) list of path prefixes that should be ignored
6601 by pseudo when monitoring and recording file operations, in order to avoid
6602 problems with files being written to outside of the pseudo context and
6603 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6604 and can include partial directory (or file) names.
6605
6606
Andrew Geisslerf0343792020-11-18 10:42:21 -06006607 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006608 Specifies whether or not :ref:`Package
Andrew Geissler517393d2023-01-13 08:55:19 -06006609 Test <dev-manual/packages:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006610 functionality is enabled when building a recipe. You should not set
6611 this variable directly. Enabling and disabling building Package Tests
6612 at build time should be done by adding "ptest" to (or removing it
6613 from) :term:`DISTRO_FEATURES`.
6614
Andrew Geisslerf0343792020-11-18 10:42:21 -06006615 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006616 The version of the recipe. The version is normally extracted from the
6617 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006618 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6619 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006620 building an unstable (i.e. development) version from a source code
6621 repository (e.g. Git or Subversion).
6622
Andrew Geissler09036742021-06-25 14:25:14 -05006623 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006624
Patrick Williams975a06f2022-10-21 14:42:47 -05006625 :term:`PYPI_PACKAGE`
Andrew Geissler517393d2023-01-13 08:55:19 -06006626 When inheriting the :ref:`ref-classes-pypi` class, specifies the
Patrick Williams975a06f2022-10-21 14:42:47 -05006627 `PyPI <https://pypi.org/>`__ package name to be built. The default value
6628 is set based upon :term:`BPN` (stripping any "python-" or "python3-"
6629 prefix off if present), however for some packages it will need to be set
6630 explicitly if that will not match the package name (e.g. where the
6631 package name has a prefix, underscores, uppercase letters etc.)
6632
Andrew Geisslerf0343792020-11-18 10:42:21 -06006633 :term:`PYTHON_ABI`
Andrew Geissler517393d2023-01-13 08:55:19 -06006634 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
6635 class, denotes the Application Binary Interface (ABI) currently in use
6636 for Python. By default, the ABI is "m". You do not have to set this
6637 variable as the OpenEmbedded build system sets it for you.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006638
6639 The OpenEmbedded build system uses the ABI to construct directory
6640 names used when installing the Python headers and libraries in
6641 sysroot (e.g. ``.../python3.3m/...``).
6642
Andrew Geisslerf0343792020-11-18 10:42:21 -06006643 :term:`PYTHON_PN`
Andrew Geissler517393d2023-01-13 08:55:19 -06006644 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
6645 class, specifies the major Python version being built. For Python 3.x,
6646 :term:`PYTHON_PN` would be "python3". You do not have to set this
6647 variable as the OpenEmbedded build system automatically sets it for you.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006648
6649 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006650 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006651
6652 DEPENDS += "${PYTHON_PN}-native"
6653
6654 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006655 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006656
Patrick Williams03907ee2022-05-01 06:28:52 -05006657 :term:`QA_EMPTY_DIRS`
6658 Specifies a list of directories that are expected to be empty when
6659 packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or
6660 :term:`WARN_QA` these will be checked and an error or warning
6661 (respectively) will be produced.
6662
6663 The default :term:`QA_EMPTY_DIRS` value is set in
6664 :ref:`insane.bbclass <ref-classes-insane>`.
6665
6666 :term:`QA_EMPTY_DIRS_RECOMMENDATION`
6667 Specifies a recommendation for why a directory must be empty,
6668 which will be included in the error message if a specific directory
6669 is found to contain files. Must be overridden with the directory
6670 path to match on.
6671
6672 If no recommendation is specified for a directory, then the default
6673 "but it is expected to be empty" will be used.
6674
6675 An example message shows if files were present in '/dev'::
6676
6677 QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime"
6678
Andrew Geisslerf0343792020-11-18 10:42:21 -06006679 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006680 The minimal command and arguments to run ``ranlib``.
6681
Andrew Geisslerf0343792020-11-18 10:42:21 -06006682 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006683 The list of packages that conflict with packages. Note that packages
6684 will not be installed if conflicting packages are not first removed.
6685
6686 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006687 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006688
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006689 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006690
6691 BitBake, which the OpenEmbedded build system uses, supports
6692 specifying versioned dependencies. Although the syntax varies
6693 depending on the packaging format, BitBake hides these differences
6694 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006695 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006696
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006697 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006698
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006699 For ``operator``, you can specify the following:
6700
6701 - =
6702 - <
6703 - >
6704 - <=
6705 - >=
6706
6707 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006708 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006709
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006710 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006711
Andrew Geisslerf0343792020-11-18 10:42:21 -06006712 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006713 Lists runtime dependencies of a package. These dependencies are other
6714 packages that must be installed in order for the package to function
6715 correctly. As an example, the following assignment declares that the
6716 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006717 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006718
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006719 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006720
6721 The most common types of package
6722 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006723 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006724 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006725 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006726 section in the Yocto Project Overview and Concepts Manual.
6727
Andrew Geissler09036742021-06-25 14:25:14 -05006728 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006729 ``bar`` and ``baz`` will be declared as dependencies inside the
6730 package ``foo`` when it is written out by one of the
Patrick Williams2194f502022-10-16 14:26:09 -05006731 :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006732 Exactly how this is done depends on which package format is used,
6733 which is determined by
6734 :term:`PACKAGE_CLASSES`. When the
6735 corresponding package manager installs the package, it will know to
6736 also install the packages on which it depends.
6737
6738 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006739 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006740 added. This dependency is from the recipe's
6741 :ref:`ref-tasks-build` (not to be confused with
6742 :ref:`ref-tasks-compile`) task to the
Patrick Williams2194f502022-10-16 14:26:09 -05006743 :ref:`do_package_write_* <ref-tasks-package_write_deb>` task of the recipes that build ``bar`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006744 ``baz``.
6745
Andrew Geissler09036742021-06-25 14:25:14 -05006746 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geissler615f2f12022-07-15 14:00:58 -05006747 names of other packages --- they cannot be recipe names. Although
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006748 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006749 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006750 variable. For an example of the default list of packages created from
6751 a recipe, see the :term:`PACKAGES` variable.
6752
Andrew Geissler09036742021-06-25 14:25:14 -05006753 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006754 you should always use the variable in a form with an attached package
6755 name (remember that a single recipe can build multiple packages). For
6756 example, suppose you are building a development package that depends
6757 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006758 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006759
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006760 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006761
6762 In the example,
6763 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006764 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006765 the variable.
6766
6767 .. note::
6768
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006769 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006770 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006771 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006772 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006773 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006774
Andrew Geissler09036742021-06-25 14:25:14 -05006775 The package names you use with :term:`RDEPENDS` must appear as they would
6776 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006777 allows a different name to be used for the final package (e.g. the
Andrew Geissler517393d2023-01-13 08:55:19 -06006778 :ref:`ref-classes-debian` class uses this to rename
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006779 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006780 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006781 independent of the package format used.
6782
6783 BitBake, which the OpenEmbedded build system uses, supports
6784 specifying versioned dependencies. Although the syntax varies
6785 depending on the packaging format, BitBake hides these differences
6786 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006787 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006788
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006789 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006790
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006791 For ``operator``, you can specify the following:
6792
6793 - =
6794 - <
6795 - >
6796 - <=
6797 - >=
6798
6799 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006800
6801 .. note::
6802
Andrew Geissler09036742021-06-25 14:25:14 -05006803 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006804 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006805
6806 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006807 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006808
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006809 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006810
6811 For information on build-time dependencies, see the
6812 :term:`DEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05006813 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6814 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006815 BitBake User Manual for additional information on tasks and
6816 dependencies.
6817
Andrew Geissler5199d832021-09-24 16:47:35 -05006818 :term:`RECIPE_NO_UPDATE_REASON`
6819 If a recipe should not be replaced by a more recent upstream version,
6820 putting the reason why in this variable in a recipe allows
6821 ``devtool check-upgrade-status`` command to display it, as explained
6822 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6823 section.
6824
Andrew Geissler517393d2023-01-13 08:55:19 -06006825 :term:`REPODIR`
6826 See :term:`bitbake:REPODIR` in the BitBake manual.
6827
Andrew Geisslerf0343792020-11-18 10:42:21 -06006828 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06006829 When inheriting the :ref:`ref-classes-features_check`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006830 class, this variable identifies distribution features that must exist
6831 in the current configuration in order for the OpenEmbedded build
6832 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006833 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6834 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006835 the recipe will be skipped, and if the build system attempts to build
6836 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006837
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006838 :term:`REQUIRED_VERSION`
6839 If there are multiple versions of a recipe available, this variable
6840 determines which version should be given preference.
6841 :term:`REQUIRED_VERSION` works in exactly the same manner as
6842 :term:`PREFERRED_VERSION`, except that if the specified version is not
6843 available then an error message is shown and the build fails
6844 immediately.
6845
6846 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6847 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6848
Andrew Geisslerf0343792020-11-18 10:42:21 -06006849 :term:`RM_WORK_EXCLUDE`
Andrew Geissler517393d2023-01-13 08:55:19 -06006850 With :ref:`ref-classes-rm-work` enabled, this variable
6851 specifies a list of recipes whose work directories should not be removed.
6852 See the ":ref:`ref-classes-rm-work`" section for more details.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006853
Andrew Geisslerf0343792020-11-18 10:42:21 -06006854 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006855 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006856 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006857
6858 ROOT_HOME ??= "/home/root"
6859
6860 .. note::
6861
6862 This default value is likely used because some embedded solutions
6863 prefer to have a read-only root filesystem and prefer to keep
6864 writeable data in one place.
6865
6866 You can override the default by setting the variable in any layer or
6867 in the ``local.conf`` file. Because the default is set using a "weak"
6868 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006869 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006870
6871 ROOT_HOME = "/root"
6872 ROOT_HOME ?= "/root"
6873
6874 These
6875 override examples use ``/root``, which is probably the most commonly
6876 used override.
6877
Andrew Geisslerf0343792020-11-18 10:42:21 -06006878 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006879 Indicates a filesystem image to include as the root filesystem.
6880
Andrew Geissler09036742021-06-25 14:25:14 -05006881 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geissler517393d2023-01-13 08:55:19 -06006882 :ref:`ref-classes-image-live` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006883
Andrew Geisslerf0343792020-11-18 10:42:21 -06006884 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006885 Specifies a list of functions to call after the OpenEmbedded build
6886 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006887 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006888
6889 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6890
6891 If you need to pass the root filesystem path to a command within a
6892 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6893 directory that becomes the root filesystem image. See the
6894 :term:`IMAGE_ROOTFS` variable for more
6895 information.
6896
Andrew Geisslerf0343792020-11-18 10:42:21 -06006897 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006898 Specifies a list of functions to call once the OpenEmbedded build
6899 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006900 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006901
6902 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6903
6904 If you need to pass the root filesystem path to a command within a
6905 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6906 directory that becomes the root filesystem image. See the
6907 :term:`IMAGE_ROOTFS` variable for more
6908 information.
6909
Andrew Geisslerf0343792020-11-18 10:42:21 -06006910 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006911 Specifies a list of functions to call after the OpenEmbedded build
6912 system has removed unnecessary packages. When runtime package
6913 management is disabled in the image, several packages are removed
6914 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006915 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006916
6917 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6918
6919 If you need to pass the root filesystem path to a command within a
6920 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6921 directory that becomes the root filesystem image. See the
6922 :term:`IMAGE_ROOTFS` variable for more
6923 information.
6924
Andrew Geisslerf0343792020-11-18 10:42:21 -06006925 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006926 Specifies a list of functions to call before the OpenEmbedded build
6927 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006928 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006929
6930 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6931
6932 If you need to pass the root filesystem path to a command within a
6933 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6934 directory that becomes the root filesystem image. See the
6935 :term:`IMAGE_ROOTFS` variable for more
6936 information.
6937
Andrew Geisslerf0343792020-11-18 10:42:21 -06006938 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006939 A list of package name aliases that a package also provides. These
6940 aliases are useful for satisfying runtime dependencies of other
6941 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006942 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006943
6944 .. note::
6945
Andrew Geissler09036742021-06-25 14:25:14 -05006946 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006947
6948 As with all package-controlling variables, you must always use the
6949 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006950 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006951
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006952 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006953
Andrew Geisslerf0343792020-11-18 10:42:21 -06006954 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006955 A list of packages that extends the usability of a package being
6956 built. The package being built does not depend on this list of
6957 packages in order to successfully build, but rather uses them for
6958 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006959 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006960
Andrew Geissler09036742021-06-25 14:25:14 -05006961 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006962 list of packages when installing the built package. However, you can
6963 prevent listed packages from being installed by using the
6964 :term:`BAD_RECOMMENDATIONS`,
6965 :term:`NO_RECOMMENDATIONS`, and
6966 :term:`PACKAGE_EXCLUDE` variables.
6967
Andrew Geissler09036742021-06-25 14:25:14 -05006968 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006969 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006970 through the :term:`PACKAGES` or
6971 :term:`PACKAGES_DYNAMIC` variables or the
6972 :term:`RPROVIDES` variable, or an error will occur
6973 during the build. If such a recipe does exist and the package is not
6974 produced, the build continues without error.
6975
Andrew Geissler09036742021-06-25 14:25:14 -05006976 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006977 you should always attach an override to the variable to specify the
6978 particular package whose usability is being extended. For example,
6979 suppose you are building a development package that is extended to
6980 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006981 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006982
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006983 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006984
6985 In the
6986 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006987 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006988 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006989
6990 BitBake, which the OpenEmbedded build system uses, supports
6991 specifying versioned recommends. Although the syntax varies depending
6992 on the packaging format, BitBake hides these differences from you.
6993 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006994 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006995
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006996 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006997
6998 For ``operator``, you can specify the following:
6999
7000 - =
7001 - <
7002 - >
7003 - <=
7004 - >=
7005
7006 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05007007 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007008
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007009 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007010
Andrew Geisslerf0343792020-11-18 10:42:21 -06007011 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007012 A list of packages replaced by a package. The package manager uses
7013 this variable to determine which package should be installed to
7014 replace other package(s) during an upgrade. In order to also have the
7015 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05007016 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007017
7018 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05007019 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007020
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007021 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007022
7023 BitBake, which the OpenEmbedded build system uses, supports
7024 specifying versioned replacements. Although the syntax varies
7025 depending on the packaging format, BitBake hides these differences
7026 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05007027 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007028
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007029 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007030
7031 For ``operator``, you can specify the following:
7032
7033 - =
7034 - <
7035 - >
7036 - <=
7037 - >=
7038
7039 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05007040 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007041
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007042 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007043
Andrew Geisslerf0343792020-11-18 10:42:21 -06007044 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007045 A list of additional packages that you can suggest for installation
7046 by the package manager at the time a package is installed. Not all
7047 package managers support this functionality.
7048
7049 As with all package-controlling variables, you must always use this
7050 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05007051 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007052
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007053 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007054
Andrew Geisslerf0343792020-11-18 10:42:21 -06007055 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007056 The location in the :term:`Build Directory` where
7057 unpacked recipe source code resides. By default, this directory is
7058 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
7059 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
7060 version. If the source tarball extracts the code to a directory named
7061 anything other than ``${BPN}-${PV}``, or if the source code is
7062 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05007063 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007064 to find the unpacked source.
7065
7066 As an example, assume a :term:`Source Directory`
Patrick Williams2390b1b2022-11-03 13:47:49 -05007067 top-level folder named ``poky`` and a default :term:`Build Directory` at
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007068 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05007069 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007070
7071 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
7072
7073 The unpacked source code resides in the ``db-5.1.19`` folder.
7074
7075 This next example assumes a Git repository. By default, Git
7076 repositories are cloned to ``${WORKDIR}/git`` during
7077 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05007078 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007079 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007080
Andrew Geissler9aee5002022-03-30 16:27:02 +00007081 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007082 S = "${WORKDIR}/git"
7083
Andrew Geisslerf0343792020-11-18 10:42:21 -06007084 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007085 Specifies a list of command-line utilities that should be checked for
7086 during the initial sanity checking process when running BitBake. If
7087 any of the utilities are not installed on the build host, then
7088 BitBake immediately exits with an error.
7089
Andrew Geisslerf0343792020-11-18 10:42:21 -06007090 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007091 A list of the host distribution identifiers that the build system has
7092 been tested against. Identifiers consist of the host distributor ID
7093 followed by the release, as reported by the ``lsb_release`` tool or
7094 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05007095 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007096 not empty and the current value of
7097 :term:`NATIVELSBSTRING` does not appear in the
7098 list, then the build system reports a warning that indicates the
7099 current host distribution has not been tested as a build host.
7100
Andrew Geisslerf0343792020-11-18 10:42:21 -06007101 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007102 The target architecture for the SDK. Typically, you do not directly
7103 set this variable. Instead, use :term:`SDKMACHINE`.
7104
Patrick Williams975a06f2022-10-21 14:42:47 -05007105 :term:`SDK_BUILDINFO_FILE`
Andrew Geissler517393d2023-01-13 08:55:19 -06007106 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05007107 specifies the file in the SDK to write the build information into. The
7108 default value is "``/buildinfo``".
7109
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007110 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05007111 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Patrick Williams2390b1b2022-11-03 13:47:49 -05007112 "1" and a ``conf/templateconf.cfg`` file exists in the :term:`Build Directory`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007113 (:term:`TOPDIR`) then this will be copied into the SDK.
7114
Andrew Geisslerf0343792020-11-18 10:42:21 -06007115 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007116 The directory set up and used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06007117 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which the
7118 SDK is deployed. The :ref:`populate_sdk_base <ref-classes-populate-sdk>`
7119 class defines :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007120
7121 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
7122
Andrew Geisslerf0343792020-11-18 10:42:21 -06007123 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007124 The parent directory used by the OpenEmbedded build system when
7125 creating SDK output. The
7126 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05007127 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007128
7129 SDK_DIR = "${WORKDIR}/sdk"
7130
7131 .. note::
7132
Andrew Geissler09036742021-06-25 14:25:14 -05007133 The :term:`SDK_DIR` directory is a temporary directory as it is part of
7134 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007135
Andrew Geisslerf0343792020-11-18 10:42:21 -06007136 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007137 Controls whether or not shared state artifacts are copied into the
7138 extensible SDK. The default value of "full" copies all of the
7139 required shared state artifacts into the extensible SDK. The value
7140 "minimal" leaves these artifacts out of the SDK.
7141
7142 .. note::
7143
7144 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007145 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
7146 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007147
Andrew Geisslerf0343792020-11-18 10:42:21 -06007148 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007149 The manifest file for the host part of the SDK. This file lists all
7150 the installed packages that make up the host part of the SDK. The
7151 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007152 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007153
7154 packagename packagearch version
7155
7156 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05007157 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007158
7159 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
7160
7161 The location is derived using the :term:`SDK_DEPLOY` and
7162 :term:`TOOLCHAIN_OUTPUTNAME` variables.
7163
Andrew Geisslerf0343792020-11-18 10:42:21 -06007164 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007165 When set to "1", specifies to include the packagedata for all recipes
7166 in the "world" target in the extensible SDK. Including this data
7167 allows the ``devtool search`` command to find these recipes in search
7168 results, as well as allows the ``devtool add`` command to map
7169 dependencies more effectively.
7170
7171 .. note::
7172
Andrew Geissler09036742021-06-25 14:25:14 -05007173 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007174 variable significantly increases build time because all of world
7175 needs to be built. Enabling the variable also slightly increases
7176 the size of the extensible SDK.
7177
Andrew Geisslerf0343792020-11-18 10:42:21 -06007178 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007179 When set to "1", specifies to include the toolchain in the extensible
7180 SDK. Including the toolchain is useful particularly when
7181 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
7182 the SDK reasonably small but you still want to provide a usable
7183 toolchain. For example, suppose you want to use the toolchain from an
7184 IDE or from other tools and you do not want to perform additional
7185 steps to install the toolchain.
7186
Andrew Geissler09036742021-06-25 14:25:14 -05007187 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
7188 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
7189 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007190
Andrew Geisslerf0343792020-11-18 10:42:21 -06007191 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007192 The base name for SDK output files. The name is derived from the
7193 :term:`DISTRO`, :term:`TCLIBC`,
7194 :term:`SDK_ARCH`,
7195 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05007196 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007197
7198 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
7199
Andrew Geisslerf0343792020-11-18 10:42:21 -06007200 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007201 Specifies the operating system for which the SDK will be built. The
7202 default value is the value of :term:`BUILD_OS`.
7203
Andrew Geisslerf0343792020-11-18 10:42:21 -06007204 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007205 The location used by the OpenEmbedded build system when creating SDK
7206 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05007207 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007208
7209 SDK_DIR = "${WORKDIR}/sdk"
7210 SDK_OUTPUT = "${SDK_DIR}/image"
7211 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
7212
7213 .. note::
7214
Andrew Geissler09036742021-06-25 14:25:14 -05007215 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007216 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
7217 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007218
Andrew Geisslerf0343792020-11-18 10:42:21 -06007219 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007220 Specifies a list of architectures compatible with the SDK machine.
7221 This variable is set automatically and should not normally be
7222 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05007223 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007224 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
7225
Andrew Geisslerf0343792020-11-18 10:42:21 -06007226 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007227 Specifies a list of functions to call once the OpenEmbedded build
7228 system creates the SDK. You can specify functions separated by
7229 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
7230
7231 If you need to pass an SDK path to a command within a function, you
7232 can use ``${SDK_DIR}``, which points to the parent directory used by
7233 the OpenEmbedded build system when creating SDK output. See the
7234 :term:`SDK_DIR` variable for more information.
7235
Andrew Geisslerf0343792020-11-18 10:42:21 -06007236 :term:`SDK_PREFIX`
Andrew Geissler517393d2023-01-13 08:55:19 -06007237 The toolchain binary prefix used for
7238 :ref:`ref-classes-nativesdk` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05007239 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007240 :term:`TARGET_PREFIX` when building
7241 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
7242
Andrew Geisslerf0343792020-11-18 10:42:21 -06007243 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007244 A list of shared state tasks added to the extensible SDK. By default,
7245 the following tasks are added:
7246
Patrick Williams2194f502022-10-16 14:26:09 -05007247 - :ref:`ref-tasks-populate_lic`
7248 - :ref:`ref-tasks-package_qa`
7249 - :ref:`ref-tasks-populate_sysroot`
7250 - :ref:`ref-tasks-deploy`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007251
7252 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05007253 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007254 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05007255 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007256 tasks that are needed in order to build
7257 :term:`SDK_TARGETS`).
7258
Andrew Geisslerf0343792020-11-18 10:42:21 -06007259 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007260 Specifies the system, including the architecture and the operating
7261 system, for which the SDK will be built.
7262
7263 The OpenEmbedded build system automatically sets this variable based
7264 on :term:`SDK_ARCH`,
7265 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05007266 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007267 variable yourself.
7268
Andrew Geisslerf0343792020-11-18 10:42:21 -06007269 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007270 The manifest file for the target part of the SDK. This file lists all
7271 the installed packages that make up the target part of the SDK. The
7272 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007273 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007274
7275 packagename packagearch version
7276
7277 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05007278 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007279
7280 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
7281
7282 The location is derived using the :term:`SDK_DEPLOY` and
7283 :term:`TOOLCHAIN_OUTPUTNAME` variables.
7284
Andrew Geisslerf0343792020-11-18 10:42:21 -06007285 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007286 A list of targets to install from shared state as part of the
7287 standard or extensible SDK installation. The default value is "${PN}"
7288 (i.e. the image from which the SDK is built).
7289
Andrew Geissler09036742021-06-25 14:25:14 -05007290 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007291 would not be changed.
7292
Andrew Geisslerf0343792020-11-18 10:42:21 -06007293 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007294 The title to be printed when running the SDK installer. By default,
7295 this title is based on the :term:`DISTRO_NAME` or
7296 :term:`DISTRO` variable and is set in the
7297 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007298 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007299
7300 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
7301
7302 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05007303 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007304
7305 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007306 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007307 section in the Yocto Project Application Development and the
7308 Extensible Software Development Kit (eSDK) manual.
7309
Patrick Williams975a06f2022-10-21 14:42:47 -05007310 :term:`SDK_TOOLCHAIN_LANGS`
7311 Specifies programming languages to support in the SDK, as a
7312 space-separated list. Currently supported items are ``rust`` and ``go``.
7313
Andrew Geisslerf0343792020-11-18 10:42:21 -06007314 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007315 An optional URL for an update server for the extensible SDK. If set,
7316 the value is used as the default update server when running
7317 ``devtool sdk-update`` within the extensible SDK.
7318
Andrew Geisslerf0343792020-11-18 10:42:21 -06007319 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007320 Specifies the name of the SDK vendor.
7321
Andrew Geisslerf0343792020-11-18 10:42:21 -06007322 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007323 Specifies the version of the SDK. The Poky distribution configuration file
7324 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05007325 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007326
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007327 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007328
7329 For additional information, see the
7330 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007331 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007332
Andrew Geisslerf0343792020-11-18 10:42:21 -06007333 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007334 The default installation directory for the Extensible SDK. By
7335 default, this directory is based on the :term:`DISTRO`
7336 variable and is set in the
7337 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007338 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007339
7340 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
7341
7342 For the
Andrew Geissler09036742021-06-25 14:25:14 -05007343 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007344
7345 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007346 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007347 section in the Yocto Project Application Development and the
7348 Extensible Software Development Kit (eSDK) manual.
7349
Andrew Geisslerf0343792020-11-18 10:42:21 -06007350 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05007351 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007352 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007353
7354 $ bitbake -c populate_sdk imagename
7355
Andrew Geisslerf0343792020-11-18 10:42:21 -06007356 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00007357 The machine for which the SDK is built. In other words, the SDK is built
7358 such that it runs on the target you specify with the :term:`SDKMACHINE`
7359 value. The value points to a corresponding ``.conf`` file under
7360 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
7361 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
7362 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007363
Andrew Geissler595f6302022-01-24 19:11:47 +00007364 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
7365 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007366
7367 .. note::
7368
Andrew Geissler09036742021-06-25 14:25:14 -05007369 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007370 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00007371 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007372
Andrew Geisslerf0343792020-11-18 10:42:21 -06007373 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007374 Defines the path offered to the user for installation of the SDK that
7375 is generated by the OpenEmbedded build system. The path appears as
7376 the default location for installing the SDK when you run the SDK's
7377 installation script. You can override the offered path when you run
7378 the script.
7379
Andrew Geisslerf0343792020-11-18 10:42:21 -06007380 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007381 The full path to the sysroot used for cross-compilation within an SDK
7382 as it will be when installed into the default
7383 :term:`SDKPATH`.
7384
Andrew Geisslerf0343792020-11-18 10:42:21 -06007385 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007386 The section in which packages should be categorized. Package
7387 management utilities can make use of this variable.
7388
Andrew Geisslerf0343792020-11-18 10:42:21 -06007389 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007390 Specifies the optimization flags passed to the C compiler when
7391 building for the target. The flags are passed through the default
7392 value of the :term:`TARGET_CFLAGS` variable.
7393
Andrew Geissler09036742021-06-25 14:25:14 -05007394 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007395 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
7396 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007397
Andrew Geisslerf0343792020-11-18 10:42:21 -06007398 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007399 Defines a serial console (TTY) to enable using
7400 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
7401 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05007402 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007403
7404 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
7405
Andrew Geisslerf0343792020-11-18 10:42:21 -06007406 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007407 Specifies serial consoles, which must be listed in
7408 :term:`SERIAL_CONSOLES`, to check against
7409 ``/proc/console`` before enabling them using getty. This variable
7410 allows aliasing in the format: <device>:<alias>. If a device was
7411 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05007412 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007413
7414 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
7415
7416 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05007417 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
7418 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
7419 incompatible with customizations such as the following::
7420
7421 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007422
Andrew Geissler595f6302022-01-24 19:11:47 +00007423 :term:`SETUPTOOLS_BUILD_ARGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06007424 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7425 class, this variable can be used to specify additional arguments to be
7426 passed to ``setup.py build`` in the ``setuptools3_do_compile()`` task.
Andrew Geissler595f6302022-01-24 19:11:47 +00007427
7428 :term:`SETUPTOOLS_INSTALL_ARGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06007429 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7430 class, this variable can be used to specify additional arguments to be
7431 passed to ``setup.py install`` in the ``setuptools3_do_install()`` task.
Andrew Geissler595f6302022-01-24 19:11:47 +00007432
7433 :term:`SETUPTOOLS_SETUP_PATH`
Andrew Geissler517393d2023-01-13 08:55:19 -06007434 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7435 class, this variable should be used to specify the directory in which
7436 the ``setup.py`` file is located if it is not at the root of the source
7437 tree (as specified by :term:`S`). For example, in a recipe where the
7438 sources are fetched from a Git repository and ``setup.py`` is in a
7439 ``python/pythonmodule`` subdirectory, you would have this::
Andrew Geissler595f6302022-01-24 19:11:47 +00007440
7441 S = "${WORKDIR}/git"
7442 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
7443
Andrew Geisslerf0343792020-11-18 10:42:21 -06007444 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007445 A list of recipe dependencies that should not be used to determine
7446 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007447 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007448
7449 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
7450
7451 In the previous example, ``intone`` depends on ``mplayer2``.
7452
7453 You can use the special token ``"*"`` on the left-hand side of the
7454 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05007455 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007456
7457 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
7458
7459 In the previous example, all recipes except ``quilt-native`` ignore
7460 task signatures from the ``quilt-native`` recipe when determining
7461 their task signatures.
7462
7463 Use of this variable is one mechanism to remove dependencies that
7464 affect task signatures and thus force rebuilds when a recipe changes.
7465
7466 .. note::
7467
7468 If you add an inappropriate dependency for a recipe relationship,
7469 the software might break during runtime if the interface of the
7470 second recipe was changed after the first recipe had been built.
7471
Andrew Geisslerf0343792020-11-18 10:42:21 -06007472 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007473 A list of recipes that are completely stable and will never change.
7474 The ABI for the recipes in the list are presented by output from the
7475 tasks run to build the recipe. Use of this variable is one way to
7476 remove dependencies from one recipe on another that affect task
7477 signatures and thus force rebuilds when the recipe changes.
7478
7479 .. note::
7480
7481 If you add an inappropriate variable to this list, the software
7482 might break at runtime if the interface of the recipe was changed
7483 after the other had been built.
7484
Andrew Geisslerf0343792020-11-18 10:42:21 -06007485 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007486 Specifies the number of bits for the target system CPU. The value
7487 should be either "32" or "64".
7488
Andrew Geisslerf0343792020-11-18 10:42:21 -06007489 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007490 Specifies the endian byte order of the target system. The value
7491 should be either "le" for little-endian or "be" for big-endian.
7492
Andrew Geisslerf0343792020-11-18 10:42:21 -06007493 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007494 Enables removal of all files from the "Provides" section of an RPM
7495 package. Removal of these files is required for packages containing
7496 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
7497
7498 To enable file removal, set the variable to "1" in your
7499 ``conf/local.conf`` configuration file in your:
Patrick Williams2390b1b2022-11-03 13:47:49 -05007500 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007501
7502 SKIP_FILEDEPS = "1"
7503
Andrew Geissler9aee5002022-03-30 16:27:02 +00007504 :term:`SKIP_RECIPE`
7505 Used to prevent the OpenEmbedded build system from building a given
7506 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
7507 and provide a reason, which will be reported when attempting to
7508 build the recipe.
7509
7510 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
7511 variable in your ``local.conf`` file or distribution configuration.
7512 Here is an example which prevents ``myrecipe`` from being built::
7513
7514 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
7515
Andrew Geisslerf0343792020-11-18 10:42:21 -06007516 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007517 Groups together machines based upon the same family of SOC (System On
7518 Chip). You typically set this variable in a common ``.inc`` file that
7519 you include in the configuration files of all the machines.
7520
7521 .. note::
7522
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007523 You must include ``conf/machine/include/soc-family.inc`` for this
7524 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007525
Andrew Geisslerf0343792020-11-18 10:42:21 -06007526 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007527 Defines the suffix for shared libraries used on the target platform.
7528 By default, this suffix is ".so.*" for all Linux-based systems and is
7529 defined in the ``meta/conf/bitbake.conf`` configuration file.
7530
7531 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007532 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007533
Andrew Geisslerf0343792020-11-18 10:42:21 -06007534 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007535 Defines the suffix for the development symbolic link (symlink) for
7536 shared libraries on the target platform. By default, this suffix is
7537 ".so" for Linux-based systems and is defined in the
7538 ``meta/conf/bitbake.conf`` configuration file.
7539
7540 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007541 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007542
Andrew Geisslereff27472021-10-29 15:35:00 -05007543 :term:`SOURCE_DATE_EPOCH`
7544 This defines a date expressed in number of seconds since
7545 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
7546 multiple build systems to force a timestamp in built binaries.
7547 Many upstream projects already support this variable.
7548
7549 You will find more details in the `official specifications
7550 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
7551
7552 A value for each recipe is computed from the sources by
7553 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
7554
7555 If a recipe wishes to override the default behavior, it should set its
7556 own :term:`SOURCE_DATE_EPOCH` value::
7557
7558 SOURCE_DATE_EPOCH = "1613559011"
7559
Andrew Geisslerf0343792020-11-18 10:42:21 -06007560 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007561 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05007562 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007563 your ``local.conf`` configuration file ensures the source for all
7564 recipes are fetched regardless of whether or not a recipe is
7565 compatible with the configuration. A recipe is considered
7566 incompatible with the currently configured machine when either or
7567 both the :term:`COMPATIBLE_MACHINE`
7568 variable and :term:`COMPATIBLE_HOST` variables
7569 specify compatibility with a machine other than that of the current
7570 machine or host.
7571
7572 .. note::
7573
Andrew Geissler09036742021-06-25 14:25:14 -05007574 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007575 variable unless you are creating a source mirror. In other words,
7576 do not set the variable during a normal build.
7577
Andrew Geisslerf0343792020-11-18 10:42:21 -06007578 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007579 Defines your own :term:`PREMIRRORS` from which to
7580 first fetch source before attempting to fetch from the upstream
7581 specified in :term:`SRC_URI`.
7582
7583 To use this variable, you must globally inherit the
Andrew Geissler517393d2023-01-13 08:55:19 -06007584 :ref:`ref-classes-own-mirrors` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007585 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007586
7587 INHERIT += "own-mirrors"
7588 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7589
7590 .. note::
7591
Andrew Geissler09036742021-06-25 14:25:14 -05007592 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007593
Patrick Williams7784c422022-11-17 07:29:11 -06007594 :term:`SPDX_ARCHIVE_PACKAGED`
7595 This option allows to add to :term:`SPDX` output compressed archives
7596 of the files in the generated target packages.
7597
7598 Such archives are available in
7599 ``tmp/deploy/spdx/MACHINE/packages/packagename.tar.zst``
7600 under the :term:`Build Directory`.
7601
7602 Enable this option as follows::
7603
7604 SPDX_ARCHIVE_PACKAGED = "1"
7605
7606 According to our tests on release 4.1 "langdale", building
7607 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling this
7608 option multiplied the size of the ``tmp/deploy/spdx`` directory by a
7609 factor of 13 (+1.6 GiB for this image), compared to just using the
Andrew Geissler517393d2023-01-13 08:55:19 -06007610 :ref:`ref-classes-create-spdx` class with no option.
Patrick Williams7784c422022-11-17 07:29:11 -06007611
7612 Note that this option doesn't increase the size of :term:`SPDX`
7613 files in ``tmp/deploy/images/MACHINE``.
7614
7615 :term:`SPDX_ARCHIVE_SOURCES`
7616 This option allows to add to :term:`SPDX` output compressed archives
7617 of the sources for packages installed on the target. It currently
7618 only works when :term:`SPDX_INCLUDE_SOURCES` is set.
7619
7620 This is one way of fulfilling "source code access" license
7621 requirements.
7622
7623 Such source archives are available in
7624 ``tmp/deploy/spdx/MACHINE/recipes/recipe-packagename.tar.zst``
7625 under the :term:`Build Directory`.
7626
7627 Enable this option as follows::
7628
7629 SPDX_INCLUDE_SOURCES = "1"
7630 SPDX_ARCHIVE_SOURCES = "1"
7631
7632 According to our tests on release 4.1 "langdale", building
7633 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7634 these options multiplied the size of the ``tmp/deploy/spdx``
7635 directory by a factor of 11 (+1.4 GiB for this image),
Andrew Geissler517393d2023-01-13 08:55:19 -06007636 compared to just using the :ref:`ref-classes-create-spdx`
Patrick Williams7784c422022-11-17 07:29:11 -06007637 class with no option.
7638
7639 Note that using this option only marginally increases the size
7640 of the :term:`SPDX` output in ``tmp/deploy/images/MACHINE/``
7641 (+ 0.07\% with the tested image), compared to just enabling
7642 :term:`SPDX_INCLUDE_SOURCES`.
7643
7644 :term:`SPDX_INCLUDE_SOURCES`
7645 This option allows to add a description of the source files used to build
7646 the host tools and the target packages, to the ``spdx.json`` files in
7647 ``tmp/deploy/spdx/MACHINE/recipes/`` under the :term:`Build Directory`.
7648 As a consequence, the ``spdx.json`` files under the ``by-namespace`` and
7649 ``packages`` subdirectories in ``tmp/deploy/spdx/MACHINE`` are also
7650 modified to include references to such source file descriptions.
7651
7652 Enable this option as follows::
7653
7654 SPDX_INCLUDE_SOURCES = "1"
7655
7656 According to our tests on release 4.1 "langdale", building
7657 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7658 this option multiplied the total size of the ``tmp/deploy/spdx``
7659 directory by a factor of 3 (+291 MiB for this image),
7660 and the size of the ``IMAGE-MACHINE.spdx.tar.zst`` in
7661 ``tmp/deploy/images/MACHINE`` by a factor of 130 (+15 MiB for this
Andrew Geissler517393d2023-01-13 08:55:19 -06007662 image), compared to just using the :ref:`ref-classes-create-spdx` class
7663 with no option.
Patrick Williams7784c422022-11-17 07:29:11 -06007664
7665 :term:`SPDX_PRETTY`
7666 This option makes the SPDX output more human-readable, using
7667 identation and newlines, instead of the default output in a
7668 single line::
7669
7670 SPDX_PRETTY = "1"
7671
7672 The generated SPDX files are approximately 20% bigger, but
7673 this option is recommended if you want to inspect the SPDX
7674 output files with a text editor.
7675
Andrew Geisslerf0343792020-11-18 10:42:21 -06007676 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007677 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007678 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007679 mappings, see the ``meta/conf/licenses.conf`` file.
7680
7681 For additional information, see the :term:`LICENSE`
7682 variable.
7683
Andrew Geisslerf0343792020-11-18 10:42:21 -06007684 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007685 A list of prefixes for :term:`PN` used by the OpenEmbedded
7686 build system to create variants of recipes or packages. The list
7687 specifies the prefixes to strip off during certain circumstances such
7688 as the generation of the :term:`BPN` variable.
7689
Andrew Geisslerf0343792020-11-18 10:42:21 -06007690 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007691 The file type for the Secondary Program Loader (SPL). Some devices
7692 use an SPL from which to boot (e.g. the BeagleBone development
7693 board). For such cases, you can declare the file type of the SPL
7694 binary in the ``u-boot.inc`` include file, which is used in the
7695 U-Boot recipe.
7696
7697 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007698 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007699
7700 # Some versions of u-boot build an SPL (Second Program Loader) image that
7701 # should be packaged along with the u-boot binary as well as placed in the
7702 # deploy directory. For those versions they can set the following variables
7703 # to allow packaging the SPL.
7704 SPL_BINARY ?= ""
7705 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7706 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7707 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7708
Andrew Geissler09036742021-06-25 14:25:14 -05007709 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007710 various ``SPL_*`` variables used by the OpenEmbedded build system.
7711
7712 See the BeagleBone machine configuration example in the
Andrew Geissler517393d2023-01-13 08:55:19 -06007713 ":ref:`dev-manual/layers:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007714 section in the Yocto Project Board Support Package Developer's Guide
7715 for additional information.
7716
Andrew Geissler517393d2023-01-13 08:55:19 -06007717 :term:`SRCREV_FORMAT`
7718 See :term:`bitbake:SRCREV_FORMAT` in the BitBake manual.
7719
Andrew Geisslerf0343792020-11-18 10:42:21 -06007720 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007721
Andrew Geissler595f6302022-01-24 19:11:47 +00007722 See the BitBake manual for the initial description for this variable:
7723 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007724
Andrew Geissler595f6302022-01-24 19:11:47 +00007725 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007726
Andrew Geissler595f6302022-01-24 19:11:47 +00007727 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007728
Andrew Geissler615f2f12022-07-15 14:00:58 -05007729 - ``apply`` --- whether to apply the patch or not. The default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007730 action is to apply the patch.
7731
Andrew Geissler615f2f12022-07-15 14:00:58 -05007732 - ``striplevel`` --- which striplevel to use when applying the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007733 patch. The default level is 1.
7734
Andrew Geissler615f2f12022-07-15 14:00:58 -05007735 - ``patchdir`` --- specifies the directory in which the patch should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007736 be applied. The default is ``${``\ :term:`S`\ ``}``.
7737
7738 Here are options specific to recipes building code from a revision
7739 control system:
7740
Andrew Geissler615f2f12022-07-15 14:00:58 -05007741 - ``mindate`` --- apply the patch only if
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007742 :term:`SRCDATE` is equal to or greater than
7743 ``mindate``.
7744
Andrew Geissler615f2f12022-07-15 14:00:58 -05007745 - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007746 than ``maxdate``.
7747
Andrew Geissler615f2f12022-07-15 14:00:58 -05007748 - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007749 greater than ``minrev``.
7750
Andrew Geissler615f2f12022-07-15 14:00:58 -05007751 - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007752 than ``maxrev``.
7753
Andrew Geissler615f2f12022-07-15 14:00:58 -05007754 - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007755 ``rev``.
7756
Andrew Geissler615f2f12022-07-15 14:00:58 -05007757 - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007758 ``rev``.
7759
Andrew Geissler595f6302022-01-24 19:11:47 +00007760 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007761
Andrew Geissler595f6302022-01-24 19:11:47 +00007762 If you want the build system to pick up files specified through
7763 a :term:`SRC_URI` statement from your append file, you need to be
7764 sure to extend the :term:`FILESPATH` variable by also using the
7765 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007766
Andrew Geisslerf0343792020-11-18 10:42:21 -06007767 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007768 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007769 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007770 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007771 variable to "0" disables this behavior.
7772
Andrew Geisslerf0343792020-11-18 10:42:21 -06007773 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007774 The date of the source code used to build the package. This variable
7775 applies only if the source was fetched from a Source Code Manager
7776 (SCM).
7777
Andrew Geisslerf0343792020-11-18 10:42:21 -06007778 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007779 Returns the version string of the current package. This string is
7780 used to help define the value of :term:`PV`.
7781
Andrew Geissler09036742021-06-25 14:25:14 -05007782 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007783 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007784 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007785
7786 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7787
Andrew Geissler09036742021-06-25 14:25:14 -05007788 Recipes that need to define :term:`PV` do so with the help of the
7789 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007790 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007791 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007792
7793 PV = "0.12-git${SRCPV}"
7794
Andrew Geisslerf0343792020-11-18 10:42:21 -06007795 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007796 The revision of the source code used to build the package. This
7797 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7798 that if you want to build a fixed revision and you want to avoid
7799 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007800 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007801 identifier and not just a tag.
7802
7803 .. note::
7804
7805 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007806 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007807 description and the
Andrew Geissler517393d2023-01-13 08:55:19 -06007808 ":ref:`dev-manual/packages:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007809 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007810
Andrew Geissler09036742021-06-25 14:25:14 -05007811 :term:`SRCTREECOVEREDTASKS`
7812 A list of tasks that are typically not relevant (and therefore skipped)
Andrew Geissler517393d2023-01-13 08:55:19 -06007813 when building using the :ref:`ref-classes-externalsrc`
Andrew Geissler09036742021-06-25 14:25:14 -05007814 class. The default value as set in that class file is the set of tasks
7815 that are rarely needed when using external source::
7816
7817 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7818
7819 The notable exception is when processing external kernel source as
Andrew Geissler517393d2023-01-13 08:55:19 -06007820 defined in the :ref:`ref-classes-kernel-yocto` class file (formatted for
7821 aesthetics)::
Andrew Geissler09036742021-06-25 14:25:14 -05007822
7823 SRCTREECOVEREDTASKS += "\
7824 do_validate_branches \
7825 do_kernel_configcheck \
7826 do_kernel_checkout \
7827 do_fetch \
7828 do_unpack \
7829 do_patch \
7830 "
7831
7832 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7833 variables for more information.
7834
Andrew Geisslerf0343792020-11-18 10:42:21 -06007835 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007836 The directory for the shared state cache.
7837
Andrew Geissler615f2f12022-07-15 14:00:58 -05007838 :term:`SSTATE_EXCLUDEDEPS_SYSROOT`
7839 This variable allows to specify indirect dependencies to exclude
7840 from sysroots, for example to avoid the situations when a dependency on
7841 any ``-native`` recipe will pull in all dependencies of that recipe
7842 in the recipe sysroot. This behaviour might not always be wanted,
7843 for example when that ``-native`` recipe depends on build tools
7844 that are not relevant for the current recipe.
7845
7846 This way, irrelevant dependencies are ignored, which could have
7847 prevented the reuse of prebuilt artifacts stored in the Shared
7848 State Cache.
7849
Andrew Geissler517393d2023-01-13 08:55:19 -06007850 :term:`SSTATE_EXCLUDEDEPS_SYSROOT` is evaluated as two regular
Andrew Geissler615f2f12022-07-15 14:00:58 -05007851 expressions of recipe and dependency to ignore. An example
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06007852 is the rule in :oe_git:`meta/conf/layer.conf </openembedded-core/tree/meta/conf/layer.conf>`::
Andrew Geissler615f2f12022-07-15 14:00:58 -05007853
7854 # Nothing needs to depend on libc-initial
7855 # base-passwd/shadow-sysroot don't need their dependencies
7856 SSTATE_EXCLUDEDEPS_SYSROOT += "\
7857 .*->.*-initial.* \
7858 .*(base-passwd|shadow-sysroot)->.* \
7859 "
7860
7861 The ``->`` substring represents the dependency between
7862 the two regular expressions.
7863
Andrew Geisslerf0343792020-11-18 10:42:21 -06007864 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007865 If set to "1", allows fetches from mirrors that are specified in
7866 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007867 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7868 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7869 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007870 your shared state cache, but you want to disable any other fetching
7871 from the network.
7872
Andrew Geisslerf0343792020-11-18 10:42:21 -06007873 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007874 Configures the OpenEmbedded build system to search other mirror
7875 locations for prebuilt cache data objects before building out the
7876 data. This variable works like fetcher :term:`MIRRORS`
7877 and :term:`PREMIRRORS` and points to the cache
7878 locations to check for the shared state (sstate) objects.
7879
7880 You can specify a filesystem directory or a remote URL such as HTTP
7881 or FTP. The locations you specify need to contain the shared state
7882 cache (sstate-cache) results from previous builds. The sstate-cache
7883 you point to can also be from builds on other machines.
7884
7885 When pointing to sstate build artifacts on another machine that uses
7886 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007887 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007888 paths to server paths. The paths need to take into account
Andrew Geissler517393d2023-01-13 08:55:19 -06007889 :term:`NATIVELSBSTRING` set by the :ref:`ref-classes-uninative` class.
7890 For example, the following maps the local search path ``universal-4.9``
7891 to the server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007892
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007893 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007894
7895 If a mirror uses the same structure as
7896 :term:`SSTATE_DIR`, you need to add "PATH" at the
7897 end as shown in the examples below. The build system substitutes the
Andrew Geissler517393d2023-01-13 08:55:19 -06007898 correct path within the directory structure::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007899
7900 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007901 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007902 file://.* file:///some-local-dir/sstate/PATH"
7903
Andrew Geisslerf0343792020-11-18 10:42:21 -06007904 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007905 Controls the list of files the OpenEmbedded build system scans for
7906 hardcoded installation paths. The variable uses a space-separated
7907 list of filenames (not paths) with standard wildcard characters
7908 allowed.
7909
7910 During a build, the OpenEmbedded build system creates a shared state
7911 (sstate) object during the first stage of preparing the sysroots.
7912 That object is scanned for hardcoded paths for original installation
7913 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007914 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7915 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007916 than the variable being comprehensively set. The
Andrew Geissler517393d2023-01-13 08:55:19 -06007917 :ref:`ref-classes-sstate` class specifies the default list of files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007918
Andrew Geissler517393d2023-01-13 08:55:19 -06007919 For details on the process, see the :ref:`ref-classes-staging` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007920
Andrew Geisslerf0343792020-11-18 10:42:21 -06007921 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007922 Specifies the path to the ``/lib`` subdirectory of the sysroot
7923 directory for the build host.
7924
Andrew Geisslerf0343792020-11-18 10:42:21 -06007925 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007926 Specifies the path to the ``/lib`` subdirectory of the sysroot
7927 directory for the target for which the current recipe is being built
7928 (:term:`STAGING_DIR_HOST`).
7929
Andrew Geisslerf0343792020-11-18 10:42:21 -06007930 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007931 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7932 directory for the target for which the current recipe is being built
7933 (:term:`STAGING_DIR_HOST`).
7934
Andrew Geisslerf0343792020-11-18 10:42:21 -06007935 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007936 Specifies the path to the directory containing binary configuration
7937 scripts. These scripts provide configuration information for other
7938 software that wants to make use of libraries or include files
7939 provided by the software associated with the script.
7940
7941 .. note::
7942
7943 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007944 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7945 library to which you are linking, it is recommended you use
7946 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007947
Andrew Geisslerf0343792020-11-18 10:42:21 -06007948 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007949 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7950 directory for the build host.
7951
Andrew Geisslerf0343792020-11-18 10:42:21 -06007952 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007953 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7954 directory for the target for which the current recipe is being built
7955 (:term:`STAGING_DIR_HOST`).
7956
Andrew Geisslerf0343792020-11-18 10:42:21 -06007957 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007958 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7959 directory for the build host.
7960
Andrew Geisslerf0343792020-11-18 10:42:21 -06007961 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007962 Helps construct the ``recipe-sysroots`` directory, which is used
7963 during packaging.
7964
7965 For information on how staging for recipe-specific sysroots occurs,
7966 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007967 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007968 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007969 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007970 section in the Yocto Project Overview and Concepts Manual, and the
7971 :term:`SYSROOT_DIRS` variable.
7972
7973 .. note::
7974
Andrew Geissler09036742021-06-25 14:25:14 -05007975 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007976 directory because the OpenEmbedded build system manages the
7977 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007978 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007979 task and then the OpenEmbedded build system will stage a subset of
7980 those files into the sysroot.
7981
Andrew Geisslerf0343792020-11-18 10:42:21 -06007982 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007983 Specifies the path to the sysroot directory for the system on which
7984 the component is built to run (the system that hosts the component).
7985 For most recipes, this sysroot is the one in which that recipe's
7986 :ref:`ref-tasks-populate_sysroot` task copies
7987 files. Exceptions include ``-native`` recipes, where the
Patrick Williams2194f502022-10-16 14:26:09 -05007988 :ref:`ref-tasks-populate_sysroot` task instead uses
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007989 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007990 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007991 have the following values:
7992
7993 - For recipes building for the target machine, the value is
7994 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7995
7996 - For native recipes building for the build host, the value is empty
7997 given the assumption that when building for the build host, the
7998 build host's own directories should be used.
7999
8000 .. note::
8001
8002 ``-native`` recipes are not installed into host paths like such
8003 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04008004 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008005 standard build environment variables such as
8006 :term:`CPPFLAGS` and
8007 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05008008 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008009 headers using, for example, GCC's ``-isystem`` option.
8010
8011 Thus, the emphasis is that the ``STAGING_DIR*`` variables
8012 should be viewed as input variables by tasks such as
8013 :ref:`ref-tasks-configure`,
8014 :ref:`ref-tasks-compile`, and
8015 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05008016 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008017 for ``-native`` recipes, as they make use of host headers and
8018 libraries.
8019
Andrew Geisslerf0343792020-11-18 10:42:21 -06008020 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008021 Specifies the path to the sysroot directory used when building
8022 components that run on the build host itself.
8023
Andrew Geisslerf0343792020-11-18 10:42:21 -06008024 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008025 Specifies the path to the sysroot used for the system for which the
8026 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05008027 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008028 :term:`STAGING_DIR_HOST`.
8029
Andrew Geissler517393d2023-01-13 08:55:19 -06008030 Some recipes build binaries that can run on the target system but those
8031 binaries in turn generate code for another different system (e.g.
8032 :ref:`ref-classes-cross-canadian` recipes). Using terminology from GNU,
8033 the primary system is referred to as the "HOST" and the secondary, or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008034 different, system is referred to as the "TARGET". Thus, the binaries
8035 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05008036 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
8037 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008038 sysroot used for the "TARGET" system.
8039
Andrew Geisslerf0343792020-11-18 10:42:21 -06008040 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008041 Specifies the path to the ``/etc`` subdirectory of the sysroot
8042 directory for the build host.
8043
Andrew Geisslerf0343792020-11-18 10:42:21 -06008044 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008045 Specifies the path to the ``/usr`` subdirectory of the sysroot
8046 directory for the target for which the current recipe is being built
8047 (:term:`STAGING_DIR_HOST`).
8048
Andrew Geisslerf0343792020-11-18 10:42:21 -06008049 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008050 Specifies the path to the ``/usr/include`` subdirectory of the
8051 sysroot directory for the target for which the current recipe being
8052 built (:term:`STAGING_DIR_HOST`).
8053
Andrew Geisslerf0343792020-11-18 10:42:21 -06008054 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008055 Specifies the path to the ``/usr/include`` subdirectory of the
8056 sysroot directory for the build host.
8057
Andrew Geisslerf0343792020-11-18 10:42:21 -06008058 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008059 Points to the directory containing the kernel build artifacts.
8060 Recipes building software that needs to access kernel build artifacts
8061 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05008062 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008063 after the kernel has been built.
8064
Andrew Geisslerf0343792020-11-18 10:42:21 -06008065 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008066 The directory with kernel headers that are required to build
8067 out-of-tree modules.
8068
Andrew Geisslerf0343792020-11-18 10:42:21 -06008069 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008070 Specifies the path to the ``/usr/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_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008075 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
8076 directory for the build host.
8077
Andrew Geisslerf0343792020-11-18 10:42:21 -06008078 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008079 Specifies the base path used to create recipe stamp files. The path
8080 to an actual stamp file is constructed by evaluating this string and
8081 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05008082 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008083 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008084
8085 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
8086
8087 For information on how BitBake uses stamp files to determine if a
8088 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008089 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008090 section in the Yocto Project Overview and Concepts Manual.
8091
8092 See :term:`STAMPS_DIR`,
8093 :term:`MULTIMACH_TARGET_SYS`,
8094 :term:`PN`, :term:`EXTENDPE`,
8095 :term:`PV`, and :term:`PR` for related variable
8096 information.
8097
Andrew Geissler517393d2023-01-13 08:55:19 -06008098 :term:`STAMPCLEAN`
8099 See :term:`bitbake:STAMPCLEAN` in the BitBake manual.
8100
Andrew Geisslerf0343792020-11-18 10:42:21 -06008101 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008102 Specifies the base directory in which the OpenEmbedded build system
8103 places stamps. The default directory is ``${TMPDIR}/stamps``.
8104
Andrew Geisslerf0343792020-11-18 10:42:21 -06008105 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008106 The minimal command and arguments to run ``strip``, which is used to
8107 strip symbols.
8108
Andrew Geisslerf0343792020-11-18 10:42:21 -06008109 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008110 The short (72 characters or less) summary of the binary package for
8111 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05008112 :term:`SUMMARY` is used to define the
8113 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008114 not set in the recipe.
8115
Andrew Geisslerf0343792020-11-18 10:42:21 -06008116 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008117 The directory in which files checked out of a Subversion system are
8118 stored.
8119
Andrew Geisslerf0343792020-11-18 10:42:21 -06008120 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008121 Specifies the kernel boot default console. If you want to use a
8122 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008123 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008124
8125 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
8126
Andrew Geissler517393d2023-01-13 08:55:19 -06008127 The :ref:`ref-classes-syslinux` class initially sets
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008128 this variable to null but then checks for a value later.
8129
Andrew Geisslerf0343792020-11-18 10:42:21 -06008130 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008131 Lists additional options to add to the syslinux file. You need to set
8132 this variable in your recipe. If you want to list multiple options,
8133 separate the options with a semicolon character (``;``).
8134
Andrew Geissler517393d2023-01-13 08:55:19 -06008135 The :ref:`ref-classes-syslinux` class uses this variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008136 to create a set of options.
8137
Andrew Geisslerf0343792020-11-18 10:42:21 -06008138 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008139 Specifies the alternate serial port or turns it off. To turn off
8140 serial, set this variable to an empty string in your recipe. The
8141 variable's default value is set in the
Andrew Geissler517393d2023-01-13 08:55:19 -06008142 :ref:`ref-classes-syslinux` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008143
8144 SYSLINUX_SERIAL ?= "0 115200"
8145
8146 The class checks for and uses the variable as needed.
8147
Andrew Geisslerf0343792020-11-18 10:42:21 -06008148 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008149 Specifies the alternate console=tty... kernel boot argument. The
Andrew Geissler517393d2023-01-13 08:55:19 -06008150 variable's default value is set in the :ref:`ref-classes-syslinux`
8151 class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008152
8153 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
8154
8155 The class checks for and uses the variable as needed.
8156
Andrew Geisslerf0343792020-11-18 10:42:21 -06008157 :term:`SYSLINUX_SPLASH`
8158 An ``.LSS`` file used as the background for the VGA boot menu when
8159 you use the boot menu. You need to set this variable in your recipe.
8160
Andrew Geissler517393d2023-01-13 08:55:19 -06008161 The :ref:`ref-classes-syslinux` class checks for this
Andrew Geisslerf0343792020-11-18 10:42:21 -06008162 variable and if found, the OpenEmbedded build system installs the
8163 splash screen.
8164
8165 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008166 Points to the temporary directory under the work directory (default
8167 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
8168 where the files populated into the sysroot are assembled during the
8169 :ref:`ref-tasks-populate_sysroot` task.
8170
Andrew Geisslerf0343792020-11-18 10:42:21 -06008171 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008172 Directories that are staged into the sysroot by the
8173 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05008174 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008175
8176 SYSROOT_DIRS = " \
8177 ${includedir} \
8178 ${libdir} \
8179 ${base_libdir} \
8180 ${nonarch_base_libdir} \
8181 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05008182 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008183 "
8184
Andrew Geissler9aee5002022-03-30 16:27:02 +00008185 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008186 Directories that are not staged into the sysroot by the
8187 :ref:`ref-tasks-populate_sysroot` task. You
8188 can use this variable to exclude certain subdirectories of
8189 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05008190 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008191
Andrew Geissler9aee5002022-03-30 16:27:02 +00008192 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008193 ${mandir} \
8194 ${docdir} \
8195 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05008196 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008197 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05008198 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008199 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05008200 ${datadir}/gtk-doc/html \
8201 ${datadir}/installed-tests \
8202 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008203 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05008204 ${datadir}/terminfo \
8205 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008206 "
8207
Andrew Geisslerf0343792020-11-18 10:42:21 -06008208 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008209 Extra directories staged into the sysroot by the
8210 :ref:`ref-tasks-populate_sysroot` task for
8211 ``-native`` recipes, in addition to those specified in
8212 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05008213 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008214
8215 SYSROOT_DIRS_NATIVE = " \
8216 ${bindir} \
8217 ${sbindir} \
8218 ${base_bindir} \
8219 ${base_sbindir} \
8220 ${libexecdir} \
8221 ${sysconfdir} \
8222 ${localstatedir} \
8223 "
8224
8225 .. note::
8226
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008227 Programs built by ``-native`` recipes run directly from the sysroot
8228 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
8229 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008230
Andrew Geisslerf0343792020-11-18 10:42:21 -06008231 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008232 A list of functions to execute after files are staged into the
8233 sysroot. These functions are usually used to apply additional
8234 processing on the staged files, or to stage additional files.
8235
Andrew Geisslerf0343792020-11-18 10:42:21 -06008236 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geissler517393d2023-01-13 08:55:19 -06008237 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008238 this variable specifies whether the specified service in
8239 :term:`SYSTEMD_SERVICE` should start
8240 automatically or not. By default, the service is enabled to
8241 automatically start at boot time. The default setting is in the
Andrew Geissler517393d2023-01-13 08:55:19 -06008242 :ref:`ref-classes-systemd` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008243
8244 SYSTEMD_AUTO_ENABLE ??= "enable"
8245
8246 You can disable the service by setting the variable to "disable".
8247
Andrew Geisslerf0343792020-11-18 10:42:21 -06008248 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008249 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008250 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008251 configuration file that should be used. By default, the
Andrew Geissler517393d2023-01-13 08:55:19 -06008252 :ref:`ref-classes-systemd-boot` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008253 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008254
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05008255 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008256
8257 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008258 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008259
Andrew Geisslerf0343792020-11-18 10:42:21 -06008260 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008261 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008262 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008263 list of entry files (``*.conf``) to install that contain one boot
Andrew Geissler517393d2023-01-13 08:55:19 -06008264 entry per file. By default, the :ref:`ref-classes-systemd-boot` class
8265 sets the :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008266
8267 SYSTEMD_BOOT_ENTRIES ?= ""
8268
8269 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008270 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008271
Andrew Geisslerf0343792020-11-18 10:42:21 -06008272 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008273 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008274 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008275 boot menu timeout in seconds. By default, the
Andrew Geissler517393d2023-01-13 08:55:19 -06008276 :ref:`ref-classes-systemd-boot` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008277 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008278
8279 SYSTEMD_BOOT_TIMEOUT ?= "10"
8280
8281 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008282 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008283
Andrew Geissler615f2f12022-07-15 14:00:58 -05008284 :term:`SYSTEMD_DEFAULT_TARGET`
8285
8286 This variable allows to set the default unit that systemd starts at bootup.
8287 Usually, this is either ``multi-user.target`` or ``graphical.target``.
8288 This works by creating a ``default.target`` symbolic link to the chosen systemd
8289 target file.
8290
8291 See `systemd's documentation
8292 <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__
8293 for details.
8294
Patrick Williams2390b1b2022-11-03 13:47:49 -05008295 For example, this variable is used in the :oe_git:`core-image-minimal-xfce.bb
8296 </meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>`
Andrew Geissler615f2f12022-07-15 14:00:58 -05008297 recipe::
8298
8299 SYSTEMD_DEFAULT_TARGET = "graphical.target"
8300
Andrew Geisslerf0343792020-11-18 10:42:21 -06008301 :term:`SYSTEMD_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06008302 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008303 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05008304 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008305 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05008306 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008307
8308 SYSTEMD_PACKAGES ?= "${PN}"
8309
8310 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05008311 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008312 the build system can find the systemd unit files.
8313
Andrew Geisslerf0343792020-11-18 10:42:21 -06008314 :term:`SYSTEMD_SERVICE`
Andrew Geissler517393d2023-01-13 08:55:19 -06008315 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008316 this variable specifies the systemd service name for a package.
8317
Andrew Geissler615f2f12022-07-15 14:00:58 -05008318 Multiple services can be specified, each one separated by a space.
8319
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008320 When you specify this file in your recipe, use a package name
8321 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008322 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008323
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008324 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008325
Andrew Geissler615f2f12022-07-15 14:00:58 -05008326 The package overrides that can be specified are directly related to the value of
Andrew Geissler517393d2023-01-13 08:55:19 -06008327 :term:`SYSTEMD_PACKAGES`. Overrides not included in :term:`SYSTEMD_PACKAGES`
Andrew Geissler615f2f12022-07-15 14:00:58 -05008328 will be silently ignored.
8329
Andrew Geisslerf0343792020-11-18 10:42:21 -06008330 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008331 When using
Andrew Geissler517393d2023-01-13 08:55:19 -06008332 :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008333 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008334 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008335 (allowing login), assuming :term:`USE_VT` is not set to
8336 "0".
8337
Andrew Geissler09036742021-06-25 14:25:14 -05008338 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008339 run a getty on the first virtual terminal).
8340
Andrew Geisslerf0343792020-11-18 10:42:21 -06008341 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008342 This variable points to a directory were BitBake places temporary
8343 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008344 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008345
8346 T = "${WORKDIR}/temp"
8347
8348 The :term:`WORKDIR` is the directory into which
8349 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
8350 file sets this variable.
8351
Andrew Geissler09036742021-06-25 14:25:14 -05008352 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008353 :term:`TMPDIR` variable, which points to the root of
8354 the directory tree where BitBake places the output of an entire
8355 build.
8356
Andrew Geisslerf0343792020-11-18 10:42:21 -06008357 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008358 The target machine's architecture. The OpenEmbedded build system
8359 supports many architectures. Here is an example list of architectures
8360 supported. This list is by no means complete as the architecture is
8361 configurable:
8362
8363 - arm
8364 - i586
8365 - x86_64
8366 - powerpc
8367 - powerpc64
8368 - mips
8369 - mipsel
8370
8371 For additional information on machine architectures, see the
8372 :term:`TUNE_ARCH` variable.
8373
Andrew Geisslerf0343792020-11-18 10:42:21 -06008374 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008375 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05008376 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008377 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05008378 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008379
8380 TARGET_AS_ARCH = "${TUNE_ASARGS}"
8381
Andrew Geisslerf0343792020-11-18 10:42:21 -06008382 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008383 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05008384 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008385 :term:`TUNE_CCARGS` by default.
8386
8387 .. note::
8388
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008389 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05008390 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
8391 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008392
Andrew Geisslerf0343792020-11-18 10:42:21 -06008393 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008394 This is a specific kernel compiler flag for a CPU or Application
8395 Binary Interface (ABI) tune. The flag is used rarely and only for
8396 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05008397 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008398 variable allows the kernel (and associated modules) to use a
8399 different configuration. See the
8400 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
8401 :term:`Source Directory` for an example.
8402
Andrew Geisslerf0343792020-11-18 10:42:21 -06008403 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008404 Specifies the flags to pass to the C compiler when building for the
8405 target. When building in the target context,
8406 :term:`CFLAGS` is set to the value of this variable by
8407 default.
8408
Andrew Geissler09036742021-06-25 14:25:14 -05008409 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
8410 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008411 executables built using the SDK also have the flags applied.
8412
Andrew Geisslerf0343792020-11-18 10:42:21 -06008413 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008414 Specifies the flags to pass to the C pre-processor (i.e. to both the
8415 C and the C++ compilers) when building for the target. When building
8416 in the target context, :term:`CPPFLAGS` is set to the
8417 value of this variable by default.
8418
8419 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008420 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008421 value so that executables built using the SDK also have the flags
8422 applied.
8423
Andrew Geisslerf0343792020-11-18 10:42:21 -06008424 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008425 Specifies the flags to pass to the C++ compiler when building for the
8426 target. When building in the target context,
8427 :term:`CXXFLAGS` is set to the value of this variable
8428 by default.
8429
8430 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008431 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008432 value so that executables built using the SDK also have the flags
8433 applied.
8434
Andrew Geisslerf0343792020-11-18 10:42:21 -06008435 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008436 Specifies the method for handling FPU code. For FPU-less targets,
8437 which include most ARM CPUs, the variable must be set to "soft". If
8438 not, the kernel emulation gets used, which results in a performance
8439 penalty.
8440
Andrew Geisslerf0343792020-11-18 10:42:21 -06008441 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008442 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05008443 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008444 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05008445 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008446
8447 TARGET_LD_ARCH = "${TUNE_LDARGS}"
8448
Andrew Geisslerf0343792020-11-18 10:42:21 -06008449 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008450 Specifies the flags to pass to the linker when building for the
8451 target. When building in the target context,
8452 :term:`LDFLAGS` is set to the value of this variable
8453 by default.
8454
8455 Additionally, the SDK's environment setup script sets the
8456 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05008457 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008458 have the flags applied.
8459
Andrew Geisslerf0343792020-11-18 10:42:21 -06008460 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008461 Specifies the target's operating system. The variable can be set to
8462 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008463 for musl libc. For ARM/EABI targets, the possible values are
8464 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008465
Andrew Geisslerf0343792020-11-18 10:42:21 -06008466 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008467 Specifies the prefix used for the toolchain binary target tools.
8468
8469 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04008470 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008471
8472 - For recipes building for the target machine, the value is
8473 "${:term:`TARGET_SYS`}-".
8474
8475 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04008476 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008477
Andrew Geissler517393d2023-01-13 08:55:19 -06008478 - For native SDK recipes (:ref:`ref-classes-nativesdk`),
8479 the build system sets the variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008480
Andrew Geisslerf0343792020-11-18 10:42:21 -06008481 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008482 Specifies the system, including the architecture and the operating
8483 system, for which the build is occurring in the context of the
8484 current recipe.
8485
8486 The OpenEmbedded build system automatically sets this variable based
8487 on :term:`TARGET_ARCH`,
8488 :term:`TARGET_VENDOR`, and
8489 :term:`TARGET_OS` variables.
8490
8491 .. note::
8492
Andrew Geissler09036742021-06-25 14:25:14 -05008493 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008494
8495 Consider these two examples:
8496
8497 - Given a native recipe on a 32-bit, x86 machine running Linux, the
8498 value is "i686-linux".
8499
8500 - Given a recipe being built for a little-endian, MIPS target
8501 running Linux, the value might be "mipsel-linux".
8502
Andrew Geisslerf0343792020-11-18 10:42:21 -06008503 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008504 Specifies the name of the target vendor.
8505
Andrew Geisslerf0343792020-11-18 10:42:21 -06008506 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008507 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008508 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008509
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008510 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008511
Andrew Geisslerf0343792020-11-18 10:42:21 -06008512 :term:`TCLIBCAPPEND`
Patrick Williams2390b1b2022-11-03 13:47:49 -05008513 Specifies a suffix to be appended onto the :term:`TMPDIR` value. The
8514 suffix identifies the ``libc`` variant for building. When you are
8515 building for multiple variants with the same :term:`Build Directory`,
8516 this mechanism ensures that output for different ``libc`` variants is
8517 kept separate to avoid potential conflicts.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008518
8519 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04008520 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008521 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05008522 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008523 in no suffix being applied.
8524
Andrew Geisslerf0343792020-11-18 10:42:21 -06008525 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05008526 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008527 characteristics of the generated packages and images by telling the
8528 OpenEmbedded build system which toolchain profile to use. By default,
8529 the OpenEmbedded build system builds its own internal toolchain. The
8530 variable's default value is "default", which uses that internal
8531 toolchain.
8532
8533 .. note::
8534
Andrew Geissler09036742021-06-25 14:25:14 -05008535 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008536 responsibility to ensure that the toolchain is compatible with the
8537 default toolchain. Using older or newer versions of these
Andrew Geissler517393d2023-01-13 08:55:19 -06008538 components might cause build problems. See
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06008539 :doc:`Release Information </migration-guides/index>` for your
Andrew Geissler517393d2023-01-13 08:55:19 -06008540 version of the Yocto Project, to find the specific components with
8541 which the toolchain must be compatible.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008542
Andrew Geissler09036742021-06-25 14:25:14 -05008543 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008544 which controls the variant of the GNU standard C library (``libc``)
8545 used during the build process: ``glibc`` or ``musl``.
8546
8547 With additional layers, it is possible to use a pre-compiled external
8548 toolchain. One example is the Sourcery G++ Toolchain. The support for
8549 this toolchain resides in the separate Mentor Graphics
8550 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008551 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008552
8553 The layer's ``README`` file contains information on how to use the
Andrew Geissler517393d2023-01-13 08:55:19 -06008554 Sourcery G++ Toolchain as an external toolchain. You will have to
8555 add the layer to your ``bblayers.conf`` file and then set the
8556 :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file to
8557 the location of the toolchain.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008558
8559 The fundamentals used for this example apply to any external
8560 toolchain. You can use ``meta-sourcery`` as a template for adding
8561 support for other external toolchains.
8562
Andrew Geissler517393d2023-01-13 08:55:19 -06008563 In addition to toolchain configuration, you will also need a
8564 corresponding toolchain recipe file. This recipe file needs to package
8565 up any pre-built objects in the toolchain such as ``libgcc``,
8566 ``libstdcc++``, any locales, and ``libc``.
8567
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008568 :term:`TC_CXX_RUNTIME`
8569 Specifies the C/C++ STL and runtime variant to use during
8570 the build process. Default value is 'gnu'
8571
8572 You can select "gnu", "llvm", or "android".
8573
Andrew Geisslerd5838332022-05-27 11:33:10 -05008574 :term:`TEMPLATECONF`
8575 Specifies the directory used by the build system to find templates
8576 from which to build the ``bblayers.conf`` and ``local.conf`` files.
8577 Use this variable if you wish to customize such files, and the default
8578 BitBake targets shown when sourcing the ``oe-init-build-env`` script.
8579
8580 For details, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008581 :ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory`
Andrew Geisslerd5838332022-05-27 11:33:10 -05008582 section in the Yocto Project Development Tasks manual.
8583
8584 .. note::
8585
8586 You must set this variable in the external environment in order
8587 for it to work.
8588
Andrew Geisslerf0343792020-11-18 10:42:21 -06008589 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008590 The location the OpenEmbedded build system uses to export tests when
8591 the :term:`TEST_EXPORT_ONLY` variable is set
8592 to "1".
8593
Andrew Geissler09036742021-06-25 14:25:14 -05008594 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008595 ``"${TMPDIR}/testimage/${PN}"``.
8596
Andrew Geisslerf0343792020-11-18 10:42:21 -06008597 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008598 Specifies to export the tests only. Set this variable to "1" if you
8599 do not want to run the tests but you want them to be exported in a
8600 manner that you to run them outside of the build system.
8601
Andrew Geisslerf0343792020-11-18 10:42:21 -06008602 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008603 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05008604 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008605
8606 .. note::
8607
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008608 Actual test results reside in the task log (``log.do_testimage``),
8609 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008610
Andrew Geisslerf0343792020-11-18 10:42:21 -06008611 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008612 For automated hardware testing, specifies the command to use to
8613 control the power of the target machine under test. Typically, this
8614 command would point to a script that performs the appropriate action
8615 (e.g. interacting with a web-enabled power strip). The specified
8616 command should expect to receive as the last argument "off", "on" or
8617 "cycle" specifying to power off, on, or cycle (power off and then
8618 power on) the device, respectively.
8619
Andrew Geisslerf0343792020-11-18 10:42:21 -06008620 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008621 For automated hardware testing, specifies additional arguments to
8622 pass through to the command specified in
8623 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008624 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008625 wish, for example, to separate the machine-specific and
8626 non-machine-specific parts of the arguments.
8627
Andrew Geisslerf0343792020-11-18 10:42:21 -06008628 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008629 The time in seconds allowed for an image to boot before automated
8630 runtime tests begin to run against an image. The default timeout
8631 period to allow the boot process to reach the login prompt is 500
8632 seconds. You can specify a different value in the ``local.conf``
8633 file.
8634
8635 For more information on testing images, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008636 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008637 section in the Yocto Project Development Tasks Manual.
8638
Andrew Geisslerf0343792020-11-18 10:42:21 -06008639 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008640 For automated hardware testing, specifies the command to use to
8641 connect to the serial console of the target machine under test. This
8642 command simply needs to connect to the serial console and forward
8643 that connection to standard input and output as any normal terminal
8644 program does.
8645
8646 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05008647 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008648
8649 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8650
Andrew Geisslerf0343792020-11-18 10:42:21 -06008651 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008652 For automated hardware testing, specifies additional arguments to
8653 pass through to the command specified in
8654 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008655 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008656 wish, for example, to separate the machine-specific and
8657 non-machine-specific parts of the command.
8658
Andrew Geisslerf0343792020-11-18 10:42:21 -06008659 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008660 The IP address of the build machine (host machine). This IP address
8661 is usually automatically detected. However, if detection fails, this
8662 variable needs to be set to the IP address of the build machine (i.e.
8663 where the build is taking place).
8664
8665 .. note::
8666
Andrew Geissler09036742021-06-25 14:25:14 -05008667 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008668 tests such as the "dnf" test suite, which needs to download packages
8669 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008670
Andrew Geisslerf0343792020-11-18 10:42:21 -06008671 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008672 An ordered list of tests (modules) to run against an image when
8673 performing automated runtime testing.
8674
8675 The OpenEmbedded build system provides a core set of tests that can
8676 be used against images.
8677
8678 .. note::
8679
8680 Currently, there is only support for running these tests under
8681 QEMU.
8682
8683 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05008684 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008685 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008686
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008687 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008688
8689 Alternatively, you can
8690 provide the "auto" option to have all applicable tests run against
Andrew Geissler517393d2023-01-13 08:55:19 -06008691 the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008692
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008693 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008694
8695 Using this option causes the
8696 build system to automatically run tests that are applicable to the
8697 image. Tests that are not applicable are skipped.
8698
8699 The order in which tests are run is important. Tests that depend on
8700 another test must appear later in the list than the test on which
8701 they depend. For example, if you append the list of tests with two
8702 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05008703 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008704
8705 TEST_SUITES = "test_A test_B"
8706
8707 For more information on testing images, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008708 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008709 section in the Yocto Project Development Tasks Manual.
8710
Andrew Geisslerf0343792020-11-18 10:42:21 -06008711 :term:`TEST_TARGET`
8712 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008713 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008714
8715 TEST_TARGET = "qemu"
8716
8717 A target controller is a class that defines how an image gets
8718 deployed on a target and how a target is started. A layer can extend
8719 the controllers by adding a module in the layer's
8720 ``/lib/oeqa/controllers`` directory and by inheriting the
8721 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05008722 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008723
Andrew Geissler5f350902021-07-23 13:09:54 -04008724 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06008725
8726 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06008727 ":ref:`dev-manual/runtime-testing:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06008728 in the Yocto Project Development Tasks Manual for more
8729 information.
8730
8731 - *"simpleremote":* Runs the tests on target hardware that is
8732 already up and running. The hardware can be on the network or it
8733 can be a device running an image on QEMU. You must also set
8734 :term:`TEST_TARGET_IP` when you use
8735 "simpleremote".
8736
8737 .. note::
8738
8739 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008740 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008741
8742 For information on running tests on hardware, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008743 ":ref:`dev-manual/runtime-testing:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008744 section in the Yocto Project Development Tasks Manual.
8745
8746 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05008747 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06008748 variable has no effect when :term:`TEST_TARGET` is
8749 set to "qemu".
8750
8751 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008752 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008753
8754 TEST_TARGET_IP = "192.168.1.4:2201"
8755
8756 Specifying a port is
8757 useful when SSH is started on a non-standard port or in cases when
8758 your hardware under test is behind a firewall or network that is not
8759 directly accessible from your host and you need to do port address
8760 translation.
8761
8762 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008763 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008764 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008765 any image that successfully builds to automatically boot under QEMU.
8766 Using the variable also adds in dependencies so that any SDK for
8767 which testing is requested is automatically built first.
8768
8769 These tests are written in Python making use of the ``unittest``
8770 module, and the majority of them run commands on the target system
8771 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8772 file in the :term:`Build Directory` to have the
8773 OpenEmbedded build system automatically run these tests after an
8774 image successfully builds:
8775
8776 TESTIMAGE_AUTO = "1"
8777
8778 For more information
8779 on enabling, running, and writing these tests, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008780 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008781 section in the Yocto Project Development Tasks Manual and the
Patrick Williams975a06f2022-10-21 14:42:47 -05008782 ":ref:`ref-classes-testimage`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008783
Andrew Geisslerf0343792020-11-18 10:42:21 -06008784 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008785 The directory in which the file BitBake is currently parsing is
8786 located. Do not manually set this variable.
8787
Andrew Geisslerf0343792020-11-18 10:42:21 -06008788 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008789 The time the build was started. Times appear using the hour, minute,
8790 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8791 seconds past 1400 hours).
8792
Andrew Geisslerf0343792020-11-18 10:42:21 -06008793 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008794 This variable is the base directory the OpenEmbedded build system
8795 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008796 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008797 ``tmp`` within the :term:`Build Directory`.
8798
8799 If you want to establish this directory in a location other than the
8800 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008801 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008802
8803 #TMPDIR = "${TOPDIR}/tmp"
8804
Andrew Geissler09036742021-06-25 14:25:14 -05008805 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Patrick Williams2390b1b2022-11-03 13:47:49 -05008806 which does not use NFS, while having the :term:`Build Directory` use NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008807
Andrew Geissler09036742021-06-25 14:25:14 -05008808 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008809 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8810 persistent inodes). Due to various issues with NFS and bugs in some
8811 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008812 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008813
Andrew Geisslerf0343792020-11-18 10:42:21 -06008814 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008815 This variable lists packages the OpenEmbedded build system uses when
8816 building an SDK, which contains a cross-development environment. The
8817 packages specified by this variable are part of the toolchain set
8818 that runs on the :term:`SDKMACHINE`, and each
8819 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008820 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008821
8822 $ bitbake -c populate_sdk imagename
8823
8824 In this case, a default list of packages is
8825 set in this variable, but you can add additional packages to the
8826 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008827 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008828 in the Yocto Project Application Development and the Extensible
8829 Software Development Kit (eSDK) manual for more information.
8830
8831 For background information on cross-development toolchains in the
8832 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008833 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008834 section in the Yocto Project Overview and Concepts Manual. For
8835 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008836 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008837
Andrew Geisslereff27472021-10-29 15:35:00 -05008838 Note that this variable applies to building an SDK, not an eSDK,
Andrew Geissler517393d2023-01-13 08:55:19 -06008839 in which case the :term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
Andrew Geisslereff27472021-10-29 15:35:00 -05008840 used instead.
8841
8842 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8843 This variable allows to extend what is installed in the host
8844 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8845 applying to SDKs.
8846
Andrew Geisslerf0343792020-11-18 10:42:21 -06008847 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008848 This variable defines the name used for the toolchain output. The
8849 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008850 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008851
8852 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8853
8854 See
8855 the :term:`SDK_NAME` and
8856 :term:`SDK_VERSION` variables for additional
8857 information.
8858
Andrew Geisslerf0343792020-11-18 10:42:21 -06008859 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008860 This variable lists packages the OpenEmbedded build system uses when
8861 it creates the target part of an SDK (i.e. the part built for the
8862 target hardware), which includes libraries and headers. Use this
8863 variable to add individual packages to the part of the SDK that runs
8864 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008865 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008866 in the Yocto Project Application Development and the Extensible
8867 Software Development Kit (eSDK) manual for more information.
8868
8869 For background information on cross-development toolchains in the
8870 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008871 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008872 section in the Yocto Project Overview and Concepts Manual. For
8873 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008874 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008875
Andrew Geissler517393d2023-01-13 08:55:19 -06008876 :term:`TOPDIR`
8877 See :term:`bitbake:TOPDIR` in the BitBake manual.
8878
Andrew Geisslerf0343792020-11-18 10:42:21 -06008879 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008880 A sanitized version of :term:`TARGET_ARCH`. This
8881 variable is used where the architecture is needed in a value where
8882 underscores are not allowed, for example within package filenames. In
8883 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008884 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008885
8886 Do not edit this variable.
8887
Andrew Geisslerf0343792020-11-18 10:42:21 -06008888 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008889 The GNU canonical architecture for a specific architecture (i.e.
8890 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8891 this value to setup configuration.
8892
Andrew Geissler09036742021-06-25 14:25:14 -05008893 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008894 definitions can be a single static definition, or can be dynamically
8895 adjusted. You can see details for a given CPU family by looking at
8896 the architecture's ``README`` file. For example, the
8897 ``meta/conf/machine/include/mips/README`` file in the
8898 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008899 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008900
Andrew Geissler09036742021-06-25 14:25:14 -05008901 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008902 :term:`TARGET_ARCH`, which defines the target
8903 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008904 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008905
8906 TARGET_ARCH = "${TUNE_ARCH}"
8907
8908 The following list, which is by no means complete since architectures
8909 are configurable, shows supported machine architectures:
8910
8911 - arm
8912 - i586
8913 - x86_64
8914 - powerpc
8915 - powerpc64
8916 - mips
8917 - mipsel
8918
Andrew Geisslerf0343792020-11-18 10:42:21 -06008919 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008920 Specifies architecture-specific assembler flags for the target
8921 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008922 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008923 typically under ``meta/conf/machine/include/`` and are influenced
8924 through :term:`TUNE_FEATURES`. For example, the
8925 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008926 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008927
8928 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8929
8930 .. note::
8931
8932 Board Support Packages (BSPs) select the tune. The selected tune,
8933 in turn, affects the tune variables themselves (i.e. the tune can
8934 supply its own set of flags).
8935
Andrew Geisslerf0343792020-11-18 10:42:21 -06008936 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008937 Specifies architecture-specific C compiler flags for the target
8938 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008939 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008940 typically under ``meta/conf/machine/include/`` and are influenced
8941 through :term:`TUNE_FEATURES`.
8942
8943 .. note::
8944
8945 Board Support Packages (BSPs) select the tune. The selected tune,
8946 in turn, affects the tune variables themselves (i.e. the tune can
8947 supply its own set of flags).
8948
Andrew Geisslerf0343792020-11-18 10:42:21 -06008949 :term:`TUNE_FEATURES`
8950 Features used to "tune" a compiler for optimal use given a specific
8951 processor. The features are defined within the tune files and allow
8952 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8953 the features.
8954
8955 The OpenEmbedded build system verifies the features to be sure they
8956 are not conflicting and that they are supported.
8957
8958 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008959 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008960
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008961 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008962
8963 See the :term:`DEFAULTTUNE` variable for more information.
8964
8965 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008966 Specifies architecture-specific linker flags for the target system.
8967 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008968 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008969 typically under ``meta/conf/machine/include/`` and are influenced
8970 through :term:`TUNE_FEATURES`. For example, the
8971 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008972 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008973
8974 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8975
8976 .. note::
8977
8978 Board Support Packages (BSPs) select the tune. The selected tune,
8979 in turn, affects the tune variables themselves (i.e. the tune can
8980 supply its own set of flags).
8981
Andrew Geisslerf0343792020-11-18 10:42:21 -06008982 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008983 The package architecture understood by the packaging system to define
8984 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008985 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008986
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008987 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008988
8989 These tune-specific package architectures are defined in the machine
8990 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008991 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008992
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008993 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008994
Andrew Geisslerf0343792020-11-18 10:42:21 -06008995 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008996 Specifies CPU or Application Binary Interface (ABI) tuning features
8997 that conflict with feature.
8998
8999 Known tuning conflicts are specified in the machine include files in
9000 the :term:`Source Directory`. Here is an example from
9001 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
9002 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05009003 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009004
9005 TUNECONFLICTS[n32] = "o32 n64"
9006
Andrew Geisslerf0343792020-11-18 10:42:21 -06009007 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009008 Specifies a valid CPU or Application Binary Interface (ABI) tuning
9009 feature. The specified feature is stored as a flag. Valid features
9010 are specified in the machine include files (e.g.
9011 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05009012 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009013
9014 TUNEVALID[bigendian] = "Enable big-endian mode."
9015
9016 See the machine include files in the :term:`Source Directory`
9017 for these features.
9018
Andrew Geisslerf0343792020-11-18 10:42:21 -06009019 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009020 Configures the :term:`UBOOT_MACHINE` and can
9021 also define :term:`IMAGE_FSTYPES` for individual
9022 cases.
9023
9024 Following is an example from the ``meta-fsl-arm`` layer. ::
9025
9026 UBOOT_CONFIG ??= "sd"
9027 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
9028 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
9029 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
9030 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
9031
9032 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05009033 :term:`UBOOT_MACHINE`. The "sd" configuration defines
9034 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04009035 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009036
Andrew Geissler09036742021-06-25 14:25:14 -05009037 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009038 :ref:`ref-classes-uboot-config` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009039
Andrew Geisslerf0343792020-11-18 10:42:21 -06009040 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009041 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05009042 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geissler517393d2023-01-13 08:55:19 -06009043 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be
9044 used in creating the dtb sections of Image Tree Source for the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009045
Andrew Geisslerf0343792020-11-18 10:42:21 -06009046 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009047 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05009048 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geissler517393d2023-01-13 08:55:19 -06009049 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be
9050 used in creating the dtbo sections of Image Tree Source for the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009051
Andrew Geisslerf0343792020-11-18 10:42:21 -06009052 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009053 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05009054 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009055 command-line parameter to the ``uboot-mkimage`` utility.
9056
Andrew Geisslerf0343792020-11-18 10:42:21 -06009057 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009058 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05009059 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009060 command-line parameter to the ``uboot-mkimage`` utility.
9061
Andrew Geisslerf0343792020-11-18 10:42:21 -06009062 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009063 Appends a string to the name of the local version of the U-Boot
9064 image. For example, assuming the version of the U-Boot image built
9065 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05009066 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009067
9068 UBOOT_LOCALVERSION = "-yocto"
9069
Andrew Geisslerf0343792020-11-18 10:42:21 -06009070 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009071 Specifies the value passed on the ``make`` command line when building
9072 a U-Boot image. The value indicates the target platform
9073 configuration. You typically set this variable from the machine
9074 configuration file (i.e. ``conf/machine/machine_name.conf``).
9075
9076 Please see the "Selection of Processor Architecture and Board Type"
9077 section in the U-Boot README for valid values for this variable.
9078
Andrew Geisslerf0343792020-11-18 10:42:21 -06009079 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009080 Specifies the target called in the ``Makefile``. The default target
9081 is "all".
9082
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009083 :term:`UBOOT_MKIMAGE`
9084 Specifies the name of the mkimage command as used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06009085 :ref:`ref-classes-kernel-fitimage` class to assemble
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009086 the FIT image. This can be used to substitute an alternative command, wrapper
9087 script or function if desired. The default is "uboot-mkimage".
9088
Andrew Geisslerf0343792020-11-18 10:42:21 -06009089 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geissler517393d2023-01-13 08:55:19 -06009090 Options for the device tree compiler passed to mkimage '-D' feature while
9091 creating FIT image in :ref:`ref-classes-kernel-fitimage` class. If
9092 :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then
9093 :ref:`ref-classes-kernel-fitimage` will not pass the ``-D`` option to
9094 mkimage.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009095
Patrick Williams975a06f2022-10-21 14:42:47 -05009096 :term:`UBOOT_MKIMAGE_KERNEL_TYPE`
9097 Specifies the type argument for the kernel as passed to ``uboot-mkimage``.
9098 The default value is "kernel".
9099
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009100 :term:`UBOOT_MKIMAGE_SIGN`
9101 Specifies the name of the mkimage command as used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06009102 :ref:`ref-classes-kernel-fitimage` class to sign
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009103 the FIT image after it has been assembled (if enabled). This can be used
9104 to substitute an alternative command, wrapper script or function if
9105 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
9106
9107 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
9108 Optionally specifies additional arguments for the
Andrew Geissler517393d2023-01-13 08:55:19 -06009109 :ref:`ref-classes-kernel-fitimage` class to pass to the
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009110 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009111
Andrew Geisslerf0343792020-11-18 10:42:21 -06009112 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06009113 Specifies the entrypoint for the RAM disk image. During FIT image
9114 creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in
9115 :ref:`ref-classes-kernel-fitimage` class to specify the entrypoint to be
9116 used in creating the Image Tree Source for the FIT image.
Andrew Geissler4873add2020-11-02 18:44:49 -06009117
Andrew Geisslerf0343792020-11-18 10:42:21 -06009118 :term:`UBOOT_RD_LOADADDRESS`
Andrew Geissler517393d2023-01-13 08:55:19 -06009119 Specifies the load address for the RAM disk image. During FIT image
9120 creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in
9121 :ref:`ref-classes-kernel-fitimage` class to specify the load address to
9122 be used in creating the Image Tree Source for the FIT image.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009123
9124 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009125 Enable signing of FIT image. The default value is "0".
9126
Andrew Geisslerf0343792020-11-18 10:42:21 -06009127 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009128 Location of the directory containing the RSA key and
9129 certificate used for signing FIT image.
9130
Andrew Geisslerf0343792020-11-18 10:42:21 -06009131 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009132 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009133 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
9134 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
9135 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
9136
Andrew Geisslerf0343792020-11-18 10:42:21 -06009137 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009138 Points to the generated U-Boot extension. For example, ``u-boot.sb``
9139 has a ``.sb`` extension.
9140
9141 The default U-Boot extension is ``.bin``
9142
Andrew Geisslerf0343792020-11-18 10:42:21 -06009143 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009144 Specifies the target used for building U-Boot. The target is passed
9145 directly as part of the "make" command (e.g. SPL and AIS). If you do
9146 not specifically set this variable, the OpenEmbedded build process
9147 passes and uses "all" for the target during the U-Boot building
9148 process.
9149
Andrew Geissler9aee5002022-03-30 16:27:02 +00009150 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009151 Specifies a list of options that, if reported by the configure script
9152 as being invalid, should not generate a warning during the
9153 :ref:`ref-tasks-configure` task. Normally, invalid
9154 configure options are simply not passed to the configure script (e.g.
9155 should be removed from :term:`EXTRA_OECONF` or
9156 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07009157 However, there are common options that are passed to all
9158 configure scripts at a class level, but might not be valid for some
9159 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00009160 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009161
9162 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00009163 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geissler517393d2023-01-13 08:55:19 -06009164 :ref:`ref-classes-insane` class and is only enabled if the
9165 recipe inherits the :ref:`ref-classes-autotools` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009166
Andrew Geisslerf0343792020-11-18 10:42:21 -06009167 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009168 For recipes inheriting the
Andrew Geissler517393d2023-01-13 08:55:19 -06009169 :ref:`ref-classes-update-rc.d` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009170 specifies the package that contains the initscript that is enabled.
9171
9172 The default value is "${PN}". Given that almost all recipes that
9173 install initscripts package them in the main package for the recipe,
9174 you rarely need to set this variable in individual recipes.
9175
Andrew Geissler5199d832021-09-24 16:47:35 -05009176 :term:`UPSTREAM_CHECK_COMMITS`
9177 You can perform a per-recipe check for what the latest upstream
9178 source code version is by calling ``devtool latest-version recipe``. If
9179 the recipe source code is provided from Git repositories, but
9180 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
9181 to ``1`` in the recipe, and the OpenEmbedded build system
9182 will compare the latest commit with the one currently specified
Andrew Geissler517393d2023-01-13 08:55:19 -06009183 by the recipe (:term:`SRCREV`)::
Andrew Geissler5199d832021-09-24 16:47:35 -05009184
9185 UPSTREAM_CHECK_COMMITS = "1"
9186
Andrew Geisslerf0343792020-11-18 10:42:21 -06009187 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009188 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05009189 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009190 the recipe source code is provided from Git repositories, the
9191 OpenEmbedded build system determines the latest upstream version by
9192 picking the latest tag from the list of all repository tags.
9193
Andrew Geissler09036742021-06-25 14:25:14 -05009194 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009195 regular expression to filter only the relevant tags should the
Andrew Geissler517393d2023-01-13 08:55:19 -06009196 default filter not work correctly::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009197
9198 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
9199
Andrew Geisslerf0343792020-11-18 10:42:21 -06009200 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05009201 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009202 regular expression instead of the default one when the package
9203 checking system is parsing the page found using
Andrew Geissler517393d2023-01-13 08:55:19 -06009204 :term:`UPSTREAM_CHECK_URI`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009205
9206 UPSTREAM_CHECK_REGEX = "package_regex"
9207
Andrew Geisslerf0343792020-11-18 10:42:21 -06009208 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009209 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05009210 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009211 the source code is provided from tarballs, the latest version is
9212 determined by fetching the directory listing where the tarball is and
9213 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05009214 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geissler517393d2023-01-13 08:55:19 -06009215 contains the link to the latest tarball::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009216
9217 UPSTREAM_CHECK_URI = "recipe_url"
9218
Andrew Geissler5199d832021-09-24 16:47:35 -05009219 :term:`UPSTREAM_VERSION_UNKNOWN`
9220 You can perform a per-recipe check for what the latest upstream
9221 source code version is by calling ``devtool latest-version recipe``.
9222 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
9223 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
9224 the recipe allows to determine what the latest upstream version is,
9225 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
Andrew Geissler517393d2023-01-13 08:55:19 -06009226 to acknowledge that the check cannot be performed::
Andrew Geissler5199d832021-09-24 16:47:35 -05009227
9228 UPSTREAM_VERSION_UNKNOWN = "1"
9229
Andrew Geisslerf0343792020-11-18 10:42:21 -06009230 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009231 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05009232 default value used for :term:`USE_DEVFS` is "1" when no value is
9233 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009234 statically populated ``/dev`` directory.
9235
Andrew Geissler517393d2023-01-13 08:55:19 -06009236 See the ":ref:`dev-manual/device-manager:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009237 the Yocto Project Development Tasks Manual for information on how to
9238 use this variable.
9239
Andrew Geisslerf0343792020-11-18 10:42:21 -06009240 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009241 When using
Andrew Geissler517393d2023-01-13 08:55:19 -06009242 :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009243 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009244 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009245 virtual terminals in order to enable logging in through those
9246 terminals.
9247
Andrew Geissler09036742021-06-25 14:25:14 -05009248 The default value used for :term:`USE_VT` is "1" when no default value is
9249 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009250 machine configuration file for machines that do not have a graphical
9251 display attached and therefore do not need virtual terminal
9252 functionality.
9253
Andrew Geisslerf0343792020-11-18 10:42:21 -06009254 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009255 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00009256 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009257
Patrick Williams975a06f2022-10-21 14:42:47 -05009258 Classes inherited using :term:`USER_CLASSES` must be located in the
9259 ``classes-global/`` or ``classes/`` subdirectories.
9260
Andrew Geisslerc926e172021-05-07 16:11:35 -05009261 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009262
Andrew Geissler9aee5002022-03-30 16:27:02 +00009263 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009264
9265 For more information, see
Andrew Geissler87f5cff2022-09-30 13:13:31 -05009266 ``meta-poky/conf/templates/default/local.conf.sample`` in the
9267 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009268
Andrew Geisslerf0343792020-11-18 10:42:21 -06009269 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009270 If set to ``error``, forces the OpenEmbedded build system to produce
9271 an error if the user identification (``uid``) and group
9272 identification (``gid``) values are not defined in any of the files
9273 listed in :term:`USERADD_UID_TABLES` and
9274 :term:`USERADD_GID_TABLES`. If set to
9275 ``warn``, a warning will be issued instead.
9276
9277 The default behavior for the build system is to dynamically apply
9278 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05009279 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009280 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05009281 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05009282 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009283
9284 USERADD_ERROR_DYNAMIC = "error"
9285
9286 Overriding the
9287 default behavior implies you are going to also take steps to set
9288 static ``uid`` and ``gid`` values through use of the
9289 :term:`USERADDEXTENSION`,
9290 :term:`USERADD_UID_TABLES`, and
9291 :term:`USERADD_GID_TABLES` variables.
9292
9293 .. note::
9294
9295 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05009296 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009297 When it is set to ``warn``, the build system will report a warning for
9298 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
9299 to ``error``, it will only report errors for recipes that are actually
9300 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009301 This saves you from having to add static IDs for recipes that you
9302 know will never be built.
9303
Andrew Geisslerf0343792020-11-18 10:42:21 -06009304 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009305 Specifies a password file to use for obtaining static group
9306 identification (``gid``) values when the OpenEmbedded build system
9307 adds a group to the system during package installation.
9308
9309 When applying static group identification (``gid``) values, the
9310 OpenEmbedded build system looks in :term:`BBPATH` for a
9311 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05009312 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009313
9314
9315 USERADD_GID_TABLES = "files/group"
9316
9317 .. note::
9318
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009319 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
9320 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009321
Andrew Geisslerf0343792020-11-18 10:42:21 -06009322 :term:`USERADD_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06009323 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009324 this variable specifies the individual packages within the recipe
9325 that require users and/or groups to be added.
9326
9327 You must set this variable if the recipe inherits the class. For
9328 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05009329 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009330
9331 USERADD_PACKAGES = "${PN}"
9332
9333 .. note::
9334
Andrew Geissler09036742021-06-25 14:25:14 -05009335 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009336 variable, you need to set one or more of the :term:`USERADD_PARAM`,
9337 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009338
Andrew Geisslerf0343792020-11-18 10:42:21 -06009339 :term:`USERADD_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06009340 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009341 this variable specifies for a package what parameters should pass to
9342 the ``useradd`` command if you add a user to the system when the
9343 package is installed.
9344
Andrew Geisslerc926e172021-05-07 16:11:35 -05009345 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009346
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009347 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009348 --no-create-home --shell /bin/false \
9349 --user-group messagebus"
9350
9351 For information on the
9352 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009353 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009354
Andrew Geisslerf0343792020-11-18 10:42:21 -06009355 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009356 Specifies a password file to use for obtaining static user
9357 identification (``uid``) values when the OpenEmbedded build system
9358 adds a user to the system during package installation.
9359
9360 When applying static user identification (``uid``) values, the
9361 OpenEmbedded build system looks in :term:`BBPATH` for a
9362 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05009363 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009364
9365 USERADD_UID_TABLES = "files/passwd"
9366
9367 .. note::
9368
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009369 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
9370 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009371
Andrew Geisslerf0343792020-11-18 10:42:21 -06009372 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009373 When set to "useradd-staticids", causes the OpenEmbedded build system
9374 to base all user and group additions on a static ``passwd`` and
9375 ``group`` files found in :term:`BBPATH`.
9376
9377 To use static user identification (``uid``) and group identification
9378 (``gid``) values, set the variable as follows in your ``local.conf``
9379 file: USERADDEXTENSION = "useradd-staticids"
9380
9381 .. note::
9382
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009383 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009384 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009385 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009386
9387 If you use static ``uid`` and ``gid`` information, you must also
9388 specify the ``files/passwd`` and ``files/group`` files by setting the
9389 :term:`USERADD_UID_TABLES` and
9390 :term:`USERADD_GID_TABLES` variables.
9391 Additionally, you should also set the
9392 :term:`USERADD_ERROR_DYNAMIC` variable.
9393
Andrew Geisslerf0343792020-11-18 10:42:21 -06009394 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009395 Specifies the persistence of the target's ``/var/log`` directory,
9396 which is used to house postinstall target log files.
9397
Andrew Geissler09036742021-06-25 14:25:14 -05009398 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009399 file is not persistent. You can override this setting by setting the
9400 variable to "no" to make the log directory persistent.
9401
Andrew Geisslerf0343792020-11-18 10:42:21 -06009402 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009403 Specifies the quality assurance checks whose failures are reported as
9404 warnings by the OpenEmbedded build system. You set this variable in
9405 your distribution configuration file. For a list of the checks you
9406 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00009407 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009408
Patrick Williams975a06f2022-10-21 14:42:47 -05009409 :term:`WATCHDOG_TIMEOUT`
9410 Specifies the timeout in seconds used by the ``watchdog`` recipe and
9411 also by ``systemd`` during reboot. The default is 60 seconds.
9412
9413 :term:`WIRELESS_DAEMON`
9414 For ``connman`` and ``packagegroup-base``, specifies the wireless
9415 daemon to use. The default is "wpa-supplicant" (note that the value
9416 uses a dash and not an underscore).
9417
Andrew Geisslerf0343792020-11-18 10:42:21 -06009418 :term:`WKS_FILE`
9419 Specifies the location of the Wic kickstart file that is used by the
9420 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05009421 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06009422 image, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009423 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06009424 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06009425 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009426
9427 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009428 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05009429 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009430 applicable when Wic images are active (i.e. when
9431 :term:`IMAGE_FSTYPES` contains entries related
9432 to Wic). If your recipe does not create Wic images, the variable has
9433 no effect.
9434
Andrew Geissler09036742021-06-25 14:25:14 -05009435 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009436 :term:`DEPENDS` variable. When you use the variable in
9437 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05009438 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009439
Andrew Geissler09036742021-06-25 14:25:14 -05009440 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009441 specify a list of additional dependencies (e.g. native tools,
9442 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05009443 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009444
9445 WKS_FILE_DEPENDS = "some-native-tool"
9446
9447 In the
9448 previous example, some-native-tool would be replaced with an actual
9449 native tool on which the build would depend.
9450
Andrew Geisslerd5838332022-05-27 11:33:10 -05009451 :term:`WKS_FILES`
9452 Specifies a list of candidate Wic kickstart files to be used by the
9453 OpenEmbedded build system to create a partitioned image. Only the
9454 first one that is found, from left to right, will be used.
9455
9456 This is only useful when there are multiple ``.wks`` files that can be
9457 used to produce an image. A typical case is when multiple layers are
9458 used for different hardware platforms, each supplying a different
9459 ``.wks`` file. In this case, you specify all possible ones through
9460 :term:`WKS_FILES`.
9461
9462 If only one ``.wks`` file is used, set :term:`WKS_FILE` instead.
9463
Andrew Geisslerf0343792020-11-18 10:42:21 -06009464 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009465 The pathname of the work directory in which the OpenEmbedded build
9466 system builds a recipe. This directory is located within the
9467 :term:`TMPDIR` directory structure and is specific to
9468 the recipe being built and the system for which it is being built.
9469
Andrew Geissler09036742021-06-25 14:25:14 -05009470 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009471
9472 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
9473
9474 The actual directory depends on several things:
9475
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009476 - :term:`TMPDIR`: The top-level build output directory
9477 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
9478 - :term:`PN`: The recipe name
Andrew Geissler615f2f12022-07-15 14:00:58 -05009479 - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which
Andrew Geissler517393d2023-01-13 08:55:19 -06009480 is usually the case for most recipes, then :term:`EXTENDPE` is blank.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009481 - :term:`PV`: The recipe version
9482 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009483
9484 As an example, assume a Source Directory top-level folder name
Patrick Williams2390b1b2022-11-03 13:47:49 -05009485 ``poky``, a default :term:`Build Directory` at ``poky/build``, and a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009486 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
9487 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
9488 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05009489 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009490
9491 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
9492
Andrew Geisslerf0343792020-11-18 10:42:21 -06009493 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009494 Specifies the packages that should be installed to provide an X
9495 server and drivers for the current machine, assuming your image
9496 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
9497 indirectly, includes "x11-base" in
9498 :term:`IMAGE_FEATURES`.
9499
Andrew Geissler09036742021-06-25 14:25:14 -05009500 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009501 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
Patrick Williams03907ee2022-05-01 06:28:52 -05009502
9503 :term:`XZ_THREADS`
9504 Specifies the number of parallel threads that should be used when
9505 using xz compression.
9506
9507 By default this scales with core count, but is never set less than 2
9508 to ensure that multi-threaded mode is always used so that the output
9509 file contents are deterministic. Builds will work with a value of 1
9510 but the output will differ compared to the output from the compression
9511 generated when more than one thread is used.
9512
9513 On systems where many tasks run in parallel, setting a limit to this
9514 can be helpful in controlling system resource usage.
9515
Andrew Geissler517393d2023-01-13 08:55:19 -06009516 :term:`XZ_MEMLIMIT`
Patrick Williams03907ee2022-05-01 06:28:52 -05009517 Specifies the maximum memory the xz compression should use as a percentage
9518 of system memory. If unconstrained the xz compressor can use large amounts of
9519 memory and become problematic with parallelism elsewhere in the build.
9520 "50%" has been found to be a good value.
9521
9522 :term:`ZSTD_THREADS`
9523 Specifies the number of parallel threads that should be used when
9524 using ZStandard compression.
9525
9526 By default this scales with core count, but is never set less than 2
9527 to ensure that multi-threaded mode is always used so that the output
9528 file contents are deterministic. Builds will work with a value of 1
9529 but the output will differ compared to the output from the compression
9530 generated when more than one thread is used.
9531
9532 On systems where many tasks run in parallel, setting a limit to this
9533 can be helpful in controlling system resource usage.