blob: 6e66dc7358d734d4f6ac25475176868f1d38ef28 [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:`AUTO_LIBNAME_PKGS`
Andrew Geissler517393d2023-01-13 08:55:19 -0600196 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500197 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500198 packages should be checked for libraries and renamed according to
199 Debian library package naming.
200
Andrew Geissler517393d2023-01-13 08:55:19 -0600201 The default value is "${PACKAGES}", which causes the
202 :ref:`ref-classes-debian` class to act on all packages that are
203 explicitly generated by the recipe.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500204
Andrew Geisslerf0343792020-11-18 10:42:21 -0600205 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500206 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500207 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500208
209 SRCREV = "${AUTOREV}"
210
211 If you use the previous statement to retrieve the latest version of
212 software, you need to be sure :term:`PV` contains
Andrew Geissler517393d2023-01-13 08:55:19 -0600213 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel
214 recipe that inherits the :ref:`ref-classes-kernel` class and you
215 use the previous statement. In this example, ``${SRCPV}`` does not
216 automatically get into :term:`PV`. Consequently, you need to change
217 :term:`PV` in your recipe so that it does contain ``${SRCPV}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500218
219 For more information see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600220 ":ref:`dev-manual/packages:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500221 section in the Yocto Project Development Tasks Manual.
222
Andrew Geissler9aee5002022-03-30 16:27:02 +0000223 :term:`AUTO_SYSLINUXMENU`
224 Enables creating an automatic menu for the syslinux bootloader. You
225 must set this variable in your recipe. The
Andrew Geissler517393d2023-01-13 08:55:19 -0600226 :ref:`ref-classes-syslinux` class checks this variable.
Andrew Geissler9aee5002022-03-30 16:27:02 +0000227
Andrew Geisslerf0343792020-11-18 10:42:21 -0600228 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500229 The list of defined CPU and Application Binary Interface (ABI)
230 tunings (i.e. "tunes") available for use by the OpenEmbedded build
231 system.
232
233 The list simply presents the tunes that are available. Not all tunes
234 may be compatible with a particular machine configuration, or with
235 each other in a
Andrew Geissler517393d2023-01-13 08:55:19 -0600236 :ref:`Multilib <dev-manual/libraries:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500237 configuration.
238
239 To add a tune to the list, be sure to append it with spaces using the
240 "+=" BitBake operator. Do not simply replace the list by using the
241 "=" operator. See the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500242 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500243 User Manual for more information.
244
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500245 :term:`AZ_SAS`
246 Azure Storage Shared Access Signature, when using the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500247 :ref:`Azure Storage fetcher (az://) <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500248 This variable can be defined to be used by the fetcher to authenticate
Andrew Geissler517393d2023-01-13 08:55:19 -0600249 and gain access to non-public artifacts::
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500250
251 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
252
253 For more information see Microsoft's Azure Storage documentation at
254 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
255
Andrew Geisslerf0343792020-11-18 10:42:21 -0600256 :term:`B`
Patrick Williams2390b1b2022-11-03 13:47:49 -0500257 The directory within the :term:`Build Directory` in which the
258 OpenEmbedded build system places generated objects during a recipe's
259 build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500260 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500261
262 S = "${WORKDIR}/${BP}"
263
Andrew Geissler09036742021-06-25 14:25:14 -0500264 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400265 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500266 separating these directories. The build system defaults to using
267 separate directories for ``gcc`` and some kernel recipes.
268
Andrew Geisslerf0343792020-11-18 10:42:21 -0600269 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500270 Lists "recommended-only" packages to not install. Recommended-only
271 packages are packages installed only through the
272 :term:`RRECOMMENDS` variable. You can prevent any
273 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500274 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500275
276 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
277
278 You can set this variable globally in your ``local.conf`` file or you
279 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500280 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500281
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500282 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500283
284 It is important to realize that if you choose to not install packages
285 using this variable and some other packages are dependent on them
286 (i.e. listed in a recipe's :term:`RDEPENDS`
287 variable), the OpenEmbedded build system ignores your request and
288 will install the packages to avoid dependency errors.
289
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700290 This variable is supported only when using the IPK and RPM
291 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500292
293 See the :term:`NO_RECOMMENDATIONS` and the
294 :term:`PACKAGE_EXCLUDE` variables for related
295 information.
296
Andrew Geisslerf0343792020-11-18 10:42:21 -0600297 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500298 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500299 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler517393d2023-01-13 08:55:19 -0600300 context. See the ":ref:`dev-manual/libraries:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500301 section in the Yocto Project Development Tasks Manual for information
302 on Multilib.
303
Andrew Geissler09036742021-06-25 14:25:14 -0500304 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500305 the :term:`Source Directory`. If Multilib is not
306 being used, the value defaults to "lib".
307
Andrew Geisslerf0343792020-11-18 10:42:21 -0600308 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500309 Points to the base of the work directory for all recipes. The default
310 value is "${TMPDIR}/work".
311
Andrew Geisslerf0343792020-11-18 10:42:21 -0600312 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500313 Specifies a space-delimited list of hosts that the fetcher is allowed
Patrick Williams39653562024-03-01 08:54:02 -0600314 to use to obtain the required source code. Here are
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500315 considerations surrounding this variable:
316
Andrew Geissler09036742021-06-25 14:25:14 -0500317 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500318 or set to "0".
319
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700320 - There is limited support for wildcard matching against the beginning of
321 host names. For example, the following setting matches
Andrew Geissler517393d2023-01-13 08:55:19 -0600322 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500323
324 BB_ALLOWED_NETWORKS = "*.gnu.org"
325
326 .. note::
327
328 The use of the "``*``" character only works at the beginning of
329 a host name and it must be isolated from the remainder of the
330 host name. You cannot use the wildcard character in any other
331 location of the name or combined with the front part of the
332 name.
333
334 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
335 is not.
336
337 - Mirrors not in the host list are skipped and logged in debug.
338
339 - Attempts to access networks not in the host list cause a failure.
340
Andrew Geissler09036742021-06-25 14:25:14 -0500341 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500342 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500343 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500344 fetched from an allowed location and avoids raising an error when a
345 host that is not allowed is in a :term:`SRC_URI`
346 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500347 host listed in :term:`SRC_URI` after a successful fetch from the
348 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500349
Andrew Geissler517393d2023-01-13 08:55:19 -0600350 :term:`BB_BASEHASH_IGNORE_VARS`
351 See :term:`bitbake:BB_BASEHASH_IGNORE_VARS` in the BitBake manual.
352
Patrick Williams8e7b46e2023-05-01 14:19:06 -0500353 :term:`BB_CACHEDIR`
354 See :term:`bitbake:BB_CACHEDIR` in the BitBake manual.
355
Andrew Geissler517393d2023-01-13 08:55:19 -0600356 :term:`BB_CHECK_SSL_CERTS`
357 See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual.
358
359 :term:`BB_CONSOLELOG`
360 See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual.
361
362 :term:`BB_CURRENTTASK`
363 See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual.
364
Andrew Geisslerf0343792020-11-18 10:42:21 -0600365 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500366 Defines how BitBake handles situations where an append file
367 (``.bbappend``) has no corresponding recipe file (``.bb``). This
368 condition often occurs when layers get out of sync (e.g. ``oe-core``
369 bumps a recipe version and the old recipe no longer exists and the
370 other layer has not been updated to the new version of the recipe
371 yet).
372
373 The default fatal behavior is safest because it is the sane reaction
374 given something is out of sync. It is important to realize when your
375 changes are no longer being applied.
376
377 You can change the default behavior by setting this variable to "1",
378 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500379 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500380
381 BB_DANGLINGAPPENDS_WARNONLY = "1"
382
Andrew Geissler517393d2023-01-13 08:55:19 -0600383 :term:`BB_DEFAULT_TASK`
384 See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual.
385
386 :term:`BB_DEFAULT_UMASK`
387 See :term:`bitbake:BB_DEFAULT_UMASK` in the BitBake manual.
388
Andrew Geisslerf0343792020-11-18 10:42:21 -0600389 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500390 Monitors disk space and available inodes during the build and allows
391 you to control the build based on these parameters.
392
393 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500394 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500395 found in the :term:`Build Directory`. Use the
396 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500397
398 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500399
400 BB_DISKMON_DIRS = "action,dir,threshold [...]"
401
402 where:
403
404 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000405 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500406 a threshold is broken.
407 STOPTASKS: Stop the build after the currently
408 executing tasks have finished when
409 a threshold is broken.
410 WARN: Issue a warning but continue the
411 build when a threshold is broken.
412 Subsequent warnings are issued as
413 defined by the BB_DISKMON_WARNINTERVAL
414 variable, which must be defined in
415 the conf/local.conf file.
416
417 dir is:
418 Any directory you choose. You can specify one or
419 more directories to monitor by separating the
420 groupings with a space. If two directories are
421 on the same device, only the first directory
422 is monitored.
423
424 threshold is:
425 Either the minimum available disk space,
426 the minimum number of free inodes, or
427 both. You must specify at least one. To
428 omit one or the other, simply omit the value.
429 Specify the threshold using G, M, K for Gbytes,
430 Mbytes, and Kbytes, respectively. If you do
431 not specify G, M, or K, Kbytes is assumed by
432 default. Do not use GB, MB, or KB.
433
Andrew Geisslerc926e172021-05-07 16:11:35 -0500434 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500435
436 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
437 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
438 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
439
440 The first example works only if you also provide the
441 :term:`BB_DISKMON_WARNINTERVAL`
442 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000443 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500444 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
445 below 100 Kbytes. Because two directories are provided with the
446 variable, the build system also issue a warning when the disk space
447 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
448 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500449 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500450 variable.
451
452 The second example stops the build after all currently executing
453 tasks complete when the minimum disk space in the ``${TMPDIR}``
454 directory drops below 1 Gbyte. No disk monitoring occurs for the free
455 inodes in this case.
456
Andrew Geissler595f6302022-01-24 19:11:47 +0000457 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500458 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
459 disk space monitoring for the directory itself occurs in this case.
460
Andrew Geisslerf0343792020-11-18 10:42:21 -0600461 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500462 Defines the disk space and free inode warning intervals. To set these
463 intervals, define the variable in your ``conf/local.conf`` file in
464 the :term:`Build Directory`.
465
Andrew Geissler09036742021-06-25 14:25:14 -0500466 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500467 must also use the :term:`BB_DISKMON_DIRS`
468 variable and define its action as "WARN". During the build,
469 subsequent warnings are issued each time disk space or number of free
470 inodes further reduces by the respective interval.
471
Andrew Geissler09036742021-06-25 14:25:14 -0500472 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
473 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500474 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500475
476 BB_DISKMON_WARNINTERVAL = "50M,5K"
477
478 When specifying the variable in your configuration file, use the
479 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500480
481 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500482
483 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
484
485 where:
486
487 disk_space_interval is:
488 An interval of memory expressed in either
489 G, M, or K for Gbytes, Mbytes, or Kbytes,
490 respectively. You cannot use GB, MB, or KB.
491
492 disk_inode_interval is:
493 An interval of free inodes expressed in either
494 G, M, or K for Gbytes, Mbytes, or Kbytes,
495 respectively. You cannot use GB, MB, or KB.
496
Andrew Geisslerc926e172021-05-07 16:11:35 -0500497 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500498
499 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
500 BB_DISKMON_WARNINTERVAL = "50M,5K"
501
502 These variables cause the
503 OpenEmbedded build system to issue subsequent warnings each time the
504 available disk space further reduces by 50 Mbytes or the number of
505 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
506 directory. Subsequent warnings based on the interval occur each time
507 a respective interval is reached beyond the initial warning (i.e. 1
508 Gbytes and 100 Kbytes).
509
Andrew Geissler517393d2023-01-13 08:55:19 -0600510 :term:`BB_ENV_PASSTHROUGH`
511 See :term:`bitbake:BB_ENV_PASSTHROUGH` in the BitBake manual.
512
513 :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
514 See :term:`bitbake:BB_ENV_PASSTHROUGH_ADDITIONS` in the BitBake manual.
515
516 :term:`BB_FETCH_PREMIRRORONLY`
517 See :term:`bitbake:BB_FETCH_PREMIRRORONLY` in the BitBake manual.
518
519 :term:`BB_FILENAME`
520 See :term:`bitbake:BB_FILENAME` in the BitBake manual.
521
Andrew Geisslerf0343792020-11-18 10:42:21 -0600522 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500523 Causes tarballs of the source control repositories (e.g. Git
524 repositories), including metadata, to be placed in the
525 :term:`DL_DIR` directory.
526
527 For performance reasons, creating and placing tarballs of these
528 repositories is not the default action by the OpenEmbedded build
Andrew Geissler517393d2023-01-13 08:55:19 -0600529 system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500530
531 BB_GENERATE_MIRROR_TARBALLS = "1"
532
533 Set this variable in your
534 ``local.conf`` file in the :term:`Build Directory`.
535
536 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500537 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500538 source control work directories.
539
Andrew Geissler517393d2023-01-13 08:55:19 -0600540 :term:`BB_GENERATE_SHALLOW_TARBALLS`
541 See :term:`bitbake:BB_GENERATE_SHALLOW_TARBALLS` in the BitBake manual.
542
543 :term:`BB_GIT_SHALLOW`
544 See :term:`bitbake:BB_GIT_SHALLOW` in the BitBake manual.
545
546 :term:`BB_GIT_SHALLOW_DEPTH`
547 See :term:`bitbake:BB_GIT_SHALLOW_DEPTH` in the BitBake manual.
548
549 :term:`BB_HASHCHECK_FUNCTION`
550 See :term:`bitbake:BB_HASHCHECK_FUNCTION` in the BitBake manual.
551
552 :term:`BB_HASHCONFIG_IGNORE_VARS`
553 See :term:`bitbake:BB_HASHCONFIG_IGNORE_VARS` in the BitBake manual.
554
555 :term:`BB_HASHSERVE`
556 See :term:`bitbake:BB_HASHSERVE` in the BitBake manual.
557
558 :term:`BB_HASHSERVE_UPSTREAM`
559 See :term:`bitbake:BB_HASHSERVE_UPSTREAM` in the BitBake manual.
560
561 :term:`BB_INVALIDCONF`
562 See :term:`bitbake:BB_INVALIDCONF` in the BitBake manual.
563
564 :term:`BB_LOGCONFIG`
565 See :term:`bitbake:BB_LOGCONFIG` in the BitBake manual.
566
567 :term:`BB_LOGFMT`
568 See :term:`bitbake:BB_LOGFMT` in the BitBake manual.
569
570 :term:`BB_MULTI_PROVIDER_ALLOWED`
571 See :term:`bitbake:BB_MULTI_PROVIDER_ALLOWED` in the BitBake manual.
572
573 :term:`BB_NICE_LEVEL`
574 See :term:`bitbake:BB_NICE_LEVEL` in the BitBake manual.
575
576 :term:`BB_NO_NETWORK`
577 See :term:`bitbake:BB_NO_NETWORK` in the BitBake manual.
578
579 :term:`BB_NUMBER_PARSE_THREADS`
580 See :term:`bitbake:BB_NUMBER_PARSE_THREADS` in the BitBake manual.
581
Andrew Geisslerf0343792020-11-18 10:42:21 -0600582 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500583 The maximum number of tasks BitBake should run in parallel at any one
584 time. The OpenEmbedded build system automatically configures this
585 variable to be equal to the number of cores on the build system. For
586 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500587 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500588 to "4".
589
590 For single socket systems (i.e. one CPU), you should not have to
591 override this variable to gain optimal parallelism during builds.
592 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500593 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500594 is not set higher than "20".
595
596 For more information on speeding up builds, see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600597 ":ref:`dev-manual/speeding-up-build:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500598 section in the Yocto Project Development Tasks Manual.
599
Patrick Williams7784c422022-11-17 07:29:11 -0600600 On the other hand, if your goal is to limit the amount of system
601 resources consumed by BitBake tasks, setting :term:`BB_NUMBER_THREADS`
602 to a number lower than the number of CPU threads in your machine
603 won't be sufficient. That's because each package will still be built
604 and installed through a number of parallel jobs specified by the
605 :term:`PARALLEL_MAKE` variable, which is by default the number of CPU
606 threads in your system, and is not impacted by the
607 :term:`BB_NUMBER_THREADS` value.
608
609 So, if you set :term:`BB_NUMBER_THREADS` to "1" but don't set
610 :term:`PARALLEL_MAKE`, most of your system resources will be consumed
611 anyway.
612
613 Therefore, if you intend to reduce the load of your build system by
614 setting :term:`BB_NUMBER_THREADS` to a relatively low value compared
615 to the number of CPU threads on your system, you should also set
616 :term:`PARALLEL_MAKE` to a similarly low value.
617
618 An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage
619 of build system resources under control is to use the smarter
620 :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or
621 :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake
622 from starting new tasks as long as thresholds are exceeded. Anyway,
623 as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the
624 tasks already being run from using all CPU threads on the system
625 if :term:`PARALLEL_MAKE` is not set to a low value.
626
Andrew Geissler517393d2023-01-13 08:55:19 -0600627 :term:`BB_ORIGENV`
628 See :term:`bitbake:BB_ORIGENV` in the BitBake manual.
629
630 :term:`BB_PRESERVE_ENV`
631 See :term:`bitbake:BB_PRESERVE_ENV` in the BitBake manual.
632
633 :term:`BB_PRESSURE_MAX_CPU`
634 See :term:`bitbake:BB_PRESSURE_MAX_CPU` in the BitBake manual.
635
636 :term:`BB_PRESSURE_MAX_IO`
637 See :term:`bitbake:BB_PRESSURE_MAX_IO` in the BitBake manual.
638
639 :term:`BB_PRESSURE_MAX_MEMORY`
640 See :term:`bitbake:BB_PRESSURE_MAX_MEMORY` in the BitBake manual.
641
642 :term:`BB_RUNFMT`
643 See :term:`bitbake:BB_RUNFMT` in the BitBake manual.
644
645 :term:`BB_RUNTASK`
646 See :term:`bitbake:BB_RUNTASK` in the BitBake manual.
647
648 :term:`BB_SCHEDULER`
649 See :term:`bitbake:BB_SCHEDULER` in the BitBake manual.
650
651 :term:`BB_SCHEDULERS`
652 See :term:`bitbake:BB_SCHEDULERS` in the BitBake manual.
653
Andrew Geisslerf0343792020-11-18 10:42:21 -0600654 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500655 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500656 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500657 long the BitBake server stays resident between invocations.
658
659 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500660 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500661
662 BB_SERVER_TIMEOUT = "20"
663
664 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400665 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500666
Andrew Geissler517393d2023-01-13 08:55:19 -0600667 :term:`BB_SETSCENE_DEPVALID`
668 See :term:`bitbake:BB_SETSCENE_DEPVALID` in the BitBake manual.
669
670 :term:`BB_SIGNATURE_EXCLUDE_FLAGS`
671 See :term:`bitbake:BB_SIGNATURE_EXCLUDE_FLAGS` in the BitBake manual.
672
673 :term:`BB_SIGNATURE_HANDLER`
674 See :term:`bitbake:BB_SIGNATURE_HANDLER` in the BitBake manual.
675
676 :term:`BB_SRCREV_POLICY`
677 See :term:`bitbake:BB_SRCREV_POLICY` in the BitBake manual.
678
679 :term:`BB_STRICT_CHECKSUM`
680 See :term:`bitbake:BB_STRICT_CHECKSUM` in the BitBake manual.
681
682 :term:`BB_TASK_IONICE_LEVEL`
683 See :term:`bitbake:BB_TASK_IONICE_LEVEL` in the BitBake manual.
684
685 :term:`BB_TASK_NICE_LEVEL`
686 See :term:`bitbake:BB_TASK_NICE_LEVEL` in the BitBake manual.
687
688 :term:`BB_TASKHASH`
689 See :term:`bitbake:BB_TASKHASH` in the BitBake manual.
690
691 :term:`BB_VERBOSE_LOGS`
692 See :term:`bitbake:BB_VERBOSE_LOGS` in the BitBake manual.
693
694 :term:`BB_WORKERCONTEXT`
695 See :term:`bitbake:BB_WORKERCONTEXT` in the BitBake manual.
696
Andrew Geisslerf0343792020-11-18 10:42:21 -0600697 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500698 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700699 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500700 ``quilt-native``, which is a copy of Quilt built to run on the build
701 system; "crosses" such as ``gcc-cross``, which is a compiler built to
702 run on the build machine but produces binaries that run on the target
Andrew Geissler517393d2023-01-13 08:55:19 -0600703 :term:`MACHINE`; ":ref:`ref-classes-nativesdk`", which
704 targets the SDK machine instead of :term:`MACHINE`; and "mulitlibs" in
705 the form "``multilib:``\ multilib_name".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500706
707 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500708 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500709
710 BBCLASSEXTEND =+ "native nativesdk"
711 BBCLASSEXTEND =+ "multilib:multilib_name"
712
713 .. note::
714
Andrew Geissler09036742021-06-25 14:25:14 -0500715 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500716 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500717 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500718 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400719 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500720
Andrew Geissler09036742021-06-25 14:25:14 -0500721 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500722 Parsing once adds some limitations. For example, it is not
723 possible to include a different file depending on the variant,
724 since ``include`` statements are processed when the recipe is
725 parsed.
726
Andrew Geissler517393d2023-01-13 08:55:19 -0600727 :term:`BBDEBUG`
728 See :term:`bitbake:BBDEBUG` in the BitBake manual.
729
Andrew Geisslerf0343792020-11-18 10:42:21 -0600730 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500731 Lists the names of configured layers. These names are used to find
732 the other ``BBFILE_*`` variables. Typically, each layer will append
733 its name to this variable in its ``conf/layer.conf`` file.
734
Andrew Geisslerf0343792020-11-18 10:42:21 -0600735 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500736 Variable that expands to match files from
737 :term:`BBFILES` in a particular layer. This variable
738 is used in the ``conf/layer.conf`` file and must be suffixed with the
739 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
740
Andrew Geisslerf0343792020-11-18 10:42:21 -0600741 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500742 Assigns the priority for recipe files in each layer.
743
744 This variable is useful in situations where the same recipe appears
745 in more than one layer. Setting this variable allows you to
746 prioritize a layer against other layers that contain the same recipe
Andrew Geissler615f2f12022-07-15 14:00:58 -0500747 --- effectively letting you control the precedence for the multiple
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500748 layers. The precedence established through this variable stands
749 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500750 example, a layer that has a recipe with a higher :term:`PV` value but for
751 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500752 has a lower precedence.
753
Andrew Geissler09036742021-06-25 14:25:14 -0500754 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500755 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500756 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
757 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500758 for more information. The default priority, if unspecified for a
759 layer with no dependencies, is the lowest defined priority + 1 (or 1
760 if no priorities are defined).
761
762 .. tip::
763
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500764 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500765 to list all configured layers along with their priorities.
766
Andrew Geisslerf0343792020-11-18 10:42:21 -0600767 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500768 A space-separated list of recipe files BitBake uses to build
769 software.
770
771 When specifying recipe files, you can pattern match using Python's
Patrick Williams2390b1b2022-11-03 13:47:49 -0500772 `glob <https://docs.python.org/3/library/glob.html>`__ syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500773 For details on the syntax, see the documentation by following the
774 previous link.
775
Andrew Geisslerf0343792020-11-18 10:42:21 -0600776 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500777 Activates content when identified layers are present. You identify
778 the layers by the collections that the layers define.
779
Andrew Geissler09036742021-06-25 14:25:14 -0500780 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500781 whose corresponding ``.bb`` file is in a layer that attempts to
782 modify other layers through ``.bbappend`` but does not want to
783 introduce a hard dependency on those other layers.
784
Andrew Geissler09036742021-06-25 14:25:14 -0500785 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000786 ``collection_name:filename_pattern``.
787
788 The following example identifies two collection names and two
789 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500790
791 BBFILES_DYNAMIC += " \
792 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
793 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
794 "
795
796 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000797 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500798
799 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500800
801 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
802 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
803 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
804
Andrew Geissler517393d2023-01-13 08:55:19 -0600805 :term:`BBINCLUDED`
806 See :term:`bitbake:BBINCLUDED` in the BitBake manual.
807
Andrew Geisslerf0343792020-11-18 10:42:21 -0600808 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500809 Variable that controls how BitBake displays logs on build failure.
810
Andrew Geisslerf0343792020-11-18 10:42:21 -0600811 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500812 If :term:`BBINCLUDELOGS` is set, specifies the
813 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500814 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500815 the entire log is printed.
816
Andrew Geisslerf0343792020-11-18 10:42:21 -0600817 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500818 Lists the layers to enable during the build. This variable is defined
819 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500820 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500821
822 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500823 /home/scottrif/poky/meta \
824 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500825 /home/scottrif/poky/meta-yocto-bsp \
826 /home/scottrif/poky/meta-mykernel \
827 "
828
829 This example enables four layers, one of which is a custom,
830 user-defined layer named ``meta-mykernel``.
831
Andrew Geissler517393d2023-01-13 08:55:19 -0600832 :term:`BBLAYERS_FETCH_DIR`
833 See :term:`bitbake:BBLAYERS_FETCH_DIR` in the BitBake manual.
834
Andrew Geisslerf0343792020-11-18 10:42:21 -0600835 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500836 Prevents BitBake from processing recipes and recipe append files.
837
Andrew Geissler09036742021-06-25 14:25:14 -0500838 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500839 ``.bbappend`` files. BitBake ignores any recipe or recipe append
840 files that match any of the expressions. It is as if BitBake does not
841 see them at all. Consequently, matching files are not parsed or
842 otherwise used by BitBake.
843
844 The values you provide are passed to Python's regular expression
845 compiler. Consequently, the syntax follows Python's Regular
846 Expression (re) syntax. The expressions are compared against the full
847 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500848 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500849
850 The following example uses a complete regular expression to tell
851 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500852 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500853
854 BBMASK = "meta-ti/recipes-misc/"
855
856 If you want to mask out multiple directories or recipes, you can
857 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500858 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500859
860 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
861 BBMASK += "/meta-oe/recipes-support/"
862 BBMASK += "/meta-foo/.*/openldap"
863 BBMASK += "opencv.*\.bbappend"
864 BBMASK += "lzma"
865
866 .. note::
867
868 When specifying a directory name, use the trailing slash character
869 to ensure you match just that directory name.
870
Andrew Geisslerf0343792020-11-18 10:42:21 -0600871 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500872 Specifies each additional separate configuration when you are
873 building targets with multiple configurations. Use this variable in
874 your ``conf/local.conf`` configuration file. Specify a
875 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500876 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500877
878 BBMULTICONFIG = "configA configB configC"
879
Andrew Geissler615f2f12022-07-15 14:00:58 -0500880 Each configuration file you use must reside in a ``multiconfig``
881 subdirectory of a configuration directory within a layer, or
882 within the :term:`Build Directory` (e.g.
883 ``build_directory/conf/multiconfig/configA.conf`` or
884 ``mylayer/conf/multiconfig/configB.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500885
Andrew Geissler09036742021-06-25 14:25:14 -0500886 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500887 that supports building targets with multiple configurations, see the
Andrew Geissler517393d2023-01-13 08:55:19 -0600888 ":ref:`dev-manual/building:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500889 section in the Yocto Project Development Tasks Manual.
890
Andrew Geissler517393d2023-01-13 08:55:19 -0600891 :term:`BBPATH`
892 See :term:`bitbake:BBPATH` in the BitBake manual.
893
Andrew Geisslerf0343792020-11-18 10:42:21 -0600894 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500895 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500896 BitBake remote server.
897
898 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500899 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500900
901 export BBSERVER=localhost:$port
902
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000903 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500904 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500905 data.
906
Andrew Geissler517393d2023-01-13 08:55:19 -0600907 :term:`BBTARGETS`
908 See :term:`bitbake:BBTARGETS` in the BitBake manual.
909
Andrew Geisslerf0343792020-11-18 10:42:21 -0600910 :term:`BINCONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -0600911 When inheriting the :ref:`ref-classes-binconfig-disabled` class, this
912 variable specifies binary configuration scripts to disable in favor of
913 using ``pkg-config`` to query the information. The
914 :ref:`ref-classes-binconfig-disabled` class will modify the specified
915 scripts to return an error so that calls to them can be easily found
916 and replaced.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500917
918 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500919 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500920
921 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
922
Andrew Geisslerf0343792020-11-18 10:42:21 -0600923 :term:`BINCONFIG_GLOB`
Andrew Geissler517393d2023-01-13 08:55:19 -0600924 When inheriting the :ref:`ref-classes-binconfig` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500925 this variable specifies a wildcard for configuration scripts that
926 need editing. The scripts are edited to correct any paths that have
927 been set up during compilation so that they are correct for use when
928 installed into the sysroot and called by the build processes of other
929 recipes.
930
931 .. note::
932
Andrew Geissler09036742021-06-25 14:25:14 -0500933 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500934 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
935 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500936 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500937 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
938 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500939
940 For more information on how this variable works, see
Patrick Williams975a06f2022-10-21 14:42:47 -0500941 ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500942 You can also find general
943 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000944 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500945
Andrew Geissler517393d2023-01-13 08:55:19 -0600946 :term:`BITBAKE_UI`
947 See :term:`bitbake:BITBAKE_UI` in the BitBake manual.
948
Andrew Geisslerf0343792020-11-18 10:42:21 -0600949 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500950 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500951 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500952 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500953
954 ${BPN}-${PV}
955
Andrew Geisslerf0343792020-11-18 10:42:21 -0600956 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500957 This variable is a version of the :term:`PN` variable with
958 common prefixes and suffixes removed, such as ``nativesdk-``,
959 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
960 The exact lists of prefixes and suffixes removed are specified by the
961 :term:`MLPREFIX` and
962 :term:`SPECIAL_PKGSUFFIX` variables,
963 respectively.
964
Andrew Geisslerf0343792020-11-18 10:42:21 -0600965 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500966 Specifies a URL for an upstream bug tracking website for a recipe.
967 The OpenEmbedded build system does not use this variable. Rather, the
968 variable is a useful pointer in case a bug in the software being
969 built needs to be manually reported.
970
Andrew Geisslerf0343792020-11-18 10:42:21 -0600971 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500972 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500973 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500974 machine name reported by the ``uname`` command.
975
Andrew Geisslerf0343792020-11-18 10:42:21 -0600976 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500977 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500978 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500979
Andrew Geisslerf0343792020-11-18 10:42:21 -0600980 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500981 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500982 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500983
Andrew Geisslerf0343792020-11-18 10:42:21 -0600984 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500985 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500986 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500987 points to GCC and passes as arguments the value of
988 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500989 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500990
Andrew Geisslerf0343792020-11-18 10:42:21 -0600991 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500992 Specifies the flags to pass to the C compiler when building for the
993 build host. When building in the ``-native`` context,
994 :term:`CFLAGS` is set to the value of this variable by
995 default.
996
Andrew Geisslerf0343792020-11-18 10:42:21 -0600997 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500998 Specifies the flags to pass to the C preprocessor (i.e. to both the C
999 and the C++ compilers) when building for the build host. When
1000 building in the ``-native`` context, :term:`CPPFLAGS`
1001 is set to the value of this variable by default.
1002
Andrew Geisslerf0343792020-11-18 10:42:21 -06001003 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001004 Specifies the flags to pass to the C++ compiler when building for the
1005 build host. When building in the ``-native`` context,
1006 :term:`CXXFLAGS` is set to the value of this variable
1007 by default.
1008
Andrew Geisslerf0343792020-11-18 10:42:21 -06001009 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001010 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -05001011 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001012 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -05001013 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001014
Andrew Geisslerf0343792020-11-18 10:42:21 -06001015 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001016 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05001017 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001018 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -05001019 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001020
Andrew Geisslerf0343792020-11-18 10:42:21 -06001021 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001022 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -05001023 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001024
Andrew Geisslerf0343792020-11-18 10:42:21 -06001025 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001026 Specifies the flags to pass to the linker when building for the build
1027 host. When building in the ``-native`` context,
1028 :term:`LDFLAGS` is set to the value of this variable
1029 by default.
1030
Andrew Geisslerf0343792020-11-18 10:42:21 -06001031 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001032 Specifies the optimization flags passed to the C compiler when
1033 building for the build host or the SDK. The flags are passed through
1034 the :term:`BUILD_CFLAGS` and
1035 :term:`BUILDSDK_CFLAGS` default values.
1036
Andrew Geissler5f350902021-07-23 13:09:54 -04001037 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001038 -pipe".
1039
Andrew Geisslerf0343792020-11-18 10:42:21 -06001040 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001041 Specifies the operating system in use on the build host (e.g.
1042 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler615f2f12022-07-15 14:00:58 -05001043 :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001044 first word, converted to lower-case characters.
1045
Andrew Geisslerf0343792020-11-18 10:42:21 -06001046 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001047 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -05001048 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geissler517393d2023-01-13 08:55:19 -06001049 :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001050
Andrew Geisslerf0343792020-11-18 10:42:21 -06001051 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001052 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -05001053 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001054 points to
1055 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
1056
Andrew Geisslerf0343792020-11-18 10:42:21 -06001057 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001058 Specifies the system, including the architecture and the operating
1059 system, to use when building for the build host (i.e. when building
Andrew Geissler517393d2023-01-13 08:55:19 -06001060 :ref:`ref-classes-native` recipes).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001061
1062 The OpenEmbedded build system automatically sets this variable based
1063 on :term:`BUILD_ARCH`,
1064 :term:`BUILD_VENDOR`, and
1065 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -05001066 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001067
Andrew Geisslerf0343792020-11-18 10:42:21 -06001068 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001069 Specifies the vendor name to use when building for the build host.
1070 The default value is an empty string ("").
1071
Andrew Geisslerf0343792020-11-18 10:42:21 -06001072 :term:`BUILDDIR`
Patrick Williams2390b1b2022-11-03 13:47:49 -05001073 Points to the location of the :term:`Build Directory`. You can define
1074 this directory indirectly through the :ref:`structure-core-script` script
1075 by passing in a :term:`Build Directory` path when you run the script. If
1076 you run the script and do not provide a :term:`Build Directory` path, the
1077 :term:`BUILDDIR` defaults to ``build`` in the current directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001078
Andrew Geisslerf0343792020-11-18 10:42:21 -06001079 :term:`BUILDHISTORY_COMMIT`
Andrew Geissler517393d2023-01-13 08:55:19 -06001080 When inheriting the :ref:`ref-classes-buildhistory` class, this variable
1081 specifies whether or not to commit the build history output in a local
1082 Git repository. If set to "1", this local repository will be maintained
1083 automatically by the :ref:`ref-classes-buildhistory` class and a commit
1084 will be created on every build for changes to each top-level subdirectory
1085 of the build history output (images, packages, and sdk). If you want to
1086 track changes to build history over time, you should set this value to
1087 "1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001088
Andrew Geissler517393d2023-01-13 08:55:19 -06001089 By default, the :ref:`ref-classes-buildhistory` class
Patrick Williams975a06f2022-10-21 14:42:47 -05001090 enables committing the buildhistory output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001091
Patrick Williams975a06f2022-10-21 14:42:47 -05001092 BUILDHISTORY_COMMIT ?= "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001093
Andrew Geisslerf0343792020-11-18 10:42:21 -06001094 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geissler517393d2023-01-13 08:55:19 -06001095 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001096 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -05001097 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001098 :term:`BUILDHISTORY_COMMIT` variable must
1099 be set to "1".
1100
1101 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -05001102 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001103 email@host". Providing an email address or host that is not valid
1104 does not produce an error.
1105
Andrew Geissler517393d2023-01-13 08:55:19 -06001106 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1107 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001108
1109 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
1110
Andrew Geisslerf0343792020-11-18 10:42:21 -06001111 :term:`BUILDHISTORY_DIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06001112 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001113 class, this variable specifies the directory in which build history
1114 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001115 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001116
Andrew Geissler517393d2023-01-13 08:55:19 -06001117 By default, the :ref:`ref-classes-buildhistory` class sets the directory
1118 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001119
1120 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
1121
Andrew Geisslerf0343792020-11-18 10:42:21 -06001122 :term:`BUILDHISTORY_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001123 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001124 class, this variable specifies the build history features to be
1125 enabled. For more information on how build history works, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06001126 ":ref:`dev-manual/build-quality:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001127 section in the Yocto Project Development Tasks Manual.
1128
1129 You can specify these features in the form of a space-separated list:
1130
1131 - *image:* Analysis of the contents of images, which includes the
1132 list of installed packages among other things.
1133
1134 - *package:* Analysis of the contents of individual packages.
1135
1136 - *sdk:* Analysis of the contents of the software development kit
1137 (SDK).
1138
1139 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -06001140 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001141 (sstate) tasks.
1142 This saves one file per task and lists the SHA-256 checksums for
1143 each file staged (i.e. the output of the task).
1144
Andrew Geissler517393d2023-01-13 08:55:19 -06001145 By default, the :ref:`ref-classes-buildhistory` class enables the
1146 following features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001147
1148 BUILDHISTORY_FEATURES ?= "image package sdk"
1149
Andrew Geisslerf0343792020-11-18 10:42:21 -06001150 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001151 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001152 class, this variable specifies a list of paths to files copied from
1153 the image contents into the build history directory under an
1154 "image-files" directory in the directory for the image, so that you
1155 can track the contents of each file. The default is to copy
1156 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1157 changes in user and group entries. You can modify the list to include
1158 any file. Specifying an invalid path does not produce an error.
1159 Consequently, you can include files that might not always be present.
1160
Andrew Geissler517393d2023-01-13 08:55:19 -06001161 By default, the :ref:`ref-classes-buildhistory` class provides paths to
1162 the following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001163
1164 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1165
Andrew Geissler5f350902021-07-23 13:09:54 -04001166 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
Andrew Geissler517393d2023-01-13 08:55:19 -06001167 When inheriting the :ref:`ref-classes-buildhistory`
Andrew Geissler5f350902021-07-23 13:09:54 -04001168 class, this variable specifies a common path prefix that should be
1169 stripped off the beginning of paths in the task signature list when the
1170 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1171 useful when build history is populated from multiple sources that may not
1172 all use the same top level directory.
1173
Andrew Geissler517393d2023-01-13 08:55:19 -06001174 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1175 as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001176
1177 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1178
1179 In this case, no prefixes will be stripped.
1180
Andrew Geisslerf0343792020-11-18 10:42:21 -06001181 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geissler517393d2023-01-13 08:55:19 -06001182 When inheriting the :ref:`ref-classes-buildhistory` class, this variable
1183 optionally specifies a remote repository to which build history pushes
1184 Git changes. In order for :term:`BUILDHISTORY_PUSH_REPO` to work,
1185 :term:`BUILDHISTORY_COMMIT` must be set to "1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001186
1187 The repository should correspond to a remote address that specifies a
1188 repository as understood by Git, or alternatively to a remote name
1189 that you have set up manually using ``git remote`` within the local
1190 repository.
1191
Andrew Geissler517393d2023-01-13 08:55:19 -06001192 By default, the :ref:`ref-classes-buildhistory` class sets the variable
1193 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001194
1195 BUILDHISTORY_PUSH_REPO ?= ""
1196
Andrew Geissler517393d2023-01-13 08:55:19 -06001197 :term:`BUILDNAME`
1198 See :term:`bitbake:BUILDNAME` in the BitBake manual.
1199
Andrew Geisslerf0343792020-11-18 10:42:21 -06001200 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001201 Specifies the flags to pass to the C compiler when building for the
1202 SDK. When building in the ``nativesdk-`` context,
1203 :term:`CFLAGS` is set to the value of this variable by
1204 default.
1205
Andrew Geisslerf0343792020-11-18 10:42:21 -06001206 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001207 Specifies the flags to pass to the C pre-processor (i.e. to both the
1208 C and the C++ compilers) when building for the SDK. When building in
1209 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1210 to the value of this variable by default.
1211
Andrew Geisslerf0343792020-11-18 10:42:21 -06001212 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001213 Specifies the flags to pass to the C++ compiler when building for the
1214 SDK. When building in the ``nativesdk-`` context,
1215 :term:`CXXFLAGS` is set to the value of this variable
1216 by default.
1217
Andrew Geisslerf0343792020-11-18 10:42:21 -06001218 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001219 Specifies the flags to pass to the linker when building for the SDK.
1220 When building in the ``nativesdk-`` context,
1221 :term:`LDFLAGS` is set to the value of this variable
1222 by default.
1223
Andrew Geisslerf0343792020-11-18 10:42:21 -06001224 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001225 Points to the location of the directory that holds build statistics
Andrew Geissler517393d2023-01-13 08:55:19 -06001226 when you use and enable the :ref:`ref-classes-buildstats` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001227 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001228 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1229
Andrew Geisslerf0343792020-11-18 10:42:21 -06001230 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001231 For the BusyBox recipe, specifies whether to split the output
1232 executable file into two parts: one for features that require
1233 ``setuid root``, and one for the remaining features (i.e. those that
1234 do not require ``setuid root``).
1235
Andrew Geissler09036742021-06-25 14:25:14 -05001236 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001237 splitting the output executable file. Set the variable to "0" to get
1238 a single output executable file.
1239
Andrew Geissler517393d2023-01-13 08:55:19 -06001240 :term:`BZRDIR`
1241 See :term:`bitbake:BZRDIR` in the BitBake manual.
1242
Andrew Geisslerf0343792020-11-18 10:42:21 -06001243 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001244 Specifies the directory BitBake uses to store a cache of the
1245 :term:`Metadata` so it does not need to be parsed every time
1246 BitBake is started.
1247
Andrew Geisslerf0343792020-11-18 10:42:21 -06001248 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001249 The minimal command and arguments used to run the C compiler.
1250
Andrew Geisslerf0343792020-11-18 10:42:21 -06001251 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001252 Specifies the flags to pass to the C compiler. This variable is
1253 exported to an environment variable and thus made visible to the
1254 software being built during the compilation step.
1255
Andrew Geissler09036742021-06-25 14:25:14 -05001256 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001257 being built:
1258
1259 - :term:`TARGET_CFLAGS` when building for the
1260 target
1261
1262 - :term:`BUILD_CFLAGS` when building for the
1263 build host (i.e. ``-native``)
1264
1265 - :term:`BUILDSDK_CFLAGS` when building for
1266 an SDK (i.e. ``nativesdk-``)
1267
Andrew Geisslerf0343792020-11-18 10:42:21 -06001268 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001269 An internal variable specifying the special class override that
1270 should currently apply (e.g. "class-target", "class-native", and so
1271 forth). The classes that use this variable (e.g.
Andrew Geissler517393d2023-01-13 08:55:19 -06001272 :ref:`ref-classes-native`, :ref:`ref-classes-nativesdk`, and so forth)
1273 set the variable to appropriate values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001274
1275 .. note::
1276
Andrew Geissler5f350902021-07-23 13:09:54 -04001277 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001278 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001279
1280 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001281 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001282
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001283 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001284 install my-extra-file ${D}${sysconfdir}
1285 }
1286
1287 Here is an example where ``FOO`` is set to
1288 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001289 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001290
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001291 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001292 FOO = "other"
1293
Andrew Geissler09036742021-06-25 14:25:14 -05001294 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001295 that it is included in the default value of
1296 :term:`OVERRIDES`.
1297
Andrew Geisslerf0343792020-11-18 10:42:21 -06001298 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001299 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001300 ``make clean`` command does not work for the software being built.
1301 Consequently, the OpenEmbedded build system will not try to run
1302 ``make clean`` during the :ref:`ref-tasks-configure`
1303 task, which is the default behavior.
1304
Andrew Geisslerf0343792020-11-18 10:42:21 -06001305 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001306 Provides a list of hardware features that are enabled in both
1307 :term:`MACHINE_FEATURES` and
1308 :term:`DISTRO_FEATURES`. This select list of
1309 features contains features that make sense to be controlled both at
1310 the machine and distribution configuration level. For example, the
1311 "bluetooth" feature requires hardware support but should also be
1312 optional at the distribution level, in case the hardware supports
1313 Bluetooth but you do not ever intend to use it.
1314
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001315 :term:`COMMERCIAL_AUDIO_PLUGINS`
1316 This variable is specific to the :yocto_git:`GStreamer recipes
1317 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`.
1318 It allows to build the GStreamer `"ugly"
Patrick Williams520786c2023-06-25 16:20:36 -05001319 <https://github.com/GStreamer/gst-plugins-ugly>`__ and
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001320 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ audio plugins.
1321
1322 See the :ref:`dev-manual/licenses:other variables related to commercial licenses`
1323 section for usage details.
1324
1325 :term:`COMMERCIAL_VIDEO_PLUGINS`
1326 This variable is specific to the :yocto_git:`GStreamer recipes
1327 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`.
1328 It allows to build the GStreamer `"ugly"
Patrick Williams520786c2023-06-25 16:20:36 -05001329 <https://github.com/GStreamer/gst-plugins-ugly>`__ and
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001330 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ video plugins.
1331
1332 See the :ref:`dev-manual/licenses:other variables related to commercial licenses`
1333 section for usage details.
1334
Andrew Geisslerf0343792020-11-18 10:42:21 -06001335 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001336 Points to ``meta/files/common-licenses`` in the
1337 :term:`Source Directory`, which is where generic license
1338 files reside.
1339
Andrew Geisslerf0343792020-11-18 10:42:21 -06001340 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001341 A regular expression that resolves to one or more hosts (when the
1342 recipe is native) or one or more targets (when the recipe is
1343 non-native) with which a recipe is compatible. The regular expression
1344 is matched against :term:`HOST_SYS`. You can use the
1345 variable to stop recipes from being built for classes of systems with
1346 which the recipes are not compatible. Stopping these builds is
1347 particularly useful with kernels. The variable also helps to increase
1348 parsing speed since the build system skips parsing recipes not
1349 compatible with the current system.
1350
Andrew Geisslerf0343792020-11-18 10:42:21 -06001351 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001352 A regular expression that resolves to one or more target machines
1353 with which a recipe is compatible. The regular expression is matched
1354 against :term:`MACHINEOVERRIDES`. You can use
1355 the variable to stop recipes from being built for machines with which
1356 the recipes are not compatible. Stopping these builds is particularly
1357 useful with kernels. The variable also helps to increase parsing
1358 speed since the build system skips parsing recipes not compatible
1359 with the current machine.
1360
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001361 If one wants to have a recipe only available for some architectures
1362 (here ``aarch64`` and ``mips64``), the following can be used::
1363
1364 COMPATIBLE_MACHINE = "^$"
1365 COMPATIBLE_MACHINE:arch64 = "^(aarch64)$"
1366 COMPATIBLE_MACHINE:mips64 = "^(mips64)$"
1367
1368 The first line means "match all machines whose :term:`MACHINEOVERRIDES`
1369 contains the empty string", which will always be none.
1370
1371 The second is for matching all machines whose :term:`MACHINEOVERRIDES`
1372 contains one override which is exactly ``aarch64``.
1373
1374 The third is for matching all machines whose :term:`MACHINEOVERRIDES`
1375 contains one override which is exactly ``mips64``.
1376
1377 The same could be achieved with::
1378
1379 COMPATIBLE_MACHINE = "^(aarch64|mips64)$"
1380
1381 .. note::
1382
1383 When :term:`COMPATIBLE_MACHINE` is set in a recipe inherits from
1384 native, the recipe is always skipped. All native recipes must be
1385 entirely target independent and should not rely on :term:`MACHINE`.
1386
Andrew Geisslerf0343792020-11-18 10:42:21 -06001387 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001388 Defines wildcards to match when installing a list of complementary
1389 packages for all the packages explicitly (or implicitly) installed in
1390 an image.
1391
Patrick Williams975a06f2022-10-21 14:42:47 -05001392 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
1393 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1394 which is similar to the Unix style pathname pattern expansion
1395 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001396
1397 The resulting list of complementary packages is associated with an
1398 item that can be added to
1399 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001400 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001401 will install -dev packages (containing headers and other development
1402 files) for every package in the image.
1403
1404 To add a new feature item pointing to a wildcard, use a variable flag
1405 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001406 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001407
1408 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1409
Patrick Williams975a06f2022-10-21 14:42:47 -05001410 .. note::
1411
1412 When installing complementary packages, recommends relationships
1413 (set via :term:`RRECOMMENDS`) are always ignored.
1414
Andrew Geisslerf0343792020-11-18 10:42:21 -06001415 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001416 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001417 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001418 sysroots for other recipes.
1419
1420 The default is
1421 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1422 (i.e.
1423 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1424
Andrew Geisslerf0343792020-11-18 10:42:21 -06001425 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001426 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001427 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001428 ``build/conf/`` compatibility changes.
1429
Andrew Geisslerf0343792020-11-18 10:42:21 -06001430 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001431 Identifies editable or configurable files that are part of a package.
1432 If the Package Management System (PMS) is being used to update
1433 packages on the target system, it is possible that configuration
1434 files you have changed after the original installation and that you
1435 now want to remain unchanged are overwritten. In other words,
1436 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001437 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001438 variable to list the files in the package that you wish to prevent
1439 the PMS from overwriting during this update process.
1440
Andrew Geissler09036742021-06-25 14:25:14 -05001441 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001442 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001443 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001444
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001445 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001446 ${sysconfdir}/file2 ${sysconfdir}/file3"
1447
Andrew Geissler09036742021-06-25 14:25:14 -05001448 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1449 variables. The files listed within :term:`CONFFILES` must be a subset of
1450 the files listed within :term:`FILES`. Because the configuration files
1451 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001452 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001453 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001454 variable.
1455
1456 .. note::
1457
Andrew Geissler09036742021-06-25 14:25:14 -05001458 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001459 good practice to use appropriate path variables.
1460 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1461 rather than ``/usr/bin``. You can find a list of these variables at
1462 the top of the ``meta/conf/bitbake.conf`` file in the
1463 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001464
Andrew Geisslerf0343792020-11-18 10:42:21 -06001465 :term:`CONFIG_INITRAMFS_SOURCE`
Patrick Williams2194f502022-10-16 14:26:09 -05001466 Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001467 OpenEmbedded build system receives and uses this kernel Kconfig
1468 variable as an environment variable. By default, the variable is set
1469 to null ("").
1470
Andrew Geissler09036742021-06-25 14:25:14 -05001471 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001472 with a ``.cpio`` suffix or a space-separated list of directories and
Patrick Williams2194f502022-10-16 14:26:09 -05001473 files for building the :term:`Initramfs` image. A cpio archive should contain
1474 a filesystem archive to be used as an :term:`Initramfs` image. Directories
1475 should contain a filesystem layout to be included in the :term:`Initramfs`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001476 image. Files should contain entries according to the format described
1477 by the ``usr/gen_init_cpio`` program in the kernel tree.
1478
Patrick Williams2194f502022-10-16 14:26:09 -05001479 If you specify multiple directories and files, the :term:`Initramfs` image
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001480 will be the aggregate of all of them.
1481
Patrick Williams2194f502022-10-16 14:26:09 -05001482 For information on creating an :term:`Initramfs`, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06001483 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001484 in the Yocto Project Development Tasks Manual.
1485
Andrew Geisslerf0343792020-11-18 10:42:21 -06001486 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001487 A list of files that contains ``autoconf`` test results relevant to
1488 the current build. This variable is used by the Autotools utilities
1489 when running ``configure``.
1490
Andrew Geisslerf0343792020-11-18 10:42:21 -06001491 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001492 The minimal arguments for GNU configure.
1493
Andrew Geisslerf0343792020-11-18 10:42:21 -06001494 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001495 When inheriting the :ref:`ref-classes-features_check`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001496 class, this variable identifies distribution features that would be
1497 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001498 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1499 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001500 the recipe will be skipped, and if the build system attempts to build
1501 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001502
Andrew Geissler615f2f12022-07-15 14:00:58 -05001503 :term:`CONVERSION_CMD`
1504 This variable is used for storing image conversion commands.
1505 Image conversion can convert an image into different objects like:
1506
1507 - Compressed version of the image
1508
1509 - Checksums for the image
1510
Andrew Geissler517393d2023-01-13 08:55:19 -06001511 An example of :term:`CONVERSION_CMD` from :ref:`ref-classes-image_types`
1512 class is::
Andrew Geissler615f2f12022-07-15 14:00:58 -05001513
1514 CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
1515
Andrew Geissler9aee5002022-03-30 16:27:02 +00001516 :term:`COPY_LIC_DIRS`
1517 If set to "1" along with the
1518 :term:`COPY_LIC_MANIFEST` variable, the
1519 OpenEmbedded build system copies into the image the license files,
1520 which are located in ``/usr/share/common-licenses``, for each
1521 package. The license files are placed in directories within the image
1522 itself during build time.
1523
1524 .. note::
1525
1526 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1527 newly installed packages to an image, which might be most suitable for
1528 read-only filesystems that cannot be upgraded. See the
1529 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler517393d2023-01-13 08:55:19 -06001530 You can also reference the ":ref:`dev-manual/licenses:providing license text`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00001531 section in the Yocto Project Development Tasks Manual for
1532 information on providing license text.
1533
1534 :term:`COPY_LIC_MANIFEST`
1535 If set to "1", the OpenEmbedded build system copies the license
1536 manifest for the image to
1537 ``/usr/share/common-licenses/license.manifest`` within the image
1538 itself during build time.
1539
1540 .. note::
1541
1542 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1543 newly installed packages to an image, which might be most suitable for
1544 read-only filesystems that cannot be upgraded. See the
1545 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler517393d2023-01-13 08:55:19 -06001546 You can also reference the ":ref:`dev-manual/licenses:providing license text`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00001547 section in the Yocto Project Development Tasks Manual for
1548 information on providing license text.
1549
Andrew Geisslerf0343792020-11-18 10:42:21 -06001550 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geissler517393d2023-01-13 08:55:19 -06001551 A space-separated list of licenses to exclude from the source archived by
1552 the :ref:`ref-classes-archiver` class. In other words, if a license in a
1553 recipe's :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001554 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001555 class.
1556
1557 .. note::
1558
Andrew Geissler09036742021-06-25 14:25:14 -05001559 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001560 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001561
1562 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001563 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001564 :ref:`ref-classes-copyleft_filter` class, which
1565 is inherited by the :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001566
Andrew Geisslerf0343792020-11-18 10:42:21 -06001567 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001568 A space-separated list of licenses to include in the source archived
Andrew Geissler517393d2023-01-13 08:55:19 -06001569 by the :ref:`ref-classes-archiver` class. In other
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001570 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001571 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001572 source is archived by the class.
1573
Andrew Geissler517393d2023-01-13 08:55:19 -06001574 The default value is set by the :ref:`ref-classes-copyleft_filter` class,
1575 which is inherited by the :ref:`ref-classes-archiver` class. The default
1576 value includes "GPL*", "LGPL*", and "AGPL*".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001577
Andrew Geisslerf0343792020-11-18 10:42:21 -06001578 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001579 A list of recipes to exclude in the source archived by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001580 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_EXCLUDE`
1581 variable overrides the license inclusion and exclusion caused through the
1582 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001583 variables, respectively.
1584
1585 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001586 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001587 :ref:`ref-classes-copyleft_filter` class, which is inherited by the
1588 :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001589
Andrew Geisslerf0343792020-11-18 10:42:21 -06001590 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001591 A list of recipes to include in the source archived by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001592 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_INCLUDE`
1593 variable overrides the license inclusion and exclusion caused through the
1594 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001595 variables, respectively.
1596
1597 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001598 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geissler517393d2023-01-13 08:55:19 -06001599 :ref:`ref-classes-copyleft_filter` class, which is inherited by the
1600 :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001601
Andrew Geisslerf0343792020-11-18 10:42:21 -06001602 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001603 A space-separated list of recipe types to include in the source
1604 archived by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geissler517393d2023-01-13 08:55:19 -06001605 Recipe types are ``target``, :ref:`ref-classes-native`,
1606 :ref:`ref-classes-nativesdk`, :ref:`ref-classes-cross`,
1607 :ref:`ref-classes-crosssdk`, and :ref:`ref-classes-cross-canadian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001608
Andrew Geissler09036742021-06-25 14:25:14 -05001609 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geissler517393d2023-01-13 08:55:19 -06001610 is set by the :ref:`ref-classes-copyleft_filter` class, which is
1611 inherited by the :ref:`ref-classes-archiver` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001612
Andrew Geisslerf0343792020-11-18 10:42:21 -06001613 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001614 Specifies the list of packages to be added to the image. You should
1615 only set this variable in the ``local.conf`` configuration file found
1616 in the :term:`Build Directory`.
1617
1618 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1619 supported.
1620
Andrew Geisslerf0343792020-11-18 10:42:21 -06001621 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001622 Specifies the parent directory of the OpenEmbedded-Core Metadata
1623 layer (i.e. ``meta``).
1624
Andrew Geissler09036742021-06-25 14:25:14 -05001625 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001626 of this layer and not the layer itself. Consider an example where you
1627 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001628 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001629 points to the ``poky`` folder because it is the parent directory of
1630 the ``poky/meta`` layer.
1631
Andrew Geisslerf0343792020-11-18 10:42:21 -06001632 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001633 Lists files from the :term:`COREBASE` directory that
1634 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001635 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001636 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001637 into the extensible SDK.
1638
Andrew Geissler09036742021-06-25 14:25:14 -05001639 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001640 typically contains build directories and other files that should not
1641 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001642 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001643 are actually needed.
1644
Andrew Geisslerf0343792020-11-18 10:42:21 -06001645 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001646 The minimal command and arguments used to run the C preprocessor.
1647
Andrew Geisslerf0343792020-11-18 10:42:21 -06001648 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001649 Specifies the flags to pass to the C pre-processor (i.e. to both the
1650 C and the C++ compilers). This variable is exported to an environment
1651 variable and thus made visible to the software being built during the
1652 compilation step.
1653
Andrew Geissler09036742021-06-25 14:25:14 -05001654 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001655 being built:
1656
1657 - :term:`TARGET_CPPFLAGS` when building for
1658 the target
1659
1660 - :term:`BUILD_CPPFLAGS` when building for the
1661 build host (i.e. ``-native``)
1662
1663 - :term:`BUILDSDK_CPPFLAGS` when building
1664 for an SDK (i.e. ``nativesdk-``)
1665
Andrew Geisslerf0343792020-11-18 10:42:21 -06001666 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001667 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001668 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001669 :term:`TARGET_PREFIX` variable.
1670
1671 .. note::
1672
Andrew Geissler09036742021-06-25 14:25:14 -05001673 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001674 variable only in certain contexts (e.g. when building for kernel
1675 and kernel module recipes).
1676
Andrew Geissler9aee5002022-03-30 16:27:02 +00001677 :term:`CVE_CHECK_IGNORE`
Patrick Williams2a254922023-08-11 09:48:11 -05001678 This variable is deprecated and should be replaced by :term:`CVE_STATUS`.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001679
Patrick Williams975a06f2022-10-21 14:42:47 -05001680 :term:`CVE_CHECK_SHOW_WARNINGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06001681 Specifies whether or not the :ref:`ref-classes-cve-check`
Patrick Williams975a06f2022-10-21 14:42:47 -05001682 class should generate warning messages on the console when unpatched
1683 CVEs are found. The default is "1", but you may wish to set it to "0" if
1684 you are already examining/processing the logs after the build has
1685 completed and thus do not need the warning messages.
1686
Andrew Geissler9aee5002022-03-30 16:27:02 +00001687 :term:`CVE_CHECK_SKIP_RECIPE`
1688 The list of package names (:term:`PN`) for which
1689 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001690
Patrick Williams975a06f2022-10-21 14:42:47 -05001691 :term:`CVE_DB_UPDATE_INTERVAL`
1692 Specifies the CVE database update interval in seconds, as used by
1693 ``cve-update-db-native``. The default value is "86400" i.e. once a day
1694 (24*60*60). If the value is set to "0" then the update will be forced
1695 every time. Alternatively, a negative value e.g. "-1" will disable
1696 updates entirely.
1697
Patrick Williams213cb262021-08-07 19:21:33 -05001698 :term:`CVE_PRODUCT`
1699 In a recipe, defines the name used to match the recipe name
1700 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1701
Patrick Williams975a06f2022-10-21 14:42:47 -05001702 The default is ${:term:`BPN`} (except for recipes that inherit the
Andrew Geissler517393d2023-01-13 08:55:19 -06001703 :ref:`ref-classes-pypi` class where it is set based upon
Patrick Williams975a06f2022-10-21 14:42:47 -05001704 :term:`PYPI_PACKAGE`). If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001705 database or matches with multiple entries in the database, the default
1706 value needs to be changed.
1707
1708 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1709
1710 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1711
Patrick Williams03907ee2022-05-01 06:28:52 -05001712 Sometimes the product name is not specific enough, for example
1713 "tar" has been matching CVEs for the GNU ``tar`` package and also
1714 the ``node-tar`` node.js extension. To avoid this problem, use the
1715 vendor name as a prefix. The syntax for this is::
1716
1717 CVE_PRODUCT = "vendor:package"
1718
Patrick Williams2a254922023-08-11 09:48:11 -05001719 :term:`CVE_STATUS`
1720 The CVE ID which is patched or should be ignored. Here is
1721 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1722
1723 CVE_STATUS[CVE-2020-15523] = "not-applicable-platform: Issue only applies on Windows"
1724
1725 It has the format "reason: description" and the description is optional.
1726 The Reason is mapped to the final CVE state by mapping via
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001727 :term:`CVE_CHECK_STATUSMAP`. See :ref:`dev-manual/vulnerabilities:fixing vulnerabilities in recipes`
1728 for details.
Patrick Williams2a254922023-08-11 09:48:11 -05001729
1730 :term:`CVE_STATUS_GROUPS`
1731 If there are many CVEs with the same status and reason, they can by simplified by using this
1732 variable instead of many similar lines with :term:`CVE_STATUS`::
1733
1734 CVE_STATUS_GROUPS = "CVE_STATUS_WIN CVE_STATUS_PATCHED"
1735
1736 CVE_STATUS_WIN = "CVE-1234-0001 CVE-1234-0002"
1737 CVE_STATUS_WIN[status] = "not-applicable-platform: Issue only applies on Windows"
1738 CVE_STATUS_PATCHED = "CVE-1234-0003 CVE-1234-0004"
1739 CVE_STATUS_PATCHED[status] = "fixed-version: Fixed externally"
1740
1741 :term:`CVE_CHECK_STATUSMAP`
1742 Mapping variable for all possible reasons of :term:`CVE_STATUS`:
1743 ``Patched``, ``Unpatched`` and ``Ignored``.
1744 See :ref:`ref-classes-cve-check` or ``meta/conf/cve-check-map.conf`` for more details::
1745
1746 CVE_CHECK_STATUSMAP[cpe-incorrect] = "Ignored"
1747
Patrick Williams2390b1b2022-11-03 13:47:49 -05001748 :term:`CVE_VERSION`
1749 In a recipe, defines the version used to match the recipe version
1750 against the version in the `NIST CVE database <https://nvd.nist.gov/>`__
Andrew Geissler517393d2023-01-13 08:55:19 -06001751 when usign :ref:`ref-classes-cve-check`.
Patrick Williams2390b1b2022-11-03 13:47:49 -05001752
1753 The default is ${:term:`PV`} but if recipes use custom version numbers
1754 which do not map to upstream software component release versions and the versions
1755 used in the CVE database, then this variable can be used to set the
Andrew Geissler517393d2023-01-13 08:55:19 -06001756 version number for :ref:`ref-classes-cve-check`. Example::
Patrick Williams2390b1b2022-11-03 13:47:49 -05001757
1758 CVE_VERSION = "2.39"
1759
Andrew Geisslerf0343792020-11-18 10:42:21 -06001760 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001761 The directory in which files checked out under the CVS system are
1762 stored.
1763
Andrew Geisslerf0343792020-11-18 10:42:21 -06001764 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001765 The minimal command and arguments used to run the C++ compiler.
1766
Andrew Geisslerf0343792020-11-18 10:42:21 -06001767 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001768 Specifies the flags to pass to the C++ compiler. This variable is
1769 exported to an environment variable and thus made visible to the
1770 software being built during the compilation step.
1771
Andrew Geissler09036742021-06-25 14:25:14 -05001772 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001773 being built:
1774
1775 - :term:`TARGET_CXXFLAGS` when building for
1776 the target
1777
1778 - :term:`BUILD_CXXFLAGS` when building for the
1779 build host (i.e. ``-native``)
1780
1781 - :term:`BUILDSDK_CXXFLAGS` when building
1782 for an SDK (i.e. ``nativesdk-``)
1783
Andrew Geisslerf0343792020-11-18 10:42:21 -06001784 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001785 The destination directory. The location in the :term:`Build Directory`
1786 where components are installed by the
1787 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001788 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001789
1790 ${WORKDIR}/image
1791
1792 .. note::
1793
1794 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001795 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001796
Andrew Geisslerf0343792020-11-18 10:42:21 -06001797 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001798 The date the build was started. Dates appear using the year, month,
1799 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1800
Andrew Geisslerf0343792020-11-18 10:42:21 -06001801 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001802 The date and time on which the current build started. The format is
1803 suitable for timestamps.
1804
Andrew Geisslerf0343792020-11-18 10:42:21 -06001805 :term:`DEBIAN_NOAUTONAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06001806 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001807 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001808 particular package should not be renamed according to Debian library
1809 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001810 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001811
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001812 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001813
Andrew Geisslerf0343792020-11-18 10:42:21 -06001814 :term:`DEBIANNAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06001815 When the :ref:`ref-classes-debian` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001816 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001817 the library name for an individual package. Overriding the library
1818 name in these cases is rare. You must use the package name as an
1819 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001820 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001821
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001822 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001823
Andrew Geisslerf0343792020-11-18 10:42:21 -06001824 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001825 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001826 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001827
Andrew Geisslerf0343792020-11-18 10:42:21 -06001828 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001829 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001830 compiling a system for debugging. This variable defaults to "-O
1831 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1832
Andrew Geisslereff27472021-10-29 15:35:00 -05001833 :term:`DEBUG_PREFIX_MAP`
1834 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1835 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1836 replace build-time paths by install-time ones in the debugging sections
1837 of binaries. This makes compiler output files location independent,
1838 at the cost of having to pass an extra command to tell the debugger
1839 where source files are.
1840
1841 This is used by the Yocto Project to guarantee
1842 :doc:`/test-manual/reproducible-builds` even when the source code of
1843 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1844 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1845 website for details.
1846
1847 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1848 not intended to be user-configurable.
1849
Andrew Geissler9aee5002022-03-30 16:27:02 +00001850 :term:`DEFAULT_PREFERENCE`
1851 Specifies a weak bias for recipe selection priority.
1852
1853 The most common usage of this is variable is to set it to "-1" within
1854 a recipe for a development version of a piece of software. Using the
1855 variable in this way causes the stable version of the recipe to build
1856 by default in the absence of :term:`PREFERRED_VERSION` being used to
1857 build the development version.
1858
1859 .. note::
1860
1861 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1862 by :term:`BBFILE_PRIORITY` if that variable is different between two
1863 layers that contain different versions of the same recipe.
1864
Andrew Geisslerf0343792020-11-18 10:42:21 -06001865 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001866 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1867 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001868 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001869 :term:`TUNE_FEATURES`.
1870
1871 The default tune is either implicitly or explicitly set by the
1872 machine (:term:`MACHINE`). However, you can override
1873 the setting using available tunes as defined with
1874 :term:`AVAILTUNES`.
1875
Andrew Geisslerf0343792020-11-18 10:42:21 -06001876 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001877 Lists a recipe's build-time dependencies. These are dependencies on
1878 other recipes whose contents (e.g. headers and shared libraries) are
1879 needed by the recipe at build time.
1880
1881 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001882 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001883
1884 DEPENDS = "bar"
1885
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05001886 The practical effect of the previous assignment is that all files
1887 installed by bar will be available in the appropriate staging sysroot,
1888 given by the :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time
1889 the :ref:`ref-tasks-configure` task for ``foo`` runs. This mechanism is
1890 implemented by having :ref:`ref-tasks-configure` depend on the
1891 :ref:`ref-tasks-populate_sysroot` task of each recipe listed in
1892 :term:`DEPENDS`, through a
1893 ``[``\ :ref:`deptask <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
Andrew Geissler517393d2023-01-13 08:55:19 -06001894 declaration in the :ref:`ref-classes-base` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001895
1896 .. note::
1897
Andrew Geissler09036742021-06-25 14:25:14 -05001898 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001899 explicitly. The standard classes and build-related variables are
1900 configured to automatically use the appropriate staging sysroots.
1901
Andrew Geissler09036742021-06-25 14:25:14 -05001902 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001903 that run on the build machine during the build. For example, a recipe
1904 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001905 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001906
1907 DEPENDS = "codegen-native"
1908
1909 For more
Andrew Geissler517393d2023-01-13 08:55:19 -06001910 information, see the :ref:`ref-classes-native` class and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001911 the :term:`EXTRANATIVEPATH` variable.
1912
1913 .. note::
1914
Andrew Geissler09036742021-06-25 14:25:14 -05001915 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001916 it is a list of :term:`PROVIDES` names, which
1917 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001918 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001919 instead, as this will put files from all the packages that make
1920 up ``foo``, which includes those from ``foo-dev``, into the
1921 sysroot.
1922
Andrew Geissler09036742021-06-25 14:25:14 -05001923 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001924 itself add any runtime dependencies between the packages
1925 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001926 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001927 section in the Yocto Project Overview and Concepts Manual,
1928 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001929 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001930
Andrew Geissler09036742021-06-25 14:25:14 -05001931 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001932 recipes that install precompiled components. For example, if
1933 ``libfoo`` is a precompiled library that links against
1934 ``libbar``, then linking against ``libfoo`` requires both
1935 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001936 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001937 to the recipe that installs ``libbar``, other recipes might
1938 fail to link against ``libfoo``.
1939
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05001940 For information on runtime dependencies, see the :term:`RDEPENDS`
1941 variable. You can also see the
1942 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1943 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`"
1944 sections in the BitBake User Manual for additional information on tasks
1945 and dependencies.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001946
Andrew Geisslerf0343792020-11-18 10:42:21 -06001947 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001948 Points to the general area that the OpenEmbedded build system uses to
1949 place images, packages, SDKs, and other output files that are ready
1950 to be used outside of the build system. By default, this directory
Patrick Williams2390b1b2022-11-03 13:47:49 -05001951 resides within the :term:`Build Directory` as ``${TMPDIR}/deploy``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001952
1953 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001954 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001955 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001956 ":ref:`overview-manual/concepts:images`",
1957 ":ref:`overview-manual/concepts:package feeds`", and
1958 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001959 Yocto Project Overview and Concepts Manual.
1960
Andrew Geisslerf0343792020-11-18 10:42:21 -06001961 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001962 Points to the area that the OpenEmbedded build system uses to place
1963 Debian packages that are ready to be used outside of the build
Andrew Geissler517393d2023-01-13 08:55:19 -06001964 system. This variable applies only when :term:`PACKAGE_CLASSES` contains
1965 ":ref:`ref-classes-package_deb`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001966
1967 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001968 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001969 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001970
1971 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1972
Andrew Geissler517393d2023-01-13 08:55:19 -06001973 The :ref:`ref-classes-package_deb` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001974 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001975 :ref:`ref-tasks-package_write_deb` task
1976 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001977 information on how packaging works, see the
1978 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001979 in the Yocto Project Overview and Concepts Manual.
1980
Andrew Geisslerf0343792020-11-18 10:42:21 -06001981 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001982 Points to the area that the OpenEmbedded build system uses to place
1983 images and other associated output files that are ready to be
1984 deployed onto the target machine. The directory is machine-specific
1985 as it contains the ``${MACHINE}`` name. By default, this directory
1986 resides within the :term:`Build Directory` as
1987 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1988
Andrew Geissler09036742021-06-25 14:25:14 -05001989 It must not be used directly in recipes when deploying files. Instead,
1990 it's only useful when a recipe needs to "read" a file already deployed
1991 by a dependency. So, it should be filled with the contents of
Andrew Geissler517393d2023-01-13 08:55:19 -06001992 :term:`DEPLOYDIR` by the :ref:`ref-classes-deploy` class or with the
1993 contents of :term:`IMGDEPLOYDIR` by the :ref:`ref-classes-image` class.
Andrew Geissler09036742021-06-25 14:25:14 -05001994
Patrick Williams2390b1b2022-11-03 13:47:49 -05001995 For more information on the structure of the :term:`Build Directory`, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001996 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001997 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001998 ":ref:`overview-manual/concepts:images`" and
1999 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002000 the Yocto Project Overview and Concepts Manual.
2001
Andrew Geisslerf0343792020-11-18 10:42:21 -06002002 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002003 Points to the area that the OpenEmbedded build system uses to place
2004 IPK packages that are ready to be used outside of the build system.
Andrew Geissler517393d2023-01-13 08:55:19 -06002005 This variable applies only when :term:`PACKAGE_CLASSES` contains
2006 ":ref:`ref-classes-package_ipk`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002007
2008 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002009 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002010
2011 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
2012
Andrew Geissler517393d2023-01-13 08:55:19 -06002013 The :ref:`ref-classes-package_ipk` class uses the :term:`DEPLOY_DIR_IPK`
2014 variable to make sure the :ref:`ref-tasks-package_write_ipk` task
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002015 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06002016 on how packaging works, see the
2017 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002018 in the Yocto Project Overview and Concepts Manual.
2019
Andrew Geisslerf0343792020-11-18 10:42:21 -06002020 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002021 Points to the area that the OpenEmbedded build system uses to place
2022 RPM packages that are ready to be used outside of the build system.
Andrew Geissler517393d2023-01-13 08:55:19 -06002023 This variable applies only when :term:`PACKAGE_CLASSES` contains
2024 ":ref:`ref-classes-package_rpm`".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002025
2026 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002027 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002028
2029 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
2030
Andrew Geissler517393d2023-01-13 08:55:19 -06002031 The :ref:`ref-classes-package_rpm` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05002032 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002033 :ref:`ref-tasks-package_write_rpm` task
2034 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06002035 on how packaging works, see the
2036 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002037 in the Yocto Project Overview and Concepts Manual.
2038
Andrew Geisslerf0343792020-11-18 10:42:21 -06002039 :term:`DEPLOYDIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06002040 When inheriting the :ref:`ref-classes-deploy` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05002041 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler517393d2023-01-13 08:55:19 -06002042 is set in the :ref:`ref-classes-deploy` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002043
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002044 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002045
Andrew Geissler517393d2023-01-13 08:55:19 -06002046 Recipes inheriting the :ref:`ref-classes-deploy` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05002047 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002048 them into :term:`DEPLOY_DIR_IMAGE`
2049 afterwards.
2050
Andrew Geisslerf0343792020-11-18 10:42:21 -06002051 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002052 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05002053 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002054 variable.
2055
Patrick Williams975a06f2022-10-21 14:42:47 -05002056 :term:`DEV_PKG_DEPENDENCY`
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002057 Provides an easy way for recipes to disable or adjust the runtime recommendation
2058 (:term:`RRECOMMENDS`) of the ``${PN}-dev`` package on the main
2059 (``${PN}``) package.
Patrick Williams975a06f2022-10-21 14:42:47 -05002060
2061 :term:`DISABLE_STATIC`
2062 Used in order to disable static linking by default (in order to save
2063 space, since static libraries are often unused in embedded systems.)
2064 The default value is " --disable-static", however it can be set to ""
2065 in order to enable static linking if desired. Certain recipes do this
2066 individually, and also there is a
2067 ``meta/conf/distro/include/no-static-libs.inc`` include file that
2068 disables static linking for a number of recipes. Some software
2069 packages or build tools (such as CMake) have explicit support for
2070 enabling / disabling static linking, and in those cases
2071 :term:`DISABLE_STATIC` is not used.
2072
Andrew Geisslerf0343792020-11-18 10:42:21 -06002073 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002074 The short name of the distribution. For information on the long name
2075 of the distribution, see the :term:`DISTRO_NAME`
2076 variable.
2077
Andrew Geissler09036742021-06-25 14:25:14 -05002078 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002079 file whose root name is the same as the variable's argument and whose
2080 filename extension is ``.conf``. For example, the distribution
2081 configuration file for the Poky distribution is named ``poky.conf``
2082 and resides in the ``meta-poky/conf/distro`` directory of the
2083 :term:`Source Directory`.
2084
Andrew Geissler09036742021-06-25 14:25:14 -05002085 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002086 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002087
2088 DISTRO = "poky"
2089
2090 Distribution configuration files are located in a ``conf/distro``
2091 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05002092 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002093 spaces, and is typically all lower-case.
2094
2095 .. note::
2096
Andrew Geissler09036742021-06-25 14:25:14 -05002097 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002098 are used, which are specified within
2099 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002100
Andrew Geisslerf0343792020-11-18 10:42:21 -06002101 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002102 Specifies a codename for the distribution being built.
2103
Andrew Geisslerf0343792020-11-18 10:42:21 -06002104 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002105 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00002106 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002107 variable only really applies to the more full-featured images that
2108 include ``packagegroup-base``. You can use this variable to keep
2109 distro policy out of generic images. As with all other distro
2110 variables, you set this variable in the distro ``.conf`` file.
2111
Andrew Geisslerf0343792020-11-18 10:42:21 -06002112 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002113 Specifies a list of distro-specific packages to add to all images if
2114 the packages exist. The packages might not exist or be empty (e.g.
2115 kernel modules). The list of packages are automatically installed but
2116 you can remove them.
2117
Andrew Geisslerf0343792020-11-18 10:42:21 -06002118 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002119 The software support you want in your distribution for various
2120 features. You define your distribution features in the distribution
2121 configuration file.
2122
2123 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05002124 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002125 to the configure script during the
2126 :ref:`ref-tasks-configure` task for recipes that
2127 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05002128 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002129 target that can optionally support X11 to have its X11 support
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05002130 enabled.
2131
2132 .. note::
2133
2134 Just enabling :term:`DISTRO_FEATURES` alone doesn't
2135 enable feature support for packages. Mechanisms such as making
2136 :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used
2137 to enable/disable package features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002138
2139 Two more examples are Bluetooth and NFS support. For a more complete
2140 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002141 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002142
Andrew Geisslerf0343792020-11-18 10:42:21 -06002143 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002144 A space-separated list of features to be added to :term:`DISTRO_FEATURES`
2145 if not also present in :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002146
2147 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
2148 not intended to be user-configurable. It is best to just reference
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002149 the variable to see which distro features are being
2150 :ref:`backfilled <ref-features-backfill>` for all distro configurations.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002151
Andrew Geisslerf0343792020-11-18 10:42:21 -06002152 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002153 A space-separated list of features from :term:`DISTRO_FEATURES_BACKFILL`
2154 that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added
2155 to :term:`DISTRO_FEATURES`) during the build.
2156
2157 This corresponds to an opt-out mechanism. When new default distro
2158 features are introduced, distribution maintainers can review (`consider`)
2159 them and decide to exclude them from the
2160 :ref:`backfilled <ref-features-backfill>` features. Therefore, the
2161 combination of :term:`DISTRO_FEATURES_BACKFILL` and
2162 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` makes it possible to
2163 add new default features without breaking existing distributions.
2164
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002165
Andrew Geisslerf0343792020-11-18 10:42:21 -06002166 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002167 A convenience variable that gives you the default list of distro
2168 features with the exception of any features specific to the C library
2169 (``libc``).
2170
2171 When creating a custom distribution, you might find it useful to be
2172 able to reuse the default
2173 :term:`DISTRO_FEATURES` options without the
2174 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05002175 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002176
2177 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
2178
Andrew Geisslerf0343792020-11-18 10:42:21 -06002179 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002180 Specifies a list of features that if present in the target
2181 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05002182 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002183 variable is used in addition to the features filtered using the
2184 :term:`DISTRO_FEATURES_NATIVE`
2185 variable.
2186
Andrew Geisslerf0343792020-11-18 10:42:21 -06002187 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002188 Specifies a list of features that if present in the target
Andrew Geissler517393d2023-01-13 08:55:19 -06002189 :term:`DISTRO_FEATURES` value should be included in
2190 :term:`DISTRO_FEATURES` when building :ref:`ref-classes-nativesdk`
2191 recipes. This variable is used in addition to the features filtered using
2192 the :term:`DISTRO_FEATURES_NATIVESDK` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002193
Andrew Geisslerf0343792020-11-18 10:42:21 -06002194 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002195 Specifies a list of features that should be included in
2196 :term:`DISTRO_FEATURES` when building native
2197 recipes. This variable is used in addition to the features filtered
2198 using the
2199 :term:`DISTRO_FEATURES_FILTER_NATIVE`
2200 variable.
2201
Andrew Geisslerf0343792020-11-18 10:42:21 -06002202 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002203 Specifies a list of features that should be included in
2204 :term:`DISTRO_FEATURES` when building
Andrew Geissler517393d2023-01-13 08:55:19 -06002205 :ref:`ref-classes-nativesdk` recipes. This variable is used
2206 in addition to the features filtered using the
2207 :term:`DISTRO_FEATURES_FILTER_NATIVESDK` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002208
Andrew Geisslerf0343792020-11-18 10:42:21 -06002209 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002210 The long name of the distribution. For information on the short name
2211 of the distribution, see the :term:`DISTRO` variable.
2212
Andrew Geissler09036742021-06-25 14:25:14 -05002213 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002214 configuration file whose root name is the same as the variable's
2215 argument and whose filename extension is ``.conf``. For example, the
2216 distribution configuration file for the Poky distribution is named
2217 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
2218 of the :term:`Source Directory`.
2219
Andrew Geissler09036742021-06-25 14:25:14 -05002220 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05002221 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002222
2223 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
2224
2225 Distribution configuration files are located in a ``conf/distro``
2226 directory within the :term:`Metadata` that contains the
2227 distribution configuration.
2228
2229 .. note::
2230
Andrew Geissler09036742021-06-25 14:25:14 -05002231 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002232 configurations are used, which are specified within
2233 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002234
Andrew Geisslerf0343792020-11-18 10:42:21 -06002235 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002236 The version of the distribution.
2237
Andrew Geisslerf0343792020-11-18 10:42:21 -06002238 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002239 A colon-separated list of overrides specific to the current
2240 distribution. By default, this list includes the value of
2241 :term:`DISTRO`.
2242
Andrew Geissler09036742021-06-25 14:25:14 -05002243 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002244 apply to the distribution.
2245
Andrew Geissler09036742021-06-25 14:25:14 -05002246 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002247 is included in the default value of
2248 :term:`OVERRIDES`.
2249
Patrick Williams520786c2023-06-25 16:20:36 -05002250 Here is an example from :yocto_git:`meta-poky/conf/distro/poky-tiny.conf
2251 </poky/tree/meta-poky/conf/distro/poky-tiny.conf>`::
2252
2253 DISTROOVERRIDES = "poky:poky-tiny"
2254
Andrew Geisslerf0343792020-11-18 10:42:21 -06002255 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002256 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05002257 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002258 for everything except Git repositories. If you want tarballs of Git
2259 repositories, use the
2260 :term:`BB_GENERATE_MIRROR_TARBALLS`
2261 variable.
2262
Andrew Geissler09036742021-06-25 14:25:14 -05002263 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002264 ``conf/local.conf`` file. This directory is self-maintaining and you
2265 should not have to touch it. By default, the directory is
Patrick Williams2390b1b2022-11-03 13:47:49 -05002266 ``downloads`` in the :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002267
2268 #DL_DIR ?= "${TOPDIR}/downloads"
2269
2270 To specify a different download directory,
2271 simply remove the comment from the line and provide your directory.
2272
2273 During a first build, the system downloads many different source code
2274 tarballs from various upstream projects. Downloading can take a
2275 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002276 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002277 system looks there first to find source tarballs.
2278
2279 .. note::
2280
2281 When wiping and rebuilding, you can preserve this directory to
2282 speed up this part of subsequent builds.
2283
2284 You can safely share this directory between multiple builds on the
2285 same development machine. For additional information on how the build
2286 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002287 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002288 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002289 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002290 Wiki page.
2291
Andrew Geisslerf0343792020-11-18 10:42:21 -06002292 :term:`DOC_COMPRESS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002293 When inheriting the :ref:`ref-classes-compress_doc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002294 class, this variable sets the compression policy used when the
2295 OpenEmbedded build system compresses man pages and info pages. By
2296 default, the compression method used is gz (gzip). Other policies
2297 available are xz and bz2.
2298
2299 For information on policies and on how to use this variable, see the
Patrick Williams975a06f2022-10-21 14:42:47 -05002300 comments in the ``meta/classes-recipe/compress_doc.bbclass`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002301
Patrick Williamsb542dec2023-06-09 01:26:37 -05002302 :term:`DT_FILES`
2303 Space-separated list of device tree source files to compile using
2304 a recipe that inherits the :ref:`ref-classes-devicetree` class. These
2305 are relative to the :term:`DT_FILES_PATH`.
2306
2307 For convenience, both ``.dts`` and ``.dtb`` extensions can be used.
2308
2309 Use an empty string (default) to build all device tree sources within
2310 the :term:`DT_FILES_PATH` directory.
2311
2312 :term:`DT_FILES_PATH`
2313 When compiling out-of-tree device tree sources using a recipe that
2314 inherits the :ref:`ref-classes-devicetree` class, this variable specifies
2315 the path to the directory containing dts files to build.
2316
2317 Defaults to the :term:`S` directory.
2318
2319 :term:`DT_PADDING_SIZE`
2320 When inheriting the :ref:`ref-classes-devicetree` class, this variable
2321 specifies the size of padding appended to the device tree blob, used as
2322 extra space typically for additional properties during boot.
2323
Andrew Geisslerf0343792020-11-18 10:42:21 -06002324 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002325 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2326 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002327 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002328 default is "grub-efi", but "systemd-boot" can be used instead.
2329
Andrew Geissler517393d2023-01-13 08:55:19 -06002330 See the :ref:`ref-classes-systemd-boot` and :ref:`ref-classes-image-live`
2331 classes for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002332
Andrew Geisslerf0343792020-11-18 10:42:21 -06002333 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002334 Variable that controls which locales for ``glibc`` are generated
2335 during the build (useful if the target device has 64Mbytes of RAM or
2336 less).
2337
Andrew Geisslerf0343792020-11-18 10:42:21 -06002338 :term:`ERR_REPORT_DIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06002339 When used with the :ref:`ref-classes-report-error` class, specifies the
2340 path used for storing the debug files created by the :ref:`error reporting
2341 tool <dev-manual/error-reporting-tool:using the error reporting tool>`,
2342 which allows you to submit build errors you encounter to a central
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002343 database. By default, the value of this variable is
2344 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2345
Andrew Geissler09036742021-06-25 14:25:14 -05002346 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002347 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002348 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002349
2350 ERR_REPORT_DIR = "path"
2351
Andrew Geisslerf0343792020-11-18 10:42:21 -06002352 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002353 Specifies the quality assurance checks whose failures are reported as
2354 errors by the OpenEmbedded build system. You set this variable in
2355 your distribution configuration file. For a list of the checks you
2356 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002357 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002358
Andrew Geissler9aee5002022-03-30 16:27:02 +00002359 :term:`ESDK_CLASS_INHERIT_DISABLE`
2360 A list of classes to remove from the :term:`INHERIT`
2361 value globally within the extensible SDK configuration. The
2362 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2363 default value::
2364
2365 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2366
2367 Some classes are not generally applicable within the extensible SDK
2368 context. You can use this variable to disable those classes.
2369
2370 For additional information on how to customize the extensible SDK's
2371 configuration, see the
2372 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2373 section in the Yocto Project Application Development and the
2374 Extensible Software Development Kit (eSDK) manual.
2375
2376 :term:`ESDK_LOCALCONF_ALLOW`
2377 A list of variables allowed through from the OpenEmbedded build
2378 system configuration into the extensible SDK configuration. By
2379 default, the list of variables is empty and is set in the
2380 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2381
2382 This list overrides the variables specified using the
2383 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2384 other variables automatically added due to the "/" character
2385 being found at the start of the
2386 value, which is usually indicative of being a path and thus might not
2387 be valid on the system where the SDK is installed.
2388
2389 For additional information on how to customize the extensible SDK's
2390 configuration, see the
2391 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2392 section in the Yocto Project Application Development and the
2393 Extensible Software Development Kit (eSDK) manual.
2394
2395 :term:`ESDK_LOCALCONF_REMOVE`
2396 A list of variables not allowed through from the OpenEmbedded build
2397 system configuration into the extensible SDK configuration. Usually,
2398 these are variables that are specific to the machine on which the
2399 build system is running and thus would be potentially problematic
2400 within the extensible SDK.
2401
2402 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2403 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2404 excludes the following variables:
2405
2406 - :term:`CONF_VERSION`
2407 - :term:`BB_NUMBER_THREADS`
2408 - :term:`BB_NUMBER_PARSE_THREADS`
2409 - :term:`PARALLEL_MAKE`
2410 - :term:`PRSERV_HOST`
2411 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2412 - :term:`SSTATE_DIR` :term:`TMPDIR`
2413 - :term:`BB_SERVER_TIMEOUT`
2414
2415 For additional information on how to customize the extensible SDK's
2416 configuration, see the
2417 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2418 section in the Yocto Project Application Development and the
2419 Extensible Software Development Kit (eSDK) manual.
2420
Andrew Geisslerf0343792020-11-18 10:42:21 -06002421 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002422 Triggers the OpenEmbedded build system's shared libraries resolver to
2423 exclude an entire package when scanning for shared libraries.
2424
2425 .. note::
2426
2427 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002428 the internal function ``package_do_shlibs``, which is part of the
2429 :ref:`ref-tasks-package` task. You should be aware that the shared
2430 libraries resolver might implicitly define some dependencies between
2431 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002432
Andrew Geissler09036742021-06-25 14:25:14 -05002433 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002434 :term:`PRIVATE_LIBS` variable, which excludes a
2435 package's particular libraries only and not the whole package.
2436
Andrew Geissler09036742021-06-25 14:25:14 -05002437 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002438 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002439
2440 EXCLUDE_FROM_SHLIBS = "1"
2441
Andrew Geisslerf0343792020-11-18 10:42:21 -06002442 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002443 Directs BitBake to exclude a recipe from world builds (i.e.
2444 ``bitbake world``). During world builds, BitBake locates, parses and
2445 builds all recipes found in every layer exposed in the
2446 ``bblayers.conf`` configuration file.
2447
2448 To exclude a recipe from a world build using this variable, set the
2449 variable to "1" in the recipe.
2450
2451 .. note::
2452
Andrew Geissler09036742021-06-25 14:25:14 -05002453 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002454 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002455 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002456 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002457
Andrew Geisslerf0343792020-11-18 10:42:21 -06002458 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002459 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002460 version based on the recipe's :term:`PE` value. If :term:`PE`
2461 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2462 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2463 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2464 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002465
2466 See the :term:`STAMP` variable for an example.
2467
Andrew Geisslerf0343792020-11-18 10:42:21 -06002468 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002469 The full package version specification as it appears on the final
2470 packages produced by a recipe. The variable's value is normally used
2471 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002472 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002473
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002474 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002475
2476 The dependency relationships are intended to force the package
2477 manager to upgrade these types of packages in lock-step.
2478
Andrew Geisslerf0343792020-11-18 10:42:21 -06002479 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002480 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002481 tools are not in the source tree.
2482
2483 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002484 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002485 variable tells the OpenEmbedded build system to prefer the installed
Andrew Geissler517393d2023-01-13 08:55:19 -06002486 external tools. See the :ref:`ref-classes-kernel-yocto` class in
Patrick Williams975a06f2022-10-21 14:42:47 -05002487 ``meta/classes-recipe`` to see how the variable is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002488
Patrick Williamsac13d5f2023-11-24 18:59:46 -06002489 :term:`KERNEL_LOCALVERSION`
2490 This variable allows to append a string to the version
2491 of the kernel image. This corresponds to the ``CONFIG_LOCALVERSION``
2492 kernel configuration parameter.
2493
2494 Using this variable is only useful when you are using a kernel recipe
2495 inheriting the :ref:`ref-classes-kernel` class, and which doesn't
2496 already set a local version. Therefore, setting this variable has no
2497 impact on ``linux-yocto`` kernels.
2498
Andrew Geissler517393d2023-01-13 08:55:19 -06002499 :term:`EXTERNAL_TOOLCHAIN`
2500 When you intend to use an
2501 :ref:`external toolchain <dev-manual/external-toolchain:optionally using an external toolchain>`,
2502 this variable allows to specify the directory where this toolchain was
2503 installed.
2504
Andrew Geisslerf0343792020-11-18 10:42:21 -06002505 :term:`EXTERNALSRC`
Andrew Geissler517393d2023-01-13 08:55:19 -06002506 When inheriting the :ref:`ref-classes-externalsrc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002507 class, this variable points to the source tree, which is outside of
2508 the OpenEmbedded build system. When set, this variable sets the
2509 :term:`S` variable, which is what the OpenEmbedded build
2510 system uses to locate unpacked recipe source code.
2511
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002512 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002513 can also find information on how to use this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06002514 ":ref:`dev-manual/building:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002515 section in the Yocto Project Development Tasks Manual.
2516
Andrew Geisslerf0343792020-11-18 10:42:21 -06002517 :term:`EXTERNALSRC_BUILD`
Andrew Geissler517393d2023-01-13 08:55:19 -06002518 When inheriting the :ref:`ref-classes-externalsrc`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002519 class, this variable points to the directory in which the recipe's
2520 source code is built, which is outside of the OpenEmbedded build
2521 system. When set, this variable sets the :term:`B` variable,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002522 which is what the OpenEmbedded build system uses to locate the
2523 :term:`Build Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002524
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002525 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002526 can also find information on how to use this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06002527 ":ref:`dev-manual/building:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002528 section in the Yocto Project Development Tasks Manual.
2529
Andrew Geisslerf0343792020-11-18 10:42:21 -06002530 :term:`EXTRA_AUTORECONF`
Andrew Geissler517393d2023-01-13 08:55:19 -06002531 For recipes inheriting the :ref:`ref-classes-autotools`
Andrew Geissler09036742021-06-25 14:25:14 -05002532 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002533 pass to the ``autoreconf`` command that is executed during the
2534 :ref:`ref-tasks-configure` task.
2535
2536 The default value is "--exclude=autopoint".
2537
Andrew Geisslerf0343792020-11-18 10:42:21 -06002538 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002539 A list of additional features to include in an image. When listing
2540 more than one feature, separate them with a space.
2541
2542 Typically, you configure this variable in your ``local.conf`` file,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002543 which is found in the :term:`Build Directory`. Although you can use this
2544 variable from within a recipe, best practices dictate that you do not.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002545
2546 .. note::
2547
2548 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002549 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002550
2551 Here are some examples of features you can add:
2552
Andrew Geissler615f2f12022-07-15 14:00:58 -05002553 - "dbg-pkgs" --- adds -dbg packages for all installed packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002554 symbol information for debugging and profiling.
2555
Andrew Geissler615f2f12022-07-15 14:00:58 -05002556 - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002557 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002558 'post-install-logging' features in the ":ref:`ref-features-image`"
2559 section for more information.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002560 - "dev-pkgs" --- adds -dev packages for all installed packages. This is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002561 useful if you want to develop against the libraries in the image.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002562 - "read-only-rootfs" --- creates an image whose root filesystem is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002563 read-only. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06002564 ":ref:`dev-manual/read-only-rootfs:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002565 section in the Yocto Project Development Tasks Manual for more
2566 information
Andrew Geissler615f2f12022-07-15 14:00:58 -05002567 - "tools-debug" --- adds debugging tools such as gdb and strace.
2568 - "tools-sdk" --- adds development tools such as gcc, make,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002569 pkgconfig and so forth.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002570 - "tools-testapps" --- adds useful testing tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002571 such as ts_print, aplay, arecord and so forth.
2572
2573 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002574 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002575
2576 For an example that shows how to customize your image by using this
Andrew Geissler517393d2023-01-13 08:55:19 -06002577 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 -05002578 section in the Yocto Project Development Tasks Manual.
2579
Andrew Geisslerf0343792020-11-18 10:42:21 -06002580 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002581 Specifies additional options for the image creation command that has
2582 been specified in :term:`IMAGE_CMD`. When setting
2583 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002584 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002585
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002586 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002587
Andrew Geisslerf0343792020-11-18 10:42:21 -06002588 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002589 A list of recipes to build that do not provide packages for
2590 installing into the root filesystem.
2591
2592 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002593 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002594 variable to list these recipes and thus specify the dependencies. A
2595 typical example is a required bootloader in a machine configuration.
2596
2597 .. note::
2598
2599 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002600 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002601
Andrew Geisslerf0343792020-11-18 10:42:21 -06002602 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002603 Additional `CMake <https://cmake.org/overview/>`__ options. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06002604 :ref:`ref-classes-cmake` class for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002605
Andrew Geisslerf0343792020-11-18 10:42:21 -06002606 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002607 Additional ``configure`` script options. See
2608 :term:`PACKAGECONFIG_CONFARGS` for
2609 additional information on passing configure script options.
2610
Andrew Geisslerf0343792020-11-18 10:42:21 -06002611 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002612 Additional GNU ``make`` options.
2613
Andrew Geissler09036742021-06-25 14:25:14 -05002614 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002615 variable to specify any required GNU options.
2616
2617 :term:`PARALLEL_MAKE` and
2618 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002619 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002620
Andrew Geisslerf0343792020-11-18 10:42:21 -06002621 :term:`EXTRA_OESCONS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002622 When inheriting the :ref:`ref-classes-scons` class, this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002623 variable specifies additional configuration options you want to pass
2624 to the ``scons`` command line.
2625
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06002626 :term:`EXTRA_OEMESON`
2627 Additional `Meson <https://mesonbuild.com/>`__ options. See the
2628 :ref:`ref-classes-meson` class for additional information.
2629
2630 In addition to standard Meson options, such options correspond to
2631 `Meson build options <https://mesonbuild.com/Build-options.html>`__
2632 defined in the ``meson_options.txt`` file in the sources to build.
2633 Here is an example::
2634
2635 EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
2636
2637 Note that any custom value for the Meson ``--buildtype`` option
2638 should be set through the :term:`MESON_BUILDTYPE` variable.
2639
Andrew Geisslerf0343792020-11-18 10:42:21 -06002640 :term:`EXTRA_USERS_PARAMS`
Andrew Geissler517393d2023-01-13 08:55:19 -06002641 When inheriting the :ref:`ref-classes-extrausers`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002642 class, this variable provides image level user and group operations.
2643 This is a more global method of providing user and group
2644 configuration as compared to using the
Andrew Geissler517393d2023-01-13 08:55:19 -06002645 :ref:`ref-classes-useradd` class, which ties user and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002646 group configurations to a specific recipe.
2647
2648 The set list of commands you can configure using the
Andrew Geissler517393d2023-01-13 08:55:19 -06002649 :term:`EXTRA_USERS_PARAMS` is shown in the
2650 :ref:`ref-classes-extrausers` class. These commands map to the normal
2651 Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002652
2653 # EXTRA_USERS_PARAMS = "\
2654 # useradd -p '' tester; \
2655 # groupadd developers; \
2656 # userdel nobody; \
2657 # groupdel -g video; \
2658 # groupmod -g 1020 developers; \
2659 # usermod -s /bin/sh tester; \
2660 # "
2661
Patrick Williams03907ee2022-05-01 06:28:52 -05002662 Hardcoded passwords are supported via the ``-p`` parameters for
2663 ``useradd`` or ``usermod``, but only hashed.
2664
2665 Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
2666 passwords. First on host, create the (escaped) password hash::
2667
2668 printf "%q" $(mkpasswd -m sha256crypt tester01)
2669
2670 The resulting hash is set to a variable and used in ``useradd`` command parameters::
2671
2672 inherit extrausers
2673 PASSWD = "\$X\$ABC123\$A-Long-Hash"
2674 EXTRA_USERS_PARAMS = "\
2675 useradd -p '${PASSWD}' tester-jim; \
2676 useradd -p '${PASSWD}' tester-sue; \
2677 "
2678
2679 Finally, here is an example that sets the root password::
2680
2681 inherit extrausers
2682 EXTRA_USERS_PARAMS = "\
2683 usermod -p '${PASSWD}' root; \
2684 "
2685
2686 .. note::
2687
2688 From a security perspective, hardcoding a default password is not
Andrew Geissler87f5cff2022-09-30 13:13:31 -05002689 generally a good idea or even legal in some jurisdictions. It is
2690 recommended that you do not do this if you are building a production
Patrick Williams03907ee2022-05-01 06:28:52 -05002691 image.
2692
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002693 Additionally there is a special ``passwd-expire`` command that will
2694 cause the password for a user to be expired and thus force changing it
2695 on first login, for example::
2696
2697 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2698
2699 .. note::
2700
2701 At present, ``passwd-expire`` may only work for remote logins when
2702 using OpenSSH and not dropbear as an SSH server.
2703
Andrew Geissler9aee5002022-03-30 16:27:02 +00002704 :term:`EXTRANATIVEPATH`
2705 A list of subdirectories of
2706 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2707 added to the beginning of the environment variable ``PATH``. As an
2708 example, the following prepends
2709 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2710 ``PATH``::
2711
2712 EXTRANATIVEPATH = "foo bar"
2713
Andrew Geissler517393d2023-01-13 08:55:19 -06002714 :term:`FAKEROOT`
2715 See :term:`bitbake:FAKEROOT` in the BitBake manual.
2716
2717 :term:`FAKEROOTBASEENV`
2718 See :term:`bitbake:FAKEROOTBASEENV` in the BitBake manual.
2719
2720 :term:`FAKEROOTCMD`
2721 See :term:`bitbake:FAKEROOTCMD` in the BitBake manual.
2722
2723 :term:`FAKEROOTDIRS`
2724 See :term:`bitbake:FAKEROOTDIRS` in the BitBake manual.
2725
2726 :term:`FAKEROOTENV`
2727 See :term:`bitbake:FAKEROOTENV` in the BitBake manual.
2728
2729 :term:`FAKEROOTNOENV`
2730 See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual.
2731
Andrew Geisslerf0343792020-11-18 10:42:21 -06002732 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002733 Defines one or more packages to include in an image when a specific
2734 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002735 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002736 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002737
2738 FEATURE_PACKAGES_widget = "package1 package2"
2739
Andrew Geissler09036742021-06-25 14:25:14 -05002740 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002741 package1 and package2 would be included in the image.
2742
2743 .. note::
2744
Andrew Geissler09036742021-06-25 14:25:14 -05002745 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002746 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002747 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002748 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002749
Andrew Geisslerf0343792020-11-18 10:42:21 -06002750 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002751 Points to the base URL of the server and location within the
2752 document-root that provides the metadata and packages required by
2753 OPKG to support runtime package management of IPK packages. You set
2754 this variable in your ``local.conf`` file.
2755
Andrew Geisslerc926e172021-05-07 16:11:35 -05002756 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002757
2758 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2759
2760 This example assumes you are serving
2761 your packages over HTTP and your databases are located in a directory
2762 named ``BOARD-dir``, which is underneath your HTTP server's
2763 document-root. In this case, the OpenEmbedded build system generates
2764 a set of configuration files for you in your target that work with
2765 the feed.
2766
Andrew Geissler517393d2023-01-13 08:55:19 -06002767 :term:`FETCHCMD`
2768 See :term:`bitbake:FETCHCMD` in the BitBake manual.
2769
2770 :term:`FILE`
2771 See :term:`bitbake:FILE` in the BitBake manual.
2772
Andrew Geisslerf0343792020-11-18 10:42:21 -06002773 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002774 The list of files and directories that are placed in a package. The
2775 :term:`PACKAGES` variable lists the packages
2776 generated by a recipe.
2777
Andrew Geissler09036742021-06-25 14:25:14 -05002778 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002779 identifies the resulting package. Then, provide a space-separated
2780 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002781 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002782
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002783 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002784
2785 .. note::
2786
2787 - When specifying files or paths, you can pattern match using
2788 Python's
Patrick Williams2390b1b2022-11-03 13:47:49 -05002789 `glob <https://docs.python.org/3/library/glob.html>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002790 syntax. For details on the syntax, see the documentation by
2791 following the previous link.
2792
Andrew Geissler09036742021-06-25 14:25:14 -05002793 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002794 good practice to use appropriate path variables. For example,
2795 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2796 rather than ``/usr/bin``. You can find a list of these
2797 variables at the top of the ``meta/conf/bitbake.conf`` file in
2798 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002799 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002800 this file.
2801
Andrew Geissler09036742021-06-25 14:25:14 -05002802 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002803 editable and you know they should not be overwritten during the
2804 package update process by the Package Management System (PMS), you
2805 can identify these files so that the PMS will not overwrite them. See
2806 the :term:`CONFFILES` variable for information on
2807 how to identify these files to the PMS.
2808
Andrew Geisslerf0343792020-11-18 10:42:21 -06002809 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002810 Defines the file specification to match
2811 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002812 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002813 symbolic link (symlink) for shared libraries on the target platform.
2814
2815 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002816 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002817
2818 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2819
Andrew Geisslerf0343792020-11-18 10:42:21 -06002820 :term:`FILESEXTRAPATHS`
Patrick Williams520786c2023-06-25 16:20:36 -05002821 A colon-separated list to extend the search path the OpenEmbedded build
2822 system uses when looking for files and patches as it processes recipes
2823 and append files. The default directories BitBake uses when it processes
2824 recipes are initially defined by the :term:`FILESPATH` variable. You can
2825 extend :term:`FILESPATH` variable by using :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002826
2827 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002828 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002829 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002830
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002831 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002832
2833 In the above example, the build system first
2834 looks for files in a directory that has the same name as the
2835 corresponding append file.
2836
2837 .. note::
2838
Andrew Geissler09036742021-06-25 14:25:14 -05002839 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002840 expansion (``:=``) operator. Immediate expansion makes sure that
2841 BitBake evaluates :term:`THISDIR` at the time the
2842 directive is encountered rather than at some later time when
2843 expansion might result in a directory that does not contain the
2844 files you need.
2845
2846 Also, include the trailing separating colon character if you are
2847 prepending. The trailing colon character is necessary because you
2848 are directing BitBake to extend the path by prepending directories
2849 to the search path.
2850
Andrew Geisslerc926e172021-05-07 16:11:35 -05002851 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002852
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002853 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002854
2855 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002856 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002857 in the same directory as the corresponding append file.
2858
Andrew Geisslerc926e172021-05-07 16:11:35 -05002859 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002860
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002861 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002862
2863 A final example shows how you can extend the search path and include
2864 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002865 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002866
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002867 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002868
2869 The previous statement appears in the
2870 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002871 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002872 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2873 override is a special :term:`PACKAGE_ARCH`
2874 definition for multiple ``meta-intel`` machines.
2875
2876 .. note::
2877
2878 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002879 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002880
2881 By prepending paths in ``.bbappend`` files, you allow multiple append
2882 files that reside in different layers but are used for the same
2883 recipe to correctly extend the path.
2884
Andrew Geisslerf0343792020-11-18 10:42:21 -06002885 :term:`FILESOVERRIDES`
Patrick Williams520786c2023-06-25 16:20:36 -05002886 A colon-separated list to specify a subset of :term:`OVERRIDES` used by
2887 the OpenEmbedded build system for creating :term:`FILESPATH`. The
2888 :term:`FILESOVERRIDES` variable uses overrides to automatically extend
2889 the :term:`FILESPATH` variable. For an example of how that works, see the
2890 :term:`FILESPATH` variable description. Additionally, you find more
2891 information on how overrides are handled in the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05002892 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002893 section of the BitBake User Manual.
2894
Andrew Geissler09036742021-06-25 14:25:14 -05002895 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002896
2897 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2898
2899 .. note::
2900
Andrew Geissler09036742021-06-25 14:25:14 -05002901 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002902 with expected overrides and are used in an expected manner by the
2903 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002904
Andrew Geisslerf0343792020-11-18 10:42:21 -06002905 :term:`FILESPATH`
Patrick Williams520786c2023-06-25 16:20:36 -05002906 A colon-separated list specifying the default set of directories the
2907 OpenEmbedded build system uses when searching for patches and files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002908
2909 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002910 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002911 patches specified by each ``file://`` URI in a recipe's
2912 :term:`SRC_URI` statements.
2913
Andrew Geissler09036742021-06-25 14:25:14 -05002914 The default value for the :term:`FILESPATH` variable is defined in the
Patrick Williams975a06f2022-10-21 14:42:47 -05002915 :ref:`ref-classes-base` class found in ``meta/classes-global`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002916 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002917
2918 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2919 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2920
2921 The
Andrew Geissler09036742021-06-25 14:25:14 -05002922 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002923 from the :term:`FILESOVERRIDES` variable.
2924
2925 .. note::
2926
Andrew Geissler09036742021-06-25 14:25:14 -05002927 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002928 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002929 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002930 :term:`FILESEXTRAPATHS` variable.
2931
Andrew Geissler09036742021-06-25 14:25:14 -05002932 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002933 to directories in custom layers where append files
2934 (``.bbappend``) are used. If you want the build system to find
2935 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002936 to extend the :term:`FILESPATH` variable by using the
2937 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002938
2939 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002940 example, consider a case where there is the following directory structure
2941 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002942
2943 files/defconfig
2944 files/MACHINEA/defconfig
2945 files/MACHINEB/defconfig
2946
Andrew Geissler09036742021-06-25 14:25:14 -05002947 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002948 "file://defconfig". Given this scenario, you can set
2949 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002950 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002951 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2952 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2953 build system uses files from ``files/defconfig``.
2954
2955 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002956 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002957 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler517393d2023-01-13 08:55:19 -06002958 ":ref:`dev-manual/new-recipe:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002959 the Yocto Project Development Tasks Manual. See the
2960 :ref:`ref-tasks-patch` task as well.
2961
Andrew Geisslerf0343792020-11-18 10:42:21 -06002962 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002963 Allows you to define your own file permissions settings table as part
2964 of your configuration for the packaging process. For example, suppose
2965 you need a consistent set of custom permissions for a set of groups
2966 and users across an entire work project. It is best to do this in the
2967 packages themselves but this is not always possible.
2968
2969 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2970 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2971 If you create your own file
2972 permissions setting table, you should place it in your layer or the
2973 distro's layer.
2974
Andrew Geissler09036742021-06-25 14:25:14 -05002975 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002976 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
Patrick Williams2390b1b2022-11-03 13:47:49 -05002977 to point to your custom ``fs-perms.txt``. You can specify more than a
2978 single file permissions setting table. The paths you specify to these
2979 files must be defined within the :term:`BBPATH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002980
2981 For guidance on how to create your own file permissions settings
2982 table file, examine the existing ``fs-perms.txt``.
2983
Andrew Geissler3eeda902023-05-19 10:14:02 -05002984 :term:`FIT_ADDRESS_CELLS`
Andrew Geissler3eeda902023-05-19 10:14:02 -05002985 Specifies the value of the ``#address-cells`` value for the
Patrick Williamsb542dec2023-06-09 01:26:37 -05002986 description of the FIT image.
Andrew Geissler3eeda902023-05-19 10:14:02 -05002987
2988 The default value is set to "1" by the :ref:`ref-classes-kernel-fitimage`
2989 class, which corresponds to 32 bit addresses.
2990
Patrick Williamsb542dec2023-06-09 01:26:37 -05002991 For platforms that need to set 64 bit addresses, for example in
Andrew Geissler3eeda902023-05-19 10:14:02 -05002992 :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to
2993 set this value to "2", as two 32 bit values (cells) will be needed
2994 to represent such addresses.
2995
2996 Here is an example setting "0x400000000" as a load address::
2997
2998 FIT_ADDRESS_CELLS = "2"
2999 UBOOT_LOADADDRESS= "0x04 0x00000000"
3000
3001 See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__.
3002
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003003 :term:`FIT_CONF_DEFAULT_DTB`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003004 Specifies the default device tree binary (dtb) file for a FIT image
3005 when multiple ones are provided.
3006
3007 This variable is used in the :ref:`ref-classes-kernel-fitimage` class.
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003008
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003009 :term:`FIT_DESC`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003010 Specifies the description string encoded into a FIT image. The
3011 default value is set by the :ref:`ref-classes-kernel-fitimage` class as
3012 follows::
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003013
3014 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
3015
Andrew Geisslerf0343792020-11-18 10:42:21 -06003016 :term:`FIT_GENERATE_KEYS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003017 Decides whether to generate the keys for signing the FIT image if
3018 they don't already exist. The keys are created in
3019 :term:`UBOOT_SIGN_KEYDIR`. The default value is set to "0"
3020 by the :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003021
Andrew Geisslerf0343792020-11-18 10:42:21 -06003022 :term:`FIT_HASH_ALG`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003023 Specifies the hash algorithm used in creating the FIT Image.
3024 This variable is set by default to "sha256" by the
3025 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003026
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003027 :term:`FIT_KERNEL_COMP_ALG`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003028 The compression algorithm to use for the kernel image inside the FIT Image.
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06003029 At present, the only supported values are "gzip" (default), "lzo" or "none".
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003030 If you set this variable to anything other than "none" you may also need
3031 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
3032
Patrick Williamsb542dec2023-06-09 01:26:37 -05003033 This variable is used in the :ref:`ref-classes-kernel-uboot` class.
3034
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003035 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
3036 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
Patrick Williamsb542dec2023-06-09 01:26:37 -05003037 value is set ".gz" by the :ref:`ref-classes-kernel-uboot` class. If you
3038 set :term:`FIT_KERNEL_COMP_ALG` to "lzo", you may want to set this
3039 variable to ".lzo".
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003040
Andrew Geisslerf0343792020-11-18 10:42:21 -06003041 :term:`FIT_KEY_GENRSA_ARGS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003042 Arguments to ``openssl genrsa`` for generating a RSA private key for
3043 signing the FIT image. The default value is set to "-F4" by the
3044 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003045
Andrew Geisslerf0343792020-11-18 10:42:21 -06003046 :term:`FIT_KEY_REQ_ARGS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003047 Arguments to ``openssl req`` for generating a certificate for signing
3048 the FIT image. The default value is "-batch -new" by the
3049 :ref:`ref-classes-kernel-fitimage` class, "batch" for
3050 non interactive mode and "new" for generating new keys.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003051
Andrew Geisslerf0343792020-11-18 10:42:21 -06003052 :term:`FIT_KEY_SIGN_PKCS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003053 Format for the public key certificate used for signing the FIT image.
3054 The default value is set to "x509" by the
3055 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003056
Andrew Geisslerf0343792020-11-18 10:42:21 -06003057 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003058 Specifies the signature algorithm used in creating the FIT Image.
Patrick Williamsb542dec2023-06-09 01:26:37 -05003059 This variable is set by default to "rsa2048" by the
3060 :ref:`ref-classes-kernel-fitimage` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003061
Patrick Williams975a06f2022-10-21 14:42:47 -05003062 :term:`FIT_PAD_ALG`
3063 Specifies the padding algorithm used in creating the FIT Image.
Patrick Williamsb542dec2023-06-09 01:26:37 -05003064 The default value is set to "pkcs-1.5" by the
3065 :ref:`ref-classes-kernel-fitimage` class.
Patrick Williams975a06f2022-10-21 14:42:47 -05003066
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003067 :term:`FIT_SIGN_INDIVIDUAL`
Andrew Geissler517393d2023-01-13 08:55:19 -06003068 If set to "1", then the :ref:`ref-classes-kernel-fitimage`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003069 class will sign the kernel, dtb and ramdisk images individually in addition
Patrick Williamsb542dec2023-06-09 01:26:37 -05003070 to signing the FIT image itself. This could be useful if you are
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003071 intending to verify signatures in another context than booting via
3072 U-Boot.
3073
Patrick Williamsb542dec2023-06-09 01:26:37 -05003074 This variable is set to "0" by default.
3075
Andrew Geissler9aee5002022-03-30 16:27:02 +00003076 :term:`FIT_SIGN_NUMBITS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05003077 Size of the private key used in the FIT image, in number of bits.
3078 The default value for this variable is set to "2048"
3079 by the :ref:`ref-classes-kernel-fitimage` class.
Andrew Geissler9aee5002022-03-30 16:27:02 +00003080
Andrew Geisslerf0343792020-11-18 10:42:21 -06003081 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geissler517393d2023-01-13 08:55:19 -06003082 When inheriting the :ref:`ref-classes-fontcache` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003083 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04003084 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003085
Andrew Geisslerf0343792020-11-18 10:42:21 -06003086 :term:`FONT_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06003087 When inheriting the :ref:`ref-classes-fontcache` class, this variable
3088 identifies packages containing font files that need to be cached by
3089 Fontconfig. By default, the :ref:`ref-classes-fontcache` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003090 that fonts are in the recipe's main package (i.e.
3091 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
3092 need are in a package other than that main package.
3093
Andrew Geisslerf0343792020-11-18 10:42:21 -06003094 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003095 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
3096 during the generation of the root filesystem.
3097
3098 Set the variable to "1" to force the removal of these packages.
3099
Andrew Geisslerf0343792020-11-18 10:42:21 -06003100 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003101 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003102 compiling an optimized system. This variable defaults to "-O2 -pipe
3103 ${DEBUG_FLAGS}".
3104
Andrew Geisslerf0343792020-11-18 10:42:21 -06003105 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003106 Enables Position Independent Executables (PIE) within the GNU C
3107 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
3108 Programming (ROP) attacks much more difficult to execute.
3109
3110 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003111 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003112
3113 GCCPIE ?= "--enable-default-pie"
3114
Andrew Geisslerf0343792020-11-18 10:42:21 -06003115 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003116 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05003117 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003118 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003119
3120 GCCVERSION ?= "8.%"
3121
3122 You can override this value by setting it in a
3123 configuration file such as the ``local.conf``.
3124
Andrew Geisslerf0343792020-11-18 10:42:21 -06003125 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003126 The minimal command and arguments to run the GNU Debugger.
3127
Andrew Geissler595f6302022-01-24 19:11:47 +00003128 :term:`GIR_EXTRA_LIBS_PATH`
3129 Allows to specify an extra search path for ``.so`` files
3130 in GLib related recipes using GObject introspection,
3131 and which do not compile without this setting.
Andrew Geissler517393d2023-01-13 08:55:19 -06003132 See the ":ref:`dev-manual/gobject-introspection:enabling gobject introspection support`"
Andrew Geissler595f6302022-01-24 19:11:47 +00003133 section for details.
3134
Andrew Geisslerf0343792020-11-18 10:42:21 -06003135 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003136 The directory in which a local copy of a Git repository is stored
3137 when it is cloned.
3138
Patrick Williams975a06f2022-10-21 14:42:47 -05003139 :term:`GITHUB_BASE_URI`
Andrew Geissler517393d2023-01-13 08:55:19 -06003140 When inheriting the :ref:`ref-classes-github-releases`
Patrick Williams975a06f2022-10-21 14:42:47 -05003141 class, specifies the base URL for fetching releases for the github
3142 project you wish to fetch sources from. The default value is as follows::
3143
3144 GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/"
3145
Andrew Geisslerf0343792020-11-18 10:42:21 -06003146 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003147 Specifies the list of GLIBC locales to generate should you not wish
3148 to generate all LIBC locals, which can be time consuming.
3149
3150 .. note::
3151
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003152 If you specifically remove the locale ``en_US.UTF-8``, you must set
3153 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003154
Andrew Geissler09036742021-06-25 14:25:14 -05003155 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geissler517393d2023-01-13 08:55:19 -06003156 By default, all locales are generated::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003157
3158 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
3159
Andrew Geisslerc5535c92023-01-27 16:10:19 -06003160 :term:`GO_IMPORT`
3161 When inheriting the :ref:`ref-classes-go` class, this mandatory variable
3162 sets the import path for the Go package that will be created for the code
3163 to build. If you have a ``go.mod`` file in the source directory, this
3164 typically matches the path in the ``module`` line in this file.
3165
3166 Other Go programs importing this package will use this path.
3167
3168 Here is an example setting from the
3169 :yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
3170 recipe::
3171
3172 GO_IMPORT = "golang.org/x/example"
3173
3174 :term:`GO_INSTALL`
3175 When inheriting the :ref:`ref-classes-go` class, this optional variable
3176 specifies which packages in the sources should be compiled and
3177 installed in the Go build space by the
3178 `go install <https://go.dev/ref/mod#go-install>`__ command.
3179
3180 Here is an example setting from the
3181 :oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>`
3182 recipe::
3183
3184 GO_INSTALL = "\
3185 ${GO_IMPORT}/cmd/crucible \
3186 ${GO_IMPORT}/cmd/habtool \
3187 "
3188
3189 By default, :term:`GO_INSTALL` is defined as::
3190
3191 GO_INSTALL ?= "${GO_IMPORT}/..."
3192
3193 The ``...`` wildcard means that it will catch all
3194 packages found in the sources.
3195
3196 See the :term:`GO_INSTALL_FILTEROUT` variable for
3197 filtering out unwanted packages from the ones
3198 found from the :term:`GO_INSTALL` value.
3199
3200 :term:`GO_INSTALL_FILTEROUT`
3201 When using the Go "vendor" mechanism to bring in dependencies for a Go
3202 package, the default :term:`GO_INSTALL` setting, which uses the ``...``
3203 wildcard, will include the vendored packages in the build, which produces
3204 incorrect results.
3205
3206 There are also some Go packages that are structured poorly, so that the
3207 ``...`` wildcard results in building example or test code that should not
3208 be included in the build, or could fail to build.
3209
3210 This optional variable allows for filtering out a subset of the sources.
3211 It defaults to excluding everything under the ``vendor`` subdirectory
3212 under package's main directory. This is the normal location for vendored
3213 packages, but it can be overridden by a recipe to filter out other
3214 subdirectories if needed.
3215
3216 :term:`GO_WORKDIR`
3217 When using Go Modules, the current working directory must be the directory
3218 containing the ``go.mod`` file, or one of its subdirectories. When the
3219 ``go`` tool is used, it will automatically look for the ``go.mod`` file
3220 in the Go working directory or in any parent directory, but not in
3221 subdirectories.
3222
3223 When using the :ref:`ref-classes-go-mod` class to use Go modules,
3224 the optional :term:`GO_WORKDIR` variable, defaulting to the value
3225 of :term:`GO_IMPORT`, allows to specify a different Go working directory.
3226
Andrew Geisslerf0343792020-11-18 10:42:21 -06003227 :term:`GROUPADD_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06003228 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003229 this variable specifies for a package what parameters should be
3230 passed to the ``groupadd`` command if you wish to add a group to the
3231 system when the package is installed.
3232
Andrew Geisslerc926e172021-05-07 16:11:35 -05003233 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003234
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003235 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003236
Patrick Williamsb58112e2024-03-07 11:16:36 -06003237 More than one group can be added by separating each set of different
3238 groups' parameters with a semicolon.
3239
3240 Here is an example adding multiple groups from the ``useradd-example.bb``
3241 file in the ``meta-skeleton`` layer::
3242
3243 GROUPADD_PARAM:${PN} = "-g 880 group1; -g 890 group2"
3244
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003245 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003246 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003247
Andrew Geisslerf0343792020-11-18 10:42:21 -06003248 :term:`GROUPMEMS_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06003249 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003250 this variable specifies for a package what parameters should be
3251 passed to the ``groupmems`` command if you wish to modify the members
3252 of a group when the package is installed.
3253
3254 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003255 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003256
Andrew Geisslerf0343792020-11-18 10:42:21 -06003257 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003258 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
3259 and serial in the boot menu. Set this variable to "1" in your
3260 ``local.conf`` or distribution configuration file to enable graphics
3261 and serial in the menu.
3262
Andrew Geissler517393d2023-01-13 08:55:19 -06003263 See the :ref:`ref-classes-grub-efi` class for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003264 information on how this variable is used.
3265
Andrew Geisslerf0343792020-11-18 10:42:21 -06003266 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003267 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
3268 configuration. Use a semi-colon character (``;``) to separate
3269 multiple options.
3270
Andrew Geissler09036742021-06-25 14:25:14 -05003271 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06003272 :ref:`ref-classes-grub-efi` class for more information
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003273 on how this variable is used.
3274
Andrew Geisslerf0343792020-11-18 10:42:21 -06003275 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003276 Specifies the timeout before executing the default ``LABEL`` in the
3277 GNU GRand Unified Bootloader (GRUB).
3278
Andrew Geissler09036742021-06-25 14:25:14 -05003279 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06003280 :ref:`ref-classes-grub-efi` class for more information
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003281 on how this variable is used.
3282
Andrew Geisslerf0343792020-11-18 10:42:21 -06003283 :term:`GTKIMMODULES_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06003284 When inheriting the :ref:`ref-classes-gtk-immodules-cache` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003285 this variable specifies the packages that contain the GTK+ input
3286 method modules being installed when the modules are in packages other
3287 than the main package.
3288
Andrew Geissler517393d2023-01-13 08:55:19 -06003289 :term:`HGDIR`
3290 See :term:`bitbake:HGDIR` in the BitBake manual.
3291
Andrew Geisslerf0343792020-11-18 10:42:21 -06003292 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003293 Website where more information about the software the recipe is
3294 building can be found.
3295
Andrew Geisslerf0343792020-11-18 10:42:21 -06003296 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003297 The name of the target architecture, which is normally the same as
3298 :term:`TARGET_ARCH`. The OpenEmbedded build system
3299 supports many architectures. Here is an example list of architectures
3300 supported. This list is by no means complete as the architecture is
3301 configurable:
3302
3303 - arm
3304 - i586
3305 - x86_64
3306 - powerpc
3307 - powerpc64
3308 - mips
3309 - mipsel
3310
Andrew Geisslerf0343792020-11-18 10:42:21 -06003311 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003312 Specifies architecture-specific compiler flags that are passed to the
3313 C compiler.
3314
Andrew Geissler09036742021-06-25 14:25:14 -05003315 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003316 is being built:
3317
3318 - :term:`TARGET_CC_ARCH` when building for the
3319 target
3320
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003321 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003322 ``-native``)
3323
3324 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
3325 ``nativesdk-``)
3326
Andrew Geisslerf0343792020-11-18 10:42:21 -06003327 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003328 Specifies the name of the target operating system, which is normally
3329 the same as the :term:`TARGET_OS`. The variable can
3330 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
3331 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
3332 "linux-musleabi" values possible.
3333
Andrew Geisslerf0343792020-11-18 10:42:21 -06003334 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05003335 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003336 is normally the same as :term:`TARGET_PREFIX`.
3337
Andrew Geisslerf0343792020-11-18 10:42:21 -06003338 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003339 Specifies the system, including the architecture and the operating
3340 system, for which the build is occurring in the context of the
3341 current recipe.
3342
3343 The OpenEmbedded build system automatically sets this variable based
3344 on :term:`HOST_ARCH`,
3345 :term:`HOST_VENDOR`, and
3346 :term:`HOST_OS` variables.
3347
3348 .. note::
3349
3350 You do not need to set the variable yourself.
3351
3352 Consider these two examples:
3353
3354 - Given a native recipe on a 32-bit x86 machine running Linux, the
3355 value is "i686-linux".
3356
3357 - Given a recipe being built for a little-endian MIPS target running
3358 Linux, the value might be "mipsel-linux".
3359
Andrew Geissler9aee5002022-03-30 16:27:02 +00003360 :term:`HOST_VENDOR`
3361 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
3362 same as :term:`TARGET_VENDOR`.
3363
Andrew Geisslerf0343792020-11-18 10:42:21 -06003364 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003365 A space-separated list (filter) of tools on the build host that
3366 should be allowed to be called from within build tasks. Using this
3367 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05003368 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003369 host, the OpenEmbedded build system produces an error and the build
3370 is not started.
3371
3372 For additional information, see
3373 :term:`HOSTTOOLS_NONFATAL`.
3374
Andrew Geisslerf0343792020-11-18 10:42:21 -06003375 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003376 A space-separated list (filter) of tools on the build host that
3377 should be allowed to be called from within build tasks. Using this
3378 filter helps reduce the possibility of host contamination. Unlike
3379 :term:`HOSTTOOLS`, the OpenEmbedded build system
3380 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05003381 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
3382 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003383
Andrew Geissler9aee5002022-03-30 16:27:02 +00003384 :term:`ICECC_CLASS_DISABLE`
3385 Identifies user classes that you do not want the Icecream distributed
3386 compile support to consider. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003387 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geissler9aee5002022-03-30 16:27:02 +00003388 your ``local.conf`` file.
3389
3390 When you list classes using this variable, the recipes inheriting
3391 those classes will not benefit from distributed compilation across
3392 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003393
Andrew Geisslerf0343792020-11-18 10:42:21 -06003394 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003395 Disables or enables the ``icecc`` (Icecream) function. For more
3396 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00003397 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003398 section.
3399
3400 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003401 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003402
3403 ICECC_DISABLED ??= "1"
3404
Andrew Geisslerc926e172021-05-07 16:11:35 -05003405 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003406
3407 ICECC_DISABLED = ""
3408
Andrew Geisslerf0343792020-11-18 10:42:21 -06003409 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003410 Points to the ``icecc-create-env`` script that you provide. This
Andrew Geissler517393d2023-01-13 08:55:19 -06003411 variable is used by the :ref:`ref-classes-icecc` class. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003412 set this variable in your ``local.conf`` file.
3413
3414 If you do not point to a script that you provide, the OpenEmbedded
3415 build system uses the default script provided by the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003416 :oe_git:`icecc-create-env_0.1.bb
3417 </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>`
3418 recipe, which is a modified version and not the one that comes with
3419 ``icecream``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003420
Andrew Geisslerf0343792020-11-18 10:42:21 -06003421 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003422 Extra options passed to the ``make`` command during the
3423 :ref:`ref-tasks-compile` task that specify parallel
3424 compilation. This variable usually takes the form of "-j x", where x
3425 represents the maximum number of parallel threads ``make`` can run.
3426
3427 .. note::
3428
3429 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003430 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003431
3432 If your enabled machines support multiple cores, coming up with the
3433 maximum number of parallel threads that gives you the best
3434 performance could take some experimentation since machine speed,
3435 network lag, available memory, and existing machine loads can all
3436 affect build time. Consequently, unlike the
3437 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05003438 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003439 performance.
3440
Andrew Geissler09036742021-06-25 14:25:14 -05003441 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003442 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05003443 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003444
Andrew Geisslerf0343792020-11-18 10:42:21 -06003445 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003446 The location of the ``icecc`` binary. You can set this variable in
3447 your ``local.conf`` file. If your ``local.conf`` file does not define
Andrew Geissler517393d2023-01-13 08:55:19 -06003448 this variable, the :ref:`ref-classes-icecc` class attempts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003449 to define it by locating ``icecc`` using ``which``.
3450
Andrew Geissler9aee5002022-03-30 16:27:02 +00003451 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003452 Identifies user recipes that you do not want the Icecream distributed
3453 compile support to consider. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003454 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003455 your ``local.conf`` file.
3456
Andrew Geissler595f6302022-01-24 19:11:47 +00003457 When you list recipes using this variable, you are excluding them
3458 from distributed compilation across remote hosts. Instead they will
3459 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003460
Andrew Geissler9aee5002022-03-30 16:27:02 +00003461 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003462 Identifies user recipes that use an empty
3463 :term:`PARALLEL_MAKE` variable that you want to
3464 force remote distributed compilation on using the Icecream
3465 distributed compile support. This variable is used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06003466 :ref:`ref-classes-icecc` class. You set this variable in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003467 your ``local.conf`` file.
3468
Andrew Geisslerf0343792020-11-18 10:42:21 -06003469 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003470 The base name of image output files. This variable defaults to the
3471 recipe name (``${``\ :term:`PN`\ ``}``).
3472
Andrew Geisslerf0343792020-11-18 10:42:21 -06003473 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003474 A space-separated list of files installed into the boot partition
3475 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003476 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003477 the files are
3478 installed under the same name as the source files. To change the
3479 installed name, separate it from the original name with a semi-colon
3480 (;). Source files need to be located in
3481 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003482 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003483
3484 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3485 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3486
3487 Alternatively, source files can be picked up using a glob pattern. In
3488 this case, the destination file must have the same name as the base
3489 name of the source file path. To install files into a directory
3490 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05003491 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003492
3493 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
3494 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
3495
3496 The first example
3497 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3498 into the root of the target partition. The second example installs
3499 the same files into a ``boot`` directory within the target partition.
3500
3501 You can find information on how to use the Wic tool in the
Andrew Geissler517393d2023-01-13 08:55:19 -06003502 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003503 section of the Yocto Project Development Tasks Manual. Reference
3504 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003505 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003506
Patrick Williams975a06f2022-10-21 14:42:47 -05003507 :term:`IMAGE_BUILDINFO_FILE`
Andrew Geissler517393d2023-01-13 08:55:19 -06003508 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05003509 specifies the file in the image to write the build information into. The
3510 default value is "``${sysconfdir}/buildinfo``".
3511
3512 :term:`IMAGE_BUILDINFO_VARS`
Andrew Geissler517393d2023-01-13 08:55:19 -06003513 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05003514 specifies the list of variables to include in the `Build Configuration`
3515 section of the output file (as a space-separated list). Defaults to
3516 ":term:`DISTRO` :term:`DISTRO_VERSION`".
3517
Andrew Geisslerf0343792020-11-18 10:42:21 -06003518 :term:`IMAGE_CLASSES`
Patrick Williams975a06f2022-10-21 14:42:47 -05003519 A list of classes that all images should inherit. This is typically used
3520 to enable functionality across all image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003521
Patrick Williams975a06f2022-10-21 14:42:47 -05003522 Classes specified in :term:`IMAGE_CLASSES` must be located in the
3523 ``classes-recipe/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003524
Andrew Geisslerf0343792020-11-18 10:42:21 -06003525 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003526 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003527 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003528 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3529 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003530 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003531
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003532 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003533 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003534 ${EXTRA_IMAGECMD}"
3535
3536 You typically do not need to set this variable unless you are adding
3537 support for a new image type. For more examples on how to set this
Andrew Geissler517393d2023-01-13 08:55:19 -06003538 variable, see the :ref:`ref-classes-image_types`
Patrick Williams975a06f2022-10-21 14:42:47 -05003539 class file, which is ``meta/classes-recipe/image_types.bbclass``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003540
Andrew Geisslerf0343792020-11-18 10:42:21 -06003541 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003542 Specifies one or more files that contain custom device tables that
3543 are passed to the ``makedevs`` command as part of creating an image.
3544 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003545 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003546 ``files/device_table-minimal.txt`` is used, which is located by
3547 :term:`BBPATH`. For details on how you should write
3548 device table files, see ``meta/files/device_table-minimal.txt`` as an
3549 example.
3550
Andrew Geissler9aee5002022-03-30 16:27:02 +00003551 :term:`IMAGE_EFI_BOOT_FILES`
3552 A space-separated list of files installed into the boot partition
3553 when preparing an image using the Wic tool with the
3554 ``bootimg-efi`` source plugin. By default,
3555 the files are
3556 installed under the same name as the source files. To change the
3557 installed name, separate it from the original name with a semi-colon
3558 (;). Source files need to be located in
3559 :term:`DEPLOY_DIR_IMAGE`. Here are two
3560 examples::
3561
3562 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3563 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3564
3565 Alternatively, source files can be picked up using a glob pattern. In
3566 this case, the destination file must have the same name as the base
3567 name of the source file path. To install files into a directory
3568 within the target location, pass its name after a semi-colon (;).
3569 Here are two examples::
3570
3571 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3572 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3573
3574 The first example
3575 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3576 into the root of the target partition. The second example installs
3577 the same files into a ``boot`` directory within the target partition.
3578
3579 You can find information on how to use the Wic tool in the
Andrew Geissler517393d2023-01-13 08:55:19 -06003580 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geissler9aee5002022-03-30 16:27:02 +00003581 section of the Yocto Project Development Tasks Manual. Reference
3582 material for Wic is located in the
3583 ":doc:`/ref-manual/kickstart`" chapter.
3584
Andrew Geisslerf0343792020-11-18 10:42:21 -06003585 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003586 The primary list of features to include in an image. Typically, you
3587 configure this variable in an image recipe. Although you can use this
3588 variable from your ``local.conf`` file, which is found in the
3589 :term:`Build Directory`, best practices dictate that you do
3590 not.
3591
3592 .. note::
3593
3594 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003595 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003596
3597 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003598 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003599
3600 For an example that shows how to customize your image by using this
Andrew Geissler517393d2023-01-13 08:55:19 -06003601 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 -05003602 section in the Yocto Project Development Tasks Manual.
3603
Andrew Geisslerf0343792020-11-18 10:42:21 -06003604 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003605 Specifies the formats the OpenEmbedded build system uses during the
3606 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003607 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003608 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003609
3610 IMAGE_FSTYPES = "ext3 tar.bz2"
3611
3612 For the complete list of supported image formats from which you can
3613 choose, see :term:`IMAGE_TYPES`.
3614
3615 .. note::
3616
3617 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003618 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003619 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003620
3621 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003622 variable, you cannot update its contents by using ``:append``
3623 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003624 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003625
Andrew Geisslerf0343792020-11-18 10:42:21 -06003626 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003627 Used by recipes to specify the packages to install into an image
Andrew Geissler517393d2023-01-13 08:55:19 -06003628 through the :ref:`ref-classes-image` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003629 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003630
Andrew Geissler09036742021-06-25 14:25:14 -05003631 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003632 install into an image through :ref:`ref-classes-image`. Additionally,
Andrew Geissler517393d2023-01-13 08:55:19 -06003633 there are "helper" classes such as the :ref:`ref-classes-core-image`
3634 class which can take lists used with :term:`IMAGE_FEATURES` and turn
3635 them into auto-generated entries in :term:`IMAGE_INSTALL` in addition
3636 to its default contents.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003637
Andrew Geisslerc926e172021-05-07 16:11:35 -05003638 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003639
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003640 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003641
3642 Be sure to include the space
3643 between the quotation character and the start of the package name or
3644 names.
3645
3646 .. note::
3647
3648 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003649 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003650 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003651 packages for installation. Instead, use the
3652 :term:`PACKAGE_INSTALL` variable, which
Patrick Williams2194f502022-10-16 14:26:09 -05003653 allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003654 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Patrick Williams2194f502022-10-16 14:26:09 -05003655 For information on creating an :term:`Initramfs`, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06003656 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003657 section in the Yocto Project Development Tasks Manual.
3658
Andrew Geissler09036742021-06-25 14:25:14 -05003659 - Using :term:`IMAGE_INSTALL` with the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003660 :ref:`+= <bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003661 BitBake operator within the ``/conf/local.conf`` file or from
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003662 within an image recipe is not recommended. Use of this operator in
3663 these ways can cause ordering issues. Since
3664 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a
3665 default value using the
3666 :ref:`?= <bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003667 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003668 results in unexpected behavior when used within
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003669 ``conf/local.conf``. Furthermore, the same operation from within an
3670 image recipe may or may not succeed depending on the specific
3671 situation. In both these cases, the behavior is contrary to how
3672 most users expect the ``+=`` operator to work.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003673
Andrew Geisslerf0343792020-11-18 10:42:21 -06003674 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003675 Specifies the list of locales to install into the image during the
3676 root filesystem construction process. The OpenEmbedded build system
3677 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003678 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003679 ensures that any locale packages that correspond to packages already
3680 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003681 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003682
3683 IMAGE_LINGUAS = "pt-br de-de"
3684
3685 In this example, the build system ensures any Brazilian Portuguese
3686 and German locale files that correspond to packages in the image are
3687 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3688 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3689 only provide locale files by language and not by country-specific
3690 language).
3691
3692 See the :term:`GLIBC_GENERATE_LOCALES`
3693 variable for information on generating GLIBC locales.
3694
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003695
3696 :term:`IMAGE_LINK_NAME`
3697 The name of the output image symlink (which does not include
3698 the version part as :term:`IMAGE_NAME` does). The default value
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003699 is derived using the :term:`IMAGE_BASENAME` and
3700 :term:`IMAGE_MACHINE_SUFFIX` variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003701
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003702 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003703
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003704 .. note::
3705
3706 It is possible to set this to "" to disable symlink creation,
3707 however, you also need to set :term:`IMAGE_NAME` to still have
3708 a reasonable value e.g.::
3709
3710 IMAGE_LINK_NAME = ""
3711 IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
3712
3713 :term:`IMAGE_MACHINE_SUFFIX`
3714 Specifies the by default machine-specific suffix for image file names
3715 (before the extension). The default value is set as follows::
3716
3717 IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}"
3718
3719 The default :term:`DEPLOY_DIR_IMAGE` already has a :term:`MACHINE`
3720 subdirectory, so you may find it unnecessary to also include this suffix
3721 in the name of every image file. If you prefer to remove the suffix you
3722 can set this variable to an empty string::
3723
3724 IMAGE_MACHINE_SUFFIX = ""
3725
3726 (Not to be confused with :term:`IMAGE_NAME_SUFFIX`.)
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003727
Andrew Geisslerf0343792020-11-18 10:42:21 -06003728 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003729 The manifest file for the image. This file lists all the installed
3730 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003731 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003732
3733 packagename packagearch version
3734
Andrew Geissler09036742021-06-25 14:25:14 -05003735 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003736 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003737
Andrew Geissler09036742021-06-25 14:25:14 -05003738 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003739
3740 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003741 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003742 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003743 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003744 section in the Yocto Project Overview and Concepts Manual.
3745
Andrew Geisslerf0343792020-11-18 10:42:21 -06003746 :term:`IMAGE_NAME`
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003747 The name of the output image files minus the extension. By default
3748 this variable is set using the :term:`IMAGE_LINK_NAME`, and
3749 :term:`IMAGE_VERSION_SUFFIX` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003750
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003751 IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003752
3753 :term:`IMAGE_NAME_SUFFIX`
Andrew Geissler615f2f12022-07-15 14:00:58 -05003754 Suffix used for the image output filename --- defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003755 to distinguish the image file from other files created during image
3756 building; however if this suffix is redundant or not desired you can
3757 clear the value of this variable (set the value to ""). For example,
Patrick Williams2194f502022-10-16 14:26:09 -05003758 this is typically cleared in :term:`Initramfs` image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003759
Andrew Geisslerf0343792020-11-18 10:42:21 -06003760 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003761 Defines a multiplier that the build system applies to the initial
3762 image size for cases when the multiplier times the returned disk
3763 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003764 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003765 the multiplier applied to the initial image size creates free disk
3766 space in the image as overhead. By default, the build process uses a
3767 multiplier of 1.3 for this variable. This default value results in
3768 30% free disk space added to the image when this method is used to
3769 determine the final generated image size. You should be aware that
3770 post install scripts and the package management system uses disk
3771 space inside this overhead area. Consequently, the multiplier does
3772 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003773 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003774 determines the overall image size.
3775
3776 The default 30% free disk space typically gives the image enough room
3777 to boot and allows for basic post installs while still leaving a
3778 small amount of free disk space. If 30% free space is inadequate, you
3779 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003780 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003781
3782 IMAGE_OVERHEAD_FACTOR = "1.5"
3783
3784 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003785 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003786 variable.
3787
Andrew Geisslerf0343792020-11-18 10:42:21 -06003788 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003789 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3790 OpenEmbedded build system. The variable is defined appropriately by
Andrew Geissler517393d2023-01-13 08:55:19 -06003791 the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`,
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003792 or :ref:`ref-classes-package_ipk` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003793
Andrew Geissler517393d2023-01-13 08:55:19 -06003794 The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image`
3795 classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003796
Andrew Geissler09036742021-06-25 14:25:14 -05003797 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003798 variable is set indirectly through the appropriate
3799 :ref:`package_* <ref-classes-package>` class using the
3800 :term:`PACKAGE_CLASSES` variable. The
3801 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3802 or IPK) that appears with the variable
3803
3804 .. note::
3805
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003806 Files using the ``.tar`` format are never used as a substitute
3807 packaging format for DEB, RPM, and IPK formatted files for your image
3808 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003809
Andrew Geisslerf0343792020-11-18 10:42:21 -06003810 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003811 Specifies a list of functions to call once the OpenEmbedded build
3812 system creates the final image output files. You can specify
Patrick Williamsac13d5f2023-11-24 18:59:46 -06003813 functions separated by spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003814
Patrick Williamsac13d5f2023-11-24 18:59:46 -06003815 IMAGE_POSTPROCESS_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003816
3817 If you need to pass the root filesystem path to a command within the
3818 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3819 directory that becomes the root filesystem image. See the
3820 :term:`IMAGE_ROOTFS` variable for more
3821 information.
3822
Andrew Geisslerf0343792020-11-18 10:42:21 -06003823 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003824 Specifies a list of functions to call before the OpenEmbedded build
3825 system creates the final image output files. You can specify
Patrick Williamsac13d5f2023-11-24 18:59:46 -06003826 functions separated by spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003827
Patrick Williamsac13d5f2023-11-24 18:59:46 -06003828 IMAGE_PREPROCESS_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003829
3830 If you need to pass the root filesystem path to a command within the
3831 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3832 directory that becomes the root filesystem image. See the
3833 :term:`IMAGE_ROOTFS` variable for more
3834 information.
3835
Andrew Geisslerf0343792020-11-18 10:42:21 -06003836 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003837 The location of the root filesystem while it is under construction
3838 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3839 variable is not configurable. Do not change it.
3840
Andrew Geisslerf0343792020-11-18 10:42:21 -06003841 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003842 Specifies the alignment for the output image file in Kbytes. If the
3843 size of the image is not a multiple of this value, then the size is
3844 rounded up to the nearest multiple of the value. The default value is
3845 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3846 additional information.
3847
Andrew Geisslerf0343792020-11-18 10:42:21 -06003848 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003849 Defines additional free disk space created in the image in Kbytes. By
3850 default, this variable is set to "0". This free disk space is added
3851 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003852 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003853
3854 This variable is particularly useful when you want to ensure that a
3855 specific amount of free disk space is available on a device after an
3856 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003857 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003858
3859 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3860
3861 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003862 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003863
3864 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3865
Andrew Geisslerf0343792020-11-18 10:42:21 -06003866 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003867 Defines the size in Kbytes for the generated image. The OpenEmbedded
3868 build system determines the final size for the generated image using
3869 an algorithm that takes into account the initial disk space used for
3870 the generated image, a requested size for the image, and requested
3871 additional free disk space to be added to the image. Programatically,
3872 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003873 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003874
3875 if (image-du * overhead) < rootfs-size:
3876 internal-rootfs-size = rootfs-size + xspace
3877 else:
3878 internal-rootfs-size = (image-du * overhead) + xspace
3879 where:
3880 image-du = Returned value of the du command on the image.
3881 overhead = IMAGE_OVERHEAD_FACTOR
3882 rootfs-size = IMAGE_ROOTFS_SIZE
3883 internal-rootfs-size = Initial root filesystem size before any modifications.
3884 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3885
3886 See the :term:`IMAGE_OVERHEAD_FACTOR`
3887 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3888 variables for related information.
3889
Andrew Geisslerf0343792020-11-18 10:42:21 -06003890 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003891 Specifies a dependency from one image type on another. Here is an
Andrew Geissler517393d2023-01-13 08:55:19 -06003892 example from the :ref:`ref-classes-image-live` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003893
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003894 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003895
3896 In the previous example, the variable ensures that when "live" is
3897 listed with the :term:`IMAGE_FSTYPES` variable,
3898 the OpenEmbedded build system produces an ``ext3`` image first since
3899 one of the components of the live image is an ``ext3`` formatted
3900 partition containing the root filesystem.
3901
Andrew Geisslerf0343792020-11-18 10:42:21 -06003902 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003903 Specifies the complete list of supported image types by default:
3904
3905 - btrfs
3906 - container
3907 - cpio
3908 - cpio.gz
3909 - cpio.lz4
3910 - cpio.lzma
3911 - cpio.xz
3912 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003913 - erofs
3914 - erofs-lz4
3915 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003916 - ext2
3917 - ext2.bz2
3918 - ext2.gz
3919 - ext2.lzma
3920 - ext3
3921 - ext3.gz
3922 - ext4
3923 - ext4.gz
3924 - f2fs
3925 - hddimg
3926 - iso
3927 - jffs2
3928 - jffs2.sum
3929 - multiubi
3930 - squashfs
3931 - squashfs-lz4
3932 - squashfs-lzo
3933 - squashfs-xz
3934 - tar
3935 - tar.bz2
3936 - tar.gz
3937 - tar.lz4
3938 - tar.xz
3939 - tar.zst
3940 - ubi
3941 - ubifs
3942 - wic
3943 - wic.bz2
3944 - wic.gz
3945 - wic.lzma
3946
3947 For more information about these types of images, see
Patrick Williams975a06f2022-10-21 14:42:47 -05003948 ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003949
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003950 :term:`IMAGE_VERSION_SUFFIX`
3951 Version suffix that is part of the default :term:`IMAGE_NAME` and
3952 :term:`KERNEL_ARTIFACT_NAME` values.
3953 Defaults to ``"-${DATETIME}"``, however you could set this to a
3954 version string that comes from your external build environment if
3955 desired, and this suffix would then be used consistently across
3956 the build artifacts.
3957
Andrew Geissler09036742021-06-25 14:25:14 -05003958 :term:`IMGDEPLOYDIR`
Andrew Geissler517393d2023-01-13 08:55:19 -06003959 When inheriting the :ref:`ref-classes-image` class directly or
3960 through the :ref:`ref-classes-core-image` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003961 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003962 that is set in the ``image`` class as follows::
3963
3964 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3965
Andrew Geissler517393d2023-01-13 08:55:19 -06003966 Recipes inheriting the :ref:`ref-classes-image` class should copy
3967 files to be deployed into :term:`IMGDEPLOYDIR`, and the class will take
3968 care of copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
Andrew Geissler09036742021-06-25 14:25:14 -05003969
Andrew Geisslerf0343792020-11-18 10:42:21 -06003970 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003971 Specifies a space-separated list of license names (as they would
3972 appear in :term:`LICENSE`) that should be excluded
Patrick Williams2a254922023-08-11 09:48:11 -05003973 from the build (if set globally), or from an image (if set locally
3974 in an image recipe).
3975
3976 When the variable is set globally, recipes that provide no alternatives to listed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003977 incompatible licenses are not built. Packages that are individually
Patrick Williams2a254922023-08-11 09:48:11 -05003978 licensed with the specified incompatible licenses will be deleted.
3979 Most of the time this does not allow a feasible build (because it becomes impossible
3980 to satisfy build time dependencies), so the recommended way to
3981 implement license restrictions is to set the variable in specific
3982 image recipes where the restrictions must apply. That way there
3983 are no build time restrictions, but the license check is still
3984 performed when the image's filesystem is assembled from packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003985
Patrick Williams03907ee2022-05-01 06:28:52 -05003986 There is some support for wildcards in this variable's value,
3987 however it is restricted to specific licenses. Currently only
3988 these wildcards are allowed and expand as follows:
3989
3990 - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later``
3991 - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
3992 - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
3993
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003994 .. note::
3995
3996 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003997 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003998
Andrew Geissler9aee5002022-03-30 16:27:02 +00003999 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004000
4001
4002 Although you can use other settings, you might be required to
Patrick Williams975a06f2022-10-21 14:42:47 -05004003 remove dependencies on (or provide alternatives to) components that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004004 are required to produce a functional system image.
4005
Andrew Geissler615f2f12022-07-15 14:00:58 -05004006 :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
4007 Specifies a space-separated list of package and license pairs that
4008 are allowed to be used even if the license is specified in
4009 :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are
4010 separated using a colon. Example::
4011
4012 INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only"
4013
Andrew Geisslerf0343792020-11-18 10:42:21 -06004014 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004015 Causes the named class or classes to be inherited globally. Anonymous
4016 functions in the class or classes are not executed for the base
4017 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05004018 system ignores changes to :term:`INHERIT` in individual recipes.
Patrick Williams975a06f2022-10-21 14:42:47 -05004019 Classes inherited using :term:`INHERIT` must be located in the
4020 ``classes-global/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004021
Andrew Geissler09036742021-06-25 14:25:14 -05004022 For more information on :term:`INHERIT`, see the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05004023 :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004024 section in the BitBake User Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004025
Andrew Geisslerf0343792020-11-18 10:42:21 -06004026 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004027 Lists classes that will be inherited at the distribution level. It is
4028 unlikely that you want to edit this variable.
4029
Patrick Williams975a06f2022-10-21 14:42:47 -05004030 Classes specified in :term:`INHERIT_DISTRO` must be located in the
4031 ``classes-global/`` or ``classes/`` subdirectories.
4032
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004033 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004034 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004035
4036 INHERIT_DISTRO ?= "debian devshell sstate license"
4037
Andrew Geisslerf0343792020-11-18 10:42:21 -06004038 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004039 Prevents the default dependencies, namely the C compiler and standard
4040 C library (libc), from being added to :term:`DEPENDS`.
4041 This variable is usually used within recipes that do not require any
4042 compilation using the C compiler.
4043
4044 Set the variable to "1" to prevent the default dependencies from
4045 being added.
4046
Andrew Geisslerf0343792020-11-18 10:42:21 -06004047 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004048 Prevents the OpenEmbedded build system from splitting out debug
4049 information during packaging. By default, the build system splits out
4050 debugging information during the
4051 :ref:`ref-tasks-package` task. For more information on
4052 how debug information is split out, see the
4053 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
4054 variable.
4055
4056 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05004057 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004058 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004059
4060 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
4061
Andrew Geisslerf0343792020-11-18 10:42:21 -06004062 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004063 If set to "1", causes the build to not strip binaries in resulting
4064 packages and prevents the ``-dbg`` package from containing the source
4065 files.
4066
4067 By default, the OpenEmbedded build system strips binaries and puts
4068 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05004069 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004070 plan to debug in general.
4071
Andrew Geisslerf0343792020-11-18 10:42:21 -06004072 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004073 If set to "1", causes the build to not strip binaries in the
4074 resulting sysroot.
4075
4076 By default, the OpenEmbedded build system strips binaries in the
4077 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05004078 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004079 this stripping.
4080
Andrew Geissler517393d2023-01-13 08:55:19 -06004081 If you want to use this variable, include the :ref:`ref-classes-staging`
4082 class. This class uses a ``sys_strip()`` function to test for the variable
4083 and acts accordingly.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004084
4085 .. note::
4086
Andrew Geissler09036742021-06-25 14:25:14 -05004087 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004088 special circumstances. For example, suppose you are building
4089 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004090 even if the toolchain's binaries are strippable, there are other files
4091 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004092
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004093 :term:`INIT_MANAGER`
4094 Specifies the system init manager to use. Available options are:
Patrick Williams2194f502022-10-16 14:26:09 -05004095
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004096 - ``sysvinit``
4097 - ``systemd``
4098 - ``mdev-busybox``
Patrick Williams2194f502022-10-16 14:26:09 -05004099
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004100 With ``sysvinit``, the init manager is set to
4101 :wikipedia:`SysVinit <Init#SysV-style>`, the traditional UNIX init
4102 system. This is the default choice in the Poky distribution, together with
4103 the Udev device manager (see the ":ref:`device-manager`" section).
Patrick Williams2194f502022-10-16 14:26:09 -05004104
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004105 With ``systemd``, the init manager becomes :wikipedia:`systemd <Systemd>`,
4106 which comes with the :wikipedia:`udev <Udev>` device manager.
Patrick Williams2194f502022-10-16 14:26:09 -05004107
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004108 With ``mdev-busybox``, the init manager becomes the much simpler BusyBox
4109 init, together with the BusyBox mdev device manager. This is the simplest
4110 and lightest solution, and probably the best choice for low-end systems
4111 with a rather slow CPU and a limited amount of RAM.
Patrick Williams2194f502022-10-16 14:26:09 -05004112
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004113 More concretely, this is used to include
4114 ``conf/distro/include/init-manager-${INIT_MANAGER}.inc`` into the global
4115 configuration. You can have a look at the
4116 :yocto_git:`meta/conf/distro/include/init-manager-*.inc </poky/tree/meta/conf/distro/include>`
4117 files for more information, and also the ":ref:`init-manager`"
Patrick Williams2194f502022-10-16 14:26:09 -05004118 section in the Yocto Project Development Tasks Manual.
4119
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004120 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
Andrew Geissler517393d2023-01-13 08:55:19 -06004121 Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs`
4122 where the :term:`INITRAMFS_IMAGE` will be fetched from. This variable is
4123 set by default to ``${DEPLOY_DIR_IMAGE}`` in the
4124 :ref:`ref-classes-kernel` class and it's only meant to be changed when
4125 building an :term:`Initramfs` image from a separate multiconfig via
4126 :term:`INITRAMFS_MULTICONFIG`.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004127
Andrew Geisslerf0343792020-11-18 10:42:21 -06004128 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004129 Defines the format for the output image of an initial RAM filesystem
Patrick Williams2194f502022-10-16 14:26:09 -05004130 (:term:`Initramfs`), which is used during boot. Supported formats are the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004131 same as those supported by the
4132 :term:`IMAGE_FSTYPES` variable.
4133
4134 The default value of this variable, which is set in the
4135 ``meta/conf/bitbake.conf`` configuration file in the
4136 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
Patrick Williams2194f502022-10-16 14:26:09 -05004137 :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem
Patrick Williams7784c422022-11-17 07:29:11 -06004138 :wikipedia:`initrd <Initrd>` mechanism, expects
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004139 an optionally compressed cpio archive.
4140
Andrew Geisslerf0343792020-11-18 10:42:21 -06004141 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004142 Specifies the :term:`PROVIDES` name of an image
Patrick Williams2194f502022-10-16 14:26:09 -05004143 recipe that is used to build an initial RAM filesystem (:term:`Initramfs`)
Andrew Geissler09036742021-06-25 14:25:14 -05004144 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004145 additional recipe to be built as a dependency to whatever root
4146 filesystem recipe you might be using (e.g. ``core-image-sato``). The
Patrick Williams2194f502022-10-16 14:26:09 -05004147 :term:`Initramfs` image recipe you provide should set
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004148 :term:`IMAGE_FSTYPES` to
4149 :term:`INITRAMFS_FSTYPES`.
4150
Patrick Williams2194f502022-10-16 14:26:09 -05004151 An :term:`Initramfs` image provides a temporary root filesystem used for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004152 early system initialization (e.g. loading of modules needed to locate
4153 and mount the "real" root filesystem).
4154
4155 .. note::
4156
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004157 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
4158 recipe in the :term:`Source Directory`
Patrick Williams2194f502022-10-16 14:26:09 -05004159 for an example :term:`Initramfs` recipe. To select this sample recipe as
4160 the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004161 to "core-image-minimal-initramfs".
4162
4163 You can also find more information by referencing the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004164 ``meta-poky/conf/templates/default/local.conf.sample.extended``
Andrew Geissler517393d2023-01-13 08:55:19 -06004165 configuration file in the Source Directory, the :ref:`ref-classes-image`
4166 class, and the :ref:`ref-classes-kernel` class to see how to use the
4167 :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004168
Andrew Geissler09036742021-06-25 14:25:14 -05004169 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Patrick Williams2194f502022-10-16 14:26:09 -05004170 :term:`Initramfs` image is built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004171
4172 For more information, you can also see the
4173 :term:`INITRAMFS_IMAGE_BUNDLE`
4174 variable, which allows the generated image to be bundled inside the
Patrick Williams2194f502022-10-16 14:26:09 -05004175 kernel image. Additionally, for information on creating an :term:`Initramfs`
Andrew Geissler517393d2023-01-13 08:55:19 -06004176 image, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004177 in the Yocto Project Development Tasks Manual.
4178
Andrew Geisslerf0343792020-11-18 10:42:21 -06004179 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004180 Controls whether or not the image recipe specified by
4181 :term:`INITRAMFS_IMAGE` is run through an
4182 extra pass
4183 (:ref:`ref-tasks-bundle_initramfs`) during
4184 kernel compilation in order to build a single binary that contains
Patrick Williams2194f502022-10-16 14:26:09 -05004185 both the kernel image and the initial RAM filesystem (:term:`Initramfs`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004186 image. This makes use of the
4187 :term:`CONFIG_INITRAMFS_SOURCE` kernel
4188 feature.
4189
4190 .. note::
4191
Patrick Williams2194f502022-10-16 14:26:09 -05004192 Bundling the :term:`Initramfs` with the kernel conflates the code in the
4193 :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
4194 compatible software may be part of a bundled :term:`Initramfs`.
Patrick Williams93c203f2021-10-06 16:15:23 -05004195
4196 .. note::
4197
Patrick Williams2194f502022-10-16 14:26:09 -05004198 Using an extra compilation pass to bundle the :term:`Initramfs` avoids a
4199 circular dependency between the kernel recipe and the :term:`Initramfs`
4200 recipe should the :term:`Initramfs` include kernel modules. Should that be
4201 the case, the :term:`Initramfs` recipe depends on the kernel for the
4202 kernel modules, and the kernel depends on the :term:`Initramfs` recipe
4203 since the :term:`Initramfs` is bundled inside the kernel image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004204
4205 The combined binary is deposited into the ``tmp/deploy`` directory,
4206 which is part of the :term:`Build Directory`.
4207
4208 Setting the variable to "1" in a configuration file causes the
4209 OpenEmbedded build system to generate a kernel image with the
Patrick Williams2194f502022-10-16 14:26:09 -05004210 :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004211
4212 INITRAMFS_IMAGE_BUNDLE = "1"
4213
Andrew Geissler517393d2023-01-13 08:55:19 -06004214 By default, the :ref:`ref-classes-kernel` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004215 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004216
4217 INITRAMFS_IMAGE_BUNDLE ?= ""
4218
4219 .. note::
4220
Andrew Geissler09036742021-06-25 14:25:14 -05004221 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004222 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004223
4224 See the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004225 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004226 file for additional information. Also, for information on creating an
Andrew Geissler517393d2023-01-13 08:55:19 -06004227 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004228 in the Yocto Project Development Tasks Manual.
4229
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004230 :term:`INITRAMFS_IMAGE_NAME`
4231
4232 This value needs to stay in sync with :term:`IMAGE_LINK_NAME`, but with
4233 :term:`INITRAMFS_IMAGE` instead of :term:`IMAGE_BASENAME`. The default value
4234 is set as follows:
4235
4236 INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
4237
4238 That is, if :term:`INITRAMFS_IMAGE` is set, the value of
4239 :term:`INITRAMFS_IMAGE_NAME` will be set based upon
4240 :term:`INITRAMFS_IMAGE` and :term:`IMAGE_MACHINE_SUFFIX`.
4241
4242
Andrew Geisslerf0343792020-11-18 10:42:21 -06004243 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004244 The link name of the initial RAM filesystem image. This variable is
Patrick Williams975a06f2022-10-21 14:42:47 -05004245 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004246 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004247
4248 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
4249
4250 The value of the
4251 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004252 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004253
4254 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4255
4256 See the :term:`MACHINE` variable for additional
4257 information.
4258
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004259 :term:`INITRAMFS_MULTICONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -06004260 Defines the multiconfig to create a multiconfig dependency to be used by
4261 the :ref:`ref-classes-kernel` class.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004262
4263 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
4264 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
4265
Patrick Williams2194f502022-10-16 14:26:09 -05004266 For more information on how to bundle an :term:`Initramfs` image from a separate
Andrew Geissler517393d2023-01-13 08:55:19 -06004267 multiconfig see the ":ref:`dev-manual/building:Bundling an Initramfs Image From a Separate Multiconfig`"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004268 section in the Yocto Project Development Tasks Manual.
4269
Andrew Geisslerf0343792020-11-18 10:42:21 -06004270 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004271 The base name of the initial RAM filesystem image. This variable is
Patrick Williams975a06f2022-10-21 14:42:47 -05004272 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004273 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004274
4275 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
4276
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004277 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004278
Andrew Geisslerf0343792020-11-18 10:42:21 -06004279 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004280 Indicates list of filesystem images to concatenate and use as an
4281 initial RAM disk (``initrd``).
4282
Andrew Geissler09036742021-06-25 14:25:14 -05004283 The :term:`INITRD` variable is an optional variable used with the
Andrew Geissler517393d2023-01-13 08:55:19 -06004284 :ref:`ref-classes-image-live` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004285
Andrew Geisslerf0343792020-11-18 10:42:21 -06004286 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004287 When building a "live" bootable image (i.e. when
4288 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05004289 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004290 provide the initial RAM disk image. The default value is
4291 "core-image-minimal-initramfs".
4292
Andrew Geissler517393d2023-01-13 08:55:19 -06004293 See the :ref:`ref-classes-image-live` class for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004294
Andrew Geisslerf0343792020-11-18 10:42:21 -06004295 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004296 The filename of the initialization script as installed to
4297 ``${sysconfdir}/init.d``.
4298
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004299 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004300 The variable is mandatory.
4301
Andrew Geisslerf0343792020-11-18 10:42:21 -06004302 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004303 A list of the packages that contain initscripts. If multiple packages
4304 are specified, you need to append the package name to the other
4305 ``INITSCRIPT_*`` as an override.
4306
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004307 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004308 The variable is optional and defaults to the :term:`PN`
4309 variable.
4310
Andrew Geisslerf0343792020-11-18 10:42:21 -06004311 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004312 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004313
4314 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
4315
4316 In this example, the script has a runlevel of 99, starts the script
4317 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
4318
4319 The variable's default value is "defaults", which is set in the
Andrew Geissler517393d2023-01-13 08:55:19 -06004320 :ref:`ref-classes-update-rc.d` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004321
Andrew Geissler09036742021-06-25 14:25:14 -05004322 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004323 ``update-rc.d`` command. For more information on valid parameters,
4324 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05004325 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004326
Andrew Geisslerf0343792020-11-18 10:42:21 -06004327 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004328 Specifies the QA checks to skip for a specific package within a
4329 recipe. For example, to skip the check for symbolic link ``.so``
4330 files in the main package of a recipe, add the following to the
4331 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05004332 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004333
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004334 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004335
Andrew Geissler595f6302022-01-24 19:11:47 +00004336 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004337 list of the valid QA checks you can specify using this variable.
4338
Andrew Geisslerf0343792020-11-18 10:42:21 -06004339 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004340 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05004341 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004342 configuration level to disable this behavior.
4343
Andrew Geisslerf0343792020-11-18 10:42:21 -06004344 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004345 When the IPK backend is in use and package management is enabled on
4346 the target, you can use this variable to set up ``opkg`` in the
4347 target image to point to package feeds on a nominated server. Once
4348 the feed is established, you can perform installations or upgrades
4349 using the package manager at runtime.
4350
Andrew Geisslerf0343792020-11-18 10:42:21 -06004351 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004352 Defines the kernel architecture used when assembling the
4353 configuration. Architectures supported for this release are:
4354
4355 - powerpc
4356 - i386
4357 - x86_64
4358 - arm
4359 - qemu
4360 - mips
4361
Andrew Geissler5f350902021-07-23 13:09:54 -04004362 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004363
Andrew Geisslerf0343792020-11-18 10:42:21 -06004364 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004365 A regular expression used by the build process to explicitly identify
4366 the kernel branch that is validated, patched, and configured during a
4367 build. You must set this variable to ensure the exact kernel branch
4368 you want is being used by the build process.
4369
4370 Values for this variable are set in the kernel's recipe file and the
4371 kernel's append file. For example, if you are using the
4372 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05004373 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004374 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004375
4376 KBRANCH ?= "standard/base"
4377
4378 This variable is also used from the kernel's append file to identify
4379 the kernel branch specific to a particular machine or target
4380 hardware. Continuing with the previous kernel example, the kernel's
Patrick Williamsac13d5f2023-11-24 18:59:46 -06004381 append file is located in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004382 BSP layer for a given machine. For example, the append file for the
Patrick Williamsac13d5f2023-11-24 18:59:46 -06004383 Beaglebone and generic versions of both 32 and 64-bit IA
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004384 machines (``meta-yocto-bsp``) is named
Patrick Williamsac13d5f2023-11-24 18:59:46 -06004385 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.1.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004386 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004387
Patrick Williamsac13d5f2023-11-24 18:59:46 -06004388 KBRANCH:genericx86 = "v6.1/standard/base"
4389 KBRANCH:genericx86-64 = "v6.1/standard/base"
4390 KBRANCH:beaglebone-yocto = "v6.1/standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004391
Andrew Geissler09036742021-06-25 14:25:14 -05004392 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004393 identify the kernel branch to use when building for each supported
4394 BSP.
4395
Andrew Geisslerf0343792020-11-18 10:42:21 -06004396 :term:`KBUILD_DEFCONFIG`
Andrew Geissler517393d2023-01-13 08:55:19 -06004397 When used with the :ref:`ref-classes-kernel-yocto`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004398 class, specifies an "in-tree" kernel configuration file for use
4399 during a kernel build.
4400
4401 Typically, when using a ``defconfig`` to configure a kernel during a
4402 build, you place the file in your layer in the same manner as you
4403 would place patch files and configuration fragment files (i.e.
4404 "out-of-tree"). However, if you want to use a ``defconfig`` file that
4405 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05004406 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004407 :term:`KMACHINE` variable to point to the
4408 ``defconfig`` file.
4409
4410 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05004411 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004412
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004413 KBUILD_DEFCONFIG:<machine> ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004414
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004415 Here is an example from a "raspberrypi2" :term:`MACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05004416 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004417
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004418 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004419
Andrew Geisslerc926e172021-05-07 16:11:35 -05004420 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004421
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004422 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004423
4424 For more
Andrew Geissler09036742021-06-25 14:25:14 -05004425 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004426 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004427 section in the Yocto Project Linux Kernel Development Manual.
4428
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004429 :term:`KCONFIG_MODE`
Andrew Geissler517393d2023-01-13 08:55:19 -06004430 When used with the :ref:`ref-classes-kernel-yocto`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004431 class, specifies the kernel configuration values to use for options
4432 not specified in the provided ``defconfig`` file. Valid options are::
4433
4434 KCONFIG_MODE = "alldefconfig"
4435 KCONFIG_MODE = "allnoconfig"
4436
4437 In ``alldefconfig`` mode the options not explicitly specified will be
4438 assigned their Kconfig default value. In ``allnoconfig`` mode the
4439 options not explicitly specified will be disabled in the kernel
4440 config.
4441
Andrew Geissler09036742021-06-25 14:25:14 -05004442 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004443 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
4444 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
4445 in ``${WORKDIR}`` through a meta-layer will be handled in
4446 ``allnoconfig`` mode.
4447
4448 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05004449 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004450 be explicitly set.
4451
4452 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
4453 generated by copying the ``.config`` file from a working Linux kernel
4454 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05004455 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004456 not need to be explicitly set.
4457
4458 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
4459 generated using the
4460 :ref:`ref-tasks-savedefconfig`
4461 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05004462 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004463
4464 KCONFIG_MODE = "alldefconfig"
4465
Andrew Geisslerf0343792020-11-18 10:42:21 -06004466 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004467 Specifies an alternate kernel image type for creation in addition to
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004468 the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and
4469 :term:`KERNEL_IMAGETYPES` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004470
Andrew Geisslerf0343792020-11-18 10:42:21 -06004471 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004472 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05004473 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004474 variable.
4475
Andrew Geissler09036742021-06-25 14:25:14 -05004476 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004477 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004478 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004479
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004480 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004481
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004482 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`IMAGE_MACHINE_SUFFIX`
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004483 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004484
Andrew Geisslerf0343792020-11-18 10:42:21 -06004485 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004486 A list of classes defining kernel image types that the
Andrew Geissler517393d2023-01-13 08:55:19 -06004487 :ref:`ref-classes-kernel` class should inherit. You typically
4488 append this variable to enable extended image types. An example is
4489 ":ref:`ref-classes-kernel-fitimage`", which enables
Patrick Williamsb542dec2023-06-09 01:26:37 -05004490 FIT image support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``.
Andrew Geissler517393d2023-01-13 08:55:19 -06004491 You can register custom kernel image types with the
4492 :ref:`ref-classes-kernel` class using this variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004493
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004494 :term:`KERNEL_DANGLING_FEATURES_WARN_ONLY`
4495 When kernel configuration fragments are missing for some
4496 :term:`KERNEL_FEATURES` specified by layers or BSPs,
4497 building and configuring the kernel stops with an error.
4498
4499 You can turn these errors into warnings by setting the
4500 following in ``conf/local.conf``::
4501
4502 KERNEL_DANGLING_FEATURES_WARN_ONLY = "1"
4503
4504 You will still be warned that runtime issues may occur,
4505 but at least the kernel configuration and build process will
4506 be allowed to continue.
4507
Patrick Williams03907ee2022-05-01 06:28:52 -05004508 :term:`KERNEL_DEBUG_TIMESTAMPS`
4509 If set to "1", enables timestamping functionality during building
4510 the kernel. The default is "0" to disable this for reproducibility
4511 reasons.
4512
Patrick Williams975a06f2022-10-21 14:42:47 -05004513 :term:`KERNEL_DEPLOY_DEPEND`
4514 Provides a means of controlling the dependency of an image recipe
4515 on the kernel. The default value is "virtual/kernel:do_deploy",
4516 however for a small initramfs image or other images that do not
4517 need the kernel, this can be set to "" in the image recipe.
4518
Andrew Geisslerf0343792020-11-18 10:42:21 -06004519 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004520 Specifies the name of the generated Linux kernel device tree (i.e.
4521 the ``.dtb``) file.
4522
4523 .. note::
4524
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004525 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004526 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004527
Andrew Geissler517393d2023-01-13 08:55:19 -06004528 In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
4529 class must be inherited.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004530
Patrick Williamsb542dec2023-06-09 01:26:37 -05004531 :term:`KERNEL_DEVICETREE_BUNDLE`
4532 When set to "1", this variable allows to bundle the Linux kernel
4533 and the Device Tree Binary together in a single file.
4534
4535 This feature is currently only supported on the "arm" (32 bit)
4536 architecture.
4537
4538 This variable is set to "0" by default by the
4539 :ref:`ref-classes-kernel-devicetree` class.
4540
Andrew Geisslerf0343792020-11-18 10:42:21 -06004541 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004542 The link name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004543 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004544 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004545
4546 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4547
4548 The
4549 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004550 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004551
4552 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4553
4554 See the :term:`MACHINE` variable for additional
4555 information.
4556
Andrew Geisslerf0343792020-11-18 10:42:21 -06004557 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004558 The base name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004559 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004560 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004561
4562 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4563
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004564 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004565
Patrick Williamsb542dec2023-06-09 01:26:37 -05004566 :term:`KERNEL_DTBDEST`
4567 This variable, used by the :ref:`ref-classes-kernel-devicetree`
4568 class, allows to change the installation directory of the DTB
4569 (Device Tree Binary) files.
4570
4571 It is set by default to "${KERNEL_IMAGEDEST}" by the
4572 :ref:`ref-classes-kernel` class.
4573
4574 :term:`KERNEL_DTBVENDORED`
4575 This variable, used by the :ref:`ref-classes-kernel-devicetree`,
4576 allows to ignore vendor subdirectories when installing DTB
4577 (Device Tree Binary) files, when it is set to "false".
4578
4579 To keep vendor subdirectories, set this variable to "true".
4580
4581 It is set by default to "false" by the :ref:`ref-classes-kernel` class.
4582
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004583 :term:`KERNEL_DTC_FLAGS`
4584 Specifies the ``dtc`` flags that are passed to the Linux kernel build
4585 system when generating the device trees (via ``DTC_FLAGS`` environment
4586 variable).
4587
Andrew Geissler517393d2023-01-13 08:55:19 -06004588 In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
4589 class must be inherited.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004590
Andrew Geisslerf0343792020-11-18 10:42:21 -06004591 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004592 Specifies additional ``make`` command-line arguments the OpenEmbedded
4593 build system passes on when compiling the kernel.
4594
Andrew Geisslerf0343792020-11-18 10:42:21 -06004595 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004596 Includes additional kernel metadata. In the OpenEmbedded build
4597 system, the default Board Support Packages (BSPs)
4598 :term:`Metadata` is provided through the
4599 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004600 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004601 the kernel recipe or kernel append file to further add metadata for
4602 all BSPs or specific BSPs.
4603
4604 The metadata you add through this variable includes config fragments
4605 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004606 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004607 variable for a specific machine. In this way, you can provide
4608 validated, but optional, sets of kernel configurations and features.
4609
4610 For example, the following example from the ``linux-yocto-rt_4.12``
4611 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4612 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004613 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004614
4615 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004616 KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
4617 KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc"
4618 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4619 KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004620
Andrew Geisslerf0343792020-11-18 10:42:21 -06004621 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004622 The link name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004623 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004624 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004625
4626 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4627
4628 The value of the
4629 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004630 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004631
4632 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4633
4634 See the :term:`MACHINE` variable for additional
4635 information.
4636
Andrew Geisslerf0343792020-11-18 10:42:21 -06004637 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004638 The base name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004639 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004640 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004641
4642 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4643
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004644 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004645
Andrew Geisslerf0343792020-11-18 10:42:21 -06004646 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004647 The link name for the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004648 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004649
4650 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4651
4652 The value of
4653 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004654 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004655
4656 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4657
4658 See the :term:`MACHINE` variable for additional
4659 information.
4660
Andrew Geisslerf0343792020-11-18 10:42:21 -06004661 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004662 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004663 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004664 checked against the set value during the
4665 :ref:`ref-tasks-sizecheck` task. The task fails if
4666 the kernel image file is larger than the setting.
4667
Andrew Geissler09036742021-06-25 14:25:14 -05004668 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004669 limited amount of space in which the kernel image must be stored.
4670
4671 By default, this variable is not set, which means the size of the
4672 kernel image is not checked.
4673
Andrew Geisslerf0343792020-11-18 10:42:21 -06004674 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004675 The base name of the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004676 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004677
4678 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4679
Patrick Williams8e7b46e2023-05-01 14:19:06 -05004680 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004681
Andrew Geisslerf0343792020-11-18 10:42:21 -06004682 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004683 The type of kernel to build for a device, usually set by the machine
4684 configuration files and defaults to "zImage". This variable is used
4685 when building the kernel and is passed to ``make`` as the target to
4686 build.
4687
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004688 To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
4689
4690 :term:`KERNEL_IMAGETYPES`
4691 Lists additional types of kernel images to build for a device in addition
4692 to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
4693 machine configuration files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004694
Andrew Geisslerf0343792020-11-18 10:42:21 -06004695 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004696 Lists kernel modules that need to be auto-loaded during boot.
4697
4698 .. note::
4699
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004700 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004701 variable.
4702
Andrew Geissler09036742021-06-25 14:25:14 -05004703 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004704 can be recognized by the kernel recipe or by an out-of-tree kernel
4705 module recipe (e.g. a machine configuration file, a distribution
4706 configuration file, an append file for the recipe, or the recipe
4707 itself).
4708
Andrew Geisslerc926e172021-05-07 16:11:35 -05004709 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004710
4711 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4712
Andrew Geissler09036742021-06-25 14:25:14 -05004713 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004714 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4715 the list of modules to be auto-loaded on boot. The modules appear
4716 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004717 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004718
4719 KERNEL_MODULE_AUTOLOAD += "module_name"
4720
4721 For information on how to populate the ``modname.conf`` file with
4722 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4723
Andrew Geisslerf0343792020-11-18 10:42:21 -06004724 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004725 Provides a list of modules for which the OpenEmbedded build system
4726 expects to find ``module_conf_``\ modname values that specify
4727 configuration for each of the modules. For information on how to
4728 provide those module configurations, see the
4729 :term:`module_conf_* <module_conf>` variable.
4730
Patrick Williamsb542dec2023-06-09 01:26:37 -05004731 :term:`KERNEL_PACKAGE_NAME`
4732 Specifies the base name of the kernel packages, such as "kernel"
4733 in the kernel packages such as "kernel-modules", "kernel-image" and
4734 "kernel-dbg".
4735
4736 The default value for this variable is set to "kernel" by the
4737 :ref:`ref-classes-kernel` class.
4738
Andrew Geisslerf0343792020-11-18 10:42:21 -06004739 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004740 The location of the kernel sources. This variable is set to the value
Andrew Geissler517393d2023-01-13 08:55:19 -06004741 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
4742 class. For information on how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004743 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004744 section in the Yocto Project Linux Kernel Development Manual.
4745
4746 To help maximize compatibility with out-of-tree drivers used to build
4747 modules, the OpenEmbedded build system also recognizes and uses the
4748 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004749 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004750 used by external Makefiles to point to the kernel source directory.
4751
Andrew Geisslerf0343792020-11-18 10:42:21 -06004752 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004753 The location of the kernel sources. This variable is set to the value
Andrew Geissler517393d2023-01-13 08:55:19 -06004754 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
4755 class. For information on how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004756 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004757 section in the Yocto Project Linux Kernel Development Manual.
4758
4759 To help maximize compatibility with out-of-tree drivers used to build
4760 modules, the OpenEmbedded build system also recognizes and uses the
4761 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004762 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004763 used by external Makefiles to point to the kernel source directory.
4764
Patrick Williamsac13d5f2023-11-24 18:59:46 -06004765 :term:`KERNEL_STRIP`
4766 Allows to specific which ``strip`` command to use to strip the kernel
4767 binary, typically either GNU binutils ``strip`` or ``llvm-strip``.
4768
Andrew Geisslerf0343792020-11-18 10:42:21 -06004769 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004770 Specifies the version of the kernel as extracted from ``version.h``
4771 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004772 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004773 configured. Consequently, attempting to refer to this variable in
4774 contexts prior to configuration will not work.
4775
Andrew Geisslerf0343792020-11-18 10:42:21 -06004776 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004777 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004778 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004779 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004780 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004781 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Patrick Williams2194f502022-10-16 14:26:09 -05004782 :term:`Initramfs` recipe. Setting the variable there when the data is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004783 needed avoids a potential dependency loop.
4784
Andrew Geisslerf0343792020-11-18 10:42:21 -06004785 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004786 Provides a short description of a configuration fragment. You use
4787 this variable in the ``.scc`` file that describes a configuration
4788 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004789 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004790
4791 define KFEATURE_DESCRIPTION "Enable SMP"
4792
Andrew Geisslerf0343792020-11-18 10:42:21 -06004793 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004794 The machine as known by the kernel. Sometimes the machine name used
4795 by the kernel does not match the machine name used by the
4796 OpenEmbedded build system. For example, the machine name that the
4797 OpenEmbedded build system understands as ``core2-32-intel-common``
4798 goes by a different name in the Linux Yocto kernel. The kernel
4799 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004800 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004801 OpenEmbedded build system machine name.
4802
4803 These mappings between different names occur in the Yocto Linux
4804 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004805 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004806
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004807 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4808 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4809 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4810 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4811 KMACHINE:core2-32-intel-common = "intel-core2-32"
4812 KBRANCH:core2-32-intel-common = "standard/base"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004813 KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004814
Andrew Geissler09036742021-06-25 14:25:14 -05004815 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004816 that the kernel understands the machine name as "intel-core2-32".
4817 However, the OpenEmbedded build system understands the machine as
4818 "core2-32-intel-common".
4819
Andrew Geisslerf0343792020-11-18 10:42:21 -06004820 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004821 Defines the kernel type to be used in assembling the configuration.
4822 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004823 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004824 section in the
4825 Yocto Project Linux Kernel Development Manual for more information on
4826 kernel types.
4827
Andrew Geissler09036742021-06-25 14:25:14 -05004828 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004829 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004830 value you use must match the value used for the
4831 :term:`LINUX_KERNEL_TYPE` value used by the
4832 kernel recipe.
4833
Andrew Geisslerf0343792020-11-18 10:42:21 -06004834 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004835 Provides a list of targets for automatic configuration.
4836
Andrew Geissler517393d2023-01-13 08:55:19 -06004837 See the :ref:`ref-classes-grub-efi` class for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004838 information on how this variable is used.
4839
Andrew Geisslerf0343792020-11-18 10:42:21 -06004840 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004841 Lists the layers, separated by spaces, on which this recipe depends.
4842 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004843 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004844
4845 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4846
4847 In this previous example,
4848 version 3 of "anotherlayer" is compared against
4849 :term:`LAYERVERSION`\ ``_anotherlayer``.
4850
4851 An error is produced if any dependency is missing or the version
4852 numbers (if specified) do not match exactly. This variable is used in
4853 the ``conf/layer.conf`` file and must be suffixed with the name of
4854 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4855
Andrew Geisslerf0343792020-11-18 10:42:21 -06004856 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004857 When used inside the ``layer.conf`` configuration file, this variable
4858 provides the path of the current layer. This variable is not
4859 available outside of ``layer.conf`` and references are expanded
4860 immediately when parsing of the file completes.
4861
Andrew Geissler517393d2023-01-13 08:55:19 -06004862 :term:`LAYERDIR_RE`
4863 See :term:`bitbake:LAYERDIR_RE` in the BitBake manual.
4864
Andrew Geisslerf0343792020-11-18 10:42:21 -06004865 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004866 Lists the layers, separated by spaces, recommended for use with this
4867 layer.
4868
4869 Optionally, you can specify a specific layer version for a
4870 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004871 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004872
4873 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4874
4875 In this previous example, version 3 of "anotherlayer" is compared
4876 against ``LAYERVERSION_anotherlayer``.
4877
4878 This variable is used in the ``conf/layer.conf`` file and must be
4879 suffixed with the name of the specific layer (e.g.
4880 ``LAYERRECOMMENDS_mylayer``).
4881
Andrew Geisslerf0343792020-11-18 10:42:21 -06004882 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05004883 See :term:`bitbake:LAYERSERIES_COMPAT` in the BitBake manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004884
Andrew Geisslerf0343792020-11-18 10:42:21 -06004885 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004886 Optionally specifies the version of a layer as a single number. You
4887 can use this within :term:`LAYERDEPENDS` for
4888 another layer in order to depend on a specific version of the layer.
4889 This variable is used in the ``conf/layer.conf`` file and must be
4890 suffixed with the name of the specific layer (e.g.
4891 ``LAYERVERSION_mylayer``).
4892
Andrew Geisslerf0343792020-11-18 10:42:21 -06004893 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004894 The minimal command and arguments used to run the linker.
4895
Andrew Geisslerf0343792020-11-18 10:42:21 -06004896 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004897 Specifies the flags to pass to the linker. This variable is exported
4898 to an environment variable and thus made visible to the software
4899 being built during the compilation step.
4900
Andrew Geissler09036742021-06-25 14:25:14 -05004901 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004902 being built:
4903
4904 - :term:`TARGET_LDFLAGS` when building for the
4905 target
4906
4907 - :term:`BUILD_LDFLAGS` when building for the
4908 build host (i.e. ``-native``)
4909
4910 - :term:`BUILDSDK_LDFLAGS` when building for
4911 an SDK (i.e. ``nativesdk-``)
4912
Andrew Geisslerf0343792020-11-18 10:42:21 -06004913 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004914 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
Andrew Geissler517393d2023-01-13 08:55:19 -06004915 that the :ref:`ref-classes-debian` class applies its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004916 naming policy to given a recipe that packages multiple libraries.
4917
Andrew Geissler517393d2023-01-13 08:55:19 -06004918 This variable works in conjunction with the :ref:`ref-classes-debian`
4919 class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004920
Andrew Geisslerf0343792020-11-18 10:42:21 -06004921 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004922 Checksums of the license text in the recipe source code.
4923
4924 This variable tracks changes in license text of the source code
4925 files. If the license text is changed, it will trigger a build
4926 failure, which gives the developer an opportunity to review any
4927 license change.
4928
4929 This variable must be defined for all recipes (unless
4930 :term:`LICENSE` is set to "CLOSED").
4931
Andrew Geissler517393d2023-01-13 08:55:19 -06004932 For more information, see the ":ref:`dev-manual/licenses:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004933 section in the Yocto Project Development Tasks Manual.
4934
Andrew Geisslerf0343792020-11-18 10:42:21 -06004935 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004936 The list of source licenses for the recipe. Follow these rules:
4937
4938 - Do not use spaces within individual license names.
4939
4940 - Separate license names using \| (pipe) when there is a choice
4941 between licenses.
4942
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004943 - Separate license names using & (ampersand) when there are
4944 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004945
4946 - You can use spaces between license names.
4947
4948 - For standard licenses, use the names of the files in
4949 ``meta/files/common-licenses/`` or the
4950 :term:`SPDXLICENSEMAP` flag names defined in
4951 ``meta/conf/licenses.conf``.
4952
Andrew Geisslerc926e172021-05-07 16:11:35 -05004953 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004954
Andrew Geissler9aee5002022-03-30 16:27:02 +00004955 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4956 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4957 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004958
4959 The first example is from the
4960 recipes for Qt, which the user may choose to distribute under either
4961 the LGPL version 2.1 or GPL version 3. The second example is from
4962 Cairo where two licenses cover different parts of the source code.
4963 The final example is from ``sysstat``, which presents a single
4964 license.
4965
4966 You can also specify licenses on a per-package basis to handle
4967 situations where components of the output have different licenses.
4968 For example, a piece of software whose code is licensed under GPLv2
4969 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004970 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004971
Andrew Geissler9aee5002022-03-30 16:27:02 +00004972 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4973 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004974 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004975
Andrew Geisslerf0343792020-11-18 10:42:21 -06004976 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004977 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004978 build system to create an extra package (i.e.
4979 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4980 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004981 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004982
4983 The ``${PN}-lic`` package installs a directory in
4984 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4985 name, and installs files in that directory that contain license and
4986 copyright information (i.e. copies of the appropriate license files
4987 from ``meta/common-licenses`` that match the licenses specified in
4988 the :term:`LICENSE` variable of the recipe metadata
4989 and copies of files marked in
4990 :term:`LIC_FILES_CHKSUM` as containing
4991 license text).
4992
4993 For related information on providing license text, see the
4994 :term:`COPY_LIC_DIRS` variable, the
4995 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler517393d2023-01-13 08:55:19 -06004996 ":ref:`dev-manual/licenses:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004997 section in the Yocto Project Development Tasks Manual.
4998
Andrew Geisslerf0343792020-11-18 10:42:21 -06004999 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005000 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00005001 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00005002 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005003 separate them with spaces.
5004
5005 This value is independent of :term:`LICENSE` and is
5006 typically used to mark recipes that might require additional licenses
5007 in order to be used in a commercial product. For more information,
5008 see the
Andrew Geissler517393d2023-01-13 08:55:19 -06005009 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005010 section in the Yocto Project Development Tasks Manual.
5011
Andrew Geissler9aee5002022-03-30 16:27:02 +00005012 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005013 Lists license flags that when specified in
5014 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00005015 prevent that recipe from being built. For more information, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06005016 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005017 section in the Yocto Project Development Tasks Manual.
5018
Andrew Geissler220dafd2023-10-04 10:18:08 -05005019 :term:`LICENSE_FLAGS_DETAILS`
5020 Adds details about a flag in :term:`LICENSE_FLAGS`. This way,
5021 if such a flag is not accepted through :term:`LICENSE_FLAGS_ACCEPTED`,
5022 the error message will be more informative, containing the specified
5023 extra details.
5024
5025 For example, a recipe with an EULA may set::
5026
5027 LICENSE_FLAGS = "FooBar-EULA"
5028 LICENSE_FLAGS_DETAILS[FooBar-EULA] = "For further details, see https://example.com/eula."
5029
5030 If ``Foobar-EULA`` isn't in :term:`LICENSE_FLAGS_ACCEPTED`, the
5031 error message is more useful::
5032
5033 Has a restricted license 'FooBar-EULA' which is not listed in your LICENSE_FLAGS_ACCEPTED.
5034 For further details, see https://example.com/eula.
5035
Andrew Geisslerf0343792020-11-18 10:42:21 -06005036 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005037 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05005038 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005039 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05005040 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05005041 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005042
5043 LICENSE_PATH += "path-to-additional-common-licenses"
5044
Andrew Geisslerf0343792020-11-18 10:42:21 -06005045 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005046 Defines the kernel type to be used in assembling the configuration.
5047 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06005048 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005049 section in the
5050 Yocto Project Linux Kernel Development Manual for more information on
5051 kernel types.
5052
Andrew Geissler09036742021-06-25 14:25:14 -05005053 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005054 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05005055 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005056 the kernel tools to find the appropriate description within the
5057 kernel :term:`Metadata` with which to build out the sources
5058 and configuration.
5059
Andrew Geisslerf0343792020-11-18 10:42:21 -06005060 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005061 The Linux version from ``kernel.org`` on which the Linux kernel image
5062 being built using the OpenEmbedded build system is based. You define
5063 this variable in the kernel recipe. For example, the
5064 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005065 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005066
5067 LINUX_VERSION ?= "3.4.24"
5068
Andrew Geissler09036742021-06-25 14:25:14 -05005069 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05005070 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005071
5072 PV = "${LINUX_VERSION}+git${SRCPV}"
5073
Andrew Geisslerf0343792020-11-18 10:42:21 -06005074 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005075 A string extension compiled into the version string of the Linux
5076 kernel built with the OpenEmbedded build system. You define this
5077 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05005078 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005079
5080 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
5081
5082 Defining this variable essentially sets the Linux kernel
5083 configuration item ``CONFIG_LOCALVERSION``, which is visible through
5084 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05005085 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005086
5087 $ uname -r
5088 3.7.0-rc8-custom
5089
Andrew Geisslerf0343792020-11-18 10:42:21 -06005090 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005091 Specifies the directory to which the OpenEmbedded build system writes
5092 overall log files. The default directory is ``${TMPDIR}/log``.
5093
5094 For the directory containing logs specific to each task, see the
5095 :term:`T` variable.
5096
Andrew Geisslerf0343792020-11-18 10:42:21 -06005097 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005098 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05005099 :term:`MACHINE` in the ``local.conf`` file found in the
5100 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005101 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05005102 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005103
5104 MACHINE ?= "qemux86"
5105
5106 The variable corresponds to a machine configuration file of the same
5107 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05005108 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005109 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005110 the :term:`Source Directory` in
5111 ``meta/conf/machine``.
5112
5113 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05005114 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005115
5116 MACHINE ?= "qemuarm"
5117 MACHINE ?= "qemuarm64"
5118 MACHINE ?= "qemumips"
5119 MACHINE ?= "qemumips64"
5120 MACHINE ?= "qemuppc"
5121 MACHINE ?= "qemux86"
5122 MACHINE ?= "qemux86-64"
5123 MACHINE ?= "genericx86"
5124 MACHINE ?= "genericx86-64"
5125 MACHINE ?= "beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005126
5127 The last five are Yocto Project reference hardware
5128 boards, which are provided in the ``meta-yocto-bsp`` layer.
5129
5130 .. note::
5131
5132 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05005133 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005134
Andrew Geisslerf0343792020-11-18 10:42:21 -06005135 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005136 Specifies the name of the machine-specific architecture. This
5137 variable is set automatically from :term:`MACHINE` or
5138 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05005139 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005140
Andrew Geisslerf0343792020-11-18 10:42:21 -06005141 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005142 A list of required machine-specific packages to install as part of
5143 the image being built. The build process depends on these packages
5144 being present. Furthermore, because this is a "machine-essential"
5145 variable, the list of packages are essential for the machine to boot.
5146 The impact of this variable affects images based on
5147 ``packagegroup-core-boot``, including the ``core-image-minimal``
5148 image.
5149
5150 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05005151 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005152 that the image being built has a build dependency on the variable's
5153 list of packages. In other words, the image will not build if a file
5154 in this list is not found.
5155
5156 As an example, suppose the machine for which you are building
5157 requires ``example-init`` to be run during boot to initialize the
5158 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05005159 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005160
5161 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
5162
Andrew Geisslerf0343792020-11-18 10:42:21 -06005163 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005164 A list of recommended machine-specific packages to install as part of
5165 the image being built. The build process does not depend on these
5166 packages being present. However, because this is a
5167 "machine-essential" variable, the list of packages are essential for
5168 the machine to boot. The impact of this variable affects images based
5169 on ``packagegroup-core-boot``, including the ``core-image-minimal``
5170 image.
5171
Andrew Geissler09036742021-06-25 14:25:14 -05005172 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005173 variable with the exception that the image being built does not have
5174 a build dependency on the variable's list of packages. In other
5175 words, the image will still build if a package in this list is not
5176 found. Typically, this variable is used to handle essential kernel
5177 modules, whose functionality may be selected to be built into the
5178 kernel rather than as a module, in which case a package will not be
5179 produced.
5180
5181 Consider an example where you have a custom kernel where a specific
5182 touchscreen driver is required for the machine to be usable. However,
5183 the driver can be built as a module or into the kernel depending on
5184 the kernel configuration. If the driver is built as a module, you
5185 want it to be installed. But, when the driver is built into the
5186 kernel, you still want the build to succeed. This variable sets up a
5187 "recommends" relationship so that in the latter case, the build will
5188 not fail due to the missing package. To accomplish this, assuming the
5189 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05005190 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005191
5192 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
5193
5194 .. note::
5195
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005196 In this example, the ``kernel-module-ab123`` recipe needs to
5197 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
5198 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
5199 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005200
5201 Some examples of these machine essentials are flash, screen,
5202 keyboard, mouse, or touchscreen drivers (depending on the machine).
5203
Andrew Geisslerf0343792020-11-18 10:42:21 -06005204 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005205 A list of machine-specific packages to install as part of the image
5206 being built that are not essential for the machine to boot. However,
5207 the build process for more fully-featured images depends on the
5208 packages being present.
5209
5210 This variable affects all images based on ``packagegroup-base``,
5211 which does not include the ``core-image-minimal`` or
5212 ``core-image-full-cmdline`` images.
5213
Andrew Geissler09036742021-06-25 14:25:14 -05005214 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005215 with the exception that the image being built has a build dependency
5216 on the variable's list of packages. In other words, the image will
5217 not build if a file in this list is not found.
5218
5219 An example is a machine that has WiFi capability but is not essential
5220 for the machine to boot the image. However, if you are building a
5221 more fully-featured image, you want to enable the WiFi. The package
5222 containing the firmware for the WiFi hardware is always expected to
5223 exist, so it is acceptable for the build process to depend upon
5224 finding the package. In this case, assuming the package for the
5225 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005226 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005227
5228 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
5229
Andrew Geisslerf0343792020-11-18 10:42:21 -06005230 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005231 A list of machine-specific packages to install as part of the image
5232 being built that are not essential for booting the machine. The image
5233 being built has no build dependency on this list of packages.
5234
5235 This variable affects only images based on ``packagegroup-base``,
5236 which does not include the ``core-image-minimal`` or
5237 ``core-image-full-cmdline`` images.
5238
Andrew Geissler09036742021-06-25 14:25:14 -05005239 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005240 with the exception that the image being built does not have a build
5241 dependency on the variable's list of packages. In other words, the
5242 image will build if a file in this list is not found.
5243
5244 An example is a machine that has WiFi capability but is not essential
5245 For the machine to boot the image. However, if you are building a
5246 more fully-featured image, you want to enable WiFi. In this case, the
5247 package containing the WiFi kernel module will not be produced if the
5248 WiFi driver is built into the kernel, in which case you still want
5249 the build to succeed instead of failing as a result of the package
5250 not being found. To accomplish this, assuming the package for the
5251 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005252 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005253
5254 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
5255
Andrew Geisslerf0343792020-11-18 10:42:21 -06005256 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005257 Specifies the list of hardware features the
5258 :term:`MACHINE` is capable of supporting. For related
5259 information on enabling features, see the
5260 :term:`DISTRO_FEATURES`,
5261 :term:`COMBINED_FEATURES`, and
5262 :term:`IMAGE_FEATURES` variables.
5263
5264 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005265 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005266
Andrew Geisslerf0343792020-11-18 10:42:21 -06005267 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005268 A list of space-separated features to be added to
5269 :term:`MACHINE_FEATURES` if not also present in
Andrew Geissler09036742021-06-25 14:25:14 -05005270 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005271
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005272 This variable is set in the ``meta/conf/bitbake.conf`` file. It is not
5273 intended to be user-configurable. It is best to just reference the
5274 variable to see which machine features are being
5275 :ref:`backfilled <ref-features-backfill>` for all machine configurations.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005276
Andrew Geisslerf0343792020-11-18 10:42:21 -06005277 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005278 A list of space-separated features from :term:`MACHINE_FEATURES_BACKFILL`
5279 that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added
5280 to :term:`MACHINE_FEATURES`) during the build.
5281
5282 This corresponds to an opt-out mechanism. When new default machine
5283 features are introduced, machine definition maintainers can review
5284 (`consider`) them and decide to exclude them from the
5285 :ref:`backfilled <ref-features-backfill>` features. Therefore, the
5286 combination of :term:`MACHINE_FEATURES_BACKFILL` and
5287 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` makes it possible to
5288 add new default features without breaking existing machine definitions.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005289
Andrew Geisslerf0343792020-11-18 10:42:21 -06005290 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005291 A colon-separated list of overrides that apply to the current
5292 machine. By default, this list includes the value of
5293 :term:`MACHINE`.
5294
Andrew Geissler09036742021-06-25 14:25:14 -05005295 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005296 should apply to a machine. For example, all machines emulated in QEMU
5297 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
5298 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05005299 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005300
5301 MACHINEOVERRIDES =. "qemuall:"
5302
5303 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005304 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005305 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005306 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005307
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005308 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005309 file://wired-setup \
5310 "
5311
5312 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05005313 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005314 value of :term:`OVERRIDES`.
5315
Andrew Geisslerf0343792020-11-18 10:42:21 -06005316 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005317 The email address of the distribution maintainer.
5318
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06005319 :term:`MESON_BUILDTYPE`
5320 Value of the Meson ``--buildtype`` argument used by the
5321 :ref:`ref-classes-meson` class. It defaults to ``debug`` if
5322 :term:`DEBUG_BUILD` is set to "1", and ``plain`` otherwise.
5323
5324 See `Meson build options <https://mesonbuild.com/Builtin-options.html>`__
5325 for the values you could set in a recipe. Values such as ``plain``,
5326 ``debug``, ``debugoptimized``, ``release`` and ``minsize`` allow
5327 you to specify the inclusion of debugging symbols and the compiler
5328 optimizations (none, performance or size).
5329
Patrick Williamsac13d5f2023-11-24 18:59:46 -06005330 :term:`MESON_TARGET`
5331 A variable for the :ref:`ref-classes-meson` class, allowing to choose
5332 a Meson target to build in :ref:`ref-tasks-compile`. Otherwise, the
5333 default targets are built.
5334
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005335 :term:`METADATA_BRANCH`
5336 The branch currently checked out for the OpenEmbedded-Core layer (path
5337 determined by :term:`COREBASE`).
5338
5339 :term:`METADATA_REVISION`
5340 The revision currently checked out for the OpenEmbedded-Core layer (path
5341 determined by :term:`COREBASE`).
5342
Patrick Williams7784c422022-11-17 07:29:11 -06005343 :term:`MIME_XDG_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06005344 The current implementation of the :ref:`ref-classes-mime-xdg`
Patrick Williams7784c422022-11-17 07:29:11 -06005345 class cannot detect ``.desktop`` files installed through absolute
5346 symbolic links. Use this setting to make the class create post-install
5347 and post-remove scripts for these packages anyway, to invoke the
5348 ``update-destop-database`` command.
5349
Andrew Geisslerf0343792020-11-18 10:42:21 -06005350 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005351 Specifies additional paths from which the OpenEmbedded build system
5352 gets source code. When the build system searches for source code, it
5353 first tries the local download directory. If that location fails, the
5354 build system tries locations defined by
5355 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05005356 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005357
Patrick Williamsac13d5f2023-11-24 18:59:46 -06005358 The default value for :term:`MIRRORS` is defined in the
5359 ``meta/classes-global/mirrors.bbclass`` file in the core metadata layer.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005360
Andrew Geisslerf0343792020-11-18 10:42:21 -06005361 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005362 Specifies a prefix has been added to :term:`PN` to create a
5363 special version of a recipe or package (i.e. a Multilib version). The
5364 variable is used in places where the prefix needs to be added to or
Andrew Geisslerc5535c92023-01-27 16:10:19 -06005365 removed from a name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05005366 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005367
5368 .. note::
5369
Andrew Geissler517393d2023-01-13 08:55:19 -06005370 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation
5371 is historical and comes from a time when ":ref:`ref-classes-nativesdk`"
5372 was a suffix rather than a prefix on the recipe name. When
5373 ":ref:`ref-classes-nativesdk`" was turned into a prefix, it made sense
5374 to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005375
Andrew Geissler09036742021-06-25 14:25:14 -05005376 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geissler517393d2023-01-13 08:55:19 -06005377 :term:`BBCLASSEXTEND` is used to provide a :ref:`ref-classes-nativesdk`
5378 version of a recipe in addition to the target version. If that recipe
5379 declares build-time dependencies on tasks in other recipes by using
5380 :term:`DEPENDS`, then a dependency on "foo" will automatically get
5381 rewritten to a dependency on "nativesdk-foo". However, dependencies like
5382 the following will not get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005383
5384 do_foo[depends] += "recipe:do_foo"
5385
5386 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005387 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005388
5389 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
5390
Andrew Geissler09036742021-06-25 14:25:14 -05005391 :term:`module_autoload`
5392 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04005393 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05005394 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005395
5396 module_autoload_rfcomm = "rfcomm"
5397
Andrew Geisslerc926e172021-05-07 16:11:35 -05005398 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005399
5400 KERNEL_MODULE_AUTOLOAD += "rfcomm"
5401
5402 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
5403
Andrew Geissler09036742021-06-25 14:25:14 -05005404 :term:`module_conf`
Patrick Williams2390b1b2022-11-03 13:47:49 -05005405 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005406 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
5407 file.
5408
5409 You can use this variable anywhere that it can be recognized by the
5410 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
5411 configuration file, a distribution configuration file, an append file
5412 for the recipe, or the recipe itself). If you use this variable, you
5413 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00005414 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005415 variable.
5416
Andrew Geisslerc926e172021-05-07 16:11:35 -05005417 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005418
5419 module_conf_module_name = "modprobe.d-syntax"
5420
5421 You must use the kernel module name override.
5422
5423 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04005424 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005425
Andrew Geissler5f350902021-07-23 13:09:54 -04005426 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005427 populate the ``/etc/modprobe.d/modname.conf`` file with
5428 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05005429 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005430
5431 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
5432
5433 For information on how to specify kernel modules to auto-load on
5434 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
5435
Andrew Geisslerf0343792020-11-18 10:42:21 -06005436 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005437 Controls creation of the ``modules-*.tgz`` file. Set this variable to
5438 "0" to disable creation of this file, which contains all of the
5439 kernel modules resulting from a kernel build.
5440
Andrew Geisslerf0343792020-11-18 10:42:21 -06005441 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005442 The link name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05005443 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005444
5445 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
5446
5447 The value
5448 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005449 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005450
5451 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
5452
5453 See the :term:`MACHINE` variable for additional information.
5454
Andrew Geisslerf0343792020-11-18 10:42:21 -06005455 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005456 The base name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05005457 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005458
5459 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
5460
Patrick Williams8e7b46e2023-05-01 14:19:06 -05005461 See :term:`KERNEL_ARTIFACT_NAME` for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005462
Patrick Williams975a06f2022-10-21 14:42:47 -05005463 :term:`MOUNT_BASE`
5464 On non-systemd systems (where ``udev-extraconf`` is being used),
5465 specifies the base directory for auto-mounting filesystems. The
5466 default value is "/run/media".
5467
Andrew Geisslerf0343792020-11-18 10:42:21 -06005468 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005469 Uniquely identifies the type of the target system for which packages
5470 are being built. This variable allows output for different types of
5471 target systems to be put into different subdirectories of the same
5472 output directory.
5473
Andrew Geisslerc926e172021-05-07 16:11:35 -05005474 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005475
5476 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
5477
Andrew Geissler517393d2023-01-13 08:55:19 -06005478 Some classes (e.g. :ref:`ref-classes-cross-canadian`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05005479 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005480
5481 See the :term:`STAMP` variable for an example. See the
5482 :term:`STAGING_DIR_TARGET` variable for more information.
5483
Andrew Geisslerf0343792020-11-18 10:42:21 -06005484 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005485 A string identifying the host distribution. Strings consist of the
5486 host distributor ID followed by the release, as reported by the
5487 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
5488 example, when running a build on Ubuntu 12.10, the value is
5489 "Ubuntu-12.10". If this information is unable to be determined, the
5490 value resolves to "Unknown".
5491
5492 This variable is used by default to isolate native shared state
5493 packages for different distributions (e.g. to avoid problems with
5494 ``glibc`` version incompatibilities). Additionally, the variable is
5495 checked against
5496 :term:`SANITY_TESTED_DISTROS` if that
5497 variable is set.
5498
Andrew Geisslerf0343792020-11-18 10:42:21 -06005499 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005500 The minimal command and arguments to run ``nm``.
5501
Andrew Geisslerf0343792020-11-18 10:42:21 -06005502 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005503 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005504 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005505 licenses that are not in any way common. Also, new licenses are added
5506 occasionally to avoid introducing a lot of common license files,
5507 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05005508 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005509 not exist in common licenses.
5510
Andrew Geissler09036742021-06-25 14:25:14 -05005511 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05005512 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005513
5514 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
5515
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005516 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005517 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05005518 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005519
5520 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
5521
Andrew Geisslerf0343792020-11-18 10:42:21 -06005522 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005523 Prevents installation of all "recommended-only" packages.
5524 Recommended-only packages are packages installed only through the
5525 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05005526 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005527
5528 NO_RECOMMENDATIONS = "1"
5529
5530 You can set this variable globally in your ``local.conf`` file or you
5531 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005532 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005533
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005534 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005535
5536 It is important to realize that if you choose to not install packages
5537 using this variable and some other packages are dependent on them
5538 (i.e. listed in a recipe's :term:`RDEPENDS`
5539 variable), the OpenEmbedded build system ignores your request and
5540 will install the packages to avoid dependency errors.
5541
5542 .. note::
5543
5544 Some recommended packages might be required for certain system
5545 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005546 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005547
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005548 This variable is only supported when using the IPK and RPM
5549 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005550
5551 See the :term:`BAD_RECOMMENDATIONS` and
5552 the :term:`PACKAGE_EXCLUDE` variables for
5553 related information.
5554
Andrew Geisslerf0343792020-11-18 10:42:21 -06005555 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005556 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005557 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05005558 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005559 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005560
5561 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005562 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
5563 FILES:${PN}-dbg = "/usr/src/debug/"
5564 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005565
Andrew Geissler09036742021-06-25 14:25:14 -05005566 :term:`NON_MULTILIB_RECIPES`
5567 A list of recipes that should not be built for multilib. OE-Core's
5568 ``multilib.conf`` file defines a reasonable starting point for this
5569 list with::
5570
5571 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
5572
Andrew Geisslerf0343792020-11-18 10:42:21 -06005573 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005574 The minimal command and arguments to run ``objcopy``.
5575
Andrew Geisslerf0343792020-11-18 10:42:21 -06005576 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005577 The minimal command and arguments to run ``objdump``.
5578
Andrew Geisslerf0343792020-11-18 10:42:21 -06005579 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005580 When inheriting the :ref:`ref-classes-binconfig` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005581 this variable specifies additional arguments passed to the "sed"
5582 command. The sed command alters any paths in configuration scripts
5583 that have been set up during compilation. Inheriting this class
5584 results in all paths in these scripts being changed to point into the
5585 ``sysroots/`` directory so that all builds that use the script will
5586 use the correct directories for the cross compiling layout.
5587
Patrick Williams975a06f2022-10-21 14:42:47 -05005588 See the ``meta/classes-recipe/binconfig.bbclass`` in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005589 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00005590 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005591
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06005592 :term:`OECMAKE_GENERATOR`
5593 A variable for the :ref:`ref-classes-cmake` class, allowing to choose
5594 which back-end will be generated by CMake to build an application.
5595
5596 By default, this variable is set to ``Ninja``, which is faster than GNU
5597 make, but if building is broken with Ninja, a recipe can use this
5598 variable to use GNU make instead::
5599
5600 OECMAKE_GENERATOR = "Unix Makefiles"
5601
Andrew Geisslerf0343792020-11-18 10:42:21 -06005602 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005603 An internal variable used to tell the OpenEmbedded build system what
5604 Python modules to import for every Python function run by the system.
5605
5606 .. note::
5607
5608 Do not set this variable. It is for internal use only.
5609
Andrew Geisslerf0343792020-11-18 10:42:21 -06005610 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005611 The name of the build environment setup script for the purposes of
5612 setting up the environment within the extensible SDK. The default
5613 value is "oe-init-build-env".
5614
5615 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05005616 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005617
Andrew Geisslerf0343792020-11-18 10:42:21 -06005618 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005619 Controls how the OpenEmbedded build system spawns interactive
5620 terminals on the host development system (e.g. using the BitBake
5621 command with the ``-c devshell`` command-line option). For more
Andrew Geissler517393d2023-01-13 08:55:19 -06005622 information, see the ":ref:`dev-manual/development-shell:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005623 the Yocto Project Development Tasks Manual.
5624
Andrew Geissler5f350902021-07-23 13:09:54 -04005625 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005626
5627 - auto
5628 - gnome
5629 - xfce
5630 - rxvt
5631 - screen
5632 - konsole
5633 - none
5634
Andrew Geisslerf0343792020-11-18 10:42:21 -06005635 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005636 The directory from which the top-level build environment setup script
5637 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005638 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05005639 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005640 contains the script.
5641
5642 For additional information on how this variable is used, see the
5643 initialization script.
5644
Patrick Williamsac13d5f2023-11-24 18:59:46 -06005645 :term:`OEQA_REPRODUCIBLE_TEST_PACKAGE`
5646 Set the package manager(s) for build reproducibility testing.
5647 See :yocto_git:`reproducible.py </poky/tree/meta/lib/oeqa/selftest/cases/reproducible.py>`
5648 and :doc:`/test-manual/reproducible-builds`.
5649
Patrick Williams520786c2023-06-25 16:20:36 -05005650 :term:`OEQA_REPRODUCIBLE_TEST_TARGET`
5651 Set build target for build reproducibility testing. By default
5652 all available recipes are compiled with "bitbake world", see also :term:`EXCLUDE_FROM_WORLD`
5653 and :doc:`/test-manual/reproducible-builds`.
5654
5655 :term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS`
5656 Set build targets which can be rebuilt using :ref:`shared state <overview-manual/concepts:shared state cache>`
5657 when running build reproducibility tests. See :doc:`/test-manual/reproducible-builds`.
5658
Andrew Geisslerf0343792020-11-18 10:42:21 -06005659 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005660 Declares the oldest version of the Linux kernel that the produced
5661 binaries must support. This variable is passed into the build of the
5662 Embedded GNU C Library (``glibc``).
5663
5664 The default for this variable comes from the
5665 ``meta/conf/bitbake.conf`` configuration file. You can override this
5666 default by setting the variable in a custom distribution
5667 configuration file.
5668
Patrick Williams975a06f2022-10-21 14:42:47 -05005669 :term:`OVERLAYFS_ETC_DEVICE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005670 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005671 inherited, specifies the device to be mounted for the read/write
5672 layer of ``/etc``. There is no default, so you must set this if you
Andrew Geissler517393d2023-01-13 08:55:19 -06005673 wish to enable :ref:`ref-classes-overlayfs-etc`, for
Patrick Williams975a06f2022-10-21 14:42:47 -05005674 example, assuming ``/dev/mmcblk0p2`` was the desired device::
5675
5676 OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2"
5677
5678 :term:`OVERLAYFS_ETC_EXPOSE_LOWER`
Andrew Geissler517393d2023-01-13 08:55:19 -06005679 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005680 inherited, if set to "1" then a read-only access to the original
5681 ``/etc`` content will be provided as a ``lower/`` subdirectory of
5682 :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0".
5683
5684 :term:`OVERLAYFS_ETC_FSTYPE`
Andrew Geissler517393d2023-01-13 08:55:19 -06005685 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005686 inherited, specifies the file system type for the read/write
5687 layer of ``/etc``. There is no default, so you must set this if you
Andrew Geissler517393d2023-01-13 08:55:19 -06005688 wish to enable :ref:`ref-classes-overlayfs-etc`,
Patrick Williams975a06f2022-10-21 14:42:47 -05005689 for example, assuming the file system is ext4::
5690
5691 OVERLAYFS_ETC_FSTYPE = "ext4"
5692
5693 :term:`OVERLAYFS_ETC_MOUNT_OPTIONS`
Andrew Geissler517393d2023-01-13 08:55:19 -06005694 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005695 inherited, specifies the mount options for the read-write layer.
5696 The default value is "defaults".
5697
5698 :term:`OVERLAYFS_ETC_MOUNT_POINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06005699 When the :ref:`ref-classes-overlayfs-etc` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005700 inherited, specifies the parent mount path for the filesystem layers.
5701 There is no default, so you must set this if you wish to enable
Andrew Geissler517393d2023-01-13 08:55:19 -06005702 :ref:`ref-classes-overlayfs-etc`, for example if the desired path is
5703 "/data"::
Patrick Williams975a06f2022-10-21 14:42:47 -05005704
5705 OVERLAYFS_ETC_MOUNT_POINT = "/data"
5706
5707 :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME`
Andrew Geissler517393d2023-01-13 08:55:19 -06005708 When the :ref:`ref-classes-overlayfs-etc` class is inherited, controls
5709 how the generated init will be named. For more information, see the
5710 :ref:`ref-classes-overlayfs-etc` class documentation. The default value
5711 is "1".
Patrick Williams975a06f2022-10-21 14:42:47 -05005712
5713 :term:`OVERLAYFS_MOUNT_POINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06005714 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005715 specifies mount point(s) to be used. For example::
5716
5717 OVERLAYFS_MOUNT_POINT[data] = "/data"
5718
Andrew Geissler517393d2023-01-13 08:55:19 -06005719 The assumes you have a ``data.mount`` systemd unit defined elsewhere in
5720 your BSP (e.g. in ``systemd-machine-units`` recipe) and it is installed
5721 into the image. For more information see :ref:`ref-classes-overlayfs`.
Patrick Williams975a06f2022-10-21 14:42:47 -05005722
5723 .. note::
5724
Andrew Geissler517393d2023-01-13 08:55:19 -06005725 Although the :ref:`ref-classes-overlayfs` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005726 inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT`
5727 should be set in your machine configuration.
5728
5729 :term:`OVERLAYFS_QA_SKIP`
Andrew Geissler517393d2023-01-13 08:55:19 -06005730 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005731 provides the ability to disable QA checks for particular overlayfs
5732 mounts. For example::
5733
5734 OVERLAYFS_QA_SKIP[data] = "mount-configured"
5735
5736 .. note::
5737
Andrew Geissler517393d2023-01-13 08:55:19 -06005738 Although the :ref:`ref-classes-overlayfs` class is
Patrick Williams975a06f2022-10-21 14:42:47 -05005739 inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP`
5740 should be set in your machine configuration.
5741
5742 :term:`OVERLAYFS_WRITABLE_PATHS`
Andrew Geissler517393d2023-01-13 08:55:19 -06005743 When inheriting the :ref:`ref-classes-overlayfs` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05005744 specifies writable paths used at runtime for the recipe. For
5745 example::
5746
5747 OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application"
5748
Andrew Geisslerf0343792020-11-18 10:42:21 -06005749 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005750 A colon-separated list of overrides that currently apply. Overrides
5751 are a BitBake mechanism that allows variables to be selectively
5752 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005753 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005754 the current recipe being built, the machine for which it is being
5755 built, and so forth.
5756
5757 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005758 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005759 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005760 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005761
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005762 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005763
5764 See the
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05005765 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005766 section in the BitBake User Manual for more information on the
5767 overrides mechanism.
5768
Andrew Geissler09036742021-06-25 14:25:14 -05005769 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005770 :term:`CLASSOVERRIDE`,
5771 :term:`MACHINEOVERRIDES`, and
5772 :term:`DISTROOVERRIDES` variables. Another
5773 important override included by default is ``pn-${PN}``. This override
5774 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005775 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005776
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005777 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005778
5779 .. note::
5780
Andrew Geissler09036742021-06-25 14:25:14 -05005781 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005782 in the output of the ``bitbake -e`` command. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06005783 ":ref:`dev-manual/debugging:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005784 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005785
Andrew Geisslerf0343792020-11-18 10:42:21 -06005786 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005787 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005788
5789 ${PN}-${PV}
5790
Andrew Geissler517393d2023-01-13 08:55:19 -06005791 :term:`P4DIR`
5792 See :term:`bitbake:P4DIR` in the BitBake manual.
5793
Andrew Geisslerf0343792020-11-18 10:42:21 -06005794 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005795 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005796
5797 You may find you need to inject additional metadata into packages.
5798 This variable allows you to do that by setting the injected data as
5799 the value. Multiple fields can be added by splitting the content with
5800 the literal separator "\n".
5801
5802 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5803 to do package type specific settings. It can also be made package
5804 specific by using the package name as a suffix.
5805
5806 You can find out more about applying this variable in the
Andrew Geissler517393d2023-01-13 08:55:19 -06005807 ":ref:`dev-manual/packages:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005808 section in the Yocto Project Development Tasks Manual.
5809
Andrew Geisslerf0343792020-11-18 10:42:21 -06005810 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005811 The architecture of the resulting package or packages.
5812
5813 By default, the value of this variable is set to
5814 :term:`TUNE_PKGARCH` when building for the
5815 target, :term:`BUILD_ARCH` when building for the
5816 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5817 SDK.
5818
5819 .. note::
5820
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005821 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005822
5823 However, if your recipe's output packages are built specific to the
5824 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005825 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005826 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005827
5828 PACKAGE_ARCH = "${MACHINE_ARCH}"
5829
Andrew Geisslerf0343792020-11-18 10:42:21 -06005830 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005831 Specifies a list of architectures compatible with the target machine.
5832 This variable is set automatically and should not normally be
5833 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005834 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005835 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5836
Andrew Geisslerf0343792020-11-18 10:42:21 -06005837 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005838 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005839 that those added packages can pick up files that would normally be
5840 included in the default package.
5841
Andrew Geisslerf0343792020-11-18 10:42:21 -06005842 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005843 This variable, which is set in the ``local.conf`` configuration file
5844 found in the ``conf`` folder of the
5845 :term:`Build Directory`, specifies the package manager the
5846 OpenEmbedded build system uses when packaging data.
5847
5848 You can provide one or more of the following arguments for the
Andrew Geissler517393d2023-01-13 08:55:19 -06005849 variable::
5850
Patrick Williams8e7b46e2023-05-01 14:19:06 -05005851 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005852
5853 The build system uses only the first argument in the list as the
5854 package manager when creating your image or SDK. However, packages
5855 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005856 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005857
5858 PACKAGE_CLASSES ?= "package_ipk"
5859
5860 The OpenEmbedded build system uses
5861 the IPK package manager to create your image or SDK.
5862
5863 For information on packaging and build performance effects as a
5864 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005865 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005866
Andrew Geisslerf0343792020-11-18 10:42:21 -06005867 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005868 Determines how to split up and package debug and source information
5869 when creating debugging packages to be used with the GNU Project
5870 Debugger (GDB). In general, based on the value of this variable,
5871 you can combine the source and debug info in a single package,
5872 you can break out the source into a separate package that can be
5873 installed independently, or you can choose to not have the source
5874 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005875
Patrick Williams93c203f2021-10-06 16:15:23 -05005876 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005877
Patrick Williams93c203f2021-10-06 16:15:23 -05005878 - "``.debug``": All debugging and source info is placed in a single
5879 ``*-dbg`` package; debug symbol files are placed next to the
5880 binary in a ``.debug`` directory so that, if a binary is installed
5881 into ``/bin``, the corresponding debug symbol file is installed
5882 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5883 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005884
Patrick Williams93c203f2021-10-06 16:15:23 -05005885 - "``debug-file-directory``": As above, all debugging and source info
5886 is placed in a single ``*-dbg`` package; debug symbol files are
5887 placed entirely under the directory ``/usr/lib/debug`` and separated
5888 by the path from where the binary is installed, so that if a binary
5889 is installed in ``/bin``, the corresponding debug symbols are installed
5890 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5891 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005892
Patrick Williams93c203f2021-10-06 16:15:23 -05005893 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5894 ``*-dbg`` package as with the ``.debug`` value, while source is
5895 placed in a separate ``*-src`` package, which can be installed
5896 independently. This is the default setting for this variable,
5897 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005898
Patrick Williams93c203f2021-10-06 16:15:23 -05005899 - "``debug-without-src``": The same behavior as with the ``.debug``
5900 setting, but no source is packaged at all.
5901
5902 .. note::
5903
5904 Much of the above package splitting can be overridden via
5905 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005906
5907 You can find out more about debugging using GDB by reading the
Andrew Geissler517393d2023-01-13 08:55:19 -06005908 ":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005909 in the Yocto Project Development Tasks Manual.
5910
Andrew Geisslerf0343792020-11-18 10:42:21 -06005911 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005912 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005913 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005914
5915 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5916
5917 You can set this variable globally in your ``local.conf`` file or you
5918 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005919 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005920
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005921 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005922
5923 If you choose to not install a package using this variable and some
5924 other package is dependent on it (i.e. listed in a recipe's
5925 :term:`RDEPENDS` variable), the OpenEmbedded build
5926 system generates a fatal installation error. Because the build system
5927 halts the process with a fatal error, you can use the variable with
5928 an iterative development process to remove specific components from a
5929 system.
5930
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005931 This variable is supported only when using the IPK and RPM
5932 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005933
5934 See the :term:`NO_RECOMMENDATIONS` and the
5935 :term:`BAD_RECOMMENDATIONS` variables for
5936 related information.
5937
Andrew Geissler9aee5002022-03-30 16:27:02 +00005938 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5939 Prevents specific packages from being installed when you are
5940 installing complementary packages.
5941
5942 You might find that you want to prevent installing certain packages
5943 when you are installing complementary packages. For example, if you
5944 are using :term:`IMAGE_FEATURES` to install
5945 ``dev-pkgs``, you might not want to install all packages from a
5946 particular multilib. If you find yourself in this situation, you can
5947 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5948 expressions to match the packages you want to exclude.
5949
Andrew Geisslerf0343792020-11-18 10:42:21 -06005950 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005951 Specifies the list of architectures compatible with the device CPU.
5952 This variable is useful when you build for several different devices
5953 that use miscellaneous processors such as XScale and ARM926-EJS.
5954
Andrew Geisslerf0343792020-11-18 10:42:21 -06005955 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005956 Optionally specifies the package architectures used as part of the
5957 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005958 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005959 URI, which is constructed using the
5960 :term:`PACKAGE_FEED_URIS` and
5961 :term:`PACKAGE_FEED_BASE_PATHS`
5962 variables.
5963
5964 .. note::
5965
Andrew Geissler09036742021-06-25 14:25:14 -05005966 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005967 variable to allow specific package architectures. If you do
5968 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005969 case, you can omit this variable. Omitting the variable results in
5970 all available architectures for the current machine being included
5971 into remote package feeds.
5972
Andrew Geissler09036742021-06-25 14:25:14 -05005973 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5974 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005975 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005976
5977 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5978 https://example.com/packagerepos/updates"
5979 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5980 PACKAGE_FEED_ARCHS = "all core2-64"
5981
5982 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005983
5984 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005985
5986 https://example.com/packagerepos/release/rpm/all
5987 https://example.com/packagerepos/release/rpm/core2-64
5988 https://example.com/packagerepos/release/rpm-dev/all
5989 https://example.com/packagerepos/release/rpm-dev/core2-64
5990 https://example.com/packagerepos/updates/rpm/all
5991 https://example.com/packagerepos/updates/rpm/core2-64
5992 https://example.com/packagerepos/updates/rpm-dev/all
5993 https://example.com/packagerepos/updates/rpm-dev/core2-64
5994
Andrew Geisslerf0343792020-11-18 10:42:21 -06005995 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005996 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005997 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005998 package feed URI used by the OpenEmbedded build system. The base path
5999 lies between the :term:`PACKAGE_FEED_URIS`
6000 and :term:`PACKAGE_FEED_ARCHS` variables.
6001
Andrew Geissler09036742021-06-25 14:25:14 -05006002 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
6003 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05006004 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006005
6006 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
6007 https://example.com/packagerepos/updates"
6008 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
6009 PACKAGE_FEED_ARCHS = "all core2-64"
6010
6011 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006012
6013 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006014
6015 https://example.com/packagerepos/release/rpm/all
6016 https://example.com/packagerepos/release/rpm/core2-64
6017 https://example.com/packagerepos/release/rpm-dev/all
6018 https://example.com/packagerepos/release/rpm-dev/core2-64
6019 https://example.com/packagerepos/updates/rpm/all
6020 https://example.com/packagerepos/updates/rpm/core2-64
6021 https://example.com/packagerepos/updates/rpm-dev/all
6022 https://example.com/packagerepos/updates/rpm-dev/core2-64
6023
Andrew Geisslerf0343792020-11-18 10:42:21 -06006024 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006025 Specifies the front portion of the package feed URI used by the
6026 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05006027 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006028 :term:`PACKAGE_FEED_BASE_PATHS`, and
6029 :term:`PACKAGE_FEED_ARCHS` variables.
6030
Andrew Geissler09036742021-06-25 14:25:14 -05006031 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
6032 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05006033 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006034
6035 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
6036 https://example.com/packagerepos/updates"
6037 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
6038 PACKAGE_FEED_ARCHS = "all core2-64"
6039
6040 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006041
6042 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006043
6044 https://example.com/packagerepos/release/rpm/all
6045 https://example.com/packagerepos/release/rpm/core2-64
6046 https://example.com/packagerepos/release/rpm-dev/all
6047 https://example.com/packagerepos/release/rpm-dev/core2-64
6048 https://example.com/packagerepos/updates/rpm/all
6049 https://example.com/packagerepos/updates/rpm/core2-64
6050 https://example.com/packagerepos/updates/rpm-dev/all
6051 https://example.com/packagerepos/updates/rpm-dev/core2-64
6052
Andrew Geisslerf0343792020-11-18 10:42:21 -06006053 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006054 The final list of packages passed to the package manager for
6055 installation into the image.
6056
6057 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05006058 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006059 not the final list of packages that are actually installed. This
6060 variable is internal to the image construction code. Consequently, in
6061 general, you should use the
6062 :term:`IMAGE_INSTALL` variable to specify
6063 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06006064 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Patrick Williams2194f502022-10-16 14:26:09 -05006065 image. When working with an initial RAM filesystem (:term:`Initramfs`) image,
Andrew Geissler09036742021-06-25 14:25:14 -05006066 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler517393d2023-01-13 08:55:19 -06006067 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006068 in the Yocto Project Development Tasks Manual.
6069
Andrew Geisslerf0343792020-11-18 10:42:21 -06006070 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006071 Specifies a list of packages the OpenEmbedded build system attempts
6072 to install when creating an image. If a listed package fails to
6073 install, the build system does not generate an error. This variable
6074 is generally not user-defined.
6075
Andrew Geisslerf0343792020-11-18 10:42:21 -06006076 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006077 Specifies a list of functions run to pre-process the
6078 :term:`PKGD` directory prior to splitting the files out
6079 to individual packages.
6080
Andrew Geisslerf0343792020-11-18 10:42:21 -06006081 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006082 Specifies a list of dependencies for post-installation and
6083 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00006084 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006085 creation time rather than on the target but depends on a native tool
6086 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05006087 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006088
6089 For information on running post-installation scripts, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006090 ":ref:`dev-manual/new-recipe:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006091 section in the Yocto Project Development Tasks Manual.
6092
Andrew Geisslerf0343792020-11-18 10:42:21 -06006093 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006094 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05006095 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006096 recipes when you specify features and then arguments that define
6097 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05006098 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006099
6100 PACKAGECONFIG ??= "f1 f2 f3 ..."
6101 PACKAGECONFIG[f1] = "\
6102 --with-f1, \
6103 --without-f1, \
6104 build-deps-for-f1, \
6105 runtime-deps-for-f1, \
6106 runtime-recommends-for-f1, \
6107 packageconfig-conflicts-for-f1"
6108 PACKAGECONFIG[f2] = "\
6109 ... and so on and so on ...
6110
Andrew Geissler5f350902021-07-23 13:09:54 -04006111 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006112 list of the features to enable. Following the features, you can
6113 determine the behavior of each feature by providing up to six
6114 order-dependent arguments, which are separated by commas. You can
6115 omit any argument you like but must retain the separating commas. The
6116 order is important and specifies the following:
6117
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006118 #. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
6119 if the feature is enabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006120
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006121 #. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
6122 if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006123
Andrew Geissler517393d2023-01-13 08:55:19 -06006124 #. Additional build dependencies (:term:`DEPENDS`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006125 that should be added if the feature is enabled.
6126
Andrew Geissler517393d2023-01-13 08:55:19 -06006127 #. Additional runtime dependencies (:term:`RDEPENDS`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006128 that should be added if the feature is enabled.
6129
Andrew Geissler517393d2023-01-13 08:55:19 -06006130 #. Additional runtime recommendations
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006131 (:term:`RRECOMMENDS`) that should be added if
6132 the feature is enabled.
6133
Andrew Geissler517393d2023-01-13 08:55:19 -06006134 #. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006135 settings for this feature.
6136
Andrew Geissler09036742021-06-25 14:25:14 -05006137 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006138 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
Andrew Geissler517393d2023-01-13 08:55:19 -06006139 three arguments that determine the feature's behavior::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006140
6141 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
6142
6143 The
6144 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
6145 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05006146 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006147 other hand, if the feature is disabled say through a ``.bbappend``
6148 file in another layer, then the second argument ``--without-gtk3`` is
6149 added to the configure script instead.
6150
Andrew Geissler09036742021-06-25 14:25:14 -05006151 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006152 regardless of whether you are creating a block or changing a block.
6153 When creating a block, use the structure inside your recipe.
6154
Andrew Geissler09036742021-06-25 14:25:14 -05006155 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006156 so one of two ways:
6157
6158 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05006159 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05006160 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006161 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006162
6163 PACKAGECONFIG = "f4 f5"
6164
Andrew Geisslerc926e172021-05-07 16:11:35 -05006165 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006166
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006167 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006168
6169 - *Configuration file:* This method is identical to changing the
6170 block through an append file except you edit your ``local.conf``
6171 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05006172 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006173
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006174 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006175
Andrew Geisslerc926e172021-05-07 16:11:35 -05006176 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006177
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006178 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006179
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006180 Consider the following example of a :ref:`ref-classes-cmake` recipe with a systemd service
6181 in which :term:`PACKAGECONFIG` is used to transform the systemd service
6182 into a feature that can be easily enabled or disabled via :term:`PACKAGECONFIG`::
6183
6184 example.c
6185 example.service
6186 CMakeLists.txt
6187
6188 The ``CMakeLists.txt`` file contains::
6189
6190 if(WITH_SYSTEMD)
6191 install(FILES ${PROJECT_SOURCE_DIR}/example.service DESTINATION /etc/systemd/systemd)
6192 endif(WITH_SYSTEMD)
6193
6194 In order to enable the installation of ``example.service`` we need to
6195 ensure that ``-DWITH_SYSTEMD=ON`` is passed to the ``cmake`` command
6196 execution. Recipes that have ``CMakeLists.txt`` generally inherit the
6197 :ref:`ref-classes-cmake` class, that runs ``cmake`` with
6198 :term:`EXTRA_OECMAKE`, which :term:`PACKAGECONFIG_CONFARGS` will be
6199 appended to. Now, knowing that :term:`PACKAGECONFIG_CONFARGS` is
6200 automatically filled with either the first or second element of
6201 :term:`PACKAGECONFIG` flag value, the recipe would be like::
6202
6203 inherit cmake
6204 PACKAGECONFIG = "systemd"
6205 PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF"
6206
6207 A side note to this recipe is to check if ``systemd`` is in fact the used :term:`INIT_MANAGER`
6208 or not::
6209
6210 PACKAGECONFIG = "${@'systemd' if d.getVar('INIT_MANAGER') == 'systemd' else ''}"
6211
Andrew Geisslerf0343792020-11-18 10:42:21 -06006212 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006213 A space-separated list of configuration options generated from the
6214 :term:`PACKAGECONFIG` setting.
6215
Andrew Geissler517393d2023-01-13 08:55:19 -06006216 Classes such as :ref:`ref-classes-autotools` and :ref:`ref-classes-cmake`
6217 use :term:`PACKAGECONFIG_CONFARGS` to pass :term:`PACKAGECONFIG` options
6218 to ``configure`` and ``cmake``, respectively. If you are using
6219 :term:`PACKAGECONFIG` but not a class that handles the
6220 :ref:`ref-tasks-configure` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05006221 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006222
Andrew Geisslerf0343792020-11-18 10:42:21 -06006223 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geissler517393d2023-01-13 08:55:19 -06006224 For recipes inheriting the :ref:`ref-classes-packagegroup` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05006225 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006226 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
6227 should not be automatically created by the ``packagegroup`` recipe,
6228 which is the default behavior.
6229
Andrew Geisslerf0343792020-11-18 10:42:21 -06006230 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006231 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006232 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006233
Andrew Geissler5199d832021-09-24 16:47:35 -05006234 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006235
6236 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05006237 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006238 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05006239 package. If a file matches the :term:`FILES` variable for more than one
6240 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006241 (leftmost) package.
6242
6243 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006244 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006245 :ref:`ref-tasks-install` task) are not generated,
6246 unless generation is forced through the
6247 :term:`ALLOW_EMPTY` variable.
6248
Andrew Geisslerf0343792020-11-18 10:42:21 -06006249 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006250 A promise that your recipe satisfies runtime dependencies for
6251 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05006252 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006253 only states that they should be satisfied. For example, if a hard,
6254 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05006255 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006256 variable, but a package with the module name is never actually
6257 produced, then the other package will be broken. Thus, if you attempt
6258 to include that package in an image, you will get a dependency
6259 failure from the packaging system during the
6260 :ref:`ref-tasks-rootfs` task.
6261
6262 Typically, if there is a chance that such a situation can occur and
6263 the package that is not created is valid without the dependency being
6264 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05006265 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006266
Andrew Geissler09036742021-06-25 14:25:14 -05006267 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006268 you are splitting packages, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006269 ":ref:`dev-manual/packages:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006270 section in the Yocto Project Development Tasks Manual.
6271
Andrew Geisslerf0343792020-11-18 10:42:21 -06006272 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006273 Specifies a list of functions run to perform additional splitting of
6274 files into individual packages. Recipes can either prepend to this
6275 variable or prepend to the ``populate_packages`` function in order to
6276 perform additional package splitting. In either case, the function
6277 should set :term:`PACKAGES`,
6278 :term:`FILES`, :term:`RDEPENDS` and
6279 other packaging variables appropriately in order to perform the
6280 desired splitting.
6281
Andrew Geisslerf0343792020-11-18 10:42:21 -06006282 :term:`PARALLEL_MAKE`
Patrick Williams7784c422022-11-17 07:29:11 -06006283
6284 Extra options passed to the build tool command (``make``,
6285 ``ninja`` or more specific build engines, like the Go language one)
6286 during the :ref:`ref-tasks-compile` task, to specify parallel compilation
6287 on the local build host. This variable is usually in the form "-j x",
6288 where x represents the maximum number of parallel threads such engines
6289 can run.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006290
6291 .. note::
6292
Patrick Williams7784c422022-11-17 07:29:11 -06006293 For software compiled by ``make``, in order for :term:`PARALLEL_MAKE`
6294 to be effective, ``make`` must be called with
6295 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
6296 way to ensure this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006297
6298 By default, the OpenEmbedded build system automatically sets this
6299 variable to be equal to the number of cores the build system uses.
6300
6301 .. note::
6302
6303 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05006304 the :ref:`ref-tasks-compile` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05006305 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006306 information on addressing race conditions, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006307 ":ref:`dev-manual/debugging:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006308 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006309
6310 For single socket systems (i.e. one CPU), you should not have to
6311 override this variable to gain optimal parallelism during builds.
6312 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05006313 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006314 not set higher than "-j 20".
6315
6316 For more information on speeding up builds, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006317 ":ref:`dev-manual/speeding-up-build:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006318 section in the Yocto Project Development Tasks Manual.
6319
Andrew Geisslerf0343792020-11-18 10:42:21 -06006320 :term:`PARALLEL_MAKEINST`
Patrick Williams7784c422022-11-17 07:29:11 -06006321 Extra options passed to the build tool install command
6322 (``make install``, ``ninja install`` or more specific ones)
6323 during the :ref:`ref-tasks-install` task in order to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006324 parallel installation. This variable defaults to the value of
6325 :term:`PARALLEL_MAKE`.
6326
6327 .. note::
6328
Patrick Williams7784c422022-11-17 07:29:11 -06006329 For software compiled by ``make``, in order for :term:`PARALLEL_MAKEINST`
6330 to be effective, ``make`` must be called with
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006331 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
6332 way to ensure this is to use the ``oe_runmake`` function.
6333
6334 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05006335 the :ref:`ref-tasks-install` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05006336 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006337 workaround. For information on addressing race conditions, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06006338 ":ref:`dev-manual/debugging:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006339 section in the Yocto Project Development Tasks Manual.
6340
Andrew Geisslerf0343792020-11-18 10:42:21 -06006341 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006342 Determines the action to take when a patch fails. You can set this
6343 variable to one of two values: "noop" and "user".
6344
6345 The default value of "noop" causes the build to simply fail when the
6346 OpenEmbedded build system cannot successfully apply a patch. Setting
6347 the value to "user" causes the build system to launch a shell and
6348 places you in the right location so that you can manually resolve the
6349 conflicts.
6350
6351 Set this variable in your ``local.conf`` file.
6352
Andrew Geisslerf0343792020-11-18 10:42:21 -06006353 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006354 Specifies the utility used to apply patches for a recipe during the
6355 :ref:`ref-tasks-patch` task. You can specify one of
6356 three utilities: "patch", "quilt", or "git". The default utility used
6357 is "quilt" except for the quilt-native recipe itself. Because the
6358 quilt tool is not available at the time quilt-native is being
6359 patched, it uses "patch".
6360
6361 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006362 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006363
6364 PATCHTOOL = "patch"
6365 PATCHTOOL = "quilt"
6366 PATCHTOOL = "git"
6367
Andrew Geisslerf0343792020-11-18 10:42:21 -06006368 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006369 The epoch of the recipe. By default, this variable is unset. The
6370 variable is used to make upgrades possible when the versioning scheme
6371 changes in some backwards incompatible way.
6372
Andrew Geissler09036742021-06-25 14:25:14 -05006373 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006374
Andrew Geissler9aee5002022-03-30 16:27:02 +00006375 :term:`PEP517_WHEEL_PATH`
Andrew Geissler517393d2023-01-13 08:55:19 -06006376 When used by recipes that inherit the :ref:`ref-classes-python_pep517`
6377 class, denotes the path to ``dist/`` (short for distribution) where the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006378 binary archive ``wheel`` is built.
6379
Andrew Geissler517393d2023-01-13 08:55:19 -06006380 :term:`PERSISTENT_DIR`
6381 See :term:`bitbake:PERSISTENT_DIR` in the BitBake manual.
6382
Andrew Geisslerf0343792020-11-18 10:42:21 -06006383 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006384 Specifies the recipe or package name and includes all version and
6385 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
6386 ``bash-4.2-r1/``). This variable is comprised of the following:
6387 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
6388
Andrew Geisslerf0343792020-11-18 10:42:21 -06006389 :term:`PIXBUF_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06006390 When inheriting the :ref:`ref-classes-pixbufcache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006391 class, this variable identifies packages that contain the pixbuf
Andrew Geissler517393d2023-01-13 08:55:19 -06006392 loaders used with ``gdk-pixbuf``. By default, the
6393 :ref:`ref-classes-pixbufcache` class assumes that
6394 the loaders are in the recipe's main package (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006395 ``${``\ :term:`PN`\ ``}``). Use this variable if the
6396 loaders you need are in a package other than that main package.
6397
Andrew Geisslerf0343792020-11-18 10:42:21 -06006398 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006399 The name of the resulting package created by the OpenEmbedded build
6400 system.
6401
6402 .. note::
6403
Andrew Geissler09036742021-06-25 14:25:14 -05006404 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006405
Andrew Geissler517393d2023-01-13 08:55:19 -06006406 For example, when the :ref:`ref-classes-debian` class renames the output
6407 package, it does so by setting ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006408
Andrew Geisslerf0343792020-11-18 10:42:21 -06006409 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006410 The path to ``pkg-config`` files for the current build context.
6411 ``pkg-config`` reads this variable from the environment.
6412
Andrew Geisslerf0343792020-11-18 10:42:21 -06006413 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006414 Points to the destination directory for files to be packaged before
6415 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006416 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006417
6418 ${WORKDIR}/package
6419
6420 Do not change this default.
6421
Andrew Geisslerf0343792020-11-18 10:42:21 -06006422 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006423 Points to a shared, global-state directory that holds data generated
6424 during the packaging process. During the packaging process, the
6425 :ref:`ref-tasks-packagedata` task packages data
6426 for each recipe and installs it into this temporary, shared area.
6427 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006428 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006429
6430 ${STAGING_DIR_HOST}/pkgdata
6431
6432 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006433 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006434 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler517393d2023-01-13 08:55:19 -06006435 ":ref:`dev-manual/debugging:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006436 section in the Yocto Project Development Tasks Manual. For more
6437 information on the shared, global-state directory, see
6438 :term:`STAGING_DIR_HOST`.
6439
Andrew Geisslerf0343792020-11-18 10:42:21 -06006440 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006441 Points to the parent directory for files to be packaged after they
6442 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006443 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006444
6445 ${WORKDIR}/packages-split
6446
6447 Under this directory, the build system creates directories for each
6448 package specified in :term:`PACKAGES`. Do not change
6449 this default.
6450
Andrew Geisslerf0343792020-11-18 10:42:21 -06006451 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006452 Points to a temporary work area where the
6453 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05006454 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006455
6456 ${WORKDIR}/pkgdata
6457
6458 Do not change this default.
6459
6460 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05006461 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006462 :term:`PKGDATA_DIR` to make it available globally.
6463
Andrew Geisslerf0343792020-11-18 10:42:21 -06006464 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05006465 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006466 is set to :term:`PE`.
6467
Andrew Geisslerf0343792020-11-18 10:42:21 -06006468 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006469 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05006470 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006471
Andrew Geisslerf0343792020-11-18 10:42:21 -06006472 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006473 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05006474 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006475
Andrew Geisslerf0343792020-11-18 10:42:21 -06006476 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006477 This variable can have two separate functions depending on the
6478 context: a recipe name or a resulting package name.
6479
Andrew Geissler09036742021-06-25 14:25:14 -05006480 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006481 OpenEmbedded build system as input to create a package. The name is
6482 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006483 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006484 will be "expat".
6485
6486 The variable refers to a package name in the context of a file
6487 created or produced by the OpenEmbedded build system.
6488
Andrew Geissler09036742021-06-25 14:25:14 -05006489 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006490 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04006491 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05006492 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006493 and ``lib64-bash``, respectively.
6494
Andrew Geisslerf0343792020-11-18 10:42:21 -06006495 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006496 Specifies a list of functions to call once the OpenEmbedded build
6497 system has created the host part of the SDK. You can specify
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006498 functions separated by spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006499
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006500 POPULATE_SDK_POST_HOST_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006501
6502 If you need to pass the SDK path to a command within a function, you
6503 can use ``${SDK_DIR}``, which points to the parent directory used by
6504 the OpenEmbedded build system when creating SDK output. See the
6505 :term:`SDK_DIR` variable for more information.
6506
Andrew Geisslerf0343792020-11-18 10:42:21 -06006507 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006508 Specifies a list of functions to call once the OpenEmbedded build
6509 system has created the target part of the SDK. You can specify
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006510 functions separated by spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006511
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006512 POPULATE_SDK_POST_TARGET_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006513
6514 If you need to pass the SDK path to a command within a function, you
6515 can use ``${SDK_DIR}``, which points to the parent directory used by
6516 the OpenEmbedded build system when creating SDK output. See the
6517 :term:`SDK_DIR` variable for more information.
6518
Andrew Geisslerf0343792020-11-18 10:42:21 -06006519 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006520 The revision of the recipe. The default value for this variable is
6521 "r0". Subsequent revisions of the recipe conventionally have the
6522 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05006523 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006524
6525 .. note::
6526
Andrew Geissler09036742021-06-25 14:25:14 -05006527 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006528 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06006529 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006530 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06006531 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006532 mechanisms.
6533
Andrew Geissler09036742021-06-25 14:25:14 -05006534 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006535 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05006536 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006537 :term:`PKGR`, helps the package manager distinguish which
6538 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05006539 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
6540 the same :term:`PV` usually means that the packages all install the same
6541 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006542 packaging fixes.
6543
6544 .. note::
6545
Andrew Geissler09036742021-06-25 14:25:14 -05006546 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006547 package contents or metadata.
6548
Andrew Geissler5f350902021-07-23 13:09:54 -04006549 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006550 an automated solution exists. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06006551 ":ref:`dev-manual/packages:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006552 in the Yocto Project Development Tasks Manual for more information.
6553
Andrew Geisslerf0343792020-11-18 10:42:21 -06006554 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006555 If multiple recipes provide the same item, this variable determines
6556 which recipe is preferred and thus provides the item (i.e. the
6557 preferred provider). You should always suffix this variable with the
6558 name of the provided item. And, you should define the variable using
6559 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05006560 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006561
6562 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
6563
6564 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05006565 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006566 the recipe you prefer to provide "virtual/kernel".
6567
Patrick Williams39653562024-03-01 08:54:02 -06006568 Here are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006569
6570 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
6571 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
6572
6573 For more
Andrew Geissler517393d2023-01-13 08:55:19 -06006574 information, see the ":ref:`dev-manual/new-recipe:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006575 section in the Yocto Project Development Tasks Manual.
6576
6577 .. note::
6578
Andrew Geissler09036742021-06-25 14:25:14 -05006579 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006580 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05006581 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006582 desirable since this mechanism is designed to select between mutually
6583 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006584
Andrew Geissler517393d2023-01-13 08:55:19 -06006585 :term:`PREFERRED_PROVIDERS`
6586 See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual.
6587
Andrew Geisslerf0343792020-11-18 10:42:21 -06006588 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006589 If there are multiple versions of a recipe available, this variable
6590 determines which version should be given preference. You must always
6591 suffix the variable with the :term:`PN` you want to select (`python` in
6592 the first example below), and you should specify the :term:`PV`
6593 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006594
Andrew Geissler09036742021-06-25 14:25:14 -05006595 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006596 through the "``%``" character. You can use the character to match any
6597 number of characters, which can be useful when specifying versions
6598 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05006599 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006600
6601 PREFERRED_VERSION_python = "3.4.0"
6602 PREFERRED_VERSION_linux-yocto = "5.0%"
6603
6604 .. note::
6605
6606 The use of the "%" character is limited in that it only works at the end of the
6607 string. You cannot use the wildcard character in any other
6608 location of the string.
6609
6610 The specified version is matched against :term:`PV`, which
6611 does not necessarily match the version part of the recipe's filename.
6612 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05006613 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006614
6615 PV = "1.1+git${SRCPV}"
6616
6617 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05006618 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006619
6620 PREFERRED_VERSION_foo = "1.1+git%"
6621
6622 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05006623 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006624
6625 PREFERRED_VERSION_foo = "git"
6626
Andrew Geissler09036742021-06-25 14:25:14 -05006627 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006628 configuration files in a way that is hard to change. You can use
6629 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05006630 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006631
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006632 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006633
6634 Although not recommended, worst case, you can also use the
6635 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006636 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006637
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006638 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006639
6640 .. note::
6641
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006642 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05006643 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006644
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006645 If a recipe with the specified version is not available, a warning
6646 message will be shown. See :term:`REQUIRED_VERSION` if you want this
6647 to be an error instead.
6648
Andrew Geisslerf0343792020-11-18 10:42:21 -06006649 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006650 Specifies additional paths from which the OpenEmbedded build system
6651 gets source code. When the build system searches for source code, it
6652 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05006653 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006654 source, and then locations specified by
6655 :term:`MIRRORS` in that order.
6656
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006657 The default value for :term:`PREMIRRORS` is defined in the
6658 ``meta/classes-global/mirrors.bbclass`` file in the core metadata layer.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006659
6660 Typically, you could add a specific server for the build system to
6661 attempt before any others by adding something like the following to
6662 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006663 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006664
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006665 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00006666 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6667 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6668 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6669 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006670
6671 These changes cause the
6672 build system to intercept Git, FTP, HTTP, and HTTPS requests and
6673 direct them to the ``http://`` sources mirror. You can use
6674 ``file://`` URLs to point to local directories or network shares as
6675 well.
6676
Andrew Geisslerf0343792020-11-18 10:42:21 -06006677 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006678 Indicates the importance of a package.
6679
Andrew Geissler09036742021-06-25 14:25:14 -05006680 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006681 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05006682 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006683 normally set within recipes.
6684
Andrew Geissler09036742021-06-25 14:25:14 -05006685 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006686 "optional", which is the default.
6687
Andrew Geisslerf0343792020-11-18 10:42:21 -06006688 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006689 Specifies libraries installed within a recipe that should be ignored
6690 by the OpenEmbedded build system's shared library resolver. This
6691 variable is typically used when software being built by a recipe has
6692 its own private versions of a library normally provided by another
6693 recipe. In this case, you would not want the package containing the
6694 private libraries to be set as a dependency on other unrelated
6695 packages that should instead depend on the package providing the
6696 standard version of the library.
6697
6698 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05006699 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006700
6701 PRIVATE_LIBS = "libmozjs.so \
6702 libxpcom.so \
6703 libnspr4.so \
6704 libxul.so \
6705 libmozalloc.so \
6706 libplc4.so \
6707 libplds4.so"
6708
6709 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006710 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006711 section in the Yocto Project Overview and Concepts Manual.
6712
Andrew Geisslerf0343792020-11-18 10:42:21 -06006713 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006714 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05006715 default, a recipe's own :term:`PN` is implicitly already in its
6716 :term:`PROVIDES` list and therefore does not need to mention that it
6717 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006718 aliases are synonyms for the recipe and can be useful for satisfying
6719 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006720 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006721
Andrew Geissler09036742021-06-25 14:25:14 -05006722 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05006723 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006724
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006725 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006726
Andrew Geissler09036742021-06-25 14:25:14 -05006727 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006728 results in the "eudev" recipe also being available as simply "udev".
6729
6730 .. note::
6731
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006732 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
Andrew Geissler517393d2023-01-13 08:55:19 -06006733 to :term:`PROVIDES`, so while using "+=" in the above example may not be
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006734 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006735
6736 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05006737 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006738 virtual target is a name that corresponds to some particular
6739 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05006740 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006741 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05006742 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006743
6744 Conventionally, virtual targets have names on the form
6745 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6746 of the name and has no syntactical significance.
6747
6748 The :term:`PREFERRED_PROVIDER` variable is
6749 used to select which particular recipe provides a virtual target.
6750
6751 .. note::
6752
Patrick Williamsb58112e2024-03-07 11:16:36 -06006753 A corresponding mechanism for virtual runtime dependencies (packages)
6754 exists. However, the mechanism does not depend on any special
6755 functionality beyond ordinary variable assignments. For example,
6756 :term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` refers to the
6757 package of the component that manages the ``/dev`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006758
6759 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006760 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006761
6762 VIRTUAL-RUNTIME_dev_manager = "udev"
6763
6764
Andrew Geisslerf0343792020-11-18 10:42:21 -06006765 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006766 The network based :term:`PR` service host and port.
6767
Andrew Geissler87f5cff2022-09-30 13:13:31 -05006768 The ``conf/templates/default/local.conf.sample.extended`` configuration
6769 file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST`
6770 variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006771
6772 PRSERV_HOST = "localhost:0"
6773
6774 You must
6775 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler517393d2023-01-13 08:55:19 -06006776 service <dev-manual/packages:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006777 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006778
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006779
6780 :term:`PSEUDO_IGNORE_PATHS`
6781 A comma-separated (without spaces) list of path prefixes that should be ignored
6782 by pseudo when monitoring and recording file operations, in order to avoid
6783 problems with files being written to outside of the pseudo context and
6784 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6785 and can include partial directory (or file) names.
6786
6787
Andrew Geisslerf0343792020-11-18 10:42:21 -06006788 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006789 Specifies whether or not :ref:`Package
Andrew Geissler517393d2023-01-13 08:55:19 -06006790 Test <dev-manual/packages:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006791 functionality is enabled when building a recipe. You should not set
6792 this variable directly. Enabling and disabling building Package Tests
6793 at build time should be done by adding "ptest" to (or removing it
6794 from) :term:`DISTRO_FEATURES`.
6795
Andrew Geisslerf0343792020-11-18 10:42:21 -06006796 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006797 The version of the recipe. The version is normally extracted from the
6798 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006799 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6800 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006801 building an unstable (i.e. development) version from a source code
6802 repository (e.g. Git or Subversion).
6803
Andrew Geissler09036742021-06-25 14:25:14 -05006804 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006805
Patrick Williams975a06f2022-10-21 14:42:47 -05006806 :term:`PYPI_PACKAGE`
Andrew Geissler517393d2023-01-13 08:55:19 -06006807 When inheriting the :ref:`ref-classes-pypi` class, specifies the
Patrick Williams975a06f2022-10-21 14:42:47 -05006808 `PyPI <https://pypi.org/>`__ package name to be built. The default value
6809 is set based upon :term:`BPN` (stripping any "python-" or "python3-"
6810 prefix off if present), however for some packages it will need to be set
6811 explicitly if that will not match the package name (e.g. where the
6812 package name has a prefix, underscores, uppercase letters etc.)
6813
Andrew Geisslerf0343792020-11-18 10:42:21 -06006814 :term:`PYTHON_ABI`
Andrew Geissler517393d2023-01-13 08:55:19 -06006815 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
6816 class, denotes the Application Binary Interface (ABI) currently in use
6817 for Python. By default, the ABI is "m". You do not have to set this
6818 variable as the OpenEmbedded build system sets it for you.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006819
6820 The OpenEmbedded build system uses the ABI to construct directory
6821 names used when installing the Python headers and libraries in
6822 sysroot (e.g. ``.../python3.3m/...``).
6823
Patrick Williams03907ee2022-05-01 06:28:52 -05006824 :term:`QA_EMPTY_DIRS`
6825 Specifies a list of directories that are expected to be empty when
6826 packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or
6827 :term:`WARN_QA` these will be checked and an error or warning
6828 (respectively) will be produced.
6829
6830 The default :term:`QA_EMPTY_DIRS` value is set in
6831 :ref:`insane.bbclass <ref-classes-insane>`.
6832
6833 :term:`QA_EMPTY_DIRS_RECOMMENDATION`
6834 Specifies a recommendation for why a directory must be empty,
6835 which will be included in the error message if a specific directory
6836 is found to contain files. Must be overridden with the directory
6837 path to match on.
6838
6839 If no recommendation is specified for a directory, then the default
6840 "but it is expected to be empty" will be used.
6841
6842 An example message shows if files were present in '/dev'::
6843
6844 QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime"
6845
Andrew Geisslerf0343792020-11-18 10:42:21 -06006846 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006847 The minimal command and arguments to run ``ranlib``.
6848
Andrew Geisslerf0343792020-11-18 10:42:21 -06006849 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006850 The list of packages that conflict with packages. Note that packages
6851 will not be installed if conflicting packages are not first removed.
6852
6853 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006854 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006855
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006856 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006857
6858 BitBake, which the OpenEmbedded build system uses, supports
6859 specifying versioned dependencies. Although the syntax varies
6860 depending on the packaging format, BitBake hides these differences
6861 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006862 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006863
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006864 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006865
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006866 For ``operator``, you can specify the following:
6867
6868 - =
6869 - <
6870 - >
6871 - <=
6872 - >=
6873
6874 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006875 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006876
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006877 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006878
Andrew Geisslerf0343792020-11-18 10:42:21 -06006879 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006880 Lists runtime dependencies of a package. These dependencies are other
6881 packages that must be installed in order for the package to function
6882 correctly. As an example, the following assignment declares that the
6883 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006884 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006885
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006886 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006887
6888 The most common types of package
6889 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006890 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006891 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006892 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006893 section in the Yocto Project Overview and Concepts Manual.
6894
Andrew Geissler09036742021-06-25 14:25:14 -05006895 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006896 ``bar`` and ``baz`` will be declared as dependencies inside the
6897 package ``foo`` when it is written out by one of the
Patrick Williams2194f502022-10-16 14:26:09 -05006898 :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006899 Exactly how this is done depends on which package format is used,
6900 which is determined by
6901 :term:`PACKAGE_CLASSES`. When the
6902 corresponding package manager installs the package, it will know to
6903 also install the packages on which it depends.
6904
6905 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006906 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006907 added. This dependency is from the recipe's
6908 :ref:`ref-tasks-build` (not to be confused with
6909 :ref:`ref-tasks-compile`) task to the
Patrick Williams2194f502022-10-16 14:26:09 -05006910 :ref:`do_package_write_* <ref-tasks-package_write_deb>` task of the recipes that build ``bar`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006911 ``baz``.
6912
Andrew Geissler09036742021-06-25 14:25:14 -05006913 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geissler615f2f12022-07-15 14:00:58 -05006914 names of other packages --- they cannot be recipe names. Although
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006915 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006916 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006917 variable. For an example of the default list of packages created from
6918 a recipe, see the :term:`PACKAGES` variable.
6919
Andrew Geissler09036742021-06-25 14:25:14 -05006920 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006921 you should always use the variable in a form with an attached package
6922 name (remember that a single recipe can build multiple packages). For
6923 example, suppose you are building a development package that depends
6924 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006925 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006926
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006927 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006928
6929 In the example,
6930 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006931 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006932 the variable.
6933
6934 .. note::
6935
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006936 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006937 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006938 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006939 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006940 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006941
Andrew Geissler09036742021-06-25 14:25:14 -05006942 The package names you use with :term:`RDEPENDS` must appear as they would
6943 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006944 allows a different name to be used for the final package (e.g. the
Andrew Geissler517393d2023-01-13 08:55:19 -06006945 :ref:`ref-classes-debian` class uses this to rename
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006946 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006947 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006948 independent of the package format used.
6949
6950 BitBake, which the OpenEmbedded build system uses, supports
6951 specifying versioned dependencies. Although the syntax varies
6952 depending on the packaging format, BitBake hides these differences
6953 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006954 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006955
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006956 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006957
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006958 For ``operator``, you can specify the following:
6959
6960 - =
6961 - <
6962 - >
6963 - <=
6964 - >=
6965
6966 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006967
6968 .. note::
6969
Andrew Geissler09036742021-06-25 14:25:14 -05006970 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006971 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006972
6973 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006974 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006975
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006976 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006977
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05006978 For information on build-time dependencies, see the :term:`DEPENDS`
6979 variable. You can also see the
6980 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6981 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
6982 BitBake User Manual for additional information on tasks and dependencies.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006983
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006984 :term:`RECIPE_MAINTAINER`
6985 This variable defines the name and e-mail address of the maintainer of a
6986 recipe. Such information can be used by human users submitted changes,
6987 and by automated tools to send notifications, for example about
6988 vulnerabilities or source updates.
6989
6990 The variable can be defined in a global distribution :oe_git:`maintainers.inc
6991 </openembedded-core/tree/meta/conf/distro/include/maintainers.inc>` file::
6992
6993 meta/conf/distro/include/maintainers.inc:RECIPE_MAINTAINER:pn-sysvinit = "Ross Burton <ross.burton@arm.com>"
6994
6995 It can also be directly defined in a recipe,
6996 for example in the ``libgpiod`` one::
6997
6998 RECIPE_MAINTAINER = "Bartosz Golaszewski <brgl@bgdev.pl>"
6999
Andrew Geissler5199d832021-09-24 16:47:35 -05007000 :term:`RECIPE_NO_UPDATE_REASON`
7001 If a recipe should not be replaced by a more recent upstream version,
7002 putting the reason why in this variable in a recipe allows
7003 ``devtool check-upgrade-status`` command to display it, as explained
7004 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
7005 section.
7006
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007007 :term:`RECIPE_SYSROOT`
7008 This variable points to the directory that holds all files populated from
7009 recipes specified in :term:`DEPENDS`. As the name indicates,
7010 think of this variable as a custom root (``/``) for the recipe that will be
7011 used by the compiler in order to find headers and other files needed to complete
7012 its job.
7013
7014 This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET`
7015 according to the type of the recipe and the build target.
7016
7017 To better understand this variable, consider the following examples:
7018
7019 - For ``#include <header.h>``, ``header.h`` should be in ``"${RECIPE_SYSROOT}/usr/include"``
7020
7021 - For ``-lexample``, ``libexample.so`` should be in ``"${RECIPE_SYSROOT}/lib"``
7022 or other library sysroot directories.
7023
7024 The default value is ``"${WORKDIR}/recipe-sysroot"``.
7025 Do not modify it.
7026
7027 :term:`RECIPE_SYSROOT_NATIVE`
7028 This is similar to :term:`RECIPE_SYSROOT` but the populated files are from
7029 ``-native`` recipes. This allows a recipe built for the target machine to
7030 use ``native`` tools.
7031
7032 This variable is related to :term:`STAGING_DIR_NATIVE`.
7033
7034 The default value is ``"${WORKDIR}/recipe-sysroot-native"``.
7035 Do not modify it.
7036
Andrew Geissler517393d2023-01-13 08:55:19 -06007037 :term:`REPODIR`
7038 See :term:`bitbake:REPODIR` in the BitBake manual.
7039
Andrew Geisslerf0343792020-11-18 10:42:21 -06007040 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geissler517393d2023-01-13 08:55:19 -06007041 When inheriting the :ref:`ref-classes-features_check`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007042 class, this variable identifies distribution features that must exist
7043 in the current configuration in order for the OpenEmbedded build
7044 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05007045 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
7046 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06007047 the recipe will be skipped, and if the build system attempts to build
7048 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007049
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007050 :term:`REQUIRED_VERSION`
7051 If there are multiple versions of a recipe available, this variable
7052 determines which version should be given preference.
7053 :term:`REQUIRED_VERSION` works in exactly the same manner as
7054 :term:`PREFERRED_VERSION`, except that if the specified version is not
7055 available then an error message is shown and the build fails
7056 immediately.
7057
7058 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
7059 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
7060
Andrew Geisslerf0343792020-11-18 10:42:21 -06007061 :term:`RM_WORK_EXCLUDE`
Andrew Geissler517393d2023-01-13 08:55:19 -06007062 With :ref:`ref-classes-rm-work` enabled, this variable
7063 specifies a list of recipes whose work directories should not be removed.
7064 See the ":ref:`ref-classes-rm-work`" section for more details.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007065
Andrew Geisslerf0343792020-11-18 10:42:21 -06007066 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007067 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007068 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007069
7070 ROOT_HOME ??= "/home/root"
7071
7072 .. note::
7073
7074 This default value is likely used because some embedded solutions
7075 prefer to have a read-only root filesystem and prefer to keep
7076 writeable data in one place.
7077
7078 You can override the default by setting the variable in any layer or
7079 in the ``local.conf`` file. Because the default is set using a "weak"
7080 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007081 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007082
7083 ROOT_HOME = "/root"
7084 ROOT_HOME ?= "/root"
7085
7086 These
7087 override examples use ``/root``, which is probably the most commonly
7088 used override.
7089
Andrew Geisslerf0343792020-11-18 10:42:21 -06007090 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007091 Indicates a filesystem image to include as the root filesystem.
7092
Andrew Geissler09036742021-06-25 14:25:14 -05007093 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geissler517393d2023-01-13 08:55:19 -06007094 :ref:`ref-classes-image-live` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007095
Andrew Geisslerf0343792020-11-18 10:42:21 -06007096 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007097 Specifies a list of functions to call after the OpenEmbedded build
7098 system has installed packages. You can specify functions separated by
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007099 spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007100
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007101 ROOTFS_POSTINSTALL_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007102
7103 If you need to pass the root filesystem path to a command within a
7104 function, you can use ``${IMAGE_ROOTFS}``, which points to the
7105 directory that becomes the root filesystem image. See the
7106 :term:`IMAGE_ROOTFS` variable for more
7107 information.
7108
Andrew Geisslerf0343792020-11-18 10:42:21 -06007109 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007110 Specifies a list of functions to call once the OpenEmbedded build
7111 system has created the root filesystem. You can specify functions
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007112 separated by spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007113
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007114 ROOTFS_POSTPROCESS_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007115
7116 If you need to pass the root filesystem path to a command within a
7117 function, you can use ``${IMAGE_ROOTFS}``, which points to the
7118 directory that becomes the root filesystem image. See the
7119 :term:`IMAGE_ROOTFS` variable for more
7120 information.
7121
Andrew Geisslerf0343792020-11-18 10:42:21 -06007122 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007123 Specifies a list of functions to call after the OpenEmbedded build
7124 system has removed unnecessary packages. When runtime package
7125 management is disabled in the image, several packages are removed
7126 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007127 You can specify functions separated by spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007128
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007129 ROOTFS_POSTUNINSTALL_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007130
7131 If you need to pass the root filesystem path to a command within a
7132 function, you can use ``${IMAGE_ROOTFS}``, which points to the
7133 directory that becomes the root filesystem image. See the
7134 :term:`IMAGE_ROOTFS` variable for more
7135 information.
7136
Andrew Geisslerf0343792020-11-18 10:42:21 -06007137 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007138 Specifies a list of functions to call before the OpenEmbedded build
7139 system has created the root filesystem. You can specify functions
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007140 separated by spaces::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007141
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007142 ROOTFS_PREPROCESS_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007143
7144 If you need to pass the root filesystem path to a command within a
7145 function, you can use ``${IMAGE_ROOTFS}``, which points to the
7146 directory that becomes the root filesystem image. See the
7147 :term:`IMAGE_ROOTFS` variable for more
7148 information.
7149
Andrew Geisslerf0343792020-11-18 10:42:21 -06007150 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007151 A list of package name aliases that a package also provides. These
7152 aliases are useful for satisfying runtime dependencies of other
7153 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05007154 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007155
7156 .. note::
7157
Andrew Geissler09036742021-06-25 14:25:14 -05007158 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007159
7160 As with all package-controlling variables, you must always use the
7161 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05007162 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007163
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007164 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007165
Andrew Geisslerf0343792020-11-18 10:42:21 -06007166 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007167 A list of packages that extends the usability of a package being
7168 built. The package being built does not depend on this list of
7169 packages in order to successfully build, but rather uses them for
7170 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05007171 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007172
Andrew Geissler09036742021-06-25 14:25:14 -05007173 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007174 list of packages when installing the built package. However, you can
7175 prevent listed packages from being installed by using the
7176 :term:`BAD_RECOMMENDATIONS`,
7177 :term:`NO_RECOMMENDATIONS`, and
7178 :term:`PACKAGE_EXCLUDE` variables.
7179
Andrew Geissler09036742021-06-25 14:25:14 -05007180 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007181 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007182 through the :term:`PACKAGES` or
7183 :term:`PACKAGES_DYNAMIC` variables or the
7184 :term:`RPROVIDES` variable, or an error will occur
7185 during the build. If such a recipe does exist and the package is not
7186 produced, the build continues without error.
7187
Andrew Geissler09036742021-06-25 14:25:14 -05007188 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007189 you should always attach an override to the variable to specify the
7190 particular package whose usability is being extended. For example,
7191 suppose you are building a development package that is extended to
7192 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007193 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007194
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007195 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007196
7197 In the
7198 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05007199 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007200 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007201
7202 BitBake, which the OpenEmbedded build system uses, supports
7203 specifying versioned recommends. Although the syntax varies depending
7204 on the packaging format, BitBake hides these differences from you.
7205 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05007206 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007207
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007208 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007209
7210 For ``operator``, you can specify the following:
7211
7212 - =
7213 - <
7214 - >
7215 - <=
7216 - >=
7217
7218 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05007219 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007220
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007221 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007222
Andrew Geisslerf0343792020-11-18 10:42:21 -06007223 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007224 A list of packages replaced by a package. The package manager uses
7225 this variable to determine which package should be installed to
7226 replace other package(s) during an upgrade. In order to also have the
7227 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05007228 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007229
7230 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05007231 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007232
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007233 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007234
7235 BitBake, which the OpenEmbedded build system uses, supports
7236 specifying versioned replacements. Although the syntax varies
7237 depending on the packaging format, BitBake hides these differences
7238 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05007239 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007240
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007241 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007242
7243 For ``operator``, you can specify the following:
7244
7245 - =
7246 - <
7247 - >
7248 - <=
7249 - >=
7250
7251 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05007252 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007253
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007254 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007255
Andrew Geisslerf0343792020-11-18 10:42:21 -06007256 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007257 A list of additional packages that you can suggest for installation
7258 by the package manager at the time a package is installed. Not all
7259 package managers support this functionality.
7260
7261 As with all package-controlling variables, you must always use this
7262 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05007263 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007264
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007265 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007266
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007267 :term:`RUST_CHANNEL`
7268 Specifies which version of Rust to build - "stable", "beta" or "nightly".
7269 The default value is "stable". Set this at your own risk, as values other
7270 than "stable" are not guaranteed to work at a given time.
7271
Andrew Geisslerf0343792020-11-18 10:42:21 -06007272 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007273 The location in the :term:`Build Directory` where
7274 unpacked recipe source code resides. By default, this directory is
7275 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
7276 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
7277 version. If the source tarball extracts the code to a directory named
7278 anything other than ``${BPN}-${PV}``, or if the source code is
7279 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05007280 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007281 to find the unpacked source.
7282
7283 As an example, assume a :term:`Source Directory`
Patrick Williams2390b1b2022-11-03 13:47:49 -05007284 top-level folder named ``poky`` and a default :term:`Build Directory` at
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007285 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05007286 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007287
7288 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
7289
7290 The unpacked source code resides in the ``db-5.1.19`` folder.
7291
7292 This next example assumes a Git repository. By default, Git
7293 repositories are cloned to ``${WORKDIR}/git`` during
7294 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05007295 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007296 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007297
Andrew Geissler9aee5002022-03-30 16:27:02 +00007298 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007299 S = "${WORKDIR}/git"
7300
Andrew Geisslerf0343792020-11-18 10:42:21 -06007301 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007302 Specifies a list of command-line utilities that should be checked for
7303 during the initial sanity checking process when running BitBake. If
7304 any of the utilities are not installed on the build host, then
7305 BitBake immediately exits with an error.
7306
Andrew Geisslerf0343792020-11-18 10:42:21 -06007307 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007308 A list of the host distribution identifiers that the build system has
7309 been tested against. Identifiers consist of the host distributor ID
7310 followed by the release, as reported by the ``lsb_release`` tool or
7311 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05007312 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007313 not empty and the current value of
7314 :term:`NATIVELSBSTRING` does not appear in the
7315 list, then the build system reports a warning that indicates the
7316 current host distribution has not been tested as a build host.
7317
Andrew Geisslerf0343792020-11-18 10:42:21 -06007318 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007319 The target architecture for the SDK. Typically, you do not directly
7320 set this variable. Instead, use :term:`SDKMACHINE`.
7321
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007322 :term:`SDK_ARCHIVE_TYPE`
7323 Specifies the type of archive to create for the SDK. Valid values:
7324
7325 - ``tar.xz`` (default)
7326 - ``zip``
7327
7328 Only one archive type can be specified.
7329
Patrick Williams975a06f2022-10-21 14:42:47 -05007330 :term:`SDK_BUILDINFO_FILE`
Andrew Geissler517393d2023-01-13 08:55:19 -06007331 When using the :ref:`ref-classes-image-buildinfo` class,
Patrick Williams975a06f2022-10-21 14:42:47 -05007332 specifies the file in the SDK to write the build information into. The
7333 default value is "``/buildinfo``".
7334
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007335 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05007336 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Patrick Williams2390b1b2022-11-03 13:47:49 -05007337 "1" and a ``conf/templateconf.cfg`` file exists in the :term:`Build Directory`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007338 (:term:`TOPDIR`) then this will be copied into the SDK.
7339
Andrew Geisslerf0343792020-11-18 10:42:21 -06007340 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007341 The directory set up and used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06007342 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which the
7343 SDK is deployed. The :ref:`populate_sdk_base <ref-classes-populate-sdk>`
7344 class defines :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007345
7346 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
7347
Andrew Geisslerf0343792020-11-18 10:42:21 -06007348 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007349 The parent directory used by the OpenEmbedded build system when
7350 creating SDK output. The
7351 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05007352 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007353
7354 SDK_DIR = "${WORKDIR}/sdk"
7355
7356 .. note::
7357
Andrew Geissler09036742021-06-25 14:25:14 -05007358 The :term:`SDK_DIR` directory is a temporary directory as it is part of
7359 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007360
Andrew Geisslerf0343792020-11-18 10:42:21 -06007361 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007362 Controls whether or not shared state artifacts are copied into the
7363 extensible SDK. The default value of "full" copies all of the
7364 required shared state artifacts into the extensible SDK. The value
7365 "minimal" leaves these artifacts out of the SDK.
7366
7367 .. note::
7368
7369 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007370 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
7371 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007372
Andrew Geisslerf0343792020-11-18 10:42:21 -06007373 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007374 The manifest file for the host part of the SDK. This file lists all
7375 the installed packages that make up the host part of the SDK. The
7376 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007377 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007378
7379 packagename packagearch version
7380
7381 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05007382 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007383
7384 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
7385
7386 The location is derived using the :term:`SDK_DEPLOY` and
7387 :term:`TOOLCHAIN_OUTPUTNAME` variables.
7388
Andrew Geisslerf0343792020-11-18 10:42:21 -06007389 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007390 When set to "1", specifies to include the packagedata for all recipes
7391 in the "world" target in the extensible SDK. Including this data
7392 allows the ``devtool search`` command to find these recipes in search
7393 results, as well as allows the ``devtool add`` command to map
7394 dependencies more effectively.
7395
7396 .. note::
7397
Andrew Geissler09036742021-06-25 14:25:14 -05007398 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007399 variable significantly increases build time because all of world
7400 needs to be built. Enabling the variable also slightly increases
7401 the size of the extensible SDK.
7402
Andrew Geisslerf0343792020-11-18 10:42:21 -06007403 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007404 When set to "1", specifies to include the toolchain in the extensible
7405 SDK. Including the toolchain is useful particularly when
7406 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
7407 the SDK reasonably small but you still want to provide a usable
7408 toolchain. For example, suppose you want to use the toolchain from an
7409 IDE or from other tools and you do not want to perform additional
7410 steps to install the toolchain.
7411
Andrew Geissler09036742021-06-25 14:25:14 -05007412 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
7413 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
7414 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007415
Andrew Geisslerf0343792020-11-18 10:42:21 -06007416 :term:`SDK_NAME`
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007417 The base name for SDK output files. The default value (as set in
7418 ``meta-poky/conf/distro/poky.conf``) is derived from the
7419 :term:`DISTRO`,
7420 :term:`TCLIBC`,
7421 :term:`SDKMACHINE`,
7422 :term:`IMAGE_BASENAME`,
7423 :term:`TUNE_PKGARCH`, and
7424 :term:`MACHINE` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007425
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007426 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007427
Andrew Geisslerf0343792020-11-18 10:42:21 -06007428 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007429 Specifies the operating system for which the SDK will be built. The
7430 default value is the value of :term:`BUILD_OS`.
7431
Andrew Geisslerf0343792020-11-18 10:42:21 -06007432 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007433 The location used by the OpenEmbedded build system when creating SDK
7434 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05007435 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007436
7437 SDK_DIR = "${WORKDIR}/sdk"
7438 SDK_OUTPUT = "${SDK_DIR}/image"
7439 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
7440
7441 .. note::
7442
Andrew Geissler09036742021-06-25 14:25:14 -05007443 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007444 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
7445 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007446
Andrew Geisslerf0343792020-11-18 10:42:21 -06007447 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007448 Specifies a list of architectures compatible with the SDK machine.
7449 This variable is set automatically and should not normally be
7450 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05007451 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007452 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
7453
Andrew Geisslerf0343792020-11-18 10:42:21 -06007454 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007455 Specifies a list of functions to call once the OpenEmbedded build
7456 system creates the SDK. You can specify functions separated by
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007457 spaces:
7458
7459 SDK_POSTPROCESS_COMMAND += "function"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007460
7461 If you need to pass an SDK path to a command within a function, you
7462 can use ``${SDK_DIR}``, which points to the parent directory used by
7463 the OpenEmbedded build system when creating SDK output. See the
7464 :term:`SDK_DIR` variable for more information.
7465
Andrew Geisslerf0343792020-11-18 10:42:21 -06007466 :term:`SDK_PREFIX`
Andrew Geissler517393d2023-01-13 08:55:19 -06007467 The toolchain binary prefix used for
7468 :ref:`ref-classes-nativesdk` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05007469 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007470 :term:`TARGET_PREFIX` when building
7471 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
7472
Andrew Geisslerf0343792020-11-18 10:42:21 -06007473 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007474 A list of shared state tasks added to the extensible SDK. By default,
7475 the following tasks are added:
7476
Patrick Williams2194f502022-10-16 14:26:09 -05007477 - :ref:`ref-tasks-populate_lic`
7478 - :ref:`ref-tasks-package_qa`
7479 - :ref:`ref-tasks-populate_sysroot`
7480 - :ref:`ref-tasks-deploy`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007481
7482 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05007483 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007484 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05007485 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007486 tasks that are needed in order to build
7487 :term:`SDK_TARGETS`).
7488
Andrew Geisslerf0343792020-11-18 10:42:21 -06007489 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007490 Specifies the system, including the architecture and the operating
7491 system, for which the SDK will be built.
7492
7493 The OpenEmbedded build system automatically sets this variable based
7494 on :term:`SDK_ARCH`,
7495 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05007496 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007497 variable yourself.
7498
Andrew Geisslerf0343792020-11-18 10:42:21 -06007499 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007500 The manifest file for the target part of the SDK. This file lists all
7501 the installed packages that make up the target part of the SDK. The
7502 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007503 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007504
7505 packagename packagearch version
7506
7507 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05007508 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007509
7510 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
7511
7512 The location is derived using the :term:`SDK_DEPLOY` and
7513 :term:`TOOLCHAIN_OUTPUTNAME` variables.
7514
Andrew Geisslerf0343792020-11-18 10:42:21 -06007515 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007516 A list of targets to install from shared state as part of the
7517 standard or extensible SDK installation. The default value is "${PN}"
7518 (i.e. the image from which the SDK is built).
7519
Andrew Geissler09036742021-06-25 14:25:14 -05007520 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007521 would not be changed.
7522
Andrew Geisslerf0343792020-11-18 10:42:21 -06007523 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007524 The title to be printed when running the SDK installer. By default,
7525 this title is based on the :term:`DISTRO_NAME` or
7526 :term:`DISTRO` variable and is set in the
7527 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007528 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007529
7530 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
7531
7532 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05007533 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007534
7535 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007536 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007537 section in the Yocto Project Application Development and the
7538 Extensible Software Development Kit (eSDK) manual.
7539
Patrick Williams975a06f2022-10-21 14:42:47 -05007540 :term:`SDK_TOOLCHAIN_LANGS`
7541 Specifies programming languages to support in the SDK, as a
7542 space-separated list. Currently supported items are ``rust`` and ``go``.
7543
Andrew Geisslerf0343792020-11-18 10:42:21 -06007544 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007545 An optional URL for an update server for the extensible SDK. If set,
7546 the value is used as the default update server when running
7547 ``devtool sdk-update`` within the extensible SDK.
7548
Andrew Geisslerf0343792020-11-18 10:42:21 -06007549 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007550 Specifies the name of the SDK vendor.
7551
Andrew Geisslerf0343792020-11-18 10:42:21 -06007552 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007553 Specifies the version of the SDK. The Poky distribution configuration file
7554 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05007555 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007556
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007557 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007558
7559 For additional information, see the
7560 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007561 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007562
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007563 :term:`SDK_ZIP_OPTIONS`
7564 Specifies extra options to pass to the ``zip`` command when zipping the SDK
7565 (i.e. when :term:`SDK_ARCHIVE_TYPE` is set to "zip"). The default value is
7566 "-y".
7567
Andrew Geisslerf0343792020-11-18 10:42:21 -06007568 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007569 The default installation directory for the Extensible SDK. By
7570 default, this directory is based on the :term:`DISTRO`
7571 variable and is set in the
7572 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007573 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007574
7575 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
7576
7577 For the
Andrew Geissler09036742021-06-25 14:25:14 -05007578 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007579
7580 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007581 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007582 section in the Yocto Project Application Development and the
7583 Extensible Software Development Kit (eSDK) manual.
7584
Andrew Geisslerf0343792020-11-18 10:42:21 -06007585 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05007586 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007587 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007588
7589 $ bitbake -c populate_sdk imagename
7590
Andrew Geisslerf0343792020-11-18 10:42:21 -06007591 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00007592 The machine for which the SDK is built. In other words, the SDK is built
7593 such that it runs on the target you specify with the :term:`SDKMACHINE`
7594 value. The value points to a corresponding ``.conf`` file under
7595 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
7596 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
7597 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007598
Andrew Geissler595f6302022-01-24 19:11:47 +00007599 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
7600 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007601
7602 .. note::
7603
Andrew Geissler09036742021-06-25 14:25:14 -05007604 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007605 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00007606 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007607
Andrew Geisslerf0343792020-11-18 10:42:21 -06007608 :term:`SDKPATH`
Patrick Williamsb58112e2024-03-07 11:16:36 -06007609 Defines the path used to collect the SDK components and build the
7610 installer.
7611
7612 :term:`SDKPATHINSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007613 Defines the path offered to the user for installation of the SDK that
7614 is generated by the OpenEmbedded build system. The path appears as
7615 the default location for installing the SDK when you run the SDK's
7616 installation script. You can override the offered path when you run
7617 the script.
7618
Andrew Geisslerf0343792020-11-18 10:42:21 -06007619 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007620 The full path to the sysroot used for cross-compilation within an SDK
7621 as it will be when installed into the default
Patrick Williamsb58112e2024-03-07 11:16:36 -06007622 :term:`SDKPATHINSTALL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007623
Andrew Geisslerf0343792020-11-18 10:42:21 -06007624 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007625 The section in which packages should be categorized. Package
7626 management utilities can make use of this variable.
7627
Andrew Geisslerf0343792020-11-18 10:42:21 -06007628 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007629 Specifies the optimization flags passed to the C compiler when
7630 building for the target. The flags are passed through the default
7631 value of the :term:`TARGET_CFLAGS` variable.
7632
Andrew Geissler09036742021-06-25 14:25:14 -05007633 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007634 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
7635 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007636
Andrew Geisslerf0343792020-11-18 10:42:21 -06007637 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007638 Defines a serial console (TTY) to enable using
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007639 :wikipedia:`getty <Getty_(Unix)>`. Provide a value that specifies the
7640 baud rate followed by the TTY device name separated by a semicolon.
7641 Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007642
7643 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
7644
Andrew Geissler595f6302022-01-24 19:11:47 +00007645 :term:`SETUPTOOLS_BUILD_ARGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06007646 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7647 class, this variable can be used to specify additional arguments to be
7648 passed to ``setup.py build`` in the ``setuptools3_do_compile()`` task.
Andrew Geissler595f6302022-01-24 19:11:47 +00007649
7650 :term:`SETUPTOOLS_INSTALL_ARGS`
Andrew Geissler517393d2023-01-13 08:55:19 -06007651 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7652 class, this variable can be used to specify additional arguments to be
7653 passed to ``setup.py install`` in the ``setuptools3_do_install()`` task.
Andrew Geissler595f6302022-01-24 19:11:47 +00007654
7655 :term:`SETUPTOOLS_SETUP_PATH`
Andrew Geissler517393d2023-01-13 08:55:19 -06007656 When used by recipes that inherit the :ref:`ref-classes-setuptools3`
7657 class, this variable should be used to specify the directory in which
7658 the ``setup.py`` file is located if it is not at the root of the source
7659 tree (as specified by :term:`S`). For example, in a recipe where the
7660 sources are fetched from a Git repository and ``setup.py`` is in a
7661 ``python/pythonmodule`` subdirectory, you would have this::
Andrew Geissler595f6302022-01-24 19:11:47 +00007662
7663 S = "${WORKDIR}/git"
7664 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
7665
Andrew Geisslerf0343792020-11-18 10:42:21 -06007666 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007667 A list of recipe dependencies that should not be used to determine
7668 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007669 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007670
7671 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
7672
7673 In the previous example, ``intone`` depends on ``mplayer2``.
7674
7675 You can use the special token ``"*"`` on the left-hand side of the
7676 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05007677 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007678
7679 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
7680
7681 In the previous example, all recipes except ``quilt-native`` ignore
7682 task signatures from the ``quilt-native`` recipe when determining
7683 their task signatures.
7684
7685 Use of this variable is one mechanism to remove dependencies that
7686 affect task signatures and thus force rebuilds when a recipe changes.
7687
7688 .. note::
7689
7690 If you add an inappropriate dependency for a recipe relationship,
7691 the software might break during runtime if the interface of the
7692 second recipe was changed after the first recipe had been built.
7693
Andrew Geisslerf0343792020-11-18 10:42:21 -06007694 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007695 A list of recipes that are completely stable and will never change.
7696 The ABI for the recipes in the list are presented by output from the
7697 tasks run to build the recipe. Use of this variable is one way to
7698 remove dependencies from one recipe on another that affect task
7699 signatures and thus force rebuilds when the recipe changes.
7700
7701 .. note::
7702
7703 If you add an inappropriate variable to this list, the software
7704 might break at runtime if the interface of the recipe was changed
7705 after the other had been built.
7706
Andrew Geisslerf0343792020-11-18 10:42:21 -06007707 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007708 Specifies the number of bits for the target system CPU. The value
7709 should be either "32" or "64".
7710
Andrew Geisslerf0343792020-11-18 10:42:21 -06007711 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007712 Specifies the endian byte order of the target system. The value
7713 should be either "le" for little-endian or "be" for big-endian.
7714
Andrew Geisslerf0343792020-11-18 10:42:21 -06007715 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007716 Enables removal of all files from the "Provides" section of an RPM
7717 package. Removal of these files is required for packages containing
7718 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
7719
7720 To enable file removal, set the variable to "1" in your
7721 ``conf/local.conf`` configuration file in your:
Patrick Williams2390b1b2022-11-03 13:47:49 -05007722 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007723
7724 SKIP_FILEDEPS = "1"
7725
Andrew Geissler9aee5002022-03-30 16:27:02 +00007726 :term:`SKIP_RECIPE`
7727 Used to prevent the OpenEmbedded build system from building a given
7728 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
7729 and provide a reason, which will be reported when attempting to
7730 build the recipe.
7731
7732 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
7733 variable in your ``local.conf`` file or distribution configuration.
7734 Here is an example which prevents ``myrecipe`` from being built::
7735
7736 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
7737
Andrew Geisslerf0343792020-11-18 10:42:21 -06007738 :term:`SOC_FAMILY`
Patrick Williams520786c2023-06-25 16:20:36 -05007739 A colon-separated list grouping together machines based upon the same
7740 family of SoC (System On Chip). You typically set this variable in a
7741 common ``.inc`` file that you include in the configuration files of all
7742 the machines.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007743
7744 .. note::
7745
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007746 You must include ``conf/machine/include/soc-family.inc`` for this
7747 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007748
Andrew Geisslerf0343792020-11-18 10:42:21 -06007749 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007750 Defines the suffix for shared libraries used on the target platform.
7751 By default, this suffix is ".so.*" for all Linux-based systems and is
7752 defined in the ``meta/conf/bitbake.conf`` configuration file.
7753
7754 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007755 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007756
Andrew Geisslerf0343792020-11-18 10:42:21 -06007757 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007758 Defines the suffix for the development symbolic link (symlink) for
7759 shared libraries on the target platform. By default, this suffix is
7760 ".so" for Linux-based systems and is defined in the
7761 ``meta/conf/bitbake.conf`` configuration file.
7762
7763 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007764 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007765
Andrew Geisslereff27472021-10-29 15:35:00 -05007766 :term:`SOURCE_DATE_EPOCH`
7767 This defines a date expressed in number of seconds since
7768 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
7769 multiple build systems to force a timestamp in built binaries.
7770 Many upstream projects already support this variable.
7771
7772 You will find more details in the `official specifications
7773 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
7774
7775 A value for each recipe is computed from the sources by
7776 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
7777
7778 If a recipe wishes to override the default behavior, it should set its
7779 own :term:`SOURCE_DATE_EPOCH` value::
7780
7781 SOURCE_DATE_EPOCH = "1613559011"
7782
Andrew Geisslerf0343792020-11-18 10:42:21 -06007783 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007784 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05007785 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007786 your ``local.conf`` configuration file ensures the source for all
7787 recipes are fetched regardless of whether or not a recipe is
7788 compatible with the configuration. A recipe is considered
7789 incompatible with the currently configured machine when either or
7790 both the :term:`COMPATIBLE_MACHINE`
7791 variable and :term:`COMPATIBLE_HOST` variables
7792 specify compatibility with a machine other than that of the current
7793 machine or host.
7794
7795 .. note::
7796
Andrew Geissler09036742021-06-25 14:25:14 -05007797 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007798 variable unless you are creating a source mirror. In other words,
7799 do not set the variable during a normal build.
7800
Andrew Geisslerf0343792020-11-18 10:42:21 -06007801 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007802 Defines your own :term:`PREMIRRORS` from which to
7803 first fetch source before attempting to fetch from the upstream
7804 specified in :term:`SRC_URI`.
7805
7806 To use this variable, you must globally inherit the
Andrew Geissler517393d2023-01-13 08:55:19 -06007807 :ref:`ref-classes-own-mirrors` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007808 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007809
7810 INHERIT += "own-mirrors"
7811 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7812
7813 .. note::
7814
Andrew Geissler09036742021-06-25 14:25:14 -05007815 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007816
Patrick Williams7784c422022-11-17 07:29:11 -06007817 :term:`SPDX_ARCHIVE_PACKAGED`
7818 This option allows to add to :term:`SPDX` output compressed archives
7819 of the files in the generated target packages.
7820
7821 Such archives are available in
7822 ``tmp/deploy/spdx/MACHINE/packages/packagename.tar.zst``
7823 under the :term:`Build Directory`.
7824
7825 Enable this option as follows::
7826
7827 SPDX_ARCHIVE_PACKAGED = "1"
7828
7829 According to our tests on release 4.1 "langdale", building
7830 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling this
7831 option multiplied the size of the ``tmp/deploy/spdx`` directory by a
7832 factor of 13 (+1.6 GiB for this image), compared to just using the
Andrew Geissler517393d2023-01-13 08:55:19 -06007833 :ref:`ref-classes-create-spdx` class with no option.
Patrick Williams7784c422022-11-17 07:29:11 -06007834
7835 Note that this option doesn't increase the size of :term:`SPDX`
7836 files in ``tmp/deploy/images/MACHINE``.
7837
7838 :term:`SPDX_ARCHIVE_SOURCES`
7839 This option allows to add to :term:`SPDX` output compressed archives
7840 of the sources for packages installed on the target. It currently
7841 only works when :term:`SPDX_INCLUDE_SOURCES` is set.
7842
7843 This is one way of fulfilling "source code access" license
7844 requirements.
7845
7846 Such source archives are available in
7847 ``tmp/deploy/spdx/MACHINE/recipes/recipe-packagename.tar.zst``
7848 under the :term:`Build Directory`.
7849
7850 Enable this option as follows::
7851
7852 SPDX_INCLUDE_SOURCES = "1"
7853 SPDX_ARCHIVE_SOURCES = "1"
7854
7855 According to our tests on release 4.1 "langdale", building
7856 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7857 these options multiplied the size of the ``tmp/deploy/spdx``
7858 directory by a factor of 11 (+1.4 GiB for this image),
Andrew Geissler517393d2023-01-13 08:55:19 -06007859 compared to just using the :ref:`ref-classes-create-spdx`
Patrick Williams7784c422022-11-17 07:29:11 -06007860 class with no option.
7861
7862 Note that using this option only marginally increases the size
7863 of the :term:`SPDX` output in ``tmp/deploy/images/MACHINE/``
7864 (+ 0.07\% with the tested image), compared to just enabling
7865 :term:`SPDX_INCLUDE_SOURCES`.
7866
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007867 :term:`SPDX_CUSTOM_ANNOTATION_VARS`
7868 This option allows to associate `SPDX annotations
7869 <https://spdx.github.io/spdx-spec/v2.3/annotations/>`__ to a recipe,
7870 using the values of variables in the recipe::
7871
7872 ANNOTATION1 = "First annotation for recipe"
7873 ANNOTATION2 = "Second annotation for recipe"
7874 SPDX_CUSTOM_ANNOTATION_VARS = "ANNOTATION1 ANNOTATION2"
7875
7876 This will add a new block to the recipe ``.sdpx.json`` output::
7877
7878 "annotations": [
7879 {
7880 "annotationDate": "2023-04-18T08:32:12Z",
7881 "annotationType": "OTHER",
7882 "annotator": "Tool: oe-spdx-creator - 1.0",
7883 "comment": "ANNOTATION1=First annotation for recipe"
7884 },
7885 {
7886 "annotationDate": "2023-04-18T08:32:12Z",
7887 "annotationType": "OTHER",
7888 "annotator": "Tool: oe-spdx-creator - 1.0",
7889 "comment": "ANNOTATION2=Second annotation for recipe"
7890 }
7891 ],
7892
Patrick Williams7784c422022-11-17 07:29:11 -06007893 :term:`SPDX_INCLUDE_SOURCES`
7894 This option allows to add a description of the source files used to build
7895 the host tools and the target packages, to the ``spdx.json`` files in
7896 ``tmp/deploy/spdx/MACHINE/recipes/`` under the :term:`Build Directory`.
7897 As a consequence, the ``spdx.json`` files under the ``by-namespace`` and
7898 ``packages`` subdirectories in ``tmp/deploy/spdx/MACHINE`` are also
7899 modified to include references to such source file descriptions.
7900
7901 Enable this option as follows::
7902
7903 SPDX_INCLUDE_SOURCES = "1"
7904
7905 According to our tests on release 4.1 "langdale", building
7906 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7907 this option multiplied the total size of the ``tmp/deploy/spdx``
7908 directory by a factor of 3 (+291 MiB for this image),
7909 and the size of the ``IMAGE-MACHINE.spdx.tar.zst`` in
7910 ``tmp/deploy/images/MACHINE`` by a factor of 130 (+15 MiB for this
Andrew Geissler517393d2023-01-13 08:55:19 -06007911 image), compared to just using the :ref:`ref-classes-create-spdx` class
7912 with no option.
Patrick Williams7784c422022-11-17 07:29:11 -06007913
7914 :term:`SPDX_PRETTY`
7915 This option makes the SPDX output more human-readable, using
7916 identation and newlines, instead of the default output in a
7917 single line::
7918
7919 SPDX_PRETTY = "1"
7920
7921 The generated SPDX files are approximately 20% bigger, but
7922 this option is recommended if you want to inspect the SPDX
7923 output files with a text editor.
7924
Andrew Geisslerf0343792020-11-18 10:42:21 -06007925 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007926 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007927 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007928 mappings, see the ``meta/conf/licenses.conf`` file.
7929
7930 For additional information, see the :term:`LICENSE`
7931 variable.
7932
Andrew Geisslerf0343792020-11-18 10:42:21 -06007933 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007934 A list of prefixes for :term:`PN` used by the OpenEmbedded
7935 build system to create variants of recipes or packages. The list
7936 specifies the prefixes to strip off during certain circumstances such
7937 as the generation of the :term:`BPN` variable.
7938
Andrew Geisslerf0343792020-11-18 10:42:21 -06007939 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007940 The file type for the Secondary Program Loader (SPL). Some devices
7941 use an SPL from which to boot (e.g. the BeagleBone development
7942 board). For such cases, you can declare the file type of the SPL
7943 binary in the ``u-boot.inc`` include file, which is used in the
7944 U-Boot recipe.
7945
7946 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007947 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007948
7949 # Some versions of u-boot build an SPL (Second Program Loader) image that
7950 # should be packaged along with the u-boot binary as well as placed in the
7951 # deploy directory. For those versions they can set the following variables
7952 # to allow packaging the SPL.
7953 SPL_BINARY ?= ""
7954 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7955 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7956 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7957
Andrew Geissler09036742021-06-25 14:25:14 -05007958 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007959 various ``SPL_*`` variables used by the OpenEmbedded build system.
7960
7961 See the BeagleBone machine configuration example in the
Andrew Geissler517393d2023-01-13 08:55:19 -06007962 ":ref:`dev-manual/layers:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007963 section in the Yocto Project Board Support Package Developer's Guide
7964 for additional information.
7965
Patrick Williamsb542dec2023-06-09 01:26:37 -05007966 :term:`SPL_MKIMAGE_DTCOPTS`
7967 Options for the device tree compiler passed to ``mkimage -D`` feature
7968 while creating a FIT image with the :ref:`ref-classes-uboot-sign`
7969 class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the
7970 :ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option
7971 to ``mkimage``.
7972
7973 The default value is set to "" by the :ref:`ref-classes-uboot-config`
7974 class.
7975
7976 :term:`SPL_SIGN_ENABLE`
7977 Enable signing of the U-Boot FIT image. The default value is "0".
7978 This variable is used by the :ref:`ref-classes-uboot-sign` class.
7979
7980 :term:`SPL_SIGN_KEYDIR`
7981 Location of the directory containing the RSA key and certificate used for
7982 signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign`
7983 class.
7984
7985 :term:`SPL_SIGN_KEYNAME`
7986 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
7987 for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR`
7988 directory. If we have for example a ``dev.key`` key and a ``dev.crt``
7989 certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will
7990 have to set :term:`SPL_SIGN_KEYNAME` to ``dev``.
7991
7992 :term:`SPLASH`
7993 This variable, used by the :ref:`ref-classes-image` class, allows
7994 to choose splashscreen applications. Set it to the names of packages
7995 for such applications to use. This variable is set by default to
7996 ``psplash``.
7997
7998 :term:`SPLASH_IMAGES`
7999 This variable, used by the ``psplash`` recipe, allows to customize
8000 the default splashscreen image.
8001
8002 Specified images in PNG format are converted to ``.h`` files by the recipe,
8003 and are included in the ``psplash`` binary, so you won't find them in
8004 the root filesystem.
8005
8006 To make such a change, it is recommended to customize the
8007 ``psplash`` recipe in a custom layer. Here is an example structure for
8008 an ``ACME`` board::
8009
8010 meta-acme/recipes-core/psplash
8011 ├── files
8012 │   └── logo-acme.png
8013 └── psplash_%.bbappend
8014
8015 And here are the contents of the ``psplash_%.bbappend`` file in
8016 this example::
8017
8018 SPLASH_IMAGES = "file://logo-acme.png;outsuffix=default"
8019 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
8020
8021 You could even add specific configuration options for ``psplash``,
8022 for example::
8023
8024 EXTRA_OECONF += "--disable-startup-msg --enable-img-fullscreen"
8025
8026 For information on append files, see the
8027 ":ref:`dev-manual/layers:appending other layers metadata with your layer`"
8028 section.
8029
Andrew Geissler517393d2023-01-13 08:55:19 -06008030 :term:`SRCREV_FORMAT`
8031 See :term:`bitbake:SRCREV_FORMAT` in the BitBake manual.
8032
Andrew Geisslerf0343792020-11-18 10:42:21 -06008033 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008034
Andrew Geissler595f6302022-01-24 19:11:47 +00008035 See the BitBake manual for the initial description for this variable:
8036 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008037
Andrew Geissler595f6302022-01-24 19:11:47 +00008038 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008039
Andrew Geissler595f6302022-01-24 19:11:47 +00008040 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008041
Andrew Geissler615f2f12022-07-15 14:00:58 -05008042 - ``apply`` --- whether to apply the patch or not. The default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008043 action is to apply the patch.
8044
Andrew Geissler615f2f12022-07-15 14:00:58 -05008045 - ``striplevel`` --- which striplevel to use when applying the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008046 patch. The default level is 1.
8047
Andrew Geissler615f2f12022-07-15 14:00:58 -05008048 - ``patchdir`` --- specifies the directory in which the patch should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008049 be applied. The default is ``${``\ :term:`S`\ ``}``.
8050
8051 Here are options specific to recipes building code from a revision
8052 control system:
8053
Andrew Geissler615f2f12022-07-15 14:00:58 -05008054 - ``mindate`` --- apply the patch only if
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008055 :term:`SRCDATE` is equal to or greater than
8056 ``mindate``.
8057
Andrew Geissler615f2f12022-07-15 14:00:58 -05008058 - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008059 than ``maxdate``.
8060
Andrew Geissler615f2f12022-07-15 14:00:58 -05008061 - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008062 greater than ``minrev``.
8063
Andrew Geissler615f2f12022-07-15 14:00:58 -05008064 - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008065 than ``maxrev``.
8066
Andrew Geissler615f2f12022-07-15 14:00:58 -05008067 - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008068 ``rev``.
8069
Andrew Geissler615f2f12022-07-15 14:00:58 -05008070 - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008071 ``rev``.
8072
Andrew Geissler595f6302022-01-24 19:11:47 +00008073 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008074
Andrew Geissler595f6302022-01-24 19:11:47 +00008075 If you want the build system to pick up files specified through
8076 a :term:`SRC_URI` statement from your append file, you need to be
8077 sure to extend the :term:`FILESPATH` variable by also using the
8078 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008079
Andrew Geisslerf0343792020-11-18 10:42:21 -06008080 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008081 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04008082 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05008083 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008084 variable to "0" disables this behavior.
8085
Andrew Geisslerf0343792020-11-18 10:42:21 -06008086 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008087 The date of the source code used to build the package. This variable
8088 applies only if the source was fetched from a Source Code Manager
8089 (SCM).
8090
Andrew Geisslerf0343792020-11-18 10:42:21 -06008091 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008092 Returns the version string of the current package. This string is
8093 used to help define the value of :term:`PV`.
8094
Andrew Geissler09036742021-06-25 14:25:14 -05008095 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008096 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008097 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008098
8099 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
8100
Andrew Geissler09036742021-06-25 14:25:14 -05008101 Recipes that need to define :term:`PV` do so with the help of the
8102 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008103 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05008104 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008105
8106 PV = "0.12-git${SRCPV}"
8107
Andrew Geisslerf0343792020-11-18 10:42:21 -06008108 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008109 The revision of the source code used to build the package. This
8110 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
8111 that if you want to build a fixed revision and you want to avoid
8112 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05008113 your recipe, you should specify a :term:`SRCREV` that is a full revision
Patrick Williams520786c2023-06-25 16:20:36 -05008114 identifier (e.g. the full SHA hash in git) and not just a tag.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008115
8116 .. note::
8117
8118 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05008119 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008120 description and the
Andrew Geissler517393d2023-01-13 08:55:19 -06008121 ":ref:`dev-manual/packages:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008122 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008123
Andrew Geissler09036742021-06-25 14:25:14 -05008124 :term:`SRCTREECOVEREDTASKS`
8125 A list of tasks that are typically not relevant (and therefore skipped)
Andrew Geissler517393d2023-01-13 08:55:19 -06008126 when building using the :ref:`ref-classes-externalsrc`
Andrew Geissler09036742021-06-25 14:25:14 -05008127 class. The default value as set in that class file is the set of tasks
8128 that are rarely needed when using external source::
8129
8130 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
8131
8132 The notable exception is when processing external kernel source as
Andrew Geissler517393d2023-01-13 08:55:19 -06008133 defined in the :ref:`ref-classes-kernel-yocto` class file (formatted for
8134 aesthetics)::
Andrew Geissler09036742021-06-25 14:25:14 -05008135
8136 SRCTREECOVEREDTASKS += "\
8137 do_validate_branches \
8138 do_kernel_configcheck \
8139 do_kernel_checkout \
8140 do_fetch \
8141 do_unpack \
8142 do_patch \
8143 "
8144
8145 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
8146 variables for more information.
8147
Andrew Geisslerf0343792020-11-18 10:42:21 -06008148 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008149 The directory for the shared state cache.
8150
Andrew Geissler615f2f12022-07-15 14:00:58 -05008151 :term:`SSTATE_EXCLUDEDEPS_SYSROOT`
8152 This variable allows to specify indirect dependencies to exclude
8153 from sysroots, for example to avoid the situations when a dependency on
8154 any ``-native`` recipe will pull in all dependencies of that recipe
8155 in the recipe sysroot. This behaviour might not always be wanted,
8156 for example when that ``-native`` recipe depends on build tools
8157 that are not relevant for the current recipe.
8158
8159 This way, irrelevant dependencies are ignored, which could have
8160 prevented the reuse of prebuilt artifacts stored in the Shared
8161 State Cache.
8162
Andrew Geissler517393d2023-01-13 08:55:19 -06008163 :term:`SSTATE_EXCLUDEDEPS_SYSROOT` is evaluated as two regular
Andrew Geissler615f2f12022-07-15 14:00:58 -05008164 expressions of recipe and dependency to ignore. An example
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06008165 is the rule in :oe_git:`meta/conf/layer.conf </openembedded-core/tree/meta/conf/layer.conf>`::
Andrew Geissler615f2f12022-07-15 14:00:58 -05008166
8167 # Nothing needs to depend on libc-initial
8168 # base-passwd/shadow-sysroot don't need their dependencies
8169 SSTATE_EXCLUDEDEPS_SYSROOT += "\
8170 .*->.*-initial.* \
8171 .*(base-passwd|shadow-sysroot)->.* \
8172 "
8173
8174 The ``->`` substring represents the dependency between
8175 the two regular expressions.
8176
Andrew Geisslerf0343792020-11-18 10:42:21 -06008177 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008178 If set to "1", allows fetches from mirrors that are specified in
8179 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05008180 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
8181 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
8182 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008183 your shared state cache, but you want to disable any other fetching
8184 from the network.
8185
Andrew Geisslerf0343792020-11-18 10:42:21 -06008186 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008187 Configures the OpenEmbedded build system to search other mirror
8188 locations for prebuilt cache data objects before building out the
8189 data. This variable works like fetcher :term:`MIRRORS`
8190 and :term:`PREMIRRORS` and points to the cache
8191 locations to check for the shared state (sstate) objects.
8192
8193 You can specify a filesystem directory or a remote URL such as HTTP
8194 or FTP. The locations you specify need to contain the shared state
8195 cache (sstate-cache) results from previous builds. The sstate-cache
8196 you point to can also be from builds on other machines.
8197
8198 When pointing to sstate build artifacts on another machine that uses
8199 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05008200 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008201 paths to server paths. The paths need to take into account
Andrew Geissler517393d2023-01-13 08:55:19 -06008202 :term:`NATIVELSBSTRING` set by the :ref:`ref-classes-uninative` class.
8203 For example, the following maps the local search path ``universal-4.9``
8204 to the server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008205
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008206 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008207
8208 If a mirror uses the same structure as
8209 :term:`SSTATE_DIR`, you need to add "PATH" at the
8210 end as shown in the examples below. The build system substitutes the
Andrew Geissler517393d2023-01-13 08:55:19 -06008211 correct path within the directory structure::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008212
8213 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008214 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008215 file://.* file:///some-local-dir/sstate/PATH"
8216
Patrick Williamsac13d5f2023-11-24 18:59:46 -06008217 The Yocto Project actually shares the cache data objects built by its
8218 autobuilder::
8219
8220 SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
8221
8222 As such binary artifacts are built for the generic QEMU machines
8223 supported by the various Poky releases, they are less likely to be
8224 reusable in real projects building binaries optimized for a specific
8225 CPU family.
8226
Andrew Geisslerf0343792020-11-18 10:42:21 -06008227 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008228 Controls the list of files the OpenEmbedded build system scans for
8229 hardcoded installation paths. The variable uses a space-separated
8230 list of filenames (not paths) with standard wildcard characters
8231 allowed.
8232
8233 During a build, the OpenEmbedded build system creates a shared state
8234 (sstate) object during the first stage of preparing the sysroots.
8235 That object is scanned for hardcoded paths for original installation
8236 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05008237 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
8238 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008239 than the variable being comprehensively set. The
Andrew Geissler517393d2023-01-13 08:55:19 -06008240 :ref:`ref-classes-sstate` class specifies the default list of files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008241
Andrew Geissler517393d2023-01-13 08:55:19 -06008242 For details on the process, see the :ref:`ref-classes-staging` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008243
Andrew Geisslerf0343792020-11-18 10:42:21 -06008244 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008245 Specifies the path to the ``/lib`` subdirectory of the sysroot
8246 directory for the build host.
8247
Andrew Geisslerf0343792020-11-18 10:42:21 -06008248 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008249 Specifies the path to the ``/lib`` subdirectory of the sysroot
8250 directory for the target for which the current recipe is being built
8251 (:term:`STAGING_DIR_HOST`).
8252
Andrew Geisslerf0343792020-11-18 10:42:21 -06008253 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008254 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
8255 directory for the target for which the current recipe is being built
8256 (:term:`STAGING_DIR_HOST`).
8257
Andrew Geisslerf0343792020-11-18 10:42:21 -06008258 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008259 Specifies the path to the directory containing binary configuration
8260 scripts. These scripts provide configuration information for other
8261 software that wants to make use of libraries or include files
8262 provided by the software associated with the script.
8263
8264 .. note::
8265
8266 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008267 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
8268 library to which you are linking, it is recommended you use
8269 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008270
Andrew Geisslerf0343792020-11-18 10:42:21 -06008271 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008272 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
8273 directory for the build host.
8274
Andrew Geisslerf0343792020-11-18 10:42:21 -06008275 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008276 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
8277 directory for the target for which the current recipe is being built
8278 (:term:`STAGING_DIR_HOST`).
8279
Andrew Geisslerf0343792020-11-18 10:42:21 -06008280 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008281 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
8282 directory for the build host.
8283
Andrew Geisslerf0343792020-11-18 10:42:21 -06008284 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008285 Helps construct the ``recipe-sysroots`` directory, which is used
8286 during packaging.
8287
8288 For information on how staging for recipe-specific sysroots occurs,
8289 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06008290 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008291 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008292 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008293 section in the Yocto Project Overview and Concepts Manual, and the
8294 :term:`SYSROOT_DIRS` variable.
8295
8296 .. note::
8297
Andrew Geissler09036742021-06-25 14:25:14 -05008298 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008299 directory because the OpenEmbedded build system manages the
8300 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008301 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008302 task and then the OpenEmbedded build system will stage a subset of
8303 those files into the sysroot.
8304
Andrew Geisslerf0343792020-11-18 10:42:21 -06008305 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008306 Specifies the path to the sysroot directory for the system on which
8307 the component is built to run (the system that hosts the component).
8308 For most recipes, this sysroot is the one in which that recipe's
8309 :ref:`ref-tasks-populate_sysroot` task copies
8310 files. Exceptions include ``-native`` recipes, where the
Patrick Williams2194f502022-10-16 14:26:09 -05008311 :ref:`ref-tasks-populate_sysroot` task instead uses
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008312 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05008313 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008314 have the following values:
8315
8316 - For recipes building for the target machine, the value is
8317 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
8318
8319 - For native recipes building for the build host, the value is empty
8320 given the assumption that when building for the build host, the
8321 build host's own directories should be used.
8322
8323 .. note::
8324
8325 ``-native`` recipes are not installed into host paths like such
8326 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04008327 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008328 standard build environment variables such as
8329 :term:`CPPFLAGS` and
8330 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05008331 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008332 headers using, for example, GCC's ``-isystem`` option.
8333
8334 Thus, the emphasis is that the ``STAGING_DIR*`` variables
8335 should be viewed as input variables by tasks such as
8336 :ref:`ref-tasks-configure`,
8337 :ref:`ref-tasks-compile`, and
8338 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05008339 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008340 for ``-native`` recipes, as they make use of host headers and
8341 libraries.
8342
Patrick Williamsac13d5f2023-11-24 18:59:46 -06008343 Check :term:`RECIPE_SYSROOT` and :term:`RECIPE_SYSROOT_NATIVE`.
8344
Andrew Geisslerf0343792020-11-18 10:42:21 -06008345 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008346 Specifies the path to the sysroot directory used when building
8347 components that run on the build host itself.
8348
Patrick Williamsac13d5f2023-11-24 18:59:46 -06008349 The default value is ``"${RECIPE_SYSROOT_NATIVE}"``,
8350 check :term:`RECIPE_SYSROOT_NATIVE`.
8351
Andrew Geisslerf0343792020-11-18 10:42:21 -06008352 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008353 Specifies the path to the sysroot used for the system for which the
8354 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05008355 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008356 :term:`STAGING_DIR_HOST`.
8357
Andrew Geissler517393d2023-01-13 08:55:19 -06008358 Some recipes build binaries that can run on the target system but those
8359 binaries in turn generate code for another different system (e.g.
8360 :ref:`ref-classes-cross-canadian` recipes). Using terminology from GNU,
8361 the primary system is referred to as the "HOST" and the secondary, or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008362 different, system is referred to as the "TARGET". Thus, the binaries
8363 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05008364 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
8365 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008366 sysroot used for the "TARGET" system.
8367
Andrew Geisslerf0343792020-11-18 10:42:21 -06008368 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008369 Specifies the path to the ``/etc`` subdirectory of the sysroot
8370 directory for the build host.
8371
Andrew Geisslerf0343792020-11-18 10:42:21 -06008372 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008373 Specifies the path to the ``/usr`` subdirectory of the sysroot
8374 directory for the target for which the current recipe is being built
8375 (:term:`STAGING_DIR_HOST`).
8376
Andrew Geisslerf0343792020-11-18 10:42:21 -06008377 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008378 Specifies the path to the ``/usr/include`` subdirectory of the
8379 sysroot directory for the target for which the current recipe being
8380 built (:term:`STAGING_DIR_HOST`).
8381
Andrew Geisslerf0343792020-11-18 10:42:21 -06008382 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008383 Specifies the path to the ``/usr/include`` subdirectory of the
8384 sysroot directory for the build host.
8385
Andrew Geisslerf0343792020-11-18 10:42:21 -06008386 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008387 Points to the directory containing the kernel build artifacts.
8388 Recipes building software that needs to access kernel build artifacts
8389 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05008390 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008391 after the kernel has been built.
8392
Andrew Geisslerf0343792020-11-18 10:42:21 -06008393 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008394 The directory with kernel headers that are required to build
8395 out-of-tree modules.
8396
Andrew Geisslerf0343792020-11-18 10:42:21 -06008397 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008398 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
8399 directory for the target for which the current recipe is being built
8400 (:term:`STAGING_DIR_HOST`).
8401
Andrew Geisslerf0343792020-11-18 10:42:21 -06008402 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008403 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
8404 directory for the build host.
8405
Andrew Geisslerf0343792020-11-18 10:42:21 -06008406 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008407 Specifies the base path used to create recipe stamp files. The path
8408 to an actual stamp file is constructed by evaluating this string and
8409 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05008410 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008411 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008412
8413 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
8414
8415 For information on how BitBake uses stamp files to determine if a
8416 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008417 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008418 section in the Yocto Project Overview and Concepts Manual.
8419
8420 See :term:`STAMPS_DIR`,
8421 :term:`MULTIMACH_TARGET_SYS`,
8422 :term:`PN`, :term:`EXTENDPE`,
8423 :term:`PV`, and :term:`PR` for related variable
8424 information.
8425
Andrew Geissler517393d2023-01-13 08:55:19 -06008426 :term:`STAMPCLEAN`
8427 See :term:`bitbake:STAMPCLEAN` in the BitBake manual.
8428
Andrew Geisslerf0343792020-11-18 10:42:21 -06008429 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008430 Specifies the base directory in which the OpenEmbedded build system
8431 places stamps. The default directory is ``${TMPDIR}/stamps``.
8432
Andrew Geisslerf0343792020-11-18 10:42:21 -06008433 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008434 The minimal command and arguments to run ``strip``, which is used to
8435 strip symbols.
8436
Andrew Geisslerf0343792020-11-18 10:42:21 -06008437 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008438 The short (72 characters or less) summary of the binary package for
8439 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05008440 :term:`SUMMARY` is used to define the
8441 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008442 not set in the recipe.
8443
Andrew Geisslerf0343792020-11-18 10:42:21 -06008444 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008445 The directory in which files checked out of a Subversion system are
8446 stored.
8447
Andrew Geisslerf0343792020-11-18 10:42:21 -06008448 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008449 Specifies the kernel boot default console. If you want to use a
8450 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008451 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008452
8453 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
8454
Andrew Geissler517393d2023-01-13 08:55:19 -06008455 The :ref:`ref-classes-syslinux` class initially sets
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008456 this variable to null but then checks for a value later.
8457
Andrew Geisslerf0343792020-11-18 10:42:21 -06008458 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008459 Lists additional options to add to the syslinux file. You need to set
8460 this variable in your recipe. If you want to list multiple options,
8461 separate the options with a semicolon character (``;``).
8462
Andrew Geissler517393d2023-01-13 08:55:19 -06008463 The :ref:`ref-classes-syslinux` class uses this variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008464 to create a set of options.
8465
Andrew Geisslerf0343792020-11-18 10:42:21 -06008466 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008467 Specifies the alternate serial port or turns it off. To turn off
8468 serial, set this variable to an empty string in your recipe. The
8469 variable's default value is set in the
Andrew Geissler517393d2023-01-13 08:55:19 -06008470 :ref:`ref-classes-syslinux` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008471
8472 SYSLINUX_SERIAL ?= "0 115200"
8473
8474 The class checks for and uses the variable as needed.
8475
Andrew Geisslerf0343792020-11-18 10:42:21 -06008476 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008477 Specifies the alternate console=tty... kernel boot argument. The
Andrew Geissler517393d2023-01-13 08:55:19 -06008478 variable's default value is set in the :ref:`ref-classes-syslinux`
8479 class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008480
8481 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
8482
8483 The class checks for and uses the variable as needed.
8484
Andrew Geisslerf0343792020-11-18 10:42:21 -06008485 :term:`SYSLINUX_SPLASH`
8486 An ``.LSS`` file used as the background for the VGA boot menu when
8487 you use the boot menu. You need to set this variable in your recipe.
8488
Andrew Geissler517393d2023-01-13 08:55:19 -06008489 The :ref:`ref-classes-syslinux` class checks for this
Andrew Geisslerf0343792020-11-18 10:42:21 -06008490 variable and if found, the OpenEmbedded build system installs the
8491 splash screen.
8492
8493 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008494 Points to the temporary directory under the work directory (default
8495 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
8496 where the files populated into the sysroot are assembled during the
8497 :ref:`ref-tasks-populate_sysroot` task.
8498
Andrew Geisslerf0343792020-11-18 10:42:21 -06008499 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008500 Directories that are staged into the sysroot by the
8501 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05008502 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008503
8504 SYSROOT_DIRS = " \
8505 ${includedir} \
8506 ${libdir} \
8507 ${base_libdir} \
8508 ${nonarch_base_libdir} \
8509 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05008510 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008511 "
8512
Andrew Geissler9aee5002022-03-30 16:27:02 +00008513 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008514 Directories that are not staged into the sysroot by the
8515 :ref:`ref-tasks-populate_sysroot` task. You
8516 can use this variable to exclude certain subdirectories of
8517 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05008518 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008519
Andrew Geissler9aee5002022-03-30 16:27:02 +00008520 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008521 ${mandir} \
8522 ${docdir} \
8523 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05008524 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008525 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05008526 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008527 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05008528 ${datadir}/gtk-doc/html \
8529 ${datadir}/installed-tests \
8530 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008531 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05008532 ${datadir}/terminfo \
8533 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008534 "
8535
Patrick Williamsac13d5f2023-11-24 18:59:46 -06008536 Consider the following example in which you need to manipulate this variable.
8537 Assume you have a recipe ``A`` that provides a shared library ``.so.*`` that is
8538 installed into a custom folder other than "``${libdir}``"
8539 or "``${base_libdir}``", let's say "``/opt/lib``".
8540
8541 .. note::
8542
8543 This is not a recommended way to deal with shared libraries, but this
8544 is just to show the usefulness of setting :term:`SYSROOT_DIRS`.
8545
8546 When a recipe ``B`` :term:`DEPENDS` on ``A``, it means what is in
8547 :term:`SYSROOT_DIRS` will be copied from :term:`D` of the recipe ``B``
8548 into ``B``'s :term:`SYSROOT_DESTDIR` that is "``${WORKDIR}/sysroot-destdir``".
8549
8550 Now, since ``/opt/lib`` is not in :term:`SYSROOT_DIRS`, it will never be copied to
8551 ``A``'s :term:`RECIPE_SYSROOT`, which is "``${WORKDIR}/recipe-sysroot``". So,
8552 the linking process will fail.
8553
8554 To fix this, you need to add ``/opt/lib`` to :term:`SYSROOT_DIRS`::
8555
8556 SYSROOT_DIRS:append = " /opt/lib"
8557
8558 .. note::
8559 Even after setting ``/opt/lib`` to :term:`SYSROOT_DIRS`, the linking process will still fail
8560 because the linker does not know that location, since :term:`TARGET_LDFLAGS`
8561 doesn't contain it (if your recipe is for the target). Therefore, so you should add::
8562
8563 TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib"
8564
Andrew Geisslerf0343792020-11-18 10:42:21 -06008565 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008566 Extra directories staged into the sysroot by the
8567 :ref:`ref-tasks-populate_sysroot` task for
8568 ``-native`` recipes, in addition to those specified in
8569 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05008570 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008571
8572 SYSROOT_DIRS_NATIVE = " \
8573 ${bindir} \
8574 ${sbindir} \
8575 ${base_bindir} \
8576 ${base_sbindir} \
8577 ${libexecdir} \
8578 ${sysconfdir} \
8579 ${localstatedir} \
8580 "
8581
8582 .. note::
8583
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008584 Programs built by ``-native`` recipes run directly from the sysroot
8585 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
8586 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008587
Andrew Geisslerf0343792020-11-18 10:42:21 -06008588 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008589 A list of functions to execute after files are staged into the
8590 sysroot. These functions are usually used to apply additional
8591 processing on the staged files, or to stage additional files.
8592
Andrew Geisslerf0343792020-11-18 10:42:21 -06008593 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geissler517393d2023-01-13 08:55:19 -06008594 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008595 this variable specifies whether the specified service in
8596 :term:`SYSTEMD_SERVICE` should start
8597 automatically or not. By default, the service is enabled to
8598 automatically start at boot time. The default setting is in the
Andrew Geissler517393d2023-01-13 08:55:19 -06008599 :ref:`ref-classes-systemd` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008600
8601 SYSTEMD_AUTO_ENABLE ??= "enable"
8602
8603 You can disable the service by setting the variable to "disable".
8604
Andrew Geisslerf0343792020-11-18 10:42:21 -06008605 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008606 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008607 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008608 configuration file that should be used. By default, the
Andrew Geissler517393d2023-01-13 08:55:19 -06008609 :ref:`ref-classes-systemd-boot` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008610 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008611
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05008612 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008613
8614 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008615 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008616
Andrew Geisslerf0343792020-11-18 10:42:21 -06008617 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008618 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008619 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008620 list of entry files (``*.conf``) to install that contain one boot
Andrew Geissler517393d2023-01-13 08:55:19 -06008621 entry per file. By default, the :ref:`ref-classes-systemd-boot` class
8622 sets the :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008623
8624 SYSTEMD_BOOT_ENTRIES ?= ""
8625
8626 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008627 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008628
Andrew Geisslerf0343792020-11-18 10:42:21 -06008629 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008630 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05008631 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008632 boot menu timeout in seconds. By default, the
Andrew Geissler517393d2023-01-13 08:55:19 -06008633 :ref:`ref-classes-systemd-boot` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008634 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008635
8636 SYSTEMD_BOOT_TIMEOUT ?= "10"
8637
8638 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008639 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008640
Andrew Geissler615f2f12022-07-15 14:00:58 -05008641 :term:`SYSTEMD_DEFAULT_TARGET`
8642
8643 This variable allows to set the default unit that systemd starts at bootup.
8644 Usually, this is either ``multi-user.target`` or ``graphical.target``.
8645 This works by creating a ``default.target`` symbolic link to the chosen systemd
8646 target file.
8647
8648 See `systemd's documentation
8649 <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__
8650 for details.
8651
Patrick Williams2390b1b2022-11-03 13:47:49 -05008652 For example, this variable is used in the :oe_git:`core-image-minimal-xfce.bb
8653 </meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>`
Andrew Geissler615f2f12022-07-15 14:00:58 -05008654 recipe::
8655
8656 SYSTEMD_DEFAULT_TARGET = "graphical.target"
8657
Andrew Geisslerf0343792020-11-18 10:42:21 -06008658 :term:`SYSTEMD_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06008659 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008660 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05008661 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008662 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05008663 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008664
8665 SYSTEMD_PACKAGES ?= "${PN}"
8666
8667 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05008668 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008669 the build system can find the systemd unit files.
8670
Andrew Geisslerf0343792020-11-18 10:42:21 -06008671 :term:`SYSTEMD_SERVICE`
Andrew Geissler517393d2023-01-13 08:55:19 -06008672 When inheriting the :ref:`ref-classes-systemd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008673 this variable specifies the systemd service name for a package.
8674
Andrew Geissler615f2f12022-07-15 14:00:58 -05008675 Multiple services can be specified, each one separated by a space.
8676
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008677 When you specify this file in your recipe, use a package name
8678 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008679 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008680
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008681 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008682
Andrew Geissler615f2f12022-07-15 14:00:58 -05008683 The package overrides that can be specified are directly related to the value of
Andrew Geissler517393d2023-01-13 08:55:19 -06008684 :term:`SYSTEMD_PACKAGES`. Overrides not included in :term:`SYSTEMD_PACKAGES`
Andrew Geissler615f2f12022-07-15 14:00:58 -05008685 will be silently ignored.
8686
Andrew Geisslerf0343792020-11-18 10:42:21 -06008687 :term:`SYSVINIT_ENABLED_GETTYS`
Patrick Williams8e7b46e2023-05-01 14:19:06 -05008688 When using :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008689 specifies a space-separated list of the virtual terminals that should
Patrick Williams8e7b46e2023-05-01 14:19:06 -05008690 run a :wikipedia:`getty <Getty_(Unix)>` (allowing login), assuming
8691 :term:`USE_VT` is not set to "0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008692
Andrew Geissler09036742021-06-25 14:25:14 -05008693 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008694 run a getty on the first virtual terminal).
8695
Andrew Geisslerf0343792020-11-18 10:42:21 -06008696 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008697 This variable points to a directory were BitBake places temporary
8698 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008699 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008700
8701 T = "${WORKDIR}/temp"
8702
8703 The :term:`WORKDIR` is the directory into which
8704 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
8705 file sets this variable.
8706
Andrew Geissler09036742021-06-25 14:25:14 -05008707 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008708 :term:`TMPDIR` variable, which points to the root of
8709 the directory tree where BitBake places the output of an entire
8710 build.
8711
Andrew Geisslerf0343792020-11-18 10:42:21 -06008712 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008713 The target machine's architecture. The OpenEmbedded build system
8714 supports many architectures. Here is an example list of architectures
8715 supported. This list is by no means complete as the architecture is
8716 configurable:
8717
8718 - arm
8719 - i586
8720 - x86_64
8721 - powerpc
8722 - powerpc64
8723 - mips
8724 - mipsel
8725
8726 For additional information on machine architectures, see the
8727 :term:`TUNE_ARCH` variable.
8728
Andrew Geisslerf0343792020-11-18 10:42:21 -06008729 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008730 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05008731 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008732 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05008733 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008734
8735 TARGET_AS_ARCH = "${TUNE_ASARGS}"
8736
Andrew Geisslerf0343792020-11-18 10:42:21 -06008737 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008738 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05008739 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008740 :term:`TUNE_CCARGS` by default.
8741
8742 .. note::
8743
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008744 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05008745 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
8746 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008747
Andrew Geisslerf0343792020-11-18 10:42:21 -06008748 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008749 This is a specific kernel compiler flag for a CPU or Application
8750 Binary Interface (ABI) tune. The flag is used rarely and only for
8751 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05008752 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008753 variable allows the kernel (and associated modules) to use a
8754 different configuration. See the
8755 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
8756 :term:`Source Directory` for an example.
8757
Andrew Geisslerf0343792020-11-18 10:42:21 -06008758 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008759 Specifies the flags to pass to the C compiler when building for the
8760 target. When building in the target context,
8761 :term:`CFLAGS` is set to the value of this variable by
8762 default.
8763
Andrew Geissler09036742021-06-25 14:25:14 -05008764 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
8765 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008766 executables built using the SDK also have the flags applied.
8767
Andrew Geisslerf0343792020-11-18 10:42:21 -06008768 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008769 Specifies the flags to pass to the C pre-processor (i.e. to both the
8770 C and the C++ compilers) when building for the target. When building
8771 in the target context, :term:`CPPFLAGS` is set to the
8772 value of this variable by default.
8773
8774 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008775 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008776 value so that executables built using the SDK also have the flags
8777 applied.
8778
Andrew Geisslerf0343792020-11-18 10:42:21 -06008779 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008780 Specifies the flags to pass to the C++ compiler when building for the
8781 target. When building in the target context,
8782 :term:`CXXFLAGS` is set to the value of this variable
8783 by default.
8784
8785 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008786 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008787 value so that executables built using the SDK also have the flags
8788 applied.
8789
Andrew Geisslerf0343792020-11-18 10:42:21 -06008790 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008791 Specifies the method for handling FPU code. For FPU-less targets,
8792 which include most ARM CPUs, the variable must be set to "soft". If
8793 not, the kernel emulation gets used, which results in a performance
8794 penalty.
8795
Andrew Geisslerf0343792020-11-18 10:42:21 -06008796 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008797 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05008798 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008799 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05008800 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008801
8802 TARGET_LD_ARCH = "${TUNE_LDARGS}"
8803
Andrew Geisslerf0343792020-11-18 10:42:21 -06008804 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008805 Specifies the flags to pass to the linker when building for the
8806 target. When building in the target context,
8807 :term:`LDFLAGS` is set to the value of this variable
8808 by default.
8809
8810 Additionally, the SDK's environment setup script sets the
8811 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05008812 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008813 have the flags applied.
8814
Andrew Geisslerf0343792020-11-18 10:42:21 -06008815 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008816 Specifies the target's operating system. The variable can be set to
8817 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008818 for musl libc. For ARM/EABI targets, the possible values are
8819 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008820
Andrew Geisslerf0343792020-11-18 10:42:21 -06008821 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008822 Specifies the prefix used for the toolchain binary target tools.
8823
8824 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04008825 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008826
8827 - For recipes building for the target machine, the value is
8828 "${:term:`TARGET_SYS`}-".
8829
8830 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04008831 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008832
Andrew Geissler517393d2023-01-13 08:55:19 -06008833 - For native SDK recipes (:ref:`ref-classes-nativesdk`),
8834 the build system sets the variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008835
Andrew Geisslerf0343792020-11-18 10:42:21 -06008836 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008837 Specifies the system, including the architecture and the operating
8838 system, for which the build is occurring in the context of the
8839 current recipe.
8840
8841 The OpenEmbedded build system automatically sets this variable based
8842 on :term:`TARGET_ARCH`,
8843 :term:`TARGET_VENDOR`, and
8844 :term:`TARGET_OS` variables.
8845
8846 .. note::
8847
Andrew Geissler09036742021-06-25 14:25:14 -05008848 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008849
8850 Consider these two examples:
8851
8852 - Given a native recipe on a 32-bit, x86 machine running Linux, the
8853 value is "i686-linux".
8854
8855 - Given a recipe being built for a little-endian, MIPS target
8856 running Linux, the value might be "mipsel-linux".
8857
Andrew Geisslerf0343792020-11-18 10:42:21 -06008858 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008859 Specifies the name of the target vendor.
8860
Andrew Geisslerf0343792020-11-18 10:42:21 -06008861 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008862 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008863 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008864
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008865 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008866
Andrew Geisslerf0343792020-11-18 10:42:21 -06008867 :term:`TCLIBCAPPEND`
Patrick Williams2390b1b2022-11-03 13:47:49 -05008868 Specifies a suffix to be appended onto the :term:`TMPDIR` value. The
8869 suffix identifies the ``libc`` variant for building. When you are
8870 building for multiple variants with the same :term:`Build Directory`,
8871 this mechanism ensures that output for different ``libc`` variants is
8872 kept separate to avoid potential conflicts.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008873
8874 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04008875 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008876 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05008877 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008878 in no suffix being applied.
8879
Andrew Geisslerf0343792020-11-18 10:42:21 -06008880 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05008881 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008882 characteristics of the generated packages and images by telling the
8883 OpenEmbedded build system which toolchain profile to use. By default,
8884 the OpenEmbedded build system builds its own internal toolchain. The
8885 variable's default value is "default", which uses that internal
8886 toolchain.
8887
8888 .. note::
8889
Andrew Geissler09036742021-06-25 14:25:14 -05008890 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008891 responsibility to ensure that the toolchain is compatible with the
8892 default toolchain. Using older or newer versions of these
Andrew Geissler517393d2023-01-13 08:55:19 -06008893 components might cause build problems. See
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06008894 :doc:`Release Information </migration-guides/index>` for your
Andrew Geissler517393d2023-01-13 08:55:19 -06008895 version of the Yocto Project, to find the specific components with
8896 which the toolchain must be compatible.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008897
Andrew Geissler09036742021-06-25 14:25:14 -05008898 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008899 which controls the variant of the GNU standard C library (``libc``)
8900 used during the build process: ``glibc`` or ``musl``.
8901
8902 With additional layers, it is possible to use a pre-compiled external
8903 toolchain. One example is the Sourcery G++ Toolchain. The support for
8904 this toolchain resides in the separate Mentor Graphics
8905 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008906 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008907
8908 The layer's ``README`` file contains information on how to use the
Andrew Geissler517393d2023-01-13 08:55:19 -06008909 Sourcery G++ Toolchain as an external toolchain. You will have to
8910 add the layer to your ``bblayers.conf`` file and then set the
8911 :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file to
8912 the location of the toolchain.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008913
8914 The fundamentals used for this example apply to any external
8915 toolchain. You can use ``meta-sourcery`` as a template for adding
8916 support for other external toolchains.
8917
Andrew Geissler517393d2023-01-13 08:55:19 -06008918 In addition to toolchain configuration, you will also need a
8919 corresponding toolchain recipe file. This recipe file needs to package
8920 up any pre-built objects in the toolchain such as ``libgcc``,
8921 ``libstdcc++``, any locales, and ``libc``.
8922
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008923 :term:`TC_CXX_RUNTIME`
8924 Specifies the C/C++ STL and runtime variant to use during
8925 the build process. Default value is 'gnu'
8926
8927 You can select "gnu", "llvm", or "android".
8928
Andrew Geisslerd5838332022-05-27 11:33:10 -05008929 :term:`TEMPLATECONF`
8930 Specifies the directory used by the build system to find templates
8931 from which to build the ``bblayers.conf`` and ``local.conf`` files.
8932 Use this variable if you wish to customize such files, and the default
8933 BitBake targets shown when sourcing the ``oe-init-build-env`` script.
8934
8935 For details, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008936 :ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory`
Andrew Geisslerd5838332022-05-27 11:33:10 -05008937 section in the Yocto Project Development Tasks manual.
8938
8939 .. note::
8940
8941 You must set this variable in the external environment in order
8942 for it to work.
8943
Andrew Geisslerf0343792020-11-18 10:42:21 -06008944 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008945 The location the OpenEmbedded build system uses to export tests when
8946 the :term:`TEST_EXPORT_ONLY` variable is set
8947 to "1".
8948
Andrew Geissler09036742021-06-25 14:25:14 -05008949 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008950 ``"${TMPDIR}/testimage/${PN}"``.
8951
Andrew Geisslerf0343792020-11-18 10:42:21 -06008952 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008953 Specifies to export the tests only. Set this variable to "1" if you
8954 do not want to run the tests but you want them to be exported in a
8955 manner that you to run them outside of the build system.
8956
Andrew Geisslerf0343792020-11-18 10:42:21 -06008957 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008958 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05008959 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008960
8961 .. note::
8962
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008963 Actual test results reside in the task log (``log.do_testimage``),
8964 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008965
Andrew Geisslerf0343792020-11-18 10:42:21 -06008966 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008967 For automated hardware testing, specifies the command to use to
8968 control the power of the target machine under test. Typically, this
8969 command would point to a script that performs the appropriate action
8970 (e.g. interacting with a web-enabled power strip). The specified
8971 command should expect to receive as the last argument "off", "on" or
8972 "cycle" specifying to power off, on, or cycle (power off and then
8973 power on) the device, respectively.
8974
Andrew Geisslerf0343792020-11-18 10:42:21 -06008975 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008976 For automated hardware testing, specifies additional arguments to
8977 pass through to the command specified in
8978 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008979 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008980 wish, for example, to separate the machine-specific and
8981 non-machine-specific parts of the arguments.
8982
Andrew Geisslerf0343792020-11-18 10:42:21 -06008983 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008984 The time in seconds allowed for an image to boot before automated
8985 runtime tests begin to run against an image. The default timeout
8986 period to allow the boot process to reach the login prompt is 500
8987 seconds. You can specify a different value in the ``local.conf``
8988 file.
8989
8990 For more information on testing images, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06008991 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008992 section in the Yocto Project Development Tasks Manual.
8993
Andrew Geisslerf0343792020-11-18 10:42:21 -06008994 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008995 For automated hardware testing, specifies the command to use to
8996 connect to the serial console of the target machine under test. This
8997 command simply needs to connect to the serial console and forward
8998 that connection to standard input and output as any normal terminal
8999 program does.
9000
9001 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05009002 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009003
9004 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
9005
Andrew Geisslerf0343792020-11-18 10:42:21 -06009006 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009007 For automated hardware testing, specifies additional arguments to
9008 pass through to the command specified in
9009 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05009010 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009011 wish, for example, to separate the machine-specific and
9012 non-machine-specific parts of the command.
9013
Andrew Geisslerf0343792020-11-18 10:42:21 -06009014 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009015 The IP address of the build machine (host machine). This IP address
9016 is usually automatically detected. However, if detection fails, this
9017 variable needs to be set to the IP address of the build machine (i.e.
9018 where the build is taking place).
9019
9020 .. note::
9021
Andrew Geissler09036742021-06-25 14:25:14 -05009022 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009023 tests such as the "dnf" test suite, which needs to download packages
9024 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009025
Andrew Geisslerf0343792020-11-18 10:42:21 -06009026 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009027 An ordered list of tests (modules) to run against an image when
9028 performing automated runtime testing.
9029
9030 The OpenEmbedded build system provides a core set of tests that can
9031 be used against images.
9032
9033 .. note::
9034
9035 Currently, there is only support for running these tests under
9036 QEMU.
9037
9038 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05009039 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05009040 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009041
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009042 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009043
9044 Alternatively, you can
9045 provide the "auto" option to have all applicable tests run against
Andrew Geissler517393d2023-01-13 08:55:19 -06009046 the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009047
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009048 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009049
9050 Using this option causes the
9051 build system to automatically run tests that are applicable to the
9052 image. Tests that are not applicable are skipped.
9053
9054 The order in which tests are run is important. Tests that depend on
9055 another test must appear later in the list than the test on which
9056 they depend. For example, if you append the list of tests with two
9057 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05009058 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009059
9060 TEST_SUITES = "test_A test_B"
9061
9062 For more information on testing images, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009063 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009064 section in the Yocto Project Development Tasks Manual.
9065
Andrew Geisslerf0343792020-11-18 10:42:21 -06009066 :term:`TEST_TARGET`
9067 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05009068 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06009069
9070 TEST_TARGET = "qemu"
9071
9072 A target controller is a class that defines how an image gets
9073 deployed on a target and how a target is started. A layer can extend
9074 the controllers by adding a module in the layer's
9075 ``/lib/oeqa/controllers`` directory and by inheriting the
9076 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05009077 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009078
Andrew Geissler5f350902021-07-23 13:09:54 -04009079 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06009080
9081 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler517393d2023-01-13 08:55:19 -06009082 ":ref:`dev-manual/runtime-testing:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06009083 in the Yocto Project Development Tasks Manual for more
9084 information.
9085
9086 - *"simpleremote":* Runs the tests on target hardware that is
9087 already up and running. The hardware can be on the network or it
9088 can be a device running an image on QEMU. You must also set
9089 :term:`TEST_TARGET_IP` when you use
9090 "simpleremote".
9091
9092 .. note::
9093
9094 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009095 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009096
9097 For information on running tests on hardware, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009098 ":ref:`dev-manual/runtime-testing:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06009099 section in the Yocto Project Development Tasks Manual.
9100
9101 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05009102 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06009103 variable has no effect when :term:`TEST_TARGET` is
9104 set to "qemu".
9105
9106 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05009107 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06009108
9109 TEST_TARGET_IP = "192.168.1.4:2201"
9110
9111 Specifying a port is
9112 useful when SSH is started on a non-standard port or in cases when
9113 your hardware under test is behind a firewall or network that is not
9114 directly accessible from your host and you need to do port address
9115 translation.
9116
9117 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009118 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05009119 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009120 any image that successfully builds to automatically boot under QEMU.
9121 Using the variable also adds in dependencies so that any SDK for
9122 which testing is requested is automatically built first.
9123
9124 These tests are written in Python making use of the ``unittest``
9125 module, and the majority of them run commands on the target system
9126 over ``ssh``. You can set this variable to "1" in your ``local.conf``
9127 file in the :term:`Build Directory` to have the
9128 OpenEmbedded build system automatically run these tests after an
9129 image successfully builds:
9130
9131 TESTIMAGE_AUTO = "1"
9132
9133 For more information
9134 on enabling, running, and writing these tests, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009135 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009136 section in the Yocto Project Development Tasks Manual and the
Patrick Williams975a06f2022-10-21 14:42:47 -05009137 ":ref:`ref-classes-testimage`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009138
Andrew Geisslerf0343792020-11-18 10:42:21 -06009139 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009140 The directory in which the file BitBake is currently parsing is
9141 located. Do not manually set this variable.
9142
Andrew Geisslerf0343792020-11-18 10:42:21 -06009143 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009144 The time the build was started. Times appear using the hour, minute,
9145 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
9146 seconds past 1400 hours).
9147
Andrew Geisslerf0343792020-11-18 10:42:21 -06009148 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009149 This variable is the base directory the OpenEmbedded build system
9150 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05009151 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009152 ``tmp`` within the :term:`Build Directory`.
9153
9154 If you want to establish this directory in a location other than the
9155 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05009156 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009157
9158 #TMPDIR = "${TOPDIR}/tmp"
9159
Andrew Geissler09036742021-06-25 14:25:14 -05009160 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Patrick Williams2390b1b2022-11-03 13:47:49 -05009161 which does not use NFS, while having the :term:`Build Directory` use NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009162
Andrew Geissler09036742021-06-25 14:25:14 -05009163 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009164 semantics (i.e. mixed-case files are unique, POSIX file locking, and
9165 persistent inodes). Due to various issues with NFS and bugs in some
9166 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05009167 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009168
Andrew Geisslerf0343792020-11-18 10:42:21 -06009169 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009170 This variable lists packages the OpenEmbedded build system uses when
9171 building an SDK, which contains a cross-development environment. The
9172 packages specified by this variable are part of the toolchain set
9173 that runs on the :term:`SDKMACHINE`, and each
9174 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05009175 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009176
9177 $ bitbake -c populate_sdk imagename
9178
9179 In this case, a default list of packages is
9180 set in this variable, but you can add additional packages to the
9181 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009182 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009183 in the Yocto Project Application Development and the Extensible
9184 Software Development Kit (eSDK) manual for more information.
9185
9186 For background information on cross-development toolchains in the
9187 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009188 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009189 section in the Yocto Project Overview and Concepts Manual. For
9190 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009191 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009192
Andrew Geisslereff27472021-10-29 15:35:00 -05009193 Note that this variable applies to building an SDK, not an eSDK,
Andrew Geissler517393d2023-01-13 08:55:19 -06009194 in which case the :term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
Andrew Geisslereff27472021-10-29 15:35:00 -05009195 used instead.
9196
9197 :term:`TOOLCHAIN_HOST_TASK_ESDK`
9198 This variable allows to extend what is installed in the host
9199 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
9200 applying to SDKs.
9201
Patrick Williamsac13d5f2023-11-24 18:59:46 -06009202 :term:`TOOLCHAIN_OPTIONS`
9203 This variable holds extra options passed to the compiler and the linker
9204 for non ``-native`` recipes as they have to point to their custom
9205 ``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`::
9206
9207 TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
9208
9209 Native recipes don't need this variable to be set, as they are
9210 built for the host machine with the native compiler.
9211
Andrew Geisslerf0343792020-11-18 10:42:21 -06009212 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009213 This variable defines the name used for the toolchain output. The
9214 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05009215 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009216
9217 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
9218
9219 See
9220 the :term:`SDK_NAME` and
9221 :term:`SDK_VERSION` variables for additional
9222 information.
9223
Andrew Geisslerf0343792020-11-18 10:42:21 -06009224 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009225 This variable lists packages the OpenEmbedded build system uses when
9226 it creates the target part of an SDK (i.e. the part built for the
9227 target hardware), which includes libraries and headers. Use this
9228 variable to add individual packages to the part of the SDK that runs
9229 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009230 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009231 in the Yocto Project Application Development and the Extensible
9232 Software Development Kit (eSDK) manual for more information.
9233
9234 For background information on cross-development toolchains in the
9235 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009236 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009237 section in the Yocto Project Overview and Concepts Manual. For
9238 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009239 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009240
Andrew Geissler517393d2023-01-13 08:55:19 -06009241 :term:`TOPDIR`
9242 See :term:`bitbake:TOPDIR` in the BitBake manual.
9243
Andrew Geisslerf0343792020-11-18 10:42:21 -06009244 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009245 A sanitized version of :term:`TARGET_ARCH`. This
9246 variable is used where the architecture is needed in a value where
9247 underscores are not allowed, for example within package filenames. In
9248 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05009249 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009250
9251 Do not edit this variable.
9252
Andrew Geisslerf0343792020-11-18 10:42:21 -06009253 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009254 The GNU canonical architecture for a specific architecture (i.e.
9255 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
9256 this value to setup configuration.
9257
Andrew Geissler09036742021-06-25 14:25:14 -05009258 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009259 definitions can be a single static definition, or can be dynamically
9260 adjusted. You can see details for a given CPU family by looking at
9261 the architecture's ``README`` file. For example, the
9262 ``meta/conf/machine/include/mips/README`` file in the
9263 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05009264 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009265
Andrew Geissler09036742021-06-25 14:25:14 -05009266 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009267 :term:`TARGET_ARCH`, which defines the target
9268 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05009269 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009270
9271 TARGET_ARCH = "${TUNE_ARCH}"
9272
9273 The following list, which is by no means complete since architectures
9274 are configurable, shows supported machine architectures:
9275
9276 - arm
9277 - i586
9278 - x86_64
9279 - powerpc
9280 - powerpc64
9281 - mips
9282 - mipsel
9283
Andrew Geisslerf0343792020-11-18 10:42:21 -06009284 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009285 Specifies architecture-specific assembler flags for the target
9286 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05009287 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009288 typically under ``meta/conf/machine/include/`` and are influenced
9289 through :term:`TUNE_FEATURES`. For example, the
9290 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05009291 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009292
9293 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
9294
9295 .. note::
9296
9297 Board Support Packages (BSPs) select the tune. The selected tune,
9298 in turn, affects the tune variables themselves (i.e. the tune can
9299 supply its own set of flags).
9300
Andrew Geisslerf0343792020-11-18 10:42:21 -06009301 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009302 Specifies architecture-specific C compiler flags for the target
9303 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05009304 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009305 typically under ``meta/conf/machine/include/`` and are influenced
9306 through :term:`TUNE_FEATURES`.
9307
9308 .. note::
9309
9310 Board Support Packages (BSPs) select the tune. The selected tune,
9311 in turn, affects the tune variables themselves (i.e. the tune can
9312 supply its own set of flags).
9313
Andrew Geisslerf0343792020-11-18 10:42:21 -06009314 :term:`TUNE_FEATURES`
9315 Features used to "tune" a compiler for optimal use given a specific
9316 processor. The features are defined within the tune files and allow
9317 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
9318 the features.
9319
9320 The OpenEmbedded build system verifies the features to be sure they
9321 are not conflicting and that they are supported.
9322
9323 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05009324 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06009325
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009326 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06009327
9328 See the :term:`DEFAULTTUNE` variable for more information.
9329
9330 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009331 Specifies architecture-specific linker flags for the target system.
9332 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05009333 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009334 typically under ``meta/conf/machine/include/`` and are influenced
9335 through :term:`TUNE_FEATURES`. For example, the
9336 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05009337 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009338
9339 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
9340
9341 .. note::
9342
9343 Board Support Packages (BSPs) select the tune. The selected tune,
9344 in turn, affects the tune variables themselves (i.e. the tune can
9345 supply its own set of flags).
9346
Andrew Geisslerf0343792020-11-18 10:42:21 -06009347 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009348 The package architecture understood by the packaging system to define
9349 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05009350 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009351
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009352 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009353
9354 These tune-specific package architectures are defined in the machine
9355 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05009356 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009357
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009358 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009359
Andrew Geisslerf0343792020-11-18 10:42:21 -06009360 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009361 Specifies CPU or Application Binary Interface (ABI) tuning features
9362 that conflict with feature.
9363
9364 Known tuning conflicts are specified in the machine include files in
9365 the :term:`Source Directory`. Here is an example from
9366 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
9367 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05009368 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009369
9370 TUNECONFLICTS[n32] = "o32 n64"
9371
Andrew Geisslerf0343792020-11-18 10:42:21 -06009372 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009373 Specifies a valid CPU or Application Binary Interface (ABI) tuning
9374 feature. The specified feature is stored as a flag. Valid features
9375 are specified in the machine include files (e.g.
9376 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05009377 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009378
9379 TUNEVALID[bigendian] = "Enable big-endian mode."
9380
9381 See the machine include files in the :term:`Source Directory`
9382 for these features.
9383
Patrick Williams705982a2024-01-12 09:51:57 -06009384 :term:`UBOOT_BINARY`
9385 Specifies the name of the binary build by U-Boot.
9386
Andrew Geisslerf0343792020-11-18 10:42:21 -06009387 :term:`UBOOT_CONFIG`
Patrick Williams705982a2024-01-12 09:51:57 -06009388 Configures one or more U-Boot configurations to build. Each
9389 configuration can define the :term:`UBOOT_MACHINE` and optionally the
9390 :term:`IMAGE_FSTYPES` and the :term:`UBOOT_BINARY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009391
Patrick Williams39653562024-03-01 08:54:02 -06009392 Here is an example from the ``meta-freescale`` layer. ::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009393
Patrick Williams705982a2024-01-12 09:51:57 -06009394 UBOOT_CONFIG ??= "sdcard-ifc-secure-boot sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
9395 UBOOT_CONFIG[nor] = "ls1021atwr_nor_defconfig"
9396 UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_defconfig,,u-boot-with-spl-pbl.bin"
9397 UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_defconfig,,u-boot-with-spl-pbl.bin"
9398 UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_defconfig"
9399 UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_defconfig"
9400 UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_defconfig"
9401 UBOOT_CONFIG[sdcard-ifc-secure-boot] = "ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009402
Patrick Williams705982a2024-01-12 09:51:57 -06009403 In this example, all possible seven configurations are selected. Each
9404 configuration specifies "..._defconfig" as :term:`UBOOT_MACHINE`, and
9405 the "sd..." configurations define an individual name for
9406 :term:`UBOOT_BINARY`. No configuration defines a second parameter for
9407 :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009408
Andrew Geissler09036742021-06-25 14:25:14 -05009409 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009410 :ref:`ref-classes-uboot-config` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009411
Andrew Geisslerf0343792020-11-18 10:42:21 -06009412 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009413 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05009414 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geissler517393d2023-01-13 08:55:19 -06009415 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be
9416 used in creating the dtb sections of Image Tree Source for the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009417
Andrew Geisslerf0343792020-11-18 10:42:21 -06009418 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009419 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05009420 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geissler517393d2023-01-13 08:55:19 -06009421 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be
9422 used in creating the dtbo sections of Image Tree Source for the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009423
Andrew Geisslerf0343792020-11-18 10:42:21 -06009424 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009425 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05009426 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009427 command-line parameter to the ``uboot-mkimage`` utility.
9428
Patrick Williamsb542dec2023-06-09 01:26:37 -05009429 To pass a 64 bit address for FIT image creation, you will need to set:
9430 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation.
9431 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation.
Andrew Geissler3eeda902023-05-19 10:14:02 -05009432
Patrick Williamsb542dec2023-06-09 01:26:37 -05009433 This variable is used by the :ref:`ref-classes-kernel-fitimage`,
9434 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`,
9435 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
9436 classes.
9437
9438 :term:`UBOOT_FIT_ADDRESS_CELLS`
9439 Specifies the value of the ``#address-cells`` value for the
9440 description of the U-Boot FIT image.
9441
9442 The default value is set to "1" by the :ref:`ref-classes-uboot-sign`
9443 class, which corresponds to 32 bit addresses.
9444
9445 For platforms that need to set 64 bit addresses in
9446 :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to
9447 set this value to "2", as two 32 bit values (cells) will be needed
9448 to represent such addresses.
9449
9450 Here is an example setting "0x400000000" as a load address::
9451
9452 UBOOT_FIT_ADDRESS_CELLS = "2"
9453 UBOOT_LOADADDRESS= "0x04 0x00000000"
9454
9455 See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__.
9456
9457 :term:`UBOOT_FIT_DESC`
9458 Specifies the description string encoded into a U-Boot fitImage. The default
9459 value is set by the :ref:`ref-classes-uboot-sign` class as follows::
9460
9461 UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
9462
9463 :term:`UBOOT_FIT_GENERATE_KEYS`
9464 Decides whether to generate the keys for signing the U-Boot fitImage if
9465 they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`.
9466 The default value is "0".
9467
9468 Enable this as follows::
9469
9470 UBOOT_FIT_GENERATE_KEYS = "1"
9471
9472 This variable is used in the :ref:`ref-classes-uboot-sign` class.
9473
9474 :term:`UBOOT_FIT_HASH_ALG`
9475 Specifies the hash algorithm used in creating the U-Boot FIT Image.
9476 It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign`
9477 class.
9478
9479 :term:`UBOOT_FIT_KEY_GENRSA_ARGS`
9480 Arguments to ``openssl genrsa`` for generating a RSA private key for
9481 signing the U-Boot FIT image. The default value of this variable
9482 is set to "-F4" by the :ref:`ref-classes-uboot-sign` class.
9483
9484 :term:`UBOOT_FIT_KEY_REQ_ARGS`
9485 Arguments to ``openssl req`` for generating a certificate for signing
9486 the U-Boot FIT image. The default value is "-batch -new" by the
9487 :ref:`ref-classes-uboot-sign` class, "batch" for
9488 non interactive mode and "new" for generating new keys.
9489
9490 :term:`UBOOT_FIT_KEY_SIGN_PKCS`
9491 Format for the public key certificate used for signing the U-Boot FIT
9492 image. The default value is set to "x509" by the
9493 :ref:`ref-classes-uboot-sign` class.
9494
9495 :term:`UBOOT_FIT_SIGN_ALG`
9496 Specifies the signature algorithm used in creating the U-Boot FIT Image.
9497 This variable is set by default to "rsa2048" by the
9498 :ref:`ref-classes-uboot-sign` class.
9499
9500 :term:`UBOOT_FIT_SIGN_NUMBITS`
9501 Size of the private key used in signing the U-Boot FIT image, in number
9502 of bits. The default value for this variable is set to "2048"
9503 by the :ref:`ref-classes-uboot-sign` class.
9504
9505 :term:`UBOOT_FITIMAGE_ENABLE`
9506 This variable allows to generate a FIT image for U-Boot, which is one
9507 of the ways to implement a verified boot process.
9508
9509 Its default value is "0", so set it to "1" to enable this functionality::
9510
9511 UBOOT_FITIMAGE_ENABLE = "1"
9512
9513 See the :ref:`ref-classes-uboot-sign` class for details.
9514
Andrew Geisslerf0343792020-11-18 10:42:21 -06009515 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009516 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05009517 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009518 command-line parameter to the ``uboot-mkimage`` utility.
9519
Patrick Williamsb542dec2023-06-09 01:26:37 -05009520 To pass a 64 bit address, you will also need to set:
9521
9522 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation.
9523 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation.
9524
9525 This variable is used by the :ref:`ref-classes-kernel-fitimage`,
9526 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`,
9527 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
9528 classes.
Andrew Geissler3eeda902023-05-19 10:14:02 -05009529
Andrew Geisslerf0343792020-11-18 10:42:21 -06009530 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009531 Appends a string to the name of the local version of the U-Boot
9532 image. For example, assuming the version of the U-Boot image built
9533 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05009534 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009535
9536 UBOOT_LOCALVERSION = "-yocto"
9537
Andrew Geisslerf0343792020-11-18 10:42:21 -06009538 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009539 Specifies the value passed on the ``make`` command line when building
9540 a U-Boot image. The value indicates the target platform
9541 configuration. You typically set this variable from the machine
9542 configuration file (i.e. ``conf/machine/machine_name.conf``).
9543
9544 Please see the "Selection of Processor Architecture and Board Type"
9545 section in the U-Boot README for valid values for this variable.
9546
Andrew Geisslerf0343792020-11-18 10:42:21 -06009547 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009548 Specifies the target called in the ``Makefile``. The default target
9549 is "all".
9550
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009551 :term:`UBOOT_MKIMAGE`
9552 Specifies the name of the mkimage command as used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06009553 :ref:`ref-classes-kernel-fitimage` class to assemble
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009554 the FIT image. This can be used to substitute an alternative command, wrapper
9555 script or function if desired. The default is "uboot-mkimage".
9556
Andrew Geisslerf0343792020-11-18 10:42:21 -06009557 :term:`UBOOT_MKIMAGE_DTCOPTS`
Patrick Williamsb542dec2023-06-09 01:26:37 -05009558 Options for the device tree compiler passed to ``mkimage -D`` feature
9559 while creating a FIT image with the :ref:`ref-classes-kernel-fitimage`
9560 class. If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then the
9561 :ref:`ref-classes-kernel-fitimage` class will not pass the ``-D`` option
9562 to ``mkimage``.
9563
9564 This variable is also used by the :ref:`ref-classes-uboot-sign` class.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009565
Patrick Williams975a06f2022-10-21 14:42:47 -05009566 :term:`UBOOT_MKIMAGE_KERNEL_TYPE`
9567 Specifies the type argument for the kernel as passed to ``uboot-mkimage``.
9568 The default value is "kernel".
9569
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009570 :term:`UBOOT_MKIMAGE_SIGN`
9571 Specifies the name of the mkimage command as used by the
Andrew Geissler517393d2023-01-13 08:55:19 -06009572 :ref:`ref-classes-kernel-fitimage` class to sign
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009573 the FIT image after it has been assembled (if enabled). This can be used
9574 to substitute an alternative command, wrapper script or function if
9575 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
9576
9577 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
9578 Optionally specifies additional arguments for the
Andrew Geissler517393d2023-01-13 08:55:19 -06009579 :ref:`ref-classes-kernel-fitimage` class to pass to the
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009580 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009581
Andrew Geisslerf0343792020-11-18 10:42:21 -06009582 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler517393d2023-01-13 08:55:19 -06009583 Specifies the entrypoint for the RAM disk image. During FIT image
9584 creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in
9585 :ref:`ref-classes-kernel-fitimage` class to specify the entrypoint to be
9586 used in creating the Image Tree Source for the FIT image.
Andrew Geissler4873add2020-11-02 18:44:49 -06009587
Andrew Geisslerf0343792020-11-18 10:42:21 -06009588 :term:`UBOOT_RD_LOADADDRESS`
Andrew Geissler517393d2023-01-13 08:55:19 -06009589 Specifies the load address for the RAM disk image. During FIT image
9590 creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in
9591 :ref:`ref-classes-kernel-fitimage` class to specify the load address to
9592 be used in creating the Image Tree Source for the FIT image.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009593
9594 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009595 Enable signing of FIT image. The default value is "0".
9596
Patrick Williamsb542dec2023-06-09 01:26:37 -05009597 This variable is used by the :ref:`ref-classes-kernel-fitimage`,
9598 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
9599 classes.
9600
Andrew Geisslerf0343792020-11-18 10:42:21 -06009601 :term:`UBOOT_SIGN_KEYDIR`
Patrick Williamsb542dec2023-06-09 01:26:37 -05009602 Location of the directory containing the RSA key and certificate used for
9603 signing FIT image, used by the :ref:`ref-classes-kernel-fitimage` and
9604 :ref:`ref-classes-uboot-sign` classes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009605
Andrew Geisslerf0343792020-11-18 10:42:21 -06009606 :term:`UBOOT_SIGN_KEYNAME`
Patrick Williamsb542dec2023-06-09 01:26:37 -05009607 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
9608 for signing U-Boot FIT image stored in the :term:`UBOOT_SIGN_KEYDIR`
9609 directory. If we have for example a ``dev.key`` key and a ``dev.crt``
9610 certificate stored in the :term:`UBOOT_SIGN_KEYDIR` directory, you will
9611 have to set :term:`UBOOT_SIGN_KEYNAME` to ``dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009612
Andrew Geisslerf0343792020-11-18 10:42:21 -06009613 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009614 Points to the generated U-Boot extension. For example, ``u-boot.sb``
9615 has a ``.sb`` extension.
9616
9617 The default U-Boot extension is ``.bin``
9618
Andrew Geisslerf0343792020-11-18 10:42:21 -06009619 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009620 Specifies the target used for building U-Boot. The target is passed
9621 directly as part of the "make" command (e.g. SPL and AIS). If you do
9622 not specifically set this variable, the OpenEmbedded build process
9623 passes and uses "all" for the target during the U-Boot building
9624 process.
9625
Andrew Geissler9aee5002022-03-30 16:27:02 +00009626 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009627 Specifies a list of options that, if reported by the configure script
9628 as being invalid, should not generate a warning during the
9629 :ref:`ref-tasks-configure` task. Normally, invalid
9630 configure options are simply not passed to the configure script (e.g.
9631 should be removed from :term:`EXTRA_OECONF` or
9632 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07009633 However, there are common options that are passed to all
9634 configure scripts at a class level, but might not be valid for some
9635 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00009636 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009637
9638 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00009639 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geissler517393d2023-01-13 08:55:19 -06009640 :ref:`ref-classes-insane` class and is only enabled if the
9641 recipe inherits the :ref:`ref-classes-autotools` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009642
Andrew Geisslerf0343792020-11-18 10:42:21 -06009643 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009644 For recipes inheriting the
Andrew Geissler517393d2023-01-13 08:55:19 -06009645 :ref:`ref-classes-update-rc.d` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009646 specifies the package that contains the initscript that is enabled.
9647
9648 The default value is "${PN}". Given that almost all recipes that
9649 install initscripts package them in the main package for the recipe,
9650 you rarely need to set this variable in individual recipes.
9651
Andrew Geissler5199d832021-09-24 16:47:35 -05009652 :term:`UPSTREAM_CHECK_COMMITS`
9653 You can perform a per-recipe check for what the latest upstream
9654 source code version is by calling ``devtool latest-version recipe``. If
9655 the recipe source code is provided from Git repositories, but
9656 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
9657 to ``1`` in the recipe, and the OpenEmbedded build system
9658 will compare the latest commit with the one currently specified
Andrew Geissler517393d2023-01-13 08:55:19 -06009659 by the recipe (:term:`SRCREV`)::
Andrew Geissler5199d832021-09-24 16:47:35 -05009660
9661 UPSTREAM_CHECK_COMMITS = "1"
9662
Andrew Geisslerf0343792020-11-18 10:42:21 -06009663 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009664 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05009665 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009666 the recipe source code is provided from Git repositories, the
9667 OpenEmbedded build system determines the latest upstream version by
9668 picking the latest tag from the list of all repository tags.
9669
Andrew Geissler09036742021-06-25 14:25:14 -05009670 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009671 regular expression to filter only the relevant tags should the
Andrew Geissler517393d2023-01-13 08:55:19 -06009672 default filter not work correctly::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009673
9674 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
9675
Andrew Geisslerf0343792020-11-18 10:42:21 -06009676 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05009677 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009678 regular expression instead of the default one when the package
9679 checking system is parsing the page found using
Andrew Geissler517393d2023-01-13 08:55:19 -06009680 :term:`UPSTREAM_CHECK_URI`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009681
9682 UPSTREAM_CHECK_REGEX = "package_regex"
9683
Andrew Geisslerf0343792020-11-18 10:42:21 -06009684 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009685 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05009686 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009687 the source code is provided from tarballs, the latest version is
9688 determined by fetching the directory listing where the tarball is and
9689 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05009690 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geissler517393d2023-01-13 08:55:19 -06009691 contains the link to the latest tarball::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009692
9693 UPSTREAM_CHECK_URI = "recipe_url"
9694
Andrew Geissler5199d832021-09-24 16:47:35 -05009695 :term:`UPSTREAM_VERSION_UNKNOWN`
9696 You can perform a per-recipe check for what the latest upstream
9697 source code version is by calling ``devtool latest-version recipe``.
9698 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
9699 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
9700 the recipe allows to determine what the latest upstream version is,
9701 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
Andrew Geissler517393d2023-01-13 08:55:19 -06009702 to acknowledge that the check cannot be performed::
Andrew Geissler5199d832021-09-24 16:47:35 -05009703
9704 UPSTREAM_VERSION_UNKNOWN = "1"
9705
Andrew Geisslerf0343792020-11-18 10:42:21 -06009706 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009707 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05009708 default value used for :term:`USE_DEVFS` is "1" when no value is
9709 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009710 statically populated ``/dev`` directory.
9711
Andrew Geissler517393d2023-01-13 08:55:19 -06009712 See the ":ref:`dev-manual/device-manager:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009713 the Yocto Project Development Tasks Manual for information on how to
9714 use this variable.
9715
Andrew Geisslerf0343792020-11-18 10:42:21 -06009716 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009717 When using
Andrew Geissler517393d2023-01-13 08:55:19 -06009718 :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`,
Patrick Williams8e7b46e2023-05-01 14:19:06 -05009719 determines whether or not to run a :wikipedia:`getty <Getty_(Unix)>`
9720 on any virtual terminals in order to enable logging in through those
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009721 terminals.
9722
Andrew Geissler09036742021-06-25 14:25:14 -05009723 The default value used for :term:`USE_VT` is "1" when no default value is
9724 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009725 machine configuration file for machines that do not have a graphical
9726 display attached and therefore do not need virtual terminal
9727 functionality.
9728
Andrew Geisslerf0343792020-11-18 10:42:21 -06009729 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009730 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00009731 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009732
Patrick Williams975a06f2022-10-21 14:42:47 -05009733 Classes inherited using :term:`USER_CLASSES` must be located in the
9734 ``classes-global/`` or ``classes/`` subdirectories.
9735
Andrew Geisslerc926e172021-05-07 16:11:35 -05009736 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009737
Andrew Geissler9aee5002022-03-30 16:27:02 +00009738 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009739
9740 For more information, see
Andrew Geissler87f5cff2022-09-30 13:13:31 -05009741 ``meta-poky/conf/templates/default/local.conf.sample`` in the
9742 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009743
Andrew Geisslerf0343792020-11-18 10:42:21 -06009744 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009745 If set to ``error``, forces the OpenEmbedded build system to produce
9746 an error if the user identification (``uid``) and group
9747 identification (``gid``) values are not defined in any of the files
9748 listed in :term:`USERADD_UID_TABLES` and
9749 :term:`USERADD_GID_TABLES`. If set to
9750 ``warn``, a warning will be issued instead.
9751
9752 The default behavior for the build system is to dynamically apply
9753 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05009754 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009755 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05009756 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05009757 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009758
9759 USERADD_ERROR_DYNAMIC = "error"
9760
9761 Overriding the
9762 default behavior implies you are going to also take steps to set
9763 static ``uid`` and ``gid`` values through use of the
9764 :term:`USERADDEXTENSION`,
9765 :term:`USERADD_UID_TABLES`, and
9766 :term:`USERADD_GID_TABLES` variables.
9767
9768 .. note::
9769
9770 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05009771 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009772 When it is set to ``warn``, the build system will report a warning for
9773 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
9774 to ``error``, it will only report errors for recipes that are actually
9775 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009776 This saves you from having to add static IDs for recipes that you
9777 know will never be built.
9778
Andrew Geisslerf0343792020-11-18 10:42:21 -06009779 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009780 Specifies a password file to use for obtaining static group
9781 identification (``gid``) values when the OpenEmbedded build system
9782 adds a group to the system during package installation.
9783
9784 When applying static group identification (``gid``) values, the
9785 OpenEmbedded build system looks in :term:`BBPATH` for a
9786 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05009787 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009788
9789
9790 USERADD_GID_TABLES = "files/group"
9791
9792 .. note::
9793
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009794 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
9795 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009796
Andrew Geisslerf0343792020-11-18 10:42:21 -06009797 :term:`USERADD_PACKAGES`
Andrew Geissler517393d2023-01-13 08:55:19 -06009798 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009799 this variable specifies the individual packages within the recipe
9800 that require users and/or groups to be added.
9801
9802 You must set this variable if the recipe inherits the class. For
9803 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05009804 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009805
9806 USERADD_PACKAGES = "${PN}"
9807
9808 .. note::
9809
Andrew Geissler09036742021-06-25 14:25:14 -05009810 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009811 variable, you need to set one or more of the :term:`USERADD_PARAM`,
9812 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009813
Andrew Geisslerf0343792020-11-18 10:42:21 -06009814 :term:`USERADD_PARAM`
Andrew Geissler517393d2023-01-13 08:55:19 -06009815 When inheriting the :ref:`ref-classes-useradd` class,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009816 this variable specifies for a package what parameters should pass to
9817 the ``useradd`` command if you add a user to the system when the
9818 package is installed.
9819
Andrew Geisslerc926e172021-05-07 16:11:35 -05009820 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009821
Patrick Williams0ca19cc2021-08-16 14:03:13 -05009822 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009823 --no-create-home --shell /bin/false \
9824 --user-group messagebus"
9825
9826 For information on the
9827 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06009828 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009829
Andrew Geisslerf0343792020-11-18 10:42:21 -06009830 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009831 Specifies a password file to use for obtaining static user
9832 identification (``uid``) values when the OpenEmbedded build system
9833 adds a user to the system during package installation.
9834
9835 When applying static user identification (``uid``) values, the
9836 OpenEmbedded build system looks in :term:`BBPATH` for a
9837 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05009838 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009839
9840 USERADD_UID_TABLES = "files/passwd"
9841
9842 .. note::
9843
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009844 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
9845 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009846
Andrew Geisslerf0343792020-11-18 10:42:21 -06009847 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009848 When set to "useradd-staticids", causes the OpenEmbedded build system
9849 to base all user and group additions on a static ``passwd`` and
9850 ``group`` files found in :term:`BBPATH`.
9851
9852 To use static user identification (``uid``) and group identification
9853 (``gid``) values, set the variable as follows in your ``local.conf``
9854 file: USERADDEXTENSION = "useradd-staticids"
9855
9856 .. note::
9857
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009858 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009859 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009860 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009861
9862 If you use static ``uid`` and ``gid`` information, you must also
9863 specify the ``files/passwd`` and ``files/group`` files by setting the
9864 :term:`USERADD_UID_TABLES` and
9865 :term:`USERADD_GID_TABLES` variables.
9866 Additionally, you should also set the
9867 :term:`USERADD_ERROR_DYNAMIC` variable.
9868
Patrick Williamsb58112e2024-03-07 11:16:36 -06009869 :term:`VIRTUAL-RUNTIME`
9870 :term:`VIRTUAL-RUNTIME` is a commonly used prefix for defining virtual
9871 packages for runtime usage, typically for use in :term:`RDEPENDS`
9872 or in image definitions.
9873
9874 An example is ``VIRTUAL-RUNTIME_base-utils`` that makes it possible
9875 to either use BusyBox based utilities::
9876
9877 VIRTUAL-RUNTIME_base-utils = "busybox"
9878
9879 or their full featured implementations from GNU Coreutils
9880 and other projects::
9881
9882 VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
9883
9884 Here are two examples using this virtual runtime package. The
9885 first one is in :yocto_git:`initramfs-framework_1.0.bb
9886 </poky/tree/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb?h=scarthgap>`::
9887
9888 RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}"
9889
9890 The second example is in the :yocto_git:`core-image-initramfs-boot
9891 </poky/tree/meta/recipes-core/images/core-image-initramfs-boot.bb?h=scarthgap>`
9892 image definition::
9893
9894 PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd"
9895
Andrew Geisslerf0343792020-11-18 10:42:21 -06009896 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009897 Specifies the persistence of the target's ``/var/log`` directory,
9898 which is used to house postinstall target log files.
9899
Andrew Geissler09036742021-06-25 14:25:14 -05009900 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009901 file is not persistent. You can override this setting by setting the
9902 variable to "no" to make the log directory persistent.
9903
Patrick Williams8e7b46e2023-05-01 14:19:06 -05009904 :term:`VOLATILE_TMP_DIR`
9905 Specifies the persistence of the target's ``/tmp`` directory.
9906
9907 By default, :term:`VOLATILE_TMP_DIR` is set to "yes", in which case
9908 ``/tmp`` links to a directory which resides in RAM in a ``tmpfs``
9909 filesystem.
9910
9911 If instead, you want the ``/tmp`` directory to be persistent, set the
9912 variable to "no" to make it a regular directory in the root filesystem.
9913
9914 This supports both sysvinit and systemd based systems.
9915
Andrew Geisslerf0343792020-11-18 10:42:21 -06009916 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009917 Specifies the quality assurance checks whose failures are reported as
9918 warnings by the OpenEmbedded build system. You set this variable in
9919 your distribution configuration file. For a list of the checks you
9920 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00009921 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009922
Patrick Williams975a06f2022-10-21 14:42:47 -05009923 :term:`WATCHDOG_TIMEOUT`
9924 Specifies the timeout in seconds used by the ``watchdog`` recipe and
9925 also by ``systemd`` during reboot. The default is 60 seconds.
9926
9927 :term:`WIRELESS_DAEMON`
9928 For ``connman`` and ``packagegroup-base``, specifies the wireless
9929 daemon to use. The default is "wpa-supplicant" (note that the value
9930 uses a dash and not an underscore).
9931
Andrew Geisslerf0343792020-11-18 10:42:21 -06009932 :term:`WKS_FILE`
9933 Specifies the location of the Wic kickstart file that is used by the
9934 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05009935 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06009936 image, see the
Andrew Geissler517393d2023-01-13 08:55:19 -06009937 ":ref:`dev-manual/wic:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06009938 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06009939 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009940
9941 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009942 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05009943 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009944 applicable when Wic images are active (i.e. when
9945 :term:`IMAGE_FSTYPES` contains entries related
9946 to Wic). If your recipe does not create Wic images, the variable has
9947 no effect.
9948
Andrew Geissler09036742021-06-25 14:25:14 -05009949 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009950 :term:`DEPENDS` variable. When you use the variable in
9951 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05009952 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009953
Andrew Geissler09036742021-06-25 14:25:14 -05009954 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009955 specify a list of additional dependencies (e.g. native tools,
9956 bootloaders, and so forth), that are required to build Wic images.
Patrick Williams39653562024-03-01 08:54:02 -06009957 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009958
9959 WKS_FILE_DEPENDS = "some-native-tool"
9960
9961 In the
9962 previous example, some-native-tool would be replaced with an actual
9963 native tool on which the build would depend.
9964
Andrew Geisslerd5838332022-05-27 11:33:10 -05009965 :term:`WKS_FILES`
9966 Specifies a list of candidate Wic kickstart files to be used by the
9967 OpenEmbedded build system to create a partitioned image. Only the
9968 first one that is found, from left to right, will be used.
9969
9970 This is only useful when there are multiple ``.wks`` files that can be
9971 used to produce an image. A typical case is when multiple layers are
9972 used for different hardware platforms, each supplying a different
9973 ``.wks`` file. In this case, you specify all possible ones through
9974 :term:`WKS_FILES`.
9975
9976 If only one ``.wks`` file is used, set :term:`WKS_FILE` instead.
9977
Andrew Geisslerf0343792020-11-18 10:42:21 -06009978 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009979 The pathname of the work directory in which the OpenEmbedded build
9980 system builds a recipe. This directory is located within the
9981 :term:`TMPDIR` directory structure and is specific to
9982 the recipe being built and the system for which it is being built.
9983
Andrew Geissler09036742021-06-25 14:25:14 -05009984 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009985
9986 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
9987
9988 The actual directory depends on several things:
9989
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009990 - :term:`TMPDIR`: The top-level build output directory
9991 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
9992 - :term:`PN`: The recipe name
Andrew Geissler615f2f12022-07-15 14:00:58 -05009993 - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which
Andrew Geissler517393d2023-01-13 08:55:19 -06009994 is usually the case for most recipes, then :term:`EXTENDPE` is blank.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009995 - :term:`PV`: The recipe version
9996 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009997
9998 As an example, assume a Source Directory top-level folder name
Patrick Williams2390b1b2022-11-03 13:47:49 -05009999 ``poky``, a default :term:`Build Directory` at ``poky/build``, and a
Andrew Geisslerc9f78652020-09-18 14:11:35 -050010000 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
10001 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
10002 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -050010003 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050010004
10005 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
10006
Andrew Geisslerf0343792020-11-18 10:42:21 -060010007 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050010008 Specifies the packages that should be installed to provide an X
10009 server and drivers for the current machine, assuming your image
10010 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
10011 indirectly, includes "x11-base" in
10012 :term:`IMAGE_FEATURES`.
10013
Andrew Geissler09036742021-06-25 14:25:14 -050010014 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -050010015 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
Patrick Williams03907ee2022-05-01 06:28:52 -050010016
10017 :term:`XZ_THREADS`
10018 Specifies the number of parallel threads that should be used when
10019 using xz compression.
10020
10021 By default this scales with core count, but is never set less than 2
10022 to ensure that multi-threaded mode is always used so that the output
10023 file contents are deterministic. Builds will work with a value of 1
10024 but the output will differ compared to the output from the compression
10025 generated when more than one thread is used.
10026
10027 On systems where many tasks run in parallel, setting a limit to this
10028 can be helpful in controlling system resource usage.
10029
Andrew Geissler517393d2023-01-13 08:55:19 -060010030 :term:`XZ_MEMLIMIT`
Patrick Williams03907ee2022-05-01 06:28:52 -050010031 Specifies the maximum memory the xz compression should use as a percentage
10032 of system memory. If unconstrained the xz compressor can use large amounts of
10033 memory and become problematic with parallelism elsewhere in the build.
10034 "50%" has been found to be a good value.
10035
10036 :term:`ZSTD_THREADS`
10037 Specifies the number of parallel threads that should be used when
10038 using ZStandard compression.
10039
10040 By default this scales with core count, but is never set less than 2
10041 to ensure that multi-threaded mode is always used so that the output
10042 file contents are deterministic. Builds will work with a value of 1
10043 but the output will differ compared to the output from the compression
10044 generated when more than one thread is used.
10045
10046 On systems where many tasks run in parallel, setting a limit to this
10047 can be helpful in controlling system resource usage.