blob: cf817e9540071bd5c4aaadb050bbe8e088d5c07f [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`
129 When inheriting the
130 :ref:`features_check <ref-classes-features_check>`
131 class, this variable identifies a list of distribution features where
132 at least one must be enabled in the current configuration in order
133 for the OpenEmbedded build system to build the recipe. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -0500134 if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES`
135 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600136 the recipe will be skipped, and if the build system attempts to build
137 the recipe then an error will be triggered.
138
139
Andrew Geisslerf0343792020-11-18 10:42:21 -0600140 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500141 An override list of append strings for each target specified with
142 :term:`LABELS`.
143
144 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
145 information on how this variable is used.
146
Andrew Geisslerf0343792020-11-18 10:42:21 -0600147 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500148 The minimal command and arguments used to run ``ar``.
149
Andrew Geisslerf0343792020-11-18 10:42:21 -0600150 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500151 When used with the :ref:`archiver <ref-classes-archiver>` class,
152 determines the type of information used to create a released archive.
153 You can use this variable to create archives of patched source,
154 original source, configured source, and so forth by employing the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500155 following variable flags (varflags)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500156
157 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
158 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
159 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
160 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
161 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
162 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
163 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
164 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
165
166 For information on how the variable works, see the
167 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
168
Andrew Geisslerf0343792020-11-18 10:42:21 -0600169 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500170 Minimal command and arguments needed to run the assembler.
171
Andrew Geisslerf0343792020-11-18 10:42:21 -0600172 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500173 Lists recipe names (:term:`PN` values) BitBake does not
174 attempt to build. Instead, BitBake assumes these recipes have already
175 been built.
176
Andrew Geissler09036742021-06-25 14:25:14 -0500177 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500178 tools that should not be built. An example is ``git-native``, which
179 when specified, allows for the Git binary from the host to be used
180 rather than building ``git-native``.
181
Andrew Geisslerf0343792020-11-18 10:42:21 -0600182 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500183 Provides additional ``shlibs`` provider mapping information, which
184 adds to or overwrites the information provided automatically by the
185 system. Separate multiple entries using spaces.
186
187 As an example, use the following form to add an ``shlib`` provider of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500188 shlibname in packagename with the optional version::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500189
190 shlibname:packagename[_version]
191
192 Here is an example that adds a shared library named ``libEGL.so.1``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500193 as being provided by the ``libegl-implementation`` package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500194
195 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
196
Andrew Geisslerf0343792020-11-18 10:42:21 -0600197 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500198 The email address used to contact the original author or authors in
199 order to send patches and forward bugs.
200
Andrew Geisslerf0343792020-11-18 10:42:21 -0600201 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500202 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500203 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500204 packages should be checked for libraries and renamed according to
205 Debian library package naming.
206
207 The default value is "${PACKAGES}", which causes the debian class to
208 act on all packages that are explicitly generated by the recipe.
209
Andrew Geisslerf0343792020-11-18 10:42:21 -0600210 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500211 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500212 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500213
214 SRCREV = "${AUTOREV}"
215
216 If you use the previous statement to retrieve the latest version of
217 software, you need to be sure :term:`PV` contains
218 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
219 have a kernel recipe that inherits the
220 :ref:`kernel <ref-classes-kernel>` class and you use the previous
221 statement. In this example, ``${SRCPV}`` does not automatically get
Andrew Geissler09036742021-06-25 14:25:14 -0500222 into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500223 so that it does contain ``${SRCPV}``.
224
225 For more information see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600226 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500227 section in the Yocto Project Development Tasks Manual.
228
Andrew Geissler9aee5002022-03-30 16:27:02 +0000229 :term:`AUTO_SYSLINUXMENU`
230 Enables creating an automatic menu for the syslinux bootloader. You
231 must set this variable in your recipe. The
232 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
233
Andrew Geisslerf0343792020-11-18 10:42:21 -0600234 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500235 The list of defined CPU and Application Binary Interface (ABI)
236 tunings (i.e. "tunes") available for use by the OpenEmbedded build
237 system.
238
239 The list simply presents the tunes that are available. Not all tunes
240 may be compatible with a particular machine configuration, or with
241 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600242 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500243 configuration.
244
245 To add a tune to the list, be sure to append it with spaces using the
246 "+=" BitBake operator. Do not simply replace the list by using the
247 "=" operator. See the
Patrick Williams213cb262021-08-07 19:21:33 -0500248 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500249 User Manual for more information.
250
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500251 :term:`AZ_SAS`
252 Azure Storage Shared Access Signature, when using the
253 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
254 This variable can be defined to be used by the fetcher to authenticate
255 and gain access to non-public artifacts.
256 ::
257
258 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
259
260 For more information see Microsoft's Azure Storage documentation at
261 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
262
Andrew Geisslerf0343792020-11-18 10:42:21 -0600263 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500264 The directory within the :term:`Build Directory` in
265 which the OpenEmbedded build system places generated objects during a
266 recipe's build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500267 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500268
269 S = "${WORKDIR}/${BP}"
270
Andrew Geissler09036742021-06-25 14:25:14 -0500271 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400272 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500273 separating these directories. The build system defaults to using
274 separate directories for ``gcc`` and some kernel recipes.
275
Andrew Geisslerf0343792020-11-18 10:42:21 -0600276 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500277 Lists "recommended-only" packages to not install. Recommended-only
278 packages are packages installed only through the
279 :term:`RRECOMMENDS` variable. You can prevent any
280 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500281 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500282
283 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
284
285 You can set this variable globally in your ``local.conf`` file or you
286 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500287 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500288
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500289 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500290
291 It is important to realize that if you choose to not install packages
292 using this variable and some other packages are dependent on them
293 (i.e. listed in a recipe's :term:`RDEPENDS`
294 variable), the OpenEmbedded build system ignores your request and
295 will install the packages to avoid dependency errors.
296
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700297 This variable is supported only when using the IPK and RPM
298 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500299
300 See the :term:`NO_RECOMMENDATIONS` and the
301 :term:`PACKAGE_EXCLUDE` variables for related
302 information.
303
Andrew Geisslerf0343792020-11-18 10:42:21 -0600304 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500305 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500306 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600307 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500308 section in the Yocto Project Development Tasks Manual for information
309 on Multilib.
310
Andrew Geissler09036742021-06-25 14:25:14 -0500311 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500312 the :term:`Source Directory`. If Multilib is not
313 being used, the value defaults to "lib".
314
Andrew Geisslerf0343792020-11-18 10:42:21 -0600315 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500316 Points to the base of the work directory for all recipes. The default
317 value is "${TMPDIR}/work".
318
Andrew Geisslerf0343792020-11-18 10:42:21 -0600319 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500320 Specifies a space-delimited list of hosts that the fetcher is allowed
321 to use to obtain the required source code. Following are
322 considerations surrounding this variable:
323
Andrew Geissler09036742021-06-25 14:25:14 -0500324 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500325 or set to "0".
326
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700327 - There is limited support for wildcard matching against the beginning of
328 host names. For example, the following setting matches
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500329 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
330 ::
331
332 BB_ALLOWED_NETWORKS = "*.gnu.org"
333
334 .. note::
335
336 The use of the "``*``" character only works at the beginning of
337 a host name and it must be isolated from the remainder of the
338 host name. You cannot use the wildcard character in any other
339 location of the name or combined with the front part of the
340 name.
341
342 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
343 is not.
344
345 - Mirrors not in the host list are skipped and logged in debug.
346
347 - Attempts to access networks not in the host list cause a failure.
348
Andrew Geissler09036742021-06-25 14:25:14 -0500349 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500350 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500351 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500352 fetched from an allowed location and avoids raising an error when a
353 host that is not allowed is in a :term:`SRC_URI`
354 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500355 host listed in :term:`SRC_URI` after a successful fetch from the
356 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500357
Andrew Geisslerf0343792020-11-18 10:42:21 -0600358 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500359 Defines how BitBake handles situations where an append file
360 (``.bbappend``) has no corresponding recipe file (``.bb``). This
361 condition often occurs when layers get out of sync (e.g. ``oe-core``
362 bumps a recipe version and the old recipe no longer exists and the
363 other layer has not been updated to the new version of the recipe
364 yet).
365
366 The default fatal behavior is safest because it is the sane reaction
367 given something is out of sync. It is important to realize when your
368 changes are no longer being applied.
369
370 You can change the default behavior by setting this variable to "1",
371 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500372 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500373
374 BB_DANGLINGAPPENDS_WARNONLY = "1"
375
Andrew Geisslerf0343792020-11-18 10:42:21 -0600376 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500377 Monitors disk space and available inodes during the build and allows
378 you to control the build based on these parameters.
379
380 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500381 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500382 found in the :term:`Build Directory`. Use the
383 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500384
385 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500386
387 BB_DISKMON_DIRS = "action,dir,threshold [...]"
388
389 where:
390
391 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000392 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500393 a threshold is broken.
394 STOPTASKS: Stop the build after the currently
395 executing tasks have finished when
396 a threshold is broken.
397 WARN: Issue a warning but continue the
398 build when a threshold is broken.
399 Subsequent warnings are issued as
400 defined by the BB_DISKMON_WARNINTERVAL
401 variable, which must be defined in
402 the conf/local.conf file.
403
404 dir is:
405 Any directory you choose. You can specify one or
406 more directories to monitor by separating the
407 groupings with a space. If two directories are
408 on the same device, only the first directory
409 is monitored.
410
411 threshold is:
412 Either the minimum available disk space,
413 the minimum number of free inodes, or
414 both. You must specify at least one. To
415 omit one or the other, simply omit the value.
416 Specify the threshold using G, M, K for Gbytes,
417 Mbytes, and Kbytes, respectively. If you do
418 not specify G, M, or K, Kbytes is assumed by
419 default. Do not use GB, MB, or KB.
420
Andrew Geisslerc926e172021-05-07 16:11:35 -0500421 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500422
423 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
424 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
425 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
426
427 The first example works only if you also provide the
428 :term:`BB_DISKMON_WARNINTERVAL`
429 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000430 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500431 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
432 below 100 Kbytes. Because two directories are provided with the
433 variable, the build system also issue a warning when the disk space
434 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
435 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500436 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500437 variable.
438
439 The second example stops the build after all currently executing
440 tasks complete when the minimum disk space in the ``${TMPDIR}``
441 directory drops below 1 Gbyte. No disk monitoring occurs for the free
442 inodes in this case.
443
Andrew Geissler595f6302022-01-24 19:11:47 +0000444 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500445 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
446 disk space monitoring for the directory itself occurs in this case.
447
Andrew Geisslerf0343792020-11-18 10:42:21 -0600448 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500449 Defines the disk space and free inode warning intervals. To set these
450 intervals, define the variable in your ``conf/local.conf`` file in
451 the :term:`Build Directory`.
452
Andrew Geissler09036742021-06-25 14:25:14 -0500453 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500454 must also use the :term:`BB_DISKMON_DIRS`
455 variable and define its action as "WARN". During the build,
456 subsequent warnings are issued each time disk space or number of free
457 inodes further reduces by the respective interval.
458
Andrew Geissler09036742021-06-25 14:25:14 -0500459 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
460 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500461 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500462
463 BB_DISKMON_WARNINTERVAL = "50M,5K"
464
465 When specifying the variable in your configuration file, use the
466 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500467
468 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500469
470 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
471
472 where:
473
474 disk_space_interval is:
475 An interval of memory expressed in either
476 G, M, or K for Gbytes, Mbytes, or Kbytes,
477 respectively. You cannot use GB, MB, or KB.
478
479 disk_inode_interval is:
480 An interval of free inodes expressed in either
481 G, M, or K for Gbytes, Mbytes, or Kbytes,
482 respectively. You cannot use GB, MB, or KB.
483
Andrew Geisslerc926e172021-05-07 16:11:35 -0500484 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500485
486 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
487 BB_DISKMON_WARNINTERVAL = "50M,5K"
488
489 These variables cause the
490 OpenEmbedded build system to issue subsequent warnings each time the
491 available disk space further reduces by 50 Mbytes or the number of
492 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
493 directory. Subsequent warnings based on the interval occur each time
494 a respective interval is reached beyond the initial warning (i.e. 1
495 Gbytes and 100 Kbytes).
496
Andrew Geisslerf0343792020-11-18 10:42:21 -0600497 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500498 Causes tarballs of the source control repositories (e.g. Git
499 repositories), including metadata, to be placed in the
500 :term:`DL_DIR` directory.
501
502 For performance reasons, creating and placing tarballs of these
503 repositories is not the default action by the OpenEmbedded build
504 system.
505 ::
506
507 BB_GENERATE_MIRROR_TARBALLS = "1"
508
509 Set this variable in your
510 ``local.conf`` file in the :term:`Build Directory`.
511
512 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500513 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500514 source control work directories.
515
Andrew Geisslerf0343792020-11-18 10:42:21 -0600516 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500517 The maximum number of tasks BitBake should run in parallel at any one
518 time. The OpenEmbedded build system automatically configures this
519 variable to be equal to the number of cores on the build system. For
520 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500521 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500522 to "4".
523
524 For single socket systems (i.e. one CPU), you should not have to
525 override this variable to gain optimal parallelism during builds.
526 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500527 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500528 is not set higher than "20".
529
530 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600531 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500532 section in the Yocto Project Development Tasks Manual.
533
Andrew Geisslerf0343792020-11-18 10:42:21 -0600534 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500535 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500536 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500537 long the BitBake server stays resident between invocations.
538
539 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500540 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500541
542 BB_SERVER_TIMEOUT = "20"
543
544 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400545 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500546
Andrew Geisslerf0343792020-11-18 10:42:21 -0600547 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500548 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700549 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500550 ``quilt-native``, which is a copy of Quilt built to run on the build
551 system; "crosses" such as ``gcc-cross``, which is a compiler built to
552 run on the build machine but produces binaries that run on the target
553 :term:`MACHINE`; "nativesdk", which targets the SDK
Andrew Geissler09036742021-06-25 14:25:14 -0500554 machine instead of :term:`MACHINE`; and "mulitlibs" in the form
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500555 "``multilib:``\ multilib_name".
556
557 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500558 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500559
560 BBCLASSEXTEND =+ "native nativesdk"
561 BBCLASSEXTEND =+ "multilib:multilib_name"
562
563 .. note::
564
Andrew Geissler09036742021-06-25 14:25:14 -0500565 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500566 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500567 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500568 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400569 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500570
Andrew Geissler09036742021-06-25 14:25:14 -0500571 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500572 Parsing once adds some limitations. For example, it is not
573 possible to include a different file depending on the variant,
574 since ``include`` statements are processed when the recipe is
575 parsed.
576
Andrew Geisslerf0343792020-11-18 10:42:21 -0600577 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500578 Lists the names of configured layers. These names are used to find
579 the other ``BBFILE_*`` variables. Typically, each layer will append
580 its name to this variable in its ``conf/layer.conf`` file.
581
Andrew Geisslerf0343792020-11-18 10:42:21 -0600582 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500583 Variable that expands to match files from
584 :term:`BBFILES` in a particular layer. This variable
585 is used in the ``conf/layer.conf`` file and must be suffixed with the
586 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
587
Andrew Geisslerf0343792020-11-18 10:42:21 -0600588 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500589 Assigns the priority for recipe files in each layer.
590
591 This variable is useful in situations where the same recipe appears
592 in more than one layer. Setting this variable allows you to
593 prioritize a layer against other layers that contain the same recipe
Andrew Geissler615f2f12022-07-15 14:00:58 -0500594 --- effectively letting you control the precedence for the multiple
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500595 layers. The precedence established through this variable stands
596 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500597 example, a layer that has a recipe with a higher :term:`PV` value but for
598 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500599 has a lower precedence.
600
Andrew Geissler09036742021-06-25 14:25:14 -0500601 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500602 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500603 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
604 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500605 for more information. The default priority, if unspecified for a
606 layer with no dependencies, is the lowest defined priority + 1 (or 1
607 if no priorities are defined).
608
609 .. tip::
610
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500611 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500612 to list all configured layers along with their priorities.
613
Andrew Geisslerf0343792020-11-18 10:42:21 -0600614 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500615 A space-separated list of recipe files BitBake uses to build
616 software.
617
618 When specifying recipe files, you can pattern match using Python's
619 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
620 For details on the syntax, see the documentation by following the
621 previous link.
622
Andrew Geisslerf0343792020-11-18 10:42:21 -0600623 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500624 Activates content when identified layers are present. You identify
625 the layers by the collections that the layers define.
626
Andrew Geissler09036742021-06-25 14:25:14 -0500627 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500628 whose corresponding ``.bb`` file is in a layer that attempts to
629 modify other layers through ``.bbappend`` but does not want to
630 introduce a hard dependency on those other layers.
631
Andrew Geissler09036742021-06-25 14:25:14 -0500632 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000633 ``collection_name:filename_pattern``.
634
635 The following example identifies two collection names and two
636 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500637
638 BBFILES_DYNAMIC += " \
639 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
640 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
641 "
642
643 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000644 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500645
646 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500647
648 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
649 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
650 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
651
Andrew Geisslerf0343792020-11-18 10:42:21 -0600652 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500653 Variable that controls how BitBake displays logs on build failure.
654
Andrew Geisslerf0343792020-11-18 10:42:21 -0600655 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500656 If :term:`BBINCLUDELOGS` is set, specifies the
657 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500658 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500659 the entire log is printed.
660
Andrew Geisslerf0343792020-11-18 10:42:21 -0600661 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500662 Lists the layers to enable during the build. This variable is defined
663 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500664 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500665
666 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500667 /home/scottrif/poky/meta \
668 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500669 /home/scottrif/poky/meta-yocto-bsp \
670 /home/scottrif/poky/meta-mykernel \
671 "
672
673 This example enables four layers, one of which is a custom,
674 user-defined layer named ``meta-mykernel``.
675
Andrew Geisslerf0343792020-11-18 10:42:21 -0600676 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500677 Prevents BitBake from processing recipes and recipe append files.
678
Andrew Geissler09036742021-06-25 14:25:14 -0500679 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500680 ``.bbappend`` files. BitBake ignores any recipe or recipe append
681 files that match any of the expressions. It is as if BitBake does not
682 see them at all. Consequently, matching files are not parsed or
683 otherwise used by BitBake.
684
685 The values you provide are passed to Python's regular expression
686 compiler. Consequently, the syntax follows Python's Regular
687 Expression (re) syntax. The expressions are compared against the full
688 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500689 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500690
691 The following example uses a complete regular expression to tell
692 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500693 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500694
695 BBMASK = "meta-ti/recipes-misc/"
696
697 If you want to mask out multiple directories or recipes, you can
698 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500699 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500700
701 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
702 BBMASK += "/meta-oe/recipes-support/"
703 BBMASK += "/meta-foo/.*/openldap"
704 BBMASK += "opencv.*\.bbappend"
705 BBMASK += "lzma"
706
707 .. note::
708
709 When specifying a directory name, use the trailing slash character
710 to ensure you match just that directory name.
711
Andrew Geisslerf0343792020-11-18 10:42:21 -0600712 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500713 Specifies each additional separate configuration when you are
714 building targets with multiple configurations. Use this variable in
715 your ``conf/local.conf`` configuration file. Specify a
716 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500717 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500718
719 BBMULTICONFIG = "configA configB configC"
720
Andrew Geissler615f2f12022-07-15 14:00:58 -0500721 Each configuration file you use must reside in a ``multiconfig``
722 subdirectory of a configuration directory within a layer, or
723 within the :term:`Build Directory` (e.g.
724 ``build_directory/conf/multiconfig/configA.conf`` or
725 ``mylayer/conf/multiconfig/configB.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500726
Andrew Geissler09036742021-06-25 14:25:14 -0500727 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500728 that supports building targets with multiple configurations, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600729 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500730 section in the Yocto Project Development Tasks Manual.
731
Andrew Geisslerf0343792020-11-18 10:42:21 -0600732 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500733 Used by BitBake to locate ``.bbclass`` and configuration files. This
734 variable is analogous to the ``PATH`` variable.
735
736 .. note::
737
738 If you run BitBake from a directory outside of the
Andrew Geissler09036742021-06-25 14:25:14 -0500739 :term:`Build Directory`, you must be sure to set :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500740 to point to the Build Directory. Set the variable as you would any
Andrew Geisslerc926e172021-05-07 16:11:35 -0500741 environment variable and then run BitBake::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500742
743 $ BBPATH = "build_directory"
744 $ export BBPATH
745 $ bitbake target
746
747
Andrew Geisslerf0343792020-11-18 10:42:21 -0600748 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500749 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500750 BitBake remote server.
751
752 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500753 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500754
755 export BBSERVER=localhost:$port
756
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000757 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500758 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500759 data.
760
Andrew Geisslerf0343792020-11-18 10:42:21 -0600761 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500762 When inheriting the
763 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
764 this variable specifies binary configuration scripts to disable in
765 favor of using ``pkg-config`` to query the information. The
Andrew Geissler595f6302022-01-24 19:11:47 +0000766 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500767 return an error so that calls to them can be easily found and
768 replaced.
769
770 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500771 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500772
773 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
774
Andrew Geisslerf0343792020-11-18 10:42:21 -0600775 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500776 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
777 this variable specifies a wildcard for configuration scripts that
778 need editing. The scripts are edited to correct any paths that have
779 been set up during compilation so that they are correct for use when
780 installed into the sysroot and called by the build processes of other
781 recipes.
782
783 .. note::
784
Andrew Geissler09036742021-06-25 14:25:14 -0500785 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500786 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
787 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500788 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500789 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
790 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500791
792 For more information on how this variable works, see
793 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
794 You can also find general
795 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000796 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500797
Andrew Geisslerf0343792020-11-18 10:42:21 -0600798 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500799 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500800 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500801 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500802
803 ${BPN}-${PV}
804
Andrew Geisslerf0343792020-11-18 10:42:21 -0600805 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500806 This variable is a version of the :term:`PN` variable with
807 common prefixes and suffixes removed, such as ``nativesdk-``,
808 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
809 The exact lists of prefixes and suffixes removed are specified by the
810 :term:`MLPREFIX` and
811 :term:`SPECIAL_PKGSUFFIX` variables,
812 respectively.
813
Andrew Geisslerf0343792020-11-18 10:42:21 -0600814 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500815 Specifies a URL for an upstream bug tracking website for a recipe.
816 The OpenEmbedded build system does not use this variable. Rather, the
817 variable is a useful pointer in case a bug in the software being
818 built needs to be manually reported.
819
Andrew Geisslerf0343792020-11-18 10:42:21 -0600820 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500821 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500822 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500823 machine name reported by the ``uname`` command.
824
Andrew Geisslerf0343792020-11-18 10:42:21 -0600825 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500826 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500827 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500828
Andrew Geisslerf0343792020-11-18 10:42:21 -0600829 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500830 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500831 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500832
Andrew Geisslerf0343792020-11-18 10:42:21 -0600833 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500834 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500835 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500836 points to GCC and passes as arguments the value of
837 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500838 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500839
Andrew Geisslerf0343792020-11-18 10:42:21 -0600840 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500841 Specifies the flags to pass to the C compiler when building for the
842 build host. When building in the ``-native`` context,
843 :term:`CFLAGS` is set to the value of this variable by
844 default.
845
Andrew Geisslerf0343792020-11-18 10:42:21 -0600846 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500847 Specifies the flags to pass to the C preprocessor (i.e. to both the C
848 and the C++ compilers) when building for the build host. When
849 building in the ``-native`` context, :term:`CPPFLAGS`
850 is set to the value of this variable by default.
851
Andrew Geisslerf0343792020-11-18 10:42:21 -0600852 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500853 Specifies the flags to pass to the C++ compiler when building for the
854 build host. When building in the ``-native`` context,
855 :term:`CXXFLAGS` is set to the value of this variable
856 by default.
857
Andrew Geisslerf0343792020-11-18 10:42:21 -0600858 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500859 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500860 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500861 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500862 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500863
Andrew Geisslerf0343792020-11-18 10:42:21 -0600864 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500865 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -0500866 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500867 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500868 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500869
Andrew Geisslerf0343792020-11-18 10:42:21 -0600870 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500871 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500872 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500873
Andrew Geisslerf0343792020-11-18 10:42:21 -0600874 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500875 Specifies the flags to pass to the linker when building for the build
876 host. When building in the ``-native`` context,
877 :term:`LDFLAGS` is set to the value of this variable
878 by default.
879
Andrew Geisslerf0343792020-11-18 10:42:21 -0600880 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500881 Specifies the optimization flags passed to the C compiler when
882 building for the build host or the SDK. The flags are passed through
883 the :term:`BUILD_CFLAGS` and
884 :term:`BUILDSDK_CFLAGS` default values.
885
Andrew Geissler5f350902021-07-23 13:09:54 -0400886 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500887 -pipe".
888
Andrew Geisslerf0343792020-11-18 10:42:21 -0600889 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500890 Specifies the operating system in use on the build host (e.g.
891 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler615f2f12022-07-15 14:00:58 -0500892 :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500893 first word, converted to lower-case characters.
894
Andrew Geisslerf0343792020-11-18 10:42:21 -0600895 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500896 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -0500897 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500898 :term:`TARGET_PREFIX` when building for
899 ``native`` recipes.
900
Andrew Geisslerf0343792020-11-18 10:42:21 -0600901 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500902 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -0500903 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500904 points to
905 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
906
Andrew Geisslerf0343792020-11-18 10:42:21 -0600907 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500908 Specifies the system, including the architecture and the operating
909 system, to use when building for the build host (i.e. when building
910 ``native`` recipes).
911
912 The OpenEmbedded build system automatically sets this variable based
913 on :term:`BUILD_ARCH`,
914 :term:`BUILD_VENDOR`, and
915 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -0500916 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500917
Andrew Geisslerf0343792020-11-18 10:42:21 -0600918 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500919 Specifies the vendor name to use when building for the build host.
920 The default value is an empty string ("").
921
Andrew Geisslerf0343792020-11-18 10:42:21 -0600922 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500923 Points to the location of the :term:`Build Directory`.
924 You can define this directory indirectly through the
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500925 :ref:`structure-core-script` script by passing in a Build
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500926 Directory path when you run the script. If you run the script and do
Andrew Geissler09036742021-06-25 14:25:14 -0500927 not provide a Build Directory path, the :term:`BUILDDIR` defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500928 ``build`` in the current directory.
929
Andrew Geisslerf0343792020-11-18 10:42:21 -0600930 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500931 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
932 class, this variable specifies whether or not to commit the build
933 history output in a local Git repository. If set to "1", this local
Andrew Geissler595f6302022-01-24 19:11:47 +0000934 repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500935 class and a commit will be created on every build for changes to each
936 top-level subdirectory of the build history output (images, packages,
937 and sdk). If you want to track changes to build history over time,
938 you should set this value to "1".
939
Andrew Geissler595f6302022-01-24 19:11:47 +0000940 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class does not commit the build
Andrew Geisslerc926e172021-05-07 16:11:35 -0500941 history output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500942
943 BUILDHISTORY_COMMIT ?= "0"
944
Andrew Geisslerf0343792020-11-18 10:42:21 -0600945 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500946 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
947 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -0500948 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500949 :term:`BUILDHISTORY_COMMIT` variable must
950 be set to "1".
951
952 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -0500953 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500954 email@host". Providing an email address or host that is not valid
955 does not produce an error.
956
Andrew Geissler595f6302022-01-24 19:11:47 +0000957 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500958
959 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
960
Andrew Geisslerf0343792020-11-18 10:42:21 -0600961 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500962 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
963 class, this variable specifies the directory in which build history
964 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000965 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500966
Andrew Geissler595f6302022-01-24 19:11:47 +0000967 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500968
969 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
970
Andrew Geisslerf0343792020-11-18 10:42:21 -0600971 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500972 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
973 class, this variable specifies the build history features to be
974 enabled. For more information on how build history works, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600975 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500976 section in the Yocto Project Development Tasks Manual.
977
978 You can specify these features in the form of a space-separated list:
979
980 - *image:* Analysis of the contents of images, which includes the
981 list of installed packages among other things.
982
983 - *package:* Analysis of the contents of individual packages.
984
985 - *sdk:* Analysis of the contents of the software development kit
986 (SDK).
987
988 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -0600989 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500990 (sstate) tasks.
991 This saves one file per task and lists the SHA-256 checksums for
992 each file staged (i.e. the output of the task).
993
Andrew Geissler595f6302022-01-24 19:11:47 +0000994 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following
Andrew Geisslerc926e172021-05-07 16:11:35 -0500995 features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500996
997 BUILDHISTORY_FEATURES ?= "image package sdk"
998
Andrew Geisslerf0343792020-11-18 10:42:21 -0600999 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001000 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1001 class, this variable specifies a list of paths to files copied from
1002 the image contents into the build history directory under an
1003 "image-files" directory in the directory for the image, so that you
1004 can track the contents of each file. The default is to copy
1005 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1006 changes in user and group entries. You can modify the list to include
1007 any file. Specifying an invalid path does not produce an error.
1008 Consequently, you can include files that might not always be present.
1009
Andrew Geissler595f6302022-01-24 19:11:47 +00001010 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001011 following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001012
1013 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1014
Andrew Geissler5f350902021-07-23 13:09:54 -04001015 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
1016 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1017 class, this variable specifies a common path prefix that should be
1018 stripped off the beginning of paths in the task signature list when the
1019 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1020 useful when build history is populated from multiple sources that may not
1021 all use the same top level directory.
1022
Andrew Geissler595f6302022-01-24 19:11:47 +00001023 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001024
1025 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1026
1027 In this case, no prefixes will be stripped.
1028
Andrew Geisslerf0343792020-11-18 10:42:21 -06001029 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001030 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1031 class, this variable optionally specifies a remote repository to
1032 which build history pushes Git changes. In order for
Andrew Geissler09036742021-06-25 14:25:14 -05001033 :term:`BUILDHISTORY_PUSH_REPO` to work,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001034 :term:`BUILDHISTORY_COMMIT` must be set to
1035 "1".
1036
1037 The repository should correspond to a remote address that specifies a
1038 repository as understood by Git, or alternatively to a remote name
1039 that you have set up manually using ``git remote`` within the local
1040 repository.
1041
Andrew Geissler595f6302022-01-24 19:11:47 +00001042 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001043
1044 BUILDHISTORY_PUSH_REPO ?= ""
1045
Andrew Geisslerf0343792020-11-18 10:42:21 -06001046 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001047 Specifies the flags to pass to the C compiler when building for the
1048 SDK. When building in the ``nativesdk-`` context,
1049 :term:`CFLAGS` is set to the value of this variable by
1050 default.
1051
Andrew Geisslerf0343792020-11-18 10:42:21 -06001052 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001053 Specifies the flags to pass to the C pre-processor (i.e. to both the
1054 C and the C++ compilers) when building for the SDK. When building in
1055 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1056 to the value of this variable by default.
1057
Andrew Geisslerf0343792020-11-18 10:42:21 -06001058 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001059 Specifies the flags to pass to the C++ compiler when building for the
1060 SDK. When building in the ``nativesdk-`` context,
1061 :term:`CXXFLAGS` is set to the value of this variable
1062 by default.
1063
Andrew Geisslerf0343792020-11-18 10:42:21 -06001064 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001065 Specifies the flags to pass to the linker when building for the SDK.
1066 When building in the ``nativesdk-`` context,
1067 :term:`LDFLAGS` is set to the value of this variable
1068 by default.
1069
Andrew Geisslerf0343792020-11-18 10:42:21 -06001070 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001071 Points to the location of the directory that holds build statistics
1072 when you use and enable the
1073 :ref:`buildstats <ref-classes-buildstats>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001074 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001075 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1076
Andrew Geisslerf0343792020-11-18 10:42:21 -06001077 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001078 For the BusyBox recipe, specifies whether to split the output
1079 executable file into two parts: one for features that require
1080 ``setuid root``, and one for the remaining features (i.e. those that
1081 do not require ``setuid root``).
1082
Andrew Geissler09036742021-06-25 14:25:14 -05001083 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001084 splitting the output executable file. Set the variable to "0" to get
1085 a single output executable file.
1086
Andrew Geisslerf0343792020-11-18 10:42:21 -06001087 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001088 Specifies the directory BitBake uses to store a cache of the
1089 :term:`Metadata` so it does not need to be parsed every time
1090 BitBake is started.
1091
Andrew Geisslerf0343792020-11-18 10:42:21 -06001092 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001093 The minimal command and arguments used to run the C compiler.
1094
Andrew Geisslerf0343792020-11-18 10:42:21 -06001095 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001096 Specifies the flags to pass to the C compiler. This variable is
1097 exported to an environment variable and thus made visible to the
1098 software being built during the compilation step.
1099
Andrew Geissler09036742021-06-25 14:25:14 -05001100 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001101 being built:
1102
1103 - :term:`TARGET_CFLAGS` when building for the
1104 target
1105
1106 - :term:`BUILD_CFLAGS` when building for the
1107 build host (i.e. ``-native``)
1108
1109 - :term:`BUILDSDK_CFLAGS` when building for
1110 an SDK (i.e. ``nativesdk-``)
1111
Andrew Geisslerf0343792020-11-18 10:42:21 -06001112 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001113 An internal variable specifying the special class override that
1114 should currently apply (e.g. "class-target", "class-native", and so
1115 forth). The classes that use this variable (e.g.
1116 :ref:`native <ref-classes-native>`,
1117 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1118 variable to appropriate values.
1119
1120 .. note::
1121
Andrew Geissler5f350902021-07-23 13:09:54 -04001122 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001123 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001124
1125 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001126 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001127
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001128 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001129 install my-extra-file ${D}${sysconfdir}
1130 }
1131
1132 Here is an example where ``FOO`` is set to
1133 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001134 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001135
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001136 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001137 FOO = "other"
1138
Andrew Geissler09036742021-06-25 14:25:14 -05001139 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001140 that it is included in the default value of
1141 :term:`OVERRIDES`.
1142
Andrew Geisslerf0343792020-11-18 10:42:21 -06001143 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001144 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001145 ``make clean`` command does not work for the software being built.
1146 Consequently, the OpenEmbedded build system will not try to run
1147 ``make clean`` during the :ref:`ref-tasks-configure`
1148 task, which is the default behavior.
1149
Andrew Geisslerf0343792020-11-18 10:42:21 -06001150 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001151 Provides a list of hardware features that are enabled in both
1152 :term:`MACHINE_FEATURES` and
1153 :term:`DISTRO_FEATURES`. This select list of
1154 features contains features that make sense to be controlled both at
1155 the machine and distribution configuration level. For example, the
1156 "bluetooth" feature requires hardware support but should also be
1157 optional at the distribution level, in case the hardware supports
1158 Bluetooth but you do not ever intend to use it.
1159
Andrew Geisslerf0343792020-11-18 10:42:21 -06001160 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001161 Points to ``meta/files/common-licenses`` in the
1162 :term:`Source Directory`, which is where generic license
1163 files reside.
1164
Andrew Geisslerf0343792020-11-18 10:42:21 -06001165 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001166 A regular expression that resolves to one or more hosts (when the
1167 recipe is native) or one or more targets (when the recipe is
1168 non-native) with which a recipe is compatible. The regular expression
1169 is matched against :term:`HOST_SYS`. You can use the
1170 variable to stop recipes from being built for classes of systems with
1171 which the recipes are not compatible. Stopping these builds is
1172 particularly useful with kernels. The variable also helps to increase
1173 parsing speed since the build system skips parsing recipes not
1174 compatible with the current system.
1175
Andrew Geisslerf0343792020-11-18 10:42:21 -06001176 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001177 A regular expression that resolves to one or more target machines
1178 with which a recipe is compatible. The regular expression is matched
1179 against :term:`MACHINEOVERRIDES`. You can use
1180 the variable to stop recipes from being built for machines with which
1181 the recipes are not compatible. Stopping these builds is particularly
1182 useful with kernels. The variable also helps to increase parsing
1183 speed since the build system skips parsing recipes not compatible
1184 with the current machine.
1185
Andrew Geisslerf0343792020-11-18 10:42:21 -06001186 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001187 Defines wildcards to match when installing a list of complementary
1188 packages for all the packages explicitly (or implicitly) installed in
1189 an image.
1190
1191 .. note::
1192
Andrew Geissler09036742021-06-25 14:25:14 -05001193 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001194 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1195 which is similar to the Unix style pathname pattern expansion
1196 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001197
1198 The resulting list of complementary packages is associated with an
1199 item that can be added to
1200 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001201 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001202 will install -dev packages (containing headers and other development
1203 files) for every package in the image.
1204
1205 To add a new feature item pointing to a wildcard, use a variable flag
1206 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001207 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001208
1209 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1210
Andrew Geisslerf0343792020-11-18 10:42:21 -06001211 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001212 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001213 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001214 sysroots for other recipes.
1215
1216 The default is
1217 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1218 (i.e.
1219 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1220
Andrew Geisslerf0343792020-11-18 10:42:21 -06001221 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001222 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001223 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001224 ``build/conf/`` compatibility changes.
1225
Andrew Geisslerf0343792020-11-18 10:42:21 -06001226 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001227 Identifies editable or configurable files that are part of a package.
1228 If the Package Management System (PMS) is being used to update
1229 packages on the target system, it is possible that configuration
1230 files you have changed after the original installation and that you
1231 now want to remain unchanged are overwritten. In other words,
1232 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001233 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001234 variable to list the files in the package that you wish to prevent
1235 the PMS from overwriting during this update process.
1236
Andrew Geissler09036742021-06-25 14:25:14 -05001237 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001238 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001239 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001240
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001241 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001242 ${sysconfdir}/file2 ${sysconfdir}/file3"
1243
Andrew Geissler09036742021-06-25 14:25:14 -05001244 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1245 variables. The files listed within :term:`CONFFILES` must be a subset of
1246 the files listed within :term:`FILES`. Because the configuration files
1247 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001248 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001249 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001250 variable.
1251
1252 .. note::
1253
Andrew Geissler09036742021-06-25 14:25:14 -05001254 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001255 good practice to use appropriate path variables.
1256 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1257 rather than ``/usr/bin``. You can find a list of these variables at
1258 the top of the ``meta/conf/bitbake.conf`` file in the
1259 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001260
Andrew Geisslerf0343792020-11-18 10:42:21 -06001261 :term:`CONFIG_INITRAMFS_SOURCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001262 Identifies the initial RAM filesystem (initramfs) source files. The
1263 OpenEmbedded build system receives and uses this kernel Kconfig
1264 variable as an environment variable. By default, the variable is set
1265 to null ("").
1266
Andrew Geissler09036742021-06-25 14:25:14 -05001267 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001268 with a ``.cpio`` suffix or a space-separated list of directories and
1269 files for building the initramfs image. A cpio archive should contain
1270 a filesystem archive to be used as an initramfs image. Directories
1271 should contain a filesystem layout to be included in the initramfs
1272 image. Files should contain entries according to the format described
1273 by the ``usr/gen_init_cpio`` program in the kernel tree.
1274
1275 If you specify multiple directories and files, the initramfs image
1276 will be the aggregate of all of them.
1277
1278 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001279 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001280 in the Yocto Project Development Tasks Manual.
1281
Andrew Geisslerf0343792020-11-18 10:42:21 -06001282 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001283 A list of files that contains ``autoconf`` test results relevant to
1284 the current build. This variable is used by the Autotools utilities
1285 when running ``configure``.
1286
Andrew Geisslerf0343792020-11-18 10:42:21 -06001287 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001288 The minimal arguments for GNU configure.
1289
Andrew Geisslerf0343792020-11-18 10:42:21 -06001290 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001291 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001292 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001293 class, this variable identifies distribution features that would be
1294 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001295 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1296 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001297 the recipe will be skipped, and if the build system attempts to build
1298 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001299
Andrew Geissler615f2f12022-07-15 14:00:58 -05001300 :term:`CONVERSION_CMD`
1301 This variable is used for storing image conversion commands.
1302 Image conversion can convert an image into different objects like:
1303
1304 - Compressed version of the image
1305
1306 - Checksums for the image
1307
1308 An example of :term:`CONVERSION_CMD` from :ref:`image-types
1309 <ref-classes-image_types>` class is::
1310
1311 CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
1312
Andrew Geissler9aee5002022-03-30 16:27:02 +00001313 :term:`COPY_LIC_DIRS`
1314 If set to "1" along with the
1315 :term:`COPY_LIC_MANIFEST` variable, the
1316 OpenEmbedded build system copies into the image the license files,
1317 which are located in ``/usr/share/common-licenses``, for each
1318 package. The license files are placed in directories within the image
1319 itself during build time.
1320
1321 .. note::
1322
1323 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1324 newly installed packages to an image, which might be most suitable for
1325 read-only filesystems that cannot be upgraded. See the
1326 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1327 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1328 section in the Yocto Project Development Tasks Manual for
1329 information on providing license text.
1330
1331 :term:`COPY_LIC_MANIFEST`
1332 If set to "1", the OpenEmbedded build system copies the license
1333 manifest for the image to
1334 ``/usr/share/common-licenses/license.manifest`` within the image
1335 itself during build time.
1336
1337 .. note::
1338
1339 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1340 newly installed packages to an image, which might be most suitable for
1341 read-only filesystems that cannot be upgraded. See the
1342 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1343 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1344 section in the Yocto Project Development Tasks Manual for
1345 information on providing license text.
1346
Andrew Geisslerf0343792020-11-18 10:42:21 -06001347 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001348 A space-separated list of licenses to exclude from the source
1349 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1350 other words, if a license in a recipe's
1351 :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001352 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001353 class.
1354
1355 .. note::
1356
Andrew Geissler09036742021-06-25 14:25:14 -05001357 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001358 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001359
1360 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001361 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001362 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001363 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001364
Andrew Geisslerf0343792020-11-18 10:42:21 -06001365 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001366 A space-separated list of licenses to include in the source archived
1367 by the :ref:`archiver <ref-classes-archiver>` class. In other
1368 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001369 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001370 source is archived by the class.
1371
1372 The default value is set by the
1373 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001374 is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001375 "GPL*", "LGPL*", and "AGPL*".
1376
Andrew Geisslerf0343792020-11-18 10:42:21 -06001377 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001378 A list of recipes to exclude in the source archived by the
1379 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001380 :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001381 exclusion caused through the
1382 :term:`COPYLEFT_LICENSE_INCLUDE` and
1383 :term:`COPYLEFT_LICENSE_EXCLUDE`
1384 variables, respectively.
1385
1386 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001387 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001388 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001389 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001390
Andrew Geisslerf0343792020-11-18 10:42:21 -06001391 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001392 A list of recipes to include in the source archived by the
1393 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001394 :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001395 exclusion caused through the
1396 :term:`COPYLEFT_LICENSE_INCLUDE` and
1397 :term:`COPYLEFT_LICENSE_EXCLUDE`
1398 variables, respectively.
1399
1400 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001401 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001402 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001403 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001404
Andrew Geisslerf0343792020-11-18 10:42:21 -06001405 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001406 A space-separated list of recipe types to include in the source
1407 archived by the :ref:`archiver <ref-classes-archiver>` class.
1408 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1409 ``crosssdk``, and ``cross-canadian``.
1410
Andrew Geissler09036742021-06-25 14:25:14 -05001411 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001412 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
Andrew Geissler595f6302022-01-24 19:11:47 +00001413 class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001414
Andrew Geisslerf0343792020-11-18 10:42:21 -06001415 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001416 Specifies the list of packages to be added to the image. You should
1417 only set this variable in the ``local.conf`` configuration file found
1418 in the :term:`Build Directory`.
1419
1420 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1421 supported.
1422
Andrew Geisslerf0343792020-11-18 10:42:21 -06001423 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001424 Specifies the parent directory of the OpenEmbedded-Core Metadata
1425 layer (i.e. ``meta``).
1426
Andrew Geissler09036742021-06-25 14:25:14 -05001427 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001428 of this layer and not the layer itself. Consider an example where you
1429 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001430 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001431 points to the ``poky`` folder because it is the parent directory of
1432 the ``poky/meta`` layer.
1433
Andrew Geisslerf0343792020-11-18 10:42:21 -06001434 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001435 Lists files from the :term:`COREBASE` directory that
1436 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001437 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001438 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001439 into the extensible SDK.
1440
Andrew Geissler09036742021-06-25 14:25:14 -05001441 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001442 typically contains build directories and other files that should not
1443 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001444 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001445 are actually needed.
1446
Andrew Geisslerf0343792020-11-18 10:42:21 -06001447 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001448 The minimal command and arguments used to run the C preprocessor.
1449
Andrew Geisslerf0343792020-11-18 10:42:21 -06001450 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001451 Specifies the flags to pass to the C pre-processor (i.e. to both the
1452 C and the C++ compilers). This variable is exported to an environment
1453 variable and thus made visible to the software being built during the
1454 compilation step.
1455
Andrew Geissler09036742021-06-25 14:25:14 -05001456 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001457 being built:
1458
1459 - :term:`TARGET_CPPFLAGS` when building for
1460 the target
1461
1462 - :term:`BUILD_CPPFLAGS` when building for the
1463 build host (i.e. ``-native``)
1464
1465 - :term:`BUILDSDK_CPPFLAGS` when building
1466 for an SDK (i.e. ``nativesdk-``)
1467
Andrew Geisslerf0343792020-11-18 10:42:21 -06001468 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001469 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001470 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001471 :term:`TARGET_PREFIX` variable.
1472
1473 .. note::
1474
Andrew Geissler09036742021-06-25 14:25:14 -05001475 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001476 variable only in certain contexts (e.g. when building for kernel
1477 and kernel module recipes).
1478
Andrew Geissler9aee5002022-03-30 16:27:02 +00001479 :term:`CVE_CHECK_IGNORE`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001480 The list of CVE IDs which are ignored. Here is
1481 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1482
1483 # This is windows only issue.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001484 CVE_CHECK_IGNORE += "CVE-2020-15523"
1485
1486 :term:`CVE_CHECK_SKIP_RECIPE`
1487 The list of package names (:term:`PN`) for which
1488 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001489
Patrick Williams213cb262021-08-07 19:21:33 -05001490 :term:`CVE_PRODUCT`
1491 In a recipe, defines the name used to match the recipe name
1492 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1493
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001494 The default is ${:term:`BPN`}. If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001495 database or matches with multiple entries in the database, the default
1496 value needs to be changed.
1497
1498 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1499
1500 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1501
Patrick Williams03907ee2022-05-01 06:28:52 -05001502 Sometimes the product name is not specific enough, for example
1503 "tar" has been matching CVEs for the GNU ``tar`` package and also
1504 the ``node-tar`` node.js extension. To avoid this problem, use the
1505 vendor name as a prefix. The syntax for this is::
1506
1507 CVE_PRODUCT = "vendor:package"
1508
Andrew Geisslerf0343792020-11-18 10:42:21 -06001509 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001510 The directory in which files checked out under the CVS system are
1511 stored.
1512
Andrew Geisslerf0343792020-11-18 10:42:21 -06001513 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001514 The minimal command and arguments used to run the C++ compiler.
1515
Andrew Geisslerf0343792020-11-18 10:42:21 -06001516 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001517 Specifies the flags to pass to the C++ compiler. This variable is
1518 exported to an environment variable and thus made visible to the
1519 software being built during the compilation step.
1520
Andrew Geissler09036742021-06-25 14:25:14 -05001521 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001522 being built:
1523
1524 - :term:`TARGET_CXXFLAGS` when building for
1525 the target
1526
1527 - :term:`BUILD_CXXFLAGS` when building for the
1528 build host (i.e. ``-native``)
1529
1530 - :term:`BUILDSDK_CXXFLAGS` when building
1531 for an SDK (i.e. ``nativesdk-``)
1532
Andrew Geisslerf0343792020-11-18 10:42:21 -06001533 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001534 The destination directory. The location in the :term:`Build Directory`
1535 where components are installed by the
1536 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001537 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001538
1539 ${WORKDIR}/image
1540
1541 .. note::
1542
1543 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001544 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001545
Andrew Geisslerf0343792020-11-18 10:42:21 -06001546 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001547 The date the build was started. Dates appear using the year, month,
1548 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1549
Andrew Geisslerf0343792020-11-18 10:42:21 -06001550 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001551 The date and time on which the current build started. The format is
1552 suitable for timestamps.
1553
Andrew Geisslerf0343792020-11-18 10:42:21 -06001554 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001555 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001556 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001557 particular package should not be renamed according to Debian library
1558 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001559 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001560
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001561 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001562
Andrew Geisslerf0343792020-11-18 10:42:21 -06001563 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001564 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001565 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001566 the library name for an individual package. Overriding the library
1567 name in these cases is rare. You must use the package name as an
1568 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001569 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001570
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001571 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001572
Andrew Geisslerf0343792020-11-18 10:42:21 -06001573 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001574 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001575 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001576
Andrew Geisslerf0343792020-11-18 10:42:21 -06001577 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001578 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001579 compiling a system for debugging. This variable defaults to "-O
1580 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1581
Andrew Geisslereff27472021-10-29 15:35:00 -05001582 :term:`DEBUG_PREFIX_MAP`
1583 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1584 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1585 replace build-time paths by install-time ones in the debugging sections
1586 of binaries. This makes compiler output files location independent,
1587 at the cost of having to pass an extra command to tell the debugger
1588 where source files are.
1589
1590 This is used by the Yocto Project to guarantee
1591 :doc:`/test-manual/reproducible-builds` even when the source code of
1592 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1593 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1594 website for details.
1595
1596 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1597 not intended to be user-configurable.
1598
Andrew Geissler9aee5002022-03-30 16:27:02 +00001599 :term:`DEFAULT_PREFERENCE`
1600 Specifies a weak bias for recipe selection priority.
1601
1602 The most common usage of this is variable is to set it to "-1" within
1603 a recipe for a development version of a piece of software. Using the
1604 variable in this way causes the stable version of the recipe to build
1605 by default in the absence of :term:`PREFERRED_VERSION` being used to
1606 build the development version.
1607
1608 .. note::
1609
1610 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1611 by :term:`BBFILE_PRIORITY` if that variable is different between two
1612 layers that contain different versions of the same recipe.
1613
Andrew Geisslerf0343792020-11-18 10:42:21 -06001614 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001615 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1616 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001617 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001618 :term:`TUNE_FEATURES`.
1619
1620 The default tune is either implicitly or explicitly set by the
1621 machine (:term:`MACHINE`). However, you can override
1622 the setting using available tunes as defined with
1623 :term:`AVAILTUNES`.
1624
Andrew Geisslerf0343792020-11-18 10:42:21 -06001625 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001626 Lists a recipe's build-time dependencies. These are dependencies on
1627 other recipes whose contents (e.g. headers and shared libraries) are
1628 needed by the recipe at build time.
1629
1630 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001631 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001632
1633 DEPENDS = "bar"
1634
1635 The practical effect of the previous
1636 assignment is that all files installed by bar will be available in
1637 the appropriate staging sysroot, given by the
1638 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1639 :ref:`ref-tasks-configure` task for ``foo`` runs.
1640 This mechanism is implemented by having ``do_configure`` depend on
1641 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001642 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001643 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1644 declaration in the :ref:`base <ref-classes-base>` class.
1645
1646 .. note::
1647
Andrew Geissler09036742021-06-25 14:25:14 -05001648 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001649 explicitly. The standard classes and build-related variables are
1650 configured to automatically use the appropriate staging sysroots.
1651
Andrew Geissler09036742021-06-25 14:25:14 -05001652 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001653 that run on the build machine during the build. For example, a recipe
1654 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001655 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001656
1657 DEPENDS = "codegen-native"
1658
1659 For more
1660 information, see the :ref:`native <ref-classes-native>` class and
1661 the :term:`EXTRANATIVEPATH` variable.
1662
1663 .. note::
1664
Andrew Geissler09036742021-06-25 14:25:14 -05001665 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001666 it is a list of :term:`PROVIDES` names, which
1667 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001668 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001669 instead, as this will put files from all the packages that make
1670 up ``foo``, which includes those from ``foo-dev``, into the
1671 sysroot.
1672
Andrew Geissler09036742021-06-25 14:25:14 -05001673 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001674 itself add any runtime dependencies between the packages
1675 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001676 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001677 section in the Yocto Project Overview and Concepts Manual,
1678 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001679 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001680
Andrew Geissler09036742021-06-25 14:25:14 -05001681 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001682 recipes that install precompiled components. For example, if
1683 ``libfoo`` is a precompiled library that links against
1684 ``libbar``, then linking against ``libfoo`` requires both
1685 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001686 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001687 to the recipe that installs ``libbar``, other recipes might
1688 fail to link against ``libfoo``.
1689
1690 For information on runtime dependencies, see the
1691 :term:`RDEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05001692 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1693 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001694 BitBake User Manual for additional information on tasks and
1695 dependencies.
1696
Andrew Geisslerf0343792020-11-18 10:42:21 -06001697 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001698 Points to the general area that the OpenEmbedded build system uses to
1699 place images, packages, SDKs, and other output files that are ready
1700 to be used outside of the build system. By default, this directory
1701 resides within the :term:`Build Directory` as
1702 ``${TMPDIR}/deploy``.
1703
1704 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001705 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001706 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001707 ":ref:`overview-manual/concepts:images`",
1708 ":ref:`overview-manual/concepts:package feeds`", and
1709 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001710 Yocto Project Overview and Concepts Manual.
1711
Andrew Geisslerf0343792020-11-18 10:42:21 -06001712 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001713 Points to the area that the OpenEmbedded build system uses to place
1714 Debian packages that are ready to be used outside of the build
1715 system. This variable applies only when
1716 :term:`PACKAGE_CLASSES` contains
1717 "package_deb".
1718
1719 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001720 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001721 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001722
1723 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1724
1725 The :ref:`package_deb <ref-classes-package_deb>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001726 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001727 :ref:`ref-tasks-package_write_deb` task
1728 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001729 information on how packaging works, see the
1730 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001731 in the Yocto Project Overview and Concepts Manual.
1732
Andrew Geisslerf0343792020-11-18 10:42:21 -06001733 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001734 Points to the area that the OpenEmbedded build system uses to place
1735 images and other associated output files that are ready to be
1736 deployed onto the target machine. The directory is machine-specific
1737 as it contains the ``${MACHINE}`` name. By default, this directory
1738 resides within the :term:`Build Directory` as
1739 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1740
Andrew Geissler09036742021-06-25 14:25:14 -05001741 It must not be used directly in recipes when deploying files. Instead,
1742 it's only useful when a recipe needs to "read" a file already deployed
1743 by a dependency. So, it should be filled with the contents of
1744 :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1745 with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1746 <ref-classes-image>` class.
1747
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001748 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001749 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001750 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001751 ":ref:`overview-manual/concepts:images`" and
1752 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001753 the Yocto Project Overview and Concepts Manual.
1754
Andrew Geisslerf0343792020-11-18 10:42:21 -06001755 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001756 Points to the area that the OpenEmbedded build system uses to place
1757 IPK packages that are ready to be used outside of the build system.
1758 This variable applies only when
1759 :term:`PACKAGE_CLASSES` contains
1760 "package_ipk".
1761
1762 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001763 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001764
1765 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1766
1767 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001768 :term:`DEPLOY_DIR_IPK` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001769 :ref:`ref-tasks-package_write_ipk` task
1770 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001771 on how packaging works, see the
1772 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001773 in the Yocto Project Overview and Concepts Manual.
1774
Andrew Geisslerf0343792020-11-18 10:42:21 -06001775 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001776 Points to the area that the OpenEmbedded build system uses to place
1777 RPM packages that are ready to be used outside of the build system.
1778 This variable applies only when
1779 :term:`PACKAGE_CLASSES` contains
1780 "package_rpm".
1781
1782 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001783 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001784
1785 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1786
1787 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001788 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001789 :ref:`ref-tasks-package_write_rpm` task
1790 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001791 on how packaging works, see the
1792 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001793 in the Yocto Project Overview and Concepts Manual.
1794
Andrew Geisslerf0343792020-11-18 10:42:21 -06001795 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001796 Points to the area that the OpenEmbedded build system uses to place
1797 tarballs that are ready to be used outside of the build system. This
1798 variable applies only when
1799 :term:`PACKAGE_CLASSES` contains
1800 "package_tar".
1801
1802 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001803 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001804
1805 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1806
1807 The :ref:`package_tar <ref-classes-package_tar>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001808 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001809 :ref:`ref-tasks-package_write_tar` task
1810 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001811 on how packaging works, see the
1812 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001813 in the Yocto Project Overview and Concepts Manual.
1814
Andrew Geisslerf0343792020-11-18 10:42:21 -06001815 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001816 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001817 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler595f6302022-01-24 19:11:47 +00001818 is set in the :ref:`deploy <ref-classes-deploy>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001819
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001820 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001821
Andrew Geissler595f6302022-01-24 19:11:47 +00001822 Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05001823 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001824 them into :term:`DEPLOY_DIR_IMAGE`
1825 afterwards.
1826
Andrew Geisslerf0343792020-11-18 10:42:21 -06001827 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001828 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05001829 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001830 variable.
1831
Andrew Geisslerf0343792020-11-18 10:42:21 -06001832 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001833 The short name of the distribution. For information on the long name
1834 of the distribution, see the :term:`DISTRO_NAME`
1835 variable.
1836
Andrew Geissler09036742021-06-25 14:25:14 -05001837 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001838 file whose root name is the same as the variable's argument and whose
1839 filename extension is ``.conf``. For example, the distribution
1840 configuration file for the Poky distribution is named ``poky.conf``
1841 and resides in the ``meta-poky/conf/distro`` directory of the
1842 :term:`Source Directory`.
1843
Andrew Geissler09036742021-06-25 14:25:14 -05001844 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05001845 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001846
1847 DISTRO = "poky"
1848
1849 Distribution configuration files are located in a ``conf/distro``
1850 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05001851 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001852 spaces, and is typically all lower-case.
1853
1854 .. note::
1855
Andrew Geissler09036742021-06-25 14:25:14 -05001856 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001857 are used, which are specified within
1858 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001859
Andrew Geisslerf0343792020-11-18 10:42:21 -06001860 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001861 Specifies a codename for the distribution being built.
1862
Andrew Geisslerf0343792020-11-18 10:42:21 -06001863 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001864 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00001865 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001866 variable only really applies to the more full-featured images that
1867 include ``packagegroup-base``. You can use this variable to keep
1868 distro policy out of generic images. As with all other distro
1869 variables, you set this variable in the distro ``.conf`` file.
1870
Andrew Geisslerf0343792020-11-18 10:42:21 -06001871 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001872 Specifies a list of distro-specific packages to add to all images if
1873 the packages exist. The packages might not exist or be empty (e.g.
1874 kernel modules). The list of packages are automatically installed but
1875 you can remove them.
1876
Andrew Geisslerf0343792020-11-18 10:42:21 -06001877 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001878 The software support you want in your distribution for various
1879 features. You define your distribution features in the distribution
1880 configuration file.
1881
1882 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05001883 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001884 to the configure script during the
1885 :ref:`ref-tasks-configure` task for recipes that
1886 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05001887 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001888 target that can optionally support X11 to have its X11 support
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05001889 enabled.
1890
1891 .. note::
1892
1893 Just enabling :term:`DISTRO_FEATURES` alone doesn't
1894 enable feature support for packages. Mechanisms such as making
1895 :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used
1896 to enable/disable package features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001897
1898 Two more examples are Bluetooth and NFS support. For a more complete
1899 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001900 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001901
Andrew Geisslerf0343792020-11-18 10:42:21 -06001902 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05001903 Features to be added to :term:`DISTRO_FEATURES` if not also present in
1904 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001905
1906 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1907 not intended to be user-configurable. It is best to just reference
1908 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001909 all distro configurations. See the ":ref:`ref-features-backfill`" section
1910 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001911
Andrew Geisslerf0343792020-11-18 10:42:21 -06001912 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05001913 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1914 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001915 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001916
Andrew Geisslerf0343792020-11-18 10:42:21 -06001917 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001918 A convenience variable that gives you the default list of distro
1919 features with the exception of any features specific to the C library
1920 (``libc``).
1921
1922 When creating a custom distribution, you might find it useful to be
1923 able to reuse the default
1924 :term:`DISTRO_FEATURES` options without the
1925 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05001926 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001927
1928 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1929
Andrew Geisslerf0343792020-11-18 10:42:21 -06001930 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001931 Specifies a list of features that if present in the target
1932 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001933 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001934 variable is used in addition to the features filtered using the
1935 :term:`DISTRO_FEATURES_NATIVE`
1936 variable.
1937
Andrew Geisslerf0343792020-11-18 10:42:21 -06001938 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001939 Specifies a list of features that if present in the target
1940 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001941 included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001942 variable is used in addition to the features filtered using the
1943 :term:`DISTRO_FEATURES_NATIVESDK`
1944 variable.
1945
Andrew Geisslerf0343792020-11-18 10:42:21 -06001946 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001947 Specifies a list of features that should be included in
1948 :term:`DISTRO_FEATURES` when building native
1949 recipes. This variable is used in addition to the features filtered
1950 using the
1951 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1952 variable.
1953
Andrew Geisslerf0343792020-11-18 10:42:21 -06001954 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001955 Specifies a list of features that should be included in
1956 :term:`DISTRO_FEATURES` when building
1957 nativesdk recipes. This variable is used in addition to the features
1958 filtered using the
1959 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1960 variable.
1961
Andrew Geisslerf0343792020-11-18 10:42:21 -06001962 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001963 The long name of the distribution. For information on the short name
1964 of the distribution, see the :term:`DISTRO` variable.
1965
Andrew Geissler09036742021-06-25 14:25:14 -05001966 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001967 configuration file whose root name is the same as the variable's
1968 argument and whose filename extension is ``.conf``. For example, the
1969 distribution configuration file for the Poky distribution is named
1970 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1971 of the :term:`Source Directory`.
1972
Andrew Geissler09036742021-06-25 14:25:14 -05001973 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05001974 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001975
1976 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1977
1978 Distribution configuration files are located in a ``conf/distro``
1979 directory within the :term:`Metadata` that contains the
1980 distribution configuration.
1981
1982 .. note::
1983
Andrew Geissler09036742021-06-25 14:25:14 -05001984 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001985 configurations are used, which are specified within
1986 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001987
Andrew Geisslerf0343792020-11-18 10:42:21 -06001988 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001989 The version of the distribution.
1990
Andrew Geisslerf0343792020-11-18 10:42:21 -06001991 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001992 A colon-separated list of overrides specific to the current
1993 distribution. By default, this list includes the value of
1994 :term:`DISTRO`.
1995
Andrew Geissler09036742021-06-25 14:25:14 -05001996 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001997 apply to the distribution.
1998
Andrew Geissler09036742021-06-25 14:25:14 -05001999 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002000 is included in the default value of
2001 :term:`OVERRIDES`.
2002
Andrew Geisslerf0343792020-11-18 10:42:21 -06002003 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002004 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05002005 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002006 for everything except Git repositories. If you want tarballs of Git
2007 repositories, use the
2008 :term:`BB_GENERATE_MIRROR_TARBALLS`
2009 variable.
2010
Andrew Geissler09036742021-06-25 14:25:14 -05002011 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002012 ``conf/local.conf`` file. This directory is self-maintaining and you
2013 should not have to touch it. By default, the directory is
2014 ``downloads`` in the :term:`Build Directory`.
2015 ::
2016
2017 #DL_DIR ?= "${TOPDIR}/downloads"
2018
2019 To specify a different download directory,
2020 simply remove the comment from the line and provide your directory.
2021
2022 During a first build, the system downloads many different source code
2023 tarballs from various upstream projects. Downloading can take a
2024 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002025 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002026 system looks there first to find source tarballs.
2027
2028 .. note::
2029
2030 When wiping and rebuilding, you can preserve this directory to
2031 speed up this part of subsequent builds.
2032
2033 You can safely share this directory between multiple builds on the
2034 same development machine. For additional information on how the build
2035 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002036 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002037 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002038 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002039 Wiki page.
2040
Andrew Geisslerf0343792020-11-18 10:42:21 -06002041 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002042 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2043 class, this variable sets the compression policy used when the
2044 OpenEmbedded build system compresses man pages and info pages. By
2045 default, the compression method used is gz (gzip). Other policies
2046 available are xz and bz2.
2047
2048 For information on policies and on how to use this variable, see the
2049 comments in the ``meta/classes/compress_doc.bbclass`` file.
2050
Andrew Geisslerf0343792020-11-18 10:42:21 -06002051 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002052 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2053 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002054 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002055 default is "grub-efi", but "systemd-boot" can be used instead.
2056
2057 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2058 :ref:`image-live <ref-classes-image-live>` classes for more
2059 information.
2060
Andrew Geisslerf0343792020-11-18 10:42:21 -06002061 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002062 Variable that controls which locales for ``glibc`` are generated
2063 during the build (useful if the target device has 64Mbytes of RAM or
2064 less).
2065
Andrew Geisslerf0343792020-11-18 10:42:21 -06002066 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002067 When used with the :ref:`report-error <ref-classes-report-error>`
2068 class, specifies the path used for storing the debug files created by
2069 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002070 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002071 allows you to submit build errors you encounter to a central
2072 database. By default, the value of this variable is
2073 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2074
Andrew Geissler09036742021-06-25 14:25:14 -05002075 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002076 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002077 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002078
2079 ERR_REPORT_DIR = "path"
2080
Andrew Geisslerf0343792020-11-18 10:42:21 -06002081 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002082 Specifies the quality assurance checks whose failures are reported as
2083 errors by the OpenEmbedded build system. You set this variable in
2084 your distribution configuration file. For a list of the checks you
2085 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002086 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002087
Andrew Geissler9aee5002022-03-30 16:27:02 +00002088 :term:`ESDK_CLASS_INHERIT_DISABLE`
2089 A list of classes to remove from the :term:`INHERIT`
2090 value globally within the extensible SDK configuration. The
2091 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2092 default value::
2093
2094 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2095
2096 Some classes are not generally applicable within the extensible SDK
2097 context. You can use this variable to disable those classes.
2098
2099 For additional information on how to customize the extensible SDK's
2100 configuration, see the
2101 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2102 section in the Yocto Project Application Development and the
2103 Extensible Software Development Kit (eSDK) manual.
2104
2105 :term:`ESDK_LOCALCONF_ALLOW`
2106 A list of variables allowed through from the OpenEmbedded build
2107 system configuration into the extensible SDK configuration. By
2108 default, the list of variables is empty and is set in the
2109 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2110
2111 This list overrides the variables specified using the
2112 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2113 other variables automatically added due to the "/" character
2114 being found at the start of the
2115 value, which is usually indicative of being a path and thus might not
2116 be valid on the system where the SDK is installed.
2117
2118 For additional information on how to customize the extensible SDK's
2119 configuration, see the
2120 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2121 section in the Yocto Project Application Development and the
2122 Extensible Software Development Kit (eSDK) manual.
2123
2124 :term:`ESDK_LOCALCONF_REMOVE`
2125 A list of variables not allowed through from the OpenEmbedded build
2126 system configuration into the extensible SDK configuration. Usually,
2127 these are variables that are specific to the machine on which the
2128 build system is running and thus would be potentially problematic
2129 within the extensible SDK.
2130
2131 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2132 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2133 excludes the following variables:
2134
2135 - :term:`CONF_VERSION`
2136 - :term:`BB_NUMBER_THREADS`
2137 - :term:`BB_NUMBER_PARSE_THREADS`
2138 - :term:`PARALLEL_MAKE`
2139 - :term:`PRSERV_HOST`
2140 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2141 - :term:`SSTATE_DIR` :term:`TMPDIR`
2142 - :term:`BB_SERVER_TIMEOUT`
2143
2144 For additional information on how to customize the extensible SDK's
2145 configuration, see the
2146 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2147 section in the Yocto Project Application Development and the
2148 Extensible Software Development Kit (eSDK) manual.
2149
Andrew Geisslerf0343792020-11-18 10:42:21 -06002150 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002151 Triggers the OpenEmbedded build system's shared libraries resolver to
2152 exclude an entire package when scanning for shared libraries.
2153
2154 .. note::
2155
2156 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002157 the internal function ``package_do_shlibs``, which is part of the
2158 :ref:`ref-tasks-package` task. You should be aware that the shared
2159 libraries resolver might implicitly define some dependencies between
2160 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002161
Andrew Geissler09036742021-06-25 14:25:14 -05002162 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002163 :term:`PRIVATE_LIBS` variable, which excludes a
2164 package's particular libraries only and not the whole package.
2165
Andrew Geissler09036742021-06-25 14:25:14 -05002166 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002167 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002168
2169 EXCLUDE_FROM_SHLIBS = "1"
2170
Andrew Geisslerf0343792020-11-18 10:42:21 -06002171 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002172 Directs BitBake to exclude a recipe from world builds (i.e.
2173 ``bitbake world``). During world builds, BitBake locates, parses and
2174 builds all recipes found in every layer exposed in the
2175 ``bblayers.conf`` configuration file.
2176
2177 To exclude a recipe from a world build using this variable, set the
2178 variable to "1" in the recipe.
2179
2180 .. note::
2181
Andrew Geissler09036742021-06-25 14:25:14 -05002182 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002183 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002184 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002185 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002186
Andrew Geisslerf0343792020-11-18 10:42:21 -06002187 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002188 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002189 version based on the recipe's :term:`PE` value. If :term:`PE`
2190 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2191 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2192 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2193 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002194
2195 See the :term:`STAMP` variable for an example.
2196
Andrew Geisslerf0343792020-11-18 10:42:21 -06002197 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002198 The full package version specification as it appears on the final
2199 packages produced by a recipe. The variable's value is normally used
2200 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002201 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002202
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002203 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002204
2205 The dependency relationships are intended to force the package
2206 manager to upgrade these types of packages in lock-step.
2207
Andrew Geisslerf0343792020-11-18 10:42:21 -06002208 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002209 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002210 tools are not in the source tree.
2211
2212 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002213 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002214 variable tells the OpenEmbedded build system to prefer the installed
2215 external tools. See the
2216 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2217 ``meta/classes`` to see how the variable is used.
2218
Andrew Geisslerf0343792020-11-18 10:42:21 -06002219 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002220 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2221 class, this variable points to the source tree, which is outside of
2222 the OpenEmbedded build system. When set, this variable sets the
2223 :term:`S` variable, which is what the OpenEmbedded build
2224 system uses to locate unpacked recipe source code.
2225
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002226 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002227 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002228 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002229 section in the Yocto Project Development Tasks Manual.
2230
Andrew Geisslerf0343792020-11-18 10:42:21 -06002231 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002232 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2233 class, this variable points to the directory in which the recipe's
2234 source code is built, which is outside of the OpenEmbedded build
2235 system. When set, this variable sets the :term:`B` variable,
2236 which is what the OpenEmbedded build system uses to locate the Build
2237 Directory.
2238
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002239 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002240 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002241 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002242 section in the Yocto Project Development Tasks Manual.
2243
Andrew Geisslerf0343792020-11-18 10:42:21 -06002244 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002245 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
Andrew Geissler09036742021-06-25 14:25:14 -05002246 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002247 pass to the ``autoreconf`` command that is executed during the
2248 :ref:`ref-tasks-configure` task.
2249
2250 The default value is "--exclude=autopoint".
2251
Andrew Geisslerf0343792020-11-18 10:42:21 -06002252 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002253 A list of additional features to include in an image. When listing
2254 more than one feature, separate them with a space.
2255
2256 Typically, you configure this variable in your ``local.conf`` file,
2257 which is found in the :term:`Build Directory`.
2258 Although you can use this variable from within a recipe, best
2259 practices dictate that you do not.
2260
2261 .. note::
2262
2263 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002264 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002265
2266 Here are some examples of features you can add:
2267
Andrew Geissler615f2f12022-07-15 14:00:58 -05002268 - "dbg-pkgs" --- adds -dbg packages for all installed packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002269 symbol information for debugging and profiling.
2270
Andrew Geissler615f2f12022-07-15 14:00:58 -05002271 - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002272 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002273 'post-install-logging' features in the ":ref:`ref-features-image`"
2274 section for more information.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002275 - "dev-pkgs" --- adds -dev packages for all installed packages. This is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002276 useful if you want to develop against the libraries in the image.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002277 - "read-only-rootfs" --- creates an image whose root filesystem is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002278 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002279 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002280 section in the Yocto Project Development Tasks Manual for more
2281 information
Andrew Geissler615f2f12022-07-15 14:00:58 -05002282 - "tools-debug" --- adds debugging tools such as gdb and strace.
2283 - "tools-sdk" --- adds development tools such as gcc, make,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002284 pkgconfig and so forth.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002285 - "tools-testapps" --- adds useful testing tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002286 such as ts_print, aplay, arecord and so forth.
2287
2288 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002289 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002290
2291 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002292 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002293 section in the Yocto Project Development Tasks Manual.
2294
Andrew Geisslerf0343792020-11-18 10:42:21 -06002295 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002296 Specifies additional options for the image creation command that has
2297 been specified in :term:`IMAGE_CMD`. When setting
2298 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002299 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002300
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002301 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002302
Andrew Geisslerf0343792020-11-18 10:42:21 -06002303 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002304 A list of recipes to build that do not provide packages for
2305 installing into the root filesystem.
2306
2307 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002308 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002309 variable to list these recipes and thus specify the dependencies. A
2310 typical example is a required bootloader in a machine configuration.
2311
2312 .. note::
2313
2314 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002315 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002316
Andrew Geisslerf0343792020-11-18 10:42:21 -06002317 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002318 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2319 :ref:`cmake <ref-classes-cmake>` class for additional information.
2320
Andrew Geisslerf0343792020-11-18 10:42:21 -06002321 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002322 Additional ``configure`` script options. See
2323 :term:`PACKAGECONFIG_CONFARGS` for
2324 additional information on passing configure script options.
2325
Andrew Geisslerf0343792020-11-18 10:42:21 -06002326 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002327 Additional GNU ``make`` options.
2328
Andrew Geissler09036742021-06-25 14:25:14 -05002329 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002330 variable to specify any required GNU options.
2331
2332 :term:`PARALLEL_MAKE` and
2333 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002334 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002335
Andrew Geisslerf0343792020-11-18 10:42:21 -06002336 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002337 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2338 variable specifies additional configuration options you want to pass
2339 to the ``scons`` command line.
2340
Andrew Geisslerf0343792020-11-18 10:42:21 -06002341 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002342 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2343 class, this variable provides image level user and group operations.
2344 This is a more global method of providing user and group
2345 configuration as compared to using the
2346 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2347 group configurations to a specific recipe.
2348
2349 The set list of commands you can configure using the
Andrew Geissler595f6302022-01-24 19:11:47 +00002350 :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These
Andrew Geisslerc926e172021-05-07 16:11:35 -05002351 commands map to the normal Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002352
2353 # EXTRA_USERS_PARAMS = "\
2354 # useradd -p '' tester; \
2355 # groupadd developers; \
2356 # userdel nobody; \
2357 # groupdel -g video; \
2358 # groupmod -g 1020 developers; \
2359 # usermod -s /bin/sh tester; \
2360 # "
2361
Patrick Williams03907ee2022-05-01 06:28:52 -05002362 Hardcoded passwords are supported via the ``-p`` parameters for
2363 ``useradd`` or ``usermod``, but only hashed.
2364
2365 Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
2366 passwords. First on host, create the (escaped) password hash::
2367
2368 printf "%q" $(mkpasswd -m sha256crypt tester01)
2369
2370 The resulting hash is set to a variable and used in ``useradd`` command parameters::
2371
2372 inherit extrausers
2373 PASSWD = "\$X\$ABC123\$A-Long-Hash"
2374 EXTRA_USERS_PARAMS = "\
2375 useradd -p '${PASSWD}' tester-jim; \
2376 useradd -p '${PASSWD}' tester-sue; \
2377 "
2378
2379 Finally, here is an example that sets the root password::
2380
2381 inherit extrausers
2382 EXTRA_USERS_PARAMS = "\
2383 usermod -p '${PASSWD}' root; \
2384 "
2385
2386 .. note::
2387
2388 From a security perspective, hardcoding a default password is not
2389 generally a good idea or even legal in some jurisdictions. It is
2390 recommended that you do not do this if you are building a production
2391 image.
2392
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002393 Additionally there is a special ``passwd-expire`` command that will
2394 cause the password for a user to be expired and thus force changing it
2395 on first login, for example::
2396
2397 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2398
2399 .. note::
2400
2401 At present, ``passwd-expire`` may only work for remote logins when
2402 using OpenSSH and not dropbear as an SSH server.
2403
Andrew Geissler9aee5002022-03-30 16:27:02 +00002404 :term:`EXTRANATIVEPATH`
2405 A list of subdirectories of
2406 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2407 added to the beginning of the environment variable ``PATH``. As an
2408 example, the following prepends
2409 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2410 ``PATH``::
2411
2412 EXTRANATIVEPATH = "foo bar"
2413
Andrew Geisslerf0343792020-11-18 10:42:21 -06002414 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002415 Defines one or more packages to include in an image when a specific
2416 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002417 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002418 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002419
2420 FEATURE_PACKAGES_widget = "package1 package2"
2421
Andrew Geissler09036742021-06-25 14:25:14 -05002422 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002423 package1 and package2 would be included in the image.
2424
2425 .. note::
2426
Andrew Geissler09036742021-06-25 14:25:14 -05002427 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002428 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002429 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002430 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002431
Andrew Geisslerf0343792020-11-18 10:42:21 -06002432 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002433 Points to the base URL of the server and location within the
2434 document-root that provides the metadata and packages required by
2435 OPKG to support runtime package management of IPK packages. You set
2436 this variable in your ``local.conf`` file.
2437
Andrew Geisslerc926e172021-05-07 16:11:35 -05002438 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002439
2440 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2441
2442 This example assumes you are serving
2443 your packages over HTTP and your databases are located in a directory
2444 named ``BOARD-dir``, which is underneath your HTTP server's
2445 document-root. In this case, the OpenEmbedded build system generates
2446 a set of configuration files for you in your target that work with
2447 the feed.
2448
Andrew Geisslerf0343792020-11-18 10:42:21 -06002449 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002450 The list of files and directories that are placed in a package. The
2451 :term:`PACKAGES` variable lists the packages
2452 generated by a recipe.
2453
Andrew Geissler09036742021-06-25 14:25:14 -05002454 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002455 identifies the resulting package. Then, provide a space-separated
2456 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002457 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002458
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002459 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002460
2461 .. note::
2462
2463 - When specifying files or paths, you can pattern match using
2464 Python's
2465 `glob <https://docs.python.org/3/library/glob.html>`_
2466 syntax. For details on the syntax, see the documentation by
2467 following the previous link.
2468
Andrew Geissler09036742021-06-25 14:25:14 -05002469 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002470 good practice to use appropriate path variables. For example,
2471 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2472 rather than ``/usr/bin``. You can find a list of these
2473 variables at the top of the ``meta/conf/bitbake.conf`` file in
2474 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002475 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002476 this file.
2477
Andrew Geissler09036742021-06-25 14:25:14 -05002478 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002479 editable and you know they should not be overwritten during the
2480 package update process by the Package Management System (PMS), you
2481 can identify these files so that the PMS will not overwrite them. See
2482 the :term:`CONFFILES` variable for information on
2483 how to identify these files to the PMS.
2484
Andrew Geisslerf0343792020-11-18 10:42:21 -06002485 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002486 Defines the file specification to match
2487 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002488 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002489 symbolic link (symlink) for shared libraries on the target platform.
2490
2491 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002492 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002493
2494 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2495
Andrew Geisslerf0343792020-11-18 10:42:21 -06002496 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002497 Extends the search path the OpenEmbedded build system uses when
2498 looking for files and patches as it processes recipes and append
2499 files. The default directories BitBake uses when it processes recipes
2500 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002501 variable. You can extend :term:`FILESPATH` variable by using
2502 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002503
2504 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002505 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002506 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002507
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002508 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002509
2510 In the above example, the build system first
2511 looks for files in a directory that has the same name as the
2512 corresponding append file.
2513
2514 .. note::
2515
Andrew Geissler09036742021-06-25 14:25:14 -05002516 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002517 expansion (``:=``) operator. Immediate expansion makes sure that
2518 BitBake evaluates :term:`THISDIR` at the time the
2519 directive is encountered rather than at some later time when
2520 expansion might result in a directory that does not contain the
2521 files you need.
2522
2523 Also, include the trailing separating colon character if you are
2524 prepending. The trailing colon character is necessary because you
2525 are directing BitBake to extend the path by prepending directories
2526 to the search path.
2527
Andrew Geisslerc926e172021-05-07 16:11:35 -05002528 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002529
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002530 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002531
2532 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002533 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002534 in the same directory as the corresponding append file.
2535
Andrew Geisslerc926e172021-05-07 16:11:35 -05002536 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002537
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002538 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002539
2540 A final example shows how you can extend the search path and include
2541 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002542 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002543
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002544 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002545
2546 The previous statement appears in the
2547 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002548 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002549 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2550 override is a special :term:`PACKAGE_ARCH`
2551 definition for multiple ``meta-intel`` machines.
2552
2553 .. note::
2554
2555 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002556 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002557
2558 By prepending paths in ``.bbappend`` files, you allow multiple append
2559 files that reside in different layers but are used for the same
2560 recipe to correctly extend the path.
2561
Andrew Geisslerf0343792020-11-18 10:42:21 -06002562 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002563 A subset of :term:`OVERRIDES` used by the
2564 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002565 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002566 uses overrides to automatically extend the
2567 :term:`FILESPATH` variable. For an example of how
2568 that works, see the :term:`FILESPATH` variable
2569 description. Additionally, you find more information on how overrides
2570 are handled in the
2571 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2572 section of the BitBake User Manual.
2573
Andrew Geissler09036742021-06-25 14:25:14 -05002574 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002575
2576 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2577
2578 .. note::
2579
Andrew Geissler09036742021-06-25 14:25:14 -05002580 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002581 with expected overrides and are used in an expected manner by the
2582 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002583
Andrew Geisslerf0343792020-11-18 10:42:21 -06002584 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002585 The default set of directories the OpenEmbedded build system uses
2586 when searching for patches and files.
2587
2588 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002589 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002590 patches specified by each ``file://`` URI in a recipe's
2591 :term:`SRC_URI` statements.
2592
Andrew Geissler09036742021-06-25 14:25:14 -05002593 The default value for the :term:`FILESPATH` variable is defined in the
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002594 :ref:`ref-classes-base` class found in ``meta/classes`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002595 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002596
2597 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2598 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2599
2600 The
Andrew Geissler09036742021-06-25 14:25:14 -05002601 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002602 from the :term:`FILESOVERRIDES` variable.
2603
2604 .. note::
2605
Andrew Geissler09036742021-06-25 14:25:14 -05002606 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002607 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002608 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002609 :term:`FILESEXTRAPATHS` variable.
2610
Andrew Geissler09036742021-06-25 14:25:14 -05002611 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002612 to directories in custom layers where append files
2613 (``.bbappend``) are used. If you want the build system to find
2614 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002615 to extend the :term:`FILESPATH` variable by using the
2616 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002617
2618 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002619 example, consider a case where there is the following directory structure
2620 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002621
2622 files/defconfig
2623 files/MACHINEA/defconfig
2624 files/MACHINEB/defconfig
2625
Andrew Geissler09036742021-06-25 14:25:14 -05002626 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002627 "file://defconfig". Given this scenario, you can set
2628 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002629 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002630 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2631 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2632 build system uses files from ``files/defconfig``.
2633
2634 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002635 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002636 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002637 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002638 the Yocto Project Development Tasks Manual. See the
2639 :ref:`ref-tasks-patch` task as well.
2640
Andrew Geisslerf0343792020-11-18 10:42:21 -06002641 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002642 Allows you to define your own file permissions settings table as part
2643 of your configuration for the packaging process. For example, suppose
2644 you need a consistent set of custom permissions for a set of groups
2645 and users across an entire work project. It is best to do this in the
2646 packages themselves but this is not always possible.
2647
2648 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2649 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2650 If you create your own file
2651 permissions setting table, you should place it in your layer or the
2652 distro's layer.
2653
Andrew Geissler09036742021-06-25 14:25:14 -05002654 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002655 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2656 to point to your custom
2657 ``fs-perms.txt``. You can specify more than a single file permissions
2658 setting table. The paths you specify to these files must be defined
2659 within the :term:`BBPATH` variable.
2660
2661 For guidance on how to create your own file permissions settings
2662 table file, examine the existing ``fs-perms.txt``.
2663
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002664 :term:`FIT_DESC`
2665 Specifies the description string encoded into a fitImage. The default
2666 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2667 class as follows::
2668
2669 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2670
Andrew Geisslerf0343792020-11-18 10:42:21 -06002671 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002672 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002673 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002674 The default value is 0.
2675
Andrew Geisslerf0343792020-11-18 10:42:21 -06002676 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002677 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2678
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002679 :term:`FIT_KERNEL_COMP_ALG`
2680 Compression algorithm to use for the kernel image inside the FIT Image.
2681 At present, the only supported values are "gzip" (default) or "none"
2682 If you set this variable to anything other than "none" you may also need
2683 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2684
2685 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2686 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2687 value is ".gz".
2688
Andrew Geisslerf0343792020-11-18 10:42:21 -06002689 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002690 Arguments to openssl genrsa for generating RSA private key for signing
2691 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2692 use.
2693
Andrew Geisslerf0343792020-11-18 10:42:21 -06002694 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002695 Arguments to openssl req for generating certificate for signing fitImage.
2696 The default value is "-batch -new". batch for non interactive mode
2697 and new for generating new keys.
2698
Andrew Geisslerf0343792020-11-18 10:42:21 -06002699 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002700 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002701 The default value is "x509".
2702
Andrew Geisslerf0343792020-11-18 10:42:21 -06002703 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002704 Specifies the signature algorithm used in creating the FIT Image.
2705 For e.g. rsa2048.
2706
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002707 :term:`FIT_SIGN_INDIVIDUAL`
2708 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2709 class will sign the kernel, dtb and ramdisk images individually in addition
2710 to signing the fitImage itself. This could be useful if you are
2711 intending to verify signatures in another context than booting via
2712 U-Boot.
2713
Andrew Geissler9aee5002022-03-30 16:27:02 +00002714 :term:`FIT_SIGN_NUMBITS`
2715 Size of private key in number of bits used in fitImage. The default
2716 value is "2048".
2717
Andrew Geisslerf0343792020-11-18 10:42:21 -06002718 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002719 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2720 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04002721 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002722
Andrew Geisslerf0343792020-11-18 10:42:21 -06002723 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002724 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2725 this variable identifies packages containing font files that need to
Andrew Geissler595f6302022-01-24 19:11:47 +00002726 be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002727 that fonts are in the recipe's main package (i.e.
2728 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2729 need are in a package other than that main package.
2730
Andrew Geisslerf0343792020-11-18 10:42:21 -06002731 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002732 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2733 during the generation of the root filesystem.
2734
2735 Set the variable to "1" to force the removal of these packages.
2736
Andrew Geisslerf0343792020-11-18 10:42:21 -06002737 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002738 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002739 compiling an optimized system. This variable defaults to "-O2 -pipe
2740 ${DEBUG_FLAGS}".
2741
Andrew Geisslerf0343792020-11-18 10:42:21 -06002742 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002743 Enables Position Independent Executables (PIE) within the GNU C
2744 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2745 Programming (ROP) attacks much more difficult to execute.
2746
2747 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002748 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002749
2750 GCCPIE ?= "--enable-default-pie"
2751
Andrew Geisslerf0343792020-11-18 10:42:21 -06002752 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002753 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05002754 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002755 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002756
2757 GCCVERSION ?= "8.%"
2758
2759 You can override this value by setting it in a
2760 configuration file such as the ``local.conf``.
2761
Andrew Geisslerf0343792020-11-18 10:42:21 -06002762 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002763 The minimal command and arguments to run the GNU Debugger.
2764
Andrew Geissler595f6302022-01-24 19:11:47 +00002765 :term:`GIR_EXTRA_LIBS_PATH`
2766 Allows to specify an extra search path for ``.so`` files
2767 in GLib related recipes using GObject introspection,
2768 and which do not compile without this setting.
2769 See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`"
2770 section for details.
2771
Andrew Geisslerf0343792020-11-18 10:42:21 -06002772 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002773 The directory in which a local copy of a Git repository is stored
2774 when it is cloned.
2775
Andrew Geisslerf0343792020-11-18 10:42:21 -06002776 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002777 Specifies the list of GLIBC locales to generate should you not wish
2778 to generate all LIBC locals, which can be time consuming.
2779
2780 .. note::
2781
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002782 If you specifically remove the locale ``en_US.UTF-8``, you must set
2783 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002784
Andrew Geissler09036742021-06-25 14:25:14 -05002785 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002786 By default, all locales are generated.
2787 ::
2788
2789 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2790
Andrew Geisslerf0343792020-11-18 10:42:21 -06002791 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002792 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2793 this variable specifies for a package what parameters should be
2794 passed to the ``groupadd`` command if you wish to add a group to the
2795 system when the package is installed.
2796
Andrew Geisslerc926e172021-05-07 16:11:35 -05002797 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002798
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002799 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002800
2801 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002802 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002803
Andrew Geisslerf0343792020-11-18 10:42:21 -06002804 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002805 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2806 this variable specifies for a package what parameters should be
2807 passed to the ``groupmems`` command if you wish to modify the members
2808 of a group when the package is installed.
2809
2810 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002811 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002812
Andrew Geisslerf0343792020-11-18 10:42:21 -06002813 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002814 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2815 and serial in the boot menu. Set this variable to "1" in your
2816 ``local.conf`` or distribution configuration file to enable graphics
2817 and serial in the menu.
2818
2819 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2820 information on how this variable is used.
2821
Andrew Geisslerf0343792020-11-18 10:42:21 -06002822 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002823 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2824 configuration. Use a semi-colon character (``;``) to separate
2825 multiple options.
2826
Andrew Geissler09036742021-06-25 14:25:14 -05002827 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002828 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2829 on how this variable is used.
2830
Andrew Geisslerf0343792020-11-18 10:42:21 -06002831 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002832 Specifies the timeout before executing the default ``LABEL`` in the
2833 GNU GRand Unified Bootloader (GRUB).
2834
Andrew Geissler09036742021-06-25 14:25:14 -05002835 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002836 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2837 on how this variable is used.
2838
Andrew Geisslerf0343792020-11-18 10:42:21 -06002839 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002840 When inheriting the
2841 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2842 this variable specifies the packages that contain the GTK+ input
2843 method modules being installed when the modules are in packages other
2844 than the main package.
2845
Andrew Geisslerf0343792020-11-18 10:42:21 -06002846 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002847 Website where more information about the software the recipe is
2848 building can be found.
2849
Andrew Geisslerf0343792020-11-18 10:42:21 -06002850 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002851 The name of the target architecture, which is normally the same as
2852 :term:`TARGET_ARCH`. The OpenEmbedded build system
2853 supports many architectures. Here is an example list of architectures
2854 supported. This list is by no means complete as the architecture is
2855 configurable:
2856
2857 - arm
2858 - i586
2859 - x86_64
2860 - powerpc
2861 - powerpc64
2862 - mips
2863 - mipsel
2864
Andrew Geisslerf0343792020-11-18 10:42:21 -06002865 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002866 Specifies architecture-specific compiler flags that are passed to the
2867 C compiler.
2868
Andrew Geissler09036742021-06-25 14:25:14 -05002869 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002870 is being built:
2871
2872 - :term:`TARGET_CC_ARCH` when building for the
2873 target
2874
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002875 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002876 ``-native``)
2877
2878 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2879 ``nativesdk-``)
2880
Andrew Geisslerf0343792020-11-18 10:42:21 -06002881 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002882 Specifies the name of the target operating system, which is normally
2883 the same as the :term:`TARGET_OS`. The variable can
2884 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2885 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2886 "linux-musleabi" values possible.
2887
Andrew Geisslerf0343792020-11-18 10:42:21 -06002888 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05002889 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002890 is normally the same as :term:`TARGET_PREFIX`.
2891
Andrew Geisslerf0343792020-11-18 10:42:21 -06002892 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002893 Specifies the system, including the architecture and the operating
2894 system, for which the build is occurring in the context of the
2895 current recipe.
2896
2897 The OpenEmbedded build system automatically sets this variable based
2898 on :term:`HOST_ARCH`,
2899 :term:`HOST_VENDOR`, and
2900 :term:`HOST_OS` variables.
2901
2902 .. note::
2903
2904 You do not need to set the variable yourself.
2905
2906 Consider these two examples:
2907
2908 - Given a native recipe on a 32-bit x86 machine running Linux, the
2909 value is "i686-linux".
2910
2911 - Given a recipe being built for a little-endian MIPS target running
2912 Linux, the value might be "mipsel-linux".
2913
Andrew Geissler9aee5002022-03-30 16:27:02 +00002914 :term:`HOST_VENDOR`
2915 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
2916 same as :term:`TARGET_VENDOR`.
2917
Andrew Geisslerf0343792020-11-18 10:42:21 -06002918 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002919 A space-separated list (filter) of tools on the build host that
2920 should be allowed to be called from within build tasks. Using this
2921 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05002922 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002923 host, the OpenEmbedded build system produces an error and the build
2924 is not started.
2925
2926 For additional information, see
2927 :term:`HOSTTOOLS_NONFATAL`.
2928
Andrew Geisslerf0343792020-11-18 10:42:21 -06002929 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002930 A space-separated list (filter) of tools on the build host that
2931 should be allowed to be called from within build tasks. Using this
2932 filter helps reduce the possibility of host contamination. Unlike
2933 :term:`HOSTTOOLS`, the OpenEmbedded build system
2934 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05002935 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2936 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002937
Andrew Geissler9aee5002022-03-30 16:27:02 +00002938 :term:`ICECC_CLASS_DISABLE`
2939 Identifies user classes that you do not want the Icecream distributed
2940 compile support to consider. This variable is used by the
2941 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2942 your ``local.conf`` file.
2943
2944 When you list classes using this variable, the recipes inheriting
2945 those classes will not benefit from distributed compilation across
2946 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002947
Andrew Geisslerf0343792020-11-18 10:42:21 -06002948 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002949 Disables or enables the ``icecc`` (Icecream) function. For more
2950 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00002951 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002952 section.
2953
2954 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002955 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002956
2957 ICECC_DISABLED ??= "1"
2958
Andrew Geisslerc926e172021-05-07 16:11:35 -05002959 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002960
2961 ICECC_DISABLED = ""
2962
Andrew Geisslerf0343792020-11-18 10:42:21 -06002963 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002964 Points to the ``icecc-create-env`` script that you provide. This
2965 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2966 set this variable in your ``local.conf`` file.
2967
2968 If you do not point to a script that you provide, the OpenEmbedded
2969 build system uses the default script provided by the
2970 ``icecc-create-env.bb`` recipe, which is a modified version and not
2971 the one that comes with ``icecc``.
2972
Andrew Geisslerf0343792020-11-18 10:42:21 -06002973 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002974 Extra options passed to the ``make`` command during the
2975 :ref:`ref-tasks-compile` task that specify parallel
2976 compilation. This variable usually takes the form of "-j x", where x
2977 represents the maximum number of parallel threads ``make`` can run.
2978
2979 .. note::
2980
2981 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002982 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002983
2984 If your enabled machines support multiple cores, coming up with the
2985 maximum number of parallel threads that gives you the best
2986 performance could take some experimentation since machine speed,
2987 network lag, available memory, and existing machine loads can all
2988 affect build time. Consequently, unlike the
2989 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05002990 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002991 performance.
2992
Andrew Geissler09036742021-06-25 14:25:14 -05002993 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002994 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05002995 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002996
Andrew Geisslerf0343792020-11-18 10:42:21 -06002997 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002998 The location of the ``icecc`` binary. You can set this variable in
2999 your ``local.conf`` file. If your ``local.conf`` file does not define
3000 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
3001 to define it by locating ``icecc`` using ``which``.
3002
Andrew Geissler9aee5002022-03-30 16:27:02 +00003003 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003004 Identifies user recipes that you do not want the Icecream distributed
3005 compile support to consider. This variable is used by the
3006 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
3007 your ``local.conf`` file.
3008
Andrew Geissler595f6302022-01-24 19:11:47 +00003009 When you list recipes using this variable, you are excluding them
3010 from distributed compilation across remote hosts. Instead they will
3011 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003012
Andrew Geissler9aee5002022-03-30 16:27:02 +00003013 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003014 Identifies user recipes that use an empty
3015 :term:`PARALLEL_MAKE` variable that you want to
3016 force remote distributed compilation on using the Icecream
3017 distributed compile support. This variable is used by the
3018 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
3019 your ``local.conf`` file.
3020
Andrew Geisslerf0343792020-11-18 10:42:21 -06003021 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003022 The base name of image output files. This variable defaults to the
3023 recipe name (``${``\ :term:`PN`\ ``}``).
3024
Andrew Geisslerf0343792020-11-18 10:42:21 -06003025 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003026 A space-separated list of files installed into the boot partition
3027 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003028 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003029 the files are
3030 installed under the same name as the source files. To change the
3031 installed name, separate it from the original name with a semi-colon
3032 (;). Source files need to be located in
3033 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003034 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003035
3036 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3037 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3038
3039 Alternatively, source files can be picked up using a glob pattern. In
3040 this case, the destination file must have the same name as the base
3041 name of the source file path. To install files into a directory
3042 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05003043 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003044
3045 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
3046 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
3047
3048 The first example
3049 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3050 into the root of the target partition. The second example installs
3051 the same files into a ``boot`` directory within the target partition.
3052
3053 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003054 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003055 section of the Yocto Project Development Tasks Manual. Reference
3056 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003057 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003058
Andrew Geisslerf0343792020-11-18 10:42:21 -06003059 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003060 A list of classes that all images should inherit. You typically use
3061 this variable to specify the list of classes that register the
3062 different types of images the OpenEmbedded build system creates.
3063
Andrew Geissler09036742021-06-25 14:25:14 -05003064 The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003065 set this variable in your ``local.conf`` or in a distribution
3066 configuration file.
3067
3068 For more information, see ``meta/classes/image_types.bbclass`` in the
3069 :term:`Source Directory`.
3070
Andrew Geisslerf0343792020-11-18 10:42:21 -06003071 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003072 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003073 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003074 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3075 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003076 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003077
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003078 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003079 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003080 ${EXTRA_IMAGECMD}"
3081
3082 You typically do not need to set this variable unless you are adding
3083 support for a new image type. For more examples on how to set this
3084 variable, see the :ref:`image_types <ref-classes-image_types>`
3085 class file, which is ``meta/classes/image_types.bbclass``.
3086
Andrew Geisslerf0343792020-11-18 10:42:21 -06003087 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003088 Specifies one or more files that contain custom device tables that
3089 are passed to the ``makedevs`` command as part of creating an image.
3090 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003091 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003092 ``files/device_table-minimal.txt`` is used, which is located by
3093 :term:`BBPATH`. For details on how you should write
3094 device table files, see ``meta/files/device_table-minimal.txt`` as an
3095 example.
3096
Andrew Geissler9aee5002022-03-30 16:27:02 +00003097 :term:`IMAGE_EFI_BOOT_FILES`
3098 A space-separated list of files installed into the boot partition
3099 when preparing an image using the Wic tool with the
3100 ``bootimg-efi`` source plugin. By default,
3101 the files are
3102 installed under the same name as the source files. To change the
3103 installed name, separate it from the original name with a semi-colon
3104 (;). Source files need to be located in
3105 :term:`DEPLOY_DIR_IMAGE`. Here are two
3106 examples::
3107
3108 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3109 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3110
3111 Alternatively, source files can be picked up using a glob pattern. In
3112 this case, the destination file must have the same name as the base
3113 name of the source file path. To install files into a directory
3114 within the target location, pass its name after a semi-colon (;).
3115 Here are two examples::
3116
3117 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3118 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3119
3120 The first example
3121 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3122 into the root of the target partition. The second example installs
3123 the same files into a ``boot`` directory within the target partition.
3124
3125 You can find information on how to use the Wic tool in the
3126 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
3127 section of the Yocto Project Development Tasks Manual. Reference
3128 material for Wic is located in the
3129 ":doc:`/ref-manual/kickstart`" chapter.
3130
Andrew Geisslerf0343792020-11-18 10:42:21 -06003131 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003132 The primary list of features to include in an image. Typically, you
3133 configure this variable in an image recipe. Although you can use this
3134 variable from your ``local.conf`` file, which is found in the
3135 :term:`Build Directory`, best practices dictate that you do
3136 not.
3137
3138 .. note::
3139
3140 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003141 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003142
3143 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003144 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003145
3146 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06003147 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003148 section in the Yocto Project Development Tasks Manual.
3149
Andrew Geisslerf0343792020-11-18 10:42:21 -06003150 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003151 Specifies the formats the OpenEmbedded build system uses during the
3152 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003153 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003154 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003155
3156 IMAGE_FSTYPES = "ext3 tar.bz2"
3157
3158 For the complete list of supported image formats from which you can
3159 choose, see :term:`IMAGE_TYPES`.
3160
3161 .. note::
3162
3163 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003164 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003165 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003166
3167 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003168 variable, you cannot update its contents by using ``:append``
3169 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003170 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003171
Andrew Geisslerf0343792020-11-18 10:42:21 -06003172 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003173 Used by recipes to specify the packages to install into an image
3174 through the :ref:`image <ref-classes-image>` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003175 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003176
Andrew Geissler09036742021-06-25 14:25:14 -05003177 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003178 install into an image through :ref:`ref-classes-image`. Additionally,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003179 there are "helper" classes such as the
3180 :ref:`core-image <ref-classes-core-image>` class which can
Andrew Geissler09036742021-06-25 14:25:14 -05003181 take lists used with :term:`IMAGE_FEATURES` and turn them into
3182 auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003183 default contents.
3184
Andrew Geisslerc926e172021-05-07 16:11:35 -05003185 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003186
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003187 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003188
3189 Be sure to include the space
3190 between the quotation character and the start of the package name or
3191 names.
3192
3193 .. note::
3194
3195 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003196 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003197 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003198 packages for installation. Instead, use the
3199 :term:`PACKAGE_INSTALL` variable, which
3200 allows the initial RAM filesystem (initramfs) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003201 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003202 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003203 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003204 section in the Yocto Project Development Tasks Manual.
3205
Andrew Geissler09036742021-06-25 14:25:14 -05003206 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003207 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003208 BitBake operator within the ``/conf/local.conf`` file or from
3209 within an image recipe is not recommended. Use of this operator
3210 in these ways can cause ordering issues. Since
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003211 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003212 value using the
3213 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003214 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003215 results in unexpected behavior when used within
3216 ``conf/local.conf``. Furthermore, the same operation from
3217 within an image recipe may or may not succeed depending on the
3218 specific situation. In both these cases, the behavior is
3219 contrary to how most users expect the ``+=`` operator to work.
3220
Andrew Geisslerf0343792020-11-18 10:42:21 -06003221 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003222 Specifies the list of locales to install into the image during the
3223 root filesystem construction process. The OpenEmbedded build system
3224 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003225 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003226 ensures that any locale packages that correspond to packages already
3227 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003228 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003229
3230 IMAGE_LINGUAS = "pt-br de-de"
3231
3232 In this example, the build system ensures any Brazilian Portuguese
3233 and German locale files that correspond to packages in the image are
3234 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3235 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3236 only provide locale files by language and not by country-specific
3237 language).
3238
3239 See the :term:`GLIBC_GENERATE_LOCALES`
3240 variable for information on generating GLIBC locales.
3241
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003242
3243 :term:`IMAGE_LINK_NAME`
3244 The name of the output image symlink (which does not include
3245 the version part as :term:`IMAGE_NAME` does). The default value
3246 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003247 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003248
3249 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3250
3251
Andrew Geisslerf0343792020-11-18 10:42:21 -06003252 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003253 The manifest file for the image. This file lists all the installed
3254 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003255 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003256
3257 packagename packagearch version
3258
Andrew Geissler09036742021-06-25 14:25:14 -05003259 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003260 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003261
Andrew Geissler09036742021-06-25 14:25:14 -05003262 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003263
3264 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003265 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003266 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003267 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003268 section in the Yocto Project Overview and Concepts Manual.
3269
Andrew Geisslerf0343792020-11-18 10:42:21 -06003270 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003271 The name of the output image files minus the extension. This variable
3272 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003273 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003274 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003275
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003276 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3277
3278 :term:`IMAGE_NAME_SUFFIX`
Andrew Geissler615f2f12022-07-15 14:00:58 -05003279 Suffix used for the image output filename --- defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003280 to distinguish the image file from other files created during image
3281 building; however if this suffix is redundant or not desired you can
3282 clear the value of this variable (set the value to ""). For example,
3283 this is typically cleared in initramfs image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003284
Andrew Geisslerf0343792020-11-18 10:42:21 -06003285 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003286 Defines a multiplier that the build system applies to the initial
3287 image size for cases when the multiplier times the returned disk
3288 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003289 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003290 the multiplier applied to the initial image size creates free disk
3291 space in the image as overhead. By default, the build process uses a
3292 multiplier of 1.3 for this variable. This default value results in
3293 30% free disk space added to the image when this method is used to
3294 determine the final generated image size. You should be aware that
3295 post install scripts and the package management system uses disk
3296 space inside this overhead area. Consequently, the multiplier does
3297 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003298 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003299 determines the overall image size.
3300
3301 The default 30% free disk space typically gives the image enough room
3302 to boot and allows for basic post installs while still leaving a
3303 small amount of free disk space. If 30% free space is inadequate, you
3304 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003305 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003306
3307 IMAGE_OVERHEAD_FACTOR = "1.5"
3308
3309 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003310 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003311 variable.
3312
Andrew Geisslerf0343792020-11-18 10:42:21 -06003313 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003314 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3315 OpenEmbedded build system. The variable is defined appropriately by
3316 the :ref:`package_deb <ref-classes-package_deb>`,
3317 :ref:`package_rpm <ref-classes-package_rpm>`,
3318 :ref:`package_ipk <ref-classes-package_ipk>`, or
3319 :ref:`package_tar <ref-classes-package_tar>` class.
3320
3321 .. note::
3322
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003323 The ``package_tar`` class is broken and is not supported. It is
3324 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003325
3326 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
Andrew Geissler09036742021-06-25 14:25:14 -05003327 :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003328 for packaging up images and SDKs.
3329
Andrew Geissler09036742021-06-25 14:25:14 -05003330 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003331 variable is set indirectly through the appropriate
3332 :ref:`package_* <ref-classes-package>` class using the
3333 :term:`PACKAGE_CLASSES` variable. The
3334 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3335 or IPK) that appears with the variable
3336
3337 .. note::
3338
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003339 Files using the ``.tar`` format are never used as a substitute
3340 packaging format for DEB, RPM, and IPK formatted files for your image
3341 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003342
Andrew Geisslerf0343792020-11-18 10:42:21 -06003343 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003344 Specifies a list of functions to call once the OpenEmbedded build
3345 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003346 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003347
3348 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3349
3350 If you need to pass the root filesystem path to a command within the
3351 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3352 directory that becomes the root filesystem image. See the
3353 :term:`IMAGE_ROOTFS` variable for more
3354 information.
3355
Andrew Geisslerf0343792020-11-18 10:42:21 -06003356 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003357 Specifies a list of functions to call before the OpenEmbedded build
3358 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003359 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003360
3361 IMAGE_PREPROCESS_COMMAND += "function; ... "
3362
3363 If you need to pass the root filesystem path to a command within the
3364 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3365 directory that becomes the root filesystem image. See the
3366 :term:`IMAGE_ROOTFS` variable for more
3367 information.
3368
Andrew Geisslerf0343792020-11-18 10:42:21 -06003369 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003370 The location of the root filesystem while it is under construction
3371 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3372 variable is not configurable. Do not change it.
3373
Andrew Geisslerf0343792020-11-18 10:42:21 -06003374 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003375 Specifies the alignment for the output image file in Kbytes. If the
3376 size of the image is not a multiple of this value, then the size is
3377 rounded up to the nearest multiple of the value. The default value is
3378 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3379 additional information.
3380
Andrew Geisslerf0343792020-11-18 10:42:21 -06003381 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003382 Defines additional free disk space created in the image in Kbytes. By
3383 default, this variable is set to "0". This free disk space is added
3384 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003385 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003386
3387 This variable is particularly useful when you want to ensure that a
3388 specific amount of free disk space is available on a device after an
3389 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003390 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003391
3392 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3393
3394 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003395 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003396
3397 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3398
Andrew Geisslerf0343792020-11-18 10:42:21 -06003399 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003400 Defines the size in Kbytes for the generated image. The OpenEmbedded
3401 build system determines the final size for the generated image using
3402 an algorithm that takes into account the initial disk space used for
3403 the generated image, a requested size for the image, and requested
3404 additional free disk space to be added to the image. Programatically,
3405 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003406 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003407
3408 if (image-du * overhead) < rootfs-size:
3409 internal-rootfs-size = rootfs-size + xspace
3410 else:
3411 internal-rootfs-size = (image-du * overhead) + xspace
3412 where:
3413 image-du = Returned value of the du command on the image.
3414 overhead = IMAGE_OVERHEAD_FACTOR
3415 rootfs-size = IMAGE_ROOTFS_SIZE
3416 internal-rootfs-size = Initial root filesystem size before any modifications.
3417 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3418
3419 See the :term:`IMAGE_OVERHEAD_FACTOR`
3420 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3421 variables for related information.
3422
Andrew Geisslerf0343792020-11-18 10:42:21 -06003423 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003424 Specifies a dependency from one image type on another. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05003425 example from the :ref:`image-live <ref-classes-image-live>` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003426
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003427 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003428
3429 In the previous example, the variable ensures that when "live" is
3430 listed with the :term:`IMAGE_FSTYPES` variable,
3431 the OpenEmbedded build system produces an ``ext3`` image first since
3432 one of the components of the live image is an ``ext3`` formatted
3433 partition containing the root filesystem.
3434
Andrew Geisslerf0343792020-11-18 10:42:21 -06003435 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003436 Specifies the complete list of supported image types by default:
3437
3438 - btrfs
3439 - container
3440 - cpio
3441 - cpio.gz
3442 - cpio.lz4
3443 - cpio.lzma
3444 - cpio.xz
3445 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003446 - erofs
3447 - erofs-lz4
3448 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003449 - ext2
3450 - ext2.bz2
3451 - ext2.gz
3452 - ext2.lzma
3453 - ext3
3454 - ext3.gz
3455 - ext4
3456 - ext4.gz
3457 - f2fs
3458 - hddimg
3459 - iso
3460 - jffs2
3461 - jffs2.sum
3462 - multiubi
3463 - squashfs
3464 - squashfs-lz4
3465 - squashfs-lzo
3466 - squashfs-xz
3467 - tar
3468 - tar.bz2
3469 - tar.gz
3470 - tar.lz4
3471 - tar.xz
3472 - tar.zst
3473 - ubi
3474 - ubifs
3475 - wic
3476 - wic.bz2
3477 - wic.gz
3478 - wic.lzma
3479
3480 For more information about these types of images, see
3481 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3482
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003483 :term:`IMAGE_VERSION_SUFFIX`
3484 Version suffix that is part of the default :term:`IMAGE_NAME` and
3485 :term:`KERNEL_ARTIFACT_NAME` values.
3486 Defaults to ``"-${DATETIME}"``, however you could set this to a
3487 version string that comes from your external build environment if
3488 desired, and this suffix would then be used consistently across
3489 the build artifacts.
3490
Andrew Geissler09036742021-06-25 14:25:14 -05003491 :term:`IMGDEPLOYDIR`
3492 When inheriting the :ref:`image <ref-classes-image>` class directly or
3493 through the :ref:`core-image <ref-classes-core-image>` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003494 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003495 that is set in the ``image`` class as follows::
3496
3497 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3498
3499 Recipes inheriting the ``image`` class should copy files to be
Andrew Geissler5f350902021-07-23 13:09:54 -04003500 deployed into :term:`IMGDEPLOYDIR`, and the class will take care of
Andrew Geissler09036742021-06-25 14:25:14 -05003501 copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3502
Andrew Geisslerf0343792020-11-18 10:42:21 -06003503 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003504 Helps define the recipe revision for recipes that share a common
3505 ``include`` file. You can think of this variable as part of the
3506 recipe revision as set from within an include file.
3507
3508 Suppose, for example, you have a set of recipes that are used across
3509 several projects. And, within each of those recipes the revision (its
3510 :term:`PR` value) is set accordingly. In this case, when
3511 the revision of those recipes changes, the burden is on you to find
3512 all those recipes and be sure that they get changed to reflect the
3513 updated version of the recipe. In this scenario, it can get
3514 complicated when recipes that are used in many places and provide
3515 common functionality are upgraded to a new revision.
3516
3517 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003518 :term:`INC_PR` variable inside the ``include`` files that the recipes
3519 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003520 help define the recipe revision.
3521
3522 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003523 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003524 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003525 can use the variable to set the :term:`PR` values in each recipe. You
3526 will notice that when you set a recipe's :term:`PR` you can provide more
3527 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003528
3529 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3530 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3531 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3532 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3533
3534 The
3535 first line of the example establishes the baseline revision to be
3536 used for all recipes that use the ``include`` file. The remaining
3537 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003538 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003539
Andrew Geisslerf0343792020-11-18 10:42:21 -06003540 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003541 Specifies a space-separated list of license names (as they would
3542 appear in :term:`LICENSE`) that should be excluded
3543 from the build. Recipes that provide no alternatives to listed
3544 incompatible licenses are not built. Packages that are individually
3545 licensed with the specified incompatible licenses will be deleted.
3546
Patrick Williams03907ee2022-05-01 06:28:52 -05003547 There is some support for wildcards in this variable's value,
3548 however it is restricted to specific licenses. Currently only
3549 these wildcards are allowed and expand as follows:
3550
3551 - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later``
3552 - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
3553 - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
3554
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003555 .. note::
3556
3557 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003558 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003559
Andrew Geissler9aee5002022-03-30 16:27:02 +00003560 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003561
3562
3563 Although you can use other settings, you might be required to
3564 remove dependencies on or provide alternatives to components that
3565 are required to produce a functional system image.
3566
Andrew Geissler615f2f12022-07-15 14:00:58 -05003567 :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
3568 Specifies a space-separated list of package and license pairs that
3569 are allowed to be used even if the license is specified in
3570 :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are
3571 separated using a colon. Example::
3572
3573 INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only"
3574
Andrew Geisslerf0343792020-11-18 10:42:21 -06003575 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003576 Causes the named class or classes to be inherited globally. Anonymous
3577 functions in the class or classes are not executed for the base
3578 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003579 system ignores changes to :term:`INHERIT` in individual recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003580
Andrew Geissler09036742021-06-25 14:25:14 -05003581 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003582 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
Andrew Geisslerd5838332022-05-27 11:33:10 -05003583 section in the BitBake User Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003584
Andrew Geisslerf0343792020-11-18 10:42:21 -06003585 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003586 Lists classes that will be inherited at the distribution level. It is
3587 unlikely that you want to edit this variable.
3588
3589 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003590 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003591
3592 INHERIT_DISTRO ?= "debian devshell sstate license"
3593
Andrew Geisslerf0343792020-11-18 10:42:21 -06003594 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003595 Prevents the default dependencies, namely the C compiler and standard
3596 C library (libc), from being added to :term:`DEPENDS`.
3597 This variable is usually used within recipes that do not require any
3598 compilation using the C compiler.
3599
3600 Set the variable to "1" to prevent the default dependencies from
3601 being added.
3602
Andrew Geisslerf0343792020-11-18 10:42:21 -06003603 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003604 Prevents the OpenEmbedded build system from splitting out debug
3605 information during packaging. By default, the build system splits out
3606 debugging information during the
3607 :ref:`ref-tasks-package` task. For more information on
3608 how debug information is split out, see the
3609 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3610 variable.
3611
3612 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003613 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003614 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003615
3616 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3617
Andrew Geisslerf0343792020-11-18 10:42:21 -06003618 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003619 If set to "1", causes the build to not strip binaries in resulting
3620 packages and prevents the ``-dbg`` package from containing the source
3621 files.
3622
3623 By default, the OpenEmbedded build system strips binaries and puts
3624 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003625 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003626 plan to debug in general.
3627
Andrew Geisslerf0343792020-11-18 10:42:21 -06003628 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003629 If set to "1", causes the build to not strip binaries in the
3630 resulting sysroot.
3631
3632 By default, the OpenEmbedded build system strips binaries in the
3633 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003634 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003635 this stripping.
3636
3637 If you want to use this variable, include the
3638 :ref:`staging <ref-classes-staging>` class. This class uses a
3639 ``sys_strip()`` function to test for the variable and acts
3640 accordingly.
3641
3642 .. note::
3643
Andrew Geissler09036742021-06-25 14:25:14 -05003644 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003645 special circumstances. For example, suppose you are building
3646 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003647 even if the toolchain's binaries are strippable, there are other files
3648 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003649
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003650 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
3651 Indicates the deploy directory used by ``do_bundle_initramfs`` where the
3652 :term:`INITRAMFS_IMAGE` will be fetched from.
3653 This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the
3654 :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed
3655 when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`.
3656
Andrew Geisslerf0343792020-11-18 10:42:21 -06003657 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003658 Defines the format for the output image of an initial RAM filesystem
3659 (initramfs), which is used during boot. Supported formats are the
3660 same as those supported by the
3661 :term:`IMAGE_FSTYPES` variable.
3662
3663 The default value of this variable, which is set in the
3664 ``meta/conf/bitbake.conf`` configuration file in the
3665 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3666 initramfs mechanism, as opposed to the initial RAM filesystem
3667 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3668 an optionally compressed cpio archive.
3669
Andrew Geisslerf0343792020-11-18 10:42:21 -06003670 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003671 Specifies the :term:`PROVIDES` name of an image
3672 recipe that is used to build an initial RAM filesystem (initramfs)
Andrew Geissler09036742021-06-25 14:25:14 -05003673 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003674 additional recipe to be built as a dependency to whatever root
3675 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3676 initramfs image recipe you provide should set
3677 :term:`IMAGE_FSTYPES` to
3678 :term:`INITRAMFS_FSTYPES`.
3679
3680 An initramfs image provides a temporary root filesystem used for
3681 early system initialization (e.g. loading of modules needed to locate
3682 and mount the "real" root filesystem).
3683
3684 .. note::
3685
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003686 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3687 recipe in the :term:`Source Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003688 for an example initramfs recipe. To select this sample recipe as
Andrew Geissler09036742021-06-25 14:25:14 -05003689 the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003690 to "core-image-minimal-initramfs".
3691
3692 You can also find more information by referencing the
3693 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3694 the Source Directory, the :ref:`image <ref-classes-image>` class,
3695 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
Andrew Geissler09036742021-06-25 14:25:14 -05003696 the :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003697
Andrew Geissler09036742021-06-25 14:25:14 -05003698 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003699 initramfs image is built.
3700
3701 For more information, you can also see the
3702 :term:`INITRAMFS_IMAGE_BUNDLE`
3703 variable, which allows the generated image to be bundled inside the
3704 kernel image. Additionally, for information on creating an initramfs
Andrew Geissler09209ee2020-12-13 08:44:15 -06003705 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003706 in the Yocto Project Development Tasks Manual.
3707
Andrew Geisslerf0343792020-11-18 10:42:21 -06003708 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003709 Controls whether or not the image recipe specified by
3710 :term:`INITRAMFS_IMAGE` is run through an
3711 extra pass
3712 (:ref:`ref-tasks-bundle_initramfs`) during
3713 kernel compilation in order to build a single binary that contains
3714 both the kernel image and the initial RAM filesystem (initramfs)
3715 image. This makes use of the
3716 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3717 feature.
3718
3719 .. note::
3720
Patrick Williams93c203f2021-10-06 16:15:23 -05003721 Bundling the initramfs with the kernel conflates the code in the
3722 initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
3723 compatible software may be part of a bundled initramfs.
3724
3725 .. note::
3726
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003727 Using an extra compilation pass to bundle the initramfs avoids a
3728 circular dependency between the kernel recipe and the initramfs
3729 recipe should the initramfs include kernel modules. Should that be
3730 the case, the initramfs recipe depends on the kernel for the
3731 kernel modules, and the kernel depends on the initramfs recipe
3732 since the initramfs is bundled inside the kernel image.
3733
3734 The combined binary is deposited into the ``tmp/deploy`` directory,
3735 which is part of the :term:`Build Directory`.
3736
3737 Setting the variable to "1" in a configuration file causes the
3738 OpenEmbedded build system to generate a kernel image with the
Andrew Geissler09036742021-06-25 14:25:14 -05003739 initramfs specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003740
3741 INITRAMFS_IMAGE_BUNDLE = "1"
3742
3743 By default, the
3744 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05003745 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003746
3747 INITRAMFS_IMAGE_BUNDLE ?= ""
3748
3749 .. note::
3750
Andrew Geissler09036742021-06-25 14:25:14 -05003751 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003752 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003753
3754 See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003755 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003756 file for additional information. Also, for information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06003757 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003758 in the Yocto Project Development Tasks Manual.
3759
Andrew Geisslerf0343792020-11-18 10:42:21 -06003760 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003761 The link name of the initial RAM filesystem image. This variable is
3762 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003763 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003764
3765 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3766
3767 The value of the
3768 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003769 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003770
3771 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3772
3773 See the :term:`MACHINE` variable for additional
3774 information.
3775
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003776 :term:`INITRAMFS_MULTICONFIG`
3777 Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class.
3778
3779 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
3780 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
3781
3782 For more information on how to bundle an initramfs image from a separate
3783 multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`"
3784 section in the Yocto Project Development Tasks Manual.
3785
Andrew Geisslerf0343792020-11-18 10:42:21 -06003786 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003787 The base name of the initial RAM filesystem image. This variable is
3788 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003789 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003790
3791 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3792
3793 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003794 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003795
3796 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3797
Andrew Geisslerf0343792020-11-18 10:42:21 -06003798 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003799 Indicates list of filesystem images to concatenate and use as an
3800 initial RAM disk (``initrd``).
3801
Andrew Geissler09036742021-06-25 14:25:14 -05003802 The :term:`INITRD` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003803 :ref:`image-live <ref-classes-image-live>` class.
3804
Andrew Geisslerf0343792020-11-18 10:42:21 -06003805 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003806 When building a "live" bootable image (i.e. when
3807 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05003808 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003809 provide the initial RAM disk image. The default value is
3810 "core-image-minimal-initramfs".
3811
3812 See the :ref:`image-live <ref-classes-image-live>` class for more
3813 information.
3814
Andrew Geisslerf0343792020-11-18 10:42:21 -06003815 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003816 The filename of the initialization script as installed to
3817 ``${sysconfdir}/init.d``.
3818
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003819 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003820 The variable is mandatory.
3821
Andrew Geisslerf0343792020-11-18 10:42:21 -06003822 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003823 A list of the packages that contain initscripts. If multiple packages
3824 are specified, you need to append the package name to the other
3825 ``INITSCRIPT_*`` as an override.
3826
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003827 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003828 The variable is optional and defaults to the :term:`PN`
3829 variable.
3830
Andrew Geisslerf0343792020-11-18 10:42:21 -06003831 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003832 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003833
3834 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3835
3836 In this example, the script has a runlevel of 99, starts the script
3837 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3838
3839 The variable's default value is "defaults", which is set in the
3840 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3841
Andrew Geissler09036742021-06-25 14:25:14 -05003842 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003843 ``update-rc.d`` command. For more information on valid parameters,
3844 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003845 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003846
Andrew Geisslerf0343792020-11-18 10:42:21 -06003847 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003848 Specifies the QA checks to skip for a specific package within a
3849 recipe. For example, to skip the check for symbolic link ``.so``
3850 files in the main package of a recipe, add the following to the
3851 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05003852 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003853
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003854 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003855
Andrew Geissler595f6302022-01-24 19:11:47 +00003856 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003857 list of the valid QA checks you can specify using this variable.
3858
Andrew Geisslerf0343792020-11-18 10:42:21 -06003859 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003860 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05003861 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003862 configuration level to disable this behavior.
3863
Andrew Geisslerf0343792020-11-18 10:42:21 -06003864 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003865 When the IPK backend is in use and package management is enabled on
3866 the target, you can use this variable to set up ``opkg`` in the
3867 target image to point to package feeds on a nominated server. Once
3868 the feed is established, you can perform installations or upgrades
3869 using the package manager at runtime.
3870
Andrew Geisslerf0343792020-11-18 10:42:21 -06003871 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003872 Defines the kernel architecture used when assembling the
3873 configuration. Architectures supported for this release are:
3874
3875 - powerpc
3876 - i386
3877 - x86_64
3878 - arm
3879 - qemu
3880 - mips
3881
Andrew Geissler5f350902021-07-23 13:09:54 -04003882 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003883
Andrew Geisslerf0343792020-11-18 10:42:21 -06003884 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003885 A regular expression used by the build process to explicitly identify
3886 the kernel branch that is validated, patched, and configured during a
3887 build. You must set this variable to ensure the exact kernel branch
3888 you want is being used by the build process.
3889
3890 Values for this variable are set in the kernel's recipe file and the
3891 kernel's append file. For example, if you are using the
3892 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05003893 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003894 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003895
3896 KBRANCH ?= "standard/base"
3897
3898 This variable is also used from the kernel's append file to identify
3899 the kernel branch specific to a particular machine or target
3900 hardware. Continuing with the previous kernel example, the kernel's
3901 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3902 BSP layer for a given machine. For example, the append file for the
3903 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3904 machines (``meta-yocto-bsp``) is named
3905 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05003906 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003907
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003908 KBRANCH:genericx86 = "standard/base"
3909 KBRANCH:genericx86-64 = "standard/base"
3910 KBRANCH:edgerouter = "standard/edgerouter"
3911 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003912
Andrew Geissler09036742021-06-25 14:25:14 -05003913 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003914 identify the kernel branch to use when building for each supported
3915 BSP.
3916
Andrew Geisslerf0343792020-11-18 10:42:21 -06003917 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003918 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3919 class, specifies an "in-tree" kernel configuration file for use
3920 during a kernel build.
3921
3922 Typically, when using a ``defconfig`` to configure a kernel during a
3923 build, you place the file in your layer in the same manner as you
3924 would place patch files and configuration fragment files (i.e.
3925 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3926 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05003927 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003928 :term:`KMACHINE` variable to point to the
3929 ``defconfig`` file.
3930
3931 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05003932 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003933
3934 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3935
Andrew Geissler09036742021-06-25 14:25:14 -05003936 Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05003937 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003938
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003939 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003940
Andrew Geisslerc926e172021-05-07 16:11:35 -05003941 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003942
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003943 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003944
3945 For more
Andrew Geissler09036742021-06-25 14:25:14 -05003946 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003947 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003948 section in the Yocto Project Linux Kernel Development Manual.
3949
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003950 :term:`KCONFIG_MODE`
3951 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3952 class, specifies the kernel configuration values to use for options
3953 not specified in the provided ``defconfig`` file. Valid options are::
3954
3955 KCONFIG_MODE = "alldefconfig"
3956 KCONFIG_MODE = "allnoconfig"
3957
3958 In ``alldefconfig`` mode the options not explicitly specified will be
3959 assigned their Kconfig default value. In ``allnoconfig`` mode the
3960 options not explicitly specified will be disabled in the kernel
3961 config.
3962
Andrew Geissler09036742021-06-25 14:25:14 -05003963 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003964 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3965 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3966 in ``${WORKDIR}`` through a meta-layer will be handled in
3967 ``allnoconfig`` mode.
3968
3969 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05003970 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003971 be explicitly set.
3972
3973 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
3974 generated by copying the ``.config`` file from a working Linux kernel
3975 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05003976 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003977 not need to be explicitly set.
3978
3979 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
3980 generated using the
3981 :ref:`ref-tasks-savedefconfig`
3982 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05003983 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003984
3985 KCONFIG_MODE = "alldefconfig"
3986
3987
Andrew Geisslerf0343792020-11-18 10:42:21 -06003988 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003989 Specifies an alternate kernel image type for creation in addition to
3990 the kernel image type specified using the
3991 :term:`KERNEL_IMAGETYPE` variable.
3992
Andrew Geisslerf0343792020-11-18 10:42:21 -06003993 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003994 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05003995 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003996 variable.
3997
Andrew Geissler09036742021-06-25 14:25:14 -05003998 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003999 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004000 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004001
4002 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4003
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004004 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
4005 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004006
Andrew Geisslerf0343792020-11-18 10:42:21 -06004007 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004008 A list of classes defining kernel image types that the
4009 :ref:`kernel <ref-classes-kernel>` class should inherit. You
4010 typically append this variable to enable extended image types. An
4011 example is the "kernel-fitimage", which enables fitImage support and
4012 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
Andrew Geissler595f6302022-01-24 19:11:47 +00004013 custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004014 variable.
4015
Patrick Williams03907ee2022-05-01 06:28:52 -05004016 :term:`KERNEL_DEBUG_TIMESTAMPS`
4017 If set to "1", enables timestamping functionality during building
4018 the kernel. The default is "0" to disable this for reproducibility
4019 reasons.
4020
Andrew Geisslerf0343792020-11-18 10:42:21 -06004021 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004022 Specifies the name of the generated Linux kernel device tree (i.e.
4023 the ``.dtb``) file.
4024
4025 .. note::
4026
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004027 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004028 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004029
4030 In order to use this variable, the
4031 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4032 be inherited.
4033
Andrew Geisslerf0343792020-11-18 10:42:21 -06004034 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004035 The link name of the kernel device tree binary (DTB). This variable
4036 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004037 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004038
4039 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4040
4041 The
4042 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004043 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004044
4045 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4046
4047 See the :term:`MACHINE` variable for additional
4048 information.
4049
Andrew Geisslerf0343792020-11-18 10:42:21 -06004050 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004051 The base name of the kernel device tree binary (DTB). This variable
4052 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004053 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004054
4055 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4056
4057 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004058 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004059
4060 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4061
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004062 :term:`KERNEL_DTC_FLAGS`
4063 Specifies the ``dtc`` flags that are passed to the Linux kernel build
4064 system when generating the device trees (via ``DTC_FLAGS`` environment
4065 variable).
4066
4067 In order to use this variable, the
4068 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4069 be inherited.
4070
Andrew Geisslerf0343792020-11-18 10:42:21 -06004071 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004072 Specifies additional ``make`` command-line arguments the OpenEmbedded
4073 build system passes on when compiling the kernel.
4074
Andrew Geisslerf0343792020-11-18 10:42:21 -06004075 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004076 Includes additional kernel metadata. In the OpenEmbedded build
4077 system, the default Board Support Packages (BSPs)
4078 :term:`Metadata` is provided through the
4079 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004080 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004081 the kernel recipe or kernel append file to further add metadata for
4082 all BSPs or specific BSPs.
4083
4084 The metadata you add through this variable includes config fragments
4085 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004086 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004087 variable for a specific machine. In this way, you can provide
4088 validated, but optional, sets of kernel configurations and features.
4089
4090 For example, the following example from the ``linux-yocto-rt_4.12``
4091 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4092 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004093 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004094
4095 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004096 KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
4097 KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc"
4098 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4099 KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004100
Andrew Geisslerf0343792020-11-18 10:42:21 -06004101 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004102 The link name of the kernel flattened image tree (FIT) image. This
4103 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004104 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004105
4106 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4107
4108 The value of the
4109 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004110 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004111
4112 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4113
4114 See the :term:`MACHINE` variable for additional
4115 information.
4116
Andrew Geisslerf0343792020-11-18 10:42:21 -06004117 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004118 The base name of the kernel flattened image tree (FIT) image. This
4119 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004120 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004121
4122 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4123
4124 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004125 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004126
4127 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4128
Andrew Geisslerf0343792020-11-18 10:42:21 -06004129 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004130 The link name for the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004131 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004132
4133 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4134
4135 The value of
4136 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004137 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004138
4139 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4140
4141 See the :term:`MACHINE` variable for additional
4142 information.
4143
Andrew Geisslerf0343792020-11-18 10:42:21 -06004144 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004145 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004146 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004147 checked against the set value during the
4148 :ref:`ref-tasks-sizecheck` task. The task fails if
4149 the kernel image file is larger than the setting.
4150
Andrew Geissler09036742021-06-25 14:25:14 -05004151 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004152 limited amount of space in which the kernel image must be stored.
4153
4154 By default, this variable is not set, which means the size of the
4155 kernel image is not checked.
4156
Andrew Geisslerf0343792020-11-18 10:42:21 -06004157 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004158 The base name of the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004159 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004160
4161 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4162
4163 The value of the
4164 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004165 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004166
4167 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4168
Andrew Geisslerf0343792020-11-18 10:42:21 -06004169 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004170 The type of kernel to build for a device, usually set by the machine
4171 configuration files and defaults to "zImage". This variable is used
4172 when building the kernel and is passed to ``make`` as the target to
4173 build.
4174
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004175 If you want to build an alternate kernel image type in addition to that
Andrew Geissler09036742021-06-25 14:25:14 -05004176 specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004177 variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004178
Andrew Geisslerf0343792020-11-18 10:42:21 -06004179 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004180 Lists kernel modules that need to be auto-loaded during boot.
4181
4182 .. note::
4183
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004184 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004185 variable.
4186
Andrew Geissler09036742021-06-25 14:25:14 -05004187 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004188 can be recognized by the kernel recipe or by an out-of-tree kernel
4189 module recipe (e.g. a machine configuration file, a distribution
4190 configuration file, an append file for the recipe, or the recipe
4191 itself).
4192
Andrew Geisslerc926e172021-05-07 16:11:35 -05004193 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004194
4195 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4196
Andrew Geissler09036742021-06-25 14:25:14 -05004197 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004198 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4199 the list of modules to be auto-loaded on boot. The modules appear
4200 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004201 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004202
4203 KERNEL_MODULE_AUTOLOAD += "module_name"
4204
4205 For information on how to populate the ``modname.conf`` file with
4206 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4207
Andrew Geisslerf0343792020-11-18 10:42:21 -06004208 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004209 Provides a list of modules for which the OpenEmbedded build system
4210 expects to find ``module_conf_``\ modname values that specify
4211 configuration for each of the modules. For information on how to
4212 provide those module configurations, see the
4213 :term:`module_conf_* <module_conf>` variable.
4214
Andrew Geisslerf0343792020-11-18 10:42:21 -06004215 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004216 The location of the kernel sources. This variable is set to the value
4217 of the :term:`STAGING_KERNEL_DIR` within
4218 the :ref:`module <ref-classes-module>` class. For information on
4219 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004220 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004221 section in the Yocto Project Linux Kernel Development Manual.
4222
4223 To help maximize compatibility with out-of-tree drivers used to build
4224 modules, the OpenEmbedded build system also recognizes and uses the
4225 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004226 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004227 used by external Makefiles to point to the kernel source directory.
4228
Andrew Geisslerf0343792020-11-18 10:42:21 -06004229 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004230 The location of the kernel sources. This variable is set to the value
4231 of the :term:`STAGING_KERNEL_DIR` within
4232 the :ref:`module <ref-classes-module>` class. For information on
4233 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004234 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004235 section in the Yocto Project Linux Kernel Development Manual.
4236
4237 To help maximize compatibility with out-of-tree drivers used to build
4238 modules, the OpenEmbedded build system also recognizes and uses the
4239 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004240 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004241 used by external Makefiles to point to the kernel source directory.
4242
Andrew Geisslerf0343792020-11-18 10:42:21 -06004243 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004244 Specifies the version of the kernel as extracted from ``version.h``
4245 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004246 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004247 configured. Consequently, attempting to refer to this variable in
4248 contexts prior to configuration will not work.
4249
Andrew Geisslerf0343792020-11-18 10:42:21 -06004250 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004251 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004252 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004253 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004254 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004255 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004256 ``initramfs`` recipe. Setting the variable there when the data is not
4257 needed avoids a potential dependency loop.
4258
Andrew Geisslerf0343792020-11-18 10:42:21 -06004259 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004260 Provides a short description of a configuration fragment. You use
4261 this variable in the ``.scc`` file that describes a configuration
4262 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004263 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004264
4265 define KFEATURE_DESCRIPTION "Enable SMP"
4266
Andrew Geisslerf0343792020-11-18 10:42:21 -06004267 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004268 The machine as known by the kernel. Sometimes the machine name used
4269 by the kernel does not match the machine name used by the
4270 OpenEmbedded build system. For example, the machine name that the
4271 OpenEmbedded build system understands as ``core2-32-intel-common``
4272 goes by a different name in the Linux Yocto kernel. The kernel
4273 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004274 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004275 OpenEmbedded build system machine name.
4276
4277 These mappings between different names occur in the Yocto Linux
4278 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004279 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004280
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004281 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4282 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4283 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4284 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4285 KMACHINE:core2-32-intel-common = "intel-core2-32"
4286 KBRANCH:core2-32-intel-common = "standard/base"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004287 KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004288
Andrew Geissler09036742021-06-25 14:25:14 -05004289 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004290 that the kernel understands the machine name as "intel-core2-32".
4291 However, the OpenEmbedded build system understands the machine as
4292 "core2-32-intel-common".
4293
Andrew Geisslerf0343792020-11-18 10:42:21 -06004294 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004295 Defines the kernel type to be used in assembling the configuration.
4296 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004297 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004298 section in the
4299 Yocto Project Linux Kernel Development Manual for more information on
4300 kernel types.
4301
Andrew Geissler09036742021-06-25 14:25:14 -05004302 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004303 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004304 value you use must match the value used for the
4305 :term:`LINUX_KERNEL_TYPE` value used by the
4306 kernel recipe.
4307
Andrew Geisslerf0343792020-11-18 10:42:21 -06004308 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004309 Provides a list of targets for automatic configuration.
4310
4311 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4312 information on how this variable is used.
4313
Andrew Geisslerf0343792020-11-18 10:42:21 -06004314 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004315 Lists the layers, separated by spaces, on which this recipe depends.
4316 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004317 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004318
4319 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4320
4321 In this previous example,
4322 version 3 of "anotherlayer" is compared against
4323 :term:`LAYERVERSION`\ ``_anotherlayer``.
4324
4325 An error is produced if any dependency is missing or the version
4326 numbers (if specified) do not match exactly. This variable is used in
4327 the ``conf/layer.conf`` file and must be suffixed with the name of
4328 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4329
Andrew Geisslerf0343792020-11-18 10:42:21 -06004330 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004331 When used inside the ``layer.conf`` configuration file, this variable
4332 provides the path of the current layer. This variable is not
4333 available outside of ``layer.conf`` and references are expanded
4334 immediately when parsing of the file completes.
4335
Andrew Geisslerf0343792020-11-18 10:42:21 -06004336 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004337 Lists the layers, separated by spaces, recommended for use with this
4338 layer.
4339
4340 Optionally, you can specify a specific layer version for a
4341 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004342 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004343
4344 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4345
4346 In this previous example, version 3 of "anotherlayer" is compared
4347 against ``LAYERVERSION_anotherlayer``.
4348
4349 This variable is used in the ``conf/layer.conf`` file and must be
4350 suffixed with the name of the specific layer (e.g.
4351 ``LAYERRECOMMENDS_mylayer``).
4352
Andrew Geisslerf0343792020-11-18 10:42:21 -06004353 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004354 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004355 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004356 allows the layer maintainer to indicate which combinations of the
4357 layer and OE-Core can be expected to work. The variable gives the
4358 system a way to detect when a layer has not been tested with new
4359 releases of OE-Core (e.g. the layer is not maintained).
4360
4361 To specify the OE-Core versions for which a layer is compatible, use
4362 this variable in your layer's ``conf/layer.conf`` configuration file.
4363 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004364 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004365 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004366 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004367
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004368 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004369
4370 .. note::
4371
Andrew Geissler09036742021-06-25 14:25:14 -05004372 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004373 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004374 The OpenEmbedded build system produces a warning if the variable
4375 is not set for any given layer.
4376
Andrew Geissler09209ee2020-12-13 08:44:15 -06004377 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004378 section in the Yocto Project Development Tasks Manual.
4379
Andrew Geisslerf0343792020-11-18 10:42:21 -06004380 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004381 Optionally specifies the version of a layer as a single number. You
4382 can use this within :term:`LAYERDEPENDS` for
4383 another layer in order to depend on a specific version of the layer.
4384 This variable is used in the ``conf/layer.conf`` file and must be
4385 suffixed with the name of the specific layer (e.g.
4386 ``LAYERVERSION_mylayer``).
4387
Andrew Geisslerf0343792020-11-18 10:42:21 -06004388 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004389 The minimal command and arguments used to run the linker.
4390
Andrew Geisslerf0343792020-11-18 10:42:21 -06004391 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004392 Specifies the flags to pass to the linker. This variable is exported
4393 to an environment variable and thus made visible to the software
4394 being built during the compilation step.
4395
Andrew Geissler09036742021-06-25 14:25:14 -05004396 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004397 being built:
4398
4399 - :term:`TARGET_LDFLAGS` when building for the
4400 target
4401
4402 - :term:`BUILD_LDFLAGS` when building for the
4403 build host (i.e. ``-native``)
4404
4405 - :term:`BUILDSDK_LDFLAGS` when building for
4406 an SDK (i.e. ``nativesdk-``)
4407
Andrew Geisslerf0343792020-11-18 10:42:21 -06004408 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004409 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4410 that the :ref:`debian <ref-classes-debian>` class applies its
4411 naming policy to given a recipe that packages multiple libraries.
4412
Andrew Geissler595f6302022-01-24 19:11:47 +00004413 This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004414
Andrew Geisslerf0343792020-11-18 10:42:21 -06004415 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004416 Checksums of the license text in the recipe source code.
4417
4418 This variable tracks changes in license text of the source code
4419 files. If the license text is changed, it will trigger a build
4420 failure, which gives the developer an opportunity to review any
4421 license change.
4422
4423 This variable must be defined for all recipes (unless
4424 :term:`LICENSE` is set to "CLOSED").
4425
Andrew Geissler09209ee2020-12-13 08:44:15 -06004426 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004427 section in the Yocto Project Development Tasks Manual.
4428
Andrew Geisslerf0343792020-11-18 10:42:21 -06004429 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004430 The list of source licenses for the recipe. Follow these rules:
4431
4432 - Do not use spaces within individual license names.
4433
4434 - Separate license names using \| (pipe) when there is a choice
4435 between licenses.
4436
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004437 - Separate license names using & (ampersand) when there are
4438 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004439
4440 - You can use spaces between license names.
4441
4442 - For standard licenses, use the names of the files in
4443 ``meta/files/common-licenses/`` or the
4444 :term:`SPDXLICENSEMAP` flag names defined in
4445 ``meta/conf/licenses.conf``.
4446
Andrew Geisslerc926e172021-05-07 16:11:35 -05004447 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004448
Andrew Geissler9aee5002022-03-30 16:27:02 +00004449 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4450 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4451 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004452
4453 The first example is from the
4454 recipes for Qt, which the user may choose to distribute under either
4455 the LGPL version 2.1 or GPL version 3. The second example is from
4456 Cairo where two licenses cover different parts of the source code.
4457 The final example is from ``sysstat``, which presents a single
4458 license.
4459
4460 You can also specify licenses on a per-package basis to handle
4461 situations where components of the output have different licenses.
4462 For example, a piece of software whose code is licensed under GPLv2
4463 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004464 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004465
Andrew Geissler9aee5002022-03-30 16:27:02 +00004466 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4467 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004468 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004469
Andrew Geisslerf0343792020-11-18 10:42:21 -06004470 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004471 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004472 build system to create an extra package (i.e.
4473 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4474 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004475 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004476
4477 The ``${PN}-lic`` package installs a directory in
4478 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4479 name, and installs files in that directory that contain license and
4480 copyright information (i.e. copies of the appropriate license files
4481 from ``meta/common-licenses`` that match the licenses specified in
4482 the :term:`LICENSE` variable of the recipe metadata
4483 and copies of files marked in
4484 :term:`LIC_FILES_CHKSUM` as containing
4485 license text).
4486
4487 For related information on providing license text, see the
4488 :term:`COPY_LIC_DIRS` variable, the
4489 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004490 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004491 section in the Yocto Project Development Tasks Manual.
4492
Andrew Geisslerf0343792020-11-18 10:42:21 -06004493 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004494 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00004495 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004496 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004497 separate them with spaces.
4498
4499 This value is independent of :term:`LICENSE` and is
4500 typically used to mark recipes that might require additional licenses
4501 in order to be used in a commercial product. For more information,
4502 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004503 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004504 section in the Yocto Project Development Tasks Manual.
4505
Andrew Geissler9aee5002022-03-30 16:27:02 +00004506 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004507 Lists license flags that when specified in
4508 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004509 prevent that recipe from being built. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004510 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004511 section in the Yocto Project Development Tasks Manual.
4512
Andrew Geisslerf0343792020-11-18 10:42:21 -06004513 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004514 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004515 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004516 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004517 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004518 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004519
4520 LICENSE_PATH += "path-to-additional-common-licenses"
4521
Andrew Geisslerf0343792020-11-18 10:42:21 -06004522 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004523 Defines the kernel type to be used in assembling the configuration.
4524 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004525 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004526 section in the
4527 Yocto Project Linux Kernel Development Manual for more information on
4528 kernel types.
4529
Andrew Geissler09036742021-06-25 14:25:14 -05004530 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004531 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004532 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004533 the kernel tools to find the appropriate description within the
4534 kernel :term:`Metadata` with which to build out the sources
4535 and configuration.
4536
Andrew Geisslerf0343792020-11-18 10:42:21 -06004537 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004538 The Linux version from ``kernel.org`` on which the Linux kernel image
4539 being built using the OpenEmbedded build system is based. You define
4540 this variable in the kernel recipe. For example, the
4541 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004542 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004543
4544 LINUX_VERSION ?= "3.4.24"
4545
Andrew Geissler09036742021-06-25 14:25:14 -05004546 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004547 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004548
4549 PV = "${LINUX_VERSION}+git${SRCPV}"
4550
Andrew Geisslerf0343792020-11-18 10:42:21 -06004551 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004552 A string extension compiled into the version string of the Linux
4553 kernel built with the OpenEmbedded build system. You define this
4554 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004555 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004556
4557 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4558
4559 Defining this variable essentially sets the Linux kernel
4560 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4561 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004562 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004563
4564 $ uname -r
4565 3.7.0-rc8-custom
4566
Andrew Geisslerf0343792020-11-18 10:42:21 -06004567 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004568 Specifies the directory to which the OpenEmbedded build system writes
4569 overall log files. The default directory is ``${TMPDIR}/log``.
4570
4571 For the directory containing logs specific to each task, see the
4572 :term:`T` variable.
4573
Andrew Geisslerf0343792020-11-18 10:42:21 -06004574 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004575 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004576 :term:`MACHINE` in the ``local.conf`` file found in the
4577 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004578 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004579 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004580
4581 MACHINE ?= "qemux86"
4582
4583 The variable corresponds to a machine configuration file of the same
4584 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004585 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004586 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004587 the :term:`Source Directory` in
4588 ``meta/conf/machine``.
4589
4590 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004591 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004592
4593 MACHINE ?= "qemuarm"
4594 MACHINE ?= "qemuarm64"
4595 MACHINE ?= "qemumips"
4596 MACHINE ?= "qemumips64"
4597 MACHINE ?= "qemuppc"
4598 MACHINE ?= "qemux86"
4599 MACHINE ?= "qemux86-64"
4600 MACHINE ?= "genericx86"
4601 MACHINE ?= "genericx86-64"
4602 MACHINE ?= "beaglebone"
4603 MACHINE ?= "edgerouter"
4604
4605 The last five are Yocto Project reference hardware
4606 boards, which are provided in the ``meta-yocto-bsp`` layer.
4607
4608 .. note::
4609
4610 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004611 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004612
Andrew Geisslerf0343792020-11-18 10:42:21 -06004613 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004614 Specifies the name of the machine-specific architecture. This
4615 variable is set automatically from :term:`MACHINE` or
4616 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05004617 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004618
Andrew Geisslerf0343792020-11-18 10:42:21 -06004619 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004620 A list of required machine-specific packages to install as part of
4621 the image being built. The build process depends on these packages
4622 being present. Furthermore, because this is a "machine-essential"
4623 variable, the list of packages are essential for the machine to boot.
4624 The impact of this variable affects images based on
4625 ``packagegroup-core-boot``, including the ``core-image-minimal``
4626 image.
4627
4628 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05004629 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004630 that the image being built has a build dependency on the variable's
4631 list of packages. In other words, the image will not build if a file
4632 in this list is not found.
4633
4634 As an example, suppose the machine for which you are building
4635 requires ``example-init`` to be run during boot to initialize the
4636 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05004637 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004638
4639 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4640
Andrew Geisslerf0343792020-11-18 10:42:21 -06004641 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004642 A list of recommended machine-specific packages to install as part of
4643 the image being built. The build process does not depend on these
4644 packages being present. However, because this is a
4645 "machine-essential" variable, the list of packages are essential for
4646 the machine to boot. The impact of this variable affects images based
4647 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4648 image.
4649
Andrew Geissler09036742021-06-25 14:25:14 -05004650 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004651 variable with the exception that the image being built does not have
4652 a build dependency on the variable's list of packages. In other
4653 words, the image will still build if a package in this list is not
4654 found. Typically, this variable is used to handle essential kernel
4655 modules, whose functionality may be selected to be built into the
4656 kernel rather than as a module, in which case a package will not be
4657 produced.
4658
4659 Consider an example where you have a custom kernel where a specific
4660 touchscreen driver is required for the machine to be usable. However,
4661 the driver can be built as a module or into the kernel depending on
4662 the kernel configuration. If the driver is built as a module, you
4663 want it to be installed. But, when the driver is built into the
4664 kernel, you still want the build to succeed. This variable sets up a
4665 "recommends" relationship so that in the latter case, the build will
4666 not fail due to the missing package. To accomplish this, assuming the
4667 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05004668 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004669
4670 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4671
4672 .. note::
4673
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004674 In this example, the ``kernel-module-ab123`` recipe needs to
4675 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4676 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4677 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004678
4679 Some examples of these machine essentials are flash, screen,
4680 keyboard, mouse, or touchscreen drivers (depending on the machine).
4681
Andrew Geisslerf0343792020-11-18 10:42:21 -06004682 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004683 A list of machine-specific packages to install as part of the image
4684 being built that are not essential for the machine to boot. However,
4685 the build process for more fully-featured images depends on the
4686 packages being present.
4687
4688 This variable affects all images based on ``packagegroup-base``,
4689 which does not include the ``core-image-minimal`` or
4690 ``core-image-full-cmdline`` images.
4691
Andrew Geissler09036742021-06-25 14:25:14 -05004692 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004693 with the exception that the image being built has a build dependency
4694 on the variable's list of packages. In other words, the image will
4695 not build if a file in this list is not found.
4696
4697 An example is a machine that has WiFi capability but is not essential
4698 for the machine to boot the image. However, if you are building a
4699 more fully-featured image, you want to enable the WiFi. The package
4700 containing the firmware for the WiFi hardware is always expected to
4701 exist, so it is acceptable for the build process to depend upon
4702 finding the package. In this case, assuming the package for the
4703 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004704 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004705
4706 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4707
Andrew Geisslerf0343792020-11-18 10:42:21 -06004708 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004709 A list of machine-specific packages to install as part of the image
4710 being built that are not essential for booting the machine. The image
4711 being built has no build dependency on this list of packages.
4712
4713 This variable affects only images based on ``packagegroup-base``,
4714 which does not include the ``core-image-minimal`` or
4715 ``core-image-full-cmdline`` images.
4716
Andrew Geissler09036742021-06-25 14:25:14 -05004717 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004718 with the exception that the image being built does not have a build
4719 dependency on the variable's list of packages. In other words, the
4720 image will build if a file in this list is not found.
4721
4722 An example is a machine that has WiFi capability but is not essential
4723 For the machine to boot the image. However, if you are building a
4724 more fully-featured image, you want to enable WiFi. In this case, the
4725 package containing the WiFi kernel module will not be produced if the
4726 WiFi driver is built into the kernel, in which case you still want
4727 the build to succeed instead of failing as a result of the package
4728 not being found. To accomplish this, assuming the package for the
4729 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004730 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004731
4732 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4733
Andrew Geisslerf0343792020-11-18 10:42:21 -06004734 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004735 Specifies the list of hardware features the
4736 :term:`MACHINE` is capable of supporting. For related
4737 information on enabling features, see the
4738 :term:`DISTRO_FEATURES`,
4739 :term:`COMBINED_FEATURES`, and
4740 :term:`IMAGE_FEATURES` variables.
4741
4742 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004743 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004744
Andrew Geisslerf0343792020-11-18 10:42:21 -06004745 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05004746 Features to be added to :term:`MACHINE_FEATURES` if not also present in
4747 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004748
4749 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4750 not intended to be user-configurable. It is best to just reference
4751 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004752 all machine configurations. See the ":ref:`ref-features-backfill`"
4753 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004754
Andrew Geisslerf0343792020-11-18 10:42:21 -06004755 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05004756 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4757 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004758 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004759
Andrew Geisslerf0343792020-11-18 10:42:21 -06004760 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004761 A colon-separated list of overrides that apply to the current
4762 machine. By default, this list includes the value of
4763 :term:`MACHINE`.
4764
Andrew Geissler09036742021-06-25 14:25:14 -05004765 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004766 should apply to a machine. For example, all machines emulated in QEMU
4767 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4768 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05004769 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004770
4771 MACHINEOVERRIDES =. "qemuall:"
4772
4773 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004774 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004775 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004776 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004777
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004778 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004779 file://wired-setup \
4780 "
4781
4782 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05004783 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004784 value of :term:`OVERRIDES`.
4785
Andrew Geisslerf0343792020-11-18 10:42:21 -06004786 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004787 The email address of the distribution maintainer.
4788
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004789 :term:`METADATA_BRANCH`
4790 The branch currently checked out for the OpenEmbedded-Core layer (path
4791 determined by :term:`COREBASE`).
4792
4793 :term:`METADATA_REVISION`
4794 The revision currently checked out for the OpenEmbedded-Core layer (path
4795 determined by :term:`COREBASE`).
4796
Andrew Geisslerf0343792020-11-18 10:42:21 -06004797 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004798 Specifies additional paths from which the OpenEmbedded build system
4799 gets source code. When the build system searches for source code, it
4800 first tries the local download directory. If that location fails, the
4801 build system tries locations defined by
4802 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05004803 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004804
4805 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05004806 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004807 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4808
Andrew Geisslerf0343792020-11-18 10:42:21 -06004809 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004810 Specifies a prefix has been added to :term:`PN` to create a
4811 special version of a recipe or package (i.e. a Multilib version). The
4812 variable is used in places where the prefix needs to be added to or
4813 removed from a the name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05004814 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004815
4816 .. note::
4817
Andrew Geissler09036742021-06-25 14:25:14 -05004818 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004819 historical and comes from a time when ``nativesdk`` was a suffix
4820 rather than a prefix on the recipe name. When ``nativesdk`` was turned
Andrew Geissler09036742021-06-25 14:25:14 -05004821 into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004822
Andrew Geissler09036742021-06-25 14:25:14 -05004823 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004824 :term:`BBCLASSEXTEND` is used to provide a
4825 ``nativesdk`` version of a recipe in addition to the target version.
4826 If that recipe declares build-time dependencies on tasks in other
4827 recipes by using :term:`DEPENDS`, then a dependency on
4828 "foo" will automatically get rewritten to a dependency on
4829 "nativesdk-foo". However, dependencies like the following will not
Andrew Geisslerc926e172021-05-07 16:11:35 -05004830 get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004831
4832 do_foo[depends] += "recipe:do_foo"
4833
4834 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004835 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004836
4837 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4838
Andrew Geissler09036742021-06-25 14:25:14 -05004839 :term:`module_autoload`
4840 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04004841 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05004842 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004843
4844 module_autoload_rfcomm = "rfcomm"
4845
Andrew Geisslerc926e172021-05-07 16:11:35 -05004846 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004847
4848 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4849
4850 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4851
Andrew Geissler09036742021-06-25 14:25:14 -05004852 :term:`module_conf`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004853 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004854 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4855 file.
4856
4857 You can use this variable anywhere that it can be recognized by the
4858 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4859 configuration file, a distribution configuration file, an append file
4860 for the recipe, or the recipe itself). If you use this variable, you
4861 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00004862 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004863 variable.
4864
Andrew Geisslerc926e172021-05-07 16:11:35 -05004865 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004866
4867 module_conf_module_name = "modprobe.d-syntax"
4868
4869 You must use the kernel module name override.
4870
4871 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04004872 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004873
Andrew Geissler5f350902021-07-23 13:09:54 -04004874 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004875 populate the ``/etc/modprobe.d/modname.conf`` file with
4876 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05004877 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004878
4879 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4880
4881 For information on how to specify kernel modules to auto-load on
4882 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4883
Andrew Geisslerf0343792020-11-18 10:42:21 -06004884 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004885 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4886 "0" to disable creation of this file, which contains all of the
4887 kernel modules resulting from a kernel build.
4888
Andrew Geisslerf0343792020-11-18 10:42:21 -06004889 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004890 The link name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004891 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004892
4893 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4894
4895 The value
4896 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004897 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004898
4899 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4900
4901 See the :term:`MACHINE` variable for additional information.
4902
Andrew Geisslerf0343792020-11-18 10:42:21 -06004903 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004904 The base name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004905 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004906
4907 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4908
4909 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004910 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004911
4912 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4913
Andrew Geisslerf0343792020-11-18 10:42:21 -06004914 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004915 Uniquely identifies the type of the target system for which packages
4916 are being built. This variable allows output for different types of
4917 target systems to be put into different subdirectories of the same
4918 output directory.
4919
Andrew Geisslerc926e172021-05-07 16:11:35 -05004920 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004921
4922 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4923
4924 Some classes (e.g.
4925 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05004926 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004927
4928 See the :term:`STAMP` variable for an example. See the
4929 :term:`STAGING_DIR_TARGET` variable for more information.
4930
Andrew Geisslerf0343792020-11-18 10:42:21 -06004931 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004932 A string identifying the host distribution. Strings consist of the
4933 host distributor ID followed by the release, as reported by the
4934 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4935 example, when running a build on Ubuntu 12.10, the value is
4936 "Ubuntu-12.10". If this information is unable to be determined, the
4937 value resolves to "Unknown".
4938
4939 This variable is used by default to isolate native shared state
4940 packages for different distributions (e.g. to avoid problems with
4941 ``glibc`` version incompatibilities). Additionally, the variable is
4942 checked against
4943 :term:`SANITY_TESTED_DISTROS` if that
4944 variable is set.
4945
Andrew Geisslerf0343792020-11-18 10:42:21 -06004946 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004947 The minimal command and arguments to run ``nm``.
4948
Andrew Geisslerf0343792020-11-18 10:42:21 -06004949 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004950 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004951 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004952 licenses that are not in any way common. Also, new licenses are added
4953 occasionally to avoid introducing a lot of common license files,
4954 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05004955 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004956 not exist in common licenses.
4957
Andrew Geissler09036742021-06-25 14:25:14 -05004958 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004959 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004960
4961 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4962
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004963 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004964 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05004965 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004966
4967 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4968
Andrew Geisslerf0343792020-11-18 10:42:21 -06004969 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004970 Prevents installation of all "recommended-only" packages.
4971 Recommended-only packages are packages installed only through the
4972 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05004973 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004974
4975 NO_RECOMMENDATIONS = "1"
4976
4977 You can set this variable globally in your ``local.conf`` file or you
4978 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05004979 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004980
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004981 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004982
4983 It is important to realize that if you choose to not install packages
4984 using this variable and some other packages are dependent on them
4985 (i.e. listed in a recipe's :term:`RDEPENDS`
4986 variable), the OpenEmbedded build system ignores your request and
4987 will install the packages to avoid dependency errors.
4988
4989 .. note::
4990
4991 Some recommended packages might be required for certain system
4992 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004993 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004994
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004995 This variable is only supported when using the IPK and RPM
4996 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004997
4998 See the :term:`BAD_RECOMMENDATIONS` and
4999 the :term:`PACKAGE_EXCLUDE` variables for
5000 related information.
5001
Andrew Geisslerf0343792020-11-18 10:42:21 -06005002 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005003 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005004 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05005005 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005006 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005007
5008 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005009 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
5010 FILES:${PN}-dbg = "/usr/src/debug/"
5011 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005012
Andrew Geissler09036742021-06-25 14:25:14 -05005013 :term:`NON_MULTILIB_RECIPES`
5014 A list of recipes that should not be built for multilib. OE-Core's
5015 ``multilib.conf`` file defines a reasonable starting point for this
5016 list with::
5017
5018 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
5019
Andrew Geisslerf0343792020-11-18 10:42:21 -06005020 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005021 The minimal command and arguments to run ``objcopy``.
5022
Andrew Geisslerf0343792020-11-18 10:42:21 -06005023 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005024 The minimal command and arguments to run ``objdump``.
5025
Andrew Geisslerf0343792020-11-18 10:42:21 -06005026 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005027 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
5028 this variable specifies additional arguments passed to the "sed"
5029 command. The sed command alters any paths in configuration scripts
5030 that have been set up during compilation. Inheriting this class
5031 results in all paths in these scripts being changed to point into the
5032 ``sysroots/`` directory so that all builds that use the script will
5033 use the correct directories for the cross compiling layout.
5034
5035 See the ``meta/classes/binconfig.bbclass`` in the
5036 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00005037 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005038
Andrew Geisslerf0343792020-11-18 10:42:21 -06005039 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005040 An internal variable used to tell the OpenEmbedded build system what
5041 Python modules to import for every Python function run by the system.
5042
5043 .. note::
5044
5045 Do not set this variable. It is for internal use only.
5046
Andrew Geisslerf0343792020-11-18 10:42:21 -06005047 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005048 The name of the build environment setup script for the purposes of
5049 setting up the environment within the extensible SDK. The default
5050 value is "oe-init-build-env".
5051
5052 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05005053 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005054
Andrew Geisslerf0343792020-11-18 10:42:21 -06005055 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005056 Controls how the OpenEmbedded build system spawns interactive
5057 terminals on the host development system (e.g. using the BitBake
5058 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005059 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005060 the Yocto Project Development Tasks Manual.
5061
Andrew Geissler5f350902021-07-23 13:09:54 -04005062 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005063
5064 - auto
5065 - gnome
5066 - xfce
5067 - rxvt
5068 - screen
5069 - konsole
5070 - none
5071
Andrew Geisslerf0343792020-11-18 10:42:21 -06005072 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005073 The directory from which the top-level build environment setup script
5074 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005075 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05005076 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005077 contains the script.
5078
5079 For additional information on how this variable is used, see the
5080 initialization script.
5081
Andrew Geisslerf0343792020-11-18 10:42:21 -06005082 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005083 Declares the oldest version of the Linux kernel that the produced
5084 binaries must support. This variable is passed into the build of the
5085 Embedded GNU C Library (``glibc``).
5086
5087 The default for this variable comes from the
5088 ``meta/conf/bitbake.conf`` configuration file. You can override this
5089 default by setting the variable in a custom distribution
5090 configuration file.
5091
Andrew Geisslerf0343792020-11-18 10:42:21 -06005092 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005093 A colon-separated list of overrides that currently apply. Overrides
5094 are a BitBake mechanism that allows variables to be selectively
5095 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005096 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005097 the current recipe being built, the machine for which it is being
5098 built, and so forth.
5099
5100 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005101 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005102 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005103 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005104
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005105 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005106
5107 See the
5108 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5109 section in the BitBake User Manual for more information on the
5110 overrides mechanism.
5111
Andrew Geissler09036742021-06-25 14:25:14 -05005112 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005113 :term:`CLASSOVERRIDE`,
5114 :term:`MACHINEOVERRIDES`, and
5115 :term:`DISTROOVERRIDES` variables. Another
5116 important override included by default is ``pn-${PN}``. This override
5117 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005118 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005119
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005120 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005121
5122 .. note::
5123
Andrew Geissler09036742021-06-25 14:25:14 -05005124 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005125 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005126 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005127 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005128
Andrew Geisslerf0343792020-11-18 10:42:21 -06005129 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005130 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005131
5132 ${PN}-${PV}
5133
Andrew Geisslerf0343792020-11-18 10:42:21 -06005134 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005135 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005136
5137 You may find you need to inject additional metadata into packages.
5138 This variable allows you to do that by setting the injected data as
5139 the value. Multiple fields can be added by splitting the content with
5140 the literal separator "\n".
5141
5142 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5143 to do package type specific settings. It can also be made package
5144 specific by using the package name as a suffix.
5145
5146 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005147 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005148 section in the Yocto Project Development Tasks Manual.
5149
Andrew Geisslerf0343792020-11-18 10:42:21 -06005150 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005151 The architecture of the resulting package or packages.
5152
5153 By default, the value of this variable is set to
5154 :term:`TUNE_PKGARCH` when building for the
5155 target, :term:`BUILD_ARCH` when building for the
5156 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5157 SDK.
5158
5159 .. note::
5160
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005161 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005162
5163 However, if your recipe's output packages are built specific to the
5164 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005165 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005166 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005167
5168 PACKAGE_ARCH = "${MACHINE_ARCH}"
5169
Andrew Geisslerf0343792020-11-18 10:42:21 -06005170 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005171 Specifies a list of architectures compatible with the target machine.
5172 This variable is set automatically and should not normally be
5173 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005174 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005175 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5176
Andrew Geisslerf0343792020-11-18 10:42:21 -06005177 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005178 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005179 that those added packages can pick up files that would normally be
5180 included in the default package.
5181
Andrew Geisslerf0343792020-11-18 10:42:21 -06005182 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005183 This variable, which is set in the ``local.conf`` configuration file
5184 found in the ``conf`` folder of the
5185 :term:`Build Directory`, specifies the package manager the
5186 OpenEmbedded build system uses when packaging data.
5187
5188 You can provide one or more of the following arguments for the
5189 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5190 package_tar"
5191
5192 .. note::
5193
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005194 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005195 class has limited functionality due to no support for package
5196 dependencies by that backend. Therefore, it is recommended that
5197 you do not use it.
5198
5199 The build system uses only the first argument in the list as the
5200 package manager when creating your image or SDK. However, packages
5201 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005202 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005203
5204 PACKAGE_CLASSES ?= "package_ipk"
5205
5206 The OpenEmbedded build system uses
5207 the IPK package manager to create your image or SDK.
5208
5209 For information on packaging and build performance effects as a
5210 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005211 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005212
Andrew Geisslerf0343792020-11-18 10:42:21 -06005213 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005214 Determines how to split up and package debug and source information
5215 when creating debugging packages to be used with the GNU Project
5216 Debugger (GDB). In general, based on the value of this variable,
5217 you can combine the source and debug info in a single package,
5218 you can break out the source into a separate package that can be
5219 installed independently, or you can choose to not have the source
5220 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005221
Patrick Williams93c203f2021-10-06 16:15:23 -05005222 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005223
Patrick Williams93c203f2021-10-06 16:15:23 -05005224 - "``.debug``": All debugging and source info is placed in a single
5225 ``*-dbg`` package; debug symbol files are placed next to the
5226 binary in a ``.debug`` directory so that, if a binary is installed
5227 into ``/bin``, the corresponding debug symbol file is installed
5228 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5229 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005230
Patrick Williams93c203f2021-10-06 16:15:23 -05005231 - "``debug-file-directory``": As above, all debugging and source info
5232 is placed in a single ``*-dbg`` package; debug symbol files are
5233 placed entirely under the directory ``/usr/lib/debug`` and separated
5234 by the path from where the binary is installed, so that if a binary
5235 is installed in ``/bin``, the corresponding debug symbols are installed
5236 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5237 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005238
Patrick Williams93c203f2021-10-06 16:15:23 -05005239 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5240 ``*-dbg`` package as with the ``.debug`` value, while source is
5241 placed in a separate ``*-src`` package, which can be installed
5242 independently. This is the default setting for this variable,
5243 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005244
Patrick Williams93c203f2021-10-06 16:15:23 -05005245 - "``debug-without-src``": The same behavior as with the ``.debug``
5246 setting, but no source is packaged at all.
5247
5248 .. note::
5249
5250 Much of the above package splitting can be overridden via
5251 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005252
5253 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005254 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005255 in the Yocto Project Development Tasks Manual.
5256
Andrew Geisslerf0343792020-11-18 10:42:21 -06005257 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005258 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005259 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005260
5261 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5262
5263 You can set this variable globally in your ``local.conf`` file or you
5264 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005265 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005266
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005267 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005268
5269 If you choose to not install a package using this variable and some
5270 other package is dependent on it (i.e. listed in a recipe's
5271 :term:`RDEPENDS` variable), the OpenEmbedded build
5272 system generates a fatal installation error. Because the build system
5273 halts the process with a fatal error, you can use the variable with
5274 an iterative development process to remove specific components from a
5275 system.
5276
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005277 This variable is supported only when using the IPK and RPM
5278 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005279
5280 See the :term:`NO_RECOMMENDATIONS` and the
5281 :term:`BAD_RECOMMENDATIONS` variables for
5282 related information.
5283
Andrew Geissler9aee5002022-03-30 16:27:02 +00005284 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5285 Prevents specific packages from being installed when you are
5286 installing complementary packages.
5287
5288 You might find that you want to prevent installing certain packages
5289 when you are installing complementary packages. For example, if you
5290 are using :term:`IMAGE_FEATURES` to install
5291 ``dev-pkgs``, you might not want to install all packages from a
5292 particular multilib. If you find yourself in this situation, you can
5293 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5294 expressions to match the packages you want to exclude.
5295
Andrew Geisslerf0343792020-11-18 10:42:21 -06005296 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005297 Specifies the list of architectures compatible with the device CPU.
5298 This variable is useful when you build for several different devices
5299 that use miscellaneous processors such as XScale and ARM926-EJS.
5300
Andrew Geisslerf0343792020-11-18 10:42:21 -06005301 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005302 Optionally specifies the package architectures used as part of the
5303 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005304 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005305 URI, which is constructed using the
5306 :term:`PACKAGE_FEED_URIS` and
5307 :term:`PACKAGE_FEED_BASE_PATHS`
5308 variables.
5309
5310 .. note::
5311
Andrew Geissler09036742021-06-25 14:25:14 -05005312 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005313 variable to allow specific package architectures. If you do
5314 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005315 case, you can omit this variable. Omitting the variable results in
5316 all available architectures for the current machine being included
5317 into remote package feeds.
5318
Andrew Geissler09036742021-06-25 14:25:14 -05005319 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5320 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005321 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005322
5323 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5324 https://example.com/packagerepos/updates"
5325 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5326 PACKAGE_FEED_ARCHS = "all core2-64"
5327
5328 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005329
5330 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005331
5332 https://example.com/packagerepos/release/rpm/all
5333 https://example.com/packagerepos/release/rpm/core2-64
5334 https://example.com/packagerepos/release/rpm-dev/all
5335 https://example.com/packagerepos/release/rpm-dev/core2-64
5336 https://example.com/packagerepos/updates/rpm/all
5337 https://example.com/packagerepos/updates/rpm/core2-64
5338 https://example.com/packagerepos/updates/rpm-dev/all
5339 https://example.com/packagerepos/updates/rpm-dev/core2-64
5340
Andrew Geisslerf0343792020-11-18 10:42:21 -06005341 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005342 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005343 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005344 package feed URI used by the OpenEmbedded build system. The base path
5345 lies between the :term:`PACKAGE_FEED_URIS`
5346 and :term:`PACKAGE_FEED_ARCHS` variables.
5347
Andrew Geissler09036742021-06-25 14:25:14 -05005348 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5349 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005350 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005351
5352 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5353 https://example.com/packagerepos/updates"
5354 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5355 PACKAGE_FEED_ARCHS = "all core2-64"
5356
5357 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005358
5359 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005360
5361 https://example.com/packagerepos/release/rpm/all
5362 https://example.com/packagerepos/release/rpm/core2-64
5363 https://example.com/packagerepos/release/rpm-dev/all
5364 https://example.com/packagerepos/release/rpm-dev/core2-64
5365 https://example.com/packagerepos/updates/rpm/all
5366 https://example.com/packagerepos/updates/rpm/core2-64
5367 https://example.com/packagerepos/updates/rpm-dev/all
5368 https://example.com/packagerepos/updates/rpm-dev/core2-64
5369
Andrew Geisslerf0343792020-11-18 10:42:21 -06005370 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005371 Specifies the front portion of the package feed URI used by the
5372 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005373 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005374 :term:`PACKAGE_FEED_BASE_PATHS`, and
5375 :term:`PACKAGE_FEED_ARCHS` variables.
5376
Andrew Geissler09036742021-06-25 14:25:14 -05005377 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5378 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005379 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005380
5381 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5382 https://example.com/packagerepos/updates"
5383 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5384 PACKAGE_FEED_ARCHS = "all core2-64"
5385
5386 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005387
5388 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005389
5390 https://example.com/packagerepos/release/rpm/all
5391 https://example.com/packagerepos/release/rpm/core2-64
5392 https://example.com/packagerepos/release/rpm-dev/all
5393 https://example.com/packagerepos/release/rpm-dev/core2-64
5394 https://example.com/packagerepos/updates/rpm/all
5395 https://example.com/packagerepos/updates/rpm/core2-64
5396 https://example.com/packagerepos/updates/rpm-dev/all
5397 https://example.com/packagerepos/updates/rpm-dev/core2-64
5398
Andrew Geisslerf0343792020-11-18 10:42:21 -06005399 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005400 The final list of packages passed to the package manager for
5401 installation into the image.
5402
5403 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005404 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005405 not the final list of packages that are actually installed. This
5406 variable is internal to the image construction code. Consequently, in
5407 general, you should use the
5408 :term:`IMAGE_INSTALL` variable to specify
5409 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005410 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005411 image. When working with an initial RAM filesystem (initramfs) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005412 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06005413 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005414 in the Yocto Project Development Tasks Manual.
5415
Andrew Geisslerf0343792020-11-18 10:42:21 -06005416 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005417 Specifies a list of packages the OpenEmbedded build system attempts
5418 to install when creating an image. If a listed package fails to
5419 install, the build system does not generate an error. This variable
5420 is generally not user-defined.
5421
Andrew Geisslerf0343792020-11-18 10:42:21 -06005422 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005423 Specifies a list of functions run to pre-process the
5424 :term:`PKGD` directory prior to splitting the files out
5425 to individual packages.
5426
Andrew Geisslerf0343792020-11-18 10:42:21 -06005427 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005428 Specifies a list of dependencies for post-installation and
5429 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005430 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005431 creation time rather than on the target but depends on a native tool
5432 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005433 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005434
5435 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005436 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005437 section in the Yocto Project Development Tasks Manual.
5438
Andrew Geisslerf0343792020-11-18 10:42:21 -06005439 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005440 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005441 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005442 recipes when you specify features and then arguments that define
5443 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005444 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005445
5446 PACKAGECONFIG ??= "f1 f2 f3 ..."
5447 PACKAGECONFIG[f1] = "\
5448 --with-f1, \
5449 --without-f1, \
5450 build-deps-for-f1, \
5451 runtime-deps-for-f1, \
5452 runtime-recommends-for-f1, \
5453 packageconfig-conflicts-for-f1"
5454 PACKAGECONFIG[f2] = "\
5455 ... and so on and so on ...
5456
Andrew Geissler5f350902021-07-23 13:09:54 -04005457 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005458 list of the features to enable. Following the features, you can
5459 determine the behavior of each feature by providing up to six
5460 order-dependent arguments, which are separated by commas. You can
5461 omit any argument you like but must retain the separating commas. The
5462 order is important and specifies the following:
5463
5464 1. Extra arguments that should be added to the configure script
5465 argument list (:term:`EXTRA_OECONF` or
5466 :term:`PACKAGECONFIG_CONFARGS`) if
5467 the feature is enabled.
5468
Andrew Geissler09036742021-06-25 14:25:14 -05005469 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5470 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005471
5472 3. Additional build dependencies (:term:`DEPENDS`)
5473 that should be added if the feature is enabled.
5474
5475 4. Additional runtime dependencies (:term:`RDEPENDS`)
5476 that should be added if the feature is enabled.
5477
5478 5. Additional runtime recommendations
5479 (:term:`RRECOMMENDS`) that should be added if
5480 the feature is enabled.
5481
Andrew Geissler09036742021-06-25 14:25:14 -05005482 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005483 settings for this feature.
5484
Andrew Geissler09036742021-06-25 14:25:14 -05005485 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005486 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5487 three arguments that determine the feature's behavior.
5488 ::
5489
5490 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5491
5492 The
5493 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5494 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005495 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005496 other hand, if the feature is disabled say through a ``.bbappend``
5497 file in another layer, then the second argument ``--without-gtk3`` is
5498 added to the configure script instead.
5499
Andrew Geissler09036742021-06-25 14:25:14 -05005500 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005501 regardless of whether you are creating a block or changing a block.
5502 When creating a block, use the structure inside your recipe.
5503
Andrew Geissler09036742021-06-25 14:25:14 -05005504 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005505 so one of two ways:
5506
5507 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05005508 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05005509 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005510 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005511
5512 PACKAGECONFIG = "f4 f5"
5513
Andrew Geisslerc926e172021-05-07 16:11:35 -05005514 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005515
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005516 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005517
5518 - *Configuration file:* This method is identical to changing the
5519 block through an append file except you edit your ``local.conf``
5520 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05005521 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005522
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005523 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005524
Andrew Geisslerc926e172021-05-07 16:11:35 -05005525 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005526
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005527 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005528
Andrew Geisslerf0343792020-11-18 10:42:21 -06005529 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005530 A space-separated list of configuration options generated from the
5531 :term:`PACKAGECONFIG` setting.
5532
5533 Classes such as :ref:`autotools <ref-classes-autotools>` and
Andrew Geissler09036742021-06-25 14:25:14 -05005534 :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5535 pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5536 respectively. If you are using :term:`PACKAGECONFIG` but not a class that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005537 handles the ``do_configure`` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05005538 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005539
Andrew Geisslerf0343792020-11-18 10:42:21 -06005540 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005541 For recipes inheriting the
5542 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05005543 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005544 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5545 should not be automatically created by the ``packagegroup`` recipe,
5546 which is the default behavior.
5547
Andrew Geisslerf0343792020-11-18 10:42:21 -06005548 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005549 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005550 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005551
Andrew Geissler5199d832021-09-24 16:47:35 -05005552 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005553
5554 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05005555 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005556 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05005557 package. If a file matches the :term:`FILES` variable for more than one
5558 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005559 (leftmost) package.
5560
5561 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005562 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005563 :ref:`ref-tasks-install` task) are not generated,
5564 unless generation is forced through the
5565 :term:`ALLOW_EMPTY` variable.
5566
Andrew Geisslerf0343792020-11-18 10:42:21 -06005567 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005568 A promise that your recipe satisfies runtime dependencies for
5569 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05005570 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005571 only states that they should be satisfied. For example, if a hard,
5572 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05005573 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005574 variable, but a package with the module name is never actually
5575 produced, then the other package will be broken. Thus, if you attempt
5576 to include that package in an image, you will get a dependency
5577 failure from the packaging system during the
5578 :ref:`ref-tasks-rootfs` task.
5579
5580 Typically, if there is a chance that such a situation can occur and
5581 the package that is not created is valid without the dependency being
5582 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05005583 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005584
Andrew Geissler09036742021-06-25 14:25:14 -05005585 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005586 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005587 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005588 section in the Yocto Project Development Tasks Manual.
5589
Andrew Geisslerf0343792020-11-18 10:42:21 -06005590 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005591 Specifies a list of functions run to perform additional splitting of
5592 files into individual packages. Recipes can either prepend to this
5593 variable or prepend to the ``populate_packages`` function in order to
5594 perform additional package splitting. In either case, the function
5595 should set :term:`PACKAGES`,
5596 :term:`FILES`, :term:`RDEPENDS` and
5597 other packaging variables appropriately in order to perform the
5598 desired splitting.
5599
Andrew Geisslerf0343792020-11-18 10:42:21 -06005600 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005601 Extra options passed to the ``make`` command during the
5602 :ref:`ref-tasks-compile` task in order to specify
5603 parallel compilation on the local build host. This variable is
5604 usually in the form "-j x", where x represents the maximum number of
5605 parallel threads ``make`` can run.
5606
5607 .. note::
5608
Andrew Geissler09036742021-06-25 14:25:14 -05005609 In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005610 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5611 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005612
5613 By default, the OpenEmbedded build system automatically sets this
5614 variable to be equal to the number of cores the build system uses.
5615
5616 .. note::
5617
5618 If the software being built experiences dependency issues during
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005619 the ``do_compile`` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05005620 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005621 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005622 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005623 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005624
5625 For single socket systems (i.e. one CPU), you should not have to
5626 override this variable to gain optimal parallelism during builds.
5627 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05005628 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005629 not set higher than "-j 20".
5630
5631 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005632 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005633 section in the Yocto Project Development Tasks Manual.
5634
Andrew Geisslerf0343792020-11-18 10:42:21 -06005635 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005636 Extra options passed to the ``make install`` command during the
5637 :ref:`ref-tasks-install` task in order to specify
5638 parallel installation. This variable defaults to the value of
5639 :term:`PARALLEL_MAKE`.
5640
5641 .. note::
5642
Andrew Geissler09036742021-06-25 14:25:14 -05005643 In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005644 be called with
5645 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5646 way to ensure this is to use the ``oe_runmake`` function.
5647
5648 If the software being built experiences dependency issues during
5649 the ``do_install`` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005650 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005651 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005652 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005653 section in the Yocto Project Development Tasks Manual.
5654
Andrew Geisslerf0343792020-11-18 10:42:21 -06005655 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005656 Determines the action to take when a patch fails. You can set this
5657 variable to one of two values: "noop" and "user".
5658
5659 The default value of "noop" causes the build to simply fail when the
5660 OpenEmbedded build system cannot successfully apply a patch. Setting
5661 the value to "user" causes the build system to launch a shell and
5662 places you in the right location so that you can manually resolve the
5663 conflicts.
5664
5665 Set this variable in your ``local.conf`` file.
5666
Andrew Geisslerf0343792020-11-18 10:42:21 -06005667 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005668 Specifies the utility used to apply patches for a recipe during the
5669 :ref:`ref-tasks-patch` task. You can specify one of
5670 three utilities: "patch", "quilt", or "git". The default utility used
5671 is "quilt" except for the quilt-native recipe itself. Because the
5672 quilt tool is not available at the time quilt-native is being
5673 patched, it uses "patch".
5674
5675 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005676 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005677
5678 PATCHTOOL = "patch"
5679 PATCHTOOL = "quilt"
5680 PATCHTOOL = "git"
5681
Andrew Geisslerf0343792020-11-18 10:42:21 -06005682 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005683 The epoch of the recipe. By default, this variable is unset. The
5684 variable is used to make upgrades possible when the versioning scheme
5685 changes in some backwards incompatible way.
5686
Andrew Geissler09036742021-06-25 14:25:14 -05005687 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005688
Andrew Geissler9aee5002022-03-30 16:27:02 +00005689 :term:`PEP517_WHEEL_PATH`
5690 When used by recipes that inherit the
5691 :ref:`python_pep517 <ref-classes-python_pep517>` class,
5692 denotes the path to ``dist/`` (short for distribution) where the
5693 binary archive ``wheel`` is built.
5694
Andrew Geisslerf0343792020-11-18 10:42:21 -06005695 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005696 Specifies the recipe or package name and includes all version and
5697 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5698 ``bash-4.2-r1/``). This variable is comprised of the following:
5699 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5700
Andrew Geisslerf0343792020-11-18 10:42:21 -06005701 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005702 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5703 class, this variable identifies packages that contain the pixbuf
5704 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5705 class assumes that the loaders are in the recipe's main package (i.e.
5706 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5707 loaders you need are in a package other than that main package.
5708
Andrew Geisslerf0343792020-11-18 10:42:21 -06005709 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005710 The name of the resulting package created by the OpenEmbedded build
5711 system.
5712
5713 .. note::
5714
Andrew Geissler09036742021-06-25 14:25:14 -05005715 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005716
5717 For example, when the :ref:`debian <ref-classes-debian>` class
5718 renames the output package, it does so by setting
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005719 ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005720
Andrew Geisslerf0343792020-11-18 10:42:21 -06005721 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005722 The path to ``pkg-config`` files for the current build context.
5723 ``pkg-config`` reads this variable from the environment.
5724
Andrew Geisslerf0343792020-11-18 10:42:21 -06005725 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005726 Points to the destination directory for files to be packaged before
5727 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005728 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005729
5730 ${WORKDIR}/package
5731
5732 Do not change this default.
5733
Andrew Geisslerf0343792020-11-18 10:42:21 -06005734 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005735 Points to a shared, global-state directory that holds data generated
5736 during the packaging process. During the packaging process, the
5737 :ref:`ref-tasks-packagedata` task packages data
5738 for each recipe and installs it into this temporary, shared area.
5739 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05005740 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005741
5742 ${STAGING_DIR_HOST}/pkgdata
5743
5744 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005745 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005746 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005747 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005748 section in the Yocto Project Development Tasks Manual. For more
5749 information on the shared, global-state directory, see
5750 :term:`STAGING_DIR_HOST`.
5751
Andrew Geisslerf0343792020-11-18 10:42:21 -06005752 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005753 Points to the parent directory for files to be packaged after they
5754 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005755 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005756
5757 ${WORKDIR}/packages-split
5758
5759 Under this directory, the build system creates directories for each
5760 package specified in :term:`PACKAGES`. Do not change
5761 this default.
5762
Andrew Geisslerf0343792020-11-18 10:42:21 -06005763 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005764 Points to a temporary work area where the
5765 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05005766 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005767
5768 ${WORKDIR}/pkgdata
5769
5770 Do not change this default.
5771
5772 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05005773 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005774 :term:`PKGDATA_DIR` to make it available globally.
5775
Andrew Geisslerf0343792020-11-18 10:42:21 -06005776 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05005777 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005778 is set to :term:`PE`.
5779
Andrew Geisslerf0343792020-11-18 10:42:21 -06005780 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005781 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005782 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005783
Andrew Geisslerf0343792020-11-18 10:42:21 -06005784 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005785 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005786 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005787
Andrew Geisslerf0343792020-11-18 10:42:21 -06005788 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005789 This variable can have two separate functions depending on the
5790 context: a recipe name or a resulting package name.
5791
Andrew Geissler09036742021-06-25 14:25:14 -05005792 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005793 OpenEmbedded build system as input to create a package. The name is
5794 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05005795 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005796 will be "expat".
5797
5798 The variable refers to a package name in the context of a file
5799 created or produced by the OpenEmbedded build system.
5800
Andrew Geissler09036742021-06-25 14:25:14 -05005801 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005802 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04005803 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05005804 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005805 and ``lib64-bash``, respectively.
5806
Andrew Geisslerf0343792020-11-18 10:42:21 -06005807 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005808 Specifies a list of functions to call once the OpenEmbedded build
5809 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005810 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005811
5812 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5813
5814 If you need to pass the SDK path to a command within a function, you
5815 can use ``${SDK_DIR}``, which points to the parent directory used by
5816 the OpenEmbedded build system when creating SDK output. See the
5817 :term:`SDK_DIR` variable for more information.
5818
Andrew Geisslerf0343792020-11-18 10:42:21 -06005819 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005820 Specifies a list of functions to call once the OpenEmbedded build
5821 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005822 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005823
5824 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5825
5826 If you need to pass the SDK path to a command within a function, you
5827 can use ``${SDK_DIR}``, which points to the parent directory used by
5828 the OpenEmbedded build system when creating SDK output. See the
5829 :term:`SDK_DIR` variable for more information.
5830
Andrew Geisslerf0343792020-11-18 10:42:21 -06005831 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005832 The revision of the recipe. The default value for this variable is
5833 "r0". Subsequent revisions of the recipe conventionally have the
5834 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05005835 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005836
5837 .. note::
5838
Andrew Geissler09036742021-06-25 14:25:14 -05005839 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005840 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06005841 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005842 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06005843 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005844 mechanisms.
5845
Andrew Geissler09036742021-06-25 14:25:14 -05005846 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005847 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05005848 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005849 :term:`PKGR`, helps the package manager distinguish which
5850 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05005851 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
5852 the same :term:`PV` usually means that the packages all install the same
5853 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005854 packaging fixes.
5855
5856 .. note::
5857
Andrew Geissler09036742021-06-25 14:25:14 -05005858 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005859 package contents or metadata.
5860
Andrew Geissler5f350902021-07-23 13:09:54 -04005861 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005862 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005863 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005864 in the Yocto Project Development Tasks Manual for more information.
5865
Andrew Geisslerf0343792020-11-18 10:42:21 -06005866 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005867 If multiple recipes provide the same item, this variable determines
5868 which recipe is preferred and thus provides the item (i.e. the
5869 preferred provider). You should always suffix this variable with the
5870 name of the provided item. And, you should define the variable using
5871 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05005872 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005873
5874 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5875
5876 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05005877 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005878 the recipe you prefer to provide "virtual/kernel".
5879
Andrew Geisslerc926e172021-05-07 16:11:35 -05005880 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005881
5882 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5883 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5884
5885 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005886 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005887 section in the Yocto Project Development Tasks Manual.
5888
5889 .. note::
5890
Andrew Geissler09036742021-06-25 14:25:14 -05005891 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005892 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05005893 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005894 desirable since this mechanism is designed to select between mutually
5895 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005896
Andrew Geisslerf0343792020-11-18 10:42:21 -06005897 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005898 If there are multiple versions of a recipe available, this variable
5899 determines which version should be given preference. You must always
5900 suffix the variable with the :term:`PN` you want to select (`python` in
5901 the first example below), and you should specify the :term:`PV`
5902 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005903
Andrew Geissler09036742021-06-25 14:25:14 -05005904 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005905 through the "``%``" character. You can use the character to match any
5906 number of characters, which can be useful when specifying versions
5907 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005908 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005909
5910 PREFERRED_VERSION_python = "3.4.0"
5911 PREFERRED_VERSION_linux-yocto = "5.0%"
5912
5913 .. note::
5914
5915 The use of the "%" character is limited in that it only works at the end of the
5916 string. You cannot use the wildcard character in any other
5917 location of the string.
5918
5919 The specified version is matched against :term:`PV`, which
5920 does not necessarily match the version part of the recipe's filename.
5921 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005922 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005923
5924 PV = "1.1+git${SRCPV}"
5925
5926 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05005927 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005928
5929 PREFERRED_VERSION_foo = "1.1+git%"
5930
5931 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05005932 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005933
5934 PREFERRED_VERSION_foo = "git"
5935
Andrew Geissler09036742021-06-25 14:25:14 -05005936 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005937 configuration files in a way that is hard to change. You can use
5938 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05005939 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005940
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005941 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005942
5943 Although not recommended, worst case, you can also use the
5944 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005945 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005946
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005947 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005948
5949 .. note::
5950
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005951 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05005952 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005953
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005954 If a recipe with the specified version is not available, a warning
5955 message will be shown. See :term:`REQUIRED_VERSION` if you want this
5956 to be an error instead.
5957
Andrew Geisslerf0343792020-11-18 10:42:21 -06005958 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005959 Specifies additional paths from which the OpenEmbedded build system
5960 gets source code. When the build system searches for source code, it
5961 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05005962 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005963 source, and then locations specified by
5964 :term:`MIRRORS` in that order.
5965
5966 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005967 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005968 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5969
5970 Typically, you could add a specific server for the build system to
5971 attempt before any others by adding something like the following to
5972 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005973 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005974
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005975 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00005976 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5977 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5978 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5979 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005980
5981 These changes cause the
5982 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5983 direct them to the ``http://`` sources mirror. You can use
5984 ``file://`` URLs to point to local directories or network shares as
5985 well.
5986
Andrew Geisslerf0343792020-11-18 10:42:21 -06005987 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005988 Indicates the importance of a package.
5989
Andrew Geissler09036742021-06-25 14:25:14 -05005990 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005991 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05005992 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005993 normally set within recipes.
5994
Andrew Geissler09036742021-06-25 14:25:14 -05005995 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005996 "optional", which is the default.
5997
Andrew Geisslerf0343792020-11-18 10:42:21 -06005998 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005999 Specifies libraries installed within a recipe that should be ignored
6000 by the OpenEmbedded build system's shared library resolver. This
6001 variable is typically used when software being built by a recipe has
6002 its own private versions of a library normally provided by another
6003 recipe. In this case, you would not want the package containing the
6004 private libraries to be set as a dependency on other unrelated
6005 packages that should instead depend on the package providing the
6006 standard version of the library.
6007
6008 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05006009 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006010
6011 PRIVATE_LIBS = "libmozjs.so \
6012 libxpcom.so \
6013 libnspr4.so \
6014 libxul.so \
6015 libmozalloc.so \
6016 libplc4.so \
6017 libplds4.so"
6018
6019 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006020 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006021 section in the Yocto Project Overview and Concepts Manual.
6022
Andrew Geisslerf0343792020-11-18 10:42:21 -06006023 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006024 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05006025 default, a recipe's own :term:`PN` is implicitly already in its
6026 :term:`PROVIDES` list and therefore does not need to mention that it
6027 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006028 aliases are synonyms for the recipe and can be useful for satisfying
6029 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006030 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006031
Andrew Geissler09036742021-06-25 14:25:14 -05006032 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05006033 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006034
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006035 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006036
Andrew Geissler09036742021-06-25 14:25:14 -05006037 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006038 results in the "eudev" recipe also being available as simply "udev".
6039
6040 .. note::
6041
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006042 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
6043 to `PROVIDES`, so while using "+=" in the above example may not be
6044 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006045
6046 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05006047 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006048 virtual target is a name that corresponds to some particular
6049 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05006050 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006051 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05006052 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006053
6054 Conventionally, virtual targets have names on the form
6055 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6056 of the name and has no syntactical significance.
6057
6058 The :term:`PREFERRED_PROVIDER` variable is
6059 used to select which particular recipe provides a virtual target.
6060
6061 .. note::
6062
6063 A corresponding mechanism for virtual runtime dependencies
6064 (packages) exists. However, the mechanism does not depend on any
6065 special functionality beyond ordinary variable assignments. For
6066 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6067 the component that manages the ``/dev`` directory.
6068
6069 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006070 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006071
6072 VIRTUAL-RUNTIME_dev_manager = "udev"
6073
6074
Andrew Geisslerf0343792020-11-18 10:42:21 -06006075 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006076 The network based :term:`PR` service host and port.
6077
6078 The ``conf/local.conf.sample.extended`` configuration file in the
6079 :term:`Source Directory` shows how the
Andrew Geissler09036742021-06-25 14:25:14 -05006080 :term:`PRSERV_HOST` variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006081
6082 PRSERV_HOST = "localhost:0"
6083
6084 You must
6085 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06006086 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006087 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006088
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006089
6090 :term:`PSEUDO_IGNORE_PATHS`
6091 A comma-separated (without spaces) list of path prefixes that should be ignored
6092 by pseudo when monitoring and recording file operations, in order to avoid
6093 problems with files being written to outside of the pseudo context and
6094 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6095 and can include partial directory (or file) names.
6096
6097
Andrew Geisslerf0343792020-11-18 10:42:21 -06006098 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006099 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06006100 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006101 functionality is enabled when building a recipe. You should not set
6102 this variable directly. Enabling and disabling building Package Tests
6103 at build time should be done by adding "ptest" to (or removing it
6104 from) :term:`DISTRO_FEATURES`.
6105
Andrew Geisslerf0343792020-11-18 10:42:21 -06006106 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006107 The version of the recipe. The version is normally extracted from the
6108 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006109 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6110 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006111 building an unstable (i.e. development) version from a source code
6112 repository (e.g. Git or Subversion).
6113
Andrew Geissler09036742021-06-25 14:25:14 -05006114 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006115
Andrew Geisslerf0343792020-11-18 10:42:21 -06006116 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006117 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006118 :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006119 Application Binary Interface (ABI) currently in use for Python. By
6120 default, the ABI is "m". You do not have to set this variable as the
6121 OpenEmbedded build system sets it for you.
6122
6123 The OpenEmbedded build system uses the ABI to construct directory
6124 names used when installing the Python headers and libraries in
6125 sysroot (e.g. ``.../python3.3m/...``).
6126
Andrew Geisslerf0343792020-11-18 10:42:21 -06006127 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006128 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006129 :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the
Andrew Geissler09036742021-06-25 14:25:14 -05006130 major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006131 be "python3". You do not have to set this variable as the
6132 OpenEmbedded build system automatically sets it for you.
6133
6134 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006135 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006136
6137 DEPENDS += "${PYTHON_PN}-native"
6138
6139 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006140 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006141
Patrick Williams03907ee2022-05-01 06:28:52 -05006142 :term:`QA_EMPTY_DIRS`
6143 Specifies a list of directories that are expected to be empty when
6144 packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or
6145 :term:`WARN_QA` these will be checked and an error or warning
6146 (respectively) will be produced.
6147
6148 The default :term:`QA_EMPTY_DIRS` value is set in
6149 :ref:`insane.bbclass <ref-classes-insane>`.
6150
6151 :term:`QA_EMPTY_DIRS_RECOMMENDATION`
6152 Specifies a recommendation for why a directory must be empty,
6153 which will be included in the error message if a specific directory
6154 is found to contain files. Must be overridden with the directory
6155 path to match on.
6156
6157 If no recommendation is specified for a directory, then the default
6158 "but it is expected to be empty" will be used.
6159
6160 An example message shows if files were present in '/dev'::
6161
6162 QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime"
6163
Andrew Geisslerf0343792020-11-18 10:42:21 -06006164 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006165 The minimal command and arguments to run ``ranlib``.
6166
Andrew Geisslerf0343792020-11-18 10:42:21 -06006167 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006168 The list of packages that conflict with packages. Note that packages
6169 will not be installed if conflicting packages are not first removed.
6170
6171 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006172 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006173
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006174 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006175
6176 BitBake, which the OpenEmbedded build system uses, supports
6177 specifying versioned dependencies. Although the syntax varies
6178 depending on the packaging format, BitBake hides these differences
6179 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006180 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006181
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006182 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006183
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006184 For ``operator``, you can specify the following:
6185
6186 - =
6187 - <
6188 - >
6189 - <=
6190 - >=
6191
6192 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006193 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006194
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006195 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006196
Andrew Geisslerf0343792020-11-18 10:42:21 -06006197 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006198 Lists runtime dependencies of a package. These dependencies are other
6199 packages that must be installed in order for the package to function
6200 correctly. As an example, the following assignment declares that the
6201 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006202 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006203
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006204 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006205
6206 The most common types of package
6207 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006208 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006209 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006210 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006211 section in the Yocto Project Overview and Concepts Manual.
6212
Andrew Geissler09036742021-06-25 14:25:14 -05006213 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006214 ``bar`` and ``baz`` will be declared as dependencies inside the
6215 package ``foo`` when it is written out by one of the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006216 :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006217 Exactly how this is done depends on which package format is used,
6218 which is determined by
6219 :term:`PACKAGE_CLASSES`. When the
6220 corresponding package manager installs the package, it will know to
6221 also install the packages on which it depends.
6222
6223 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006224 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006225 added. This dependency is from the recipe's
6226 :ref:`ref-tasks-build` (not to be confused with
6227 :ref:`ref-tasks-compile`) task to the
6228 ``do_package_write_*`` task of the recipes that build ``bar`` and
6229 ``baz``.
6230
Andrew Geissler09036742021-06-25 14:25:14 -05006231 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geissler615f2f12022-07-15 14:00:58 -05006232 names of other packages --- they cannot be recipe names. Although
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006233 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006234 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006235 variable. For an example of the default list of packages created from
6236 a recipe, see the :term:`PACKAGES` variable.
6237
Andrew Geissler09036742021-06-25 14:25:14 -05006238 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006239 you should always use the variable in a form with an attached package
6240 name (remember that a single recipe can build multiple packages). For
6241 example, suppose you are building a development package that depends
6242 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006243 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006244
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006245 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006246
6247 In the example,
6248 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006249 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006250 the variable.
6251
6252 .. note::
6253
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006254 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006255 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006256 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006257 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006258 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006259
Andrew Geissler09036742021-06-25 14:25:14 -05006260 The package names you use with :term:`RDEPENDS` must appear as they would
6261 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006262 allows a different name to be used for the final package (e.g. the
6263 :ref:`debian <ref-classes-debian>` class uses this to rename
6264 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006265 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006266 independent of the package format used.
6267
6268 BitBake, which the OpenEmbedded build system uses, supports
6269 specifying versioned dependencies. Although the syntax varies
6270 depending on the packaging format, BitBake hides these differences
6271 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006272 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006273
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006274 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006275
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006276 For ``operator``, you can specify the following:
6277
6278 - =
6279 - <
6280 - >
6281 - <=
6282 - >=
6283
6284 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006285
6286 .. note::
6287
Andrew Geissler09036742021-06-25 14:25:14 -05006288 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006289 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006290
6291 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006292 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006293
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006294 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006295
6296 For information on build-time dependencies, see the
6297 :term:`DEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05006298 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6299 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006300 BitBake User Manual for additional information on tasks and
6301 dependencies.
6302
Andrew Geissler5199d832021-09-24 16:47:35 -05006303 :term:`RECIPE_NO_UPDATE_REASON`
6304 If a recipe should not be replaced by a more recent upstream version,
6305 putting the reason why in this variable in a recipe allows
6306 ``devtool check-upgrade-status`` command to display it, as explained
6307 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6308 section.
6309
Andrew Geisslerf0343792020-11-18 10:42:21 -06006310 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006311 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006312 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006313 class, this variable identifies distribution features that must exist
6314 in the current configuration in order for the OpenEmbedded build
6315 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006316 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6317 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006318 the recipe will be skipped, and if the build system attempts to build
6319 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006320
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006321 :term:`REQUIRED_VERSION`
6322 If there are multiple versions of a recipe available, this variable
6323 determines which version should be given preference.
6324 :term:`REQUIRED_VERSION` works in exactly the same manner as
6325 :term:`PREFERRED_VERSION`, except that if the specified version is not
6326 available then an error message is shown and the build fails
6327 immediately.
6328
6329 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6330 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6331
Andrew Geisslerf0343792020-11-18 10:42:21 -06006332 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006333 With ``rm_work`` enabled, this variable specifies a list of recipes
6334 whose work directories should not be removed. See the
Andrew Geissler595f6302022-01-24 19:11:47 +00006335 ":ref:`ref-classes-rm-work`" section for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006336 details.
6337
Andrew Geisslerf0343792020-11-18 10:42:21 -06006338 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006339 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006340 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006341
6342 ROOT_HOME ??= "/home/root"
6343
6344 .. note::
6345
6346 This default value is likely used because some embedded solutions
6347 prefer to have a read-only root filesystem and prefer to keep
6348 writeable data in one place.
6349
6350 You can override the default by setting the variable in any layer or
6351 in the ``local.conf`` file. Because the default is set using a "weak"
6352 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006353 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006354
6355 ROOT_HOME = "/root"
6356 ROOT_HOME ?= "/root"
6357
6358 These
6359 override examples use ``/root``, which is probably the most commonly
6360 used override.
6361
Andrew Geisslerf0343792020-11-18 10:42:21 -06006362 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006363 Indicates a filesystem image to include as the root filesystem.
6364
Andrew Geissler09036742021-06-25 14:25:14 -05006365 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006366 :ref:`image-live <ref-classes-image-live>` class.
6367
Andrew Geisslerf0343792020-11-18 10:42:21 -06006368 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006369 Specifies a list of functions to call after the OpenEmbedded build
6370 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006371 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006372
6373 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6374
6375 If you need to pass the root filesystem path to a command within a
6376 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6377 directory that becomes the root filesystem image. See the
6378 :term:`IMAGE_ROOTFS` variable for more
6379 information.
6380
Andrew Geisslerf0343792020-11-18 10:42:21 -06006381 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006382 Specifies a list of functions to call once the OpenEmbedded build
6383 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006384 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006385
6386 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6387
6388 If you need to pass the root filesystem path to a command within a
6389 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6390 directory that becomes the root filesystem image. See the
6391 :term:`IMAGE_ROOTFS` variable for more
6392 information.
6393
Andrew Geisslerf0343792020-11-18 10:42:21 -06006394 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006395 Specifies a list of functions to call after the OpenEmbedded build
6396 system has removed unnecessary packages. When runtime package
6397 management is disabled in the image, several packages are removed
6398 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006399 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006400
6401 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6402
6403 If you need to pass the root filesystem path to a command within a
6404 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6405 directory that becomes the root filesystem image. See the
6406 :term:`IMAGE_ROOTFS` variable for more
6407 information.
6408
Andrew Geisslerf0343792020-11-18 10:42:21 -06006409 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006410 Specifies a list of functions to call before the OpenEmbedded build
6411 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006412 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006413
6414 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6415
6416 If you need to pass the root filesystem path to a command within a
6417 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6418 directory that becomes the root filesystem image. See the
6419 :term:`IMAGE_ROOTFS` variable for more
6420 information.
6421
Andrew Geisslerf0343792020-11-18 10:42:21 -06006422 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006423 A list of package name aliases that a package also provides. These
6424 aliases are useful for satisfying runtime dependencies of other
6425 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006426 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006427
6428 .. note::
6429
Andrew Geissler09036742021-06-25 14:25:14 -05006430 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006431
6432 As with all package-controlling variables, you must always use the
6433 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006434 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006435
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006436 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006437
Andrew Geisslerf0343792020-11-18 10:42:21 -06006438 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006439 A list of packages that extends the usability of a package being
6440 built. The package being built does not depend on this list of
6441 packages in order to successfully build, but rather uses them for
6442 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006443 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006444
Andrew Geissler09036742021-06-25 14:25:14 -05006445 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006446 list of packages when installing the built package. However, you can
6447 prevent listed packages from being installed by using the
6448 :term:`BAD_RECOMMENDATIONS`,
6449 :term:`NO_RECOMMENDATIONS`, and
6450 :term:`PACKAGE_EXCLUDE` variables.
6451
Andrew Geissler09036742021-06-25 14:25:14 -05006452 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006453 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006454 through the :term:`PACKAGES` or
6455 :term:`PACKAGES_DYNAMIC` variables or the
6456 :term:`RPROVIDES` variable, or an error will occur
6457 during the build. If such a recipe does exist and the package is not
6458 produced, the build continues without error.
6459
Andrew Geissler09036742021-06-25 14:25:14 -05006460 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006461 you should always attach an override to the variable to specify the
6462 particular package whose usability is being extended. For example,
6463 suppose you are building a development package that is extended to
6464 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006465 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006466
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006467 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006468
6469 In the
6470 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006471 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006472 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006473
6474 BitBake, which the OpenEmbedded build system uses, supports
6475 specifying versioned recommends. Although the syntax varies depending
6476 on the packaging format, BitBake hides these differences from you.
6477 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006478 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006479
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006480 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006481
6482 For ``operator``, you can specify the following:
6483
6484 - =
6485 - <
6486 - >
6487 - <=
6488 - >=
6489
6490 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006491 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006492
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006493 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006494
Andrew Geisslerf0343792020-11-18 10:42:21 -06006495 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006496 A list of packages replaced by a package. The package manager uses
6497 this variable to determine which package should be installed to
6498 replace other package(s) during an upgrade. In order to also have the
6499 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05006500 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006501
6502 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05006503 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006504
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006505 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006506
6507 BitBake, which the OpenEmbedded build system uses, supports
6508 specifying versioned replacements. Although the syntax varies
6509 depending on the packaging format, BitBake hides these differences
6510 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006511 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006512
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006513 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006514
6515 For ``operator``, you can specify the following:
6516
6517 - =
6518 - <
6519 - >
6520 - <=
6521 - >=
6522
6523 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05006524 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006525
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006526 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006527
Andrew Geisslerf0343792020-11-18 10:42:21 -06006528 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006529 A list of additional packages that you can suggest for installation
6530 by the package manager at the time a package is installed. Not all
6531 package managers support this functionality.
6532
6533 As with all package-controlling variables, you must always use this
6534 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006535 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006536
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006537 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006538
Andrew Geisslerf0343792020-11-18 10:42:21 -06006539 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006540 The location in the :term:`Build Directory` where
6541 unpacked recipe source code resides. By default, this directory is
6542 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6543 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6544 version. If the source tarball extracts the code to a directory named
6545 anything other than ``${BPN}-${PV}``, or if the source code is
6546 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05006547 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006548 to find the unpacked source.
6549
6550 As an example, assume a :term:`Source Directory`
6551 top-level folder named ``poky`` and a default Build Directory at
6552 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05006553 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006554
6555 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6556
6557 The unpacked source code resides in the ``db-5.1.19`` folder.
6558
6559 This next example assumes a Git repository. By default, Git
6560 repositories are cloned to ``${WORKDIR}/git`` during
6561 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05006562 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006563 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006564
Andrew Geissler9aee5002022-03-30 16:27:02 +00006565 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006566 S = "${WORKDIR}/git"
6567
Andrew Geisslerf0343792020-11-18 10:42:21 -06006568 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006569 Specifies a list of command-line utilities that should be checked for
6570 during the initial sanity checking process when running BitBake. If
6571 any of the utilities are not installed on the build host, then
6572 BitBake immediately exits with an error.
6573
Andrew Geisslerf0343792020-11-18 10:42:21 -06006574 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006575 A list of the host distribution identifiers that the build system has
6576 been tested against. Identifiers consist of the host distributor ID
6577 followed by the release, as reported by the ``lsb_release`` tool or
6578 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05006579 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006580 not empty and the current value of
6581 :term:`NATIVELSBSTRING` does not appear in the
6582 list, then the build system reports a warning that indicates the
6583 current host distribution has not been tested as a build host.
6584
Andrew Geisslerf0343792020-11-18 10:42:21 -06006585 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006586 The target architecture for the SDK. Typically, you do not directly
6587 set this variable. Instead, use :term:`SDKMACHINE`.
6588
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006589 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05006590 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006591 "1" and a ``conf/templateconf.conf`` file exists in the build directory
6592 (:term:`TOPDIR`) then this will be copied into the SDK.
6593
Andrew Geisslerf0343792020-11-18 10:42:21 -06006594 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006595 The directory set up and used by the
6596 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6597 the SDK is deployed. The ``populate_sdk_base`` class defines
Andrew Geissler09036742021-06-25 14:25:14 -05006598 :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006599
6600 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6601
Andrew Geisslerf0343792020-11-18 10:42:21 -06006602 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006603 The parent directory used by the OpenEmbedded build system when
6604 creating SDK output. The
6605 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05006606 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006607
6608 SDK_DIR = "${WORKDIR}/sdk"
6609
6610 .. note::
6611
Andrew Geissler09036742021-06-25 14:25:14 -05006612 The :term:`SDK_DIR` directory is a temporary directory as it is part of
6613 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006614
Andrew Geisslerf0343792020-11-18 10:42:21 -06006615 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006616 Controls whether or not shared state artifacts are copied into the
6617 extensible SDK. The default value of "full" copies all of the
6618 required shared state artifacts into the extensible SDK. The value
6619 "minimal" leaves these artifacts out of the SDK.
6620
6621 .. note::
6622
6623 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006624 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6625 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006626
Andrew Geisslerf0343792020-11-18 10:42:21 -06006627 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006628 The manifest file for the host part of the SDK. This file lists all
6629 the installed packages that make up the host part of the SDK. The
6630 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006631 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006632
6633 packagename packagearch version
6634
6635 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006636 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006637
6638 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6639
6640 The location is derived using the :term:`SDK_DEPLOY` and
6641 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6642
Andrew Geisslerf0343792020-11-18 10:42:21 -06006643 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006644 When set to "1", specifies to include the packagedata for all recipes
6645 in the "world" target in the extensible SDK. Including this data
6646 allows the ``devtool search`` command to find these recipes in search
6647 results, as well as allows the ``devtool add`` command to map
6648 dependencies more effectively.
6649
6650 .. note::
6651
Andrew Geissler09036742021-06-25 14:25:14 -05006652 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006653 variable significantly increases build time because all of world
6654 needs to be built. Enabling the variable also slightly increases
6655 the size of the extensible SDK.
6656
Andrew Geisslerf0343792020-11-18 10:42:21 -06006657 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006658 When set to "1", specifies to include the toolchain in the extensible
6659 SDK. Including the toolchain is useful particularly when
6660 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6661 the SDK reasonably small but you still want to provide a usable
6662 toolchain. For example, suppose you want to use the toolchain from an
6663 IDE or from other tools and you do not want to perform additional
6664 steps to install the toolchain.
6665
Andrew Geissler09036742021-06-25 14:25:14 -05006666 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6667 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6668 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006669
Andrew Geisslerf0343792020-11-18 10:42:21 -06006670 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006671 The base name for SDK output files. The name is derived from the
6672 :term:`DISTRO`, :term:`TCLIBC`,
6673 :term:`SDK_ARCH`,
6674 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05006675 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006676
6677 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6678
Andrew Geisslerf0343792020-11-18 10:42:21 -06006679 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006680 Specifies the operating system for which the SDK will be built. The
6681 default value is the value of :term:`BUILD_OS`.
6682
Andrew Geisslerf0343792020-11-18 10:42:21 -06006683 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006684 The location used by the OpenEmbedded build system when creating SDK
6685 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05006686 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006687
6688 SDK_DIR = "${WORKDIR}/sdk"
6689 SDK_OUTPUT = "${SDK_DIR}/image"
6690 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6691
6692 .. note::
6693
Andrew Geissler09036742021-06-25 14:25:14 -05006694 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006695 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6696 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006697
Andrew Geisslerf0343792020-11-18 10:42:21 -06006698 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006699 Specifies a list of architectures compatible with the SDK machine.
6700 This variable is set automatically and should not normally be
6701 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05006702 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006703 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6704
Andrew Geisslerf0343792020-11-18 10:42:21 -06006705 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006706 Specifies a list of functions to call once the OpenEmbedded build
6707 system creates the SDK. You can specify functions separated by
6708 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6709
6710 If you need to pass an SDK path to a command within a function, you
6711 can use ``${SDK_DIR}``, which points to the parent directory used by
6712 the OpenEmbedded build system when creating SDK output. See the
6713 :term:`SDK_DIR` variable for more information.
6714
Andrew Geisslerf0343792020-11-18 10:42:21 -06006715 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006716 The toolchain binary prefix used for ``nativesdk`` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05006717 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006718 :term:`TARGET_PREFIX` when building
6719 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6720
Andrew Geisslerf0343792020-11-18 10:42:21 -06006721 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006722 A list of shared state tasks added to the extensible SDK. By default,
6723 the following tasks are added:
6724
6725 - do_populate_lic
6726 - do_package_qa
6727 - do_populate_sysroot
6728 - do_deploy
6729
6730 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05006731 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006732 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05006733 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006734 tasks that are needed in order to build
6735 :term:`SDK_TARGETS`).
6736
Andrew Geisslerf0343792020-11-18 10:42:21 -06006737 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006738 Specifies the system, including the architecture and the operating
6739 system, for which the SDK will be built.
6740
6741 The OpenEmbedded build system automatically sets this variable based
6742 on :term:`SDK_ARCH`,
6743 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05006744 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006745 variable yourself.
6746
Andrew Geisslerf0343792020-11-18 10:42:21 -06006747 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006748 The manifest file for the target part of the SDK. This file lists all
6749 the installed packages that make up the target part of the SDK. The
6750 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006751 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006752
6753 packagename packagearch version
6754
6755 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006756 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006757
6758 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6759
6760 The location is derived using the :term:`SDK_DEPLOY` and
6761 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6762
Andrew Geisslerf0343792020-11-18 10:42:21 -06006763 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006764 A list of targets to install from shared state as part of the
6765 standard or extensible SDK installation. The default value is "${PN}"
6766 (i.e. the image from which the SDK is built).
6767
Andrew Geissler09036742021-06-25 14:25:14 -05006768 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006769 would not be changed.
6770
Andrew Geisslerf0343792020-11-18 10:42:21 -06006771 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006772 The title to be printed when running the SDK installer. By default,
6773 this title is based on the :term:`DISTRO_NAME` or
6774 :term:`DISTRO` variable and is set in the
6775 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006776 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006777
6778 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6779
6780 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006781 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006782
6783 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006784 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006785 section in the Yocto Project Application Development and the
6786 Extensible Software Development Kit (eSDK) manual.
6787
Andrew Geisslerf0343792020-11-18 10:42:21 -06006788 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006789 An optional URL for an update server for the extensible SDK. If set,
6790 the value is used as the default update server when running
6791 ``devtool sdk-update`` within the extensible SDK.
6792
Andrew Geisslerf0343792020-11-18 10:42:21 -06006793 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006794 Specifies the name of the SDK vendor.
6795
Andrew Geisslerf0343792020-11-18 10:42:21 -06006796 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006797 Specifies the version of the SDK. The Poky distribution configuration file
6798 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05006799 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006800
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006801 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006802
6803 For additional information, see the
6804 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006805 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006806
Andrew Geisslerf0343792020-11-18 10:42:21 -06006807 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006808 The default installation directory for the Extensible SDK. By
6809 default, this directory is based on the :term:`DISTRO`
6810 variable and is set in the
6811 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006812 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006813
6814 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6815
6816 For the
Andrew Geissler09036742021-06-25 14:25:14 -05006817 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006818
6819 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006820 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006821 section in the Yocto Project Application Development and the
6822 Extensible Software Development Kit (eSDK) manual.
6823
Andrew Geisslerf0343792020-11-18 10:42:21 -06006824 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05006825 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006826 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006827
6828 $ bitbake -c populate_sdk imagename
6829
Andrew Geisslerf0343792020-11-18 10:42:21 -06006830 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00006831 The machine for which the SDK is built. In other words, the SDK is built
6832 such that it runs on the target you specify with the :term:`SDKMACHINE`
6833 value. The value points to a corresponding ``.conf`` file under
6834 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
6835 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
6836 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006837
Andrew Geissler595f6302022-01-24 19:11:47 +00006838 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
6839 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006840
6841 .. note::
6842
Andrew Geissler09036742021-06-25 14:25:14 -05006843 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006844 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00006845 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006846
Andrew Geisslerf0343792020-11-18 10:42:21 -06006847 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006848 Defines the path offered to the user for installation of the SDK that
6849 is generated by the OpenEmbedded build system. The path appears as
6850 the default location for installing the SDK when you run the SDK's
6851 installation script. You can override the offered path when you run
6852 the script.
6853
Andrew Geisslerf0343792020-11-18 10:42:21 -06006854 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006855 The full path to the sysroot used for cross-compilation within an SDK
6856 as it will be when installed into the default
6857 :term:`SDKPATH`.
6858
Andrew Geisslerf0343792020-11-18 10:42:21 -06006859 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006860 The section in which packages should be categorized. Package
6861 management utilities can make use of this variable.
6862
Andrew Geisslerf0343792020-11-18 10:42:21 -06006863 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006864 Specifies the optimization flags passed to the C compiler when
6865 building for the target. The flags are passed through the default
6866 value of the :term:`TARGET_CFLAGS` variable.
6867
Andrew Geissler09036742021-06-25 14:25:14 -05006868 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006869 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
6870 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006871
Andrew Geisslerf0343792020-11-18 10:42:21 -06006872 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006873 Defines a serial console (TTY) to enable using
6874 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6875 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006876 separated by a space. You cannot specify more than one TTY device::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006877
6878 SERIAL_CONSOLE = "115200 ttyS0"
6879
6880 .. note::
6881
Andrew Geissler09036742021-06-25 14:25:14 -05006882 The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006883 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006884
Andrew Geisslerf0343792020-11-18 10:42:21 -06006885 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006886 Defines a serial console (TTY) to enable using
6887 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6888 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006889 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006890
6891 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6892
Andrew Geisslerf0343792020-11-18 10:42:21 -06006893 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006894 Specifies serial consoles, which must be listed in
6895 :term:`SERIAL_CONSOLES`, to check against
6896 ``/proc/console`` before enabling them using getty. This variable
6897 allows aliasing in the format: <device>:<alias>. If a device was
6898 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006899 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006900
6901 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6902
6903 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006904 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
6905 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
6906 incompatible with customizations such as the following::
6907
6908 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006909
Andrew Geissler595f6302022-01-24 19:11:47 +00006910 :term:`SETUPTOOLS_BUILD_ARGS`
6911 When used by recipes that inherit the
6912 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6913 be used to specify additional arguments to be passed to ``setup.py build``
6914 in the ``setuptools3_do_compile()`` task.
6915
6916 :term:`SETUPTOOLS_INSTALL_ARGS`
6917 When used by recipes that inherit the
6918 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6919 be used to specify additional arguments to be passed to ``setup.py install``
6920 in the ``setuptools3_do_install()`` task.
6921
6922 :term:`SETUPTOOLS_SETUP_PATH`
6923 When used by recipes that inherit the
6924 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
6925 be used to specify the directory in which the ``setup.py`` file is
6926 located if it is not at the root of the source tree (as specified by
6927 :term:`S`). For example, in a recipe where the sources are fetched from
6928 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
6929 subdirectory, you would have this::
6930
6931 S = "${WORKDIR}/git"
6932 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
6933
Andrew Geisslerf0343792020-11-18 10:42:21 -06006934 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006935 A list of recipe dependencies that should not be used to determine
6936 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05006937 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006938
6939 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6940
6941 In the previous example, ``intone`` depends on ``mplayer2``.
6942
6943 You can use the special token ``"*"`` on the left-hand side of the
6944 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05006945 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006946
6947 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6948
6949 In the previous example, all recipes except ``quilt-native`` ignore
6950 task signatures from the ``quilt-native`` recipe when determining
6951 their task signatures.
6952
6953 Use of this variable is one mechanism to remove dependencies that
6954 affect task signatures and thus force rebuilds when a recipe changes.
6955
6956 .. note::
6957
6958 If you add an inappropriate dependency for a recipe relationship,
6959 the software might break during runtime if the interface of the
6960 second recipe was changed after the first recipe had been built.
6961
Andrew Geisslerf0343792020-11-18 10:42:21 -06006962 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006963 A list of recipes that are completely stable and will never change.
6964 The ABI for the recipes in the list are presented by output from the
6965 tasks run to build the recipe. Use of this variable is one way to
6966 remove dependencies from one recipe on another that affect task
6967 signatures and thus force rebuilds when the recipe changes.
6968
6969 .. note::
6970
6971 If you add an inappropriate variable to this list, the software
6972 might break at runtime if the interface of the recipe was changed
6973 after the other had been built.
6974
Andrew Geisslerf0343792020-11-18 10:42:21 -06006975 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006976 Specifies the number of bits for the target system CPU. The value
6977 should be either "32" or "64".
6978
Andrew Geisslerf0343792020-11-18 10:42:21 -06006979 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006980 Specifies the endian byte order of the target system. The value
6981 should be either "le" for little-endian or "be" for big-endian.
6982
Andrew Geisslerf0343792020-11-18 10:42:21 -06006983 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006984 Enables removal of all files from the "Provides" section of an RPM
6985 package. Removal of these files is required for packages containing
6986 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6987
6988 To enable file removal, set the variable to "1" in your
6989 ``conf/local.conf`` configuration file in your:
6990 :term:`Build Directory`.
6991 ::
6992
6993 SKIP_FILEDEPS = "1"
6994
Andrew Geissler9aee5002022-03-30 16:27:02 +00006995 :term:`SKIP_RECIPE`
6996 Used to prevent the OpenEmbedded build system from building a given
6997 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
6998 and provide a reason, which will be reported when attempting to
6999 build the recipe.
7000
7001 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
7002 variable in your ``local.conf`` file or distribution configuration.
7003 Here is an example which prevents ``myrecipe`` from being built::
7004
7005 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
7006
Andrew Geisslerf0343792020-11-18 10:42:21 -06007007 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007008 Groups together machines based upon the same family of SOC (System On
7009 Chip). You typically set this variable in a common ``.inc`` file that
7010 you include in the configuration files of all the machines.
7011
7012 .. note::
7013
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007014 You must include ``conf/machine/include/soc-family.inc`` for this
7015 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007016
Andrew Geisslerf0343792020-11-18 10:42:21 -06007017 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007018 Defines the suffix for shared libraries used on the target platform.
7019 By default, this suffix is ".so.*" for all Linux-based systems and is
7020 defined in the ``meta/conf/bitbake.conf`` configuration file.
7021
7022 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007023 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007024
Andrew Geisslerf0343792020-11-18 10:42:21 -06007025 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007026 Defines the suffix for the development symbolic link (symlink) for
7027 shared libraries on the target platform. By default, this suffix is
7028 ".so" for Linux-based systems and is defined in the
7029 ``meta/conf/bitbake.conf`` configuration file.
7030
7031 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007032 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007033
Andrew Geisslereff27472021-10-29 15:35:00 -05007034 :term:`SOURCE_DATE_EPOCH`
7035 This defines a date expressed in number of seconds since
7036 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
7037 multiple build systems to force a timestamp in built binaries.
7038 Many upstream projects already support this variable.
7039
7040 You will find more details in the `official specifications
7041 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
7042
7043 A value for each recipe is computed from the sources by
7044 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
7045
7046 If a recipe wishes to override the default behavior, it should set its
7047 own :term:`SOURCE_DATE_EPOCH` value::
7048
7049 SOURCE_DATE_EPOCH = "1613559011"
7050
Andrew Geisslerf0343792020-11-18 10:42:21 -06007051 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007052 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05007053 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007054 your ``local.conf`` configuration file ensures the source for all
7055 recipes are fetched regardless of whether or not a recipe is
7056 compatible with the configuration. A recipe is considered
7057 incompatible with the currently configured machine when either or
7058 both the :term:`COMPATIBLE_MACHINE`
7059 variable and :term:`COMPATIBLE_HOST` variables
7060 specify compatibility with a machine other than that of the current
7061 machine or host.
7062
7063 .. note::
7064
Andrew Geissler09036742021-06-25 14:25:14 -05007065 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007066 variable unless you are creating a source mirror. In other words,
7067 do not set the variable during a normal build.
7068
Andrew Geisslerf0343792020-11-18 10:42:21 -06007069 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007070 Defines your own :term:`PREMIRRORS` from which to
7071 first fetch source before attempting to fetch from the upstream
7072 specified in :term:`SRC_URI`.
7073
7074 To use this variable, you must globally inherit the
7075 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007076 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007077
7078 INHERIT += "own-mirrors"
7079 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7080
7081 .. note::
7082
Andrew Geissler09036742021-06-25 14:25:14 -05007083 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007084
Andrew Geisslerf0343792020-11-18 10:42:21 -06007085 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007086 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007087 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007088 mappings, see the ``meta/conf/licenses.conf`` file.
7089
7090 For additional information, see the :term:`LICENSE`
7091 variable.
7092
Andrew Geisslerf0343792020-11-18 10:42:21 -06007093 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007094 A list of prefixes for :term:`PN` used by the OpenEmbedded
7095 build system to create variants of recipes or packages. The list
7096 specifies the prefixes to strip off during certain circumstances such
7097 as the generation of the :term:`BPN` variable.
7098
Andrew Geisslerf0343792020-11-18 10:42:21 -06007099 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007100 The file type for the Secondary Program Loader (SPL). Some devices
7101 use an SPL from which to boot (e.g. the BeagleBone development
7102 board). For such cases, you can declare the file type of the SPL
7103 binary in the ``u-boot.inc`` include file, which is used in the
7104 U-Boot recipe.
7105
7106 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007107 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007108
7109 # Some versions of u-boot build an SPL (Second Program Loader) image that
7110 # should be packaged along with the u-boot binary as well as placed in the
7111 # deploy directory. For those versions they can set the following variables
7112 # to allow packaging the SPL.
7113 SPL_BINARY ?= ""
7114 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7115 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7116 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7117
Andrew Geissler09036742021-06-25 14:25:14 -05007118 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007119 various ``SPL_*`` variables used by the OpenEmbedded build system.
7120
7121 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007122 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007123 section in the Yocto Project Board Support Package Developer's Guide
7124 for additional information.
7125
Andrew Geisslerf0343792020-11-18 10:42:21 -06007126 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007127
Andrew Geissler595f6302022-01-24 19:11:47 +00007128 See the BitBake manual for the initial description for this variable:
7129 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007130
Andrew Geissler595f6302022-01-24 19:11:47 +00007131 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007132
Andrew Geissler595f6302022-01-24 19:11:47 +00007133 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007134
Andrew Geissler615f2f12022-07-15 14:00:58 -05007135 - ``apply`` --- whether to apply the patch or not. The default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007136 action is to apply the patch.
7137
Andrew Geissler615f2f12022-07-15 14:00:58 -05007138 - ``striplevel`` --- which striplevel to use when applying the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007139 patch. The default level is 1.
7140
Andrew Geissler615f2f12022-07-15 14:00:58 -05007141 - ``patchdir`` --- specifies the directory in which the patch should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007142 be applied. The default is ``${``\ :term:`S`\ ``}``.
7143
7144 Here are options specific to recipes building code from a revision
7145 control system:
7146
Andrew Geissler615f2f12022-07-15 14:00:58 -05007147 - ``mindate`` --- apply the patch only if
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007148 :term:`SRCDATE` is equal to or greater than
7149 ``mindate``.
7150
Andrew Geissler615f2f12022-07-15 14:00:58 -05007151 - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007152 than ``maxdate``.
7153
Andrew Geissler615f2f12022-07-15 14:00:58 -05007154 - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007155 greater than ``minrev``.
7156
Andrew Geissler615f2f12022-07-15 14:00:58 -05007157 - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007158 than ``maxrev``.
7159
Andrew Geissler615f2f12022-07-15 14:00:58 -05007160 - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007161 ``rev``.
7162
Andrew Geissler615f2f12022-07-15 14:00:58 -05007163 - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007164 ``rev``.
7165
Andrew Geissler595f6302022-01-24 19:11:47 +00007166 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007167
Andrew Geissler595f6302022-01-24 19:11:47 +00007168 If you want the build system to pick up files specified through
7169 a :term:`SRC_URI` statement from your append file, you need to be
7170 sure to extend the :term:`FILESPATH` variable by also using the
7171 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007172
Andrew Geisslerf0343792020-11-18 10:42:21 -06007173 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007174 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007175 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007176 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007177 variable to "0" disables this behavior.
7178
Andrew Geisslerf0343792020-11-18 10:42:21 -06007179 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007180 The date of the source code used to build the package. This variable
7181 applies only if the source was fetched from a Source Code Manager
7182 (SCM).
7183
Andrew Geisslerf0343792020-11-18 10:42:21 -06007184 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007185 Returns the version string of the current package. This string is
7186 used to help define the value of :term:`PV`.
7187
Andrew Geissler09036742021-06-25 14:25:14 -05007188 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007189 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007190 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007191
7192 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7193
Andrew Geissler09036742021-06-25 14:25:14 -05007194 Recipes that need to define :term:`PV` do so with the help of the
7195 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007196 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007197 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007198
7199 PV = "0.12-git${SRCPV}"
7200
Andrew Geisslerf0343792020-11-18 10:42:21 -06007201 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007202 The revision of the source code used to build the package. This
7203 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7204 that if you want to build a fixed revision and you want to avoid
7205 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007206 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007207 identifier and not just a tag.
7208
7209 .. note::
7210
7211 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007212 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007213 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007214 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007215 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007216
Andrew Geissler09036742021-06-25 14:25:14 -05007217 :term:`SRCTREECOVEREDTASKS`
7218 A list of tasks that are typically not relevant (and therefore skipped)
7219 when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7220 class. The default value as set in that class file is the set of tasks
7221 that are rarely needed when using external source::
7222
7223 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7224
7225 The notable exception is when processing external kernel source as
7226 defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7227 class file (formatted for aesthetics)::
7228
7229 SRCTREECOVEREDTASKS += "\
7230 do_validate_branches \
7231 do_kernel_configcheck \
7232 do_kernel_checkout \
7233 do_fetch \
7234 do_unpack \
7235 do_patch \
7236 "
7237
7238 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7239 variables for more information.
7240
Andrew Geisslerf0343792020-11-18 10:42:21 -06007241 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007242 The directory for the shared state cache.
7243
Andrew Geissler615f2f12022-07-15 14:00:58 -05007244 :term:`SSTATE_EXCLUDEDEPS_SYSROOT`
7245 This variable allows to specify indirect dependencies to exclude
7246 from sysroots, for example to avoid the situations when a dependency on
7247 any ``-native`` recipe will pull in all dependencies of that recipe
7248 in the recipe sysroot. This behaviour might not always be wanted,
7249 for example when that ``-native`` recipe depends on build tools
7250 that are not relevant for the current recipe.
7251
7252 This way, irrelevant dependencies are ignored, which could have
7253 prevented the reuse of prebuilt artifacts stored in the Shared
7254 State Cache.
7255
7256 ``SSTATE_EXCLUDEDEPS_SYSROOT`` is evaluated as two regular
7257 expressions of recipe and dependency to ignore. An example
7258 is the rule in :oe_git:`meta/conf/layer.conf </meta/conf/layer.conf>`::
7259
7260 # Nothing needs to depend on libc-initial
7261 # base-passwd/shadow-sysroot don't need their dependencies
7262 SSTATE_EXCLUDEDEPS_SYSROOT += "\
7263 .*->.*-initial.* \
7264 .*(base-passwd|shadow-sysroot)->.* \
7265 "
7266
7267 The ``->`` substring represents the dependency between
7268 the two regular expressions.
7269
Andrew Geisslerf0343792020-11-18 10:42:21 -06007270 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007271 If set to "1", allows fetches from mirrors that are specified in
7272 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007273 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7274 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7275 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007276 your shared state cache, but you want to disable any other fetching
7277 from the network.
7278
Andrew Geisslerf0343792020-11-18 10:42:21 -06007279 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007280 Configures the OpenEmbedded build system to search other mirror
7281 locations for prebuilt cache data objects before building out the
7282 data. This variable works like fetcher :term:`MIRRORS`
7283 and :term:`PREMIRRORS` and points to the cache
7284 locations to check for the shared state (sstate) objects.
7285
7286 You can specify a filesystem directory or a remote URL such as HTTP
7287 or FTP. The locations you specify need to contain the shared state
7288 cache (sstate-cache) results from previous builds. The sstate-cache
7289 you point to can also be from builds on other machines.
7290
7291 When pointing to sstate build artifacts on another machine that uses
7292 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007293 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007294 paths to server paths. The paths need to take into account
7295 :term:`NATIVELSBSTRING` set by the
7296 :ref:`uninative <ref-classes-uninative>` class. For example, the
7297 following maps the local search path ``universal-4.9`` to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007298 server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007299
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007300 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007301
7302 If a mirror uses the same structure as
7303 :term:`SSTATE_DIR`, you need to add "PATH" at the
7304 end as shown in the examples below. The build system substitutes the
7305 correct path within the directory structure.
7306 ::
7307
7308 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007309 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007310 file://.* file:///some-local-dir/sstate/PATH"
7311
Andrew Geisslerf0343792020-11-18 10:42:21 -06007312 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007313 Controls the list of files the OpenEmbedded build system scans for
7314 hardcoded installation paths. The variable uses a space-separated
7315 list of filenames (not paths) with standard wildcard characters
7316 allowed.
7317
7318 During a build, the OpenEmbedded build system creates a shared state
7319 (sstate) object during the first stage of preparing the sysroots.
7320 That object is scanned for hardcoded paths for original installation
7321 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007322 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7323 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007324 than the variable being comprehensively set. The
7325 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7326 of files.
7327
7328 For details on the process, see the
7329 :ref:`staging <ref-classes-staging>` class.
7330
Andrew Geisslerf0343792020-11-18 10:42:21 -06007331 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007332 Specifies the path to the ``/lib`` subdirectory of the sysroot
7333 directory for the build host.
7334
Andrew Geisslerf0343792020-11-18 10:42:21 -06007335 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007336 Specifies the path to the ``/lib`` subdirectory of the sysroot
7337 directory for the target for which the current recipe is being built
7338 (:term:`STAGING_DIR_HOST`).
7339
Andrew Geisslerf0343792020-11-18 10:42:21 -06007340 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007341 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7342 directory for the target for which the current recipe is being built
7343 (:term:`STAGING_DIR_HOST`).
7344
Andrew Geisslerf0343792020-11-18 10:42:21 -06007345 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007346 Specifies the path to the directory containing binary configuration
7347 scripts. These scripts provide configuration information for other
7348 software that wants to make use of libraries or include files
7349 provided by the software associated with the script.
7350
7351 .. note::
7352
7353 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007354 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7355 library to which you are linking, it is recommended you use
7356 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007357
Andrew Geisslerf0343792020-11-18 10:42:21 -06007358 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007359 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7360 directory for the build host.
7361
Andrew Geisslerf0343792020-11-18 10:42:21 -06007362 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007363 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7364 directory for the target for which the current recipe is being built
7365 (:term:`STAGING_DIR_HOST`).
7366
Andrew Geisslerf0343792020-11-18 10:42:21 -06007367 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007368 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7369 directory for the build host.
7370
Andrew Geisslerf0343792020-11-18 10:42:21 -06007371 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007372 Helps construct the ``recipe-sysroots`` directory, which is used
7373 during packaging.
7374
7375 For information on how staging for recipe-specific sysroots occurs,
7376 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007377 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007378 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007379 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007380 section in the Yocto Project Overview and Concepts Manual, and the
7381 :term:`SYSROOT_DIRS` variable.
7382
7383 .. note::
7384
Andrew Geissler09036742021-06-25 14:25:14 -05007385 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007386 directory because the OpenEmbedded build system manages the
7387 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007388 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007389 task and then the OpenEmbedded build system will stage a subset of
7390 those files into the sysroot.
7391
Andrew Geisslerf0343792020-11-18 10:42:21 -06007392 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007393 Specifies the path to the sysroot directory for the system on which
7394 the component is built to run (the system that hosts the component).
7395 For most recipes, this sysroot is the one in which that recipe's
7396 :ref:`ref-tasks-populate_sysroot` task copies
7397 files. Exceptions include ``-native`` recipes, where the
7398 ``do_populate_sysroot`` task instead uses
7399 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007400 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007401 have the following values:
7402
7403 - For recipes building for the target machine, the value is
7404 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7405
7406 - For native recipes building for the build host, the value is empty
7407 given the assumption that when building for the build host, the
7408 build host's own directories should be used.
7409
7410 .. note::
7411
7412 ``-native`` recipes are not installed into host paths like such
7413 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04007414 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007415 standard build environment variables such as
7416 :term:`CPPFLAGS` and
7417 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05007418 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007419 headers using, for example, GCC's ``-isystem`` option.
7420
7421 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7422 should be viewed as input variables by tasks such as
7423 :ref:`ref-tasks-configure`,
7424 :ref:`ref-tasks-compile`, and
7425 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05007426 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007427 for ``-native`` recipes, as they make use of host headers and
7428 libraries.
7429
Andrew Geisslerf0343792020-11-18 10:42:21 -06007430 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007431 Specifies the path to the sysroot directory used when building
7432 components that run on the build host itself.
7433
Andrew Geisslerf0343792020-11-18 10:42:21 -06007434 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007435 Specifies the path to the sysroot used for the system for which the
7436 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05007437 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007438 :term:`STAGING_DIR_HOST`.
7439
7440 Some recipes build binaries that can run on the target system but
7441 those binaries in turn generate code for another different system
7442 (e.g. cross-canadian recipes). Using terminology from GNU, the
7443 primary system is referred to as the "HOST" and the secondary, or
7444 different, system is referred to as the "TARGET". Thus, the binaries
7445 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05007446 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7447 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007448 sysroot used for the "TARGET" system.
7449
Andrew Geisslerf0343792020-11-18 10:42:21 -06007450 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007451 Specifies the path to the ``/etc`` subdirectory of the sysroot
7452 directory for the build host.
7453
Andrew Geisslerf0343792020-11-18 10:42:21 -06007454 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007455 Specifies the path to the ``/usr`` subdirectory of the sysroot
7456 directory for the target for which the current recipe is being built
7457 (:term:`STAGING_DIR_HOST`).
7458
Andrew Geisslerf0343792020-11-18 10:42:21 -06007459 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007460 Specifies the path to the ``/usr/include`` subdirectory of the
7461 sysroot directory for the target for which the current recipe being
7462 built (:term:`STAGING_DIR_HOST`).
7463
Andrew Geisslerf0343792020-11-18 10:42:21 -06007464 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007465 Specifies the path to the ``/usr/include`` subdirectory of the
7466 sysroot directory for the build host.
7467
Andrew Geisslerf0343792020-11-18 10:42:21 -06007468 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007469 Points to the directory containing the kernel build artifacts.
7470 Recipes building software that needs to access kernel build artifacts
7471 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05007472 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007473 after the kernel has been built.
7474
Andrew Geisslerf0343792020-11-18 10:42:21 -06007475 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007476 The directory with kernel headers that are required to build
7477 out-of-tree modules.
7478
Andrew Geisslerf0343792020-11-18 10:42:21 -06007479 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007480 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7481 directory for the target for which the current recipe is being built
7482 (:term:`STAGING_DIR_HOST`).
7483
Andrew Geisslerf0343792020-11-18 10:42:21 -06007484 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007485 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7486 directory for the build host.
7487
Andrew Geisslerf0343792020-11-18 10:42:21 -06007488 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007489 Specifies the base path used to create recipe stamp files. The path
7490 to an actual stamp file is constructed by evaluating this string and
7491 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05007492 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007493 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007494
7495 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7496
7497 For information on how BitBake uses stamp files to determine if a
7498 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007499 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007500 section in the Yocto Project Overview and Concepts Manual.
7501
7502 See :term:`STAMPS_DIR`,
7503 :term:`MULTIMACH_TARGET_SYS`,
7504 :term:`PN`, :term:`EXTENDPE`,
7505 :term:`PV`, and :term:`PR` for related variable
7506 information.
7507
Andrew Geisslerf0343792020-11-18 10:42:21 -06007508 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007509 Specifies the base directory in which the OpenEmbedded build system
7510 places stamps. The default directory is ``${TMPDIR}/stamps``.
7511
Andrew Geisslerf0343792020-11-18 10:42:21 -06007512 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007513 The minimal command and arguments to run ``strip``, which is used to
7514 strip symbols.
7515
Andrew Geisslerf0343792020-11-18 10:42:21 -06007516 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007517 The short (72 characters or less) summary of the binary package for
7518 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05007519 :term:`SUMMARY` is used to define the
7520 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007521 not set in the recipe.
7522
Andrew Geisslerf0343792020-11-18 10:42:21 -06007523 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007524 The directory in which files checked out of a Subversion system are
7525 stored.
7526
Andrew Geisslerf0343792020-11-18 10:42:21 -06007527 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007528 Specifies the kernel boot default console. If you want to use a
7529 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007530 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007531
7532 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7533
7534 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7535 this variable to null but then checks for a value later.
7536
Andrew Geisslerf0343792020-11-18 10:42:21 -06007537 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007538 Lists additional options to add to the syslinux file. You need to set
7539 this variable in your recipe. If you want to list multiple options,
7540 separate the options with a semicolon character (``;``).
7541
7542 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7543 to create a set of options.
7544
Andrew Geisslerf0343792020-11-18 10:42:21 -06007545 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007546 Specifies the alternate serial port or turns it off. To turn off
7547 serial, set this variable to an empty string in your recipe. The
7548 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007549 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007550
7551 SYSLINUX_SERIAL ?= "0 115200"
7552
7553 The class checks for and uses the variable as needed.
7554
Andrew Geisslerf0343792020-11-18 10:42:21 -06007555 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007556 Specifies the alternate console=tty... kernel boot argument. The
7557 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007558 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007559
7560 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7561
7562 The class checks for and uses the variable as needed.
7563
Andrew Geisslerf0343792020-11-18 10:42:21 -06007564 :term:`SYSLINUX_SPLASH`
7565 An ``.LSS`` file used as the background for the VGA boot menu when
7566 you use the boot menu. You need to set this variable in your recipe.
7567
7568 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7569 variable and if found, the OpenEmbedded build system installs the
7570 splash screen.
7571
7572 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007573 Points to the temporary directory under the work directory (default
7574 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7575 where the files populated into the sysroot are assembled during the
7576 :ref:`ref-tasks-populate_sysroot` task.
7577
Andrew Geisslerf0343792020-11-18 10:42:21 -06007578 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007579 Directories that are staged into the sysroot by the
7580 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05007581 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007582
7583 SYSROOT_DIRS = " \
7584 ${includedir} \
7585 ${libdir} \
7586 ${base_libdir} \
7587 ${nonarch_base_libdir} \
7588 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007589 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007590 "
7591
Andrew Geissler9aee5002022-03-30 16:27:02 +00007592 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007593 Directories that are not staged into the sysroot by the
7594 :ref:`ref-tasks-populate_sysroot` task. You
7595 can use this variable to exclude certain subdirectories of
7596 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007597 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007598
Andrew Geissler9aee5002022-03-30 16:27:02 +00007599 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007600 ${mandir} \
7601 ${docdir} \
7602 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007603 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007604 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05007605 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007606 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05007607 ${datadir}/gtk-doc/html \
7608 ${datadir}/installed-tests \
7609 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007610 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05007611 ${datadir}/terminfo \
7612 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007613 "
7614
Andrew Geisslerf0343792020-11-18 10:42:21 -06007615 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007616 Extra directories staged into the sysroot by the
7617 :ref:`ref-tasks-populate_sysroot` task for
7618 ``-native`` recipes, in addition to those specified in
7619 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05007620 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007621
7622 SYSROOT_DIRS_NATIVE = " \
7623 ${bindir} \
7624 ${sbindir} \
7625 ${base_bindir} \
7626 ${base_sbindir} \
7627 ${libexecdir} \
7628 ${sysconfdir} \
7629 ${localstatedir} \
7630 "
7631
7632 .. note::
7633
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007634 Programs built by ``-native`` recipes run directly from the sysroot
7635 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7636 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007637
Andrew Geisslerf0343792020-11-18 10:42:21 -06007638 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007639 A list of functions to execute after files are staged into the
7640 sysroot. These functions are usually used to apply additional
7641 processing on the staged files, or to stage additional files.
7642
Andrew Geisslerf0343792020-11-18 10:42:21 -06007643 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007644 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7645 this variable specifies whether the specified service in
7646 :term:`SYSTEMD_SERVICE` should start
7647 automatically or not. By default, the service is enabled to
7648 automatically start at boot time. The default setting is in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007649 :ref:`systemd <ref-classes-systemd>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007650
7651 SYSTEMD_AUTO_ENABLE ??= "enable"
7652
7653 You can disable the service by setting the variable to "disable".
7654
Andrew Geisslerf0343792020-11-18 10:42:21 -06007655 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007656 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007657 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007658 configuration file that should be used. By default, the
7659 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007660 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007661
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05007662 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007663
7664 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007665 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007666
Andrew Geisslerf0343792020-11-18 10:42:21 -06007667 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007668 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007669 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007670 list of entry files (``*.conf``) to install that contain one boot
7671 entry per file. By default, the
7672 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007673 :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007674
7675 SYSTEMD_BOOT_ENTRIES ?= ""
7676
7677 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007678 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007679
Andrew Geisslerf0343792020-11-18 10:42:21 -06007680 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007681 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007682 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007683 boot menu timeout in seconds. By default, the
7684 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007685 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007686
7687 SYSTEMD_BOOT_TIMEOUT ?= "10"
7688
7689 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007690 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007691
Andrew Geissler615f2f12022-07-15 14:00:58 -05007692 :term:`SYSTEMD_DEFAULT_TARGET`
7693
7694 This variable allows to set the default unit that systemd starts at bootup.
7695 Usually, this is either ``multi-user.target`` or ``graphical.target``.
7696 This works by creating a ``default.target`` symbolic link to the chosen systemd
7697 target file.
7698
7699 See `systemd's documentation
7700 <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__
7701 for details.
7702
7703 For example, this variable is used in the
7704 `core-image-minimal-xfce.bb
7705 <https://git.openembedded.org/meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>`__
7706 recipe::
7707
7708 SYSTEMD_DEFAULT_TARGET = "graphical.target"
7709
Andrew Geisslerf0343792020-11-18 10:42:21 -06007710 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007711 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7712 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05007713 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007714 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007715 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007716
7717 SYSTEMD_PACKAGES ?= "${PN}"
7718
7719 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05007720 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007721 the build system can find the systemd unit files.
7722
Andrew Geisslerf0343792020-11-18 10:42:21 -06007723 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007724 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7725 this variable specifies the systemd service name for a package.
7726
Andrew Geissler615f2f12022-07-15 14:00:58 -05007727 Multiple services can be specified, each one separated by a space.
7728
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007729 When you specify this file in your recipe, use a package name
7730 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007731 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007732
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007733 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007734
Andrew Geissler615f2f12022-07-15 14:00:58 -05007735 The package overrides that can be specified are directly related to the value of
7736 term:`SYSTEMD_PACKAGES`. Overrides not included in term:`SYSTEMD_PACKAGES`
7737 will be silently ignored.
7738
Andrew Geisslerf0343792020-11-18 10:42:21 -06007739 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007740 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007741 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007742 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007743 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007744 (allowing login), assuming :term:`USE_VT` is not set to
7745 "0".
7746
Andrew Geissler09036742021-06-25 14:25:14 -05007747 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007748 run a getty on the first virtual terminal).
7749
Andrew Geisslerf0343792020-11-18 10:42:21 -06007750 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007751 This variable points to a directory were BitBake places temporary
7752 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007753 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007754
7755 T = "${WORKDIR}/temp"
7756
7757 The :term:`WORKDIR` is the directory into which
7758 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7759 file sets this variable.
7760
Andrew Geissler09036742021-06-25 14:25:14 -05007761 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007762 :term:`TMPDIR` variable, which points to the root of
7763 the directory tree where BitBake places the output of an entire
7764 build.
7765
Andrew Geisslerf0343792020-11-18 10:42:21 -06007766 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007767 The target machine's architecture. The OpenEmbedded build system
7768 supports many architectures. Here is an example list of architectures
7769 supported. This list is by no means complete as the architecture is
7770 configurable:
7771
7772 - arm
7773 - i586
7774 - x86_64
7775 - powerpc
7776 - powerpc64
7777 - mips
7778 - mipsel
7779
7780 For additional information on machine architectures, see the
7781 :term:`TUNE_ARCH` variable.
7782
Andrew Geisslerf0343792020-11-18 10:42:21 -06007783 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007784 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007785 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007786 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007787 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007788
7789 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7790
Andrew Geisslerf0343792020-11-18 10:42:21 -06007791 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007792 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007793 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007794 :term:`TUNE_CCARGS` by default.
7795
7796 .. note::
7797
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007798 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05007799 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7800 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007801
Andrew Geisslerf0343792020-11-18 10:42:21 -06007802 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007803 This is a specific kernel compiler flag for a CPU or Application
7804 Binary Interface (ABI) tune. The flag is used rarely and only for
7805 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05007806 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007807 variable allows the kernel (and associated modules) to use a
7808 different configuration. See the
7809 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7810 :term:`Source Directory` for an example.
7811
Andrew Geisslerf0343792020-11-18 10:42:21 -06007812 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007813 Specifies the flags to pass to the C compiler when building for the
7814 target. When building in the target context,
7815 :term:`CFLAGS` is set to the value of this variable by
7816 default.
7817
Andrew Geissler09036742021-06-25 14:25:14 -05007818 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
7819 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007820 executables built using the SDK also have the flags applied.
7821
Andrew Geisslerf0343792020-11-18 10:42:21 -06007822 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007823 Specifies the flags to pass to the C pre-processor (i.e. to both the
7824 C and the C++ compilers) when building for the target. When building
7825 in the target context, :term:`CPPFLAGS` is set to the
7826 value of this variable by default.
7827
7828 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007829 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007830 value so that executables built using the SDK also have the flags
7831 applied.
7832
Andrew Geisslerf0343792020-11-18 10:42:21 -06007833 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007834 Specifies the flags to pass to the C++ compiler when building for the
7835 target. When building in the target context,
7836 :term:`CXXFLAGS` is set to the value of this variable
7837 by default.
7838
7839 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007840 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007841 value so that executables built using the SDK also have the flags
7842 applied.
7843
Andrew Geisslerf0343792020-11-18 10:42:21 -06007844 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007845 Specifies the method for handling FPU code. For FPU-less targets,
7846 which include most ARM CPUs, the variable must be set to "soft". If
7847 not, the kernel emulation gets used, which results in a performance
7848 penalty.
7849
Andrew Geisslerf0343792020-11-18 10:42:21 -06007850 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007851 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05007852 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007853 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007854 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007855
7856 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7857
Andrew Geisslerf0343792020-11-18 10:42:21 -06007858 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007859 Specifies the flags to pass to the linker when building for the
7860 target. When building in the target context,
7861 :term:`LDFLAGS` is set to the value of this variable
7862 by default.
7863
7864 Additionally, the SDK's environment setup script sets the
7865 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05007866 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007867 have the flags applied.
7868
Andrew Geisslerf0343792020-11-18 10:42:21 -06007869 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007870 Specifies the target's operating system. The variable can be set to
7871 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007872 for musl libc. For ARM/EABI targets, the possible values are
7873 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007874
Andrew Geisslerf0343792020-11-18 10:42:21 -06007875 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007876 Specifies the prefix used for the toolchain binary target tools.
7877
7878 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04007879 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007880
7881 - For recipes building for the target machine, the value is
7882 "${:term:`TARGET_SYS`}-".
7883
7884 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04007885 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007886
7887 - For native SDK recipes (``nativesdk``), the build system sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007888 variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007889
Andrew Geisslerf0343792020-11-18 10:42:21 -06007890 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007891 Specifies the system, including the architecture and the operating
7892 system, for which the build is occurring in the context of the
7893 current recipe.
7894
7895 The OpenEmbedded build system automatically sets this variable based
7896 on :term:`TARGET_ARCH`,
7897 :term:`TARGET_VENDOR`, and
7898 :term:`TARGET_OS` variables.
7899
7900 .. note::
7901
Andrew Geissler09036742021-06-25 14:25:14 -05007902 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007903
7904 Consider these two examples:
7905
7906 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7907 value is "i686-linux".
7908
7909 - Given a recipe being built for a little-endian, MIPS target
7910 running Linux, the value might be "mipsel-linux".
7911
Andrew Geisslerf0343792020-11-18 10:42:21 -06007912 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007913 Specifies the name of the target vendor.
7914
Andrew Geisslerf0343792020-11-18 10:42:21 -06007915 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007916 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007917 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007918
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007919 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007920
Andrew Geisslerf0343792020-11-18 10:42:21 -06007921 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007922 Specifies a suffix to be appended onto the
7923 :term:`TMPDIR` value. The suffix identifies the
7924 ``libc`` variant for building. When you are building for multiple
7925 variants with the same :term:`Build Directory`, this
7926 mechanism ensures that output for different ``libc`` variants is kept
7927 separate to avoid potential conflicts.
7928
7929 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04007930 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007931 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05007932 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007933 in no suffix being applied.
7934
Andrew Geisslerf0343792020-11-18 10:42:21 -06007935 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05007936 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007937 characteristics of the generated packages and images by telling the
7938 OpenEmbedded build system which toolchain profile to use. By default,
7939 the OpenEmbedded build system builds its own internal toolchain. The
7940 variable's default value is "default", which uses that internal
7941 toolchain.
7942
7943 .. note::
7944
Andrew Geissler09036742021-06-25 14:25:14 -05007945 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007946 responsibility to ensure that the toolchain is compatible with the
7947 default toolchain. Using older or newer versions of these
7948 components might cause build problems. See the Release Notes for
7949 the Yocto Project release for the specific components with which
7950 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007951 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007952 page on the Yocto Project website and click on the "RELEASE
7953 INFORMATION" link for the appropriate release.
7954
Andrew Geissler09036742021-06-25 14:25:14 -05007955 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007956 which controls the variant of the GNU standard C library (``libc``)
7957 used during the build process: ``glibc`` or ``musl``.
7958
7959 With additional layers, it is possible to use a pre-compiled external
7960 toolchain. One example is the Sourcery G++ Toolchain. The support for
7961 this toolchain resides in the separate Mentor Graphics
7962 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007963 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007964
7965 The layer's ``README`` file contains information on how to use the
7966 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7967 be sure to add the layer to your ``bblayers.conf`` file in front of
7968 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7969 in your ``local.conf`` file to the location in which you installed
7970 the toolchain.
7971
7972 The fundamentals used for this example apply to any external
7973 toolchain. You can use ``meta-sourcery`` as a template for adding
7974 support for other external toolchains.
7975
Andrew Geisslerd5838332022-05-27 11:33:10 -05007976 :term:`TEMPLATECONF`
7977 Specifies the directory used by the build system to find templates
7978 from which to build the ``bblayers.conf`` and ``local.conf`` files.
7979 Use this variable if you wish to customize such files, and the default
7980 BitBake targets shown when sourcing the ``oe-init-build-env`` script.
7981
7982 For details, see the
7983 :ref:`dev-manual/common-tasks:creating a custom template configuration directory`
7984 section in the Yocto Project Development Tasks manual.
7985
7986 .. note::
7987
7988 You must set this variable in the external environment in order
7989 for it to work.
7990
Andrew Geisslerf0343792020-11-18 10:42:21 -06007991 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007992 The location the OpenEmbedded build system uses to export tests when
7993 the :term:`TEST_EXPORT_ONLY` variable is set
7994 to "1".
7995
Andrew Geissler09036742021-06-25 14:25:14 -05007996 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007997 ``"${TMPDIR}/testimage/${PN}"``.
7998
Andrew Geisslerf0343792020-11-18 10:42:21 -06007999 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008000 Specifies to export the tests only. Set this variable to "1" if you
8001 do not want to run the tests but you want them to be exported in a
8002 manner that you to run them outside of the build system.
8003
Andrew Geisslerf0343792020-11-18 10:42:21 -06008004 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008005 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05008006 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008007
8008 .. note::
8009
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008010 Actual test results reside in the task log (``log.do_testimage``),
8011 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008012
Andrew Geisslerf0343792020-11-18 10:42:21 -06008013 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008014 For automated hardware testing, specifies the command to use to
8015 control the power of the target machine under test. Typically, this
8016 command would point to a script that performs the appropriate action
8017 (e.g. interacting with a web-enabled power strip). The specified
8018 command should expect to receive as the last argument "off", "on" or
8019 "cycle" specifying to power off, on, or cycle (power off and then
8020 power on) the device, respectively.
8021
Andrew Geisslerf0343792020-11-18 10:42:21 -06008022 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008023 For automated hardware testing, specifies additional arguments to
8024 pass through to the command specified in
8025 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008026 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008027 wish, for example, to separate the machine-specific and
8028 non-machine-specific parts of the arguments.
8029
Andrew Geisslerf0343792020-11-18 10:42:21 -06008030 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008031 The time in seconds allowed for an image to boot before automated
8032 runtime tests begin to run against an image. The default timeout
8033 period to allow the boot process to reach the login prompt is 500
8034 seconds. You can specify a different value in the ``local.conf``
8035 file.
8036
8037 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008038 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008039 section in the Yocto Project Development Tasks Manual.
8040
Andrew Geisslerf0343792020-11-18 10:42:21 -06008041 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008042 For automated hardware testing, specifies the command to use to
8043 connect to the serial console of the target machine under test. This
8044 command simply needs to connect to the serial console and forward
8045 that connection to standard input and output as any normal terminal
8046 program does.
8047
8048 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05008049 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008050
8051 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8052
Andrew Geisslerf0343792020-11-18 10:42:21 -06008053 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008054 For automated hardware testing, specifies additional arguments to
8055 pass through to the command specified in
8056 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008057 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008058 wish, for example, to separate the machine-specific and
8059 non-machine-specific parts of the command.
8060
Andrew Geisslerf0343792020-11-18 10:42:21 -06008061 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008062 The IP address of the build machine (host machine). This IP address
8063 is usually automatically detected. However, if detection fails, this
8064 variable needs to be set to the IP address of the build machine (i.e.
8065 where the build is taking place).
8066
8067 .. note::
8068
Andrew Geissler09036742021-06-25 14:25:14 -05008069 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008070 tests such as the "dnf" test suite, which needs to download packages
8071 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008072
Andrew Geisslerf0343792020-11-18 10:42:21 -06008073 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008074 An ordered list of tests (modules) to run against an image when
8075 performing automated runtime testing.
8076
8077 The OpenEmbedded build system provides a core set of tests that can
8078 be used against images.
8079
8080 .. note::
8081
8082 Currently, there is only support for running these tests under
8083 QEMU.
8084
8085 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05008086 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008087 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008088
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008089 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008090
8091 Alternatively, you can
8092 provide the "auto" option to have all applicable tests run against
8093 the image.
8094 ::
8095
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008096 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008097
8098 Using this option causes the
8099 build system to automatically run tests that are applicable to the
8100 image. Tests that are not applicable are skipped.
8101
8102 The order in which tests are run is important. Tests that depend on
8103 another test must appear later in the list than the test on which
8104 they depend. For example, if you append the list of tests with two
8105 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05008106 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008107
8108 TEST_SUITES = "test_A test_B"
8109
8110 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008111 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008112 section in the Yocto Project Development Tasks Manual.
8113
Andrew Geisslerf0343792020-11-18 10:42:21 -06008114 :term:`TEST_TARGET`
8115 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008116 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008117
8118 TEST_TARGET = "qemu"
8119
8120 A target controller is a class that defines how an image gets
8121 deployed on a target and how a target is started. A layer can extend
8122 the controllers by adding a module in the layer's
8123 ``/lib/oeqa/controllers`` directory and by inheriting the
8124 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05008125 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008126
Andrew Geissler5f350902021-07-23 13:09:54 -04008127 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06008128
8129 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008130 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06008131 in the Yocto Project Development Tasks Manual for more
8132 information.
8133
8134 - *"simpleremote":* Runs the tests on target hardware that is
8135 already up and running. The hardware can be on the network or it
8136 can be a device running an image on QEMU. You must also set
8137 :term:`TEST_TARGET_IP` when you use
8138 "simpleremote".
8139
8140 .. note::
8141
8142 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008143 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008144
8145 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008146 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008147 section in the Yocto Project Development Tasks Manual.
8148
8149 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05008150 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06008151 variable has no effect when :term:`TEST_TARGET` is
8152 set to "qemu".
8153
8154 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008155 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008156
8157 TEST_TARGET_IP = "192.168.1.4:2201"
8158
8159 Specifying a port is
8160 useful when SSH is started on a non-standard port or in cases when
8161 your hardware under test is behind a firewall or network that is not
8162 directly accessible from your host and you need to do port address
8163 translation.
8164
8165 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008166 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008167 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008168 any image that successfully builds to automatically boot under QEMU.
8169 Using the variable also adds in dependencies so that any SDK for
8170 which testing is requested is automatically built first.
8171
8172 These tests are written in Python making use of the ``unittest``
8173 module, and the majority of them run commands on the target system
8174 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8175 file in the :term:`Build Directory` to have the
8176 OpenEmbedded build system automatically run these tests after an
8177 image successfully builds:
8178
8179 TESTIMAGE_AUTO = "1"
8180
8181 For more information
8182 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008183 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008184 section in the Yocto Project Development Tasks Manual and the
Andrew Geissler595f6302022-01-24 19:11:47 +00008185 ":ref:`ref-classes-testimage*`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008186
Andrew Geisslerf0343792020-11-18 10:42:21 -06008187 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008188 The directory in which the file BitBake is currently parsing is
8189 located. Do not manually set this variable.
8190
Andrew Geisslerf0343792020-11-18 10:42:21 -06008191 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008192 The time the build was started. Times appear using the hour, minute,
8193 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8194 seconds past 1400 hours).
8195
Andrew Geisslerf0343792020-11-18 10:42:21 -06008196 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008197 This variable is the base directory the OpenEmbedded build system
8198 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008199 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008200 ``tmp`` within the :term:`Build Directory`.
8201
8202 If you want to establish this directory in a location other than the
8203 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008204 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008205
8206 #TMPDIR = "${TOPDIR}/tmp"
8207
Andrew Geissler09036742021-06-25 14:25:14 -05008208 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008209 which does not use NFS, while having the Build Directory use NFS.
8210
Andrew Geissler09036742021-06-25 14:25:14 -05008211 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008212 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8213 persistent inodes). Due to various issues with NFS and bugs in some
8214 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008215 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008216
Andrew Geisslerf0343792020-11-18 10:42:21 -06008217 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008218 This variable lists packages the OpenEmbedded build system uses when
8219 building an SDK, which contains a cross-development environment. The
8220 packages specified by this variable are part of the toolchain set
8221 that runs on the :term:`SDKMACHINE`, and each
8222 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008223 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008224
8225 $ bitbake -c populate_sdk imagename
8226
8227 In this case, a default list of packages is
8228 set in this variable, but you can add additional packages to the
8229 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008230 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008231 in the Yocto Project Application Development and the Extensible
8232 Software Development Kit (eSDK) manual for more information.
8233
8234 For background information on cross-development toolchains in the
8235 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008236 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008237 section in the Yocto Project Overview and Concepts Manual. For
8238 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008239 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008240
Andrew Geisslereff27472021-10-29 15:35:00 -05008241 Note that this variable applies to building an SDK, not an eSDK,
8242 in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
8243 used instead.
8244
8245 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8246 This variable allows to extend what is installed in the host
8247 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8248 applying to SDKs.
8249
Andrew Geisslerf0343792020-11-18 10:42:21 -06008250 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008251 This variable defines the name used for the toolchain output. The
8252 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008253 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008254
8255 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8256
8257 See
8258 the :term:`SDK_NAME` and
8259 :term:`SDK_VERSION` variables for additional
8260 information.
8261
Andrew Geisslerf0343792020-11-18 10:42:21 -06008262 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008263 This variable lists packages the OpenEmbedded build system uses when
8264 it creates the target part of an SDK (i.e. the part built for the
8265 target hardware), which includes libraries and headers. Use this
8266 variable to add individual packages to the part of the SDK that runs
8267 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008268 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008269 in the Yocto Project Application Development and the Extensible
8270 Software Development Kit (eSDK) manual for more information.
8271
8272 For background information on cross-development toolchains in the
8273 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008274 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008275 section in the Yocto Project Overview and Concepts Manual. For
8276 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008277 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008278
Andrew Geisslerf0343792020-11-18 10:42:21 -06008279 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008280 A sanitized version of :term:`TARGET_ARCH`. This
8281 variable is used where the architecture is needed in a value where
8282 underscores are not allowed, for example within package filenames. In
8283 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008284 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008285
8286 Do not edit this variable.
8287
Andrew Geisslerf0343792020-11-18 10:42:21 -06008288 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008289 The GNU canonical architecture for a specific architecture (i.e.
8290 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8291 this value to setup configuration.
8292
Andrew Geissler09036742021-06-25 14:25:14 -05008293 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008294 definitions can be a single static definition, or can be dynamically
8295 adjusted. You can see details for a given CPU family by looking at
8296 the architecture's ``README`` file. For example, the
8297 ``meta/conf/machine/include/mips/README`` file in the
8298 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008299 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008300
Andrew Geissler09036742021-06-25 14:25:14 -05008301 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008302 :term:`TARGET_ARCH`, which defines the target
8303 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008304 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008305
8306 TARGET_ARCH = "${TUNE_ARCH}"
8307
8308 The following list, which is by no means complete since architectures
8309 are configurable, shows supported machine architectures:
8310
8311 - arm
8312 - i586
8313 - x86_64
8314 - powerpc
8315 - powerpc64
8316 - mips
8317 - mipsel
8318
Andrew Geisslerf0343792020-11-18 10:42:21 -06008319 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008320 Specifies architecture-specific assembler flags for the target
8321 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008322 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008323 typically under ``meta/conf/machine/include/`` and are influenced
8324 through :term:`TUNE_FEATURES`. For example, the
8325 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008326 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008327
8328 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8329
8330 .. note::
8331
8332 Board Support Packages (BSPs) select the tune. The selected tune,
8333 in turn, affects the tune variables themselves (i.e. the tune can
8334 supply its own set of flags).
8335
Andrew Geisslerf0343792020-11-18 10:42:21 -06008336 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008337 Specifies architecture-specific C compiler flags for the target
8338 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008339 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008340 typically under ``meta/conf/machine/include/`` and are influenced
8341 through :term:`TUNE_FEATURES`.
8342
8343 .. note::
8344
8345 Board Support Packages (BSPs) select the tune. The selected tune,
8346 in turn, affects the tune variables themselves (i.e. the tune can
8347 supply its own set of flags).
8348
Andrew Geisslerf0343792020-11-18 10:42:21 -06008349 :term:`TUNE_FEATURES`
8350 Features used to "tune" a compiler for optimal use given a specific
8351 processor. The features are defined within the tune files and allow
8352 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8353 the features.
8354
8355 The OpenEmbedded build system verifies the features to be sure they
8356 are not conflicting and that they are supported.
8357
8358 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008359 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008360
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008361 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008362
8363 See the :term:`DEFAULTTUNE` variable for more information.
8364
8365 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008366 Specifies architecture-specific linker flags for the target system.
8367 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008368 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008369 typically under ``meta/conf/machine/include/`` and are influenced
8370 through :term:`TUNE_FEATURES`. For example, the
8371 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008372 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008373
8374 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8375
8376 .. note::
8377
8378 Board Support Packages (BSPs) select the tune. The selected tune,
8379 in turn, affects the tune variables themselves (i.e. the tune can
8380 supply its own set of flags).
8381
Andrew Geisslerf0343792020-11-18 10:42:21 -06008382 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008383 The package architecture understood by the packaging system to define
8384 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008385 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008386
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008387 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008388
8389 These tune-specific package architectures are defined in the machine
8390 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008391 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008392
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008393 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008394
Andrew Geisslerf0343792020-11-18 10:42:21 -06008395 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008396 Specifies CPU or Application Binary Interface (ABI) tuning features
8397 that conflict with feature.
8398
8399 Known tuning conflicts are specified in the machine include files in
8400 the :term:`Source Directory`. Here is an example from
8401 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8402 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05008403 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008404
8405 TUNECONFLICTS[n32] = "o32 n64"
8406
Andrew Geisslerf0343792020-11-18 10:42:21 -06008407 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008408 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8409 feature. The specified feature is stored as a flag. Valid features
8410 are specified in the machine include files (e.g.
8411 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05008412 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008413
8414 TUNEVALID[bigendian] = "Enable big-endian mode."
8415
8416 See the machine include files in the :term:`Source Directory`
8417 for these features.
8418
Andrew Geisslerf0343792020-11-18 10:42:21 -06008419 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008420 Configures the :term:`UBOOT_MACHINE` and can
8421 also define :term:`IMAGE_FSTYPES` for individual
8422 cases.
8423
8424 Following is an example from the ``meta-fsl-arm`` layer. ::
8425
8426 UBOOT_CONFIG ??= "sd"
8427 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8428 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8429 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8430 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8431
8432 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05008433 :term:`UBOOT_MACHINE`. The "sd" configuration defines
8434 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04008435 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008436
Andrew Geissler09036742021-06-25 14:25:14 -05008437 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008438 :ref:`uboot-config <ref-classes-uboot-config>`
8439 class.
8440
Andrew Geisslerf0343792020-11-18 10:42:21 -06008441 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008442 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008443 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008444 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8445 the load address to be used in
8446 creating the dtb sections of Image Tree Source for the FIT image.
8447
Andrew Geisslerf0343792020-11-18 10:42:21 -06008448 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008449 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008450 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008451 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8452 creating the dtbo sections of Image Tree Source for the FIT image.
8453
Andrew Geisslerf0343792020-11-18 10:42:21 -06008454 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008455 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008456 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008457 command-line parameter to the ``uboot-mkimage`` utility.
8458
Andrew Geisslerf0343792020-11-18 10:42:21 -06008459 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008460 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008461 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008462 command-line parameter to the ``uboot-mkimage`` utility.
8463
Andrew Geisslerf0343792020-11-18 10:42:21 -06008464 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008465 Appends a string to the name of the local version of the U-Boot
8466 image. For example, assuming the version of the U-Boot image built
8467 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05008468 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008469
8470 UBOOT_LOCALVERSION = "-yocto"
8471
Andrew Geisslerf0343792020-11-18 10:42:21 -06008472 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008473 Specifies the value passed on the ``make`` command line when building
8474 a U-Boot image. The value indicates the target platform
8475 configuration. You typically set this variable from the machine
8476 configuration file (i.e. ``conf/machine/machine_name.conf``).
8477
8478 Please see the "Selection of Processor Architecture and Board Type"
8479 section in the U-Boot README for valid values for this variable.
8480
Andrew Geisslerf0343792020-11-18 10:42:21 -06008481 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008482 Specifies the target called in the ``Makefile``. The default target
8483 is "all".
8484
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008485 :term:`UBOOT_MKIMAGE`
8486 Specifies the name of the mkimage command as used by the
8487 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8488 the FIT image. This can be used to substitute an alternative command, wrapper
8489 script or function if desired. The default is "uboot-mkimage".
8490
Andrew Geisslerf0343792020-11-18 10:42:21 -06008491 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008492 Options for the device tree compiler passed to mkimage '-D'
8493 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geissler5f350902021-07-23 13:09:54 -04008494 If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008495 pass the ``-D`` option to mkimage.
8496
8497 :term:`UBOOT_MKIMAGE_SIGN`
8498 Specifies the name of the mkimage command as used by the
8499 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8500 the FIT image after it has been assembled (if enabled). This can be used
8501 to substitute an alternative command, wrapper script or function if
8502 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8503
8504 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8505 Optionally specifies additional arguments for the
8506 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8507 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008508
Andrew Geisslerf0343792020-11-18 10:42:21 -06008509 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008510 Specifies the entrypoint for the RAM disk image.
8511 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008512 :term:`UBOOT_RD_ENTRYPOINT` variable is used
Andrew Geissler4873add2020-11-02 18:44:49 -06008513 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8514 entrypoint to be used in creating the Image Tree Source for
8515 the FIT image.
8516
Andrew Geisslerf0343792020-11-18 10:42:21 -06008517 :term:`UBOOT_RD_LOADADDRESS`
8518 Specifies the load address for the RAM disk image.
8519 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008520 :term:`UBOOT_RD_LOADADDRESS` variable is used
Andrew Geisslerf0343792020-11-18 10:42:21 -06008521 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8522 load address to be used in creating the Image Tree Source for
8523 the FIT image.
8524
8525 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008526 Enable signing of FIT image. The default value is "0".
8527
Andrew Geisslerf0343792020-11-18 10:42:21 -06008528 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008529 Location of the directory containing the RSA key and
8530 certificate used for signing FIT image.
8531
Andrew Geisslerf0343792020-11-18 10:42:21 -06008532 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008533 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008534 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8535 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8536 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8537
Andrew Geisslerf0343792020-11-18 10:42:21 -06008538 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008539 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8540 has a ``.sb`` extension.
8541
8542 The default U-Boot extension is ``.bin``
8543
Andrew Geisslerf0343792020-11-18 10:42:21 -06008544 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008545 Specifies the target used for building U-Boot. The target is passed
8546 directly as part of the "make" command (e.g. SPL and AIS). If you do
8547 not specifically set this variable, the OpenEmbedded build process
8548 passes and uses "all" for the target during the U-Boot building
8549 process.
8550
Andrew Geissler9aee5002022-03-30 16:27:02 +00008551 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008552 Specifies a list of options that, if reported by the configure script
8553 as being invalid, should not generate a warning during the
8554 :ref:`ref-tasks-configure` task. Normally, invalid
8555 configure options are simply not passed to the configure script (e.g.
8556 should be removed from :term:`EXTRA_OECONF` or
8557 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008558 However, there are common options that are passed to all
8559 configure scripts at a class level, but might not be valid for some
8560 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00008561 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008562
8563 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00008564 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008565 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8566 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8567
Andrew Geisslerf0343792020-11-18 10:42:21 -06008568 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008569 For recipes inheriting the
Andrew Geissler09036742021-06-25 14:25:14 -05008570 :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008571 specifies the package that contains the initscript that is enabled.
8572
8573 The default value is "${PN}". Given that almost all recipes that
8574 install initscripts package them in the main package for the recipe,
8575 you rarely need to set this variable in individual recipes.
8576
Andrew Geissler5199d832021-09-24 16:47:35 -05008577 :term:`UPSTREAM_CHECK_COMMITS`
8578 You can perform a per-recipe check for what the latest upstream
8579 source code version is by calling ``devtool latest-version recipe``. If
8580 the recipe source code is provided from Git repositories, but
8581 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
8582 to ``1`` in the recipe, and the OpenEmbedded build system
8583 will compare the latest commit with the one currently specified
8584 by the recipe (:term:`SRCREV`).
8585 ::
8586
8587 UPSTREAM_CHECK_COMMITS = "1"
8588
Andrew Geisslerf0343792020-11-18 10:42:21 -06008589 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008590 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008591 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008592 the recipe source code is provided from Git repositories, the
8593 OpenEmbedded build system determines the latest upstream version by
8594 picking the latest tag from the list of all repository tags.
8595
Andrew Geissler09036742021-06-25 14:25:14 -05008596 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008597 regular expression to filter only the relevant tags should the
8598 default filter not work correctly.
8599 ::
8600
8601 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8602
Andrew Geisslerf0343792020-11-18 10:42:21 -06008603 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05008604 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008605 regular expression instead of the default one when the package
8606 checking system is parsing the page found using
8607 :term:`UPSTREAM_CHECK_URI`.
8608 ::
8609
8610 UPSTREAM_CHECK_REGEX = "package_regex"
8611
Andrew Geisslerf0343792020-11-18 10:42:21 -06008612 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008613 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008614 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008615 the source code is provided from tarballs, the latest version is
8616 determined by fetching the directory listing where the tarball is and
8617 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05008618 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008619 contains the link to the latest tarball.
8620 ::
8621
8622 UPSTREAM_CHECK_URI = "recipe_url"
8623
Andrew Geissler5199d832021-09-24 16:47:35 -05008624 :term:`UPSTREAM_VERSION_UNKNOWN`
8625 You can perform a per-recipe check for what the latest upstream
8626 source code version is by calling ``devtool latest-version recipe``.
8627 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
8628 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
8629 the recipe allows to determine what the latest upstream version is,
8630 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
8631 to acknowledge that the check cannot be performed.
8632 ::
8633
8634 UPSTREAM_VERSION_UNKNOWN = "1"
8635
Andrew Geisslerf0343792020-11-18 10:42:21 -06008636 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008637 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05008638 default value used for :term:`USE_DEVFS` is "1" when no value is
8639 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008640 statically populated ``/dev`` directory.
8641
Andrew Geissler09209ee2020-12-13 08:44:15 -06008642 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008643 the Yocto Project Development Tasks Manual for information on how to
8644 use this variable.
8645
Andrew Geisslerf0343792020-11-18 10:42:21 -06008646 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008647 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008648 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008649 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008650 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008651 virtual terminals in order to enable logging in through those
8652 terminals.
8653
Andrew Geissler09036742021-06-25 14:25:14 -05008654 The default value used for :term:`USE_VT` is "1" when no default value is
8655 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008656 machine configuration file for machines that do not have a graphical
8657 display attached and therefore do not need virtual terminal
8658 functionality.
8659
Andrew Geisslerf0343792020-11-18 10:42:21 -06008660 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008661 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00008662 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008663
Andrew Geisslerc926e172021-05-07 16:11:35 -05008664 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008665
Andrew Geissler9aee5002022-03-30 16:27:02 +00008666 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008667
8668 For more information, see
8669 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8670
Andrew Geisslerf0343792020-11-18 10:42:21 -06008671 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008672 If set to ``error``, forces the OpenEmbedded build system to produce
8673 an error if the user identification (``uid``) and group
8674 identification (``gid``) values are not defined in any of the files
8675 listed in :term:`USERADD_UID_TABLES` and
8676 :term:`USERADD_GID_TABLES`. If set to
8677 ``warn``, a warning will be issued instead.
8678
8679 The default behavior for the build system is to dynamically apply
8680 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05008681 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008682 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05008683 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008684 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008685
8686 USERADD_ERROR_DYNAMIC = "error"
8687
8688 Overriding the
8689 default behavior implies you are going to also take steps to set
8690 static ``uid`` and ``gid`` values through use of the
8691 :term:`USERADDEXTENSION`,
8692 :term:`USERADD_UID_TABLES`, and
8693 :term:`USERADD_GID_TABLES` variables.
8694
8695 .. note::
8696
8697 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05008698 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008699 When it is set to ``warn``, the build system will report a warning for
8700 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8701 to ``error``, it will only report errors for recipes that are actually
8702 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008703 This saves you from having to add static IDs for recipes that you
8704 know will never be built.
8705
Andrew Geisslerf0343792020-11-18 10:42:21 -06008706 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008707 Specifies a password file to use for obtaining static group
8708 identification (``gid``) values when the OpenEmbedded build system
8709 adds a group to the system during package installation.
8710
8711 When applying static group identification (``gid``) values, the
8712 OpenEmbedded build system looks in :term:`BBPATH` for a
8713 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008714 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008715
8716
8717 USERADD_GID_TABLES = "files/group"
8718
8719 .. note::
8720
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008721 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8722 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008723
Andrew Geisslerf0343792020-11-18 10:42:21 -06008724 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008725 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8726 this variable specifies the individual packages within the recipe
8727 that require users and/or groups to be added.
8728
8729 You must set this variable if the recipe inherits the class. For
8730 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008731 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008732
8733 USERADD_PACKAGES = "${PN}"
8734
8735 .. note::
8736
Andrew Geissler09036742021-06-25 14:25:14 -05008737 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008738 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8739 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008740
Andrew Geisslerf0343792020-11-18 10:42:21 -06008741 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008742 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8743 this variable specifies for a package what parameters should pass to
8744 the ``useradd`` command if you add a user to the system when the
8745 package is installed.
8746
Andrew Geisslerc926e172021-05-07 16:11:35 -05008747 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008748
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008749 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008750 --no-create-home --shell /bin/false \
8751 --user-group messagebus"
8752
8753 For information on the
8754 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008755 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008756
Andrew Geisslerf0343792020-11-18 10:42:21 -06008757 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008758 Specifies a password file to use for obtaining static user
8759 identification (``uid``) values when the OpenEmbedded build system
8760 adds a user to the system during package installation.
8761
8762 When applying static user identification (``uid``) values, the
8763 OpenEmbedded build system looks in :term:`BBPATH` for a
8764 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008765 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008766
8767 USERADD_UID_TABLES = "files/passwd"
8768
8769 .. note::
8770
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008771 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8772 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008773
Andrew Geisslerf0343792020-11-18 10:42:21 -06008774 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008775 When set to "useradd-staticids", causes the OpenEmbedded build system
8776 to base all user and group additions on a static ``passwd`` and
8777 ``group`` files found in :term:`BBPATH`.
8778
8779 To use static user identification (``uid``) and group identification
8780 (``gid``) values, set the variable as follows in your ``local.conf``
8781 file: USERADDEXTENSION = "useradd-staticids"
8782
8783 .. note::
8784
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008785 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008786 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008787 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008788
8789 If you use static ``uid`` and ``gid`` information, you must also
8790 specify the ``files/passwd`` and ``files/group`` files by setting the
8791 :term:`USERADD_UID_TABLES` and
8792 :term:`USERADD_GID_TABLES` variables.
8793 Additionally, you should also set the
8794 :term:`USERADD_ERROR_DYNAMIC` variable.
8795
Andrew Geisslerf0343792020-11-18 10:42:21 -06008796 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008797 Specifies the persistence of the target's ``/var/log`` directory,
8798 which is used to house postinstall target log files.
8799
Andrew Geissler09036742021-06-25 14:25:14 -05008800 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008801 file is not persistent. You can override this setting by setting the
8802 variable to "no" to make the log directory persistent.
8803
Andrew Geisslerf0343792020-11-18 10:42:21 -06008804 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008805 Specifies the quality assurance checks whose failures are reported as
8806 warnings by the OpenEmbedded build system. You set this variable in
8807 your distribution configuration file. For a list of the checks you
8808 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00008809 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008810
Andrew Geisslerf0343792020-11-18 10:42:21 -06008811 :term:`WKS_FILE`
8812 Specifies the location of the Wic kickstart file that is used by the
8813 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05008814 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06008815 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008816 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008817 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06008818 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008819
8820 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008821 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05008822 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008823 applicable when Wic images are active (i.e. when
8824 :term:`IMAGE_FSTYPES` contains entries related
8825 to Wic). If your recipe does not create Wic images, the variable has
8826 no effect.
8827
Andrew Geissler09036742021-06-25 14:25:14 -05008828 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008829 :term:`DEPENDS` variable. When you use the variable in
8830 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05008831 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008832
Andrew Geissler09036742021-06-25 14:25:14 -05008833 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008834 specify a list of additional dependencies (e.g. native tools,
8835 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05008836 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008837
8838 WKS_FILE_DEPENDS = "some-native-tool"
8839
8840 In the
8841 previous example, some-native-tool would be replaced with an actual
8842 native tool on which the build would depend.
8843
Andrew Geisslerd5838332022-05-27 11:33:10 -05008844 :term:`WKS_FILES`
8845 Specifies a list of candidate Wic kickstart files to be used by the
8846 OpenEmbedded build system to create a partitioned image. Only the
8847 first one that is found, from left to right, will be used.
8848
8849 This is only useful when there are multiple ``.wks`` files that can be
8850 used to produce an image. A typical case is when multiple layers are
8851 used for different hardware platforms, each supplying a different
8852 ``.wks`` file. In this case, you specify all possible ones through
8853 :term:`WKS_FILES`.
8854
8855 If only one ``.wks`` file is used, set :term:`WKS_FILE` instead.
8856
Andrew Geisslerf0343792020-11-18 10:42:21 -06008857 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008858 The pathname of the work directory in which the OpenEmbedded build
8859 system builds a recipe. This directory is located within the
8860 :term:`TMPDIR` directory structure and is specific to
8861 the recipe being built and the system for which it is being built.
8862
Andrew Geissler09036742021-06-25 14:25:14 -05008863 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008864
8865 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8866
8867 The actual directory depends on several things:
8868
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008869 - :term:`TMPDIR`: The top-level build output directory
8870 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8871 - :term:`PN`: The recipe name
Andrew Geissler615f2f12022-07-15 14:00:58 -05008872 - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which
8873 is usually the case for most recipes, then `EXTENDPE` is blank.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008874 - :term:`PV`: The recipe version
8875 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008876
8877 As an example, assume a Source Directory top-level folder name
8878 ``poky``, a default Build Directory at ``poky/build``, and a
8879 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8880 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8881 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008882 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008883
8884 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8885
Andrew Geisslerf0343792020-11-18 10:42:21 -06008886 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008887 Specifies the packages that should be installed to provide an X
8888 server and drivers for the current machine, assuming your image
8889 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8890 indirectly, includes "x11-base" in
8891 :term:`IMAGE_FEATURES`.
8892
Andrew Geissler09036742021-06-25 14:25:14 -05008893 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008894 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
Patrick Williams03907ee2022-05-01 06:28:52 -05008895
8896 :term:`XZ_THREADS`
8897 Specifies the number of parallel threads that should be used when
8898 using xz compression.
8899
8900 By default this scales with core count, but is never set less than 2
8901 to ensure that multi-threaded mode is always used so that the output
8902 file contents are deterministic. Builds will work with a value of 1
8903 but the output will differ compared to the output from the compression
8904 generated when more than one thread is used.
8905
8906 On systems where many tasks run in parallel, setting a limit to this
8907 can be helpful in controlling system resource usage.
8908
8909 :term:`XZ_MEMLIMIT`
8910 Specifies the maximum memory the xz compression should use as a percentage
8911 of system memory. If unconstrained the xz compressor can use large amounts of
8912 memory and become problematic with parallelism elsewhere in the build.
8913 "50%" has been found to be a good value.
8914
8915 :term:`ZSTD_THREADS`
8916 Specifies the number of parallel threads that should be used when
8917 using ZStandard compression.
8918
8919 By default this scales with core count, but is never set less than 2
8920 to ensure that multi-threaded mode is always used so that the output
8921 file contents are deterministic. Builds will work with a value of 1
8922 but the output will differ compared to the output from the compression
8923 generated when more than one thread is used.
8924
8925 On systems where many tasks run in parallel, setting a limit to this
8926 can be helpful in controlling system resource usage.
8927