blob: 634f19a6733a44f445ca20caf0feb1f605222a09 [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:`AVAILABLE_LICENSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500235 List of licenses found in the directories specified by
236 :term:`COMMON_LICENSE_DIR` and
237 :term:`LICENSE_PATH`.
238
239 .. note::
240
Andrew Geissler09036742021-06-25 14:25:14 -0500241 It is assumed that all changes to :term:`COMMON_LICENSE_DIR` and
242 :term:`LICENSE_PATH` have been done before :term:`AVAILABLE_LICENSES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500243 is defined (in :ref:`ref-classes-license`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500244
Andrew Geisslerf0343792020-11-18 10:42:21 -0600245 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500246 The list of defined CPU and Application Binary Interface (ABI)
247 tunings (i.e. "tunes") available for use by the OpenEmbedded build
248 system.
249
250 The list simply presents the tunes that are available. Not all tunes
251 may be compatible with a particular machine configuration, or with
252 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600253 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500254 configuration.
255
256 To add a tune to the list, be sure to append it with spaces using the
257 "+=" BitBake operator. Do not simply replace the list by using the
258 "=" operator. See the
Patrick Williams213cb262021-08-07 19:21:33 -0500259 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500260 User Manual for more information.
261
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500262 :term:`AZ_SAS`
263 Azure Storage Shared Access Signature, when using the
264 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
265 This variable can be defined to be used by the fetcher to authenticate
266 and gain access to non-public artifacts.
267 ::
268
269 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
270
271 For more information see Microsoft's Azure Storage documentation at
272 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
273
Andrew Geisslerf0343792020-11-18 10:42:21 -0600274 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500275 The directory within the :term:`Build Directory` in
276 which the OpenEmbedded build system places generated objects during a
277 recipe's build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500278 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500279
280 S = "${WORKDIR}/${BP}"
281
Andrew Geissler09036742021-06-25 14:25:14 -0500282 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400283 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500284 separating these directories. The build system defaults to using
285 separate directories for ``gcc`` and some kernel recipes.
286
Andrew Geisslerf0343792020-11-18 10:42:21 -0600287 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500288 Lists "recommended-only" packages to not install. Recommended-only
289 packages are packages installed only through the
290 :term:`RRECOMMENDS` variable. You can prevent any
291 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500292 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500293
294 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
295
296 You can set this variable globally in your ``local.conf`` file or you
297 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500298 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500299
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500300 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500301
302 It is important to realize that if you choose to not install packages
303 using this variable and some other packages are dependent on them
304 (i.e. listed in a recipe's :term:`RDEPENDS`
305 variable), the OpenEmbedded build system ignores your request and
306 will install the packages to avoid dependency errors.
307
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700308 This variable is supported only when using the IPK and RPM
309 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500310
311 See the :term:`NO_RECOMMENDATIONS` and the
312 :term:`PACKAGE_EXCLUDE` variables for related
313 information.
314
Andrew Geisslerf0343792020-11-18 10:42:21 -0600315 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500316 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500317 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600318 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500319 section in the Yocto Project Development Tasks Manual for information
320 on Multilib.
321
Andrew Geissler09036742021-06-25 14:25:14 -0500322 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500323 the :term:`Source Directory`. If Multilib is not
324 being used, the value defaults to "lib".
325
Andrew Geisslerf0343792020-11-18 10:42:21 -0600326 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500327 Points to the base of the work directory for all recipes. The default
328 value is "${TMPDIR}/work".
329
Andrew Geisslerf0343792020-11-18 10:42:21 -0600330 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500331 Specifies a space-delimited list of hosts that the fetcher is allowed
332 to use to obtain the required source code. Following are
333 considerations surrounding this variable:
334
Andrew Geissler09036742021-06-25 14:25:14 -0500335 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500336 or set to "0".
337
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700338 - There is limited support for wildcard matching against the beginning of
339 host names. For example, the following setting matches
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500340 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
341 ::
342
343 BB_ALLOWED_NETWORKS = "*.gnu.org"
344
345 .. note::
346
347 The use of the "``*``" character only works at the beginning of
348 a host name and it must be isolated from the remainder of the
349 host name. You cannot use the wildcard character in any other
350 location of the name or combined with the front part of the
351 name.
352
353 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
354 is not.
355
356 - Mirrors not in the host list are skipped and logged in debug.
357
358 - Attempts to access networks not in the host list cause a failure.
359
Andrew Geissler09036742021-06-25 14:25:14 -0500360 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500361 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500362 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500363 fetched from an allowed location and avoids raising an error when a
364 host that is not allowed is in a :term:`SRC_URI`
365 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500366 host listed in :term:`SRC_URI` after a successful fetch from the
367 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500368
Andrew Geisslerf0343792020-11-18 10:42:21 -0600369 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500370 Defines how BitBake handles situations where an append file
371 (``.bbappend``) has no corresponding recipe file (``.bb``). This
372 condition often occurs when layers get out of sync (e.g. ``oe-core``
373 bumps a recipe version and the old recipe no longer exists and the
374 other layer has not been updated to the new version of the recipe
375 yet).
376
377 The default fatal behavior is safest because it is the sane reaction
378 given something is out of sync. It is important to realize when your
379 changes are no longer being applied.
380
381 You can change the default behavior by setting this variable to "1",
382 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500383 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500384
385 BB_DANGLINGAPPENDS_WARNONLY = "1"
386
Andrew Geisslerf0343792020-11-18 10:42:21 -0600387 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500388 Monitors disk space and available inodes during the build and allows
389 you to control the build based on these parameters.
390
391 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500392 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500393 found in the :term:`Build Directory`. Use the
394 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500395
396 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500397
398 BB_DISKMON_DIRS = "action,dir,threshold [...]"
399
400 where:
401
402 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000403 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500404 a threshold is broken.
405 STOPTASKS: Stop the build after the currently
406 executing tasks have finished when
407 a threshold is broken.
408 WARN: Issue a warning but continue the
409 build when a threshold is broken.
410 Subsequent warnings are issued as
411 defined by the BB_DISKMON_WARNINTERVAL
412 variable, which must be defined in
413 the conf/local.conf file.
414
415 dir is:
416 Any directory you choose. You can specify one or
417 more directories to monitor by separating the
418 groupings with a space. If two directories are
419 on the same device, only the first directory
420 is monitored.
421
422 threshold is:
423 Either the minimum available disk space,
424 the minimum number of free inodes, or
425 both. You must specify at least one. To
426 omit one or the other, simply omit the value.
427 Specify the threshold using G, M, K for Gbytes,
428 Mbytes, and Kbytes, respectively. If you do
429 not specify G, M, or K, Kbytes is assumed by
430 default. Do not use GB, MB, or KB.
431
Andrew Geisslerc926e172021-05-07 16:11:35 -0500432 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500433
434 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
435 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
436 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
437
438 The first example works only if you also provide the
439 :term:`BB_DISKMON_WARNINTERVAL`
440 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000441 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500442 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
443 below 100 Kbytes. Because two directories are provided with the
444 variable, the build system also issue a warning when the disk space
445 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
446 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500447 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500448 variable.
449
450 The second example stops the build after all currently executing
451 tasks complete when the minimum disk space in the ``${TMPDIR}``
452 directory drops below 1 Gbyte. No disk monitoring occurs for the free
453 inodes in this case.
454
Andrew Geissler595f6302022-01-24 19:11:47 +0000455 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500456 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
457 disk space monitoring for the directory itself occurs in this case.
458
Andrew Geisslerf0343792020-11-18 10:42:21 -0600459 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500460 Defines the disk space and free inode warning intervals. To set these
461 intervals, define the variable in your ``conf/local.conf`` file in
462 the :term:`Build Directory`.
463
Andrew Geissler09036742021-06-25 14:25:14 -0500464 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500465 must also use the :term:`BB_DISKMON_DIRS`
466 variable and define its action as "WARN". During the build,
467 subsequent warnings are issued each time disk space or number of free
468 inodes further reduces by the respective interval.
469
Andrew Geissler09036742021-06-25 14:25:14 -0500470 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
471 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500472 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500473
474 BB_DISKMON_WARNINTERVAL = "50M,5K"
475
476 When specifying the variable in your configuration file, use the
477 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500478
479 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500480
481 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
482
483 where:
484
485 disk_space_interval is:
486 An interval of memory expressed in either
487 G, M, or K for Gbytes, Mbytes, or Kbytes,
488 respectively. You cannot use GB, MB, or KB.
489
490 disk_inode_interval is:
491 An interval of free inodes expressed in either
492 G, M, or K for Gbytes, Mbytes, or Kbytes,
493 respectively. You cannot use GB, MB, or KB.
494
Andrew Geisslerc926e172021-05-07 16:11:35 -0500495 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500496
497 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
498 BB_DISKMON_WARNINTERVAL = "50M,5K"
499
500 These variables cause the
501 OpenEmbedded build system to issue subsequent warnings each time the
502 available disk space further reduces by 50 Mbytes or the number of
503 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
504 directory. Subsequent warnings based on the interval occur each time
505 a respective interval is reached beyond the initial warning (i.e. 1
506 Gbytes and 100 Kbytes).
507
Andrew Geisslerf0343792020-11-18 10:42:21 -0600508 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500509 Causes tarballs of the source control repositories (e.g. Git
510 repositories), including metadata, to be placed in the
511 :term:`DL_DIR` directory.
512
513 For performance reasons, creating and placing tarballs of these
514 repositories is not the default action by the OpenEmbedded build
515 system.
516 ::
517
518 BB_GENERATE_MIRROR_TARBALLS = "1"
519
520 Set this variable in your
521 ``local.conf`` file in the :term:`Build Directory`.
522
523 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500524 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500525 source control work directories.
526
Andrew Geisslerf0343792020-11-18 10:42:21 -0600527 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500528 The maximum number of tasks BitBake should run in parallel at any one
529 time. The OpenEmbedded build system automatically configures this
530 variable to be equal to the number of cores on the build system. For
531 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500532 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500533 to "4".
534
535 For single socket systems (i.e. one CPU), you should not have to
536 override this variable to gain optimal parallelism during builds.
537 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500538 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500539 is not set higher than "20".
540
541 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600542 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500543 section in the Yocto Project Development Tasks Manual.
544
Andrew Geisslerf0343792020-11-18 10:42:21 -0600545 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500546 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500547 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500548 long the BitBake server stays resident between invocations.
549
550 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500551 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500552
553 BB_SERVER_TIMEOUT = "20"
554
555 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400556 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500557
Andrew Geisslerf0343792020-11-18 10:42:21 -0600558 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500559 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700560 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500561 ``quilt-native``, which is a copy of Quilt built to run on the build
562 system; "crosses" such as ``gcc-cross``, which is a compiler built to
563 run on the build machine but produces binaries that run on the target
564 :term:`MACHINE`; "nativesdk", which targets the SDK
Andrew Geissler09036742021-06-25 14:25:14 -0500565 machine instead of :term:`MACHINE`; and "mulitlibs" in the form
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500566 "``multilib:``\ multilib_name".
567
568 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500569 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500570
571 BBCLASSEXTEND =+ "native nativesdk"
572 BBCLASSEXTEND =+ "multilib:multilib_name"
573
574 .. note::
575
Andrew Geissler09036742021-06-25 14:25:14 -0500576 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500577 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500578 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500579 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400580 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500581
Andrew Geissler09036742021-06-25 14:25:14 -0500582 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500583 Parsing once adds some limitations. For example, it is not
584 possible to include a different file depending on the variant,
585 since ``include`` statements are processed when the recipe is
586 parsed.
587
Andrew Geisslerf0343792020-11-18 10:42:21 -0600588 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500589 Lists the names of configured layers. These names are used to find
590 the other ``BBFILE_*`` variables. Typically, each layer will append
591 its name to this variable in its ``conf/layer.conf`` file.
592
Andrew Geisslerf0343792020-11-18 10:42:21 -0600593 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500594 Variable that expands to match files from
595 :term:`BBFILES` in a particular layer. This variable
596 is used in the ``conf/layer.conf`` file and must be suffixed with the
597 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
598
Andrew Geisslerf0343792020-11-18 10:42:21 -0600599 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500600 Assigns the priority for recipe files in each layer.
601
602 This variable is useful in situations where the same recipe appears
603 in more than one layer. Setting this variable allows you to
604 prioritize a layer against other layers that contain the same recipe
605 - effectively letting you control the precedence for the multiple
606 layers. The precedence established through this variable stands
607 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500608 example, a layer that has a recipe with a higher :term:`PV` value but for
609 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500610 has a lower precedence.
611
Andrew Geissler09036742021-06-25 14:25:14 -0500612 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500613 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500614 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
615 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500616 for more information. The default priority, if unspecified for a
617 layer with no dependencies, is the lowest defined priority + 1 (or 1
618 if no priorities are defined).
619
620 .. tip::
621
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500622 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500623 to list all configured layers along with their priorities.
624
Andrew Geisslerf0343792020-11-18 10:42:21 -0600625 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500626 A space-separated list of recipe files BitBake uses to build
627 software.
628
629 When specifying recipe files, you can pattern match using Python's
630 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
631 For details on the syntax, see the documentation by following the
632 previous link.
633
Andrew Geisslerf0343792020-11-18 10:42:21 -0600634 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500635 Activates content when identified layers are present. You identify
636 the layers by the collections that the layers define.
637
Andrew Geissler09036742021-06-25 14:25:14 -0500638 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500639 whose corresponding ``.bb`` file is in a layer that attempts to
640 modify other layers through ``.bbappend`` but does not want to
641 introduce a hard dependency on those other layers.
642
Andrew Geissler09036742021-06-25 14:25:14 -0500643 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000644 ``collection_name:filename_pattern``.
645
646 The following example identifies two collection names and two
647 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500648
649 BBFILES_DYNAMIC += " \
650 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
651 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
652 "
653
654 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000655 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500656
657 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500658
659 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
660 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
661 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
662
Andrew Geisslerf0343792020-11-18 10:42:21 -0600663 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500664 Variable that controls how BitBake displays logs on build failure.
665
Andrew Geisslerf0343792020-11-18 10:42:21 -0600666 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500667 If :term:`BBINCLUDELOGS` is set, specifies the
668 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500669 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500670 the entire log is printed.
671
Andrew Geisslerf0343792020-11-18 10:42:21 -0600672 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500673 Lists the layers to enable during the build. This variable is defined
674 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500675 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500676
677 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500678 /home/scottrif/poky/meta \
679 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500680 /home/scottrif/poky/meta-yocto-bsp \
681 /home/scottrif/poky/meta-mykernel \
682 "
683
684 This example enables four layers, one of which is a custom,
685 user-defined layer named ``meta-mykernel``.
686
Andrew Geisslerf0343792020-11-18 10:42:21 -0600687 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500688 Prevents BitBake from processing recipes and recipe append files.
689
Andrew Geissler09036742021-06-25 14:25:14 -0500690 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500691 ``.bbappend`` files. BitBake ignores any recipe or recipe append
692 files that match any of the expressions. It is as if BitBake does not
693 see them at all. Consequently, matching files are not parsed or
694 otherwise used by BitBake.
695
696 The values you provide are passed to Python's regular expression
697 compiler. Consequently, the syntax follows Python's Regular
698 Expression (re) syntax. The expressions are compared against the full
699 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500700 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500701
702 The following example uses a complete regular expression to tell
703 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500704 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500705
706 BBMASK = "meta-ti/recipes-misc/"
707
708 If you want to mask out multiple directories or recipes, you can
709 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500710 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500711
712 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
713 BBMASK += "/meta-oe/recipes-support/"
714 BBMASK += "/meta-foo/.*/openldap"
715 BBMASK += "opencv.*\.bbappend"
716 BBMASK += "lzma"
717
718 .. note::
719
720 When specifying a directory name, use the trailing slash character
721 to ensure you match just that directory name.
722
Andrew Geisslerf0343792020-11-18 10:42:21 -0600723 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500724 Specifies each additional separate configuration when you are
725 building targets with multiple configurations. Use this variable in
726 your ``conf/local.conf`` configuration file. Specify a
727 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500728 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500729
730 BBMULTICONFIG = "configA configB configC"
731
732 Each configuration file you
733 use must reside in the :term:`Build Directory`
734 ``conf/multiconfig`` directory (e.g.
Andrew Geisslereff27472021-10-29 15:35:00 -0500735 ``build_directory/conf/multiconfig/configA.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500736
Andrew Geissler09036742021-06-25 14:25:14 -0500737 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500738 that supports building targets with multiple configurations, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600739 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500740 section in the Yocto Project Development Tasks Manual.
741
Andrew Geisslerf0343792020-11-18 10:42:21 -0600742 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500743 Used by BitBake to locate ``.bbclass`` and configuration files. This
744 variable is analogous to the ``PATH`` variable.
745
746 .. note::
747
748 If you run BitBake from a directory outside of the
Andrew Geissler09036742021-06-25 14:25:14 -0500749 :term:`Build Directory`, you must be sure to set :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500750 to point to the Build Directory. Set the variable as you would any
Andrew Geisslerc926e172021-05-07 16:11:35 -0500751 environment variable and then run BitBake::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500752
753 $ BBPATH = "build_directory"
754 $ export BBPATH
755 $ bitbake target
756
757
Andrew Geisslerf0343792020-11-18 10:42:21 -0600758 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500759 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500760 BitBake remote server.
761
762 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500763 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500764
765 export BBSERVER=localhost:$port
766
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000767 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500768 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500769 data.
770
Andrew Geisslerf0343792020-11-18 10:42:21 -0600771 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500772 When inheriting the
773 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
774 this variable specifies binary configuration scripts to disable in
775 favor of using ``pkg-config`` to query the information. The
Andrew Geissler595f6302022-01-24 19:11:47 +0000776 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500777 return an error so that calls to them can be easily found and
778 replaced.
779
780 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500781 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500782
783 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
784
Andrew Geisslerf0343792020-11-18 10:42:21 -0600785 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500786 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
787 this variable specifies a wildcard for configuration scripts that
788 need editing. The scripts are edited to correct any paths that have
789 been set up during compilation so that they are correct for use when
790 installed into the sysroot and called by the build processes of other
791 recipes.
792
793 .. note::
794
Andrew Geissler09036742021-06-25 14:25:14 -0500795 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500796 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
797 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500798 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500799 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
800 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500801
802 For more information on how this variable works, see
803 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
804 You can also find general
805 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000806 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500807
Andrew Geisslerf0343792020-11-18 10:42:21 -0600808 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500809 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500810 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500811 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500812
813 ${BPN}-${PV}
814
Andrew Geisslerf0343792020-11-18 10:42:21 -0600815 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500816 This variable is a version of the :term:`PN` variable with
817 common prefixes and suffixes removed, such as ``nativesdk-``,
818 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
819 The exact lists of prefixes and suffixes removed are specified by the
820 :term:`MLPREFIX` and
821 :term:`SPECIAL_PKGSUFFIX` variables,
822 respectively.
823
Andrew Geisslerf0343792020-11-18 10:42:21 -0600824 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500825 Specifies a URL for an upstream bug tracking website for a recipe.
826 The OpenEmbedded build system does not use this variable. Rather, the
827 variable is a useful pointer in case a bug in the software being
828 built needs to be manually reported.
829
Andrew Geisslerf0343792020-11-18 10:42:21 -0600830 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500831 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500832 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500833 machine name reported by the ``uname`` command.
834
Andrew Geisslerf0343792020-11-18 10:42:21 -0600835 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500836 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500837 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500838
Andrew Geisslerf0343792020-11-18 10:42:21 -0600839 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500840 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500841 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500842
Andrew Geisslerf0343792020-11-18 10:42:21 -0600843 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500844 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500845 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500846 points to GCC and passes as arguments the value of
847 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500848 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500849
Andrew Geisslerf0343792020-11-18 10:42:21 -0600850 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500851 Specifies the flags to pass to the C compiler when building for the
852 build host. When building in the ``-native`` context,
853 :term:`CFLAGS` is set to the value of this variable by
854 default.
855
Andrew Geisslerf0343792020-11-18 10:42:21 -0600856 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500857 Specifies the flags to pass to the C preprocessor (i.e. to both the C
858 and the C++ compilers) when building for the build host. When
859 building in the ``-native`` context, :term:`CPPFLAGS`
860 is set to the value of this variable by default.
861
Andrew Geisslerf0343792020-11-18 10:42:21 -0600862 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500863 Specifies the flags to pass to the C++ compiler when building for the
864 build host. When building in the ``-native`` context,
865 :term:`CXXFLAGS` is set to the value of this variable
866 by default.
867
Andrew Geisslerf0343792020-11-18 10:42:21 -0600868 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500869 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500870 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500871 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500872 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500873
Andrew Geisslerf0343792020-11-18 10:42:21 -0600874 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500875 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -0500876 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500877 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500878 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500879
Andrew Geisslerf0343792020-11-18 10:42:21 -0600880 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500881 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500882 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500883
Andrew Geisslerf0343792020-11-18 10:42:21 -0600884 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500885 Specifies the flags to pass to the linker when building for the build
886 host. When building in the ``-native`` context,
887 :term:`LDFLAGS` is set to the value of this variable
888 by default.
889
Andrew Geisslerf0343792020-11-18 10:42:21 -0600890 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500891 Specifies the optimization flags passed to the C compiler when
892 building for the build host or the SDK. The flags are passed through
893 the :term:`BUILD_CFLAGS` and
894 :term:`BUILDSDK_CFLAGS` default values.
895
Andrew Geissler5f350902021-07-23 13:09:54 -0400896 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500897 -pipe".
898
Andrew Geisslerf0343792020-11-18 10:42:21 -0600899 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500900 Specifies the operating system in use on the build host (e.g.
901 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler5f350902021-07-23 13:09:54 -0400902 :term:`BUILD_OS` from the OS reported by the ``uname`` command - the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500903 first word, converted to lower-case characters.
904
Andrew Geisslerf0343792020-11-18 10:42:21 -0600905 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500906 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -0500907 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500908 :term:`TARGET_PREFIX` when building for
909 ``native`` recipes.
910
Andrew Geisslerf0343792020-11-18 10:42:21 -0600911 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500912 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -0500913 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500914 points to
915 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
916
Andrew Geisslerf0343792020-11-18 10:42:21 -0600917 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500918 Specifies the system, including the architecture and the operating
919 system, to use when building for the build host (i.e. when building
920 ``native`` recipes).
921
922 The OpenEmbedded build system automatically sets this variable based
923 on :term:`BUILD_ARCH`,
924 :term:`BUILD_VENDOR`, and
925 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -0500926 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500927
Andrew Geisslerf0343792020-11-18 10:42:21 -0600928 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500929 Specifies the vendor name to use when building for the build host.
930 The default value is an empty string ("").
931
Andrew Geisslerf0343792020-11-18 10:42:21 -0600932 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500933 Points to the location of the :term:`Build Directory`.
934 You can define this directory indirectly through the
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500935 :ref:`structure-core-script` script by passing in a Build
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500936 Directory path when you run the script. If you run the script and do
Andrew Geissler09036742021-06-25 14:25:14 -0500937 not provide a Build Directory path, the :term:`BUILDDIR` defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500938 ``build`` in the current directory.
939
Andrew Geisslerf0343792020-11-18 10:42:21 -0600940 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500941 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
942 class, this variable specifies whether or not to commit the build
943 history output in a local Git repository. If set to "1", this local
Andrew Geissler595f6302022-01-24 19:11:47 +0000944 repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500945 class and a commit will be created on every build for changes to each
946 top-level subdirectory of the build history output (images, packages,
947 and sdk). If you want to track changes to build history over time,
948 you should set this value to "1".
949
Andrew Geissler595f6302022-01-24 19:11:47 +0000950 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class does not commit the build
Andrew Geisslerc926e172021-05-07 16:11:35 -0500951 history output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500952
953 BUILDHISTORY_COMMIT ?= "0"
954
Andrew Geisslerf0343792020-11-18 10:42:21 -0600955 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500956 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
957 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -0500958 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500959 :term:`BUILDHISTORY_COMMIT` variable must
960 be set to "1".
961
962 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -0500963 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500964 email@host". Providing an email address or host that is not valid
965 does not produce an error.
966
Andrew Geissler595f6302022-01-24 19:11:47 +0000967 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500968
969 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
970
Andrew Geisslerf0343792020-11-18 10:42:21 -0600971 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500972 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
973 class, this variable specifies the directory in which build history
974 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000975 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500976
Andrew Geissler595f6302022-01-24 19:11:47 +0000977 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500978
979 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
980
Andrew Geisslerf0343792020-11-18 10:42:21 -0600981 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500982 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
983 class, this variable specifies the build history features to be
984 enabled. For more information on how build history works, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600985 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500986 section in the Yocto Project Development Tasks Manual.
987
988 You can specify these features in the form of a space-separated list:
989
990 - *image:* Analysis of the contents of images, which includes the
991 list of installed packages among other things.
992
993 - *package:* Analysis of the contents of individual packages.
994
995 - *sdk:* Analysis of the contents of the software development kit
996 (SDK).
997
998 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -0600999 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001000 (sstate) tasks.
1001 This saves one file per task and lists the SHA-256 checksums for
1002 each file staged (i.e. the output of the task).
1003
Andrew Geissler595f6302022-01-24 19:11:47 +00001004 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001005 features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001006
1007 BUILDHISTORY_FEATURES ?= "image package sdk"
1008
Andrew Geisslerf0343792020-11-18 10:42:21 -06001009 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001010 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1011 class, this variable specifies a list of paths to files copied from
1012 the image contents into the build history directory under an
1013 "image-files" directory in the directory for the image, so that you
1014 can track the contents of each file. The default is to copy
1015 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1016 changes in user and group entries. You can modify the list to include
1017 any file. Specifying an invalid path does not produce an error.
1018 Consequently, you can include files that might not always be present.
1019
Andrew Geissler595f6302022-01-24 19:11:47 +00001020 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001021 following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001022
1023 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1024
Andrew Geissler5f350902021-07-23 13:09:54 -04001025 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
1026 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1027 class, this variable specifies a common path prefix that should be
1028 stripped off the beginning of paths in the task signature list when the
1029 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1030 useful when build history is populated from multiple sources that may not
1031 all use the same top level directory.
1032
Andrew Geissler595f6302022-01-24 19:11:47 +00001033 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001034
1035 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1036
1037 In this case, no prefixes will be stripped.
1038
Andrew Geisslerf0343792020-11-18 10:42:21 -06001039 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001040 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1041 class, this variable optionally specifies a remote repository to
1042 which build history pushes Git changes. In order for
Andrew Geissler09036742021-06-25 14:25:14 -05001043 :term:`BUILDHISTORY_PUSH_REPO` to work,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001044 :term:`BUILDHISTORY_COMMIT` must be set to
1045 "1".
1046
1047 The repository should correspond to a remote address that specifies a
1048 repository as understood by Git, or alternatively to a remote name
1049 that you have set up manually using ``git remote`` within the local
1050 repository.
1051
Andrew Geissler595f6302022-01-24 19:11:47 +00001052 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001053
1054 BUILDHISTORY_PUSH_REPO ?= ""
1055
Andrew Geisslerf0343792020-11-18 10:42:21 -06001056 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001057 Specifies the flags to pass to the C compiler when building for the
1058 SDK. When building in the ``nativesdk-`` context,
1059 :term:`CFLAGS` is set to the value of this variable by
1060 default.
1061
Andrew Geisslerf0343792020-11-18 10:42:21 -06001062 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001063 Specifies the flags to pass to the C pre-processor (i.e. to both the
1064 C and the C++ compilers) when building for the SDK. When building in
1065 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1066 to the value of this variable by default.
1067
Andrew Geisslerf0343792020-11-18 10:42:21 -06001068 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001069 Specifies the flags to pass to the C++ compiler when building for the
1070 SDK. When building in the ``nativesdk-`` context,
1071 :term:`CXXFLAGS` is set to the value of this variable
1072 by default.
1073
Andrew Geisslerf0343792020-11-18 10:42:21 -06001074 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001075 Specifies the flags to pass to the linker when building for the SDK.
1076 When building in the ``nativesdk-`` context,
1077 :term:`LDFLAGS` is set to the value of this variable
1078 by default.
1079
Andrew Geisslerf0343792020-11-18 10:42:21 -06001080 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001081 Points to the location of the directory that holds build statistics
1082 when you use and enable the
1083 :ref:`buildstats <ref-classes-buildstats>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001084 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001085 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1086
Andrew Geisslerf0343792020-11-18 10:42:21 -06001087 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001088 For the BusyBox recipe, specifies whether to split the output
1089 executable file into two parts: one for features that require
1090 ``setuid root``, and one for the remaining features (i.e. those that
1091 do not require ``setuid root``).
1092
Andrew Geissler09036742021-06-25 14:25:14 -05001093 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001094 splitting the output executable file. Set the variable to "0" to get
1095 a single output executable file.
1096
Andrew Geisslerf0343792020-11-18 10:42:21 -06001097 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001098 Specifies the directory BitBake uses to store a cache of the
1099 :term:`Metadata` so it does not need to be parsed every time
1100 BitBake is started.
1101
Andrew Geisslerf0343792020-11-18 10:42:21 -06001102 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001103 The minimal command and arguments used to run the C compiler.
1104
Andrew Geisslerf0343792020-11-18 10:42:21 -06001105 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001106 Specifies the flags to pass to the C compiler. This variable is
1107 exported to an environment variable and thus made visible to the
1108 software being built during the compilation step.
1109
Andrew Geissler09036742021-06-25 14:25:14 -05001110 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001111 being built:
1112
1113 - :term:`TARGET_CFLAGS` when building for the
1114 target
1115
1116 - :term:`BUILD_CFLAGS` when building for the
1117 build host (i.e. ``-native``)
1118
1119 - :term:`BUILDSDK_CFLAGS` when building for
1120 an SDK (i.e. ``nativesdk-``)
1121
Andrew Geisslerf0343792020-11-18 10:42:21 -06001122 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001123 An internal variable specifying the special class override that
1124 should currently apply (e.g. "class-target", "class-native", and so
1125 forth). The classes that use this variable (e.g.
1126 :ref:`native <ref-classes-native>`,
1127 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1128 variable to appropriate values.
1129
1130 .. note::
1131
Andrew Geissler5f350902021-07-23 13:09:54 -04001132 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001133 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001134
1135 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001136 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001137
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001138 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001139 install my-extra-file ${D}${sysconfdir}
1140 }
1141
1142 Here is an example where ``FOO`` is set to
1143 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001144 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001145
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001146 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001147 FOO = "other"
1148
Andrew Geissler09036742021-06-25 14:25:14 -05001149 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001150 that it is included in the default value of
1151 :term:`OVERRIDES`.
1152
Andrew Geisslerf0343792020-11-18 10:42:21 -06001153 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001154 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001155 ``make clean`` command does not work for the software being built.
1156 Consequently, the OpenEmbedded build system will not try to run
1157 ``make clean`` during the :ref:`ref-tasks-configure`
1158 task, which is the default behavior.
1159
Andrew Geisslerf0343792020-11-18 10:42:21 -06001160 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001161 Provides a list of hardware features that are enabled in both
1162 :term:`MACHINE_FEATURES` and
1163 :term:`DISTRO_FEATURES`. This select list of
1164 features contains features that make sense to be controlled both at
1165 the machine and distribution configuration level. For example, the
1166 "bluetooth" feature requires hardware support but should also be
1167 optional at the distribution level, in case the hardware supports
1168 Bluetooth but you do not ever intend to use it.
1169
Andrew Geisslerf0343792020-11-18 10:42:21 -06001170 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001171 Points to ``meta/files/common-licenses`` in the
1172 :term:`Source Directory`, which is where generic license
1173 files reside.
1174
Andrew Geisslerf0343792020-11-18 10:42:21 -06001175 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001176 A regular expression that resolves to one or more hosts (when the
1177 recipe is native) or one or more targets (when the recipe is
1178 non-native) with which a recipe is compatible. The regular expression
1179 is matched against :term:`HOST_SYS`. You can use the
1180 variable to stop recipes from being built for classes of systems with
1181 which the recipes are not compatible. Stopping these builds is
1182 particularly useful with kernels. The variable also helps to increase
1183 parsing speed since the build system skips parsing recipes not
1184 compatible with the current system.
1185
Andrew Geisslerf0343792020-11-18 10:42:21 -06001186 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001187 A regular expression that resolves to one or more target machines
1188 with which a recipe is compatible. The regular expression is matched
1189 against :term:`MACHINEOVERRIDES`. You can use
1190 the variable to stop recipes from being built for machines with which
1191 the recipes are not compatible. Stopping these builds is particularly
1192 useful with kernels. The variable also helps to increase parsing
1193 speed since the build system skips parsing recipes not compatible
1194 with the current machine.
1195
Andrew Geisslerf0343792020-11-18 10:42:21 -06001196 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001197 Defines wildcards to match when installing a list of complementary
1198 packages for all the packages explicitly (or implicitly) installed in
1199 an image.
1200
1201 .. note::
1202
Andrew Geissler09036742021-06-25 14:25:14 -05001203 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001204 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1205 which is similar to the Unix style pathname pattern expansion
1206 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001207
1208 The resulting list of complementary packages is associated with an
1209 item that can be added to
1210 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001211 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001212 will install -dev packages (containing headers and other development
1213 files) for every package in the image.
1214
1215 To add a new feature item pointing to a wildcard, use a variable flag
1216 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001217 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001218
1219 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1220
Andrew Geisslerf0343792020-11-18 10:42:21 -06001221 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001222 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001223 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001224 sysroots for other recipes.
1225
1226 The default is
1227 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1228 (i.e.
1229 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1230
Andrew Geisslerf0343792020-11-18 10:42:21 -06001231 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001232 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001233 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001234 ``build/conf/`` compatibility changes.
1235
Andrew Geisslerf0343792020-11-18 10:42:21 -06001236 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001237 Identifies editable or configurable files that are part of a package.
1238 If the Package Management System (PMS) is being used to update
1239 packages on the target system, it is possible that configuration
1240 files you have changed after the original installation and that you
1241 now want to remain unchanged are overwritten. In other words,
1242 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001243 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001244 variable to list the files in the package that you wish to prevent
1245 the PMS from overwriting during this update process.
1246
Andrew Geissler09036742021-06-25 14:25:14 -05001247 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001248 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001249 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001250
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001251 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001252 ${sysconfdir}/file2 ${sysconfdir}/file3"
1253
Andrew Geissler09036742021-06-25 14:25:14 -05001254 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1255 variables. The files listed within :term:`CONFFILES` must be a subset of
1256 the files listed within :term:`FILES`. Because the configuration files
1257 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001258 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001259 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001260 variable.
1261
1262 .. note::
1263
Andrew Geissler09036742021-06-25 14:25:14 -05001264 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001265 good practice to use appropriate path variables.
1266 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1267 rather than ``/usr/bin``. You can find a list of these variables at
1268 the top of the ``meta/conf/bitbake.conf`` file in the
1269 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001270
Andrew Geisslerf0343792020-11-18 10:42:21 -06001271 :term:`CONFIG_INITRAMFS_SOURCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001272 Identifies the initial RAM filesystem (initramfs) source files. The
1273 OpenEmbedded build system receives and uses this kernel Kconfig
1274 variable as an environment variable. By default, the variable is set
1275 to null ("").
1276
Andrew Geissler09036742021-06-25 14:25:14 -05001277 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001278 with a ``.cpio`` suffix or a space-separated list of directories and
1279 files for building the initramfs image. A cpio archive should contain
1280 a filesystem archive to be used as an initramfs image. Directories
1281 should contain a filesystem layout to be included in the initramfs
1282 image. Files should contain entries according to the format described
1283 by the ``usr/gen_init_cpio`` program in the kernel tree.
1284
1285 If you specify multiple directories and files, the initramfs image
1286 will be the aggregate of all of them.
1287
1288 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001289 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001290 in the Yocto Project Development Tasks Manual.
1291
Andrew Geisslerf0343792020-11-18 10:42:21 -06001292 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001293 A list of files that contains ``autoconf`` test results relevant to
1294 the current build. This variable is used by the Autotools utilities
1295 when running ``configure``.
1296
Andrew Geisslerf0343792020-11-18 10:42:21 -06001297 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001298 The minimal arguments for GNU configure.
1299
Andrew Geisslerf0343792020-11-18 10:42:21 -06001300 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001301 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001302 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001303 class, this variable identifies distribution features that would be
1304 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001305 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1306 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001307 the recipe will be skipped, and if the build system attempts to build
1308 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001309
Andrew Geissler9aee5002022-03-30 16:27:02 +00001310 :term:`COPY_LIC_DIRS`
1311 If set to "1" along with the
1312 :term:`COPY_LIC_MANIFEST` variable, the
1313 OpenEmbedded build system copies into the image the license files,
1314 which are located in ``/usr/share/common-licenses``, for each
1315 package. The license files are placed in directories within the image
1316 itself during build time.
1317
1318 .. note::
1319
1320 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1321 newly installed packages to an image, which might be most suitable for
1322 read-only filesystems that cannot be upgraded. See the
1323 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1324 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1325 section in the Yocto Project Development Tasks Manual for
1326 information on providing license text.
1327
1328 :term:`COPY_LIC_MANIFEST`
1329 If set to "1", the OpenEmbedded build system copies the license
1330 manifest for the image to
1331 ``/usr/share/common-licenses/license.manifest`` within the image
1332 itself during build time.
1333
1334 .. note::
1335
1336 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1337 newly installed packages to an image, which might be most suitable for
1338 read-only filesystems that cannot be upgraded. See the
1339 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1340 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1341 section in the Yocto Project Development Tasks Manual for
1342 information on providing license text.
1343
Andrew Geisslerf0343792020-11-18 10:42:21 -06001344 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001345 A space-separated list of licenses to exclude from the source
1346 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1347 other words, if a license in a recipe's
1348 :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001349 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001350 class.
1351
1352 .. note::
1353
Andrew Geissler09036742021-06-25 14:25:14 -05001354 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001355 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001356
1357 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001358 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001359 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001360 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001361
Andrew Geisslerf0343792020-11-18 10:42:21 -06001362 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001363 A space-separated list of licenses to include in the source archived
1364 by the :ref:`archiver <ref-classes-archiver>` class. In other
1365 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001366 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001367 source is archived by the class.
1368
1369 The default value is set by the
1370 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001371 is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001372 "GPL*", "LGPL*", and "AGPL*".
1373
Andrew Geisslerf0343792020-11-18 10:42:21 -06001374 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001375 A list of recipes to exclude in the source archived by the
1376 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001377 :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001378 exclusion caused through the
1379 :term:`COPYLEFT_LICENSE_INCLUDE` and
1380 :term:`COPYLEFT_LICENSE_EXCLUDE`
1381 variables, respectively.
1382
1383 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001384 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001385 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001386 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001387
Andrew Geisslerf0343792020-11-18 10:42:21 -06001388 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001389 A list of recipes to include in the source archived by the
1390 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001391 :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001392 exclusion caused through the
1393 :term:`COPYLEFT_LICENSE_INCLUDE` and
1394 :term:`COPYLEFT_LICENSE_EXCLUDE`
1395 variables, respectively.
1396
1397 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001398 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001399 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001400 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001401
Andrew Geisslerf0343792020-11-18 10:42:21 -06001402 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001403 A space-separated list of recipe types to include in the source
1404 archived by the :ref:`archiver <ref-classes-archiver>` class.
1405 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1406 ``crosssdk``, and ``cross-canadian``.
1407
Andrew Geissler09036742021-06-25 14:25:14 -05001408 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001409 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
Andrew Geissler595f6302022-01-24 19:11:47 +00001410 class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001411
Andrew Geisslerf0343792020-11-18 10:42:21 -06001412 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001413 Specifies the list of packages to be added to the image. You should
1414 only set this variable in the ``local.conf`` configuration file found
1415 in the :term:`Build Directory`.
1416
1417 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1418 supported.
1419
Andrew Geisslerf0343792020-11-18 10:42:21 -06001420 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001421 Specifies the parent directory of the OpenEmbedded-Core Metadata
1422 layer (i.e. ``meta``).
1423
Andrew Geissler09036742021-06-25 14:25:14 -05001424 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001425 of this layer and not the layer itself. Consider an example where you
1426 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001427 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001428 points to the ``poky`` folder because it is the parent directory of
1429 the ``poky/meta`` layer.
1430
Andrew Geisslerf0343792020-11-18 10:42:21 -06001431 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001432 Lists files from the :term:`COREBASE` directory that
1433 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001434 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001435 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001436 into the extensible SDK.
1437
Andrew Geissler09036742021-06-25 14:25:14 -05001438 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001439 typically contains build directories and other files that should not
1440 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001441 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001442 are actually needed.
1443
Andrew Geisslerf0343792020-11-18 10:42:21 -06001444 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001445 The minimal command and arguments used to run the C preprocessor.
1446
Andrew Geisslerf0343792020-11-18 10:42:21 -06001447 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001448 Specifies the flags to pass to the C pre-processor (i.e. to both the
1449 C and the C++ compilers). This variable is exported to an environment
1450 variable and thus made visible to the software being built during the
1451 compilation step.
1452
Andrew Geissler09036742021-06-25 14:25:14 -05001453 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001454 being built:
1455
1456 - :term:`TARGET_CPPFLAGS` when building for
1457 the target
1458
1459 - :term:`BUILD_CPPFLAGS` when building for the
1460 build host (i.e. ``-native``)
1461
1462 - :term:`BUILDSDK_CPPFLAGS` when building
1463 for an SDK (i.e. ``nativesdk-``)
1464
Andrew Geisslerf0343792020-11-18 10:42:21 -06001465 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001466 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001467 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001468 :term:`TARGET_PREFIX` variable.
1469
1470 .. note::
1471
Andrew Geissler09036742021-06-25 14:25:14 -05001472 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001473 variable only in certain contexts (e.g. when building for kernel
1474 and kernel module recipes).
1475
Andrew Geissler9aee5002022-03-30 16:27:02 +00001476 :term:`CVE_CHECK_IGNORE`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001477 The list of CVE IDs which are ignored. Here is
1478 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1479
1480 # This is windows only issue.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001481 CVE_CHECK_IGNORE += "CVE-2020-15523"
1482
1483 :term:`CVE_CHECK_SKIP_RECIPE`
1484 The list of package names (:term:`PN`) for which
1485 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001486
Patrick Williams213cb262021-08-07 19:21:33 -05001487 :term:`CVE_PRODUCT`
1488 In a recipe, defines the name used to match the recipe name
1489 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1490
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001491 The default is ${:term:`BPN`}. If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001492 database or matches with multiple entries in the database, the default
1493 value needs to be changed.
1494
1495 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1496
1497 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1498
Andrew Geisslerf0343792020-11-18 10:42:21 -06001499 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001500 The directory in which files checked out under the CVS system are
1501 stored.
1502
Andrew Geisslerf0343792020-11-18 10:42:21 -06001503 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001504 The minimal command and arguments used to run the C++ compiler.
1505
Andrew Geisslerf0343792020-11-18 10:42:21 -06001506 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001507 Specifies the flags to pass to the C++ compiler. This variable is
1508 exported to an environment variable and thus made visible to the
1509 software being built during the compilation step.
1510
Andrew Geissler09036742021-06-25 14:25:14 -05001511 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001512 being built:
1513
1514 - :term:`TARGET_CXXFLAGS` when building for
1515 the target
1516
1517 - :term:`BUILD_CXXFLAGS` when building for the
1518 build host (i.e. ``-native``)
1519
1520 - :term:`BUILDSDK_CXXFLAGS` when building
1521 for an SDK (i.e. ``nativesdk-``)
1522
Andrew Geisslerf0343792020-11-18 10:42:21 -06001523 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001524 The destination directory. The location in the :term:`Build Directory`
1525 where components are installed by the
1526 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001527 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001528
1529 ${WORKDIR}/image
1530
1531 .. note::
1532
1533 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001534 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001535
Andrew Geisslerf0343792020-11-18 10:42:21 -06001536 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001537 The date the build was started. Dates appear using the year, month,
1538 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1539
Andrew Geisslerf0343792020-11-18 10:42:21 -06001540 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001541 The date and time on which the current build started. The format is
1542 suitable for timestamps.
1543
Andrew Geisslerf0343792020-11-18 10:42:21 -06001544 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001545 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001546 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001547 particular package should not be renamed according to Debian library
1548 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001549 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001550
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001551 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001552
Andrew Geisslerf0343792020-11-18 10:42:21 -06001553 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001554 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001555 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001556 the library name for an individual package. Overriding the library
1557 name in these cases is rare. You must use the package name as an
1558 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001559 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001560
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001561 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001562
Andrew Geisslerf0343792020-11-18 10:42:21 -06001563 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001564 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001565 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001566
Andrew Geisslerf0343792020-11-18 10:42:21 -06001567 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001568 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001569 compiling a system for debugging. This variable defaults to "-O
1570 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1571
Andrew Geisslereff27472021-10-29 15:35:00 -05001572 :term:`DEBUG_PREFIX_MAP`
1573 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1574 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1575 replace build-time paths by install-time ones in the debugging sections
1576 of binaries. This makes compiler output files location independent,
1577 at the cost of having to pass an extra command to tell the debugger
1578 where source files are.
1579
1580 This is used by the Yocto Project to guarantee
1581 :doc:`/test-manual/reproducible-builds` even when the source code of
1582 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1583 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1584 website for details.
1585
1586 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1587 not intended to be user-configurable.
1588
Andrew Geissler9aee5002022-03-30 16:27:02 +00001589 :term:`DEFAULT_PREFERENCE`
1590 Specifies a weak bias for recipe selection priority.
1591
1592 The most common usage of this is variable is to set it to "-1" within
1593 a recipe for a development version of a piece of software. Using the
1594 variable in this way causes the stable version of the recipe to build
1595 by default in the absence of :term:`PREFERRED_VERSION` being used to
1596 build the development version.
1597
1598 .. note::
1599
1600 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1601 by :term:`BBFILE_PRIORITY` if that variable is different between two
1602 layers that contain different versions of the same recipe.
1603
Andrew Geisslerf0343792020-11-18 10:42:21 -06001604 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001605 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1606 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001607 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001608 :term:`TUNE_FEATURES`.
1609
1610 The default tune is either implicitly or explicitly set by the
1611 machine (:term:`MACHINE`). However, you can override
1612 the setting using available tunes as defined with
1613 :term:`AVAILTUNES`.
1614
Andrew Geisslerf0343792020-11-18 10:42:21 -06001615 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001616 Lists a recipe's build-time dependencies. These are dependencies on
1617 other recipes whose contents (e.g. headers and shared libraries) are
1618 needed by the recipe at build time.
1619
1620 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001621 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001622
1623 DEPENDS = "bar"
1624
1625 The practical effect of the previous
1626 assignment is that all files installed by bar will be available in
1627 the appropriate staging sysroot, given by the
1628 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1629 :ref:`ref-tasks-configure` task for ``foo`` runs.
1630 This mechanism is implemented by having ``do_configure`` depend on
1631 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001632 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001633 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1634 declaration in the :ref:`base <ref-classes-base>` class.
1635
1636 .. note::
1637
Andrew Geissler09036742021-06-25 14:25:14 -05001638 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001639 explicitly. The standard classes and build-related variables are
1640 configured to automatically use the appropriate staging sysroots.
1641
Andrew Geissler09036742021-06-25 14:25:14 -05001642 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001643 that run on the build machine during the build. For example, a recipe
1644 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001645 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001646
1647 DEPENDS = "codegen-native"
1648
1649 For more
1650 information, see the :ref:`native <ref-classes-native>` class and
1651 the :term:`EXTRANATIVEPATH` variable.
1652
1653 .. note::
1654
Andrew Geissler09036742021-06-25 14:25:14 -05001655 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001656 it is a list of :term:`PROVIDES` names, which
1657 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001658 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001659 instead, as this will put files from all the packages that make
1660 up ``foo``, which includes those from ``foo-dev``, into the
1661 sysroot.
1662
Andrew Geissler09036742021-06-25 14:25:14 -05001663 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001664 itself add any runtime dependencies between the packages
1665 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001666 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001667 section in the Yocto Project Overview and Concepts Manual,
1668 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001669 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001670
Andrew Geissler09036742021-06-25 14:25:14 -05001671 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001672 recipes that install precompiled components. For example, if
1673 ``libfoo`` is a precompiled library that links against
1674 ``libbar``, then linking against ``libfoo`` requires both
1675 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001676 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001677 to the recipe that installs ``libbar``, other recipes might
1678 fail to link against ``libfoo``.
1679
1680 For information on runtime dependencies, see the
1681 :term:`RDEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05001682 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1683 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001684 BitBake User Manual for additional information on tasks and
1685 dependencies.
1686
Andrew Geisslerf0343792020-11-18 10:42:21 -06001687 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001688 Points to the general area that the OpenEmbedded build system uses to
1689 place images, packages, SDKs, and other output files that are ready
1690 to be used outside of the build system. By default, this directory
1691 resides within the :term:`Build Directory` as
1692 ``${TMPDIR}/deploy``.
1693
1694 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001695 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001696 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001697 ":ref:`overview-manual/concepts:images`",
1698 ":ref:`overview-manual/concepts:package feeds`", and
1699 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001700 Yocto Project Overview and Concepts Manual.
1701
Andrew Geisslerf0343792020-11-18 10:42:21 -06001702 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001703 Points to the area that the OpenEmbedded build system uses to place
1704 Debian packages that are ready to be used outside of the build
1705 system. This variable applies only when
1706 :term:`PACKAGE_CLASSES` contains
1707 "package_deb".
1708
1709 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001710 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001711 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001712
1713 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1714
1715 The :ref:`package_deb <ref-classes-package_deb>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001716 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001717 :ref:`ref-tasks-package_write_deb` task
1718 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001719 information on how packaging works, see the
1720 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001721 in the Yocto Project Overview and Concepts Manual.
1722
Andrew Geisslerf0343792020-11-18 10:42:21 -06001723 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001724 Points to the area that the OpenEmbedded build system uses to place
1725 images and other associated output files that are ready to be
1726 deployed onto the target machine. The directory is machine-specific
1727 as it contains the ``${MACHINE}`` name. By default, this directory
1728 resides within the :term:`Build Directory` as
1729 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1730
Andrew Geissler09036742021-06-25 14:25:14 -05001731 It must not be used directly in recipes when deploying files. Instead,
1732 it's only useful when a recipe needs to "read" a file already deployed
1733 by a dependency. So, it should be filled with the contents of
1734 :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1735 with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1736 <ref-classes-image>` class.
1737
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001738 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001739 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001740 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001741 ":ref:`overview-manual/concepts:images`" and
1742 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001743 the Yocto Project Overview and Concepts Manual.
1744
Andrew Geisslerf0343792020-11-18 10:42:21 -06001745 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001746 Points to the area that the OpenEmbedded build system uses to place
1747 IPK packages that are ready to be used outside of the build system.
1748 This variable applies only when
1749 :term:`PACKAGE_CLASSES` contains
1750 "package_ipk".
1751
1752 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001753 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001754
1755 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1756
1757 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001758 :term:`DEPLOY_DIR_IPK` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001759 :ref:`ref-tasks-package_write_ipk` task
1760 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001761 on how packaging works, see the
1762 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001763 in the Yocto Project Overview and Concepts Manual.
1764
Andrew Geisslerf0343792020-11-18 10:42:21 -06001765 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001766 Points to the area that the OpenEmbedded build system uses to place
1767 RPM packages that are ready to be used outside of the build system.
1768 This variable applies only when
1769 :term:`PACKAGE_CLASSES` contains
1770 "package_rpm".
1771
1772 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001773 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001774
1775 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1776
1777 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001778 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001779 :ref:`ref-tasks-package_write_rpm` task
1780 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001781 on how packaging works, see the
1782 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001783 in the Yocto Project Overview and Concepts Manual.
1784
Andrew Geisslerf0343792020-11-18 10:42:21 -06001785 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001786 Points to the area that the OpenEmbedded build system uses to place
1787 tarballs that are ready to be used outside of the build system. This
1788 variable applies only when
1789 :term:`PACKAGE_CLASSES` contains
1790 "package_tar".
1791
1792 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001793 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001794
1795 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1796
1797 The :ref:`package_tar <ref-classes-package_tar>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001798 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001799 :ref:`ref-tasks-package_write_tar` task
1800 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001801 on how packaging works, see the
1802 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001803 in the Yocto Project Overview and Concepts Manual.
1804
Andrew Geisslerf0343792020-11-18 10:42:21 -06001805 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001806 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001807 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler595f6302022-01-24 19:11:47 +00001808 is set in the :ref:`deploy <ref-classes-deploy>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001809
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001810 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001811
Andrew Geissler595f6302022-01-24 19:11:47 +00001812 Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05001813 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001814 them into :term:`DEPLOY_DIR_IMAGE`
1815 afterwards.
1816
Andrew Geisslerf0343792020-11-18 10:42:21 -06001817 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001818 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05001819 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001820 variable.
1821
Andrew Geisslerf0343792020-11-18 10:42:21 -06001822 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001823 The short name of the distribution. For information on the long name
1824 of the distribution, see the :term:`DISTRO_NAME`
1825 variable.
1826
Andrew Geissler09036742021-06-25 14:25:14 -05001827 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001828 file whose root name is the same as the variable's argument and whose
1829 filename extension is ``.conf``. For example, the distribution
1830 configuration file for the Poky distribution is named ``poky.conf``
1831 and resides in the ``meta-poky/conf/distro`` directory of the
1832 :term:`Source Directory`.
1833
Andrew Geissler09036742021-06-25 14:25:14 -05001834 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05001835 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001836
1837 DISTRO = "poky"
1838
1839 Distribution configuration files are located in a ``conf/distro``
1840 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05001841 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001842 spaces, and is typically all lower-case.
1843
1844 .. note::
1845
Andrew Geissler09036742021-06-25 14:25:14 -05001846 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001847 are used, which are specified within
1848 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001849
Andrew Geisslerf0343792020-11-18 10:42:21 -06001850 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001851 Specifies a codename for the distribution being built.
1852
Andrew Geisslerf0343792020-11-18 10:42:21 -06001853 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001854 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00001855 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001856 variable only really applies to the more full-featured images that
1857 include ``packagegroup-base``. You can use this variable to keep
1858 distro policy out of generic images. As with all other distro
1859 variables, you set this variable in the distro ``.conf`` file.
1860
Andrew Geisslerf0343792020-11-18 10:42:21 -06001861 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001862 Specifies a list of distro-specific packages to add to all images if
1863 the packages exist. The packages might not exist or be empty (e.g.
1864 kernel modules). The list of packages are automatically installed but
1865 you can remove them.
1866
Andrew Geisslerf0343792020-11-18 10:42:21 -06001867 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001868 The software support you want in your distribution for various
1869 features. You define your distribution features in the distribution
1870 configuration file.
1871
1872 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05001873 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001874 to the configure script during the
1875 :ref:`ref-tasks-configure` task for recipes that
1876 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05001877 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001878 target that can optionally support X11 to have its X11 support
1879 enabled.
1880
1881 Two more examples are Bluetooth and NFS support. For a more complete
1882 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001883 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001884
Andrew Geisslerf0343792020-11-18 10:42:21 -06001885 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05001886 Features to be added to :term:`DISTRO_FEATURES` if not also present in
1887 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001888
1889 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1890 not intended to be user-configurable. It is best to just reference
1891 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001892 all distro configurations. See the ":ref:`ref-features-backfill`" section
1893 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001894
Andrew Geisslerf0343792020-11-18 10:42:21 -06001895 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05001896 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1897 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001898 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001899
Andrew Geisslerf0343792020-11-18 10:42:21 -06001900 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001901 A convenience variable that gives you the default list of distro
1902 features with the exception of any features specific to the C library
1903 (``libc``).
1904
1905 When creating a custom distribution, you might find it useful to be
1906 able to reuse the default
1907 :term:`DISTRO_FEATURES` options without the
1908 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05001909 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001910
1911 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1912
Andrew Geisslerf0343792020-11-18 10:42:21 -06001913 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001914 Specifies a list of features that if present in the target
1915 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001916 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001917 variable is used in addition to the features filtered using the
1918 :term:`DISTRO_FEATURES_NATIVE`
1919 variable.
1920
Andrew Geisslerf0343792020-11-18 10:42:21 -06001921 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001922 Specifies a list of features that if present in the target
1923 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001924 included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001925 variable is used in addition to the features filtered using the
1926 :term:`DISTRO_FEATURES_NATIVESDK`
1927 variable.
1928
Andrew Geisslerf0343792020-11-18 10:42:21 -06001929 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001930 Specifies a list of features that should be included in
1931 :term:`DISTRO_FEATURES` when building native
1932 recipes. This variable is used in addition to the features filtered
1933 using the
1934 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1935 variable.
1936
Andrew Geisslerf0343792020-11-18 10:42:21 -06001937 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001938 Specifies a list of features that should be included in
1939 :term:`DISTRO_FEATURES` when building
1940 nativesdk recipes. This variable is used in addition to the features
1941 filtered using the
1942 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1943 variable.
1944
Andrew Geisslerf0343792020-11-18 10:42:21 -06001945 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001946 The long name of the distribution. For information on the short name
1947 of the distribution, see the :term:`DISTRO` variable.
1948
Andrew Geissler09036742021-06-25 14:25:14 -05001949 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001950 configuration file whose root name is the same as the variable's
1951 argument and whose filename extension is ``.conf``. For example, the
1952 distribution configuration file for the Poky distribution is named
1953 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1954 of the :term:`Source Directory`.
1955
Andrew Geissler09036742021-06-25 14:25:14 -05001956 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05001957 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001958
1959 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1960
1961 Distribution configuration files are located in a ``conf/distro``
1962 directory within the :term:`Metadata` that contains the
1963 distribution configuration.
1964
1965 .. note::
1966
Andrew Geissler09036742021-06-25 14:25:14 -05001967 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001968 configurations are used, which are specified within
1969 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001970
Andrew Geisslerf0343792020-11-18 10:42:21 -06001971 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001972 The version of the distribution.
1973
Andrew Geisslerf0343792020-11-18 10:42:21 -06001974 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001975 A colon-separated list of overrides specific to the current
1976 distribution. By default, this list includes the value of
1977 :term:`DISTRO`.
1978
Andrew Geissler09036742021-06-25 14:25:14 -05001979 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001980 apply to the distribution.
1981
Andrew Geissler09036742021-06-25 14:25:14 -05001982 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001983 is included in the default value of
1984 :term:`OVERRIDES`.
1985
Andrew Geisslerf0343792020-11-18 10:42:21 -06001986 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001987 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05001988 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001989 for everything except Git repositories. If you want tarballs of Git
1990 repositories, use the
1991 :term:`BB_GENERATE_MIRROR_TARBALLS`
1992 variable.
1993
Andrew Geissler09036742021-06-25 14:25:14 -05001994 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001995 ``conf/local.conf`` file. This directory is self-maintaining and you
1996 should not have to touch it. By default, the directory is
1997 ``downloads`` in the :term:`Build Directory`.
1998 ::
1999
2000 #DL_DIR ?= "${TOPDIR}/downloads"
2001
2002 To specify a different download directory,
2003 simply remove the comment from the line and provide your directory.
2004
2005 During a first build, the system downloads many different source code
2006 tarballs from various upstream projects. Downloading can take a
2007 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002008 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002009 system looks there first to find source tarballs.
2010
2011 .. note::
2012
2013 When wiping and rebuilding, you can preserve this directory to
2014 speed up this part of subsequent builds.
2015
2016 You can safely share this directory between multiple builds on the
2017 same development machine. For additional information on how the build
2018 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002019 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002020 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002021 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002022 Wiki page.
2023
Andrew Geisslerf0343792020-11-18 10:42:21 -06002024 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002025 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2026 class, this variable sets the compression policy used when the
2027 OpenEmbedded build system compresses man pages and info pages. By
2028 default, the compression method used is gz (gzip). Other policies
2029 available are xz and bz2.
2030
2031 For information on policies and on how to use this variable, see the
2032 comments in the ``meta/classes/compress_doc.bbclass`` file.
2033
Andrew Geisslerf0343792020-11-18 10:42:21 -06002034 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002035 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2036 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002037 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002038 default is "grub-efi", but "systemd-boot" can be used instead.
2039
2040 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2041 :ref:`image-live <ref-classes-image-live>` classes for more
2042 information.
2043
Andrew Geisslerf0343792020-11-18 10:42:21 -06002044 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002045 Variable that controls which locales for ``glibc`` are generated
2046 during the build (useful if the target device has 64Mbytes of RAM or
2047 less).
2048
Andrew Geisslerf0343792020-11-18 10:42:21 -06002049 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002050 When used with the :ref:`report-error <ref-classes-report-error>`
2051 class, specifies the path used for storing the debug files created by
2052 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002053 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002054 allows you to submit build errors you encounter to a central
2055 database. By default, the value of this variable is
2056 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2057
Andrew Geissler09036742021-06-25 14:25:14 -05002058 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002059 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002060 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002061
2062 ERR_REPORT_DIR = "path"
2063
Andrew Geisslerf0343792020-11-18 10:42:21 -06002064 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002065 Specifies the quality assurance checks whose failures are reported as
2066 errors by the OpenEmbedded build system. You set this variable in
2067 your distribution configuration file. For a list of the checks you
2068 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002069 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002070
Andrew Geissler9aee5002022-03-30 16:27:02 +00002071 :term:`ESDK_CLASS_INHERIT_DISABLE`
2072 A list of classes to remove from the :term:`INHERIT`
2073 value globally within the extensible SDK configuration. The
2074 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2075 default value::
2076
2077 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2078
2079 Some classes are not generally applicable within the extensible SDK
2080 context. You can use this variable to disable those classes.
2081
2082 For additional information on how to customize the extensible SDK's
2083 configuration, see the
2084 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2085 section in the Yocto Project Application Development and the
2086 Extensible Software Development Kit (eSDK) manual.
2087
2088 :term:`ESDK_LOCALCONF_ALLOW`
2089 A list of variables allowed through from the OpenEmbedded build
2090 system configuration into the extensible SDK configuration. By
2091 default, the list of variables is empty and is set in the
2092 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2093
2094 This list overrides the variables specified using the
2095 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2096 other variables automatically added due to the "/" character
2097 being found at the start of the
2098 value, which is usually indicative of being a path and thus might not
2099 be valid on the system where the SDK is installed.
2100
2101 For additional information on how to customize the extensible SDK's
2102 configuration, see the
2103 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2104 section in the Yocto Project Application Development and the
2105 Extensible Software Development Kit (eSDK) manual.
2106
2107 :term:`ESDK_LOCALCONF_REMOVE`
2108 A list of variables not allowed through from the OpenEmbedded build
2109 system configuration into the extensible SDK configuration. Usually,
2110 these are variables that are specific to the machine on which the
2111 build system is running and thus would be potentially problematic
2112 within the extensible SDK.
2113
2114 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2115 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2116 excludes the following variables:
2117
2118 - :term:`CONF_VERSION`
2119 - :term:`BB_NUMBER_THREADS`
2120 - :term:`BB_NUMBER_PARSE_THREADS`
2121 - :term:`PARALLEL_MAKE`
2122 - :term:`PRSERV_HOST`
2123 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2124 - :term:`SSTATE_DIR` :term:`TMPDIR`
2125 - :term:`BB_SERVER_TIMEOUT`
2126
2127 For additional information on how to customize the extensible SDK's
2128 configuration, see the
2129 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2130 section in the Yocto Project Application Development and the
2131 Extensible Software Development Kit (eSDK) manual.
2132
Andrew Geisslerf0343792020-11-18 10:42:21 -06002133 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002134 Triggers the OpenEmbedded build system's shared libraries resolver to
2135 exclude an entire package when scanning for shared libraries.
2136
2137 .. note::
2138
2139 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002140 the internal function ``package_do_shlibs``, which is part of the
2141 :ref:`ref-tasks-package` task. You should be aware that the shared
2142 libraries resolver might implicitly define some dependencies between
2143 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002144
Andrew Geissler09036742021-06-25 14:25:14 -05002145 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002146 :term:`PRIVATE_LIBS` variable, which excludes a
2147 package's particular libraries only and not the whole package.
2148
Andrew Geissler09036742021-06-25 14:25:14 -05002149 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002150 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002151
2152 EXCLUDE_FROM_SHLIBS = "1"
2153
Andrew Geisslerf0343792020-11-18 10:42:21 -06002154 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002155 Directs BitBake to exclude a recipe from world builds (i.e.
2156 ``bitbake world``). During world builds, BitBake locates, parses and
2157 builds all recipes found in every layer exposed in the
2158 ``bblayers.conf`` configuration file.
2159
2160 To exclude a recipe from a world build using this variable, set the
2161 variable to "1" in the recipe.
2162
2163 .. note::
2164
Andrew Geissler09036742021-06-25 14:25:14 -05002165 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002166 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002167 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002168 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002169
Andrew Geisslerf0343792020-11-18 10:42:21 -06002170 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002171 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002172 version based on the recipe's :term:`PE` value. If :term:`PE`
2173 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2174 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2175 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2176 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002177
2178 See the :term:`STAMP` variable for an example.
2179
Andrew Geisslerf0343792020-11-18 10:42:21 -06002180 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002181 The full package version specification as it appears on the final
2182 packages produced by a recipe. The variable's value is normally used
2183 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002184 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002185
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002186 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002187
2188 The dependency relationships are intended to force the package
2189 manager to upgrade these types of packages in lock-step.
2190
Andrew Geisslerf0343792020-11-18 10:42:21 -06002191 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002192 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002193 tools are not in the source tree.
2194
2195 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002196 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002197 variable tells the OpenEmbedded build system to prefer the installed
2198 external tools. See the
2199 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2200 ``meta/classes`` to see how the variable is used.
2201
Andrew Geisslerf0343792020-11-18 10:42:21 -06002202 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002203 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2204 class, this variable points to the source tree, which is outside of
2205 the OpenEmbedded build system. When set, this variable sets the
2206 :term:`S` variable, which is what the OpenEmbedded build
2207 system uses to locate unpacked recipe source code.
2208
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002209 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002210 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002211 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002212 section in the Yocto Project Development Tasks Manual.
2213
Andrew Geisslerf0343792020-11-18 10:42:21 -06002214 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002215 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2216 class, this variable points to the directory in which the recipe's
2217 source code is built, which is outside of the OpenEmbedded build
2218 system. When set, this variable sets the :term:`B` variable,
2219 which is what the OpenEmbedded build system uses to locate the Build
2220 Directory.
2221
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002222 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002223 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002224 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002225 section in the Yocto Project Development Tasks Manual.
2226
Andrew Geisslerf0343792020-11-18 10:42:21 -06002227 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002228 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
Andrew Geissler09036742021-06-25 14:25:14 -05002229 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002230 pass to the ``autoreconf`` command that is executed during the
2231 :ref:`ref-tasks-configure` task.
2232
2233 The default value is "--exclude=autopoint".
2234
Andrew Geisslerf0343792020-11-18 10:42:21 -06002235 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002236 A list of additional features to include in an image. When listing
2237 more than one feature, separate them with a space.
2238
2239 Typically, you configure this variable in your ``local.conf`` file,
2240 which is found in the :term:`Build Directory`.
2241 Although you can use this variable from within a recipe, best
2242 practices dictate that you do not.
2243
2244 .. note::
2245
2246 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002247 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002248
2249 Here are some examples of features you can add:
2250
2251 - "dbg-pkgs" - Adds -dbg packages for all installed packages including
2252 symbol information for debugging and profiling.
2253
2254 - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and
2255 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002256 'post-install-logging' features in the ":ref:`ref-features-image`"
2257 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002258 - "dev-pkgs" - Adds -dev packages for all installed packages. This is
2259 useful if you want to develop against the libraries in the image.
2260 - "read-only-rootfs" - Creates an image whose root filesystem is
2261 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002262 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002263 section in the Yocto Project Development Tasks Manual for more
2264 information
2265 - "tools-debug" - Adds debugging tools such as gdb and strace.
2266 - "tools-sdk" - Adds development tools such as gcc, make,
2267 pkgconfig and so forth.
2268 - "tools-testapps" - Adds useful testing tools
2269 such as ts_print, aplay, arecord and so forth.
2270
2271 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002272 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002273
2274 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002275 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 -05002276 section in the Yocto Project Development Tasks Manual.
2277
Andrew Geisslerf0343792020-11-18 10:42:21 -06002278 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002279 Specifies additional options for the image creation command that has
2280 been specified in :term:`IMAGE_CMD`. When setting
2281 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002282 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002283
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002284 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002285
Andrew Geisslerf0343792020-11-18 10:42:21 -06002286 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002287 A list of recipes to build that do not provide packages for
2288 installing into the root filesystem.
2289
2290 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002291 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002292 variable to list these recipes and thus specify the dependencies. A
2293 typical example is a required bootloader in a machine configuration.
2294
2295 .. note::
2296
2297 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002298 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002299
Andrew Geisslerf0343792020-11-18 10:42:21 -06002300 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002301 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2302 :ref:`cmake <ref-classes-cmake>` class for additional information.
2303
Andrew Geisslerf0343792020-11-18 10:42:21 -06002304 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002305 Additional ``configure`` script options. See
2306 :term:`PACKAGECONFIG_CONFARGS` for
2307 additional information on passing configure script options.
2308
Andrew Geisslerf0343792020-11-18 10:42:21 -06002309 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002310 Additional GNU ``make`` options.
2311
Andrew Geissler09036742021-06-25 14:25:14 -05002312 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002313 variable to specify any required GNU options.
2314
2315 :term:`PARALLEL_MAKE` and
2316 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002317 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002318
Andrew Geisslerf0343792020-11-18 10:42:21 -06002319 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002320 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2321 variable specifies additional configuration options you want to pass
2322 to the ``scons`` command line.
2323
Andrew Geisslerf0343792020-11-18 10:42:21 -06002324 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002325 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2326 class, this variable provides image level user and group operations.
2327 This is a more global method of providing user and group
2328 configuration as compared to using the
2329 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2330 group configurations to a specific recipe.
2331
2332 The set list of commands you can configure using the
Andrew Geissler595f6302022-01-24 19:11:47 +00002333 :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These
Andrew Geisslerc926e172021-05-07 16:11:35 -05002334 commands map to the normal Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002335
2336 # EXTRA_USERS_PARAMS = "\
2337 # useradd -p '' tester; \
2338 # groupadd developers; \
2339 # userdel nobody; \
2340 # groupdel -g video; \
2341 # groupmod -g 1020 developers; \
2342 # usermod -s /bin/sh tester; \
2343 # "
2344
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002345 Additionally there is a special ``passwd-expire`` command that will
2346 cause the password for a user to be expired and thus force changing it
2347 on first login, for example::
2348
2349 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2350
2351 .. note::
2352
2353 At present, ``passwd-expire`` may only work for remote logins when
2354 using OpenSSH and not dropbear as an SSH server.
2355
Andrew Geissler9aee5002022-03-30 16:27:02 +00002356 :term:`EXTRANATIVEPATH`
2357 A list of subdirectories of
2358 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2359 added to the beginning of the environment variable ``PATH``. As an
2360 example, the following prepends
2361 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2362 ``PATH``::
2363
2364 EXTRANATIVEPATH = "foo bar"
2365
Andrew Geisslerf0343792020-11-18 10:42:21 -06002366 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002367 Defines one or more packages to include in an image when a specific
2368 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002369 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002370 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002371
2372 FEATURE_PACKAGES_widget = "package1 package2"
2373
Andrew Geissler09036742021-06-25 14:25:14 -05002374 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002375 package1 and package2 would be included in the image.
2376
2377 .. note::
2378
Andrew Geissler09036742021-06-25 14:25:14 -05002379 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002380 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002381 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002382 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002383
Andrew Geisslerf0343792020-11-18 10:42:21 -06002384 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002385 Points to the base URL of the server and location within the
2386 document-root that provides the metadata and packages required by
2387 OPKG to support runtime package management of IPK packages. You set
2388 this variable in your ``local.conf`` file.
2389
Andrew Geisslerc926e172021-05-07 16:11:35 -05002390 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002391
2392 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2393
2394 This example assumes you are serving
2395 your packages over HTTP and your databases are located in a directory
2396 named ``BOARD-dir``, which is underneath your HTTP server's
2397 document-root. In this case, the OpenEmbedded build system generates
2398 a set of configuration files for you in your target that work with
2399 the feed.
2400
Andrew Geisslerf0343792020-11-18 10:42:21 -06002401 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002402 The list of files and directories that are placed in a package. The
2403 :term:`PACKAGES` variable lists the packages
2404 generated by a recipe.
2405
Andrew Geissler09036742021-06-25 14:25:14 -05002406 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002407 identifies the resulting package. Then, provide a space-separated
2408 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002409 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002410
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002411 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002412
2413 .. note::
2414
2415 - When specifying files or paths, you can pattern match using
2416 Python's
2417 `glob <https://docs.python.org/3/library/glob.html>`_
2418 syntax. For details on the syntax, see the documentation by
2419 following the previous link.
2420
Andrew Geissler09036742021-06-25 14:25:14 -05002421 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002422 good practice to use appropriate path variables. For example,
2423 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2424 rather than ``/usr/bin``. You can find a list of these
2425 variables at the top of the ``meta/conf/bitbake.conf`` file in
2426 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002427 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002428 this file.
2429
Andrew Geissler09036742021-06-25 14:25:14 -05002430 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002431 editable and you know they should not be overwritten during the
2432 package update process by the Package Management System (PMS), you
2433 can identify these files so that the PMS will not overwrite them. See
2434 the :term:`CONFFILES` variable for information on
2435 how to identify these files to the PMS.
2436
Andrew Geisslerf0343792020-11-18 10:42:21 -06002437 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002438 Defines the file specification to match
2439 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002440 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002441 symbolic link (symlink) for shared libraries on the target platform.
2442
2443 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002444 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002445
2446 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2447
Andrew Geisslerf0343792020-11-18 10:42:21 -06002448 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002449 Extends the search path the OpenEmbedded build system uses when
2450 looking for files and patches as it processes recipes and append
2451 files. The default directories BitBake uses when it processes recipes
2452 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002453 variable. You can extend :term:`FILESPATH` variable by using
2454 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002455
2456 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002457 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002458 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002459
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002460 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002461
2462 In the above example, the build system first
2463 looks for files in a directory that has the same name as the
2464 corresponding append file.
2465
2466 .. note::
2467
Andrew Geissler09036742021-06-25 14:25:14 -05002468 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002469 expansion (``:=``) operator. Immediate expansion makes sure that
2470 BitBake evaluates :term:`THISDIR` at the time the
2471 directive is encountered rather than at some later time when
2472 expansion might result in a directory that does not contain the
2473 files you need.
2474
2475 Also, include the trailing separating colon character if you are
2476 prepending. The trailing colon character is necessary because you
2477 are directing BitBake to extend the path by prepending directories
2478 to the search path.
2479
Andrew Geisslerc926e172021-05-07 16:11:35 -05002480 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002481
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002482 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002483
2484 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002485 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002486 in the same directory as the corresponding append file.
2487
Andrew Geisslerc926e172021-05-07 16:11:35 -05002488 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002489
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002490 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002491
2492 A final example shows how you can extend the search path and include
2493 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002494 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002495
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002496 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002497
2498 The previous statement appears in the
2499 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002500 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002501 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2502 override is a special :term:`PACKAGE_ARCH`
2503 definition for multiple ``meta-intel`` machines.
2504
2505 .. note::
2506
2507 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002508 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002509
2510 By prepending paths in ``.bbappend`` files, you allow multiple append
2511 files that reside in different layers but are used for the same
2512 recipe to correctly extend the path.
2513
Andrew Geisslerf0343792020-11-18 10:42:21 -06002514 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002515 A subset of :term:`OVERRIDES` used by the
2516 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002517 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002518 uses overrides to automatically extend the
2519 :term:`FILESPATH` variable. For an example of how
2520 that works, see the :term:`FILESPATH` variable
2521 description. Additionally, you find more information on how overrides
2522 are handled in the
2523 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2524 section of the BitBake User Manual.
2525
Andrew Geissler09036742021-06-25 14:25:14 -05002526 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002527
2528 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2529
2530 .. note::
2531
Andrew Geissler09036742021-06-25 14:25:14 -05002532 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002533 with expected overrides and are used in an expected manner by the
2534 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002535
Andrew Geisslerf0343792020-11-18 10:42:21 -06002536 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002537 The default set of directories the OpenEmbedded build system uses
2538 when searching for patches and files.
2539
2540 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002541 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002542 patches specified by each ``file://`` URI in a recipe's
2543 :term:`SRC_URI` statements.
2544
Andrew Geissler09036742021-06-25 14:25:14 -05002545 The default value for the :term:`FILESPATH` variable is defined in the
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002546 :ref:`ref-classes-base` class found in ``meta/classes`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002547 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002548
2549 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2550 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2551
2552 The
Andrew Geissler09036742021-06-25 14:25:14 -05002553 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002554 from the :term:`FILESOVERRIDES` variable.
2555
2556 .. note::
2557
Andrew Geissler09036742021-06-25 14:25:14 -05002558 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002559 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002560 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002561 :term:`FILESEXTRAPATHS` variable.
2562
Andrew Geissler09036742021-06-25 14:25:14 -05002563 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002564 to directories in custom layers where append files
2565 (``.bbappend``) are used. If you want the build system to find
2566 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002567 to extend the :term:`FILESPATH` variable by using the
2568 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002569
2570 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002571 example, consider a case where there is the following directory structure
2572 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002573
2574 files/defconfig
2575 files/MACHINEA/defconfig
2576 files/MACHINEB/defconfig
2577
Andrew Geissler09036742021-06-25 14:25:14 -05002578 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002579 "file://defconfig". Given this scenario, you can set
2580 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002581 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002582 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2583 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2584 build system uses files from ``files/defconfig``.
2585
2586 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002587 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002588 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002589 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002590 the Yocto Project Development Tasks Manual. See the
2591 :ref:`ref-tasks-patch` task as well.
2592
Andrew Geisslerf0343792020-11-18 10:42:21 -06002593 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002594 Allows you to define your own file permissions settings table as part
2595 of your configuration for the packaging process. For example, suppose
2596 you need a consistent set of custom permissions for a set of groups
2597 and users across an entire work project. It is best to do this in the
2598 packages themselves but this is not always possible.
2599
2600 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2601 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2602 If you create your own file
2603 permissions setting table, you should place it in your layer or the
2604 distro's layer.
2605
Andrew Geissler09036742021-06-25 14:25:14 -05002606 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002607 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2608 to point to your custom
2609 ``fs-perms.txt``. You can specify more than a single file permissions
2610 setting table. The paths you specify to these files must be defined
2611 within the :term:`BBPATH` variable.
2612
2613 For guidance on how to create your own file permissions settings
2614 table file, examine the existing ``fs-perms.txt``.
2615
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002616 :term:`FIT_DESC`
2617 Specifies the description string encoded into a fitImage. The default
2618 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2619 class as follows::
2620
2621 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2622
Andrew Geisslerf0343792020-11-18 10:42:21 -06002623 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002624 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002625 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002626 The default value is 0.
2627
Andrew Geisslerf0343792020-11-18 10:42:21 -06002628 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002629 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2630
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002631 :term:`FIT_KERNEL_COMP_ALG`
2632 Compression algorithm to use for the kernel image inside the FIT Image.
2633 At present, the only supported values are "gzip" (default) or "none"
2634 If you set this variable to anything other than "none" you may also need
2635 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2636
2637 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2638 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2639 value is ".gz".
2640
Andrew Geisslerf0343792020-11-18 10:42:21 -06002641 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002642 Arguments to openssl genrsa for generating RSA private key for signing
2643 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2644 use.
2645
Andrew Geisslerf0343792020-11-18 10:42:21 -06002646 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002647 Arguments to openssl req for generating certificate for signing fitImage.
2648 The default value is "-batch -new". batch for non interactive mode
2649 and new for generating new keys.
2650
Andrew Geisslerf0343792020-11-18 10:42:21 -06002651 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002652 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002653 The default value is "x509".
2654
Andrew Geisslerf0343792020-11-18 10:42:21 -06002655 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002656 Specifies the signature algorithm used in creating the FIT Image.
2657 For e.g. rsa2048.
2658
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002659 :term:`FIT_SIGN_INDIVIDUAL`
2660 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2661 class will sign the kernel, dtb and ramdisk images individually in addition
2662 to signing the fitImage itself. This could be useful if you are
2663 intending to verify signatures in another context than booting via
2664 U-Boot.
2665
Andrew Geissler9aee5002022-03-30 16:27:02 +00002666 :term:`FIT_SIGN_NUMBITS`
2667 Size of private key in number of bits used in fitImage. The default
2668 value is "2048".
2669
Andrew Geisslerf0343792020-11-18 10:42:21 -06002670 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002671 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2672 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04002673 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002674
Andrew Geisslerf0343792020-11-18 10:42:21 -06002675 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002676 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2677 this variable identifies packages containing font files that need to
Andrew Geissler595f6302022-01-24 19:11:47 +00002678 be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002679 that fonts are in the recipe's main package (i.e.
2680 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2681 need are in a package other than that main package.
2682
Andrew Geisslerf0343792020-11-18 10:42:21 -06002683 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002684 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2685 during the generation of the root filesystem.
2686
2687 Set the variable to "1" to force the removal of these packages.
2688
Andrew Geisslerf0343792020-11-18 10:42:21 -06002689 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002690 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002691 compiling an optimized system. This variable defaults to "-O2 -pipe
2692 ${DEBUG_FLAGS}".
2693
Andrew Geisslerf0343792020-11-18 10:42:21 -06002694 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002695 Enables Position Independent Executables (PIE) within the GNU C
2696 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2697 Programming (ROP) attacks much more difficult to execute.
2698
2699 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002700 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002701
2702 GCCPIE ?= "--enable-default-pie"
2703
Andrew Geisslerf0343792020-11-18 10:42:21 -06002704 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002705 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05002706 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002707 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002708
2709 GCCVERSION ?= "8.%"
2710
2711 You can override this value by setting it in a
2712 configuration file such as the ``local.conf``.
2713
Andrew Geisslerf0343792020-11-18 10:42:21 -06002714 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002715 The minimal command and arguments to run the GNU Debugger.
2716
Andrew Geissler595f6302022-01-24 19:11:47 +00002717 :term:`GIR_EXTRA_LIBS_PATH`
2718 Allows to specify an extra search path for ``.so`` files
2719 in GLib related recipes using GObject introspection,
2720 and which do not compile without this setting.
2721 See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`"
2722 section for details.
2723
Andrew Geisslerf0343792020-11-18 10:42:21 -06002724 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002725 The directory in which a local copy of a Git repository is stored
2726 when it is cloned.
2727
Andrew Geisslerf0343792020-11-18 10:42:21 -06002728 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002729 Specifies the list of GLIBC locales to generate should you not wish
2730 to generate all LIBC locals, which can be time consuming.
2731
2732 .. note::
2733
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002734 If you specifically remove the locale ``en_US.UTF-8``, you must set
2735 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002736
Andrew Geissler09036742021-06-25 14:25:14 -05002737 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002738 By default, all locales are generated.
2739 ::
2740
2741 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2742
Andrew Geisslerf0343792020-11-18 10:42:21 -06002743 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002744 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2745 this variable specifies for a package what parameters should be
2746 passed to the ``groupadd`` command if you wish to add a group to the
2747 system when the package is installed.
2748
Andrew Geisslerc926e172021-05-07 16:11:35 -05002749 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002750
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002751 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002752
2753 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002754 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002755
Andrew Geisslerf0343792020-11-18 10:42:21 -06002756 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002757 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2758 this variable specifies for a package what parameters should be
2759 passed to the ``groupmems`` command if you wish to modify the members
2760 of a group when the package is installed.
2761
2762 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002763 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002764
Andrew Geisslerf0343792020-11-18 10:42:21 -06002765 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002766 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2767 and serial in the boot menu. Set this variable to "1" in your
2768 ``local.conf`` or distribution configuration file to enable graphics
2769 and serial in the menu.
2770
2771 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2772 information on how this variable is used.
2773
Andrew Geisslerf0343792020-11-18 10:42:21 -06002774 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002775 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2776 configuration. Use a semi-colon character (``;``) to separate
2777 multiple options.
2778
Andrew Geissler09036742021-06-25 14:25:14 -05002779 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002780 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2781 on how this variable is used.
2782
Andrew Geisslerf0343792020-11-18 10:42:21 -06002783 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002784 Specifies the timeout before executing the default ``LABEL`` in the
2785 GNU GRand Unified Bootloader (GRUB).
2786
Andrew Geissler09036742021-06-25 14:25:14 -05002787 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002788 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2789 on how this variable is used.
2790
Andrew Geisslerf0343792020-11-18 10:42:21 -06002791 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002792 When inheriting the
2793 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2794 this variable specifies the packages that contain the GTK+ input
2795 method modules being installed when the modules are in packages other
2796 than the main package.
2797
Andrew Geisslerf0343792020-11-18 10:42:21 -06002798 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002799 Website where more information about the software the recipe is
2800 building can be found.
2801
Andrew Geisslerf0343792020-11-18 10:42:21 -06002802 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002803 The name of the target architecture, which is normally the same as
2804 :term:`TARGET_ARCH`. The OpenEmbedded build system
2805 supports many architectures. Here is an example list of architectures
2806 supported. This list is by no means complete as the architecture is
2807 configurable:
2808
2809 - arm
2810 - i586
2811 - x86_64
2812 - powerpc
2813 - powerpc64
2814 - mips
2815 - mipsel
2816
Andrew Geisslerf0343792020-11-18 10:42:21 -06002817 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002818 Specifies architecture-specific compiler flags that are passed to the
2819 C compiler.
2820
Andrew Geissler09036742021-06-25 14:25:14 -05002821 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002822 is being built:
2823
2824 - :term:`TARGET_CC_ARCH` when building for the
2825 target
2826
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002827 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002828 ``-native``)
2829
2830 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2831 ``nativesdk-``)
2832
Andrew Geisslerf0343792020-11-18 10:42:21 -06002833 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002834 Specifies the name of the target operating system, which is normally
2835 the same as the :term:`TARGET_OS`. The variable can
2836 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2837 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2838 "linux-musleabi" values possible.
2839
Andrew Geisslerf0343792020-11-18 10:42:21 -06002840 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05002841 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002842 is normally the same as :term:`TARGET_PREFIX`.
2843
Andrew Geisslerf0343792020-11-18 10:42:21 -06002844 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002845 Specifies the system, including the architecture and the operating
2846 system, for which the build is occurring in the context of the
2847 current recipe.
2848
2849 The OpenEmbedded build system automatically sets this variable based
2850 on :term:`HOST_ARCH`,
2851 :term:`HOST_VENDOR`, and
2852 :term:`HOST_OS` variables.
2853
2854 .. note::
2855
2856 You do not need to set the variable yourself.
2857
2858 Consider these two examples:
2859
2860 - Given a native recipe on a 32-bit x86 machine running Linux, the
2861 value is "i686-linux".
2862
2863 - Given a recipe being built for a little-endian MIPS target running
2864 Linux, the value might be "mipsel-linux".
2865
Andrew Geissler9aee5002022-03-30 16:27:02 +00002866 :term:`HOST_VENDOR`
2867 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
2868 same as :term:`TARGET_VENDOR`.
2869
Andrew Geisslerf0343792020-11-18 10:42:21 -06002870 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002871 A space-separated list (filter) of tools on the build host that
2872 should be allowed to be called from within build tasks. Using this
2873 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05002874 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002875 host, the OpenEmbedded build system produces an error and the build
2876 is not started.
2877
2878 For additional information, see
2879 :term:`HOSTTOOLS_NONFATAL`.
2880
Andrew Geisslerf0343792020-11-18 10:42:21 -06002881 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002882 A space-separated list (filter) of tools on the build host that
2883 should be allowed to be called from within build tasks. Using this
2884 filter helps reduce the possibility of host contamination. Unlike
2885 :term:`HOSTTOOLS`, the OpenEmbedded build system
2886 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05002887 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2888 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002889
Andrew Geissler9aee5002022-03-30 16:27:02 +00002890 :term:`ICECC_CLASS_DISABLE`
2891 Identifies user classes that you do not want the Icecream distributed
2892 compile support to consider. This variable is used by the
2893 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2894 your ``local.conf`` file.
2895
2896 When you list classes using this variable, the recipes inheriting
2897 those classes will not benefit from distributed compilation across
2898 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002899
Andrew Geisslerf0343792020-11-18 10:42:21 -06002900 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002901 Disables or enables the ``icecc`` (Icecream) function. For more
2902 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00002903 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002904 section.
2905
2906 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002907 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002908
2909 ICECC_DISABLED ??= "1"
2910
Andrew Geisslerc926e172021-05-07 16:11:35 -05002911 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002912
2913 ICECC_DISABLED = ""
2914
Andrew Geisslerf0343792020-11-18 10:42:21 -06002915 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002916 Points to the ``icecc-create-env`` script that you provide. This
2917 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2918 set this variable in your ``local.conf`` file.
2919
2920 If you do not point to a script that you provide, the OpenEmbedded
2921 build system uses the default script provided by the
2922 ``icecc-create-env.bb`` recipe, which is a modified version and not
2923 the one that comes with ``icecc``.
2924
Andrew Geisslerf0343792020-11-18 10:42:21 -06002925 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002926 Extra options passed to the ``make`` command during the
2927 :ref:`ref-tasks-compile` task that specify parallel
2928 compilation. This variable usually takes the form of "-j x", where x
2929 represents the maximum number of parallel threads ``make`` can run.
2930
2931 .. note::
2932
2933 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002934 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002935
2936 If your enabled machines support multiple cores, coming up with the
2937 maximum number of parallel threads that gives you the best
2938 performance could take some experimentation since machine speed,
2939 network lag, available memory, and existing machine loads can all
2940 affect build time. Consequently, unlike the
2941 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05002942 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002943 performance.
2944
Andrew Geissler09036742021-06-25 14:25:14 -05002945 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002946 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05002947 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002948
Andrew Geisslerf0343792020-11-18 10:42:21 -06002949 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002950 The location of the ``icecc`` binary. You can set this variable in
2951 your ``local.conf`` file. If your ``local.conf`` file does not define
2952 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2953 to define it by locating ``icecc`` using ``which``.
2954
Andrew Geissler9aee5002022-03-30 16:27:02 +00002955 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002956 Identifies user recipes that you do not want the Icecream distributed
2957 compile support to consider. This variable is used by the
2958 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2959 your ``local.conf`` file.
2960
Andrew Geissler595f6302022-01-24 19:11:47 +00002961 When you list recipes using this variable, you are excluding them
2962 from distributed compilation across remote hosts. Instead they will
2963 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002964
Andrew Geissler9aee5002022-03-30 16:27:02 +00002965 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002966 Identifies user recipes that use an empty
2967 :term:`PARALLEL_MAKE` variable that you want to
2968 force remote distributed compilation on using the Icecream
2969 distributed compile support. This variable is used by the
2970 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2971 your ``local.conf`` file.
2972
Andrew Geisslerf0343792020-11-18 10:42:21 -06002973 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002974 The base name of image output files. This variable defaults to the
2975 recipe name (``${``\ :term:`PN`\ ``}``).
2976
Andrew Geisslerf0343792020-11-18 10:42:21 -06002977 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002978 A space-separated list of files installed into the boot partition
2979 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002980 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002981 the files are
2982 installed under the same name as the source files. To change the
2983 installed name, separate it from the original name with a semi-colon
2984 (;). Source files need to be located in
2985 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05002986 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002987
2988 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2989 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2990
2991 Alternatively, source files can be picked up using a glob pattern. In
2992 this case, the destination file must have the same name as the base
2993 name of the source file path. To install files into a directory
2994 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05002995 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002996
2997 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2998 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
2999
3000 The first example
3001 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3002 into the root of the target partition. The second example installs
3003 the same files into a ``boot`` directory within the target partition.
3004
3005 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003006 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003007 section of the Yocto Project Development Tasks Manual. Reference
3008 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003009 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003010
Andrew Geisslerf0343792020-11-18 10:42:21 -06003011 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003012 A list of classes that all images should inherit. You typically use
3013 this variable to specify the list of classes that register the
3014 different types of images the OpenEmbedded build system creates.
3015
Andrew Geissler09036742021-06-25 14:25:14 -05003016 The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003017 set this variable in your ``local.conf`` or in a distribution
3018 configuration file.
3019
3020 For more information, see ``meta/classes/image_types.bbclass`` in the
3021 :term:`Source Directory`.
3022
Andrew Geisslerf0343792020-11-18 10:42:21 -06003023 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003024 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003025 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003026 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3027 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003028 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003029
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003030 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003031 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003032 ${EXTRA_IMAGECMD}"
3033
3034 You typically do not need to set this variable unless you are adding
3035 support for a new image type. For more examples on how to set this
3036 variable, see the :ref:`image_types <ref-classes-image_types>`
3037 class file, which is ``meta/classes/image_types.bbclass``.
3038
Andrew Geisslerf0343792020-11-18 10:42:21 -06003039 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003040 Specifies one or more files that contain custom device tables that
3041 are passed to the ``makedevs`` command as part of creating an image.
3042 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003043 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003044 ``files/device_table-minimal.txt`` is used, which is located by
3045 :term:`BBPATH`. For details on how you should write
3046 device table files, see ``meta/files/device_table-minimal.txt`` as an
3047 example.
3048
Andrew Geissler9aee5002022-03-30 16:27:02 +00003049 :term:`IMAGE_EFI_BOOT_FILES`
3050 A space-separated list of files installed into the boot partition
3051 when preparing an image using the Wic tool with the
3052 ``bootimg-efi`` source plugin. By default,
3053 the files are
3054 installed under the same name as the source files. To change the
3055 installed name, separate it from the original name with a semi-colon
3056 (;). Source files need to be located in
3057 :term:`DEPLOY_DIR_IMAGE`. Here are two
3058 examples::
3059
3060 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3061 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3062
3063 Alternatively, source files can be picked up using a glob pattern. In
3064 this case, the destination file must have the same name as the base
3065 name of the source file path. To install files into a directory
3066 within the target location, pass its name after a semi-colon (;).
3067 Here are two examples::
3068
3069 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3070 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3071
3072 The first example
3073 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3074 into the root of the target partition. The second example installs
3075 the same files into a ``boot`` directory within the target partition.
3076
3077 You can find information on how to use the Wic tool in the
3078 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
3079 section of the Yocto Project Development Tasks Manual. Reference
3080 material for Wic is located in the
3081 ":doc:`/ref-manual/kickstart`" chapter.
3082
Andrew Geisslerf0343792020-11-18 10:42:21 -06003083 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003084 The primary list of features to include in an image. Typically, you
3085 configure this variable in an image recipe. Although you can use this
3086 variable from your ``local.conf`` file, which is found in the
3087 :term:`Build Directory`, best practices dictate that you do
3088 not.
3089
3090 .. note::
3091
3092 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003093 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003094
3095 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003096 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003097
3098 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06003099 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 -05003100 section in the Yocto Project Development Tasks Manual.
3101
Andrew Geisslerf0343792020-11-18 10:42:21 -06003102 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003103 Specifies the formats the OpenEmbedded build system uses during the
3104 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003105 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003106 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003107
3108 IMAGE_FSTYPES = "ext3 tar.bz2"
3109
3110 For the complete list of supported image formats from which you can
3111 choose, see :term:`IMAGE_TYPES`.
3112
3113 .. note::
3114
3115 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003116 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003117 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003118
3119 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003120 variable, you cannot update its contents by using ``:append``
3121 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003122 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003123
Andrew Geisslerf0343792020-11-18 10:42:21 -06003124 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003125 Used by recipes to specify the packages to install into an image
3126 through the :ref:`image <ref-classes-image>` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003127 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003128
Andrew Geissler09036742021-06-25 14:25:14 -05003129 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003130 install into an image through :ref:`ref-classes-image`. Additionally,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003131 there are "helper" classes such as the
3132 :ref:`core-image <ref-classes-core-image>` class which can
Andrew Geissler09036742021-06-25 14:25:14 -05003133 take lists used with :term:`IMAGE_FEATURES` and turn them into
3134 auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003135 default contents.
3136
Andrew Geisslerc926e172021-05-07 16:11:35 -05003137 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003138
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003139 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003140
3141 Be sure to include the space
3142 between the quotation character and the start of the package name or
3143 names.
3144
3145 .. note::
3146
3147 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003148 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003149 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003150 packages for installation. Instead, use the
3151 :term:`PACKAGE_INSTALL` variable, which
3152 allows the initial RAM filesystem (initramfs) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003153 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003154 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003155 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003156 section in the Yocto Project Development Tasks Manual.
3157
Andrew Geissler09036742021-06-25 14:25:14 -05003158 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003159 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003160 BitBake operator within the ``/conf/local.conf`` file or from
3161 within an image recipe is not recommended. Use of this operator
3162 in these ways can cause ordering issues. Since
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003163 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003164 value using the
3165 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003166 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003167 results in unexpected behavior when used within
3168 ``conf/local.conf``. Furthermore, the same operation from
3169 within an image recipe may or may not succeed depending on the
3170 specific situation. In both these cases, the behavior is
3171 contrary to how most users expect the ``+=`` operator to work.
3172
Andrew Geisslerf0343792020-11-18 10:42:21 -06003173 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003174 Specifies the list of locales to install into the image during the
3175 root filesystem construction process. The OpenEmbedded build system
3176 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003177 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003178 ensures that any locale packages that correspond to packages already
3179 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003180 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003181
3182 IMAGE_LINGUAS = "pt-br de-de"
3183
3184 In this example, the build system ensures any Brazilian Portuguese
3185 and German locale files that correspond to packages in the image are
3186 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3187 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3188 only provide locale files by language and not by country-specific
3189 language).
3190
3191 See the :term:`GLIBC_GENERATE_LOCALES`
3192 variable for information on generating GLIBC locales.
3193
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003194
3195 :term:`IMAGE_LINK_NAME`
3196 The name of the output image symlink (which does not include
3197 the version part as :term:`IMAGE_NAME` does). The default value
3198 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003199 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003200
3201 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3202
3203
Andrew Geisslerf0343792020-11-18 10:42:21 -06003204 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003205 The manifest file for the image. This file lists all the installed
3206 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003207 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003208
3209 packagename packagearch version
3210
Andrew Geissler09036742021-06-25 14:25:14 -05003211 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003212 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003213
Andrew Geissler09036742021-06-25 14:25:14 -05003214 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003215
3216 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003217 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003218 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003219 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003220 section in the Yocto Project Overview and Concepts Manual.
3221
Andrew Geisslerf0343792020-11-18 10:42:21 -06003222 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003223 The name of the output image files minus the extension. This variable
3224 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003225 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003226 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003227
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003228 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3229
3230 :term:`IMAGE_NAME_SUFFIX`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003231 Suffix used for the image output filename - defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003232 to distinguish the image file from other files created during image
3233 building; however if this suffix is redundant or not desired you can
3234 clear the value of this variable (set the value to ""). For example,
3235 this is typically cleared in initramfs image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003236
Andrew Geisslerf0343792020-11-18 10:42:21 -06003237 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003238 Defines a multiplier that the build system applies to the initial
3239 image size for cases when the multiplier times the returned disk
3240 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003241 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003242 the multiplier applied to the initial image size creates free disk
3243 space in the image as overhead. By default, the build process uses a
3244 multiplier of 1.3 for this variable. This default value results in
3245 30% free disk space added to the image when this method is used to
3246 determine the final generated image size. You should be aware that
3247 post install scripts and the package management system uses disk
3248 space inside this overhead area. Consequently, the multiplier does
3249 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003250 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003251 determines the overall image size.
3252
3253 The default 30% free disk space typically gives the image enough room
3254 to boot and allows for basic post installs while still leaving a
3255 small amount of free disk space. If 30% free space is inadequate, you
3256 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003257 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003258
3259 IMAGE_OVERHEAD_FACTOR = "1.5"
3260
3261 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003262 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003263 variable.
3264
Andrew Geisslerf0343792020-11-18 10:42:21 -06003265 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003266 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3267 OpenEmbedded build system. The variable is defined appropriately by
3268 the :ref:`package_deb <ref-classes-package_deb>`,
3269 :ref:`package_rpm <ref-classes-package_rpm>`,
3270 :ref:`package_ipk <ref-classes-package_ipk>`, or
3271 :ref:`package_tar <ref-classes-package_tar>` class.
3272
3273 .. note::
3274
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003275 The ``package_tar`` class is broken and is not supported. It is
3276 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003277
3278 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
Andrew Geissler09036742021-06-25 14:25:14 -05003279 :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003280 for packaging up images and SDKs.
3281
Andrew Geissler09036742021-06-25 14:25:14 -05003282 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003283 variable is set indirectly through the appropriate
3284 :ref:`package_* <ref-classes-package>` class using the
3285 :term:`PACKAGE_CLASSES` variable. The
3286 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3287 or IPK) that appears with the variable
3288
3289 .. note::
3290
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003291 Files using the ``.tar`` format are never used as a substitute
3292 packaging format for DEB, RPM, and IPK formatted files for your image
3293 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003294
Andrew Geisslerf0343792020-11-18 10:42:21 -06003295 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003296 Specifies a list of functions to call once the OpenEmbedded build
3297 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003298 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003299
3300 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3301
3302 If you need to pass the root filesystem path to a command within the
3303 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3304 directory that becomes the root filesystem image. See the
3305 :term:`IMAGE_ROOTFS` variable for more
3306 information.
3307
Andrew Geisslerf0343792020-11-18 10:42:21 -06003308 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003309 Specifies a list of functions to call before the OpenEmbedded build
3310 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003311 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003312
3313 IMAGE_PREPROCESS_COMMAND += "function; ... "
3314
3315 If you need to pass the root filesystem path to a command within the
3316 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3317 directory that becomes the root filesystem image. See the
3318 :term:`IMAGE_ROOTFS` variable for more
3319 information.
3320
Andrew Geisslerf0343792020-11-18 10:42:21 -06003321 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003322 The location of the root filesystem while it is under construction
3323 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3324 variable is not configurable. Do not change it.
3325
Andrew Geisslerf0343792020-11-18 10:42:21 -06003326 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003327 Specifies the alignment for the output image file in Kbytes. If the
3328 size of the image is not a multiple of this value, then the size is
3329 rounded up to the nearest multiple of the value. The default value is
3330 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3331 additional information.
3332
Andrew Geisslerf0343792020-11-18 10:42:21 -06003333 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003334 Defines additional free disk space created in the image in Kbytes. By
3335 default, this variable is set to "0". This free disk space is added
3336 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003337 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003338
3339 This variable is particularly useful when you want to ensure that a
3340 specific amount of free disk space is available on a device after an
3341 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003342 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003343
3344 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3345
3346 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003347 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003348
3349 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3350
Andrew Geisslerf0343792020-11-18 10:42:21 -06003351 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003352 Defines the size in Kbytes for the generated image. The OpenEmbedded
3353 build system determines the final size for the generated image using
3354 an algorithm that takes into account the initial disk space used for
3355 the generated image, a requested size for the image, and requested
3356 additional free disk space to be added to the image. Programatically,
3357 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003358 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003359
3360 if (image-du * overhead) < rootfs-size:
3361 internal-rootfs-size = rootfs-size + xspace
3362 else:
3363 internal-rootfs-size = (image-du * overhead) + xspace
3364 where:
3365 image-du = Returned value of the du command on the image.
3366 overhead = IMAGE_OVERHEAD_FACTOR
3367 rootfs-size = IMAGE_ROOTFS_SIZE
3368 internal-rootfs-size = Initial root filesystem size before any modifications.
3369 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3370
3371 See the :term:`IMAGE_OVERHEAD_FACTOR`
3372 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3373 variables for related information.
3374
Andrew Geisslerf0343792020-11-18 10:42:21 -06003375 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003376 Specifies a dependency from one image type on another. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05003377 example from the :ref:`image-live <ref-classes-image-live>` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003378
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003379 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003380
3381 In the previous example, the variable ensures that when "live" is
3382 listed with the :term:`IMAGE_FSTYPES` variable,
3383 the OpenEmbedded build system produces an ``ext3`` image first since
3384 one of the components of the live image is an ``ext3`` formatted
3385 partition containing the root filesystem.
3386
Andrew Geisslerf0343792020-11-18 10:42:21 -06003387 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003388 Specifies the complete list of supported image types by default:
3389
3390 - btrfs
3391 - container
3392 - cpio
3393 - cpio.gz
3394 - cpio.lz4
3395 - cpio.lzma
3396 - cpio.xz
3397 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003398 - erofs
3399 - erofs-lz4
3400 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003401 - ext2
3402 - ext2.bz2
3403 - ext2.gz
3404 - ext2.lzma
3405 - ext3
3406 - ext3.gz
3407 - ext4
3408 - ext4.gz
3409 - f2fs
3410 - hddimg
3411 - iso
3412 - jffs2
3413 - jffs2.sum
3414 - multiubi
3415 - squashfs
3416 - squashfs-lz4
3417 - squashfs-lzo
3418 - squashfs-xz
3419 - tar
3420 - tar.bz2
3421 - tar.gz
3422 - tar.lz4
3423 - tar.xz
3424 - tar.zst
3425 - ubi
3426 - ubifs
3427 - wic
3428 - wic.bz2
3429 - wic.gz
3430 - wic.lzma
3431
3432 For more information about these types of images, see
3433 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3434
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003435 :term:`IMAGE_VERSION_SUFFIX`
3436 Version suffix that is part of the default :term:`IMAGE_NAME` and
3437 :term:`KERNEL_ARTIFACT_NAME` values.
3438 Defaults to ``"-${DATETIME}"``, however you could set this to a
3439 version string that comes from your external build environment if
3440 desired, and this suffix would then be used consistently across
3441 the build artifacts.
3442
Andrew Geissler09036742021-06-25 14:25:14 -05003443 :term:`IMGDEPLOYDIR`
3444 When inheriting the :ref:`image <ref-classes-image>` class directly or
3445 through the :ref:`core-image <ref-classes-core-image>` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003446 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003447 that is set in the ``image`` class as follows::
3448
3449 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3450
3451 Recipes inheriting the ``image`` class should copy files to be
Andrew Geissler5f350902021-07-23 13:09:54 -04003452 deployed into :term:`IMGDEPLOYDIR`, and the class will take care of
Andrew Geissler09036742021-06-25 14:25:14 -05003453 copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3454
Andrew Geisslerf0343792020-11-18 10:42:21 -06003455 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003456 Helps define the recipe revision for recipes that share a common
3457 ``include`` file. You can think of this variable as part of the
3458 recipe revision as set from within an include file.
3459
3460 Suppose, for example, you have a set of recipes that are used across
3461 several projects. And, within each of those recipes the revision (its
3462 :term:`PR` value) is set accordingly. In this case, when
3463 the revision of those recipes changes, the burden is on you to find
3464 all those recipes and be sure that they get changed to reflect the
3465 updated version of the recipe. In this scenario, it can get
3466 complicated when recipes that are used in many places and provide
3467 common functionality are upgraded to a new revision.
3468
3469 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003470 :term:`INC_PR` variable inside the ``include`` files that the recipes
3471 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003472 help define the recipe revision.
3473
3474 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003475 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003476 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003477 can use the variable to set the :term:`PR` values in each recipe. You
3478 will notice that when you set a recipe's :term:`PR` you can provide more
3479 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003480
3481 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3482 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3483 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3484 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3485
3486 The
3487 first line of the example establishes the baseline revision to be
3488 used for all recipes that use the ``include`` file. The remaining
3489 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003490 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003491
Andrew Geisslerf0343792020-11-18 10:42:21 -06003492 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003493 Specifies a space-separated list of license names (as they would
3494 appear in :term:`LICENSE`) that should be excluded
3495 from the build. Recipes that provide no alternatives to listed
3496 incompatible licenses are not built. Packages that are individually
3497 licensed with the specified incompatible licenses will be deleted.
3498
3499 .. note::
3500
3501 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003502 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003503
Andrew Geissler9aee5002022-03-30 16:27:02 +00003504 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003505
3506
3507 Although you can use other settings, you might be required to
3508 remove dependencies on or provide alternatives to components that
3509 are required to produce a functional system image.
3510
3511 .. note::
3512
3513 It is possible to define a list of licenses that are allowed to be
3514 used instead of the licenses that are excluded. To do this, define
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003515 a variable ``COMPATIBLE_LICENSES`` with the names of the licenses
Andrew Geissler09036742021-06-25 14:25:14 -05003516 that are allowed. Then define :term:`INCOMPATIBLE_LICENSE` as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003517
3518 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
3519
3520
Andrew Geissler09036742021-06-25 14:25:14 -05003521 This will result in :term:`INCOMPATIBLE_LICENSE` containing the names of
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003522 all licenses from :term:`AVAILABLE_LICENSES` except the ones specified
3523 in ``COMPATIBLE_LICENSES``, thus only allowing the latter licenses to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003524 be used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003525
Andrew Geisslerf0343792020-11-18 10:42:21 -06003526 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003527 Causes the named class or classes to be inherited globally. Anonymous
3528 functions in the class or classes are not executed for the base
3529 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003530 system ignores changes to :term:`INHERIT` in individual recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003531
Andrew Geissler09036742021-06-25 14:25:14 -05003532 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003533 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3534 section in the Bitbake User Manual.
3535
Andrew Geisslerf0343792020-11-18 10:42:21 -06003536 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003537 Lists classes that will be inherited at the distribution level. It is
3538 unlikely that you want to edit this variable.
3539
3540 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003541 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003542
3543 INHERIT_DISTRO ?= "debian devshell sstate license"
3544
Andrew Geisslerf0343792020-11-18 10:42:21 -06003545 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003546 Prevents the default dependencies, namely the C compiler and standard
3547 C library (libc), from being added to :term:`DEPENDS`.
3548 This variable is usually used within recipes that do not require any
3549 compilation using the C compiler.
3550
3551 Set the variable to "1" to prevent the default dependencies from
3552 being added.
3553
Andrew Geisslerf0343792020-11-18 10:42:21 -06003554 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003555 Prevents the OpenEmbedded build system from splitting out debug
3556 information during packaging. By default, the build system splits out
3557 debugging information during the
3558 :ref:`ref-tasks-package` task. For more information on
3559 how debug information is split out, see the
3560 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3561 variable.
3562
3563 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003564 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003565 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003566
3567 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3568
Andrew Geisslerf0343792020-11-18 10:42:21 -06003569 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003570 If set to "1", causes the build to not strip binaries in resulting
3571 packages and prevents the ``-dbg`` package from containing the source
3572 files.
3573
3574 By default, the OpenEmbedded build system strips binaries and puts
3575 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003576 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003577 plan to debug in general.
3578
Andrew Geisslerf0343792020-11-18 10:42:21 -06003579 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003580 If set to "1", causes the build to not strip binaries in the
3581 resulting sysroot.
3582
3583 By default, the OpenEmbedded build system strips binaries in the
3584 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003585 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003586 this stripping.
3587
3588 If you want to use this variable, include the
3589 :ref:`staging <ref-classes-staging>` class. This class uses a
3590 ``sys_strip()`` function to test for the variable and acts
3591 accordingly.
3592
3593 .. note::
3594
Andrew Geissler09036742021-06-25 14:25:14 -05003595 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003596 special circumstances. For example, suppose you are building
3597 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003598 even if the toolchain's binaries are strippable, there are other files
3599 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003600
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003601 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
3602 Indicates the deploy directory used by ``do_bundle_initramfs`` where the
3603 :term:`INITRAMFS_IMAGE` will be fetched from.
3604 This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the
3605 :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed
3606 when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`.
3607
Andrew Geisslerf0343792020-11-18 10:42:21 -06003608 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003609 Defines the format for the output image of an initial RAM filesystem
3610 (initramfs), which is used during boot. Supported formats are the
3611 same as those supported by the
3612 :term:`IMAGE_FSTYPES` variable.
3613
3614 The default value of this variable, which is set in the
3615 ``meta/conf/bitbake.conf`` configuration file in the
3616 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3617 initramfs mechanism, as opposed to the initial RAM filesystem
3618 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3619 an optionally compressed cpio archive.
3620
Andrew Geisslerf0343792020-11-18 10:42:21 -06003621 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003622 Specifies the :term:`PROVIDES` name of an image
3623 recipe that is used to build an initial RAM filesystem (initramfs)
Andrew Geissler09036742021-06-25 14:25:14 -05003624 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003625 additional recipe to be built as a dependency to whatever root
3626 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3627 initramfs image recipe you provide should set
3628 :term:`IMAGE_FSTYPES` to
3629 :term:`INITRAMFS_FSTYPES`.
3630
3631 An initramfs image provides a temporary root filesystem used for
3632 early system initialization (e.g. loading of modules needed to locate
3633 and mount the "real" root filesystem).
3634
3635 .. note::
3636
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003637 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3638 recipe in the :term:`Source Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003639 for an example initramfs recipe. To select this sample recipe as
Andrew Geissler09036742021-06-25 14:25:14 -05003640 the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003641 to "core-image-minimal-initramfs".
3642
3643 You can also find more information by referencing the
3644 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3645 the Source Directory, the :ref:`image <ref-classes-image>` class,
3646 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
Andrew Geissler09036742021-06-25 14:25:14 -05003647 the :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003648
Andrew Geissler09036742021-06-25 14:25:14 -05003649 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003650 initramfs image is built.
3651
3652 For more information, you can also see the
3653 :term:`INITRAMFS_IMAGE_BUNDLE`
3654 variable, which allows the generated image to be bundled inside the
3655 kernel image. Additionally, for information on creating an initramfs
Andrew Geissler09209ee2020-12-13 08:44:15 -06003656 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003657 in the Yocto Project Development Tasks Manual.
3658
Andrew Geisslerf0343792020-11-18 10:42:21 -06003659 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003660 Controls whether or not the image recipe specified by
3661 :term:`INITRAMFS_IMAGE` is run through an
3662 extra pass
3663 (:ref:`ref-tasks-bundle_initramfs`) during
3664 kernel compilation in order to build a single binary that contains
3665 both the kernel image and the initial RAM filesystem (initramfs)
3666 image. This makes use of the
3667 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3668 feature.
3669
3670 .. note::
3671
Patrick Williams93c203f2021-10-06 16:15:23 -05003672 Bundling the initramfs with the kernel conflates the code in the
3673 initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
3674 compatible software may be part of a bundled initramfs.
3675
3676 .. note::
3677
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003678 Using an extra compilation pass to bundle the initramfs avoids a
3679 circular dependency between the kernel recipe and the initramfs
3680 recipe should the initramfs include kernel modules. Should that be
3681 the case, the initramfs recipe depends on the kernel for the
3682 kernel modules, and the kernel depends on the initramfs recipe
3683 since the initramfs is bundled inside the kernel image.
3684
3685 The combined binary is deposited into the ``tmp/deploy`` directory,
3686 which is part of the :term:`Build Directory`.
3687
3688 Setting the variable to "1" in a configuration file causes the
3689 OpenEmbedded build system to generate a kernel image with the
Andrew Geissler09036742021-06-25 14:25:14 -05003690 initramfs specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003691
3692 INITRAMFS_IMAGE_BUNDLE = "1"
3693
3694 By default, the
3695 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05003696 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003697
3698 INITRAMFS_IMAGE_BUNDLE ?= ""
3699
3700 .. note::
3701
Andrew Geissler09036742021-06-25 14:25:14 -05003702 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003703 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003704
3705 See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003706 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003707 file for additional information. Also, for information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06003708 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003709 in the Yocto Project Development Tasks Manual.
3710
Andrew Geisslerf0343792020-11-18 10:42:21 -06003711 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003712 The link name of the initial RAM filesystem image. This variable is
3713 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003714 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003715
3716 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3717
3718 The value of the
3719 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003720 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003721
3722 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3723
3724 See the :term:`MACHINE` variable for additional
3725 information.
3726
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003727 :term:`INITRAMFS_MULTICONFIG`
3728 Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class.
3729
3730 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
3731 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
3732
3733 For more information on how to bundle an initramfs image from a separate
3734 multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`"
3735 section in the Yocto Project Development Tasks Manual.
3736
Andrew Geisslerf0343792020-11-18 10:42:21 -06003737 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003738 The base name of the initial RAM filesystem image. This variable is
3739 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003740 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003741
3742 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3743
3744 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003745 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003746
3747 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3748
Andrew Geisslerf0343792020-11-18 10:42:21 -06003749 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003750 Indicates list of filesystem images to concatenate and use as an
3751 initial RAM disk (``initrd``).
3752
Andrew Geissler09036742021-06-25 14:25:14 -05003753 The :term:`INITRD` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003754 :ref:`image-live <ref-classes-image-live>` class.
3755
Andrew Geisslerf0343792020-11-18 10:42:21 -06003756 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003757 When building a "live" bootable image (i.e. when
3758 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05003759 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003760 provide the initial RAM disk image. The default value is
3761 "core-image-minimal-initramfs".
3762
3763 See the :ref:`image-live <ref-classes-image-live>` class for more
3764 information.
3765
Andrew Geisslerf0343792020-11-18 10:42:21 -06003766 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003767 The filename of the initialization script as installed to
3768 ``${sysconfdir}/init.d``.
3769
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003770 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003771 The variable is mandatory.
3772
Andrew Geisslerf0343792020-11-18 10:42:21 -06003773 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003774 A list of the packages that contain initscripts. If multiple packages
3775 are specified, you need to append the package name to the other
3776 ``INITSCRIPT_*`` as an override.
3777
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003778 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003779 The variable is optional and defaults to the :term:`PN`
3780 variable.
3781
Andrew Geisslerf0343792020-11-18 10:42:21 -06003782 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003783 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003784
3785 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3786
3787 In this example, the script has a runlevel of 99, starts the script
3788 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3789
3790 The variable's default value is "defaults", which is set in the
3791 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3792
Andrew Geissler09036742021-06-25 14:25:14 -05003793 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003794 ``update-rc.d`` command. For more information on valid parameters,
3795 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003796 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003797
Andrew Geisslerf0343792020-11-18 10:42:21 -06003798 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003799 Specifies the QA checks to skip for a specific package within a
3800 recipe. For example, to skip the check for symbolic link ``.so``
3801 files in the main package of a recipe, add the following to the
3802 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05003803 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003804
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003805 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003806
Andrew Geissler595f6302022-01-24 19:11:47 +00003807 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003808 list of the valid QA checks you can specify using this variable.
3809
Andrew Geisslerf0343792020-11-18 10:42:21 -06003810 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003811 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05003812 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003813 configuration level to disable this behavior.
3814
Andrew Geisslerf0343792020-11-18 10:42:21 -06003815 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003816 When the IPK backend is in use and package management is enabled on
3817 the target, you can use this variable to set up ``opkg`` in the
3818 target image to point to package feeds on a nominated server. Once
3819 the feed is established, you can perform installations or upgrades
3820 using the package manager at runtime.
3821
Andrew Geisslerf0343792020-11-18 10:42:21 -06003822 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003823 Defines the kernel architecture used when assembling the
3824 configuration. Architectures supported for this release are:
3825
3826 - powerpc
3827 - i386
3828 - x86_64
3829 - arm
3830 - qemu
3831 - mips
3832
Andrew Geissler5f350902021-07-23 13:09:54 -04003833 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003834
Andrew Geisslerf0343792020-11-18 10:42:21 -06003835 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003836 A regular expression used by the build process to explicitly identify
3837 the kernel branch that is validated, patched, and configured during a
3838 build. You must set this variable to ensure the exact kernel branch
3839 you want is being used by the build process.
3840
3841 Values for this variable are set in the kernel's recipe file and the
3842 kernel's append file. For example, if you are using the
3843 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05003844 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003845 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003846
3847 KBRANCH ?= "standard/base"
3848
3849 This variable is also used from the kernel's append file to identify
3850 the kernel branch specific to a particular machine or target
3851 hardware. Continuing with the previous kernel example, the kernel's
3852 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3853 BSP layer for a given machine. For example, the append file for the
3854 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3855 machines (``meta-yocto-bsp``) is named
3856 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05003857 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003858
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003859 KBRANCH:genericx86 = "standard/base"
3860 KBRANCH:genericx86-64 = "standard/base"
3861 KBRANCH:edgerouter = "standard/edgerouter"
3862 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003863
Andrew Geissler09036742021-06-25 14:25:14 -05003864 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003865 identify the kernel branch to use when building for each supported
3866 BSP.
3867
Andrew Geisslerf0343792020-11-18 10:42:21 -06003868 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003869 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3870 class, specifies an "in-tree" kernel configuration file for use
3871 during a kernel build.
3872
3873 Typically, when using a ``defconfig`` to configure a kernel during a
3874 build, you place the file in your layer in the same manner as you
3875 would place patch files and configuration fragment files (i.e.
3876 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3877 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05003878 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003879 :term:`KMACHINE` variable to point to the
3880 ``defconfig`` file.
3881
3882 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05003883 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003884
3885 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3886
Andrew Geissler09036742021-06-25 14:25:14 -05003887 Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05003888 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003889
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003890 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003891
Andrew Geisslerc926e172021-05-07 16:11:35 -05003892 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003893
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003894 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003895
3896 For more
Andrew Geissler09036742021-06-25 14:25:14 -05003897 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003898 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003899 section in the Yocto Project Linux Kernel Development Manual.
3900
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003901 :term:`KCONFIG_MODE`
3902 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3903 class, specifies the kernel configuration values to use for options
3904 not specified in the provided ``defconfig`` file. Valid options are::
3905
3906 KCONFIG_MODE = "alldefconfig"
3907 KCONFIG_MODE = "allnoconfig"
3908
3909 In ``alldefconfig`` mode the options not explicitly specified will be
3910 assigned their Kconfig default value. In ``allnoconfig`` mode the
3911 options not explicitly specified will be disabled in the kernel
3912 config.
3913
Andrew Geissler09036742021-06-25 14:25:14 -05003914 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003915 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3916 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3917 in ``${WORKDIR}`` through a meta-layer will be handled in
3918 ``allnoconfig`` mode.
3919
3920 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05003921 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003922 be explicitly set.
3923
3924 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
3925 generated by copying the ``.config`` file from a working Linux kernel
3926 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05003927 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003928 not need to be explicitly set.
3929
3930 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
3931 generated using the
3932 :ref:`ref-tasks-savedefconfig`
3933 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05003934 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003935
3936 KCONFIG_MODE = "alldefconfig"
3937
3938
Andrew Geisslerf0343792020-11-18 10:42:21 -06003939 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003940 Specifies an alternate kernel image type for creation in addition to
3941 the kernel image type specified using the
3942 :term:`KERNEL_IMAGETYPE` variable.
3943
Andrew Geisslerf0343792020-11-18 10:42:21 -06003944 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003945 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05003946 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003947 variable.
3948
Andrew Geissler09036742021-06-25 14:25:14 -05003949 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003950 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003951 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003952
3953 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3954
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003955 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
3956 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003957
Andrew Geisslerf0343792020-11-18 10:42:21 -06003958 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003959 A list of classes defining kernel image types that the
3960 :ref:`kernel <ref-classes-kernel>` class should inherit. You
3961 typically append this variable to enable extended image types. An
3962 example is the "kernel-fitimage", which enables fitImage support and
3963 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
Andrew Geissler595f6302022-01-24 19:11:47 +00003964 custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003965 variable.
3966
Andrew Geisslerf0343792020-11-18 10:42:21 -06003967 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003968 Specifies the name of the generated Linux kernel device tree (i.e.
3969 the ``.dtb``) file.
3970
3971 .. note::
3972
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003973 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003974 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003975
3976 In order to use this variable, the
3977 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3978 be inherited.
3979
Andrew Geisslerf0343792020-11-18 10:42:21 -06003980 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003981 The link name of the kernel device tree binary (DTB). This variable
3982 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003983 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003984
3985 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3986
3987 The
3988 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05003989 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003990
3991 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3992
3993 See the :term:`MACHINE` variable for additional
3994 information.
3995
Andrew Geisslerf0343792020-11-18 10:42:21 -06003996 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003997 The base name of the kernel device tree binary (DTB). This variable
3998 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003999 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004000
4001 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4002
4003 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004004 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004005
4006 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4007
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004008 :term:`KERNEL_DTC_FLAGS`
4009 Specifies the ``dtc`` flags that are passed to the Linux kernel build
4010 system when generating the device trees (via ``DTC_FLAGS`` environment
4011 variable).
4012
4013 In order to use this variable, the
4014 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4015 be inherited.
4016
Andrew Geisslerf0343792020-11-18 10:42:21 -06004017 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004018 Specifies additional ``make`` command-line arguments the OpenEmbedded
4019 build system passes on when compiling the kernel.
4020
Andrew Geisslerf0343792020-11-18 10:42:21 -06004021 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004022 Includes additional kernel metadata. In the OpenEmbedded build
4023 system, the default Board Support Packages (BSPs)
4024 :term:`Metadata` is provided through the
4025 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004026 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004027 the kernel recipe or kernel append file to further add metadata for
4028 all BSPs or specific BSPs.
4029
4030 The metadata you add through this variable includes config fragments
4031 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004032 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004033 variable for a specific machine. In this way, you can provide
4034 validated, but optional, sets of kernel configurations and features.
4035
4036 For example, the following example from the ``linux-yocto-rt_4.12``
4037 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4038 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004039 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004040
4041 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004042 KERNEL_FEATURES:append = "${KERNEL_EXTRA_FEATURES}"
4043 KERNEL_FEATURES:append:qemuall = "cfg/virtio.scc"
4044 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4045 KERNEL_FEATURES:append:qemux86-64 = "cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004046
Andrew Geisslerf0343792020-11-18 10:42:21 -06004047 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004048 The link name of the kernel flattened image tree (FIT) image. This
4049 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004050 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004051
4052 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4053
4054 The value of the
4055 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004056 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004057
4058 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4059
4060 See the :term:`MACHINE` variable for additional
4061 information.
4062
Andrew Geisslerf0343792020-11-18 10:42:21 -06004063 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004064 The base name of the kernel flattened image tree (FIT) image. This
4065 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004066 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004067
4068 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4069
4070 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004071 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004072
4073 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4074
Andrew Geisslerf0343792020-11-18 10:42:21 -06004075 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004076 The link name for the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004077 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004078
4079 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4080
4081 The value of
4082 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004083 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004084
4085 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4086
4087 See the :term:`MACHINE` variable for additional
4088 information.
4089
Andrew Geisslerf0343792020-11-18 10:42:21 -06004090 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004091 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004092 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004093 checked against the set value during the
4094 :ref:`ref-tasks-sizecheck` task. The task fails if
4095 the kernel image file is larger than the setting.
4096
Andrew Geissler09036742021-06-25 14:25:14 -05004097 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004098 limited amount of space in which the kernel image must be stored.
4099
4100 By default, this variable is not set, which means the size of the
4101 kernel image is not checked.
4102
Andrew Geisslerf0343792020-11-18 10:42:21 -06004103 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004104 The base name of the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004105 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004106
4107 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4108
4109 The value of the
4110 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004111 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004112
4113 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4114
Andrew Geisslerf0343792020-11-18 10:42:21 -06004115 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004116 The type of kernel to build for a device, usually set by the machine
4117 configuration files and defaults to "zImage". This variable is used
4118 when building the kernel and is passed to ``make`` as the target to
4119 build.
4120
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004121 If you want to build an alternate kernel image type in addition to that
Andrew Geissler09036742021-06-25 14:25:14 -05004122 specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004123 variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004124
Andrew Geisslerf0343792020-11-18 10:42:21 -06004125 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004126 Lists kernel modules that need to be auto-loaded during boot.
4127
4128 .. note::
4129
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004130 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004131 variable.
4132
Andrew Geissler09036742021-06-25 14:25:14 -05004133 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004134 can be recognized by the kernel recipe or by an out-of-tree kernel
4135 module recipe (e.g. a machine configuration file, a distribution
4136 configuration file, an append file for the recipe, or the recipe
4137 itself).
4138
Andrew Geisslerc926e172021-05-07 16:11:35 -05004139 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004140
4141 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4142
Andrew Geissler09036742021-06-25 14:25:14 -05004143 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004144 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4145 the list of modules to be auto-loaded on boot. The modules appear
4146 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004147 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004148
4149 KERNEL_MODULE_AUTOLOAD += "module_name"
4150
4151 For information on how to populate the ``modname.conf`` file with
4152 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4153
Andrew Geisslerf0343792020-11-18 10:42:21 -06004154 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004155 Provides a list of modules for which the OpenEmbedded build system
4156 expects to find ``module_conf_``\ modname values that specify
4157 configuration for each of the modules. For information on how to
4158 provide those module configurations, see the
4159 :term:`module_conf_* <module_conf>` variable.
4160
Andrew Geisslerf0343792020-11-18 10:42:21 -06004161 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004162 The location of the kernel sources. This variable is set to the value
4163 of the :term:`STAGING_KERNEL_DIR` within
4164 the :ref:`module <ref-classes-module>` class. For information on
4165 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004166 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004167 section in the Yocto Project Linux Kernel Development Manual.
4168
4169 To help maximize compatibility with out-of-tree drivers used to build
4170 modules, the OpenEmbedded build system also recognizes and uses the
4171 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004172 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004173 used by external Makefiles to point to the kernel source directory.
4174
Andrew Geisslerf0343792020-11-18 10:42:21 -06004175 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004176 The location of the kernel sources. This variable is set to the value
4177 of the :term:`STAGING_KERNEL_DIR` within
4178 the :ref:`module <ref-classes-module>` class. For information on
4179 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004180 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004181 section in the Yocto Project Linux Kernel Development Manual.
4182
4183 To help maximize compatibility with out-of-tree drivers used to build
4184 modules, the OpenEmbedded build system also recognizes and uses the
4185 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004186 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004187 used by external Makefiles to point to the kernel source directory.
4188
Andrew Geisslerf0343792020-11-18 10:42:21 -06004189 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004190 Specifies the version of the kernel as extracted from ``version.h``
4191 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004192 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004193 configured. Consequently, attempting to refer to this variable in
4194 contexts prior to configuration will not work.
4195
Andrew Geisslerf0343792020-11-18 10:42:21 -06004196 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004197 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004198 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004199 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004200 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004201 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004202 ``initramfs`` recipe. Setting the variable there when the data is not
4203 needed avoids a potential dependency loop.
4204
Andrew Geisslerf0343792020-11-18 10:42:21 -06004205 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004206 Provides a short description of a configuration fragment. You use
4207 this variable in the ``.scc`` file that describes a configuration
4208 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004209 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004210
4211 define KFEATURE_DESCRIPTION "Enable SMP"
4212
Andrew Geisslerf0343792020-11-18 10:42:21 -06004213 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004214 The machine as known by the kernel. Sometimes the machine name used
4215 by the kernel does not match the machine name used by the
4216 OpenEmbedded build system. For example, the machine name that the
4217 OpenEmbedded build system understands as ``core2-32-intel-common``
4218 goes by a different name in the Linux Yocto kernel. The kernel
4219 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004220 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004221 OpenEmbedded build system machine name.
4222
4223 These mappings between different names occur in the Yocto Linux
4224 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004225 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004226
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004227 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4228 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4229 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4230 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4231 KMACHINE:core2-32-intel-common = "intel-core2-32"
4232 KBRANCH:core2-32-intel-common = "standard/base"
4233 KERNEL_FEATURES:append:core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004234
Andrew Geissler09036742021-06-25 14:25:14 -05004235 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004236 that the kernel understands the machine name as "intel-core2-32".
4237 However, the OpenEmbedded build system understands the machine as
4238 "core2-32-intel-common".
4239
Andrew Geisslerf0343792020-11-18 10:42:21 -06004240 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004241 Defines the kernel type to be used in assembling the configuration.
4242 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004243 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004244 section in the
4245 Yocto Project Linux Kernel Development Manual for more information on
4246 kernel types.
4247
Andrew Geissler09036742021-06-25 14:25:14 -05004248 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004249 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004250 value you use must match the value used for the
4251 :term:`LINUX_KERNEL_TYPE` value used by the
4252 kernel recipe.
4253
Andrew Geisslerf0343792020-11-18 10:42:21 -06004254 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004255 Provides a list of targets for automatic configuration.
4256
4257 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4258 information on how this variable is used.
4259
Andrew Geisslerf0343792020-11-18 10:42:21 -06004260 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004261 Lists the layers, separated by spaces, on which this recipe depends.
4262 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004263 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004264
4265 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4266
4267 In this previous example,
4268 version 3 of "anotherlayer" is compared against
4269 :term:`LAYERVERSION`\ ``_anotherlayer``.
4270
4271 An error is produced if any dependency is missing or the version
4272 numbers (if specified) do not match exactly. This variable is used in
4273 the ``conf/layer.conf`` file and must be suffixed with the name of
4274 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4275
Andrew Geisslerf0343792020-11-18 10:42:21 -06004276 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004277 When used inside the ``layer.conf`` configuration file, this variable
4278 provides the path of the current layer. This variable is not
4279 available outside of ``layer.conf`` and references are expanded
4280 immediately when parsing of the file completes.
4281
Andrew Geisslerf0343792020-11-18 10:42:21 -06004282 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004283 Lists the layers, separated by spaces, recommended for use with this
4284 layer.
4285
4286 Optionally, you can specify a specific layer version for a
4287 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004288 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004289
4290 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4291
4292 In this previous example, version 3 of "anotherlayer" is compared
4293 against ``LAYERVERSION_anotherlayer``.
4294
4295 This variable is used in the ``conf/layer.conf`` file and must be
4296 suffixed with the name of the specific layer (e.g.
4297 ``LAYERRECOMMENDS_mylayer``).
4298
Andrew Geisslerf0343792020-11-18 10:42:21 -06004299 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004300 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004301 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004302 allows the layer maintainer to indicate which combinations of the
4303 layer and OE-Core can be expected to work. The variable gives the
4304 system a way to detect when a layer has not been tested with new
4305 releases of OE-Core (e.g. the layer is not maintained).
4306
4307 To specify the OE-Core versions for which a layer is compatible, use
4308 this variable in your layer's ``conf/layer.conf`` configuration file.
4309 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004310 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004311 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004312 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004313
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004314 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004315
4316 .. note::
4317
Andrew Geissler09036742021-06-25 14:25:14 -05004318 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004319 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004320 The OpenEmbedded build system produces a warning if the variable
4321 is not set for any given layer.
4322
Andrew Geissler09209ee2020-12-13 08:44:15 -06004323 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004324 section in the Yocto Project Development Tasks Manual.
4325
Andrew Geisslerf0343792020-11-18 10:42:21 -06004326 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004327 Optionally specifies the version of a layer as a single number. You
4328 can use this within :term:`LAYERDEPENDS` for
4329 another layer in order to depend on a specific version of the layer.
4330 This variable is used in the ``conf/layer.conf`` file and must be
4331 suffixed with the name of the specific layer (e.g.
4332 ``LAYERVERSION_mylayer``).
4333
Andrew Geisslerf0343792020-11-18 10:42:21 -06004334 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004335 The minimal command and arguments used to run the linker.
4336
Andrew Geisslerf0343792020-11-18 10:42:21 -06004337 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004338 Specifies the flags to pass to the linker. This variable is exported
4339 to an environment variable and thus made visible to the software
4340 being built during the compilation step.
4341
Andrew Geissler09036742021-06-25 14:25:14 -05004342 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004343 being built:
4344
4345 - :term:`TARGET_LDFLAGS` when building for the
4346 target
4347
4348 - :term:`BUILD_LDFLAGS` when building for the
4349 build host (i.e. ``-native``)
4350
4351 - :term:`BUILDSDK_LDFLAGS` when building for
4352 an SDK (i.e. ``nativesdk-``)
4353
Andrew Geisslerf0343792020-11-18 10:42:21 -06004354 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004355 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4356 that the :ref:`debian <ref-classes-debian>` class applies its
4357 naming policy to given a recipe that packages multiple libraries.
4358
Andrew Geissler595f6302022-01-24 19:11:47 +00004359 This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004360
Andrew Geisslerf0343792020-11-18 10:42:21 -06004361 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004362 Checksums of the license text in the recipe source code.
4363
4364 This variable tracks changes in license text of the source code
4365 files. If the license text is changed, it will trigger a build
4366 failure, which gives the developer an opportunity to review any
4367 license change.
4368
4369 This variable must be defined for all recipes (unless
4370 :term:`LICENSE` is set to "CLOSED").
4371
Andrew Geissler09209ee2020-12-13 08:44:15 -06004372 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004373 section in the Yocto Project Development Tasks Manual.
4374
Andrew Geisslerf0343792020-11-18 10:42:21 -06004375 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004376 The list of source licenses for the recipe. Follow these rules:
4377
4378 - Do not use spaces within individual license names.
4379
4380 - Separate license names using \| (pipe) when there is a choice
4381 between licenses.
4382
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004383 - Separate license names using & (ampersand) when there are
4384 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004385
4386 - You can use spaces between license names.
4387
4388 - For standard licenses, use the names of the files in
4389 ``meta/files/common-licenses/`` or the
4390 :term:`SPDXLICENSEMAP` flag names defined in
4391 ``meta/conf/licenses.conf``.
4392
Andrew Geisslerc926e172021-05-07 16:11:35 -05004393 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004394
Andrew Geissler9aee5002022-03-30 16:27:02 +00004395 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4396 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4397 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004398
4399 The first example is from the
4400 recipes for Qt, which the user may choose to distribute under either
4401 the LGPL version 2.1 or GPL version 3. The second example is from
4402 Cairo where two licenses cover different parts of the source code.
4403 The final example is from ``sysstat``, which presents a single
4404 license.
4405
4406 You can also specify licenses on a per-package basis to handle
4407 situations where components of the output have different licenses.
4408 For example, a piece of software whose code is licensed under GPLv2
4409 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004410 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004411
Andrew Geissler9aee5002022-03-30 16:27:02 +00004412 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4413 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004414 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004415
Andrew Geisslerf0343792020-11-18 10:42:21 -06004416 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004417 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004418 build system to create an extra package (i.e.
4419 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4420 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004421 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004422
4423 The ``${PN}-lic`` package installs a directory in
4424 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4425 name, and installs files in that directory that contain license and
4426 copyright information (i.e. copies of the appropriate license files
4427 from ``meta/common-licenses`` that match the licenses specified in
4428 the :term:`LICENSE` variable of the recipe metadata
4429 and copies of files marked in
4430 :term:`LIC_FILES_CHKSUM` as containing
4431 license text).
4432
4433 For related information on providing license text, see the
4434 :term:`COPY_LIC_DIRS` variable, the
4435 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004436 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004437 section in the Yocto Project Development Tasks Manual.
4438
Andrew Geisslerf0343792020-11-18 10:42:21 -06004439 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004440 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00004441 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004442 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004443 separate them with spaces.
4444
4445 This value is independent of :term:`LICENSE` and is
4446 typically used to mark recipes that might require additional licenses
4447 in order to be used in a commercial product. For more information,
4448 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004449 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004450 section in the Yocto Project Development Tasks Manual.
4451
Andrew Geissler9aee5002022-03-30 16:27:02 +00004452 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004453 Lists license flags that when specified in
4454 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004455 prevent that recipe from being built. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004456 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004457 section in the Yocto Project Development Tasks Manual.
4458
Andrew Geisslerf0343792020-11-18 10:42:21 -06004459 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004460 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004461 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004462 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004463 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004464 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004465
4466 LICENSE_PATH += "path-to-additional-common-licenses"
4467
Andrew Geisslerf0343792020-11-18 10:42:21 -06004468 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004469 Defines the kernel type to be used in assembling the configuration.
4470 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004471 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004472 section in the
4473 Yocto Project Linux Kernel Development Manual for more information on
4474 kernel types.
4475
Andrew Geissler09036742021-06-25 14:25:14 -05004476 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004477 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004478 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004479 the kernel tools to find the appropriate description within the
4480 kernel :term:`Metadata` with which to build out the sources
4481 and configuration.
4482
Andrew Geisslerf0343792020-11-18 10:42:21 -06004483 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004484 The Linux version from ``kernel.org`` on which the Linux kernel image
4485 being built using the OpenEmbedded build system is based. You define
4486 this variable in the kernel recipe. For example, the
4487 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004488 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004489
4490 LINUX_VERSION ?= "3.4.24"
4491
Andrew Geissler09036742021-06-25 14:25:14 -05004492 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004493 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004494
4495 PV = "${LINUX_VERSION}+git${SRCPV}"
4496
Andrew Geisslerf0343792020-11-18 10:42:21 -06004497 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004498 A string extension compiled into the version string of the Linux
4499 kernel built with the OpenEmbedded build system. You define this
4500 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004501 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004502
4503 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4504
4505 Defining this variable essentially sets the Linux kernel
4506 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4507 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004508 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004509
4510 $ uname -r
4511 3.7.0-rc8-custom
4512
Andrew Geisslerf0343792020-11-18 10:42:21 -06004513 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004514 Specifies the directory to which the OpenEmbedded build system writes
4515 overall log files. The default directory is ``${TMPDIR}/log``.
4516
4517 For the directory containing logs specific to each task, see the
4518 :term:`T` variable.
4519
Andrew Geisslerf0343792020-11-18 10:42:21 -06004520 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004521 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004522 :term:`MACHINE` in the ``local.conf`` file found in the
4523 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004524 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004525 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004526
4527 MACHINE ?= "qemux86"
4528
4529 The variable corresponds to a machine configuration file of the same
4530 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004531 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004532 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004533 the :term:`Source Directory` in
4534 ``meta/conf/machine``.
4535
4536 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004537 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004538
4539 MACHINE ?= "qemuarm"
4540 MACHINE ?= "qemuarm64"
4541 MACHINE ?= "qemumips"
4542 MACHINE ?= "qemumips64"
4543 MACHINE ?= "qemuppc"
4544 MACHINE ?= "qemux86"
4545 MACHINE ?= "qemux86-64"
4546 MACHINE ?= "genericx86"
4547 MACHINE ?= "genericx86-64"
4548 MACHINE ?= "beaglebone"
4549 MACHINE ?= "edgerouter"
4550
4551 The last five are Yocto Project reference hardware
4552 boards, which are provided in the ``meta-yocto-bsp`` layer.
4553
4554 .. note::
4555
4556 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004557 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004558
Andrew Geisslerf0343792020-11-18 10:42:21 -06004559 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004560 Specifies the name of the machine-specific architecture. This
4561 variable is set automatically from :term:`MACHINE` or
4562 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05004563 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004564
Andrew Geisslerf0343792020-11-18 10:42:21 -06004565 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004566 A list of required machine-specific packages to install as part of
4567 the image being built. The build process depends on these packages
4568 being present. Furthermore, because this is a "machine-essential"
4569 variable, the list of packages are essential for the machine to boot.
4570 The impact of this variable affects images based on
4571 ``packagegroup-core-boot``, including the ``core-image-minimal``
4572 image.
4573
4574 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05004575 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004576 that the image being built has a build dependency on the variable's
4577 list of packages. In other words, the image will not build if a file
4578 in this list is not found.
4579
4580 As an example, suppose the machine for which you are building
4581 requires ``example-init`` to be run during boot to initialize the
4582 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05004583 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004584
4585 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4586
Andrew Geisslerf0343792020-11-18 10:42:21 -06004587 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004588 A list of recommended machine-specific packages to install as part of
4589 the image being built. The build process does not depend on these
4590 packages being present. However, because this is a
4591 "machine-essential" variable, the list of packages are essential for
4592 the machine to boot. The impact of this variable affects images based
4593 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4594 image.
4595
Andrew Geissler09036742021-06-25 14:25:14 -05004596 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004597 variable with the exception that the image being built does not have
4598 a build dependency on the variable's list of packages. In other
4599 words, the image will still build if a package in this list is not
4600 found. Typically, this variable is used to handle essential kernel
4601 modules, whose functionality may be selected to be built into the
4602 kernel rather than as a module, in which case a package will not be
4603 produced.
4604
4605 Consider an example where you have a custom kernel where a specific
4606 touchscreen driver is required for the machine to be usable. However,
4607 the driver can be built as a module or into the kernel depending on
4608 the kernel configuration. If the driver is built as a module, you
4609 want it to be installed. But, when the driver is built into the
4610 kernel, you still want the build to succeed. This variable sets up a
4611 "recommends" relationship so that in the latter case, the build will
4612 not fail due to the missing package. To accomplish this, assuming the
4613 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05004614 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004615
4616 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4617
4618 .. note::
4619
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004620 In this example, the ``kernel-module-ab123`` recipe needs to
4621 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4622 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4623 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004624
4625 Some examples of these machine essentials are flash, screen,
4626 keyboard, mouse, or touchscreen drivers (depending on the machine).
4627
Andrew Geisslerf0343792020-11-18 10:42:21 -06004628 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004629 A list of machine-specific packages to install as part of the image
4630 being built that are not essential for the machine to boot. However,
4631 the build process for more fully-featured images depends on the
4632 packages being present.
4633
4634 This variable affects all images based on ``packagegroup-base``,
4635 which does not include the ``core-image-minimal`` or
4636 ``core-image-full-cmdline`` images.
4637
Andrew Geissler09036742021-06-25 14:25:14 -05004638 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004639 with the exception that the image being built has a build dependency
4640 on the variable's list of packages. In other words, the image will
4641 not build if a file in this list is not found.
4642
4643 An example is a machine that has WiFi capability but is not essential
4644 for the machine to boot the image. However, if you are building a
4645 more fully-featured image, you want to enable the WiFi. The package
4646 containing the firmware for the WiFi hardware is always expected to
4647 exist, so it is acceptable for the build process to depend upon
4648 finding the package. In this case, assuming the package for the
4649 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004650 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004651
4652 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4653
Andrew Geisslerf0343792020-11-18 10:42:21 -06004654 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004655 A list of machine-specific packages to install as part of the image
4656 being built that are not essential for booting the machine. The image
4657 being built has no build dependency on this list of packages.
4658
4659 This variable affects only images based on ``packagegroup-base``,
4660 which does not include the ``core-image-minimal`` or
4661 ``core-image-full-cmdline`` images.
4662
Andrew Geissler09036742021-06-25 14:25:14 -05004663 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004664 with the exception that the image being built does not have a build
4665 dependency on the variable's list of packages. In other words, the
4666 image will build if a file in this list is not found.
4667
4668 An example is a machine that has WiFi capability but is not essential
4669 For the machine to boot the image. However, if you are building a
4670 more fully-featured image, you want to enable WiFi. In this case, the
4671 package containing the WiFi kernel module will not be produced if the
4672 WiFi driver is built into the kernel, in which case you still want
4673 the build to succeed instead of failing as a result of the package
4674 not being found. To accomplish this, assuming the package for the
4675 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004676 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004677
4678 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4679
Andrew Geisslerf0343792020-11-18 10:42:21 -06004680 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004681 Specifies the list of hardware features the
4682 :term:`MACHINE` is capable of supporting. For related
4683 information on enabling features, see the
4684 :term:`DISTRO_FEATURES`,
4685 :term:`COMBINED_FEATURES`, and
4686 :term:`IMAGE_FEATURES` variables.
4687
4688 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004689 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004690
Andrew Geisslerf0343792020-11-18 10:42:21 -06004691 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05004692 Features to be added to :term:`MACHINE_FEATURES` if not also present in
4693 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004694
4695 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4696 not intended to be user-configurable. It is best to just reference
4697 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004698 all machine configurations. See the ":ref:`ref-features-backfill`"
4699 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004700
Andrew Geisslerf0343792020-11-18 10:42:21 -06004701 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05004702 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4703 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004704 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004705
Andrew Geisslerf0343792020-11-18 10:42:21 -06004706 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004707 A colon-separated list of overrides that apply to the current
4708 machine. By default, this list includes the value of
4709 :term:`MACHINE`.
4710
Andrew Geissler09036742021-06-25 14:25:14 -05004711 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004712 should apply to a machine. For example, all machines emulated in QEMU
4713 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4714 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05004715 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004716
4717 MACHINEOVERRIDES =. "qemuall:"
4718
4719 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004720 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004721 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004722 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004723
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004724 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004725 file://wired-setup \
4726 "
4727
4728 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05004729 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004730 value of :term:`OVERRIDES`.
4731
Andrew Geisslerf0343792020-11-18 10:42:21 -06004732 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004733 The email address of the distribution maintainer.
4734
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004735 :term:`METADATA_BRANCH`
4736 The branch currently checked out for the OpenEmbedded-Core layer (path
4737 determined by :term:`COREBASE`).
4738
4739 :term:`METADATA_REVISION`
4740 The revision currently checked out for the OpenEmbedded-Core layer (path
4741 determined by :term:`COREBASE`).
4742
Andrew Geisslerf0343792020-11-18 10:42:21 -06004743 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004744 Specifies additional paths from which the OpenEmbedded build system
4745 gets source code. When the build system searches for source code, it
4746 first tries the local download directory. If that location fails, the
4747 build system tries locations defined by
4748 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05004749 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004750
4751 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05004752 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004753 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4754
Andrew Geisslerf0343792020-11-18 10:42:21 -06004755 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004756 Specifies a prefix has been added to :term:`PN` to create a
4757 special version of a recipe or package (i.e. a Multilib version). The
4758 variable is used in places where the prefix needs to be added to or
4759 removed from a the name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05004760 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004761
4762 .. note::
4763
Andrew Geissler09036742021-06-25 14:25:14 -05004764 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004765 historical and comes from a time when ``nativesdk`` was a suffix
4766 rather than a prefix on the recipe name. When ``nativesdk`` was turned
Andrew Geissler09036742021-06-25 14:25:14 -05004767 into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004768
Andrew Geissler09036742021-06-25 14:25:14 -05004769 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004770 :term:`BBCLASSEXTEND` is used to provide a
4771 ``nativesdk`` version of a recipe in addition to the target version.
4772 If that recipe declares build-time dependencies on tasks in other
4773 recipes by using :term:`DEPENDS`, then a dependency on
4774 "foo" will automatically get rewritten to a dependency on
4775 "nativesdk-foo". However, dependencies like the following will not
Andrew Geisslerc926e172021-05-07 16:11:35 -05004776 get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004777
4778 do_foo[depends] += "recipe:do_foo"
4779
4780 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004781 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004782
4783 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4784
Andrew Geissler09036742021-06-25 14:25:14 -05004785 :term:`module_autoload`
4786 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04004787 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05004788 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004789
4790 module_autoload_rfcomm = "rfcomm"
4791
Andrew Geisslerc926e172021-05-07 16:11:35 -05004792 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004793
4794 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4795
4796 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4797
Andrew Geissler09036742021-06-25 14:25:14 -05004798 :term:`module_conf`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004799 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004800 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4801 file.
4802
4803 You can use this variable anywhere that it can be recognized by the
4804 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4805 configuration file, a distribution configuration file, an append file
4806 for the recipe, or the recipe itself). If you use this variable, you
4807 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00004808 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004809 variable.
4810
Andrew Geisslerc926e172021-05-07 16:11:35 -05004811 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004812
4813 module_conf_module_name = "modprobe.d-syntax"
4814
4815 You must use the kernel module name override.
4816
4817 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04004818 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004819
Andrew Geissler5f350902021-07-23 13:09:54 -04004820 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004821 populate the ``/etc/modprobe.d/modname.conf`` file with
4822 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05004823 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004824
4825 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4826
4827 For information on how to specify kernel modules to auto-load on
4828 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4829
Andrew Geisslerf0343792020-11-18 10:42:21 -06004830 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004831 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4832 "0" to disable creation of this file, which contains all of the
4833 kernel modules resulting from a kernel build.
4834
Andrew Geisslerf0343792020-11-18 10:42:21 -06004835 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004836 The link name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004837 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004838
4839 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4840
4841 The value
4842 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004843 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004844
4845 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4846
4847 See the :term:`MACHINE` variable for additional information.
4848
Andrew Geisslerf0343792020-11-18 10:42:21 -06004849 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004850 The base name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004851 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004852
4853 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4854
4855 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004856 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004857
4858 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4859
Andrew Geisslerf0343792020-11-18 10:42:21 -06004860 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004861 Uniquely identifies the type of the target system for which packages
4862 are being built. This variable allows output for different types of
4863 target systems to be put into different subdirectories of the same
4864 output directory.
4865
Andrew Geisslerc926e172021-05-07 16:11:35 -05004866 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004867
4868 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4869
4870 Some classes (e.g.
4871 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05004872 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004873
4874 See the :term:`STAMP` variable for an example. See the
4875 :term:`STAGING_DIR_TARGET` variable for more information.
4876
Andrew Geisslerf0343792020-11-18 10:42:21 -06004877 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004878 A string identifying the host distribution. Strings consist of the
4879 host distributor ID followed by the release, as reported by the
4880 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4881 example, when running a build on Ubuntu 12.10, the value is
4882 "Ubuntu-12.10". If this information is unable to be determined, the
4883 value resolves to "Unknown".
4884
4885 This variable is used by default to isolate native shared state
4886 packages for different distributions (e.g. to avoid problems with
4887 ``glibc`` version incompatibilities). Additionally, the variable is
4888 checked against
4889 :term:`SANITY_TESTED_DISTROS` if that
4890 variable is set.
4891
Andrew Geisslerf0343792020-11-18 10:42:21 -06004892 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004893 The minimal command and arguments to run ``nm``.
4894
Andrew Geisslerf0343792020-11-18 10:42:21 -06004895 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004896 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004897 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004898 licenses that are not in any way common. Also, new licenses are added
4899 occasionally to avoid introducing a lot of common license files,
4900 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05004901 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004902 not exist in common licenses.
4903
Andrew Geissler09036742021-06-25 14:25:14 -05004904 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004905 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004906
4907 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4908
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004909 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004910 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05004911 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004912
4913 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4914
Andrew Geisslerf0343792020-11-18 10:42:21 -06004915 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004916 Prevents installation of all "recommended-only" packages.
4917 Recommended-only packages are packages installed only through the
4918 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05004919 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004920
4921 NO_RECOMMENDATIONS = "1"
4922
4923 You can set this variable globally in your ``local.conf`` file or you
4924 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05004925 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004926
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004927 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004928
4929 It is important to realize that if you choose to not install packages
4930 using this variable and some other packages are dependent on them
4931 (i.e. listed in a recipe's :term:`RDEPENDS`
4932 variable), the OpenEmbedded build system ignores your request and
4933 will install the packages to avoid dependency errors.
4934
4935 .. note::
4936
4937 Some recommended packages might be required for certain system
4938 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004939 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004940
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004941 This variable is only supported when using the IPK and RPM
4942 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004943
4944 See the :term:`BAD_RECOMMENDATIONS` and
4945 the :term:`PACKAGE_EXCLUDE` variables for
4946 related information.
4947
Andrew Geisslerf0343792020-11-18 10:42:21 -06004948 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004949 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004950 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05004951 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004952 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004953
4954 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004955 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
4956 FILES:${PN}-dbg = "/usr/src/debug/"
4957 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004958
Andrew Geissler09036742021-06-25 14:25:14 -05004959 :term:`NON_MULTILIB_RECIPES`
4960 A list of recipes that should not be built for multilib. OE-Core's
4961 ``multilib.conf`` file defines a reasonable starting point for this
4962 list with::
4963
4964 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
4965
Andrew Geisslerf0343792020-11-18 10:42:21 -06004966 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004967 The minimal command and arguments to run ``objcopy``.
4968
Andrew Geisslerf0343792020-11-18 10:42:21 -06004969 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004970 The minimal command and arguments to run ``objdump``.
4971
Andrew Geisslerf0343792020-11-18 10:42:21 -06004972 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004973 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
4974 this variable specifies additional arguments passed to the "sed"
4975 command. The sed command alters any paths in configuration scripts
4976 that have been set up during compilation. Inheriting this class
4977 results in all paths in these scripts being changed to point into the
4978 ``sysroots/`` directory so that all builds that use the script will
4979 use the correct directories for the cross compiling layout.
4980
4981 See the ``meta/classes/binconfig.bbclass`` in the
4982 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00004983 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004984
Andrew Geisslerf0343792020-11-18 10:42:21 -06004985 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004986 An internal variable used to tell the OpenEmbedded build system what
4987 Python modules to import for every Python function run by the system.
4988
4989 .. note::
4990
4991 Do not set this variable. It is for internal use only.
4992
Andrew Geisslerf0343792020-11-18 10:42:21 -06004993 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004994 The name of the build environment setup script for the purposes of
4995 setting up the environment within the extensible SDK. The default
4996 value is "oe-init-build-env".
4997
4998 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05004999 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005000
Andrew Geisslerf0343792020-11-18 10:42:21 -06005001 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005002 Controls how the OpenEmbedded build system spawns interactive
5003 terminals on the host development system (e.g. using the BitBake
5004 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005005 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005006 the Yocto Project Development Tasks Manual.
5007
Andrew Geissler5f350902021-07-23 13:09:54 -04005008 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005009
5010 - auto
5011 - gnome
5012 - xfce
5013 - rxvt
5014 - screen
5015 - konsole
5016 - none
5017
Andrew Geisslerf0343792020-11-18 10:42:21 -06005018 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005019 The directory from which the top-level build environment setup script
5020 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005021 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05005022 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005023 contains the script.
5024
5025 For additional information on how this variable is used, see the
5026 initialization script.
5027
Andrew Geisslerf0343792020-11-18 10:42:21 -06005028 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005029 Declares the oldest version of the Linux kernel that the produced
5030 binaries must support. This variable is passed into the build of the
5031 Embedded GNU C Library (``glibc``).
5032
5033 The default for this variable comes from the
5034 ``meta/conf/bitbake.conf`` configuration file. You can override this
5035 default by setting the variable in a custom distribution
5036 configuration file.
5037
Andrew Geisslerf0343792020-11-18 10:42:21 -06005038 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005039 A colon-separated list of overrides that currently apply. Overrides
5040 are a BitBake mechanism that allows variables to be selectively
5041 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005042 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005043 the current recipe being built, the machine for which it is being
5044 built, and so forth.
5045
5046 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005047 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005048 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005049 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005050
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005051 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005052
5053 See the
5054 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5055 section in the BitBake User Manual for more information on the
5056 overrides mechanism.
5057
Andrew Geissler09036742021-06-25 14:25:14 -05005058 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005059 :term:`CLASSOVERRIDE`,
5060 :term:`MACHINEOVERRIDES`, and
5061 :term:`DISTROOVERRIDES` variables. Another
5062 important override included by default is ``pn-${PN}``. This override
5063 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005064 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005065
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005066 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005067
5068 .. note::
5069
Andrew Geissler09036742021-06-25 14:25:14 -05005070 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005071 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005072 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005073 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005074
Andrew Geisslerf0343792020-11-18 10:42:21 -06005075 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005076 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005077
5078 ${PN}-${PV}
5079
Andrew Geisslerf0343792020-11-18 10:42:21 -06005080 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005081 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005082
5083 You may find you need to inject additional metadata into packages.
5084 This variable allows you to do that by setting the injected data as
5085 the value. Multiple fields can be added by splitting the content with
5086 the literal separator "\n".
5087
5088 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5089 to do package type specific settings. It can also be made package
5090 specific by using the package name as a suffix.
5091
5092 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005093 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005094 section in the Yocto Project Development Tasks Manual.
5095
Andrew Geisslerf0343792020-11-18 10:42:21 -06005096 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005097 The architecture of the resulting package or packages.
5098
5099 By default, the value of this variable is set to
5100 :term:`TUNE_PKGARCH` when building for the
5101 target, :term:`BUILD_ARCH` when building for the
5102 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5103 SDK.
5104
5105 .. note::
5106
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005107 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005108
5109 However, if your recipe's output packages are built specific to the
5110 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005111 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005112 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005113
5114 PACKAGE_ARCH = "${MACHINE_ARCH}"
5115
Andrew Geisslerf0343792020-11-18 10:42:21 -06005116 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005117 Specifies a list of architectures compatible with the target machine.
5118 This variable is set automatically and should not normally be
5119 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005120 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005121 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5122
Andrew Geisslerf0343792020-11-18 10:42:21 -06005123 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005124 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005125 that those added packages can pick up files that would normally be
5126 included in the default package.
5127
Andrew Geisslerf0343792020-11-18 10:42:21 -06005128 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005129 This variable, which is set in the ``local.conf`` configuration file
5130 found in the ``conf`` folder of the
5131 :term:`Build Directory`, specifies the package manager the
5132 OpenEmbedded build system uses when packaging data.
5133
5134 You can provide one or more of the following arguments for the
5135 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5136 package_tar"
5137
5138 .. note::
5139
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005140 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005141 class has limited functionality due to no support for package
5142 dependencies by that backend. Therefore, it is recommended that
5143 you do not use it.
5144
5145 The build system uses only the first argument in the list as the
5146 package manager when creating your image or SDK. However, packages
5147 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005148 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005149
5150 PACKAGE_CLASSES ?= "package_ipk"
5151
5152 The OpenEmbedded build system uses
5153 the IPK package manager to create your image or SDK.
5154
5155 For information on packaging and build performance effects as a
5156 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005157 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005158
Andrew Geisslerf0343792020-11-18 10:42:21 -06005159 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005160 Determines how to split up and package debug and source information
5161 when creating debugging packages to be used with the GNU Project
5162 Debugger (GDB). In general, based on the value of this variable,
5163 you can combine the source and debug info in a single package,
5164 you can break out the source into a separate package that can be
5165 installed independently, or you can choose to not have the source
5166 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005167
Patrick Williams93c203f2021-10-06 16:15:23 -05005168 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005169
Patrick Williams93c203f2021-10-06 16:15:23 -05005170 - "``.debug``": All debugging and source info is placed in a single
5171 ``*-dbg`` package; debug symbol files are placed next to the
5172 binary in a ``.debug`` directory so that, if a binary is installed
5173 into ``/bin``, the corresponding debug symbol file is installed
5174 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5175 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005176
Patrick Williams93c203f2021-10-06 16:15:23 -05005177 - "``debug-file-directory``": As above, all debugging and source info
5178 is placed in a single ``*-dbg`` package; debug symbol files are
5179 placed entirely under the directory ``/usr/lib/debug`` and separated
5180 by the path from where the binary is installed, so that if a binary
5181 is installed in ``/bin``, the corresponding debug symbols are installed
5182 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5183 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005184
Patrick Williams93c203f2021-10-06 16:15:23 -05005185 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5186 ``*-dbg`` package as with the ``.debug`` value, while source is
5187 placed in a separate ``*-src`` package, which can be installed
5188 independently. This is the default setting for this variable,
5189 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005190
Patrick Williams93c203f2021-10-06 16:15:23 -05005191 - "``debug-without-src``": The same behavior as with the ``.debug``
5192 setting, but no source is packaged at all.
5193
5194 .. note::
5195
5196 Much of the above package splitting can be overridden via
5197 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005198
5199 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005200 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005201 in the Yocto Project Development Tasks Manual.
5202
Andrew Geisslerf0343792020-11-18 10:42:21 -06005203 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005204 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005205 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005206
5207 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5208
5209 You can set this variable globally in your ``local.conf`` file or you
5210 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005211 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005212
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005213 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005214
5215 If you choose to not install a package using this variable and some
5216 other package is dependent on it (i.e. listed in a recipe's
5217 :term:`RDEPENDS` variable), the OpenEmbedded build
5218 system generates a fatal installation error. Because the build system
5219 halts the process with a fatal error, you can use the variable with
5220 an iterative development process to remove specific components from a
5221 system.
5222
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005223 This variable is supported only when using the IPK and RPM
5224 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005225
5226 See the :term:`NO_RECOMMENDATIONS` and the
5227 :term:`BAD_RECOMMENDATIONS` variables for
5228 related information.
5229
Andrew Geissler9aee5002022-03-30 16:27:02 +00005230 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5231 Prevents specific packages from being installed when you are
5232 installing complementary packages.
5233
5234 You might find that you want to prevent installing certain packages
5235 when you are installing complementary packages. For example, if you
5236 are using :term:`IMAGE_FEATURES` to install
5237 ``dev-pkgs``, you might not want to install all packages from a
5238 particular multilib. If you find yourself in this situation, you can
5239 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5240 expressions to match the packages you want to exclude.
5241
Andrew Geisslerf0343792020-11-18 10:42:21 -06005242 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005243 Specifies the list of architectures compatible with the device CPU.
5244 This variable is useful when you build for several different devices
5245 that use miscellaneous processors such as XScale and ARM926-EJS.
5246
Andrew Geisslerf0343792020-11-18 10:42:21 -06005247 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005248 Optionally specifies the package architectures used as part of the
5249 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005250 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005251 URI, which is constructed using the
5252 :term:`PACKAGE_FEED_URIS` and
5253 :term:`PACKAGE_FEED_BASE_PATHS`
5254 variables.
5255
5256 .. note::
5257
Andrew Geissler09036742021-06-25 14:25:14 -05005258 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005259 variable to allow specific package architectures. If you do
5260 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005261 case, you can omit this variable. Omitting the variable results in
5262 all available architectures for the current machine being included
5263 into remote package feeds.
5264
Andrew Geissler09036742021-06-25 14:25:14 -05005265 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5266 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005267 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005268
5269 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5270 https://example.com/packagerepos/updates"
5271 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5272 PACKAGE_FEED_ARCHS = "all core2-64"
5273
5274 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005275
5276 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005277
5278 https://example.com/packagerepos/release/rpm/all
5279 https://example.com/packagerepos/release/rpm/core2-64
5280 https://example.com/packagerepos/release/rpm-dev/all
5281 https://example.com/packagerepos/release/rpm-dev/core2-64
5282 https://example.com/packagerepos/updates/rpm/all
5283 https://example.com/packagerepos/updates/rpm/core2-64
5284 https://example.com/packagerepos/updates/rpm-dev/all
5285 https://example.com/packagerepos/updates/rpm-dev/core2-64
5286
Andrew Geisslerf0343792020-11-18 10:42:21 -06005287 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005288 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005289 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005290 package feed URI used by the OpenEmbedded build system. The base path
5291 lies between the :term:`PACKAGE_FEED_URIS`
5292 and :term:`PACKAGE_FEED_ARCHS` variables.
5293
Andrew Geissler09036742021-06-25 14:25:14 -05005294 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5295 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005296 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005297
5298 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5299 https://example.com/packagerepos/updates"
5300 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5301 PACKAGE_FEED_ARCHS = "all core2-64"
5302
5303 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005304
5305 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005306
5307 https://example.com/packagerepos/release/rpm/all
5308 https://example.com/packagerepos/release/rpm/core2-64
5309 https://example.com/packagerepos/release/rpm-dev/all
5310 https://example.com/packagerepos/release/rpm-dev/core2-64
5311 https://example.com/packagerepos/updates/rpm/all
5312 https://example.com/packagerepos/updates/rpm/core2-64
5313 https://example.com/packagerepos/updates/rpm-dev/all
5314 https://example.com/packagerepos/updates/rpm-dev/core2-64
5315
Andrew Geisslerf0343792020-11-18 10:42:21 -06005316 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005317 Specifies the front portion of the package feed URI used by the
5318 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005319 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005320 :term:`PACKAGE_FEED_BASE_PATHS`, and
5321 :term:`PACKAGE_FEED_ARCHS` variables.
5322
Andrew Geissler09036742021-06-25 14:25:14 -05005323 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5324 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005325 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005326
5327 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5328 https://example.com/packagerepos/updates"
5329 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5330 PACKAGE_FEED_ARCHS = "all core2-64"
5331
5332 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005333
5334 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005335
5336 https://example.com/packagerepos/release/rpm/all
5337 https://example.com/packagerepos/release/rpm/core2-64
5338 https://example.com/packagerepos/release/rpm-dev/all
5339 https://example.com/packagerepos/release/rpm-dev/core2-64
5340 https://example.com/packagerepos/updates/rpm/all
5341 https://example.com/packagerepos/updates/rpm/core2-64
5342 https://example.com/packagerepos/updates/rpm-dev/all
5343 https://example.com/packagerepos/updates/rpm-dev/core2-64
5344
Andrew Geisslerf0343792020-11-18 10:42:21 -06005345 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005346 The final list of packages passed to the package manager for
5347 installation into the image.
5348
5349 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005350 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005351 not the final list of packages that are actually installed. This
5352 variable is internal to the image construction code. Consequently, in
5353 general, you should use the
5354 :term:`IMAGE_INSTALL` variable to specify
5355 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005356 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005357 image. When working with an initial RAM filesystem (initramfs) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005358 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06005359 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005360 in the Yocto Project Development Tasks Manual.
5361
Andrew Geisslerf0343792020-11-18 10:42:21 -06005362 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005363 Specifies a list of packages the OpenEmbedded build system attempts
5364 to install when creating an image. If a listed package fails to
5365 install, the build system does not generate an error. This variable
5366 is generally not user-defined.
5367
Andrew Geisslerf0343792020-11-18 10:42:21 -06005368 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005369 Specifies a list of functions run to pre-process the
5370 :term:`PKGD` directory prior to splitting the files out
5371 to individual packages.
5372
Andrew Geisslerf0343792020-11-18 10:42:21 -06005373 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005374 Specifies a list of dependencies for post-installation and
5375 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005376 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005377 creation time rather than on the target but depends on a native tool
5378 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005379 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005380
5381 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005382 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005383 section in the Yocto Project Development Tasks Manual.
5384
Andrew Geisslerf0343792020-11-18 10:42:21 -06005385 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005386 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005387 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005388 recipes when you specify features and then arguments that define
5389 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005390 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005391
5392 PACKAGECONFIG ??= "f1 f2 f3 ..."
5393 PACKAGECONFIG[f1] = "\
5394 --with-f1, \
5395 --without-f1, \
5396 build-deps-for-f1, \
5397 runtime-deps-for-f1, \
5398 runtime-recommends-for-f1, \
5399 packageconfig-conflicts-for-f1"
5400 PACKAGECONFIG[f2] = "\
5401 ... and so on and so on ...
5402
Andrew Geissler5f350902021-07-23 13:09:54 -04005403 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005404 list of the features to enable. Following the features, you can
5405 determine the behavior of each feature by providing up to six
5406 order-dependent arguments, which are separated by commas. You can
5407 omit any argument you like but must retain the separating commas. The
5408 order is important and specifies the following:
5409
5410 1. Extra arguments that should be added to the configure script
5411 argument list (:term:`EXTRA_OECONF` or
5412 :term:`PACKAGECONFIG_CONFARGS`) if
5413 the feature is enabled.
5414
Andrew Geissler09036742021-06-25 14:25:14 -05005415 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5416 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005417
5418 3. Additional build dependencies (:term:`DEPENDS`)
5419 that should be added if the feature is enabled.
5420
5421 4. Additional runtime dependencies (:term:`RDEPENDS`)
5422 that should be added if the feature is enabled.
5423
5424 5. Additional runtime recommendations
5425 (:term:`RRECOMMENDS`) that should be added if
5426 the feature is enabled.
5427
Andrew Geissler09036742021-06-25 14:25:14 -05005428 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005429 settings for this feature.
5430
Andrew Geissler09036742021-06-25 14:25:14 -05005431 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005432 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5433 three arguments that determine the feature's behavior.
5434 ::
5435
5436 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5437
5438 The
5439 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5440 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005441 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005442 other hand, if the feature is disabled say through a ``.bbappend``
5443 file in another layer, then the second argument ``--without-gtk3`` is
5444 added to the configure script instead.
5445
Andrew Geissler09036742021-06-25 14:25:14 -05005446 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005447 regardless of whether you are creating a block or changing a block.
5448 When creating a block, use the structure inside your recipe.
5449
Andrew Geissler09036742021-06-25 14:25:14 -05005450 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005451 so one of two ways:
5452
5453 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05005454 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05005455 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005456 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005457
5458 PACKAGECONFIG = "f4 f5"
5459
Andrew Geisslerc926e172021-05-07 16:11:35 -05005460 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005461
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005462 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005463
5464 - *Configuration file:* This method is identical to changing the
5465 block through an append file except you edit your ``local.conf``
5466 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05005467 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005468
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005469 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005470
Andrew Geisslerc926e172021-05-07 16:11:35 -05005471 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005472
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005473 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005474
Andrew Geisslerf0343792020-11-18 10:42:21 -06005475 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005476 A space-separated list of configuration options generated from the
5477 :term:`PACKAGECONFIG` setting.
5478
5479 Classes such as :ref:`autotools <ref-classes-autotools>` and
Andrew Geissler09036742021-06-25 14:25:14 -05005480 :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5481 pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5482 respectively. If you are using :term:`PACKAGECONFIG` but not a class that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005483 handles the ``do_configure`` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05005484 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005485
Andrew Geisslerf0343792020-11-18 10:42:21 -06005486 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005487 For recipes inheriting the
5488 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05005489 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005490 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5491 should not be automatically created by the ``packagegroup`` recipe,
5492 which is the default behavior.
5493
Andrew Geisslerf0343792020-11-18 10:42:21 -06005494 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005495 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005496 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005497
Andrew Geissler5199d832021-09-24 16:47:35 -05005498 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005499
5500 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05005501 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005502 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05005503 package. If a file matches the :term:`FILES` variable for more than one
5504 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005505 (leftmost) package.
5506
5507 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005508 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005509 :ref:`ref-tasks-install` task) are not generated,
5510 unless generation is forced through the
5511 :term:`ALLOW_EMPTY` variable.
5512
Andrew Geisslerf0343792020-11-18 10:42:21 -06005513 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005514 A promise that your recipe satisfies runtime dependencies for
5515 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05005516 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005517 only states that they should be satisfied. For example, if a hard,
5518 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05005519 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005520 variable, but a package with the module name is never actually
5521 produced, then the other package will be broken. Thus, if you attempt
5522 to include that package in an image, you will get a dependency
5523 failure from the packaging system during the
5524 :ref:`ref-tasks-rootfs` task.
5525
5526 Typically, if there is a chance that such a situation can occur and
5527 the package that is not created is valid without the dependency being
5528 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05005529 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005530
Andrew Geissler09036742021-06-25 14:25:14 -05005531 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005532 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005533 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005534 section in the Yocto Project Development Tasks Manual.
5535
Andrew Geisslerf0343792020-11-18 10:42:21 -06005536 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005537 Specifies a list of functions run to perform additional splitting of
5538 files into individual packages. Recipes can either prepend to this
5539 variable or prepend to the ``populate_packages`` function in order to
5540 perform additional package splitting. In either case, the function
5541 should set :term:`PACKAGES`,
5542 :term:`FILES`, :term:`RDEPENDS` and
5543 other packaging variables appropriately in order to perform the
5544 desired splitting.
5545
Andrew Geisslerf0343792020-11-18 10:42:21 -06005546 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005547 Extra options passed to the ``make`` command during the
5548 :ref:`ref-tasks-compile` task in order to specify
5549 parallel compilation on the local build host. This variable is
5550 usually in the form "-j x", where x represents the maximum number of
5551 parallel threads ``make`` can run.
5552
5553 .. note::
5554
Andrew Geissler09036742021-06-25 14:25:14 -05005555 In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005556 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5557 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005558
5559 By default, the OpenEmbedded build system automatically sets this
5560 variable to be equal to the number of cores the build system uses.
5561
5562 .. note::
5563
5564 If the software being built experiences dependency issues during
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005565 the ``do_compile`` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05005566 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005567 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005568 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005569 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005570
5571 For single socket systems (i.e. one CPU), you should not have to
5572 override this variable to gain optimal parallelism during builds.
5573 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05005574 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005575 not set higher than "-j 20".
5576
5577 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005578 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005579 section in the Yocto Project Development Tasks Manual.
5580
Andrew Geisslerf0343792020-11-18 10:42:21 -06005581 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005582 Extra options passed to the ``make install`` command during the
5583 :ref:`ref-tasks-install` task in order to specify
5584 parallel installation. This variable defaults to the value of
5585 :term:`PARALLEL_MAKE`.
5586
5587 .. note::
5588
Andrew Geissler09036742021-06-25 14:25:14 -05005589 In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005590 be called with
5591 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5592 way to ensure this is to use the ``oe_runmake`` function.
5593
5594 If the software being built experiences dependency issues during
5595 the ``do_install`` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005596 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005597 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005598 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005599 section in the Yocto Project Development Tasks Manual.
5600
Andrew Geisslerf0343792020-11-18 10:42:21 -06005601 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005602 Determines the action to take when a patch fails. You can set this
5603 variable to one of two values: "noop" and "user".
5604
5605 The default value of "noop" causes the build to simply fail when the
5606 OpenEmbedded build system cannot successfully apply a patch. Setting
5607 the value to "user" causes the build system to launch a shell and
5608 places you in the right location so that you can manually resolve the
5609 conflicts.
5610
5611 Set this variable in your ``local.conf`` file.
5612
Andrew Geisslerf0343792020-11-18 10:42:21 -06005613 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005614 Specifies the utility used to apply patches for a recipe during the
5615 :ref:`ref-tasks-patch` task. You can specify one of
5616 three utilities: "patch", "quilt", or "git". The default utility used
5617 is "quilt" except for the quilt-native recipe itself. Because the
5618 quilt tool is not available at the time quilt-native is being
5619 patched, it uses "patch".
5620
5621 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005622 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005623
5624 PATCHTOOL = "patch"
5625 PATCHTOOL = "quilt"
5626 PATCHTOOL = "git"
5627
Andrew Geisslerf0343792020-11-18 10:42:21 -06005628 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005629 The epoch of the recipe. By default, this variable is unset. The
5630 variable is used to make upgrades possible when the versioning scheme
5631 changes in some backwards incompatible way.
5632
Andrew Geissler09036742021-06-25 14:25:14 -05005633 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005634
Andrew Geissler9aee5002022-03-30 16:27:02 +00005635 :term:`PEP517_WHEEL_PATH`
5636 When used by recipes that inherit the
5637 :ref:`python_pep517 <ref-classes-python_pep517>` class,
5638 denotes the path to ``dist/`` (short for distribution) where the
5639 binary archive ``wheel`` is built.
5640
Andrew Geisslerf0343792020-11-18 10:42:21 -06005641 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005642 Specifies the recipe or package name and includes all version and
5643 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5644 ``bash-4.2-r1/``). This variable is comprised of the following:
5645 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5646
Andrew Geissler9aee5002022-03-30 16:27:02 +00005647 :term:`PIP_INSTALL_ARGS`
5648 When used by recipes that inherit the
5649 :ref:`python_pep517 <ref-classes-python_pep517>` class,
5650 denotes the arguments passed to ``pip install`` to adjust the
5651 behavior of how the ``wheel`` is installed.
5652
Andrew Geisslerf0343792020-11-18 10:42:21 -06005653 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005654 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5655 class, this variable identifies packages that contain the pixbuf
5656 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5657 class assumes that the loaders are in the recipe's main package (i.e.
5658 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5659 loaders you need are in a package other than that main package.
5660
Andrew Geisslerf0343792020-11-18 10:42:21 -06005661 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005662 The name of the resulting package created by the OpenEmbedded build
5663 system.
5664
5665 .. note::
5666
Andrew Geissler09036742021-06-25 14:25:14 -05005667 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005668
5669 For example, when the :ref:`debian <ref-classes-debian>` class
5670 renames the output package, it does so by setting
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005671 ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005672
Andrew Geisslerf0343792020-11-18 10:42:21 -06005673 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005674 The path to ``pkg-config`` files for the current build context.
5675 ``pkg-config`` reads this variable from the environment.
5676
Andrew Geisslerf0343792020-11-18 10:42:21 -06005677 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005678 Points to the destination directory for files to be packaged before
5679 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005680 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005681
5682 ${WORKDIR}/package
5683
5684 Do not change this default.
5685
Andrew Geisslerf0343792020-11-18 10:42:21 -06005686 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005687 Points to a shared, global-state directory that holds data generated
5688 during the packaging process. During the packaging process, the
5689 :ref:`ref-tasks-packagedata` task packages data
5690 for each recipe and installs it into this temporary, shared area.
5691 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05005692 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005693
5694 ${STAGING_DIR_HOST}/pkgdata
5695
5696 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005697 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005698 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005699 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005700 section in the Yocto Project Development Tasks Manual. For more
5701 information on the shared, global-state directory, see
5702 :term:`STAGING_DIR_HOST`.
5703
Andrew Geisslerf0343792020-11-18 10:42:21 -06005704 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005705 Points to the parent directory for files to be packaged after they
5706 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005707 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005708
5709 ${WORKDIR}/packages-split
5710
5711 Under this directory, the build system creates directories for each
5712 package specified in :term:`PACKAGES`. Do not change
5713 this default.
5714
Andrew Geisslerf0343792020-11-18 10:42:21 -06005715 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005716 Points to a temporary work area where the
5717 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05005718 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005719
5720 ${WORKDIR}/pkgdata
5721
5722 Do not change this default.
5723
5724 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05005725 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005726 :term:`PKGDATA_DIR` to make it available globally.
5727
Andrew Geisslerf0343792020-11-18 10:42:21 -06005728 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05005729 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005730 is set to :term:`PE`.
5731
Andrew Geisslerf0343792020-11-18 10:42:21 -06005732 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005733 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005734 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005735
Andrew Geisslerf0343792020-11-18 10:42:21 -06005736 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005737 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005738 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005739
Andrew Geisslerf0343792020-11-18 10:42:21 -06005740 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005741 This variable can have two separate functions depending on the
5742 context: a recipe name or a resulting package name.
5743
Andrew Geissler09036742021-06-25 14:25:14 -05005744 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005745 OpenEmbedded build system as input to create a package. The name is
5746 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05005747 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005748 will be "expat".
5749
5750 The variable refers to a package name in the context of a file
5751 created or produced by the OpenEmbedded build system.
5752
Andrew Geissler09036742021-06-25 14:25:14 -05005753 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005754 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04005755 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05005756 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005757 and ``lib64-bash``, respectively.
5758
Andrew Geisslerf0343792020-11-18 10:42:21 -06005759 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005760 Specifies a list of functions to call once the OpenEmbedded build
5761 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005762 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005763
5764 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5765
5766 If you need to pass the SDK path to a command within a function, you
5767 can use ``${SDK_DIR}``, which points to the parent directory used by
5768 the OpenEmbedded build system when creating SDK output. See the
5769 :term:`SDK_DIR` variable for more information.
5770
Andrew Geisslerf0343792020-11-18 10:42:21 -06005771 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005772 Specifies a list of functions to call once the OpenEmbedded build
5773 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005774 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005775
5776 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5777
5778 If you need to pass the SDK path to a command within a function, you
5779 can use ``${SDK_DIR}``, which points to the parent directory used by
5780 the OpenEmbedded build system when creating SDK output. See the
5781 :term:`SDK_DIR` variable for more information.
5782
Andrew Geisslerf0343792020-11-18 10:42:21 -06005783 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005784 The revision of the recipe. The default value for this variable is
5785 "r0". Subsequent revisions of the recipe conventionally have the
5786 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05005787 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005788
5789 .. note::
5790
Andrew Geissler09036742021-06-25 14:25:14 -05005791 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005792 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06005793 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005794 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06005795 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005796 mechanisms.
5797
Andrew Geissler09036742021-06-25 14:25:14 -05005798 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005799 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05005800 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005801 :term:`PKGR`, helps the package manager distinguish which
5802 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05005803 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
5804 the same :term:`PV` usually means that the packages all install the same
5805 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005806 packaging fixes.
5807
5808 .. note::
5809
Andrew Geissler09036742021-06-25 14:25:14 -05005810 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005811 package contents or metadata.
5812
Andrew Geissler5f350902021-07-23 13:09:54 -04005813 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005814 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005815 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005816 in the Yocto Project Development Tasks Manual for more information.
5817
Andrew Geisslerf0343792020-11-18 10:42:21 -06005818 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005819 If multiple recipes provide the same item, this variable determines
5820 which recipe is preferred and thus provides the item (i.e. the
5821 preferred provider). You should always suffix this variable with the
5822 name of the provided item. And, you should define the variable using
5823 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05005824 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005825
5826 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5827
5828 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05005829 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005830 the recipe you prefer to provide "virtual/kernel".
5831
Andrew Geisslerc926e172021-05-07 16:11:35 -05005832 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005833
5834 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5835 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5836
5837 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005838 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005839 section in the Yocto Project Development Tasks Manual.
5840
5841 .. note::
5842
Andrew Geissler09036742021-06-25 14:25:14 -05005843 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005844 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05005845 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005846 desirable since this mechanism is designed to select between mutually
5847 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005848
Andrew Geisslerf0343792020-11-18 10:42:21 -06005849 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005850 If there are multiple versions of a recipe available, this variable
5851 determines which version should be given preference. You must always
5852 suffix the variable with the :term:`PN` you want to select (`python` in
5853 the first example below), and you should specify the :term:`PV`
5854 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005855
Andrew Geissler09036742021-06-25 14:25:14 -05005856 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005857 through the "``%``" character. You can use the character to match any
5858 number of characters, which can be useful when specifying versions
5859 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005860 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005861
5862 PREFERRED_VERSION_python = "3.4.0"
5863 PREFERRED_VERSION_linux-yocto = "5.0%"
5864
5865 .. note::
5866
5867 The use of the "%" character is limited in that it only works at the end of the
5868 string. You cannot use the wildcard character in any other
5869 location of the string.
5870
5871 The specified version is matched against :term:`PV`, which
5872 does not necessarily match the version part of the recipe's filename.
5873 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005874 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005875
5876 PV = "1.1+git${SRCPV}"
5877
5878 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05005879 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005880
5881 PREFERRED_VERSION_foo = "1.1+git%"
5882
5883 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05005884 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005885
5886 PREFERRED_VERSION_foo = "git"
5887
Andrew Geissler09036742021-06-25 14:25:14 -05005888 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005889 configuration files in a way that is hard to change. You can use
5890 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05005891 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005892
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005893 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005894
5895 Although not recommended, worst case, you can also use the
5896 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005897 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005898
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005899 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005900
5901 .. note::
5902
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005903 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05005904 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005905
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005906 If a recipe with the specified version is not available, a warning
5907 message will be shown. See :term:`REQUIRED_VERSION` if you want this
5908 to be an error instead.
5909
Andrew Geisslerf0343792020-11-18 10:42:21 -06005910 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005911 Specifies additional paths from which the OpenEmbedded build system
5912 gets source code. When the build system searches for source code, it
5913 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05005914 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005915 source, and then locations specified by
5916 :term:`MIRRORS` in that order.
5917
5918 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005919 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005920 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5921
5922 Typically, you could add a specific server for the build system to
5923 attempt before any others by adding something like the following to
5924 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005925 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005926
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005927 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00005928 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5929 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5930 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5931 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005932
5933 These changes cause the
5934 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5935 direct them to the ``http://`` sources mirror. You can use
5936 ``file://`` URLs to point to local directories or network shares as
5937 well.
5938
Andrew Geisslerf0343792020-11-18 10:42:21 -06005939 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005940 Indicates the importance of a package.
5941
Andrew Geissler09036742021-06-25 14:25:14 -05005942 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005943 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05005944 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005945 normally set within recipes.
5946
Andrew Geissler09036742021-06-25 14:25:14 -05005947 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005948 "optional", which is the default.
5949
Andrew Geisslerf0343792020-11-18 10:42:21 -06005950 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005951 Specifies libraries installed within a recipe that should be ignored
5952 by the OpenEmbedded build system's shared library resolver. This
5953 variable is typically used when software being built by a recipe has
5954 its own private versions of a library normally provided by another
5955 recipe. In this case, you would not want the package containing the
5956 private libraries to be set as a dependency on other unrelated
5957 packages that should instead depend on the package providing the
5958 standard version of the library.
5959
5960 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05005961 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005962
5963 PRIVATE_LIBS = "libmozjs.so \
5964 libxpcom.so \
5965 libnspr4.so \
5966 libxul.so \
5967 libmozalloc.so \
5968 libplc4.so \
5969 libplds4.so"
5970
5971 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005972 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005973 section in the Yocto Project Overview and Concepts Manual.
5974
Andrew Geisslerf0343792020-11-18 10:42:21 -06005975 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005976 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05005977 default, a recipe's own :term:`PN` is implicitly already in its
5978 :term:`PROVIDES` list and therefore does not need to mention that it
5979 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005980 aliases are synonyms for the recipe and can be useful for satisfying
5981 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05005982 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005983
Andrew Geissler09036742021-06-25 14:25:14 -05005984 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05005985 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005986
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005987 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005988
Andrew Geissler09036742021-06-25 14:25:14 -05005989 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005990 results in the "eudev" recipe also being available as simply "udev".
5991
5992 .. note::
5993
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005994 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
5995 to `PROVIDES`, so while using "+=" in the above example may not be
5996 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005997
5998 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05005999 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006000 virtual target is a name that corresponds to some particular
6001 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05006002 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006003 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05006004 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006005
6006 Conventionally, virtual targets have names on the form
6007 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6008 of the name and has no syntactical significance.
6009
6010 The :term:`PREFERRED_PROVIDER` variable is
6011 used to select which particular recipe provides a virtual target.
6012
6013 .. note::
6014
6015 A corresponding mechanism for virtual runtime dependencies
6016 (packages) exists. However, the mechanism does not depend on any
6017 special functionality beyond ordinary variable assignments. For
6018 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6019 the component that manages the ``/dev`` directory.
6020
6021 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006022 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006023
6024 VIRTUAL-RUNTIME_dev_manager = "udev"
6025
6026
Andrew Geisslerf0343792020-11-18 10:42:21 -06006027 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006028 The network based :term:`PR` service host and port.
6029
6030 The ``conf/local.conf.sample.extended`` configuration file in the
6031 :term:`Source Directory` shows how the
Andrew Geissler09036742021-06-25 14:25:14 -05006032 :term:`PRSERV_HOST` variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006033
6034 PRSERV_HOST = "localhost:0"
6035
6036 You must
6037 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06006038 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006039 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006040
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006041
6042 :term:`PSEUDO_IGNORE_PATHS`
6043 A comma-separated (without spaces) list of path prefixes that should be ignored
6044 by pseudo when monitoring and recording file operations, in order to avoid
6045 problems with files being written to outside of the pseudo context and
6046 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6047 and can include partial directory (or file) names.
6048
6049
Andrew Geisslerf0343792020-11-18 10:42:21 -06006050 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006051 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06006052 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006053 functionality is enabled when building a recipe. You should not set
6054 this variable directly. Enabling and disabling building Package Tests
6055 at build time should be done by adding "ptest" to (or removing it
6056 from) :term:`DISTRO_FEATURES`.
6057
Andrew Geisslerf0343792020-11-18 10:42:21 -06006058 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006059 The version of the recipe. The version is normally extracted from the
6060 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006061 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6062 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006063 building an unstable (i.e. development) version from a source code
6064 repository (e.g. Git or Subversion).
6065
Andrew Geissler09036742021-06-25 14:25:14 -05006066 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006067
Andrew Geisslerf0343792020-11-18 10:42:21 -06006068 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006069 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006070 :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006071 Application Binary Interface (ABI) currently in use for Python. By
6072 default, the ABI is "m". You do not have to set this variable as the
6073 OpenEmbedded build system sets it for you.
6074
6075 The OpenEmbedded build system uses the ABI to construct directory
6076 names used when installing the Python headers and libraries in
6077 sysroot (e.g. ``.../python3.3m/...``).
6078
Andrew Geisslerf0343792020-11-18 10:42:21 -06006079 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006080 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006081 :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the
Andrew Geissler09036742021-06-25 14:25:14 -05006082 major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006083 be "python3". You do not have to set this variable as the
6084 OpenEmbedded build system automatically sets it for you.
6085
6086 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006087 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006088
6089 DEPENDS += "${PYTHON_PN}-native"
6090
6091 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006092 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006093
Andrew Geisslerf0343792020-11-18 10:42:21 -06006094 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006095 The minimal command and arguments to run ``ranlib``.
6096
Andrew Geisslerf0343792020-11-18 10:42:21 -06006097 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006098 The list of packages that conflict with packages. Note that packages
6099 will not be installed if conflicting packages are not first removed.
6100
6101 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006102 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006103
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006104 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006105
6106 BitBake, which the OpenEmbedded build system uses, supports
6107 specifying versioned dependencies. Although the syntax varies
6108 depending on the packaging format, BitBake hides these differences
6109 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006110 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006111
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006112 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006113
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006114 For ``operator``, you can specify the following:
6115
6116 - =
6117 - <
6118 - >
6119 - <=
6120 - >=
6121
6122 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006123 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006124
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006125 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006126
Andrew Geisslerf0343792020-11-18 10:42:21 -06006127 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006128 Lists runtime dependencies of a package. These dependencies are other
6129 packages that must be installed in order for the package to function
6130 correctly. As an example, the following assignment declares that the
6131 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006132 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006133
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006134 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006135
6136 The most common types of package
6137 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006138 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006139 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006140 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006141 section in the Yocto Project Overview and Concepts Manual.
6142
Andrew Geissler09036742021-06-25 14:25:14 -05006143 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006144 ``bar`` and ``baz`` will be declared as dependencies inside the
6145 package ``foo`` when it is written out by one of the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006146 :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006147 Exactly how this is done depends on which package format is used,
6148 which is determined by
6149 :term:`PACKAGE_CLASSES`. When the
6150 corresponding package manager installs the package, it will know to
6151 also install the packages on which it depends.
6152
6153 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006154 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006155 added. This dependency is from the recipe's
6156 :ref:`ref-tasks-build` (not to be confused with
6157 :ref:`ref-tasks-compile`) task to the
6158 ``do_package_write_*`` task of the recipes that build ``bar`` and
6159 ``baz``.
6160
Andrew Geissler09036742021-06-25 14:25:14 -05006161 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006162 names of other packages - they cannot be recipe names. Although
6163 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006164 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006165 variable. For an example of the default list of packages created from
6166 a recipe, see the :term:`PACKAGES` variable.
6167
Andrew Geissler09036742021-06-25 14:25:14 -05006168 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006169 you should always use the variable in a form with an attached package
6170 name (remember that a single recipe can build multiple packages). For
6171 example, suppose you are building a development package that depends
6172 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006173 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006174
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006175 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006176
6177 In the example,
6178 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006179 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006180 the variable.
6181
6182 .. note::
6183
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006184 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006185 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006186 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006187 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006188 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006189
Andrew Geissler09036742021-06-25 14:25:14 -05006190 The package names you use with :term:`RDEPENDS` must appear as they would
6191 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006192 allows a different name to be used for the final package (e.g. the
6193 :ref:`debian <ref-classes-debian>` class uses this to rename
6194 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006195 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006196 independent of the package format used.
6197
6198 BitBake, which the OpenEmbedded build system uses, supports
6199 specifying versioned dependencies. Although the syntax varies
6200 depending on the packaging format, BitBake hides these differences
6201 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006202 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006203
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006204 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006205
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006206 For ``operator``, you can specify the following:
6207
6208 - =
6209 - <
6210 - >
6211 - <=
6212 - >=
6213
6214 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006215
6216 .. note::
6217
Andrew Geissler09036742021-06-25 14:25:14 -05006218 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006219 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006220
6221 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006222 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006223
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006224 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006225
6226 For information on build-time dependencies, see the
6227 :term:`DEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05006228 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6229 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006230 BitBake User Manual for additional information on tasks and
6231 dependencies.
6232
Andrew Geissler5199d832021-09-24 16:47:35 -05006233 :term:`RECIPE_NO_UPDATE_REASON`
6234 If a recipe should not be replaced by a more recent upstream version,
6235 putting the reason why in this variable in a recipe allows
6236 ``devtool check-upgrade-status`` command to display it, as explained
6237 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6238 section.
6239
Andrew Geisslerf0343792020-11-18 10:42:21 -06006240 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006241 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006242 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006243 class, this variable identifies distribution features that must exist
6244 in the current configuration in order for the OpenEmbedded build
6245 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006246 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6247 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006248 the recipe will be skipped, and if the build system attempts to build
6249 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006250
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006251 :term:`REQUIRED_VERSION`
6252 If there are multiple versions of a recipe available, this variable
6253 determines which version should be given preference.
6254 :term:`REQUIRED_VERSION` works in exactly the same manner as
6255 :term:`PREFERRED_VERSION`, except that if the specified version is not
6256 available then an error message is shown and the build fails
6257 immediately.
6258
6259 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6260 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6261
Andrew Geisslerf0343792020-11-18 10:42:21 -06006262 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006263 With ``rm_work`` enabled, this variable specifies a list of recipes
6264 whose work directories should not be removed. See the
Andrew Geissler595f6302022-01-24 19:11:47 +00006265 ":ref:`ref-classes-rm-work`" section for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006266 details.
6267
Andrew Geisslerf0343792020-11-18 10:42:21 -06006268 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006269 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006270 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006271
6272 ROOT_HOME ??= "/home/root"
6273
6274 .. note::
6275
6276 This default value is likely used because some embedded solutions
6277 prefer to have a read-only root filesystem and prefer to keep
6278 writeable data in one place.
6279
6280 You can override the default by setting the variable in any layer or
6281 in the ``local.conf`` file. Because the default is set using a "weak"
6282 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006283 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006284
6285 ROOT_HOME = "/root"
6286 ROOT_HOME ?= "/root"
6287
6288 These
6289 override examples use ``/root``, which is probably the most commonly
6290 used override.
6291
Andrew Geisslerf0343792020-11-18 10:42:21 -06006292 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006293 Indicates a filesystem image to include as the root filesystem.
6294
Andrew Geissler09036742021-06-25 14:25:14 -05006295 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006296 :ref:`image-live <ref-classes-image-live>` class.
6297
Andrew Geisslerf0343792020-11-18 10:42:21 -06006298 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006299 Specifies a list of functions to call after the OpenEmbedded build
6300 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006301 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006302
6303 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6304
6305 If you need to pass the root filesystem path to a command within a
6306 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6307 directory that becomes the root filesystem image. See the
6308 :term:`IMAGE_ROOTFS` variable for more
6309 information.
6310
Andrew Geisslerf0343792020-11-18 10:42:21 -06006311 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006312 Specifies a list of functions to call once the OpenEmbedded build
6313 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006314 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006315
6316 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6317
6318 If you need to pass the root filesystem path to a command within a
6319 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6320 directory that becomes the root filesystem image. See the
6321 :term:`IMAGE_ROOTFS` variable for more
6322 information.
6323
Andrew Geisslerf0343792020-11-18 10:42:21 -06006324 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006325 Specifies a list of functions to call after the OpenEmbedded build
6326 system has removed unnecessary packages. When runtime package
6327 management is disabled in the image, several packages are removed
6328 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006329 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006330
6331 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6332
6333 If you need to pass the root filesystem path to a command within a
6334 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6335 directory that becomes the root filesystem image. See the
6336 :term:`IMAGE_ROOTFS` variable for more
6337 information.
6338
Andrew Geisslerf0343792020-11-18 10:42:21 -06006339 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006340 Specifies a list of functions to call before the OpenEmbedded build
6341 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006342 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006343
6344 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6345
6346 If you need to pass the root filesystem path to a command within a
6347 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6348 directory that becomes the root filesystem image. See the
6349 :term:`IMAGE_ROOTFS` variable for more
6350 information.
6351
Andrew Geisslerf0343792020-11-18 10:42:21 -06006352 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006353 A list of package name aliases that a package also provides. These
6354 aliases are useful for satisfying runtime dependencies of other
6355 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006356 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006357
6358 .. note::
6359
Andrew Geissler09036742021-06-25 14:25:14 -05006360 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006361
6362 As with all package-controlling variables, you must always use the
6363 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006364 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006365
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006366 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006367
Andrew Geisslerf0343792020-11-18 10:42:21 -06006368 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006369 A list of packages that extends the usability of a package being
6370 built. The package being built does not depend on this list of
6371 packages in order to successfully build, but rather uses them for
6372 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006373 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006374
Andrew Geissler09036742021-06-25 14:25:14 -05006375 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006376 list of packages when installing the built package. However, you can
6377 prevent listed packages from being installed by using the
6378 :term:`BAD_RECOMMENDATIONS`,
6379 :term:`NO_RECOMMENDATIONS`, and
6380 :term:`PACKAGE_EXCLUDE` variables.
6381
Andrew Geissler09036742021-06-25 14:25:14 -05006382 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006383 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006384 through the :term:`PACKAGES` or
6385 :term:`PACKAGES_DYNAMIC` variables or the
6386 :term:`RPROVIDES` variable, or an error will occur
6387 during the build. If such a recipe does exist and the package is not
6388 produced, the build continues without error.
6389
Andrew Geissler09036742021-06-25 14:25:14 -05006390 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006391 you should always attach an override to the variable to specify the
6392 particular package whose usability is being extended. For example,
6393 suppose you are building a development package that is extended to
6394 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006395 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006396
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006397 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006398
6399 In the
6400 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006401 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006402 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006403
6404 BitBake, which the OpenEmbedded build system uses, supports
6405 specifying versioned recommends. Although the syntax varies depending
6406 on the packaging format, BitBake hides these differences from you.
6407 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006408 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006409
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006410 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006411
6412 For ``operator``, you can specify the following:
6413
6414 - =
6415 - <
6416 - >
6417 - <=
6418 - >=
6419
6420 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006421 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006422
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006423 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006424
Andrew Geisslerf0343792020-11-18 10:42:21 -06006425 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006426 A list of packages replaced by a package. The package manager uses
6427 this variable to determine which package should be installed to
6428 replace other package(s) during an upgrade. In order to also have the
6429 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05006430 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006431
6432 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05006433 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006434
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006435 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006436
6437 BitBake, which the OpenEmbedded build system uses, supports
6438 specifying versioned replacements. Although the syntax varies
6439 depending on the packaging format, BitBake hides these differences
6440 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006441 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006442
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006443 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006444
6445 For ``operator``, you can specify the following:
6446
6447 - =
6448 - <
6449 - >
6450 - <=
6451 - >=
6452
6453 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05006454 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006455
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006456 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006457
Andrew Geisslerf0343792020-11-18 10:42:21 -06006458 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006459 A list of additional packages that you can suggest for installation
6460 by the package manager at the time a package is installed. Not all
6461 package managers support this functionality.
6462
6463 As with all package-controlling variables, you must always use this
6464 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006465 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006466
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006467 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006468
Andrew Geisslerf0343792020-11-18 10:42:21 -06006469 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006470 The location in the :term:`Build Directory` where
6471 unpacked recipe source code resides. By default, this directory is
6472 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6473 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6474 version. If the source tarball extracts the code to a directory named
6475 anything other than ``${BPN}-${PV}``, or if the source code is
6476 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05006477 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006478 to find the unpacked source.
6479
6480 As an example, assume a :term:`Source Directory`
6481 top-level folder named ``poky`` and a default Build Directory at
6482 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05006483 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006484
6485 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6486
6487 The unpacked source code resides in the ``db-5.1.19`` folder.
6488
6489 This next example assumes a Git repository. By default, Git
6490 repositories are cloned to ``${WORKDIR}/git`` during
6491 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05006492 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006493 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006494
Andrew Geissler9aee5002022-03-30 16:27:02 +00006495 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006496 S = "${WORKDIR}/git"
6497
Andrew Geisslerf0343792020-11-18 10:42:21 -06006498 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006499 Specifies a list of command-line utilities that should be checked for
6500 during the initial sanity checking process when running BitBake. If
6501 any of the utilities are not installed on the build host, then
6502 BitBake immediately exits with an error.
6503
Andrew Geisslerf0343792020-11-18 10:42:21 -06006504 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006505 A list of the host distribution identifiers that the build system has
6506 been tested against. Identifiers consist of the host distributor ID
6507 followed by the release, as reported by the ``lsb_release`` tool or
6508 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05006509 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006510 not empty and the current value of
6511 :term:`NATIVELSBSTRING` does not appear in the
6512 list, then the build system reports a warning that indicates the
6513 current host distribution has not been tested as a build host.
6514
Andrew Geisslerf0343792020-11-18 10:42:21 -06006515 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006516 The target architecture for the SDK. Typically, you do not directly
6517 set this variable. Instead, use :term:`SDKMACHINE`.
6518
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006519 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05006520 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006521 "1" and a ``conf/templateconf.conf`` file exists in the build directory
6522 (:term:`TOPDIR`) then this will be copied into the SDK.
6523
Andrew Geisslerf0343792020-11-18 10:42:21 -06006524 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006525 The directory set up and used by the
6526 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6527 the SDK is deployed. The ``populate_sdk_base`` class defines
Andrew Geissler09036742021-06-25 14:25:14 -05006528 :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006529
6530 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6531
Andrew Geisslerf0343792020-11-18 10:42:21 -06006532 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006533 The parent directory used by the OpenEmbedded build system when
6534 creating SDK output. The
6535 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05006536 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006537
6538 SDK_DIR = "${WORKDIR}/sdk"
6539
6540 .. note::
6541
Andrew Geissler09036742021-06-25 14:25:14 -05006542 The :term:`SDK_DIR` directory is a temporary directory as it is part of
6543 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006544
Andrew Geisslerf0343792020-11-18 10:42:21 -06006545 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006546 Controls whether or not shared state artifacts are copied into the
6547 extensible SDK. The default value of "full" copies all of the
6548 required shared state artifacts into the extensible SDK. The value
6549 "minimal" leaves these artifacts out of the SDK.
6550
6551 .. note::
6552
6553 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006554 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6555 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006556
Andrew Geisslerf0343792020-11-18 10:42:21 -06006557 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006558 The manifest file for the host part of the SDK. This file lists all
6559 the installed packages that make up the host part of the SDK. The
6560 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006561 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006562
6563 packagename packagearch version
6564
6565 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006566 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006567
6568 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6569
6570 The location is derived using the :term:`SDK_DEPLOY` and
6571 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6572
Andrew Geisslerf0343792020-11-18 10:42:21 -06006573 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006574 When set to "1", specifies to include the packagedata for all recipes
6575 in the "world" target in the extensible SDK. Including this data
6576 allows the ``devtool search`` command to find these recipes in search
6577 results, as well as allows the ``devtool add`` command to map
6578 dependencies more effectively.
6579
6580 .. note::
6581
Andrew Geissler09036742021-06-25 14:25:14 -05006582 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006583 variable significantly increases build time because all of world
6584 needs to be built. Enabling the variable also slightly increases
6585 the size of the extensible SDK.
6586
Andrew Geisslerf0343792020-11-18 10:42:21 -06006587 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006588 When set to "1", specifies to include the toolchain in the extensible
6589 SDK. Including the toolchain is useful particularly when
6590 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6591 the SDK reasonably small but you still want to provide a usable
6592 toolchain. For example, suppose you want to use the toolchain from an
6593 IDE or from other tools and you do not want to perform additional
6594 steps to install the toolchain.
6595
Andrew Geissler09036742021-06-25 14:25:14 -05006596 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6597 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6598 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006599
Andrew Geisslerf0343792020-11-18 10:42:21 -06006600 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006601 The base name for SDK output files. The name is derived from the
6602 :term:`DISTRO`, :term:`TCLIBC`,
6603 :term:`SDK_ARCH`,
6604 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05006605 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006606
6607 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6608
Andrew Geisslerf0343792020-11-18 10:42:21 -06006609 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006610 Specifies the operating system for which the SDK will be built. The
6611 default value is the value of :term:`BUILD_OS`.
6612
Andrew Geisslerf0343792020-11-18 10:42:21 -06006613 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006614 The location used by the OpenEmbedded build system when creating SDK
6615 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05006616 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006617
6618 SDK_DIR = "${WORKDIR}/sdk"
6619 SDK_OUTPUT = "${SDK_DIR}/image"
6620 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6621
6622 .. note::
6623
Andrew Geissler09036742021-06-25 14:25:14 -05006624 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006625 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6626 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006627
Andrew Geisslerf0343792020-11-18 10:42:21 -06006628 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006629 Specifies a list of architectures compatible with the SDK machine.
6630 This variable is set automatically and should not normally be
6631 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05006632 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006633 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6634
Andrew Geisslerf0343792020-11-18 10:42:21 -06006635 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006636 Specifies a list of functions to call once the OpenEmbedded build
6637 system creates the SDK. You can specify functions separated by
6638 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6639
6640 If you need to pass an SDK path to a command within a function, you
6641 can use ``${SDK_DIR}``, which points to the parent directory used by
6642 the OpenEmbedded build system when creating SDK output. See the
6643 :term:`SDK_DIR` variable for more information.
6644
Andrew Geisslerf0343792020-11-18 10:42:21 -06006645 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006646 The toolchain binary prefix used for ``nativesdk`` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05006647 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006648 :term:`TARGET_PREFIX` when building
6649 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6650
Andrew Geisslerf0343792020-11-18 10:42:21 -06006651 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006652 A list of shared state tasks added to the extensible SDK. By default,
6653 the following tasks are added:
6654
6655 - do_populate_lic
6656 - do_package_qa
6657 - do_populate_sysroot
6658 - do_deploy
6659
6660 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05006661 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006662 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05006663 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006664 tasks that are needed in order to build
6665 :term:`SDK_TARGETS`).
6666
Andrew Geisslerf0343792020-11-18 10:42:21 -06006667 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006668 Specifies the system, including the architecture and the operating
6669 system, for which the SDK will be built.
6670
6671 The OpenEmbedded build system automatically sets this variable based
6672 on :term:`SDK_ARCH`,
6673 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05006674 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006675 variable yourself.
6676
Andrew Geisslerf0343792020-11-18 10:42:21 -06006677 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006678 The manifest file for the target part of the SDK. This file lists all
6679 the installed packages that make up the target part of the SDK. The
6680 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006681 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006682
6683 packagename packagearch version
6684
6685 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006686 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006687
6688 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6689
6690 The location is derived using the :term:`SDK_DEPLOY` and
6691 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6692
Andrew Geisslerf0343792020-11-18 10:42:21 -06006693 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006694 A list of targets to install from shared state as part of the
6695 standard or extensible SDK installation. The default value is "${PN}"
6696 (i.e. the image from which the SDK is built).
6697
Andrew Geissler09036742021-06-25 14:25:14 -05006698 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006699 would not be changed.
6700
Andrew Geisslerf0343792020-11-18 10:42:21 -06006701 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006702 The title to be printed when running the SDK installer. By default,
6703 this title is based on the :term:`DISTRO_NAME` or
6704 :term:`DISTRO` variable and is set in the
6705 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006706 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006707
6708 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6709
6710 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006711 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006712
6713 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006714 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006715 section in the Yocto Project Application Development and the
6716 Extensible Software Development Kit (eSDK) manual.
6717
Andrew Geisslerf0343792020-11-18 10:42:21 -06006718 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006719 An optional URL for an update server for the extensible SDK. If set,
6720 the value is used as the default update server when running
6721 ``devtool sdk-update`` within the extensible SDK.
6722
Andrew Geisslerf0343792020-11-18 10:42:21 -06006723 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006724 Specifies the name of the SDK vendor.
6725
Andrew Geisslerf0343792020-11-18 10:42:21 -06006726 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006727 Specifies the version of the SDK. The Poky distribution configuration file
6728 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05006729 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006730
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006731 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006732
6733 For additional information, see the
6734 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006735 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006736
Andrew Geisslerf0343792020-11-18 10:42:21 -06006737 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006738 The default installation directory for the Extensible SDK. By
6739 default, this directory is based on the :term:`DISTRO`
6740 variable and is set in the
6741 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006742 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006743
6744 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6745
6746 For the
Andrew Geissler09036742021-06-25 14:25:14 -05006747 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006748
6749 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006750 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006751 section in the Yocto Project Application Development and the
6752 Extensible Software Development Kit (eSDK) manual.
6753
Andrew Geisslerf0343792020-11-18 10:42:21 -06006754 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05006755 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006756 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006757
6758 $ bitbake -c populate_sdk imagename
6759
Andrew Geisslerf0343792020-11-18 10:42:21 -06006760 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00006761 The machine for which the SDK is built. In other words, the SDK is built
6762 such that it runs on the target you specify with the :term:`SDKMACHINE`
6763 value. The value points to a corresponding ``.conf`` file under
6764 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
6765 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
6766 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006767
Andrew Geissler595f6302022-01-24 19:11:47 +00006768 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
6769 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006770
6771 .. note::
6772
Andrew Geissler09036742021-06-25 14:25:14 -05006773 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006774 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00006775 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006776
Andrew Geisslerf0343792020-11-18 10:42:21 -06006777 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006778 Defines the path offered to the user for installation of the SDK that
6779 is generated by the OpenEmbedded build system. The path appears as
6780 the default location for installing the SDK when you run the SDK's
6781 installation script. You can override the offered path when you run
6782 the script.
6783
Andrew Geisslerf0343792020-11-18 10:42:21 -06006784 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006785 The full path to the sysroot used for cross-compilation within an SDK
6786 as it will be when installed into the default
6787 :term:`SDKPATH`.
6788
Andrew Geisslerf0343792020-11-18 10:42:21 -06006789 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006790 The section in which packages should be categorized. Package
6791 management utilities can make use of this variable.
6792
Andrew Geisslerf0343792020-11-18 10:42:21 -06006793 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006794 Specifies the optimization flags passed to the C compiler when
6795 building for the target. The flags are passed through the default
6796 value of the :term:`TARGET_CFLAGS` variable.
6797
Andrew Geissler09036742021-06-25 14:25:14 -05006798 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006799 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
6800 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006801
Andrew Geisslerf0343792020-11-18 10:42:21 -06006802 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006803 Defines a serial console (TTY) to enable using
6804 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6805 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006806 separated by a space. You cannot specify more than one TTY device::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006807
6808 SERIAL_CONSOLE = "115200 ttyS0"
6809
6810 .. note::
6811
Andrew Geissler09036742021-06-25 14:25:14 -05006812 The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006813 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006814
Andrew Geisslerf0343792020-11-18 10:42:21 -06006815 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006816 Defines a serial console (TTY) to enable using
6817 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6818 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006819 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006820
6821 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6822
Andrew Geisslerf0343792020-11-18 10:42:21 -06006823 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006824 Specifies serial consoles, which must be listed in
6825 :term:`SERIAL_CONSOLES`, to check against
6826 ``/proc/console`` before enabling them using getty. This variable
6827 allows aliasing in the format: <device>:<alias>. If a device was
6828 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006829 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006830
6831 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6832
6833 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006834 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
6835 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
6836 incompatible with customizations such as the following::
6837
6838 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006839
Andrew Geissler595f6302022-01-24 19:11:47 +00006840 :term:`SETUPTOOLS_BUILD_ARGS`
6841 When used by recipes that inherit the
6842 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6843 be used to specify additional arguments to be passed to ``setup.py build``
6844 in the ``setuptools3_do_compile()`` task.
6845
6846 :term:`SETUPTOOLS_INSTALL_ARGS`
6847 When used by recipes that inherit the
6848 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6849 be used to specify additional arguments to be passed to ``setup.py install``
6850 in the ``setuptools3_do_install()`` task.
6851
6852 :term:`SETUPTOOLS_SETUP_PATH`
6853 When used by recipes that inherit the
6854 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
6855 be used to specify the directory in which the ``setup.py`` file is
6856 located if it is not at the root of the source tree (as specified by
6857 :term:`S`). For example, in a recipe where the sources are fetched from
6858 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
6859 subdirectory, you would have this::
6860
6861 S = "${WORKDIR}/git"
6862 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
6863
Andrew Geisslerf0343792020-11-18 10:42:21 -06006864 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006865 A list of recipe dependencies that should not be used to determine
6866 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05006867 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006868
6869 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6870
6871 In the previous example, ``intone`` depends on ``mplayer2``.
6872
6873 You can use the special token ``"*"`` on the left-hand side of the
6874 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05006875 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006876
6877 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6878
6879 In the previous example, all recipes except ``quilt-native`` ignore
6880 task signatures from the ``quilt-native`` recipe when determining
6881 their task signatures.
6882
6883 Use of this variable is one mechanism to remove dependencies that
6884 affect task signatures and thus force rebuilds when a recipe changes.
6885
6886 .. note::
6887
6888 If you add an inappropriate dependency for a recipe relationship,
6889 the software might break during runtime if the interface of the
6890 second recipe was changed after the first recipe had been built.
6891
Andrew Geisslerf0343792020-11-18 10:42:21 -06006892 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006893 A list of recipes that are completely stable and will never change.
6894 The ABI for the recipes in the list are presented by output from the
6895 tasks run to build the recipe. Use of this variable is one way to
6896 remove dependencies from one recipe on another that affect task
6897 signatures and thus force rebuilds when the recipe changes.
6898
6899 .. note::
6900
6901 If you add an inappropriate variable to this list, the software
6902 might break at runtime if the interface of the recipe was changed
6903 after the other had been built.
6904
Andrew Geisslerf0343792020-11-18 10:42:21 -06006905 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006906 Specifies the number of bits for the target system CPU. The value
6907 should be either "32" or "64".
6908
Andrew Geisslerf0343792020-11-18 10:42:21 -06006909 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006910 Specifies the endian byte order of the target system. The value
6911 should be either "le" for little-endian or "be" for big-endian.
6912
Andrew Geisslerf0343792020-11-18 10:42:21 -06006913 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006914 Enables removal of all files from the "Provides" section of an RPM
6915 package. Removal of these files is required for packages containing
6916 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6917
6918 To enable file removal, set the variable to "1" in your
6919 ``conf/local.conf`` configuration file in your:
6920 :term:`Build Directory`.
6921 ::
6922
6923 SKIP_FILEDEPS = "1"
6924
Andrew Geissler9aee5002022-03-30 16:27:02 +00006925 :term:`SKIP_RECIPE`
6926 Used to prevent the OpenEmbedded build system from building a given
6927 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
6928 and provide a reason, which will be reported when attempting to
6929 build the recipe.
6930
6931 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
6932 variable in your ``local.conf`` file or distribution configuration.
6933 Here is an example which prevents ``myrecipe`` from being built::
6934
6935 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
6936
Andrew Geisslerf0343792020-11-18 10:42:21 -06006937 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006938 Groups together machines based upon the same family of SOC (System On
6939 Chip). You typically set this variable in a common ``.inc`` file that
6940 you include in the configuration files of all the machines.
6941
6942 .. note::
6943
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006944 You must include ``conf/machine/include/soc-family.inc`` for this
6945 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006946
Andrew Geisslerf0343792020-11-18 10:42:21 -06006947 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006948 Defines the suffix for shared libraries used on the target platform.
6949 By default, this suffix is ".so.*" for all Linux-based systems and is
6950 defined in the ``meta/conf/bitbake.conf`` configuration file.
6951
6952 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006953 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006954
Andrew Geisslerf0343792020-11-18 10:42:21 -06006955 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006956 Defines the suffix for the development symbolic link (symlink) for
6957 shared libraries on the target platform. By default, this suffix is
6958 ".so" for Linux-based systems and is defined in the
6959 ``meta/conf/bitbake.conf`` configuration file.
6960
6961 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006962 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006963
Andrew Geisslereff27472021-10-29 15:35:00 -05006964 :term:`SOURCE_DATE_EPOCH`
6965 This defines a date expressed in number of seconds since
6966 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
6967 multiple build systems to force a timestamp in built binaries.
6968 Many upstream projects already support this variable.
6969
6970 You will find more details in the `official specifications
6971 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
6972
6973 A value for each recipe is computed from the sources by
6974 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
6975
6976 If a recipe wishes to override the default behavior, it should set its
6977 own :term:`SOURCE_DATE_EPOCH` value::
6978
6979 SOURCE_DATE_EPOCH = "1613559011"
6980
Andrew Geisslerf0343792020-11-18 10:42:21 -06006981 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006982 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05006983 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006984 your ``local.conf`` configuration file ensures the source for all
6985 recipes are fetched regardless of whether or not a recipe is
6986 compatible with the configuration. A recipe is considered
6987 incompatible with the currently configured machine when either or
6988 both the :term:`COMPATIBLE_MACHINE`
6989 variable and :term:`COMPATIBLE_HOST` variables
6990 specify compatibility with a machine other than that of the current
6991 machine or host.
6992
6993 .. note::
6994
Andrew Geissler09036742021-06-25 14:25:14 -05006995 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006996 variable unless you are creating a source mirror. In other words,
6997 do not set the variable during a normal build.
6998
Andrew Geisslerf0343792020-11-18 10:42:21 -06006999 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007000 Defines your own :term:`PREMIRRORS` from which to
7001 first fetch source before attempting to fetch from the upstream
7002 specified in :term:`SRC_URI`.
7003
7004 To use this variable, you must globally inherit the
7005 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007006 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007007
7008 INHERIT += "own-mirrors"
7009 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7010
7011 .. note::
7012
Andrew Geissler09036742021-06-25 14:25:14 -05007013 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007014
Andrew Geisslerf0343792020-11-18 10:42:21 -06007015 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007016 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007017 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007018 mappings, see the ``meta/conf/licenses.conf`` file.
7019
7020 For additional information, see the :term:`LICENSE`
7021 variable.
7022
Andrew Geisslerf0343792020-11-18 10:42:21 -06007023 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007024 A list of prefixes for :term:`PN` used by the OpenEmbedded
7025 build system to create variants of recipes or packages. The list
7026 specifies the prefixes to strip off during certain circumstances such
7027 as the generation of the :term:`BPN` variable.
7028
Andrew Geisslerf0343792020-11-18 10:42:21 -06007029 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007030 The file type for the Secondary Program Loader (SPL). Some devices
7031 use an SPL from which to boot (e.g. the BeagleBone development
7032 board). For such cases, you can declare the file type of the SPL
7033 binary in the ``u-boot.inc`` include file, which is used in the
7034 U-Boot recipe.
7035
7036 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007037 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007038
7039 # Some versions of u-boot build an SPL (Second Program Loader) image that
7040 # should be packaged along with the u-boot binary as well as placed in the
7041 # deploy directory. For those versions they can set the following variables
7042 # to allow packaging the SPL.
7043 SPL_BINARY ?= ""
7044 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7045 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7046 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7047
Andrew Geissler09036742021-06-25 14:25:14 -05007048 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007049 various ``SPL_*`` variables used by the OpenEmbedded build system.
7050
7051 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007052 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007053 section in the Yocto Project Board Support Package Developer's Guide
7054 for additional information.
7055
Andrew Geisslerf0343792020-11-18 10:42:21 -06007056 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007057
Andrew Geissler595f6302022-01-24 19:11:47 +00007058 See the BitBake manual for the initial description for this variable:
7059 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007060
Andrew Geissler595f6302022-01-24 19:11:47 +00007061 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007062
Andrew Geissler595f6302022-01-24 19:11:47 +00007063 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007064
7065 - ``apply`` - Whether to apply the patch or not. The default
7066 action is to apply the patch.
7067
7068 - ``striplevel`` - Which striplevel to use when applying the
7069 patch. The default level is 1.
7070
7071 - ``patchdir`` - Specifies the directory in which the patch should
7072 be applied. The default is ``${``\ :term:`S`\ ``}``.
7073
7074 Here are options specific to recipes building code from a revision
7075 control system:
7076
7077 - ``mindate`` - Apply the patch only if
7078 :term:`SRCDATE` is equal to or greater than
7079 ``mindate``.
7080
Andrew Geissler09036742021-06-25 14:25:14 -05007081 - ``maxdate`` - Apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007082 than ``maxdate``.
7083
Andrew Geissler09036742021-06-25 14:25:14 -05007084 - ``minrev`` - Apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007085 greater than ``minrev``.
7086
Andrew Geissler09036742021-06-25 14:25:14 -05007087 - ``maxrev`` - Apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007088 than ``maxrev``.
7089
Andrew Geissler09036742021-06-25 14:25:14 -05007090 - ``rev`` - Apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007091 ``rev``.
7092
Andrew Geissler09036742021-06-25 14:25:14 -05007093 - ``notrev`` - Apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007094 ``rev``.
7095
Andrew Geissler595f6302022-01-24 19:11:47 +00007096 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007097
Andrew Geissler595f6302022-01-24 19:11:47 +00007098 If you want the build system to pick up files specified through
7099 a :term:`SRC_URI` statement from your append file, you need to be
7100 sure to extend the :term:`FILESPATH` variable by also using the
7101 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007102
Andrew Geisslerf0343792020-11-18 10:42:21 -06007103 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007104 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007105 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007106 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007107 variable to "0" disables this behavior.
7108
Andrew Geisslerf0343792020-11-18 10:42:21 -06007109 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007110 The date of the source code used to build the package. This variable
7111 applies only if the source was fetched from a Source Code Manager
7112 (SCM).
7113
Andrew Geisslerf0343792020-11-18 10:42:21 -06007114 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007115 Returns the version string of the current package. This string is
7116 used to help define the value of :term:`PV`.
7117
Andrew Geissler09036742021-06-25 14:25:14 -05007118 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007119 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007120 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007121
7122 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7123
Andrew Geissler09036742021-06-25 14:25:14 -05007124 Recipes that need to define :term:`PV` do so with the help of the
7125 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007126 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007127 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007128
7129 PV = "0.12-git${SRCPV}"
7130
Andrew Geisslerf0343792020-11-18 10:42:21 -06007131 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007132 The revision of the source code used to build the package. This
7133 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7134 that if you want to build a fixed revision and you want to avoid
7135 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007136 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007137 identifier and not just a tag.
7138
7139 .. note::
7140
7141 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007142 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007143 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007144 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007145 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007146
Andrew Geissler09036742021-06-25 14:25:14 -05007147 :term:`SRCTREECOVEREDTASKS`
7148 A list of tasks that are typically not relevant (and therefore skipped)
7149 when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7150 class. The default value as set in that class file is the set of tasks
7151 that are rarely needed when using external source::
7152
7153 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7154
7155 The notable exception is when processing external kernel source as
7156 defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7157 class file (formatted for aesthetics)::
7158
7159 SRCTREECOVEREDTASKS += "\
7160 do_validate_branches \
7161 do_kernel_configcheck \
7162 do_kernel_checkout \
7163 do_fetch \
7164 do_unpack \
7165 do_patch \
7166 "
7167
7168 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7169 variables for more information.
7170
Andrew Geisslerf0343792020-11-18 10:42:21 -06007171 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007172 The directory for the shared state cache.
7173
Andrew Geisslerf0343792020-11-18 10:42:21 -06007174 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007175 If set to "1", allows fetches from mirrors that are specified in
7176 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007177 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7178 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7179 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007180 your shared state cache, but you want to disable any other fetching
7181 from the network.
7182
Andrew Geisslerf0343792020-11-18 10:42:21 -06007183 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007184 Configures the OpenEmbedded build system to search other mirror
7185 locations for prebuilt cache data objects before building out the
7186 data. This variable works like fetcher :term:`MIRRORS`
7187 and :term:`PREMIRRORS` and points to the cache
7188 locations to check for the shared state (sstate) objects.
7189
7190 You can specify a filesystem directory or a remote URL such as HTTP
7191 or FTP. The locations you specify need to contain the shared state
7192 cache (sstate-cache) results from previous builds. The sstate-cache
7193 you point to can also be from builds on other machines.
7194
7195 When pointing to sstate build artifacts on another machine that uses
7196 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007197 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007198 paths to server paths. The paths need to take into account
7199 :term:`NATIVELSBSTRING` set by the
7200 :ref:`uninative <ref-classes-uninative>` class. For example, the
7201 following maps the local search path ``universal-4.9`` to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007202 server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007203
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007204 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007205
7206 If a mirror uses the same structure as
7207 :term:`SSTATE_DIR`, you need to add "PATH" at the
7208 end as shown in the examples below. The build system substitutes the
7209 correct path within the directory structure.
7210 ::
7211
7212 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007213 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007214 file://.* file:///some-local-dir/sstate/PATH"
7215
Andrew Geisslerf0343792020-11-18 10:42:21 -06007216 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007217 Controls the list of files the OpenEmbedded build system scans for
7218 hardcoded installation paths. The variable uses a space-separated
7219 list of filenames (not paths) with standard wildcard characters
7220 allowed.
7221
7222 During a build, the OpenEmbedded build system creates a shared state
7223 (sstate) object during the first stage of preparing the sysroots.
7224 That object is scanned for hardcoded paths for original installation
7225 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007226 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7227 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007228 than the variable being comprehensively set. The
7229 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7230 of files.
7231
7232 For details on the process, see the
7233 :ref:`staging <ref-classes-staging>` class.
7234
Andrew Geisslerf0343792020-11-18 10:42:21 -06007235 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007236 Specifies the path to the ``/lib`` subdirectory of the sysroot
7237 directory for the build host.
7238
Andrew Geisslerf0343792020-11-18 10:42:21 -06007239 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007240 Specifies the path to the ``/lib`` subdirectory of the sysroot
7241 directory for the target for which the current recipe is being built
7242 (:term:`STAGING_DIR_HOST`).
7243
Andrew Geisslerf0343792020-11-18 10:42:21 -06007244 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007245 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7246 directory for the target for which the current recipe is being built
7247 (:term:`STAGING_DIR_HOST`).
7248
Andrew Geisslerf0343792020-11-18 10:42:21 -06007249 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007250 Specifies the path to the directory containing binary configuration
7251 scripts. These scripts provide configuration information for other
7252 software that wants to make use of libraries or include files
7253 provided by the software associated with the script.
7254
7255 .. note::
7256
7257 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007258 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7259 library to which you are linking, it is recommended you use
7260 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007261
Andrew Geisslerf0343792020-11-18 10:42:21 -06007262 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007263 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7264 directory for the build host.
7265
Andrew Geisslerf0343792020-11-18 10:42:21 -06007266 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007267 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7268 directory for the target for which the current recipe is being built
7269 (:term:`STAGING_DIR_HOST`).
7270
Andrew Geisslerf0343792020-11-18 10:42:21 -06007271 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007272 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7273 directory for the build host.
7274
Andrew Geisslerf0343792020-11-18 10:42:21 -06007275 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007276 Helps construct the ``recipe-sysroots`` directory, which is used
7277 during packaging.
7278
7279 For information on how staging for recipe-specific sysroots occurs,
7280 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007281 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007282 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007283 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007284 section in the Yocto Project Overview and Concepts Manual, and the
7285 :term:`SYSROOT_DIRS` variable.
7286
7287 .. note::
7288
Andrew Geissler09036742021-06-25 14:25:14 -05007289 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007290 directory because the OpenEmbedded build system manages the
7291 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007292 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007293 task and then the OpenEmbedded build system will stage a subset of
7294 those files into the sysroot.
7295
Andrew Geisslerf0343792020-11-18 10:42:21 -06007296 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007297 Specifies the path to the sysroot directory for the system on which
7298 the component is built to run (the system that hosts the component).
7299 For most recipes, this sysroot is the one in which that recipe's
7300 :ref:`ref-tasks-populate_sysroot` task copies
7301 files. Exceptions include ``-native`` recipes, where the
7302 ``do_populate_sysroot`` task instead uses
7303 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007304 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007305 have the following values:
7306
7307 - For recipes building for the target machine, the value is
7308 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7309
7310 - For native recipes building for the build host, the value is empty
7311 given the assumption that when building for the build host, the
7312 build host's own directories should be used.
7313
7314 .. note::
7315
7316 ``-native`` recipes are not installed into host paths like such
7317 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04007318 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007319 standard build environment variables such as
7320 :term:`CPPFLAGS` and
7321 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05007322 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007323 headers using, for example, GCC's ``-isystem`` option.
7324
7325 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7326 should be viewed as input variables by tasks such as
7327 :ref:`ref-tasks-configure`,
7328 :ref:`ref-tasks-compile`, and
7329 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05007330 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007331 for ``-native`` recipes, as they make use of host headers and
7332 libraries.
7333
Andrew Geisslerf0343792020-11-18 10:42:21 -06007334 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007335 Specifies the path to the sysroot directory used when building
7336 components that run on the build host itself.
7337
Andrew Geisslerf0343792020-11-18 10:42:21 -06007338 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007339 Specifies the path to the sysroot used for the system for which the
7340 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05007341 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007342 :term:`STAGING_DIR_HOST`.
7343
7344 Some recipes build binaries that can run on the target system but
7345 those binaries in turn generate code for another different system
7346 (e.g. cross-canadian recipes). Using terminology from GNU, the
7347 primary system is referred to as the "HOST" and the secondary, or
7348 different, system is referred to as the "TARGET". Thus, the binaries
7349 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05007350 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7351 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007352 sysroot used for the "TARGET" system.
7353
Andrew Geisslerf0343792020-11-18 10:42:21 -06007354 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007355 Specifies the path to the ``/etc`` subdirectory of the sysroot
7356 directory for the build host.
7357
Andrew Geisslerf0343792020-11-18 10:42:21 -06007358 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007359 Specifies the path to the ``/usr`` subdirectory of the sysroot
7360 directory for the target for which the current recipe is being built
7361 (:term:`STAGING_DIR_HOST`).
7362
Andrew Geisslerf0343792020-11-18 10:42:21 -06007363 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007364 Specifies the path to the ``/usr/include`` subdirectory of the
7365 sysroot directory for the target for which the current recipe being
7366 built (:term:`STAGING_DIR_HOST`).
7367
Andrew Geisslerf0343792020-11-18 10:42:21 -06007368 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007369 Specifies the path to the ``/usr/include`` subdirectory of the
7370 sysroot directory for the build host.
7371
Andrew Geisslerf0343792020-11-18 10:42:21 -06007372 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007373 Points to the directory containing the kernel build artifacts.
7374 Recipes building software that needs to access kernel build artifacts
7375 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05007376 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007377 after the kernel has been built.
7378
Andrew Geisslerf0343792020-11-18 10:42:21 -06007379 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007380 The directory with kernel headers that are required to build
7381 out-of-tree modules.
7382
Andrew Geisslerf0343792020-11-18 10:42:21 -06007383 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007384 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7385 directory for the target for which the current recipe is being built
7386 (:term:`STAGING_DIR_HOST`).
7387
Andrew Geisslerf0343792020-11-18 10:42:21 -06007388 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007389 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7390 directory for the build host.
7391
Andrew Geisslerf0343792020-11-18 10:42:21 -06007392 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007393 Specifies the base path used to create recipe stamp files. The path
7394 to an actual stamp file is constructed by evaluating this string and
7395 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05007396 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007397 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007398
7399 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7400
7401 For information on how BitBake uses stamp files to determine if a
7402 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007403 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007404 section in the Yocto Project Overview and Concepts Manual.
7405
7406 See :term:`STAMPS_DIR`,
7407 :term:`MULTIMACH_TARGET_SYS`,
7408 :term:`PN`, :term:`EXTENDPE`,
7409 :term:`PV`, and :term:`PR` for related variable
7410 information.
7411
Andrew Geisslerf0343792020-11-18 10:42:21 -06007412 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007413 Specifies the base directory in which the OpenEmbedded build system
7414 places stamps. The default directory is ``${TMPDIR}/stamps``.
7415
Andrew Geisslerf0343792020-11-18 10:42:21 -06007416 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007417 The minimal command and arguments to run ``strip``, which is used to
7418 strip symbols.
7419
Andrew Geisslerf0343792020-11-18 10:42:21 -06007420 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007421 The short (72 characters or less) summary of the binary package for
7422 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05007423 :term:`SUMMARY` is used to define the
7424 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007425 not set in the recipe.
7426
Andrew Geisslerf0343792020-11-18 10:42:21 -06007427 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007428 The directory in which files checked out of a Subversion system are
7429 stored.
7430
Andrew Geisslerf0343792020-11-18 10:42:21 -06007431 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007432 Specifies the kernel boot default console. If you want to use a
7433 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007434 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007435
7436 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7437
7438 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7439 this variable to null but then checks for a value later.
7440
Andrew Geisslerf0343792020-11-18 10:42:21 -06007441 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007442 Lists additional options to add to the syslinux file. You need to set
7443 this variable in your recipe. If you want to list multiple options,
7444 separate the options with a semicolon character (``;``).
7445
7446 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7447 to create a set of options.
7448
Andrew Geisslerf0343792020-11-18 10:42:21 -06007449 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007450 Specifies the alternate serial port or turns it off. To turn off
7451 serial, set this variable to an empty string in your recipe. The
7452 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007453 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007454
7455 SYSLINUX_SERIAL ?= "0 115200"
7456
7457 The class checks for and uses the variable as needed.
7458
Andrew Geisslerf0343792020-11-18 10:42:21 -06007459 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007460 Specifies the alternate console=tty... kernel boot argument. The
7461 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007462 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007463
7464 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7465
7466 The class checks for and uses the variable as needed.
7467
Andrew Geisslerf0343792020-11-18 10:42:21 -06007468 :term:`SYSLINUX_SPLASH`
7469 An ``.LSS`` file used as the background for the VGA boot menu when
7470 you use the boot menu. You need to set this variable in your recipe.
7471
7472 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7473 variable and if found, the OpenEmbedded build system installs the
7474 splash screen.
7475
7476 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007477 Points to the temporary directory under the work directory (default
7478 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7479 where the files populated into the sysroot are assembled during the
7480 :ref:`ref-tasks-populate_sysroot` task.
7481
Andrew Geisslerf0343792020-11-18 10:42:21 -06007482 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007483 Directories that are staged into the sysroot by the
7484 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05007485 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007486
7487 SYSROOT_DIRS = " \
7488 ${includedir} \
7489 ${libdir} \
7490 ${base_libdir} \
7491 ${nonarch_base_libdir} \
7492 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007493 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007494 "
7495
Andrew Geissler9aee5002022-03-30 16:27:02 +00007496 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007497 Directories that are not staged into the sysroot by the
7498 :ref:`ref-tasks-populate_sysroot` task. You
7499 can use this variable to exclude certain subdirectories of
7500 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007501 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007502
Andrew Geissler9aee5002022-03-30 16:27:02 +00007503 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007504 ${mandir} \
7505 ${docdir} \
7506 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007507 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007508 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05007509 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007510 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05007511 ${datadir}/gtk-doc/html \
7512 ${datadir}/installed-tests \
7513 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007514 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05007515 ${datadir}/terminfo \
7516 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007517 "
7518
Andrew Geisslerf0343792020-11-18 10:42:21 -06007519 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007520 Extra directories staged into the sysroot by the
7521 :ref:`ref-tasks-populate_sysroot` task for
7522 ``-native`` recipes, in addition to those specified in
7523 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05007524 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007525
7526 SYSROOT_DIRS_NATIVE = " \
7527 ${bindir} \
7528 ${sbindir} \
7529 ${base_bindir} \
7530 ${base_sbindir} \
7531 ${libexecdir} \
7532 ${sysconfdir} \
7533 ${localstatedir} \
7534 "
7535
7536 .. note::
7537
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007538 Programs built by ``-native`` recipes run directly from the sysroot
7539 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7540 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007541
Andrew Geisslerf0343792020-11-18 10:42:21 -06007542 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007543 A list of functions to execute after files are staged into the
7544 sysroot. These functions are usually used to apply additional
7545 processing on the staged files, or to stage additional files.
7546
Andrew Geisslerf0343792020-11-18 10:42:21 -06007547 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007548 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7549 this variable specifies whether the specified service in
7550 :term:`SYSTEMD_SERVICE` should start
7551 automatically or not. By default, the service is enabled to
7552 automatically start at boot time. The default setting is in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007553 :ref:`systemd <ref-classes-systemd>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007554
7555 SYSTEMD_AUTO_ENABLE ??= "enable"
7556
7557 You can disable the service by setting the variable to "disable".
7558
Andrew Geisslerf0343792020-11-18 10:42:21 -06007559 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007560 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007561 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007562 configuration file that should be used. By default, the
7563 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007564 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007565
7566 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf"
7567
7568 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007569 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007570
Andrew Geisslerf0343792020-11-18 10:42:21 -06007571 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007572 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007573 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007574 list of entry files (``*.conf``) to install that contain one boot
7575 entry per file. By default, the
7576 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007577 :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007578
7579 SYSTEMD_BOOT_ENTRIES ?= ""
7580
7581 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007582 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007583
Andrew Geisslerf0343792020-11-18 10:42:21 -06007584 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007585 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007586 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007587 boot menu timeout in seconds. By default, the
7588 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007589 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007590
7591 SYSTEMD_BOOT_TIMEOUT ?= "10"
7592
7593 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007594 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007595
Andrew Geisslerf0343792020-11-18 10:42:21 -06007596 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007597 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7598 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05007599 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007600 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007601 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007602
7603 SYSTEMD_PACKAGES ?= "${PN}"
7604
7605 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05007606 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007607 the build system can find the systemd unit files.
7608
Andrew Geisslerf0343792020-11-18 10:42:21 -06007609 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007610 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7611 this variable specifies the systemd service name for a package.
7612
7613 When you specify this file in your recipe, use a package name
7614 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007615 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007616
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007617 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007618
Andrew Geisslerf0343792020-11-18 10:42:21 -06007619 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007620 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007621 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007622 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007623 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007624 (allowing login), assuming :term:`USE_VT` is not set to
7625 "0".
7626
Andrew Geissler09036742021-06-25 14:25:14 -05007627 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007628 run a getty on the first virtual terminal).
7629
Andrew Geisslerf0343792020-11-18 10:42:21 -06007630 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007631 This variable points to a directory were BitBake places temporary
7632 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007633 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007634
7635 T = "${WORKDIR}/temp"
7636
7637 The :term:`WORKDIR` is the directory into which
7638 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7639 file sets this variable.
7640
Andrew Geissler09036742021-06-25 14:25:14 -05007641 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007642 :term:`TMPDIR` variable, which points to the root of
7643 the directory tree where BitBake places the output of an entire
7644 build.
7645
Andrew Geisslerf0343792020-11-18 10:42:21 -06007646 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007647 The target machine's architecture. The OpenEmbedded build system
7648 supports many architectures. Here is an example list of architectures
7649 supported. This list is by no means complete as the architecture is
7650 configurable:
7651
7652 - arm
7653 - i586
7654 - x86_64
7655 - powerpc
7656 - powerpc64
7657 - mips
7658 - mipsel
7659
7660 For additional information on machine architectures, see the
7661 :term:`TUNE_ARCH` variable.
7662
Andrew Geisslerf0343792020-11-18 10:42:21 -06007663 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007664 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007665 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007666 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007667 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007668
7669 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7670
Andrew Geisslerf0343792020-11-18 10:42:21 -06007671 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007672 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007673 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007674 :term:`TUNE_CCARGS` by default.
7675
7676 .. note::
7677
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007678 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05007679 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7680 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007681
Andrew Geisslerf0343792020-11-18 10:42:21 -06007682 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007683 This is a specific kernel compiler flag for a CPU or Application
7684 Binary Interface (ABI) tune. The flag is used rarely and only for
7685 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05007686 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007687 variable allows the kernel (and associated modules) to use a
7688 different configuration. See the
7689 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7690 :term:`Source Directory` for an example.
7691
Andrew Geisslerf0343792020-11-18 10:42:21 -06007692 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007693 Specifies the flags to pass to the C compiler when building for the
7694 target. When building in the target context,
7695 :term:`CFLAGS` is set to the value of this variable by
7696 default.
7697
Andrew Geissler09036742021-06-25 14:25:14 -05007698 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
7699 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007700 executables built using the SDK also have the flags applied.
7701
Andrew Geisslerf0343792020-11-18 10:42:21 -06007702 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007703 Specifies the flags to pass to the C pre-processor (i.e. to both the
7704 C and the C++ compilers) when building for the target. When building
7705 in the target context, :term:`CPPFLAGS` is set to the
7706 value of this variable by default.
7707
7708 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007709 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007710 value so that executables built using the SDK also have the flags
7711 applied.
7712
Andrew Geisslerf0343792020-11-18 10:42:21 -06007713 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007714 Specifies the flags to pass to the C++ compiler when building for the
7715 target. When building in the target context,
7716 :term:`CXXFLAGS` is set to the value of this variable
7717 by default.
7718
7719 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007720 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007721 value so that executables built using the SDK also have the flags
7722 applied.
7723
Andrew Geisslerf0343792020-11-18 10:42:21 -06007724 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007725 Specifies the method for handling FPU code. For FPU-less targets,
7726 which include most ARM CPUs, the variable must be set to "soft". If
7727 not, the kernel emulation gets used, which results in a performance
7728 penalty.
7729
Andrew Geisslerf0343792020-11-18 10:42:21 -06007730 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007731 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05007732 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007733 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007734 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007735
7736 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7737
Andrew Geisslerf0343792020-11-18 10:42:21 -06007738 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007739 Specifies the flags to pass to the linker when building for the
7740 target. When building in the target context,
7741 :term:`LDFLAGS` is set to the value of this variable
7742 by default.
7743
7744 Additionally, the SDK's environment setup script sets the
7745 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05007746 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007747 have the flags applied.
7748
Andrew Geisslerf0343792020-11-18 10:42:21 -06007749 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007750 Specifies the target's operating system. The variable can be set to
7751 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007752 for musl libc. For ARM/EABI targets, the possible values are
7753 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007754
Andrew Geisslerf0343792020-11-18 10:42:21 -06007755 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007756 Specifies the prefix used for the toolchain binary target tools.
7757
7758 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04007759 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007760
7761 - For recipes building for the target machine, the value is
7762 "${:term:`TARGET_SYS`}-".
7763
7764 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04007765 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007766
7767 - For native SDK recipes (``nativesdk``), the build system sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007768 variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007769
Andrew Geisslerf0343792020-11-18 10:42:21 -06007770 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007771 Specifies the system, including the architecture and the operating
7772 system, for which the build is occurring in the context of the
7773 current recipe.
7774
7775 The OpenEmbedded build system automatically sets this variable based
7776 on :term:`TARGET_ARCH`,
7777 :term:`TARGET_VENDOR`, and
7778 :term:`TARGET_OS` variables.
7779
7780 .. note::
7781
Andrew Geissler09036742021-06-25 14:25:14 -05007782 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007783
7784 Consider these two examples:
7785
7786 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7787 value is "i686-linux".
7788
7789 - Given a recipe being built for a little-endian, MIPS target
7790 running Linux, the value might be "mipsel-linux".
7791
Andrew Geisslerf0343792020-11-18 10:42:21 -06007792 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007793 Specifies the name of the target vendor.
7794
Andrew Geisslerf0343792020-11-18 10:42:21 -06007795 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007796 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007797 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007798
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007799 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007800
Andrew Geisslerf0343792020-11-18 10:42:21 -06007801 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007802 Specifies a suffix to be appended onto the
7803 :term:`TMPDIR` value. The suffix identifies the
7804 ``libc`` variant for building. When you are building for multiple
7805 variants with the same :term:`Build Directory`, this
7806 mechanism ensures that output for different ``libc`` variants is kept
7807 separate to avoid potential conflicts.
7808
7809 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04007810 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007811 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05007812 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007813 in no suffix being applied.
7814
Andrew Geisslerf0343792020-11-18 10:42:21 -06007815 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05007816 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007817 characteristics of the generated packages and images by telling the
7818 OpenEmbedded build system which toolchain profile to use. By default,
7819 the OpenEmbedded build system builds its own internal toolchain. The
7820 variable's default value is "default", which uses that internal
7821 toolchain.
7822
7823 .. note::
7824
Andrew Geissler09036742021-06-25 14:25:14 -05007825 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007826 responsibility to ensure that the toolchain is compatible with the
7827 default toolchain. Using older or newer versions of these
7828 components might cause build problems. See the Release Notes for
7829 the Yocto Project release for the specific components with which
7830 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007831 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007832 page on the Yocto Project website and click on the "RELEASE
7833 INFORMATION" link for the appropriate release.
7834
Andrew Geissler09036742021-06-25 14:25:14 -05007835 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007836 which controls the variant of the GNU standard C library (``libc``)
7837 used during the build process: ``glibc`` or ``musl``.
7838
7839 With additional layers, it is possible to use a pre-compiled external
7840 toolchain. One example is the Sourcery G++ Toolchain. The support for
7841 this toolchain resides in the separate Mentor Graphics
7842 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007843 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007844
7845 The layer's ``README`` file contains information on how to use the
7846 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7847 be sure to add the layer to your ``bblayers.conf`` file in front of
7848 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7849 in your ``local.conf`` file to the location in which you installed
7850 the toolchain.
7851
7852 The fundamentals used for this example apply to any external
7853 toolchain. You can use ``meta-sourcery`` as a template for adding
7854 support for other external toolchains.
7855
Andrew Geisslerf0343792020-11-18 10:42:21 -06007856 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007857 The location the OpenEmbedded build system uses to export tests when
7858 the :term:`TEST_EXPORT_ONLY` variable is set
7859 to "1".
7860
Andrew Geissler09036742021-06-25 14:25:14 -05007861 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007862 ``"${TMPDIR}/testimage/${PN}"``.
7863
Andrew Geisslerf0343792020-11-18 10:42:21 -06007864 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007865 Specifies to export the tests only. Set this variable to "1" if you
7866 do not want to run the tests but you want them to be exported in a
7867 manner that you to run them outside of the build system.
7868
Andrew Geisslerf0343792020-11-18 10:42:21 -06007869 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007870 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05007871 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007872
7873 .. note::
7874
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007875 Actual test results reside in the task log (``log.do_testimage``),
7876 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007877
Andrew Geisslerf0343792020-11-18 10:42:21 -06007878 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007879 For automated hardware testing, specifies the command to use to
7880 control the power of the target machine under test. Typically, this
7881 command would point to a script that performs the appropriate action
7882 (e.g. interacting with a web-enabled power strip). The specified
7883 command should expect to receive as the last argument "off", "on" or
7884 "cycle" specifying to power off, on, or cycle (power off and then
7885 power on) the device, respectively.
7886
Andrew Geisslerf0343792020-11-18 10:42:21 -06007887 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007888 For automated hardware testing, specifies additional arguments to
7889 pass through to the command specified in
7890 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007891 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007892 wish, for example, to separate the machine-specific and
7893 non-machine-specific parts of the arguments.
7894
Andrew Geisslerf0343792020-11-18 10:42:21 -06007895 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007896 The time in seconds allowed for an image to boot before automated
7897 runtime tests begin to run against an image. The default timeout
7898 period to allow the boot process to reach the login prompt is 500
7899 seconds. You can specify a different value in the ``local.conf``
7900 file.
7901
7902 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007903 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007904 section in the Yocto Project Development Tasks Manual.
7905
Andrew Geisslerf0343792020-11-18 10:42:21 -06007906 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007907 For automated hardware testing, specifies the command to use to
7908 connect to the serial console of the target machine under test. This
7909 command simply needs to connect to the serial console and forward
7910 that connection to standard input and output as any normal terminal
7911 program does.
7912
7913 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05007914 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007915
7916 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
7917
Andrew Geisslerf0343792020-11-18 10:42:21 -06007918 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007919 For automated hardware testing, specifies additional arguments to
7920 pass through to the command specified in
7921 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007922 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007923 wish, for example, to separate the machine-specific and
7924 non-machine-specific parts of the command.
7925
Andrew Geisslerf0343792020-11-18 10:42:21 -06007926 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007927 The IP address of the build machine (host machine). This IP address
7928 is usually automatically detected. However, if detection fails, this
7929 variable needs to be set to the IP address of the build machine (i.e.
7930 where the build is taking place).
7931
7932 .. note::
7933
Andrew Geissler09036742021-06-25 14:25:14 -05007934 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007935 tests such as the "dnf" test suite, which needs to download packages
7936 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007937
Andrew Geisslerf0343792020-11-18 10:42:21 -06007938 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007939 An ordered list of tests (modules) to run against an image when
7940 performing automated runtime testing.
7941
7942 The OpenEmbedded build system provides a core set of tests that can
7943 be used against images.
7944
7945 .. note::
7946
7947 Currently, there is only support for running these tests under
7948 QEMU.
7949
7950 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05007951 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007952 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007953
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007954 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007955
7956 Alternatively, you can
7957 provide the "auto" option to have all applicable tests run against
7958 the image.
7959 ::
7960
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007961 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007962
7963 Using this option causes the
7964 build system to automatically run tests that are applicable to the
7965 image. Tests that are not applicable are skipped.
7966
7967 The order in which tests are run is important. Tests that depend on
7968 another test must appear later in the list than the test on which
7969 they depend. For example, if you append the list of tests with two
7970 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05007971 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007972
7973 TEST_SUITES = "test_A test_B"
7974
7975 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007976 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007977 section in the Yocto Project Development Tasks Manual.
7978
Andrew Geisslerf0343792020-11-18 10:42:21 -06007979 :term:`TEST_TARGET`
7980 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007981 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06007982
7983 TEST_TARGET = "qemu"
7984
7985 A target controller is a class that defines how an image gets
7986 deployed on a target and how a target is started. A layer can extend
7987 the controllers by adding a module in the layer's
7988 ``/lib/oeqa/controllers`` directory and by inheriting the
7989 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05007990 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06007991
Andrew Geissler5f350902021-07-23 13:09:54 -04007992 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06007993
7994 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007995 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06007996 in the Yocto Project Development Tasks Manual for more
7997 information.
7998
7999 - *"simpleremote":* Runs the tests on target hardware that is
8000 already up and running. The hardware can be on the network or it
8001 can be a device running an image on QEMU. You must also set
8002 :term:`TEST_TARGET_IP` when you use
8003 "simpleremote".
8004
8005 .. note::
8006
8007 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008008 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008009
8010 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008011 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008012 section in the Yocto Project Development Tasks Manual.
8013
8014 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05008015 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06008016 variable has no effect when :term:`TEST_TARGET` is
8017 set to "qemu".
8018
8019 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008020 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008021
8022 TEST_TARGET_IP = "192.168.1.4:2201"
8023
8024 Specifying a port is
8025 useful when SSH is started on a non-standard port or in cases when
8026 your hardware under test is behind a firewall or network that is not
8027 directly accessible from your host and you need to do port address
8028 translation.
8029
8030 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008031 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008032 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008033 any image that successfully builds to automatically boot under QEMU.
8034 Using the variable also adds in dependencies so that any SDK for
8035 which testing is requested is automatically built first.
8036
8037 These tests are written in Python making use of the ``unittest``
8038 module, and the majority of them run commands on the target system
8039 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8040 file in the :term:`Build Directory` to have the
8041 OpenEmbedded build system automatically run these tests after an
8042 image successfully builds:
8043
8044 TESTIMAGE_AUTO = "1"
8045
8046 For more information
8047 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008048 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008049 section in the Yocto Project Development Tasks Manual and the
Andrew Geissler595f6302022-01-24 19:11:47 +00008050 ":ref:`ref-classes-testimage*`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008051
Andrew Geisslerf0343792020-11-18 10:42:21 -06008052 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008053 The directory in which the file BitBake is currently parsing is
8054 located. Do not manually set this variable.
8055
Andrew Geisslerf0343792020-11-18 10:42:21 -06008056 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008057 The time the build was started. Times appear using the hour, minute,
8058 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8059 seconds past 1400 hours).
8060
Andrew Geisslerf0343792020-11-18 10:42:21 -06008061 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008062 This variable is the base directory the OpenEmbedded build system
8063 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008064 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008065 ``tmp`` within the :term:`Build Directory`.
8066
8067 If you want to establish this directory in a location other than the
8068 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008069 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008070
8071 #TMPDIR = "${TOPDIR}/tmp"
8072
Andrew Geissler09036742021-06-25 14:25:14 -05008073 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008074 which does not use NFS, while having the Build Directory use NFS.
8075
Andrew Geissler09036742021-06-25 14:25:14 -05008076 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008077 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8078 persistent inodes). Due to various issues with NFS and bugs in some
8079 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008080 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008081
Andrew Geisslerf0343792020-11-18 10:42:21 -06008082 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008083 This variable lists packages the OpenEmbedded build system uses when
8084 building an SDK, which contains a cross-development environment. The
8085 packages specified by this variable are part of the toolchain set
8086 that runs on the :term:`SDKMACHINE`, and each
8087 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008088 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008089
8090 $ bitbake -c populate_sdk imagename
8091
8092 In this case, a default list of packages is
8093 set in this variable, but you can add additional packages to the
8094 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008095 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008096 in the Yocto Project Application Development and the Extensible
8097 Software Development Kit (eSDK) manual for more information.
8098
8099 For background information on cross-development toolchains in the
8100 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008101 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008102 section in the Yocto Project Overview and Concepts Manual. For
8103 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008104 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008105
Andrew Geisslereff27472021-10-29 15:35:00 -05008106 Note that this variable applies to building an SDK, not an eSDK,
8107 in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
8108 used instead.
8109
8110 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8111 This variable allows to extend what is installed in the host
8112 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8113 applying to SDKs.
8114
Andrew Geisslerf0343792020-11-18 10:42:21 -06008115 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008116 This variable defines the name used for the toolchain output. The
8117 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008118 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008119
8120 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8121
8122 See
8123 the :term:`SDK_NAME` and
8124 :term:`SDK_VERSION` variables for additional
8125 information.
8126
Andrew Geisslerf0343792020-11-18 10:42:21 -06008127 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008128 This variable lists packages the OpenEmbedded build system uses when
8129 it creates the target part of an SDK (i.e. the part built for the
8130 target hardware), which includes libraries and headers. Use this
8131 variable to add individual packages to the part of the SDK that runs
8132 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008133 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008134 in the Yocto Project Application Development and the Extensible
8135 Software Development Kit (eSDK) manual for more information.
8136
8137 For background information on cross-development toolchains in the
8138 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008139 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008140 section in the Yocto Project Overview and Concepts Manual. For
8141 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008142 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008143
Andrew Geisslerf0343792020-11-18 10:42:21 -06008144 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008145 A sanitized version of :term:`TARGET_ARCH`. This
8146 variable is used where the architecture is needed in a value where
8147 underscores are not allowed, for example within package filenames. In
8148 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008149 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008150
8151 Do not edit this variable.
8152
Andrew Geisslerf0343792020-11-18 10:42:21 -06008153 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008154 The GNU canonical architecture for a specific architecture (i.e.
8155 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8156 this value to setup configuration.
8157
Andrew Geissler09036742021-06-25 14:25:14 -05008158 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008159 definitions can be a single static definition, or can be dynamically
8160 adjusted. You can see details for a given CPU family by looking at
8161 the architecture's ``README`` file. For example, the
8162 ``meta/conf/machine/include/mips/README`` file in the
8163 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008164 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008165
Andrew Geissler09036742021-06-25 14:25:14 -05008166 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008167 :term:`TARGET_ARCH`, which defines the target
8168 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008169 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008170
8171 TARGET_ARCH = "${TUNE_ARCH}"
8172
8173 The following list, which is by no means complete since architectures
8174 are configurable, shows supported machine architectures:
8175
8176 - arm
8177 - i586
8178 - x86_64
8179 - powerpc
8180 - powerpc64
8181 - mips
8182 - mipsel
8183
Andrew Geisslerf0343792020-11-18 10:42:21 -06008184 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008185 Specifies architecture-specific assembler flags for the target
8186 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008187 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008188 typically under ``meta/conf/machine/include/`` and are influenced
8189 through :term:`TUNE_FEATURES`. For example, the
8190 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008191 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008192
8193 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8194
8195 .. note::
8196
8197 Board Support Packages (BSPs) select the tune. The selected tune,
8198 in turn, affects the tune variables themselves (i.e. the tune can
8199 supply its own set of flags).
8200
Andrew Geisslerf0343792020-11-18 10:42:21 -06008201 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008202 Specifies architecture-specific C compiler flags for the target
8203 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008204 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008205 typically under ``meta/conf/machine/include/`` and are influenced
8206 through :term:`TUNE_FEATURES`.
8207
8208 .. note::
8209
8210 Board Support Packages (BSPs) select the tune. The selected tune,
8211 in turn, affects the tune variables themselves (i.e. the tune can
8212 supply its own set of flags).
8213
Andrew Geisslerf0343792020-11-18 10:42:21 -06008214 :term:`TUNE_FEATURES`
8215 Features used to "tune" a compiler for optimal use given a specific
8216 processor. The features are defined within the tune files and allow
8217 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8218 the features.
8219
8220 The OpenEmbedded build system verifies the features to be sure they
8221 are not conflicting and that they are supported.
8222
8223 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008224 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008225
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008226 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008227
8228 See the :term:`DEFAULTTUNE` variable for more information.
8229
8230 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008231 Specifies architecture-specific linker flags for the target system.
8232 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008233 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008234 typically under ``meta/conf/machine/include/`` and are influenced
8235 through :term:`TUNE_FEATURES`. For example, the
8236 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008237 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008238
8239 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8240
8241 .. note::
8242
8243 Board Support Packages (BSPs) select the tune. The selected tune,
8244 in turn, affects the tune variables themselves (i.e. the tune can
8245 supply its own set of flags).
8246
Andrew Geisslerf0343792020-11-18 10:42:21 -06008247 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008248 The package architecture understood by the packaging system to define
8249 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008250 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008251
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008252 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008253
8254 These tune-specific package architectures are defined in the machine
8255 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008256 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008257
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008258 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008259
Andrew Geisslerf0343792020-11-18 10:42:21 -06008260 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008261 Specifies CPU or Application Binary Interface (ABI) tuning features
8262 that conflict with feature.
8263
8264 Known tuning conflicts are specified in the machine include files in
8265 the :term:`Source Directory`. Here is an example from
8266 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8267 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05008268 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008269
8270 TUNECONFLICTS[n32] = "o32 n64"
8271
Andrew Geisslerf0343792020-11-18 10:42:21 -06008272 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008273 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8274 feature. The specified feature is stored as a flag. Valid features
8275 are specified in the machine include files (e.g.
8276 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05008277 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008278
8279 TUNEVALID[bigendian] = "Enable big-endian mode."
8280
8281 See the machine include files in the :term:`Source Directory`
8282 for these features.
8283
Andrew Geisslerf0343792020-11-18 10:42:21 -06008284 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008285 Configures the :term:`UBOOT_MACHINE` and can
8286 also define :term:`IMAGE_FSTYPES` for individual
8287 cases.
8288
8289 Following is an example from the ``meta-fsl-arm`` layer. ::
8290
8291 UBOOT_CONFIG ??= "sd"
8292 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8293 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8294 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8295 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8296
8297 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05008298 :term:`UBOOT_MACHINE`. The "sd" configuration defines
8299 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04008300 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008301
Andrew Geissler09036742021-06-25 14:25:14 -05008302 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008303 :ref:`uboot-config <ref-classes-uboot-config>`
8304 class.
8305
Andrew Geisslerf0343792020-11-18 10:42:21 -06008306 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008307 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008308 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008309 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8310 the load address to be used in
8311 creating the dtb sections of Image Tree Source for the FIT image.
8312
Andrew Geisslerf0343792020-11-18 10:42:21 -06008313 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008314 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008315 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008316 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8317 creating the dtbo sections of Image Tree Source for the FIT image.
8318
Andrew Geisslerf0343792020-11-18 10:42:21 -06008319 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008320 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008321 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008322 command-line parameter to the ``uboot-mkimage`` utility.
8323
Andrew Geisslerf0343792020-11-18 10:42:21 -06008324 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008325 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008326 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008327 command-line parameter to the ``uboot-mkimage`` utility.
8328
Andrew Geisslerf0343792020-11-18 10:42:21 -06008329 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008330 Appends a string to the name of the local version of the U-Boot
8331 image. For example, assuming the version of the U-Boot image built
8332 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05008333 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008334
8335 UBOOT_LOCALVERSION = "-yocto"
8336
Andrew Geisslerf0343792020-11-18 10:42:21 -06008337 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008338 Specifies the value passed on the ``make`` command line when building
8339 a U-Boot image. The value indicates the target platform
8340 configuration. You typically set this variable from the machine
8341 configuration file (i.e. ``conf/machine/machine_name.conf``).
8342
8343 Please see the "Selection of Processor Architecture and Board Type"
8344 section in the U-Boot README for valid values for this variable.
8345
Andrew Geisslerf0343792020-11-18 10:42:21 -06008346 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008347 Specifies the target called in the ``Makefile``. The default target
8348 is "all".
8349
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008350 :term:`UBOOT_MKIMAGE`
8351 Specifies the name of the mkimage command as used by the
8352 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8353 the FIT image. This can be used to substitute an alternative command, wrapper
8354 script or function if desired. The default is "uboot-mkimage".
8355
Andrew Geisslerf0343792020-11-18 10:42:21 -06008356 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008357 Options for the device tree compiler passed to mkimage '-D'
8358 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geissler5f350902021-07-23 13:09:54 -04008359 If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008360 pass the ``-D`` option to mkimage.
8361
8362 :term:`UBOOT_MKIMAGE_SIGN`
8363 Specifies the name of the mkimage command as used by the
8364 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8365 the FIT image after it has been assembled (if enabled). This can be used
8366 to substitute an alternative command, wrapper script or function if
8367 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8368
8369 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8370 Optionally specifies additional arguments for the
8371 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8372 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008373
Andrew Geisslerf0343792020-11-18 10:42:21 -06008374 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008375 Specifies the entrypoint for the RAM disk image.
8376 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008377 :term:`UBOOT_RD_ENTRYPOINT` variable is used
Andrew Geissler4873add2020-11-02 18:44:49 -06008378 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8379 entrypoint to be used in creating the Image Tree Source for
8380 the FIT image.
8381
Andrew Geisslerf0343792020-11-18 10:42:21 -06008382 :term:`UBOOT_RD_LOADADDRESS`
8383 Specifies the load address for the RAM disk image.
8384 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008385 :term:`UBOOT_RD_LOADADDRESS` variable is used
Andrew Geisslerf0343792020-11-18 10:42:21 -06008386 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8387 load address to be used in creating the Image Tree Source for
8388 the FIT image.
8389
8390 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008391 Enable signing of FIT image. The default value is "0".
8392
Andrew Geisslerf0343792020-11-18 10:42:21 -06008393 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008394 Location of the directory containing the RSA key and
8395 certificate used for signing FIT image.
8396
Andrew Geisslerf0343792020-11-18 10:42:21 -06008397 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008398 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008399 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8400 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8401 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8402
Andrew Geisslerf0343792020-11-18 10:42:21 -06008403 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008404 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8405 has a ``.sb`` extension.
8406
8407 The default U-Boot extension is ``.bin``
8408
Andrew Geisslerf0343792020-11-18 10:42:21 -06008409 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008410 Specifies the target used for building U-Boot. The target is passed
8411 directly as part of the "make" command (e.g. SPL and AIS). If you do
8412 not specifically set this variable, the OpenEmbedded build process
8413 passes and uses "all" for the target during the U-Boot building
8414 process.
8415
Andrew Geissler9aee5002022-03-30 16:27:02 +00008416 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008417 Specifies a list of options that, if reported by the configure script
8418 as being invalid, should not generate a warning during the
8419 :ref:`ref-tasks-configure` task. Normally, invalid
8420 configure options are simply not passed to the configure script (e.g.
8421 should be removed from :term:`EXTRA_OECONF` or
8422 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008423 However, there are common options that are passed to all
8424 configure scripts at a class level, but might not be valid for some
8425 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00008426 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008427
8428 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00008429 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008430 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8431 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8432
Andrew Geisslerf0343792020-11-18 10:42:21 -06008433 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008434 For recipes inheriting the
Andrew Geissler09036742021-06-25 14:25:14 -05008435 :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008436 specifies the package that contains the initscript that is enabled.
8437
8438 The default value is "${PN}". Given that almost all recipes that
8439 install initscripts package them in the main package for the recipe,
8440 you rarely need to set this variable in individual recipes.
8441
Andrew Geissler5199d832021-09-24 16:47:35 -05008442 :term:`UPSTREAM_CHECK_COMMITS`
8443 You can perform a per-recipe check for what the latest upstream
8444 source code version is by calling ``devtool latest-version recipe``. If
8445 the recipe source code is provided from Git repositories, but
8446 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
8447 to ``1`` in the recipe, and the OpenEmbedded build system
8448 will compare the latest commit with the one currently specified
8449 by the recipe (:term:`SRCREV`).
8450 ::
8451
8452 UPSTREAM_CHECK_COMMITS = "1"
8453
Andrew Geisslerf0343792020-11-18 10:42:21 -06008454 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008455 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008456 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008457 the recipe source code is provided from Git repositories, the
8458 OpenEmbedded build system determines the latest upstream version by
8459 picking the latest tag from the list of all repository tags.
8460
Andrew Geissler09036742021-06-25 14:25:14 -05008461 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008462 regular expression to filter only the relevant tags should the
8463 default filter not work correctly.
8464 ::
8465
8466 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8467
Andrew Geisslerf0343792020-11-18 10:42:21 -06008468 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05008469 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008470 regular expression instead of the default one when the package
8471 checking system is parsing the page found using
8472 :term:`UPSTREAM_CHECK_URI`.
8473 ::
8474
8475 UPSTREAM_CHECK_REGEX = "package_regex"
8476
Andrew Geisslerf0343792020-11-18 10:42:21 -06008477 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008478 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008479 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008480 the source code is provided from tarballs, the latest version is
8481 determined by fetching the directory listing where the tarball is and
8482 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05008483 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008484 contains the link to the latest tarball.
8485 ::
8486
8487 UPSTREAM_CHECK_URI = "recipe_url"
8488
Andrew Geissler5199d832021-09-24 16:47:35 -05008489 :term:`UPSTREAM_VERSION_UNKNOWN`
8490 You can perform a per-recipe check for what the latest upstream
8491 source code version is by calling ``devtool latest-version recipe``.
8492 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
8493 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
8494 the recipe allows to determine what the latest upstream version is,
8495 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
8496 to acknowledge that the check cannot be performed.
8497 ::
8498
8499 UPSTREAM_VERSION_UNKNOWN = "1"
8500
Andrew Geisslerf0343792020-11-18 10:42:21 -06008501 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008502 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05008503 default value used for :term:`USE_DEVFS` is "1" when no value is
8504 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008505 statically populated ``/dev`` directory.
8506
Andrew Geissler09209ee2020-12-13 08:44:15 -06008507 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008508 the Yocto Project Development Tasks Manual for information on how to
8509 use this variable.
8510
Andrew Geisslerf0343792020-11-18 10:42:21 -06008511 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008512 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008513 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008514 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008515 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008516 virtual terminals in order to enable logging in through those
8517 terminals.
8518
Andrew Geissler09036742021-06-25 14:25:14 -05008519 The default value used for :term:`USE_VT` is "1" when no default value is
8520 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008521 machine configuration file for machines that do not have a graphical
8522 display attached and therefore do not need virtual terminal
8523 functionality.
8524
Andrew Geisslerf0343792020-11-18 10:42:21 -06008525 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008526 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00008527 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008528
Andrew Geisslerc926e172021-05-07 16:11:35 -05008529 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008530
Andrew Geissler9aee5002022-03-30 16:27:02 +00008531 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008532
8533 For more information, see
8534 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8535
Andrew Geisslerf0343792020-11-18 10:42:21 -06008536 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008537 If set to ``error``, forces the OpenEmbedded build system to produce
8538 an error if the user identification (``uid``) and group
8539 identification (``gid``) values are not defined in any of the files
8540 listed in :term:`USERADD_UID_TABLES` and
8541 :term:`USERADD_GID_TABLES`. If set to
8542 ``warn``, a warning will be issued instead.
8543
8544 The default behavior for the build system is to dynamically apply
8545 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05008546 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008547 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05008548 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008549 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008550
8551 USERADD_ERROR_DYNAMIC = "error"
8552
8553 Overriding the
8554 default behavior implies you are going to also take steps to set
8555 static ``uid`` and ``gid`` values through use of the
8556 :term:`USERADDEXTENSION`,
8557 :term:`USERADD_UID_TABLES`, and
8558 :term:`USERADD_GID_TABLES` variables.
8559
8560 .. note::
8561
8562 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05008563 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008564 When it is set to ``warn``, the build system will report a warning for
8565 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8566 to ``error``, it will only report errors for recipes that are actually
8567 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008568 This saves you from having to add static IDs for recipes that you
8569 know will never be built.
8570
Andrew Geisslerf0343792020-11-18 10:42:21 -06008571 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008572 Specifies a password file to use for obtaining static group
8573 identification (``gid``) values when the OpenEmbedded build system
8574 adds a group to the system during package installation.
8575
8576 When applying static group identification (``gid``) values, the
8577 OpenEmbedded build system looks in :term:`BBPATH` for a
8578 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008579 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008580
8581
8582 USERADD_GID_TABLES = "files/group"
8583
8584 .. note::
8585
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008586 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8587 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008588
Andrew Geisslerf0343792020-11-18 10:42:21 -06008589 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008590 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8591 this variable specifies the individual packages within the recipe
8592 that require users and/or groups to be added.
8593
8594 You must set this variable if the recipe inherits the class. For
8595 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008596 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008597
8598 USERADD_PACKAGES = "${PN}"
8599
8600 .. note::
8601
Andrew Geissler09036742021-06-25 14:25:14 -05008602 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008603 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8604 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008605
Andrew Geisslerf0343792020-11-18 10:42:21 -06008606 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008607 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8608 this variable specifies for a package what parameters should pass to
8609 the ``useradd`` command if you add a user to the system when the
8610 package is installed.
8611
Andrew Geisslerc926e172021-05-07 16:11:35 -05008612 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008613
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008614 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008615 --no-create-home --shell /bin/false \
8616 --user-group messagebus"
8617
8618 For information on the
8619 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008620 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008621
Andrew Geisslerf0343792020-11-18 10:42:21 -06008622 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008623 Specifies a password file to use for obtaining static user
8624 identification (``uid``) values when the OpenEmbedded build system
8625 adds a user to the system during package installation.
8626
8627 When applying static user identification (``uid``) values, the
8628 OpenEmbedded build system looks in :term:`BBPATH` for a
8629 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008630 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008631
8632 USERADD_UID_TABLES = "files/passwd"
8633
8634 .. note::
8635
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008636 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8637 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008638
Andrew Geisslerf0343792020-11-18 10:42:21 -06008639 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008640 When set to "useradd-staticids", causes the OpenEmbedded build system
8641 to base all user and group additions on a static ``passwd`` and
8642 ``group`` files found in :term:`BBPATH`.
8643
8644 To use static user identification (``uid``) and group identification
8645 (``gid``) values, set the variable as follows in your ``local.conf``
8646 file: USERADDEXTENSION = "useradd-staticids"
8647
8648 .. note::
8649
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008650 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008651 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008652 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008653
8654 If you use static ``uid`` and ``gid`` information, you must also
8655 specify the ``files/passwd`` and ``files/group`` files by setting the
8656 :term:`USERADD_UID_TABLES` and
8657 :term:`USERADD_GID_TABLES` variables.
8658 Additionally, you should also set the
8659 :term:`USERADD_ERROR_DYNAMIC` variable.
8660
Andrew Geisslerf0343792020-11-18 10:42:21 -06008661 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008662 Specifies the persistence of the target's ``/var/log`` directory,
8663 which is used to house postinstall target log files.
8664
Andrew Geissler09036742021-06-25 14:25:14 -05008665 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008666 file is not persistent. You can override this setting by setting the
8667 variable to "no" to make the log directory persistent.
8668
Andrew Geisslerf0343792020-11-18 10:42:21 -06008669 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008670 Specifies the quality assurance checks whose failures are reported as
8671 warnings by the OpenEmbedded build system. You set this variable in
8672 your distribution configuration file. For a list of the checks you
8673 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00008674 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008675
Andrew Geisslerf0343792020-11-18 10:42:21 -06008676 :term:`WKS_FILE`
8677 Specifies the location of the Wic kickstart file that is used by the
8678 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05008679 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06008680 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008681 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008682 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06008683 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008684
8685 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008686 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05008687 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008688 applicable when Wic images are active (i.e. when
8689 :term:`IMAGE_FSTYPES` contains entries related
8690 to Wic). If your recipe does not create Wic images, the variable has
8691 no effect.
8692
Andrew Geissler09036742021-06-25 14:25:14 -05008693 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008694 :term:`DEPENDS` variable. When you use the variable in
8695 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05008696 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008697
Andrew Geissler09036742021-06-25 14:25:14 -05008698 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008699 specify a list of additional dependencies (e.g. native tools,
8700 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05008701 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008702
8703 WKS_FILE_DEPENDS = "some-native-tool"
8704
8705 In the
8706 previous example, some-native-tool would be replaced with an actual
8707 native tool on which the build would depend.
8708
Andrew Geisslerf0343792020-11-18 10:42:21 -06008709 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008710 The pathname of the work directory in which the OpenEmbedded build
8711 system builds a recipe. This directory is located within the
8712 :term:`TMPDIR` directory structure and is specific to
8713 the recipe being built and the system for which it is being built.
8714
Andrew Geissler09036742021-06-25 14:25:14 -05008715 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008716
8717 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8718
8719 The actual directory depends on several things:
8720
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008721 - :term:`TMPDIR`: The top-level build output directory
8722 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8723 - :term:`PN`: The recipe name
8724 - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which
8725 is usually the case for most recipes, then `EXTENDPE` is blank)
8726 - :term:`PV`: The recipe version
8727 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008728
8729 As an example, assume a Source Directory top-level folder name
8730 ``poky``, a default Build Directory at ``poky/build``, and a
8731 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8732 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8733 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008734 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008735
8736 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8737
Andrew Geisslerf0343792020-11-18 10:42:21 -06008738 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008739 Specifies the packages that should be installed to provide an X
8740 server and drivers for the current machine, assuming your image
8741 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8742 indirectly, includes "x11-base" in
8743 :term:`IMAGE_FEATURES`.
8744
Andrew Geissler09036742021-06-25 14:25:14 -05008745 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008746 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8747