blob: 71e8c272a7bc86b7efe2dd62dd8b0ae1c38eaf06 [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.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600138
Andrew Geisslerf0343792020-11-18 10:42:21 -0600139 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500140 An override list of append strings for each target specified with
141 :term:`LABELS`.
142
143 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
144 information on how this variable is used.
145
Andrew Geisslerf0343792020-11-18 10:42:21 -0600146 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500147 The minimal command and arguments used to run ``ar``.
148
Andrew Geisslerf0343792020-11-18 10:42:21 -0600149 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500150 When used with the :ref:`archiver <ref-classes-archiver>` class,
151 determines the type of information used to create a released archive.
152 You can use this variable to create archives of patched source,
153 original source, configured source, and so forth by employing the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500154 following variable flags (varflags)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500155
156 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
157 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
158 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
159 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
160 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
161 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
162 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
163 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
164
165 For information on how the variable works, see the
166 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
167
Andrew Geisslerf0343792020-11-18 10:42:21 -0600168 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500169 Minimal command and arguments needed to run the assembler.
170
Andrew Geisslerf0343792020-11-18 10:42:21 -0600171 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500172 Lists recipe names (:term:`PN` values) BitBake does not
173 attempt to build. Instead, BitBake assumes these recipes have already
174 been built.
175
Andrew Geissler09036742021-06-25 14:25:14 -0500176 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500177 tools that should not be built. An example is ``git-native``, which
178 when specified, allows for the Git binary from the host to be used
179 rather than building ``git-native``.
180
Andrew Geisslerf0343792020-11-18 10:42:21 -0600181 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500182 Provides additional ``shlibs`` provider mapping information, which
183 adds to or overwrites the information provided automatically by the
184 system. Separate multiple entries using spaces.
185
186 As an example, use the following form to add an ``shlib`` provider of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500187 shlibname in packagename with the optional version::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500188
189 shlibname:packagename[_version]
190
191 Here is an example that adds a shared library named ``libEGL.so.1``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500192 as being provided by the ``libegl-implementation`` package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500193
194 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
195
Andrew Geisslerf0343792020-11-18 10:42:21 -0600196 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500197 The email address used to contact the original author or authors in
198 order to send patches and forward bugs.
199
Andrew Geisslerf0343792020-11-18 10:42:21 -0600200 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500201 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500202 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500203 packages should be checked for libraries and renamed according to
204 Debian library package naming.
205
206 The default value is "${PACKAGES}", which causes the debian class to
207 act on all packages that are explicitly generated by the recipe.
208
Andrew Geisslerf0343792020-11-18 10:42:21 -0600209 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500210 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500211 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500212
213 SRCREV = "${AUTOREV}"
214
215 If you use the previous statement to retrieve the latest version of
216 software, you need to be sure :term:`PV` contains
217 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
218 have a kernel recipe that inherits the
219 :ref:`kernel <ref-classes-kernel>` class and you use the previous
220 statement. In this example, ``${SRCPV}`` does not automatically get
Andrew Geissler09036742021-06-25 14:25:14 -0500221 into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500222 so that it does contain ``${SRCPV}``.
223
224 For more information see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600225 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500226 section in the Yocto Project Development Tasks Manual.
227
Andrew Geissler9aee5002022-03-30 16:27:02 +0000228 :term:`AUTO_SYSLINUXMENU`
229 Enables creating an automatic menu for the syslinux bootloader. You
230 must set this variable in your recipe. The
231 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
232
Andrew Geisslerf0343792020-11-18 10:42:21 -0600233 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500234 The list of defined CPU and Application Binary Interface (ABI)
235 tunings (i.e. "tunes") available for use by the OpenEmbedded build
236 system.
237
238 The list simply presents the tunes that are available. Not all tunes
239 may be compatible with a particular machine configuration, or with
240 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600241 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500242 configuration.
243
244 To add a tune to the list, be sure to append it with spaces using the
245 "+=" BitBake operator. Do not simply replace the list by using the
246 "=" operator. See the
Patrick Williams213cb262021-08-07 19:21:33 -0500247 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500248 User Manual for more information.
249
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500250 :term:`AZ_SAS`
251 Azure Storage Shared Access Signature, when using the
252 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
253 This variable can be defined to be used by the fetcher to authenticate
254 and gain access to non-public artifacts.
255 ::
256
257 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
258
259 For more information see Microsoft's Azure Storage documentation at
260 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
261
Andrew Geisslerf0343792020-11-18 10:42:21 -0600262 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500263 The directory within the :term:`Build Directory` in
264 which the OpenEmbedded build system places generated objects during a
265 recipe's build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500266 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500267
268 S = "${WORKDIR}/${BP}"
269
Andrew Geissler09036742021-06-25 14:25:14 -0500270 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400271 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500272 separating these directories. The build system defaults to using
273 separate directories for ``gcc`` and some kernel recipes.
274
Andrew Geisslerf0343792020-11-18 10:42:21 -0600275 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500276 Lists "recommended-only" packages to not install. Recommended-only
277 packages are packages installed only through the
278 :term:`RRECOMMENDS` variable. You can prevent any
279 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500280 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500281
282 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
283
284 You can set this variable globally in your ``local.conf`` file or you
285 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500286 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500287
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500288 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500289
290 It is important to realize that if you choose to not install packages
291 using this variable and some other packages are dependent on them
292 (i.e. listed in a recipe's :term:`RDEPENDS`
293 variable), the OpenEmbedded build system ignores your request and
294 will install the packages to avoid dependency errors.
295
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700296 This variable is supported only when using the IPK and RPM
297 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500298
299 See the :term:`NO_RECOMMENDATIONS` and the
300 :term:`PACKAGE_EXCLUDE` variables for related
301 information.
302
Andrew Geisslerf0343792020-11-18 10:42:21 -0600303 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500304 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500305 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600306 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500307 section in the Yocto Project Development Tasks Manual for information
308 on Multilib.
309
Andrew Geissler09036742021-06-25 14:25:14 -0500310 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500311 the :term:`Source Directory`. If Multilib is not
312 being used, the value defaults to "lib".
313
Andrew Geisslerf0343792020-11-18 10:42:21 -0600314 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500315 Points to the base of the work directory for all recipes. The default
316 value is "${TMPDIR}/work".
317
Andrew Geisslerf0343792020-11-18 10:42:21 -0600318 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500319 Specifies a space-delimited list of hosts that the fetcher is allowed
320 to use to obtain the required source code. Following are
321 considerations surrounding this variable:
322
Andrew Geissler09036742021-06-25 14:25:14 -0500323 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500324 or set to "0".
325
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700326 - There is limited support for wildcard matching against the beginning of
327 host names. For example, the following setting matches
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500328 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
329 ::
330
331 BB_ALLOWED_NETWORKS = "*.gnu.org"
332
333 .. note::
334
335 The use of the "``*``" character only works at the beginning of
336 a host name and it must be isolated from the remainder of the
337 host name. You cannot use the wildcard character in any other
338 location of the name or combined with the front part of the
339 name.
340
341 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
342 is not.
343
344 - Mirrors not in the host list are skipped and logged in debug.
345
346 - Attempts to access networks not in the host list cause a failure.
347
Andrew Geissler09036742021-06-25 14:25:14 -0500348 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500349 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500350 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500351 fetched from an allowed location and avoids raising an error when a
352 host that is not allowed is in a :term:`SRC_URI`
353 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500354 host listed in :term:`SRC_URI` after a successful fetch from the
355 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500356
Andrew Geisslerf0343792020-11-18 10:42:21 -0600357 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500358 Defines how BitBake handles situations where an append file
359 (``.bbappend``) has no corresponding recipe file (``.bb``). This
360 condition often occurs when layers get out of sync (e.g. ``oe-core``
361 bumps a recipe version and the old recipe no longer exists and the
362 other layer has not been updated to the new version of the recipe
363 yet).
364
365 The default fatal behavior is safest because it is the sane reaction
366 given something is out of sync. It is important to realize when your
367 changes are no longer being applied.
368
369 You can change the default behavior by setting this variable to "1",
370 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500371 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500372
373 BB_DANGLINGAPPENDS_WARNONLY = "1"
374
Andrew Geisslerf0343792020-11-18 10:42:21 -0600375 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500376 Monitors disk space and available inodes during the build and allows
377 you to control the build based on these parameters.
378
379 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500380 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500381 found in the :term:`Build Directory`. Use the
382 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500383
384 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500385
386 BB_DISKMON_DIRS = "action,dir,threshold [...]"
387
388 where:
389
390 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000391 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500392 a threshold is broken.
393 STOPTASKS: Stop the build after the currently
394 executing tasks have finished when
395 a threshold is broken.
396 WARN: Issue a warning but continue the
397 build when a threshold is broken.
398 Subsequent warnings are issued as
399 defined by the BB_DISKMON_WARNINTERVAL
400 variable, which must be defined in
401 the conf/local.conf file.
402
403 dir is:
404 Any directory you choose. You can specify one or
405 more directories to monitor by separating the
406 groupings with a space. If two directories are
407 on the same device, only the first directory
408 is monitored.
409
410 threshold is:
411 Either the minimum available disk space,
412 the minimum number of free inodes, or
413 both. You must specify at least one. To
414 omit one or the other, simply omit the value.
415 Specify the threshold using G, M, K for Gbytes,
416 Mbytes, and Kbytes, respectively. If you do
417 not specify G, M, or K, Kbytes is assumed by
418 default. Do not use GB, MB, or KB.
419
Andrew Geisslerc926e172021-05-07 16:11:35 -0500420 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500421
422 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
423 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
424 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
425
426 The first example works only if you also provide the
427 :term:`BB_DISKMON_WARNINTERVAL`
428 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000429 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500430 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
431 below 100 Kbytes. Because two directories are provided with the
432 variable, the build system also issue a warning when the disk space
433 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
434 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500435 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500436 variable.
437
438 The second example stops the build after all currently executing
439 tasks complete when the minimum disk space in the ``${TMPDIR}``
440 directory drops below 1 Gbyte. No disk monitoring occurs for the free
441 inodes in this case.
442
Andrew Geissler595f6302022-01-24 19:11:47 +0000443 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500444 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
445 disk space monitoring for the directory itself occurs in this case.
446
Andrew Geisslerf0343792020-11-18 10:42:21 -0600447 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500448 Defines the disk space and free inode warning intervals. To set these
449 intervals, define the variable in your ``conf/local.conf`` file in
450 the :term:`Build Directory`.
451
Andrew Geissler09036742021-06-25 14:25:14 -0500452 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500453 must also use the :term:`BB_DISKMON_DIRS`
454 variable and define its action as "WARN". During the build,
455 subsequent warnings are issued each time disk space or number of free
456 inodes further reduces by the respective interval.
457
Andrew Geissler09036742021-06-25 14:25:14 -0500458 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
459 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500460 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500461
462 BB_DISKMON_WARNINTERVAL = "50M,5K"
463
464 When specifying the variable in your configuration file, use the
465 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500466
467 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500468
469 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
470
471 where:
472
473 disk_space_interval is:
474 An interval of memory expressed in either
475 G, M, or K for Gbytes, Mbytes, or Kbytes,
476 respectively. You cannot use GB, MB, or KB.
477
478 disk_inode_interval is:
479 An interval of free inodes expressed in either
480 G, M, or K for Gbytes, Mbytes, or Kbytes,
481 respectively. You cannot use GB, MB, or KB.
482
Andrew Geisslerc926e172021-05-07 16:11:35 -0500483 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500484
485 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
486 BB_DISKMON_WARNINTERVAL = "50M,5K"
487
488 These variables cause the
489 OpenEmbedded build system to issue subsequent warnings each time the
490 available disk space further reduces by 50 Mbytes or the number of
491 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
492 directory. Subsequent warnings based on the interval occur each time
493 a respective interval is reached beyond the initial warning (i.e. 1
494 Gbytes and 100 Kbytes).
495
Andrew Geisslerf0343792020-11-18 10:42:21 -0600496 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500497 Causes tarballs of the source control repositories (e.g. Git
498 repositories), including metadata, to be placed in the
499 :term:`DL_DIR` directory.
500
501 For performance reasons, creating and placing tarballs of these
502 repositories is not the default action by the OpenEmbedded build
503 system.
504 ::
505
506 BB_GENERATE_MIRROR_TARBALLS = "1"
507
508 Set this variable in your
509 ``local.conf`` file in the :term:`Build Directory`.
510
511 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500512 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500513 source control work directories.
514
Andrew Geisslerf0343792020-11-18 10:42:21 -0600515 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500516 The maximum number of tasks BitBake should run in parallel at any one
517 time. The OpenEmbedded build system automatically configures this
518 variable to be equal to the number of cores on the build system. For
519 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500520 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500521 to "4".
522
523 For single socket systems (i.e. one CPU), you should not have to
524 override this variable to gain optimal parallelism during builds.
525 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500526 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500527 is not set higher than "20".
528
529 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600530 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500531 section in the Yocto Project Development Tasks Manual.
532
Andrew Geisslerf0343792020-11-18 10:42:21 -0600533 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500534 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500535 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500536 long the BitBake server stays resident between invocations.
537
538 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500539 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500540
541 BB_SERVER_TIMEOUT = "20"
542
543 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400544 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500545
Andrew Geisslerf0343792020-11-18 10:42:21 -0600546 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500547 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700548 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500549 ``quilt-native``, which is a copy of Quilt built to run on the build
550 system; "crosses" such as ``gcc-cross``, which is a compiler built to
551 run on the build machine but produces binaries that run on the target
552 :term:`MACHINE`; "nativesdk", which targets the SDK
Andrew Geissler09036742021-06-25 14:25:14 -0500553 machine instead of :term:`MACHINE`; and "mulitlibs" in the form
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500554 "``multilib:``\ multilib_name".
555
556 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500557 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500558
559 BBCLASSEXTEND =+ "native nativesdk"
560 BBCLASSEXTEND =+ "multilib:multilib_name"
561
562 .. note::
563
Andrew Geissler09036742021-06-25 14:25:14 -0500564 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500565 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500566 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500567 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400568 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500569
Andrew Geissler09036742021-06-25 14:25:14 -0500570 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500571 Parsing once adds some limitations. For example, it is not
572 possible to include a different file depending on the variant,
573 since ``include`` statements are processed when the recipe is
574 parsed.
575
Andrew Geisslerf0343792020-11-18 10:42:21 -0600576 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500577 Lists the names of configured layers. These names are used to find
578 the other ``BBFILE_*`` variables. Typically, each layer will append
579 its name to this variable in its ``conf/layer.conf`` file.
580
Andrew Geisslerf0343792020-11-18 10:42:21 -0600581 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500582 Variable that expands to match files from
583 :term:`BBFILES` in a particular layer. This variable
584 is used in the ``conf/layer.conf`` file and must be suffixed with the
585 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
586
Andrew Geisslerf0343792020-11-18 10:42:21 -0600587 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500588 Assigns the priority for recipe files in each layer.
589
590 This variable is useful in situations where the same recipe appears
591 in more than one layer. Setting this variable allows you to
592 prioritize a layer against other layers that contain the same recipe
Andrew Geissler615f2f12022-07-15 14:00:58 -0500593 --- effectively letting you control the precedence for the multiple
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500594 layers. The precedence established through this variable stands
595 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500596 example, a layer that has a recipe with a higher :term:`PV` value but for
597 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500598 has a lower precedence.
599
Andrew Geissler09036742021-06-25 14:25:14 -0500600 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500601 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500602 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
603 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500604 for more information. The default priority, if unspecified for a
605 layer with no dependencies, is the lowest defined priority + 1 (or 1
606 if no priorities are defined).
607
608 .. tip::
609
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500610 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500611 to list all configured layers along with their priorities.
612
Andrew Geisslerf0343792020-11-18 10:42:21 -0600613 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500614 A space-separated list of recipe files BitBake uses to build
615 software.
616
617 When specifying recipe files, you can pattern match using Python's
618 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
619 For details on the syntax, see the documentation by following the
620 previous link.
621
Andrew Geisslerf0343792020-11-18 10:42:21 -0600622 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500623 Activates content when identified layers are present. You identify
624 the layers by the collections that the layers define.
625
Andrew Geissler09036742021-06-25 14:25:14 -0500626 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500627 whose corresponding ``.bb`` file is in a layer that attempts to
628 modify other layers through ``.bbappend`` but does not want to
629 introduce a hard dependency on those other layers.
630
Andrew Geissler09036742021-06-25 14:25:14 -0500631 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000632 ``collection_name:filename_pattern``.
633
634 The following example identifies two collection names and two
635 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500636
637 BBFILES_DYNAMIC += " \
638 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
639 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
640 "
641
642 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000643 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500644
645 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500646
647 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
648 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
649 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
650
Andrew Geisslerf0343792020-11-18 10:42:21 -0600651 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500652 Variable that controls how BitBake displays logs on build failure.
653
Andrew Geisslerf0343792020-11-18 10:42:21 -0600654 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500655 If :term:`BBINCLUDELOGS` is set, specifies the
656 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500657 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500658 the entire log is printed.
659
Andrew Geisslerf0343792020-11-18 10:42:21 -0600660 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500661 Lists the layers to enable during the build. This variable is defined
662 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500663 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500664
665 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500666 /home/scottrif/poky/meta \
667 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500668 /home/scottrif/poky/meta-yocto-bsp \
669 /home/scottrif/poky/meta-mykernel \
670 "
671
672 This example enables four layers, one of which is a custom,
673 user-defined layer named ``meta-mykernel``.
674
Andrew Geisslerf0343792020-11-18 10:42:21 -0600675 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500676 Prevents BitBake from processing recipes and recipe append files.
677
Andrew Geissler09036742021-06-25 14:25:14 -0500678 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500679 ``.bbappend`` files. BitBake ignores any recipe or recipe append
680 files that match any of the expressions. It is as if BitBake does not
681 see them at all. Consequently, matching files are not parsed or
682 otherwise used by BitBake.
683
684 The values you provide are passed to Python's regular expression
685 compiler. Consequently, the syntax follows Python's Regular
686 Expression (re) syntax. The expressions are compared against the full
687 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500688 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500689
690 The following example uses a complete regular expression to tell
691 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500692 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500693
694 BBMASK = "meta-ti/recipes-misc/"
695
696 If you want to mask out multiple directories or recipes, you can
697 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500698 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500699
700 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
701 BBMASK += "/meta-oe/recipes-support/"
702 BBMASK += "/meta-foo/.*/openldap"
703 BBMASK += "opencv.*\.bbappend"
704 BBMASK += "lzma"
705
706 .. note::
707
708 When specifying a directory name, use the trailing slash character
709 to ensure you match just that directory name.
710
Andrew Geisslerf0343792020-11-18 10:42:21 -0600711 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500712 Specifies each additional separate configuration when you are
713 building targets with multiple configurations. Use this variable in
714 your ``conf/local.conf`` configuration file. Specify a
715 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500716 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500717
718 BBMULTICONFIG = "configA configB configC"
719
Andrew Geissler615f2f12022-07-15 14:00:58 -0500720 Each configuration file you use must reside in a ``multiconfig``
721 subdirectory of a configuration directory within a layer, or
722 within the :term:`Build Directory` (e.g.
723 ``build_directory/conf/multiconfig/configA.conf`` or
724 ``mylayer/conf/multiconfig/configB.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500725
Andrew Geissler09036742021-06-25 14:25:14 -0500726 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500727 that supports building targets with multiple configurations, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600728 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500729 section in the Yocto Project Development Tasks Manual.
730
Andrew Geisslerf0343792020-11-18 10:42:21 -0600731 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500732 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500733 BitBake remote server.
734
735 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500736 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500737
738 export BBSERVER=localhost:$port
739
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000740 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500741 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500742 data.
743
Andrew Geisslerf0343792020-11-18 10:42:21 -0600744 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500745 When inheriting the
746 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
747 this variable specifies binary configuration scripts to disable in
748 favor of using ``pkg-config`` to query the information. The
Andrew Geissler595f6302022-01-24 19:11:47 +0000749 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500750 return an error so that calls to them can be easily found and
751 replaced.
752
753 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500754 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500755
756 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
757
Andrew Geisslerf0343792020-11-18 10:42:21 -0600758 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500759 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
760 this variable specifies a wildcard for configuration scripts that
761 need editing. The scripts are edited to correct any paths that have
762 been set up during compilation so that they are correct for use when
763 installed into the sysroot and called by the build processes of other
764 recipes.
765
766 .. note::
767
Andrew Geissler09036742021-06-25 14:25:14 -0500768 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500769 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
770 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500771 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500772 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
773 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500774
775 For more information on how this variable works, see
Patrick Williams975a06f2022-10-21 14:42:47 -0500776 ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500777 You can also find general
778 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000779 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500780
Andrew Geisslerf0343792020-11-18 10:42:21 -0600781 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500782 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500783 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500784 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500785
786 ${BPN}-${PV}
787
Andrew Geisslerf0343792020-11-18 10:42:21 -0600788 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500789 This variable is a version of the :term:`PN` variable with
790 common prefixes and suffixes removed, such as ``nativesdk-``,
791 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
792 The exact lists of prefixes and suffixes removed are specified by the
793 :term:`MLPREFIX` and
794 :term:`SPECIAL_PKGSUFFIX` variables,
795 respectively.
796
Andrew Geisslerf0343792020-11-18 10:42:21 -0600797 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500798 Specifies a URL for an upstream bug tracking website for a recipe.
799 The OpenEmbedded build system does not use this variable. Rather, the
800 variable is a useful pointer in case a bug in the software being
801 built needs to be manually reported.
802
Andrew Geisslerf0343792020-11-18 10:42:21 -0600803 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500804 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500805 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500806 machine name reported by the ``uname`` command.
807
Andrew Geisslerf0343792020-11-18 10:42:21 -0600808 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500809 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500810 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500811
Andrew Geisslerf0343792020-11-18 10:42:21 -0600812 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500813 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500814 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500815
Andrew Geisslerf0343792020-11-18 10:42:21 -0600816 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500817 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500818 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500819 points to GCC and passes as arguments the value of
820 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500821 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500822
Andrew Geisslerf0343792020-11-18 10:42:21 -0600823 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500824 Specifies the flags to pass to the C compiler when building for the
825 build host. When building in the ``-native`` context,
826 :term:`CFLAGS` is set to the value of this variable by
827 default.
828
Andrew Geisslerf0343792020-11-18 10:42:21 -0600829 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500830 Specifies the flags to pass to the C preprocessor (i.e. to both the C
831 and the C++ compilers) when building for the build host. When
832 building in the ``-native`` context, :term:`CPPFLAGS`
833 is set to the value of this variable by default.
834
Andrew Geisslerf0343792020-11-18 10:42:21 -0600835 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500836 Specifies the flags to pass to the C++ compiler when building for the
837 build host. When building in the ``-native`` context,
838 :term:`CXXFLAGS` is set to the value of this variable
839 by default.
840
Andrew Geisslerf0343792020-11-18 10:42:21 -0600841 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500842 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500843 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500844 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500845 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500846
Andrew Geisslerf0343792020-11-18 10:42:21 -0600847 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500848 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -0500849 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500850 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500851 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500852
Andrew Geisslerf0343792020-11-18 10:42:21 -0600853 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500854 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500855 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500856
Andrew Geisslerf0343792020-11-18 10:42:21 -0600857 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500858 Specifies the flags to pass to the linker when building for the build
859 host. When building in the ``-native`` context,
860 :term:`LDFLAGS` is set to the value of this variable
861 by default.
862
Andrew Geisslerf0343792020-11-18 10:42:21 -0600863 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500864 Specifies the optimization flags passed to the C compiler when
865 building for the build host or the SDK. The flags are passed through
866 the :term:`BUILD_CFLAGS` and
867 :term:`BUILDSDK_CFLAGS` default values.
868
Andrew Geissler5f350902021-07-23 13:09:54 -0400869 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500870 -pipe".
871
Andrew Geisslerf0343792020-11-18 10:42:21 -0600872 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500873 Specifies the operating system in use on the build host (e.g.
874 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler615f2f12022-07-15 14:00:58 -0500875 :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500876 first word, converted to lower-case characters.
877
Andrew Geisslerf0343792020-11-18 10:42:21 -0600878 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500879 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -0500880 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500881 :term:`TARGET_PREFIX` when building for
882 ``native`` recipes.
883
Andrew Geisslerf0343792020-11-18 10:42:21 -0600884 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500885 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -0500886 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500887 points to
888 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
889
Andrew Geisslerf0343792020-11-18 10:42:21 -0600890 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500891 Specifies the system, including the architecture and the operating
892 system, to use when building for the build host (i.e. when building
893 ``native`` recipes).
894
895 The OpenEmbedded build system automatically sets this variable based
896 on :term:`BUILD_ARCH`,
897 :term:`BUILD_VENDOR`, and
898 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -0500899 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500900
Andrew Geisslerf0343792020-11-18 10:42:21 -0600901 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500902 Specifies the vendor name to use when building for the build host.
903 The default value is an empty string ("").
904
Andrew Geisslerf0343792020-11-18 10:42:21 -0600905 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500906 Points to the location of the :term:`Build Directory`.
907 You can define this directory indirectly through the
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500908 :ref:`structure-core-script` script by passing in a Build
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500909 Directory path when you run the script. If you run the script and do
Andrew Geissler09036742021-06-25 14:25:14 -0500910 not provide a Build Directory path, the :term:`BUILDDIR` defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500911 ``build`` in the current directory.
912
Andrew Geisslerf0343792020-11-18 10:42:21 -0600913 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500914 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
915 class, this variable specifies whether or not to commit the build
916 history output in a local Git repository. If set to "1", this local
Andrew Geissler595f6302022-01-24 19:11:47 +0000917 repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500918 class and a commit will be created on every build for changes to each
919 top-level subdirectory of the build history output (images, packages,
920 and sdk). If you want to track changes to build history over time,
921 you should set this value to "1".
922
Patrick Williams975a06f2022-10-21 14:42:47 -0500923 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class
924 enables committing the buildhistory output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500925
Patrick Williams975a06f2022-10-21 14:42:47 -0500926 BUILDHISTORY_COMMIT ?= "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500927
Andrew Geisslerf0343792020-11-18 10:42:21 -0600928 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500929 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
930 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -0500931 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500932 :term:`BUILDHISTORY_COMMIT` variable must
933 be set to "1".
934
935 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -0500936 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500937 email@host". Providing an email address or host that is not valid
938 does not produce an error.
939
Andrew Geissler595f6302022-01-24 19:11:47 +0000940 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500941
942 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
943
Andrew Geisslerf0343792020-11-18 10:42:21 -0600944 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500945 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
946 class, this variable specifies the directory in which build history
947 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000948 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500949
Andrew Geissler595f6302022-01-24 19:11:47 +0000950 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500951
952 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
953
Andrew Geisslerf0343792020-11-18 10:42:21 -0600954 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500955 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
956 class, this variable specifies the build history features to be
957 enabled. For more information on how build history works, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600958 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500959 section in the Yocto Project Development Tasks Manual.
960
961 You can specify these features in the form of a space-separated list:
962
963 - *image:* Analysis of the contents of images, which includes the
964 list of installed packages among other things.
965
966 - *package:* Analysis of the contents of individual packages.
967
968 - *sdk:* Analysis of the contents of the software development kit
969 (SDK).
970
971 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -0600972 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500973 (sstate) tasks.
974 This saves one file per task and lists the SHA-256 checksums for
975 each file staged (i.e. the output of the task).
976
Andrew Geissler595f6302022-01-24 19:11:47 +0000977 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following
Andrew Geisslerc926e172021-05-07 16:11:35 -0500978 features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500979
980 BUILDHISTORY_FEATURES ?= "image package sdk"
981
Andrew Geisslerf0343792020-11-18 10:42:21 -0600982 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500983 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
984 class, this variable specifies a list of paths to files copied from
985 the image contents into the build history directory under an
986 "image-files" directory in the directory for the image, so that you
987 can track the contents of each file. The default is to copy
988 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
989 changes in user and group entries. You can modify the list to include
990 any file. Specifying an invalid path does not produce an error.
991 Consequently, you can include files that might not always be present.
992
Andrew Geissler595f6302022-01-24 19:11:47 +0000993 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500994 following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500995
996 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
997
Andrew Geissler5f350902021-07-23 13:09:54 -0400998 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
999 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1000 class, this variable specifies a common path prefix that should be
1001 stripped off the beginning of paths in the task signature list when the
1002 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1003 useful when build history is populated from multiple sources that may not
1004 all use the same top level directory.
1005
Andrew Geissler595f6302022-01-24 19:11:47 +00001006 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001007
1008 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1009
1010 In this case, no prefixes will be stripped.
1011
Andrew Geisslerf0343792020-11-18 10:42:21 -06001012 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001013 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1014 class, this variable optionally specifies a remote repository to
1015 which build history pushes Git changes. In order for
Andrew Geissler09036742021-06-25 14:25:14 -05001016 :term:`BUILDHISTORY_PUSH_REPO` to work,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001017 :term:`BUILDHISTORY_COMMIT` must be set to
1018 "1".
1019
1020 The repository should correspond to a remote address that specifies a
1021 repository as understood by Git, or alternatively to a remote name
1022 that you have set up manually using ``git remote`` within the local
1023 repository.
1024
Andrew Geissler595f6302022-01-24 19:11:47 +00001025 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001026
1027 BUILDHISTORY_PUSH_REPO ?= ""
1028
Andrew Geisslerf0343792020-11-18 10:42:21 -06001029 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001030 Specifies the flags to pass to the C compiler when building for the
1031 SDK. When building in the ``nativesdk-`` context,
1032 :term:`CFLAGS` is set to the value of this variable by
1033 default.
1034
Andrew Geisslerf0343792020-11-18 10:42:21 -06001035 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001036 Specifies the flags to pass to the C pre-processor (i.e. to both the
1037 C and the C++ compilers) when building for the SDK. When building in
1038 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1039 to the value of this variable by default.
1040
Andrew Geisslerf0343792020-11-18 10:42:21 -06001041 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001042 Specifies the flags to pass to the C++ compiler when building for the
1043 SDK. When building in the ``nativesdk-`` context,
1044 :term:`CXXFLAGS` is set to the value of this variable
1045 by default.
1046
Andrew Geisslerf0343792020-11-18 10:42:21 -06001047 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001048 Specifies the flags to pass to the linker when building for the SDK.
1049 When building in the ``nativesdk-`` context,
1050 :term:`LDFLAGS` is set to the value of this variable
1051 by default.
1052
Andrew Geisslerf0343792020-11-18 10:42:21 -06001053 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001054 Points to the location of the directory that holds build statistics
1055 when you use and enable the
1056 :ref:`buildstats <ref-classes-buildstats>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001057 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001058 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1059
Andrew Geisslerf0343792020-11-18 10:42:21 -06001060 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001061 For the BusyBox recipe, specifies whether to split the output
1062 executable file into two parts: one for features that require
1063 ``setuid root``, and one for the remaining features (i.e. those that
1064 do not require ``setuid root``).
1065
Andrew Geissler09036742021-06-25 14:25:14 -05001066 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001067 splitting the output executable file. Set the variable to "0" to get
1068 a single output executable file.
1069
Andrew Geisslerf0343792020-11-18 10:42:21 -06001070 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001071 Specifies the directory BitBake uses to store a cache of the
1072 :term:`Metadata` so it does not need to be parsed every time
1073 BitBake is started.
1074
Andrew Geisslerf0343792020-11-18 10:42:21 -06001075 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001076 The minimal command and arguments used to run the C compiler.
1077
Andrew Geisslerf0343792020-11-18 10:42:21 -06001078 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001079 Specifies the flags to pass to the C compiler. This variable is
1080 exported to an environment variable and thus made visible to the
1081 software being built during the compilation step.
1082
Andrew Geissler09036742021-06-25 14:25:14 -05001083 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001084 being built:
1085
1086 - :term:`TARGET_CFLAGS` when building for the
1087 target
1088
1089 - :term:`BUILD_CFLAGS` when building for the
1090 build host (i.e. ``-native``)
1091
1092 - :term:`BUILDSDK_CFLAGS` when building for
1093 an SDK (i.e. ``nativesdk-``)
1094
Andrew Geisslerf0343792020-11-18 10:42:21 -06001095 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001096 An internal variable specifying the special class override that
1097 should currently apply (e.g. "class-target", "class-native", and so
1098 forth). The classes that use this variable (e.g.
1099 :ref:`native <ref-classes-native>`,
1100 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1101 variable to appropriate values.
1102
1103 .. note::
1104
Andrew Geissler5f350902021-07-23 13:09:54 -04001105 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001106 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001107
1108 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001109 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001110
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001111 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001112 install my-extra-file ${D}${sysconfdir}
1113 }
1114
1115 Here is an example where ``FOO`` is set to
1116 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001117 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001118
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001119 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001120 FOO = "other"
1121
Andrew Geissler09036742021-06-25 14:25:14 -05001122 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001123 that it is included in the default value of
1124 :term:`OVERRIDES`.
1125
Andrew Geisslerf0343792020-11-18 10:42:21 -06001126 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001127 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001128 ``make clean`` command does not work for the software being built.
1129 Consequently, the OpenEmbedded build system will not try to run
1130 ``make clean`` during the :ref:`ref-tasks-configure`
1131 task, which is the default behavior.
1132
Andrew Geisslerf0343792020-11-18 10:42:21 -06001133 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001134 Provides a list of hardware features that are enabled in both
1135 :term:`MACHINE_FEATURES` and
1136 :term:`DISTRO_FEATURES`. This select list of
1137 features contains features that make sense to be controlled both at
1138 the machine and distribution configuration level. For example, the
1139 "bluetooth" feature requires hardware support but should also be
1140 optional at the distribution level, in case the hardware supports
1141 Bluetooth but you do not ever intend to use it.
1142
Andrew Geisslerf0343792020-11-18 10:42:21 -06001143 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001144 Points to ``meta/files/common-licenses`` in the
1145 :term:`Source Directory`, which is where generic license
1146 files reside.
1147
Andrew Geisslerf0343792020-11-18 10:42:21 -06001148 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001149 A regular expression that resolves to one or more hosts (when the
1150 recipe is native) or one or more targets (when the recipe is
1151 non-native) with which a recipe is compatible. The regular expression
1152 is matched against :term:`HOST_SYS`. You can use the
1153 variable to stop recipes from being built for classes of systems with
1154 which the recipes are not compatible. Stopping these builds is
1155 particularly useful with kernels. The variable also helps to increase
1156 parsing speed since the build system skips parsing recipes not
1157 compatible with the current system.
1158
Andrew Geisslerf0343792020-11-18 10:42:21 -06001159 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001160 A regular expression that resolves to one or more target machines
1161 with which a recipe is compatible. The regular expression is matched
1162 against :term:`MACHINEOVERRIDES`. You can use
1163 the variable to stop recipes from being built for machines with which
1164 the recipes are not compatible. Stopping these builds is particularly
1165 useful with kernels. The variable also helps to increase parsing
1166 speed since the build system skips parsing recipes not compatible
1167 with the current machine.
1168
Andrew Geisslerf0343792020-11-18 10:42:21 -06001169 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001170 Defines wildcards to match when installing a list of complementary
1171 packages for all the packages explicitly (or implicitly) installed in
1172 an image.
1173
Patrick Williams975a06f2022-10-21 14:42:47 -05001174 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
1175 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1176 which is similar to the Unix style pathname pattern expansion
1177 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001178
1179 The resulting list of complementary packages is associated with an
1180 item that can be added to
1181 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001182 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001183 will install -dev packages (containing headers and other development
1184 files) for every package in the image.
1185
1186 To add a new feature item pointing to a wildcard, use a variable flag
1187 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001188 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001189
1190 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1191
Patrick Williams975a06f2022-10-21 14:42:47 -05001192 .. note::
1193
1194 When installing complementary packages, recommends relationships
1195 (set via :term:`RRECOMMENDS`) are always ignored.
1196
Andrew Geisslerf0343792020-11-18 10:42:21 -06001197 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001198 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001199 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001200 sysroots for other recipes.
1201
1202 The default is
1203 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1204 (i.e.
1205 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1206
Andrew Geisslerf0343792020-11-18 10:42:21 -06001207 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001208 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001209 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001210 ``build/conf/`` compatibility changes.
1211
Andrew Geisslerf0343792020-11-18 10:42:21 -06001212 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001213 Identifies editable or configurable files that are part of a package.
1214 If the Package Management System (PMS) is being used to update
1215 packages on the target system, it is possible that configuration
1216 files you have changed after the original installation and that you
1217 now want to remain unchanged are overwritten. In other words,
1218 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001219 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001220 variable to list the files in the package that you wish to prevent
1221 the PMS from overwriting during this update process.
1222
Andrew Geissler09036742021-06-25 14:25:14 -05001223 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001224 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001225 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001226
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001227 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001228 ${sysconfdir}/file2 ${sysconfdir}/file3"
1229
Andrew Geissler09036742021-06-25 14:25:14 -05001230 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1231 variables. The files listed within :term:`CONFFILES` must be a subset of
1232 the files listed within :term:`FILES`. Because the configuration files
1233 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001234 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001235 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001236 variable.
1237
1238 .. note::
1239
Andrew Geissler09036742021-06-25 14:25:14 -05001240 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001241 good practice to use appropriate path variables.
1242 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1243 rather than ``/usr/bin``. You can find a list of these variables at
1244 the top of the ``meta/conf/bitbake.conf`` file in the
1245 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001246
Andrew Geisslerf0343792020-11-18 10:42:21 -06001247 :term:`CONFIG_INITRAMFS_SOURCE`
Patrick Williams2194f502022-10-16 14:26:09 -05001248 Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001249 OpenEmbedded build system receives and uses this kernel Kconfig
1250 variable as an environment variable. By default, the variable is set
1251 to null ("").
1252
Andrew Geissler09036742021-06-25 14:25:14 -05001253 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001254 with a ``.cpio`` suffix or a space-separated list of directories and
Patrick Williams2194f502022-10-16 14:26:09 -05001255 files for building the :term:`Initramfs` image. A cpio archive should contain
1256 a filesystem archive to be used as an :term:`Initramfs` image. Directories
1257 should contain a filesystem layout to be included in the :term:`Initramfs`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001258 image. Files should contain entries according to the format described
1259 by the ``usr/gen_init_cpio`` program in the kernel tree.
1260
Patrick Williams2194f502022-10-16 14:26:09 -05001261 If you specify multiple directories and files, the :term:`Initramfs` image
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001262 will be the aggregate of all of them.
1263
Patrick Williams2194f502022-10-16 14:26:09 -05001264 For information on creating an :term:`Initramfs`, see the
1265 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001266 in the Yocto Project Development Tasks Manual.
1267
Andrew Geisslerf0343792020-11-18 10:42:21 -06001268 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001269 A list of files that contains ``autoconf`` test results relevant to
1270 the current build. This variable is used by the Autotools utilities
1271 when running ``configure``.
1272
Andrew Geisslerf0343792020-11-18 10:42:21 -06001273 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001274 The minimal arguments for GNU configure.
1275
Andrew Geisslerf0343792020-11-18 10:42:21 -06001276 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001277 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001278 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001279 class, this variable identifies distribution features that would be
1280 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001281 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1282 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001283 the recipe will be skipped, and if the build system attempts to build
1284 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001285
Andrew Geissler615f2f12022-07-15 14:00:58 -05001286 :term:`CONVERSION_CMD`
1287 This variable is used for storing image conversion commands.
1288 Image conversion can convert an image into different objects like:
1289
1290 - Compressed version of the image
1291
1292 - Checksums for the image
1293
1294 An example of :term:`CONVERSION_CMD` from :ref:`image-types
1295 <ref-classes-image_types>` class is::
1296
1297 CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
1298
Andrew Geissler9aee5002022-03-30 16:27:02 +00001299 :term:`COPY_LIC_DIRS`
1300 If set to "1" along with the
1301 :term:`COPY_LIC_MANIFEST` variable, the
1302 OpenEmbedded build system copies into the image the license files,
1303 which are located in ``/usr/share/common-licenses``, for each
1304 package. The license files are placed in directories within the image
1305 itself during build time.
1306
1307 .. note::
1308
1309 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1310 newly installed packages to an image, which might be most suitable for
1311 read-only filesystems that cannot be upgraded. See the
1312 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1313 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1314 section in the Yocto Project Development Tasks Manual for
1315 information on providing license text.
1316
1317 :term:`COPY_LIC_MANIFEST`
1318 If set to "1", the OpenEmbedded build system copies the license
1319 manifest for the image to
1320 ``/usr/share/common-licenses/license.manifest`` within the image
1321 itself during build time.
1322
1323 .. note::
1324
1325 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1326 newly installed packages to an image, which might be most suitable for
1327 read-only filesystems that cannot be upgraded. See the
1328 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1329 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1330 section in the Yocto Project Development Tasks Manual for
1331 information on providing license text.
1332
Andrew Geisslerf0343792020-11-18 10:42:21 -06001333 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001334 A space-separated list of licenses to exclude from the source
1335 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1336 other words, if a license in a recipe's
1337 :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001338 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001339 class.
1340
1341 .. note::
1342
Andrew Geissler09036742021-06-25 14:25:14 -05001343 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001344 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001345
1346 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001347 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001348 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001349 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001350
Andrew Geisslerf0343792020-11-18 10:42:21 -06001351 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001352 A space-separated list of licenses to include in the source archived
1353 by the :ref:`archiver <ref-classes-archiver>` class. In other
1354 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001355 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001356 source is archived by the class.
1357
1358 The default value is set by the
1359 :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. The default value includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001361 "GPL*", "LGPL*", and "AGPL*".
1362
Andrew Geisslerf0343792020-11-18 10:42:21 -06001363 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001364 A list of recipes to exclude in the source archived by the
1365 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001366 :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001367 exclusion caused through the
1368 :term:`COPYLEFT_LICENSE_INCLUDE` and
1369 :term:`COPYLEFT_LICENSE_EXCLUDE`
1370 variables, respectively.
1371
1372 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001373 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001374 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001375 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001376
Andrew Geisslerf0343792020-11-18 10:42:21 -06001377 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001378 A list of recipes to include in the source archived by the
1379 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001380 :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001381 exclusion caused through the
1382 :term:`COPYLEFT_LICENSE_INCLUDE` and
1383 :term:`COPYLEFT_LICENSE_EXCLUDE`
1384 variables, respectively.
1385
1386 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001387 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001388 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001389 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001390
Andrew Geisslerf0343792020-11-18 10:42:21 -06001391 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001392 A space-separated list of recipe types to include in the source
1393 archived by the :ref:`archiver <ref-classes-archiver>` class.
1394 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1395 ``crosssdk``, and ``cross-canadian``.
1396
Andrew Geissler09036742021-06-25 14:25:14 -05001397 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001398 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
Andrew Geissler595f6302022-01-24 19:11:47 +00001399 class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001400
Andrew Geisslerf0343792020-11-18 10:42:21 -06001401 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001402 Specifies the list of packages to be added to the image. You should
1403 only set this variable in the ``local.conf`` configuration file found
1404 in the :term:`Build Directory`.
1405
1406 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1407 supported.
1408
Andrew Geisslerf0343792020-11-18 10:42:21 -06001409 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001410 Specifies the parent directory of the OpenEmbedded-Core Metadata
1411 layer (i.e. ``meta``).
1412
Andrew Geissler09036742021-06-25 14:25:14 -05001413 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001414 of this layer and not the layer itself. Consider an example where you
1415 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001416 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001417 points to the ``poky`` folder because it is the parent directory of
1418 the ``poky/meta`` layer.
1419
Andrew Geisslerf0343792020-11-18 10:42:21 -06001420 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001421 Lists files from the :term:`COREBASE` directory that
1422 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001423 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001424 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001425 into the extensible SDK.
1426
Andrew Geissler09036742021-06-25 14:25:14 -05001427 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001428 typically contains build directories and other files that should not
1429 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001430 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001431 are actually needed.
1432
Andrew Geisslerf0343792020-11-18 10:42:21 -06001433 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001434 The minimal command and arguments used to run the C preprocessor.
1435
Andrew Geisslerf0343792020-11-18 10:42:21 -06001436 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001437 Specifies the flags to pass to the C pre-processor (i.e. to both the
1438 C and the C++ compilers). This variable is exported to an environment
1439 variable and thus made visible to the software being built during the
1440 compilation step.
1441
Andrew Geissler09036742021-06-25 14:25:14 -05001442 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001443 being built:
1444
1445 - :term:`TARGET_CPPFLAGS` when building for
1446 the target
1447
1448 - :term:`BUILD_CPPFLAGS` when building for the
1449 build host (i.e. ``-native``)
1450
1451 - :term:`BUILDSDK_CPPFLAGS` when building
1452 for an SDK (i.e. ``nativesdk-``)
1453
Andrew Geisslerf0343792020-11-18 10:42:21 -06001454 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001455 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001456 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001457 :term:`TARGET_PREFIX` variable.
1458
1459 .. note::
1460
Andrew Geissler09036742021-06-25 14:25:14 -05001461 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001462 variable only in certain contexts (e.g. when building for kernel
1463 and kernel module recipes).
1464
Andrew Geissler9aee5002022-03-30 16:27:02 +00001465 :term:`CVE_CHECK_IGNORE`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001466 The list of CVE IDs which are ignored. Here is
1467 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1468
1469 # This is windows only issue.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001470 CVE_CHECK_IGNORE += "CVE-2020-15523"
1471
Patrick Williams975a06f2022-10-21 14:42:47 -05001472 :term:`CVE_CHECK_SHOW_WARNINGS`
1473 Specifies whether or not the :ref:`cve-check <ref-classes-cve-check>`
1474 class should generate warning messages on the console when unpatched
1475 CVEs are found. The default is "1", but you may wish to set it to "0" if
1476 you are already examining/processing the logs after the build has
1477 completed and thus do not need the warning messages.
1478
Andrew Geissler9aee5002022-03-30 16:27:02 +00001479 :term:`CVE_CHECK_SKIP_RECIPE`
1480 The list of package names (:term:`PN`) for which
1481 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001482
Patrick Williams975a06f2022-10-21 14:42:47 -05001483 :term:`CVE_DB_UPDATE_INTERVAL`
1484 Specifies the CVE database update interval in seconds, as used by
1485 ``cve-update-db-native``. The default value is "86400" i.e. once a day
1486 (24*60*60). If the value is set to "0" then the update will be forced
1487 every time. Alternatively, a negative value e.g. "-1" will disable
1488 updates entirely.
1489
Patrick Williams213cb262021-08-07 19:21:33 -05001490 :term:`CVE_PRODUCT`
1491 In a recipe, defines the name used to match the recipe name
1492 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1493
Patrick Williams975a06f2022-10-21 14:42:47 -05001494 The default is ${:term:`BPN`} (except for recipes that inherit the
1495 :ref:`pypi <ref-classes-pypi>` class where it is set based upon
1496 :term:`PYPI_PACKAGE`). If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001497 database or matches with multiple entries in the database, the default
1498 value needs to be changed.
1499
1500 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1501
1502 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1503
Patrick Williams03907ee2022-05-01 06:28:52 -05001504 Sometimes the product name is not specific enough, for example
1505 "tar" has been matching CVEs for the GNU ``tar`` package and also
1506 the ``node-tar`` node.js extension. To avoid this problem, use the
1507 vendor name as a prefix. The syntax for this is::
1508
1509 CVE_PRODUCT = "vendor:package"
1510
Andrew Geisslerf0343792020-11-18 10:42:21 -06001511 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001512 The directory in which files checked out under the CVS system are
1513 stored.
1514
Andrew Geisslerf0343792020-11-18 10:42:21 -06001515 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001516 The minimal command and arguments used to run the C++ compiler.
1517
Andrew Geisslerf0343792020-11-18 10:42:21 -06001518 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001519 Specifies the flags to pass to the C++ compiler. This variable is
1520 exported to an environment variable and thus made visible to the
1521 software being built during the compilation step.
1522
Andrew Geissler09036742021-06-25 14:25:14 -05001523 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001524 being built:
1525
1526 - :term:`TARGET_CXXFLAGS` when building for
1527 the target
1528
1529 - :term:`BUILD_CXXFLAGS` when building for the
1530 build host (i.e. ``-native``)
1531
1532 - :term:`BUILDSDK_CXXFLAGS` when building
1533 for an SDK (i.e. ``nativesdk-``)
1534
Andrew Geisslerf0343792020-11-18 10:42:21 -06001535 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001536 The destination directory. The location in the :term:`Build Directory`
1537 where components are installed by the
1538 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001539 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001540
1541 ${WORKDIR}/image
1542
1543 .. note::
1544
1545 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001546 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001547
Andrew Geisslerf0343792020-11-18 10:42:21 -06001548 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001549 The date the build was started. Dates appear using the year, month,
1550 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1551
Andrew Geisslerf0343792020-11-18 10:42:21 -06001552 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001553 The date and time on which the current build started. The format is
1554 suitable for timestamps.
1555
Andrew Geisslerf0343792020-11-18 10:42:21 -06001556 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001557 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001558 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001559 particular package should not be renamed according to Debian library
1560 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001561 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001562
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001563 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001564
Andrew Geisslerf0343792020-11-18 10:42:21 -06001565 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001566 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001567 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001568 the library name for an individual package. Overriding the library
1569 name in these cases is rare. You must use the package name as an
1570 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001571 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001572
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001573 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001574
Andrew Geisslerf0343792020-11-18 10:42:21 -06001575 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001576 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001577 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001578
Andrew Geisslerf0343792020-11-18 10:42:21 -06001579 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001580 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001581 compiling a system for debugging. This variable defaults to "-O
1582 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1583
Andrew Geisslereff27472021-10-29 15:35:00 -05001584 :term:`DEBUG_PREFIX_MAP`
1585 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1586 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1587 replace build-time paths by install-time ones in the debugging sections
1588 of binaries. This makes compiler output files location independent,
1589 at the cost of having to pass an extra command to tell the debugger
1590 where source files are.
1591
1592 This is used by the Yocto Project to guarantee
1593 :doc:`/test-manual/reproducible-builds` even when the source code of
1594 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1595 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1596 website for details.
1597
1598 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1599 not intended to be user-configurable.
1600
Andrew Geissler9aee5002022-03-30 16:27:02 +00001601 :term:`DEFAULT_PREFERENCE`
1602 Specifies a weak bias for recipe selection priority.
1603
1604 The most common usage of this is variable is to set it to "-1" within
1605 a recipe for a development version of a piece of software. Using the
1606 variable in this way causes the stable version of the recipe to build
1607 by default in the absence of :term:`PREFERRED_VERSION` being used to
1608 build the development version.
1609
1610 .. note::
1611
1612 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1613 by :term:`BBFILE_PRIORITY` if that variable is different between two
1614 layers that contain different versions of the same recipe.
1615
Andrew Geisslerf0343792020-11-18 10:42:21 -06001616 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001617 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1618 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001619 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001620 :term:`TUNE_FEATURES`.
1621
1622 The default tune is either implicitly or explicitly set by the
1623 machine (:term:`MACHINE`). However, you can override
1624 the setting using available tunes as defined with
1625 :term:`AVAILTUNES`.
1626
Andrew Geisslerf0343792020-11-18 10:42:21 -06001627 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001628 Lists a recipe's build-time dependencies. These are dependencies on
1629 other recipes whose contents (e.g. headers and shared libraries) are
1630 needed by the recipe at build time.
1631
1632 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001633 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001634
1635 DEPENDS = "bar"
1636
1637 The practical effect of the previous
1638 assignment is that all files installed by bar will be available in
1639 the appropriate staging sysroot, given by the
1640 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1641 :ref:`ref-tasks-configure` task for ``foo`` runs.
Patrick Williams2194f502022-10-16 14:26:09 -05001642 This mechanism is implemented by having :ref:`ref-tasks-configure` depend on
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001643 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001644 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001645 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1646 declaration in the :ref:`base <ref-classes-base>` class.
1647
1648 .. note::
1649
Andrew Geissler09036742021-06-25 14:25:14 -05001650 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001651 explicitly. The standard classes and build-related variables are
1652 configured to automatically use the appropriate staging sysroots.
1653
Andrew Geissler09036742021-06-25 14:25:14 -05001654 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001655 that run on the build machine during the build. For example, a recipe
1656 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001657 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001658
1659 DEPENDS = "codegen-native"
1660
1661 For more
1662 information, see the :ref:`native <ref-classes-native>` class and
1663 the :term:`EXTRANATIVEPATH` variable.
1664
1665 .. note::
1666
Andrew Geissler09036742021-06-25 14:25:14 -05001667 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001668 it is a list of :term:`PROVIDES` names, which
1669 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001670 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001671 instead, as this will put files from all the packages that make
1672 up ``foo``, which includes those from ``foo-dev``, into the
1673 sysroot.
1674
Andrew Geissler09036742021-06-25 14:25:14 -05001675 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001676 itself add any runtime dependencies between the packages
1677 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001678 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001679 section in the Yocto Project Overview and Concepts Manual,
1680 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001681 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001682
Andrew Geissler09036742021-06-25 14:25:14 -05001683 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001684 recipes that install precompiled components. For example, if
1685 ``libfoo`` is a precompiled library that links against
1686 ``libbar``, then linking against ``libfoo`` requires both
1687 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001688 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001689 to the recipe that installs ``libbar``, other recipes might
1690 fail to link against ``libfoo``.
1691
1692 For information on runtime dependencies, see the
1693 :term:`RDEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05001694 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1695 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001696 BitBake User Manual for additional information on tasks and
1697 dependencies.
1698
Andrew Geisslerf0343792020-11-18 10:42:21 -06001699 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001700 Points to the general area that the OpenEmbedded build system uses to
1701 place images, packages, SDKs, and other output files that are ready
1702 to be used outside of the build system. By default, this directory
1703 resides within the :term:`Build Directory` as
1704 ``${TMPDIR}/deploy``.
1705
1706 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001707 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001708 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001709 ":ref:`overview-manual/concepts:images`",
1710 ":ref:`overview-manual/concepts:package feeds`", and
1711 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001712 Yocto Project Overview and Concepts Manual.
1713
Andrew Geisslerf0343792020-11-18 10:42:21 -06001714 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001715 Points to the area that the OpenEmbedded build system uses to place
1716 Debian packages that are ready to be used outside of the build
1717 system. This variable applies only when
1718 :term:`PACKAGE_CLASSES` contains
1719 "package_deb".
1720
1721 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001722 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001723 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001724
1725 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1726
1727 The :ref:`package_deb <ref-classes-package_deb>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001728 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001729 :ref:`ref-tasks-package_write_deb` task
1730 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001731 information on how packaging works, see the
1732 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001733 in the Yocto Project Overview and Concepts Manual.
1734
Andrew Geisslerf0343792020-11-18 10:42:21 -06001735 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001736 Points to the area that the OpenEmbedded build system uses to place
1737 images and other associated output files that are ready to be
1738 deployed onto the target machine. The directory is machine-specific
1739 as it contains the ``${MACHINE}`` name. By default, this directory
1740 resides within the :term:`Build Directory` as
1741 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1742
Andrew Geissler09036742021-06-25 14:25:14 -05001743 It must not be used directly in recipes when deploying files. Instead,
1744 it's only useful when a recipe needs to "read" a file already deployed
1745 by a dependency. So, it should be filled with the contents of
1746 :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1747 with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1748 <ref-classes-image>` class.
1749
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001750 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001751 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001752 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001753 ":ref:`overview-manual/concepts:images`" and
1754 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001755 the Yocto Project Overview and Concepts Manual.
1756
Andrew Geisslerf0343792020-11-18 10:42:21 -06001757 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001758 Points to the area that the OpenEmbedded build system uses to place
1759 IPK packages that are ready to be used outside of the build system.
1760 This variable applies only when
1761 :term:`PACKAGE_CLASSES` contains
1762 "package_ipk".
1763
1764 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001765 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001766
1767 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1768
1769 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001770 :term:`DEPLOY_DIR_IPK` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001771 :ref:`ref-tasks-package_write_ipk` task
1772 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001773 on how packaging works, see the
1774 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001775 in the Yocto Project Overview and Concepts Manual.
1776
Andrew Geisslerf0343792020-11-18 10:42:21 -06001777 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001778 Points to the area that the OpenEmbedded build system uses to place
1779 RPM packages that are ready to be used outside of the build system.
1780 This variable applies only when
1781 :term:`PACKAGE_CLASSES` contains
1782 "package_rpm".
1783
1784 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001785 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001786
1787 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1788
1789 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001790 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001791 :ref:`ref-tasks-package_write_rpm` task
1792 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001793 on how packaging works, see the
1794 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001795 in the Yocto Project Overview and Concepts Manual.
1796
Andrew Geisslerf0343792020-11-18 10:42:21 -06001797 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001798 Points to the area that the OpenEmbedded build system uses to place
1799 tarballs that are ready to be used outside of the build system. This
1800 variable applies only when
1801 :term:`PACKAGE_CLASSES` contains
1802 "package_tar".
1803
1804 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001805 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001806
1807 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1808
1809 The :ref:`package_tar <ref-classes-package_tar>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001810 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001811 :ref:`ref-tasks-package_write_tar` task
1812 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001813 on how packaging works, see the
1814 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001815 in the Yocto Project Overview and Concepts Manual.
1816
Andrew Geisslerf0343792020-11-18 10:42:21 -06001817 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001818 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001819 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler595f6302022-01-24 19:11:47 +00001820 is set in the :ref:`deploy <ref-classes-deploy>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001821
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001822 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001823
Andrew Geissler595f6302022-01-24 19:11:47 +00001824 Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05001825 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001826 them into :term:`DEPLOY_DIR_IMAGE`
1827 afterwards.
1828
Andrew Geisslerf0343792020-11-18 10:42:21 -06001829 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001830 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05001831 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001832 variable.
1833
Patrick Williams975a06f2022-10-21 14:42:47 -05001834 :term:`DEV_PKG_DEPENDENCY`
1835 Provides an easy way for recipes to disable or adjust the runtime
1836 dependency (:term:`RDEPENDS`) of the ``${PN}-dev`` package on the main
1837 (``${PN}``) package, particularly where the main package may be empty.
1838
1839 :term:`DISABLE_STATIC`
1840 Used in order to disable static linking by default (in order to save
1841 space, since static libraries are often unused in embedded systems.)
1842 The default value is " --disable-static", however it can be set to ""
1843 in order to enable static linking if desired. Certain recipes do this
1844 individually, and also there is a
1845 ``meta/conf/distro/include/no-static-libs.inc`` include file that
1846 disables static linking for a number of recipes. Some software
1847 packages or build tools (such as CMake) have explicit support for
1848 enabling / disabling static linking, and in those cases
1849 :term:`DISABLE_STATIC` is not used.
1850
Andrew Geisslerf0343792020-11-18 10:42:21 -06001851 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001852 The short name of the distribution. For information on the long name
1853 of the distribution, see the :term:`DISTRO_NAME`
1854 variable.
1855
Andrew Geissler09036742021-06-25 14:25:14 -05001856 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001857 file whose root name is the same as the variable's argument and whose
1858 filename extension is ``.conf``. For example, the distribution
1859 configuration file for the Poky distribution is named ``poky.conf``
1860 and resides in the ``meta-poky/conf/distro`` directory of the
1861 :term:`Source Directory`.
1862
Andrew Geissler09036742021-06-25 14:25:14 -05001863 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05001864 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001865
1866 DISTRO = "poky"
1867
1868 Distribution configuration files are located in a ``conf/distro``
1869 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05001870 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001871 spaces, and is typically all lower-case.
1872
1873 .. note::
1874
Andrew Geissler09036742021-06-25 14:25:14 -05001875 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001876 are used, which are specified within
1877 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001878
Andrew Geisslerf0343792020-11-18 10:42:21 -06001879 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001880 Specifies a codename for the distribution being built.
1881
Andrew Geisslerf0343792020-11-18 10:42:21 -06001882 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001883 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00001884 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001885 variable only really applies to the more full-featured images that
1886 include ``packagegroup-base``. You can use this variable to keep
1887 distro policy out of generic images. As with all other distro
1888 variables, you set this variable in the distro ``.conf`` file.
1889
Andrew Geisslerf0343792020-11-18 10:42:21 -06001890 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001891 Specifies a list of distro-specific packages to add to all images if
1892 the packages exist. The packages might not exist or be empty (e.g.
1893 kernel modules). The list of packages are automatically installed but
1894 you can remove them.
1895
Andrew Geisslerf0343792020-11-18 10:42:21 -06001896 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001897 The software support you want in your distribution for various
1898 features. You define your distribution features in the distribution
1899 configuration file.
1900
1901 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05001902 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001903 to the configure script during the
1904 :ref:`ref-tasks-configure` task for recipes that
1905 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05001906 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001907 target that can optionally support X11 to have its X11 support
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05001908 enabled.
1909
1910 .. note::
1911
1912 Just enabling :term:`DISTRO_FEATURES` alone doesn't
1913 enable feature support for packages. Mechanisms such as making
1914 :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used
1915 to enable/disable package features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001916
1917 Two more examples are Bluetooth and NFS support. For a more complete
1918 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001919 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001920
Andrew Geisslerf0343792020-11-18 10:42:21 -06001921 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05001922 Features to be added to :term:`DISTRO_FEATURES` if not also present in
1923 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001924
1925 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1926 not intended to be user-configurable. It is best to just reference
1927 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001928 all distro configurations. See the ":ref:`ref-features-backfill`" section
1929 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001930
Andrew Geisslerf0343792020-11-18 10:42:21 -06001931 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05001932 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1933 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001934 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001935
Andrew Geisslerf0343792020-11-18 10:42:21 -06001936 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001937 A convenience variable that gives you the default list of distro
1938 features with the exception of any features specific to the C library
1939 (``libc``).
1940
1941 When creating a custom distribution, you might find it useful to be
1942 able to reuse the default
1943 :term:`DISTRO_FEATURES` options without the
1944 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05001945 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001946
1947 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1948
Andrew Geisslerf0343792020-11-18 10:42:21 -06001949 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001950 Specifies a list of features that if present in the target
1951 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001952 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001953 variable is used in addition to the features filtered using the
1954 :term:`DISTRO_FEATURES_NATIVE`
1955 variable.
1956
Andrew Geisslerf0343792020-11-18 10:42:21 -06001957 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001958 Specifies a list of features that if present in the target
1959 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001960 included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001961 variable is used in addition to the features filtered using the
1962 :term:`DISTRO_FEATURES_NATIVESDK`
1963 variable.
1964
Andrew Geisslerf0343792020-11-18 10:42:21 -06001965 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001966 Specifies a list of features that should be included in
1967 :term:`DISTRO_FEATURES` when building native
1968 recipes. This variable is used in addition to the features filtered
1969 using the
1970 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1971 variable.
1972
Andrew Geisslerf0343792020-11-18 10:42:21 -06001973 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001974 Specifies a list of features that should be included in
1975 :term:`DISTRO_FEATURES` when building
1976 nativesdk recipes. This variable is used in addition to the features
1977 filtered using the
1978 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1979 variable.
1980
Andrew Geisslerf0343792020-11-18 10:42:21 -06001981 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001982 The long name of the distribution. For information on the short name
1983 of the distribution, see the :term:`DISTRO` variable.
1984
Andrew Geissler09036742021-06-25 14:25:14 -05001985 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001986 configuration file whose root name is the same as the variable's
1987 argument and whose filename extension is ``.conf``. For example, the
1988 distribution configuration file for the Poky distribution is named
1989 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1990 of the :term:`Source Directory`.
1991
Andrew Geissler09036742021-06-25 14:25:14 -05001992 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05001993 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001994
1995 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1996
1997 Distribution configuration files are located in a ``conf/distro``
1998 directory within the :term:`Metadata` that contains the
1999 distribution configuration.
2000
2001 .. note::
2002
Andrew Geissler09036742021-06-25 14:25:14 -05002003 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002004 configurations are used, which are specified within
2005 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002006
Andrew Geisslerf0343792020-11-18 10:42:21 -06002007 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002008 The version of the distribution.
2009
Andrew Geisslerf0343792020-11-18 10:42:21 -06002010 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002011 A colon-separated list of overrides specific to the current
2012 distribution. By default, this list includes the value of
2013 :term:`DISTRO`.
2014
Andrew Geissler09036742021-06-25 14:25:14 -05002015 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002016 apply to the distribution.
2017
Andrew Geissler09036742021-06-25 14:25:14 -05002018 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002019 is included in the default value of
2020 :term:`OVERRIDES`.
2021
Andrew Geisslerf0343792020-11-18 10:42:21 -06002022 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002023 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05002024 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002025 for everything except Git repositories. If you want tarballs of Git
2026 repositories, use the
2027 :term:`BB_GENERATE_MIRROR_TARBALLS`
2028 variable.
2029
Andrew Geissler09036742021-06-25 14:25:14 -05002030 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002031 ``conf/local.conf`` file. This directory is self-maintaining and you
2032 should not have to touch it. By default, the directory is
2033 ``downloads`` in the :term:`Build Directory`.
2034 ::
2035
2036 #DL_DIR ?= "${TOPDIR}/downloads"
2037
2038 To specify a different download directory,
2039 simply remove the comment from the line and provide your directory.
2040
2041 During a first build, the system downloads many different source code
2042 tarballs from various upstream projects. Downloading can take a
2043 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002044 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002045 system looks there first to find source tarballs.
2046
2047 .. note::
2048
2049 When wiping and rebuilding, you can preserve this directory to
2050 speed up this part of subsequent builds.
2051
2052 You can safely share this directory between multiple builds on the
2053 same development machine. For additional information on how the build
2054 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002055 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002056 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002057 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002058 Wiki page.
2059
Andrew Geisslerf0343792020-11-18 10:42:21 -06002060 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002061 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2062 class, this variable sets the compression policy used when the
2063 OpenEmbedded build system compresses man pages and info pages. By
2064 default, the compression method used is gz (gzip). Other policies
2065 available are xz and bz2.
2066
2067 For information on policies and on how to use this variable, see the
Patrick Williams975a06f2022-10-21 14:42:47 -05002068 comments in the ``meta/classes-recipe/compress_doc.bbclass`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002069
Andrew Geisslerf0343792020-11-18 10:42:21 -06002070 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002071 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2072 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002073 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002074 default is "grub-efi", but "systemd-boot" can be used instead.
2075
2076 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2077 :ref:`image-live <ref-classes-image-live>` classes for more
2078 information.
2079
Andrew Geisslerf0343792020-11-18 10:42:21 -06002080 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002081 Variable that controls which locales for ``glibc`` are generated
2082 during the build (useful if the target device has 64Mbytes of RAM or
2083 less).
2084
Andrew Geisslerf0343792020-11-18 10:42:21 -06002085 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002086 When used with the :ref:`report-error <ref-classes-report-error>`
2087 class, specifies the path used for storing the debug files created by
2088 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002089 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002090 allows you to submit build errors you encounter to a central
2091 database. By default, the value of this variable is
2092 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2093
Andrew Geissler09036742021-06-25 14:25:14 -05002094 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002095 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002096 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002097
2098 ERR_REPORT_DIR = "path"
2099
Andrew Geisslerf0343792020-11-18 10:42:21 -06002100 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002101 Specifies the quality assurance checks whose failures are reported as
2102 errors by the OpenEmbedded build system. You set this variable in
2103 your distribution configuration file. For a list of the checks you
2104 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002105 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002106
Andrew Geissler9aee5002022-03-30 16:27:02 +00002107 :term:`ESDK_CLASS_INHERIT_DISABLE`
2108 A list of classes to remove from the :term:`INHERIT`
2109 value globally within the extensible SDK configuration. The
2110 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2111 default value::
2112
2113 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2114
2115 Some classes are not generally applicable within the extensible SDK
2116 context. You can use this variable to disable those classes.
2117
2118 For additional information on how to customize the extensible SDK's
2119 configuration, see the
2120 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2121 section in the Yocto Project Application Development and the
2122 Extensible Software Development Kit (eSDK) manual.
2123
2124 :term:`ESDK_LOCALCONF_ALLOW`
2125 A list of variables allowed through from the OpenEmbedded build
2126 system configuration into the extensible SDK configuration. By
2127 default, the list of variables is empty and is set in the
2128 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2129
2130 This list overrides the variables specified using the
2131 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2132 other variables automatically added due to the "/" character
2133 being found at the start of the
2134 value, which is usually indicative of being a path and thus might not
2135 be valid on the system where the SDK is installed.
2136
2137 For additional information on how to customize the extensible SDK's
2138 configuration, see the
2139 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2140 section in the Yocto Project Application Development and the
2141 Extensible Software Development Kit (eSDK) manual.
2142
2143 :term:`ESDK_LOCALCONF_REMOVE`
2144 A list of variables not allowed through from the OpenEmbedded build
2145 system configuration into the extensible SDK configuration. Usually,
2146 these are variables that are specific to the machine on which the
2147 build system is running and thus would be potentially problematic
2148 within the extensible SDK.
2149
2150 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2151 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2152 excludes the following variables:
2153
2154 - :term:`CONF_VERSION`
2155 - :term:`BB_NUMBER_THREADS`
2156 - :term:`BB_NUMBER_PARSE_THREADS`
2157 - :term:`PARALLEL_MAKE`
2158 - :term:`PRSERV_HOST`
2159 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2160 - :term:`SSTATE_DIR` :term:`TMPDIR`
2161 - :term:`BB_SERVER_TIMEOUT`
2162
2163 For additional information on how to customize the extensible SDK's
2164 configuration, see the
2165 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2166 section in the Yocto Project Application Development and the
2167 Extensible Software Development Kit (eSDK) manual.
2168
Andrew Geisslerf0343792020-11-18 10:42:21 -06002169 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002170 Triggers the OpenEmbedded build system's shared libraries resolver to
2171 exclude an entire package when scanning for shared libraries.
2172
2173 .. note::
2174
2175 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002176 the internal function ``package_do_shlibs``, which is part of the
2177 :ref:`ref-tasks-package` task. You should be aware that the shared
2178 libraries resolver might implicitly define some dependencies between
2179 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002180
Andrew Geissler09036742021-06-25 14:25:14 -05002181 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002182 :term:`PRIVATE_LIBS` variable, which excludes a
2183 package's particular libraries only and not the whole package.
2184
Andrew Geissler09036742021-06-25 14:25:14 -05002185 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002186 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002187
2188 EXCLUDE_FROM_SHLIBS = "1"
2189
Andrew Geisslerf0343792020-11-18 10:42:21 -06002190 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002191 Directs BitBake to exclude a recipe from world builds (i.e.
2192 ``bitbake world``). During world builds, BitBake locates, parses and
2193 builds all recipes found in every layer exposed in the
2194 ``bblayers.conf`` configuration file.
2195
2196 To exclude a recipe from a world build using this variable, set the
2197 variable to "1" in the recipe.
2198
2199 .. note::
2200
Andrew Geissler09036742021-06-25 14:25:14 -05002201 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002202 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002203 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002204 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002205
Andrew Geisslerf0343792020-11-18 10:42:21 -06002206 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002207 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002208 version based on the recipe's :term:`PE` value. If :term:`PE`
2209 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2210 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2211 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2212 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002213
2214 See the :term:`STAMP` variable for an example.
2215
Andrew Geisslerf0343792020-11-18 10:42:21 -06002216 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002217 The full package version specification as it appears on the final
2218 packages produced by a recipe. The variable's value is normally used
2219 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002220 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002221
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002222 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002223
2224 The dependency relationships are intended to force the package
2225 manager to upgrade these types of packages in lock-step.
2226
Andrew Geisslerf0343792020-11-18 10:42:21 -06002227 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002228 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002229 tools are not in the source tree.
2230
2231 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002232 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002233 variable tells the OpenEmbedded build system to prefer the installed
2234 external tools. See the
2235 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
Patrick Williams975a06f2022-10-21 14:42:47 -05002236 ``meta/classes-recipe`` to see how the variable is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002237
Andrew Geisslerf0343792020-11-18 10:42:21 -06002238 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002239 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2240 class, this variable points to the source tree, which is outside of
2241 the OpenEmbedded build system. When set, this variable sets the
2242 :term:`S` variable, which is what the OpenEmbedded build
2243 system uses to locate unpacked recipe source code.
2244
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002245 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002246 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002247 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002248 section in the Yocto Project Development Tasks Manual.
2249
Andrew Geisslerf0343792020-11-18 10:42:21 -06002250 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002251 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2252 class, this variable points to the directory in which the recipe's
2253 source code is built, which is outside of the OpenEmbedded build
2254 system. When set, this variable sets the :term:`B` variable,
2255 which is what the OpenEmbedded build system uses to locate the Build
2256 Directory.
2257
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002258 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002259 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002260 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002261 section in the Yocto Project Development Tasks Manual.
2262
Andrew Geisslerf0343792020-11-18 10:42:21 -06002263 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002264 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
Andrew Geissler09036742021-06-25 14:25:14 -05002265 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002266 pass to the ``autoreconf`` command that is executed during the
2267 :ref:`ref-tasks-configure` task.
2268
2269 The default value is "--exclude=autopoint".
2270
Andrew Geisslerf0343792020-11-18 10:42:21 -06002271 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002272 A list of additional features to include in an image. When listing
2273 more than one feature, separate them with a space.
2274
2275 Typically, you configure this variable in your ``local.conf`` file,
2276 which is found in the :term:`Build Directory`.
2277 Although you can use this variable from within a recipe, best
2278 practices dictate that you do not.
2279
2280 .. note::
2281
2282 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002283 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002284
2285 Here are some examples of features you can add:
2286
Andrew Geissler615f2f12022-07-15 14:00:58 -05002287 - "dbg-pkgs" --- adds -dbg packages for all installed packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002288 symbol information for debugging and profiling.
2289
Andrew Geissler615f2f12022-07-15 14:00:58 -05002290 - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002291 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002292 'post-install-logging' features in the ":ref:`ref-features-image`"
2293 section for more information.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002294 - "dev-pkgs" --- adds -dev packages for all installed packages. This is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002295 useful if you want to develop against the libraries in the image.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002296 - "read-only-rootfs" --- creates an image whose root filesystem is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002297 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002298 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002299 section in the Yocto Project Development Tasks Manual for more
2300 information
Andrew Geissler615f2f12022-07-15 14:00:58 -05002301 - "tools-debug" --- adds debugging tools such as gdb and strace.
2302 - "tools-sdk" --- adds development tools such as gcc, make,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002303 pkgconfig and so forth.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002304 - "tools-testapps" --- adds useful testing tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002305 such as ts_print, aplay, arecord and so forth.
2306
2307 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002308 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002309
2310 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002311 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 -05002312 section in the Yocto Project Development Tasks Manual.
2313
Andrew Geisslerf0343792020-11-18 10:42:21 -06002314 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002315 Specifies additional options for the image creation command that has
2316 been specified in :term:`IMAGE_CMD`. When setting
2317 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002318 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002319
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002320 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002321
Andrew Geisslerf0343792020-11-18 10:42:21 -06002322 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002323 A list of recipes to build that do not provide packages for
2324 installing into the root filesystem.
2325
2326 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002327 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002328 variable to list these recipes and thus specify the dependencies. A
2329 typical example is a required bootloader in a machine configuration.
2330
2331 .. note::
2332
2333 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002334 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002335
Andrew Geisslerf0343792020-11-18 10:42:21 -06002336 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002337 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2338 :ref:`cmake <ref-classes-cmake>` class for additional information.
2339
Andrew Geisslerf0343792020-11-18 10:42:21 -06002340 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002341 Additional ``configure`` script options. See
2342 :term:`PACKAGECONFIG_CONFARGS` for
2343 additional information on passing configure script options.
2344
Andrew Geisslerf0343792020-11-18 10:42:21 -06002345 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002346 Additional GNU ``make`` options.
2347
Andrew Geissler09036742021-06-25 14:25:14 -05002348 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002349 variable to specify any required GNU options.
2350
2351 :term:`PARALLEL_MAKE` and
2352 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002353 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002354
Andrew Geisslerf0343792020-11-18 10:42:21 -06002355 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002356 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2357 variable specifies additional configuration options you want to pass
2358 to the ``scons`` command line.
2359
Andrew Geisslerf0343792020-11-18 10:42:21 -06002360 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002361 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2362 class, this variable provides image level user and group operations.
2363 This is a more global method of providing user and group
2364 configuration as compared to using the
2365 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2366 group configurations to a specific recipe.
2367
2368 The set list of commands you can configure using the
Andrew Geissler595f6302022-01-24 19:11:47 +00002369 :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These
Andrew Geisslerc926e172021-05-07 16:11:35 -05002370 commands map to the normal Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002371
2372 # EXTRA_USERS_PARAMS = "\
2373 # useradd -p '' tester; \
2374 # groupadd developers; \
2375 # userdel nobody; \
2376 # groupdel -g video; \
2377 # groupmod -g 1020 developers; \
2378 # usermod -s /bin/sh tester; \
2379 # "
2380
Patrick Williams03907ee2022-05-01 06:28:52 -05002381 Hardcoded passwords are supported via the ``-p`` parameters for
2382 ``useradd`` or ``usermod``, but only hashed.
2383
2384 Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
2385 passwords. First on host, create the (escaped) password hash::
2386
2387 printf "%q" $(mkpasswd -m sha256crypt tester01)
2388
2389 The resulting hash is set to a variable and used in ``useradd`` command parameters::
2390
2391 inherit extrausers
2392 PASSWD = "\$X\$ABC123\$A-Long-Hash"
2393 EXTRA_USERS_PARAMS = "\
2394 useradd -p '${PASSWD}' tester-jim; \
2395 useradd -p '${PASSWD}' tester-sue; \
2396 "
2397
2398 Finally, here is an example that sets the root password::
2399
2400 inherit extrausers
2401 EXTRA_USERS_PARAMS = "\
2402 usermod -p '${PASSWD}' root; \
2403 "
2404
2405 .. note::
2406
2407 From a security perspective, hardcoding a default password is not
Andrew Geissler87f5cff2022-09-30 13:13:31 -05002408 generally a good idea or even legal in some jurisdictions. It is
2409 recommended that you do not do this if you are building a production
Patrick Williams03907ee2022-05-01 06:28:52 -05002410 image.
2411
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002412 Additionally there is a special ``passwd-expire`` command that will
2413 cause the password for a user to be expired and thus force changing it
2414 on first login, for example::
2415
2416 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2417
2418 .. note::
2419
2420 At present, ``passwd-expire`` may only work for remote logins when
2421 using OpenSSH and not dropbear as an SSH server.
2422
Andrew Geissler9aee5002022-03-30 16:27:02 +00002423 :term:`EXTRANATIVEPATH`
2424 A list of subdirectories of
2425 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2426 added to the beginning of the environment variable ``PATH``. As an
2427 example, the following prepends
2428 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2429 ``PATH``::
2430
2431 EXTRANATIVEPATH = "foo bar"
2432
Andrew Geisslerf0343792020-11-18 10:42:21 -06002433 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002434 Defines one or more packages to include in an image when a specific
2435 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002436 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002437 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002438
2439 FEATURE_PACKAGES_widget = "package1 package2"
2440
Andrew Geissler09036742021-06-25 14:25:14 -05002441 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002442 package1 and package2 would be included in the image.
2443
2444 .. note::
2445
Andrew Geissler09036742021-06-25 14:25:14 -05002446 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002447 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002448 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002449 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002450
Andrew Geisslerf0343792020-11-18 10:42:21 -06002451 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002452 Points to the base URL of the server and location within the
2453 document-root that provides the metadata and packages required by
2454 OPKG to support runtime package management of IPK packages. You set
2455 this variable in your ``local.conf`` file.
2456
Andrew Geisslerc926e172021-05-07 16:11:35 -05002457 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002458
2459 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2460
2461 This example assumes you are serving
2462 your packages over HTTP and your databases are located in a directory
2463 named ``BOARD-dir``, which is underneath your HTTP server's
2464 document-root. In this case, the OpenEmbedded build system generates
2465 a set of configuration files for you in your target that work with
2466 the feed.
2467
Andrew Geisslerf0343792020-11-18 10:42:21 -06002468 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002469 The list of files and directories that are placed in a package. The
2470 :term:`PACKAGES` variable lists the packages
2471 generated by a recipe.
2472
Andrew Geissler09036742021-06-25 14:25:14 -05002473 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002474 identifies the resulting package. Then, provide a space-separated
2475 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002476 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002477
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002478 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002479
2480 .. note::
2481
2482 - When specifying files or paths, you can pattern match using
2483 Python's
2484 `glob <https://docs.python.org/3/library/glob.html>`_
2485 syntax. For details on the syntax, see the documentation by
2486 following the previous link.
2487
Andrew Geissler09036742021-06-25 14:25:14 -05002488 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002489 good practice to use appropriate path variables. For example,
2490 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2491 rather than ``/usr/bin``. You can find a list of these
2492 variables at the top of the ``meta/conf/bitbake.conf`` file in
2493 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002494 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002495 this file.
2496
Andrew Geissler09036742021-06-25 14:25:14 -05002497 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002498 editable and you know they should not be overwritten during the
2499 package update process by the Package Management System (PMS), you
2500 can identify these files so that the PMS will not overwrite them. See
2501 the :term:`CONFFILES` variable for information on
2502 how to identify these files to the PMS.
2503
Andrew Geisslerf0343792020-11-18 10:42:21 -06002504 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002505 Defines the file specification to match
2506 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002507 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002508 symbolic link (symlink) for shared libraries on the target platform.
2509
2510 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002511 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002512
2513 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2514
Andrew Geisslerf0343792020-11-18 10:42:21 -06002515 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002516 Extends the search path the OpenEmbedded build system uses when
2517 looking for files and patches as it processes recipes and append
2518 files. The default directories BitBake uses when it processes recipes
2519 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002520 variable. You can extend :term:`FILESPATH` variable by using
2521 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002522
2523 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002524 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002525 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002526
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002527 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002528
2529 In the above example, the build system first
2530 looks for files in a directory that has the same name as the
2531 corresponding append file.
2532
2533 .. note::
2534
Andrew Geissler09036742021-06-25 14:25:14 -05002535 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002536 expansion (``:=``) operator. Immediate expansion makes sure that
2537 BitBake evaluates :term:`THISDIR` at the time the
2538 directive is encountered rather than at some later time when
2539 expansion might result in a directory that does not contain the
2540 files you need.
2541
2542 Also, include the trailing separating colon character if you are
2543 prepending. The trailing colon character is necessary because you
2544 are directing BitBake to extend the path by prepending directories
2545 to the search path.
2546
Andrew Geisslerc926e172021-05-07 16:11:35 -05002547 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002548
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002549 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002550
2551 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002552 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002553 in the same directory as the corresponding append file.
2554
Andrew Geisslerc926e172021-05-07 16:11:35 -05002555 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002556
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002557 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002558
2559 A final example shows how you can extend the search path and include
2560 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002561 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002562
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002563 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002564
2565 The previous statement appears in the
2566 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002567 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002568 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2569 override is a special :term:`PACKAGE_ARCH`
2570 definition for multiple ``meta-intel`` machines.
2571
2572 .. note::
2573
2574 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002575 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002576
2577 By prepending paths in ``.bbappend`` files, you allow multiple append
2578 files that reside in different layers but are used for the same
2579 recipe to correctly extend the path.
2580
Andrew Geisslerf0343792020-11-18 10:42:21 -06002581 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002582 A subset of :term:`OVERRIDES` used by the
2583 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002584 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002585 uses overrides to automatically extend the
2586 :term:`FILESPATH` variable. For an example of how
2587 that works, see the :term:`FILESPATH` variable
2588 description. Additionally, you find more information on how overrides
2589 are handled in the
2590 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2591 section of the BitBake User Manual.
2592
Andrew Geissler09036742021-06-25 14:25:14 -05002593 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002594
2595 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2596
2597 .. note::
2598
Andrew Geissler09036742021-06-25 14:25:14 -05002599 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002600 with expected overrides and are used in an expected manner by the
2601 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002602
Andrew Geisslerf0343792020-11-18 10:42:21 -06002603 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002604 The default set of directories the OpenEmbedded build system uses
2605 when searching for patches and files.
2606
2607 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002608 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002609 patches specified by each ``file://`` URI in a recipe's
2610 :term:`SRC_URI` statements.
2611
Andrew Geissler09036742021-06-25 14:25:14 -05002612 The default value for the :term:`FILESPATH` variable is defined in the
Patrick Williams975a06f2022-10-21 14:42:47 -05002613 :ref:`ref-classes-base` class found in ``meta/classes-global`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002614 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002615
2616 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2617 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2618
2619 The
Andrew Geissler09036742021-06-25 14:25:14 -05002620 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002621 from the :term:`FILESOVERRIDES` variable.
2622
2623 .. note::
2624
Andrew Geissler09036742021-06-25 14:25:14 -05002625 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002626 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002627 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002628 :term:`FILESEXTRAPATHS` variable.
2629
Andrew Geissler09036742021-06-25 14:25:14 -05002630 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002631 to directories in custom layers where append files
2632 (``.bbappend``) are used. If you want the build system to find
2633 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002634 to extend the :term:`FILESPATH` variable by using the
2635 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002636
2637 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002638 example, consider a case where there is the following directory structure
2639 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002640
2641 files/defconfig
2642 files/MACHINEA/defconfig
2643 files/MACHINEB/defconfig
2644
Andrew Geissler09036742021-06-25 14:25:14 -05002645 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002646 "file://defconfig". Given this scenario, you can set
2647 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002648 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002649 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2650 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2651 build system uses files from ``files/defconfig``.
2652
2653 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002654 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002655 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002656 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002657 the Yocto Project Development Tasks Manual. See the
2658 :ref:`ref-tasks-patch` task as well.
2659
Andrew Geisslerf0343792020-11-18 10:42:21 -06002660 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002661 Allows you to define your own file permissions settings table as part
2662 of your configuration for the packaging process. For example, suppose
2663 you need a consistent set of custom permissions for a set of groups
2664 and users across an entire work project. It is best to do this in the
2665 packages themselves but this is not always possible.
2666
2667 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2668 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2669 If you create your own file
2670 permissions setting table, you should place it in your layer or the
2671 distro's layer.
2672
Andrew Geissler09036742021-06-25 14:25:14 -05002673 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002674 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2675 to point to your custom
2676 ``fs-perms.txt``. You can specify more than a single file permissions
2677 setting table. The paths you specify to these files must be defined
2678 within the :term:`BBPATH` variable.
2679
2680 For guidance on how to create your own file permissions settings
2681 table file, examine the existing ``fs-perms.txt``.
2682
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002683 :term:`FIT_DESC`
2684 Specifies the description string encoded into a fitImage. The default
2685 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2686 class as follows::
2687
2688 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2689
Andrew Geisslerf0343792020-11-18 10:42:21 -06002690 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002691 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002692 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002693 The default value is 0.
2694
Andrew Geisslerf0343792020-11-18 10:42:21 -06002695 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002696 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2697
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002698 :term:`FIT_KERNEL_COMP_ALG`
2699 Compression algorithm to use for the kernel image inside the FIT Image.
2700 At present, the only supported values are "gzip" (default) or "none"
2701 If you set this variable to anything other than "none" you may also need
2702 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2703
2704 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2705 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2706 value is ".gz".
2707
Andrew Geisslerf0343792020-11-18 10:42:21 -06002708 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002709 Arguments to openssl genrsa for generating RSA private key for signing
2710 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2711 use.
2712
Andrew Geisslerf0343792020-11-18 10:42:21 -06002713 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002714 Arguments to openssl req for generating certificate for signing fitImage.
2715 The default value is "-batch -new". batch for non interactive mode
2716 and new for generating new keys.
2717
Andrew Geisslerf0343792020-11-18 10:42:21 -06002718 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002719 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002720 The default value is "x509".
2721
Andrew Geisslerf0343792020-11-18 10:42:21 -06002722 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002723 Specifies the signature algorithm used in creating the FIT Image.
2724 For e.g. rsa2048.
2725
Patrick Williams975a06f2022-10-21 14:42:47 -05002726 :term:`FIT_PAD_ALG`
2727 Specifies the padding algorithm used in creating the FIT Image.
2728 The default value is "pkcs-1.5".
2729
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002730 :term:`FIT_SIGN_INDIVIDUAL`
2731 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2732 class will sign the kernel, dtb and ramdisk images individually in addition
2733 to signing the fitImage itself. This could be useful if you are
2734 intending to verify signatures in another context than booting via
2735 U-Boot.
2736
Andrew Geissler9aee5002022-03-30 16:27:02 +00002737 :term:`FIT_SIGN_NUMBITS`
2738 Size of private key in number of bits used in fitImage. The default
2739 value is "2048".
2740
Andrew Geisslerf0343792020-11-18 10:42:21 -06002741 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002742 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2743 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04002744 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002745
Andrew Geisslerf0343792020-11-18 10:42:21 -06002746 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002747 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2748 this variable identifies packages containing font files that need to
Andrew Geissler595f6302022-01-24 19:11:47 +00002749 be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002750 that fonts are in the recipe's main package (i.e.
2751 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2752 need are in a package other than that main package.
2753
Andrew Geisslerf0343792020-11-18 10:42:21 -06002754 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002755 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2756 during the generation of the root filesystem.
2757
2758 Set the variable to "1" to force the removal of these packages.
2759
Andrew Geisslerf0343792020-11-18 10:42:21 -06002760 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002761 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002762 compiling an optimized system. This variable defaults to "-O2 -pipe
2763 ${DEBUG_FLAGS}".
2764
Andrew Geisslerf0343792020-11-18 10:42:21 -06002765 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002766 Enables Position Independent Executables (PIE) within the GNU C
2767 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2768 Programming (ROP) attacks much more difficult to execute.
2769
2770 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002771 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002772
2773 GCCPIE ?= "--enable-default-pie"
2774
Andrew Geisslerf0343792020-11-18 10:42:21 -06002775 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002776 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05002777 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002778 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002779
2780 GCCVERSION ?= "8.%"
2781
2782 You can override this value by setting it in a
2783 configuration file such as the ``local.conf``.
2784
Andrew Geisslerf0343792020-11-18 10:42:21 -06002785 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002786 The minimal command and arguments to run the GNU Debugger.
2787
Andrew Geissler595f6302022-01-24 19:11:47 +00002788 :term:`GIR_EXTRA_LIBS_PATH`
2789 Allows to specify an extra search path for ``.so`` files
2790 in GLib related recipes using GObject introspection,
2791 and which do not compile without this setting.
2792 See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`"
2793 section for details.
2794
Andrew Geisslerf0343792020-11-18 10:42:21 -06002795 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002796 The directory in which a local copy of a Git repository is stored
2797 when it is cloned.
2798
Patrick Williams975a06f2022-10-21 14:42:47 -05002799 :term:`GITHUB_BASE_URI`
2800 When inheriting the :ref:`github-releases <ref-classes-github-releases>`
2801 class, specifies the base URL for fetching releases for the github
2802 project you wish to fetch sources from. The default value is as follows::
2803
2804 GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/"
2805
Andrew Geisslerf0343792020-11-18 10:42:21 -06002806 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002807 Specifies the list of GLIBC locales to generate should you not wish
2808 to generate all LIBC locals, which can be time consuming.
2809
2810 .. note::
2811
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002812 If you specifically remove the locale ``en_US.UTF-8``, you must set
2813 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002814
Andrew Geissler09036742021-06-25 14:25:14 -05002815 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002816 By default, all locales are generated.
2817 ::
2818
2819 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2820
Andrew Geisslerf0343792020-11-18 10:42:21 -06002821 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002822 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2823 this variable specifies for a package what parameters should be
2824 passed to the ``groupadd`` command if you wish to add a group to the
2825 system when the package is installed.
2826
Andrew Geisslerc926e172021-05-07 16:11:35 -05002827 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002828
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002829 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002830
2831 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002832 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002833
Andrew Geisslerf0343792020-11-18 10:42:21 -06002834 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002835 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2836 this variable specifies for a package what parameters should be
2837 passed to the ``groupmems`` command if you wish to modify the members
2838 of a group when the package is installed.
2839
2840 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002841 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002842
Andrew Geisslerf0343792020-11-18 10:42:21 -06002843 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002844 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2845 and serial in the boot menu. Set this variable to "1" in your
2846 ``local.conf`` or distribution configuration file to enable graphics
2847 and serial in the menu.
2848
2849 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2850 information on how this variable is used.
2851
Andrew Geisslerf0343792020-11-18 10:42:21 -06002852 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002853 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2854 configuration. Use a semi-colon character (``;``) to separate
2855 multiple options.
2856
Andrew Geissler09036742021-06-25 14:25:14 -05002857 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002858 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2859 on how this variable is used.
2860
Andrew Geisslerf0343792020-11-18 10:42:21 -06002861 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002862 Specifies the timeout before executing the default ``LABEL`` in the
2863 GNU GRand Unified Bootloader (GRUB).
2864
Andrew Geissler09036742021-06-25 14:25:14 -05002865 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002866 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2867 on how this variable is used.
2868
Andrew Geisslerf0343792020-11-18 10:42:21 -06002869 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002870 When inheriting the
2871 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2872 this variable specifies the packages that contain the GTK+ input
2873 method modules being installed when the modules are in packages other
2874 than the main package.
2875
Andrew Geisslerf0343792020-11-18 10:42:21 -06002876 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002877 Website where more information about the software the recipe is
2878 building can be found.
2879
Andrew Geisslerf0343792020-11-18 10:42:21 -06002880 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002881 The name of the target architecture, which is normally the same as
2882 :term:`TARGET_ARCH`. The OpenEmbedded build system
2883 supports many architectures. Here is an example list of architectures
2884 supported. This list is by no means complete as the architecture is
2885 configurable:
2886
2887 - arm
2888 - i586
2889 - x86_64
2890 - powerpc
2891 - powerpc64
2892 - mips
2893 - mipsel
2894
Andrew Geisslerf0343792020-11-18 10:42:21 -06002895 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002896 Specifies architecture-specific compiler flags that are passed to the
2897 C compiler.
2898
Andrew Geissler09036742021-06-25 14:25:14 -05002899 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002900 is being built:
2901
2902 - :term:`TARGET_CC_ARCH` when building for the
2903 target
2904
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002905 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002906 ``-native``)
2907
2908 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2909 ``nativesdk-``)
2910
Andrew Geisslerf0343792020-11-18 10:42:21 -06002911 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002912 Specifies the name of the target operating system, which is normally
2913 the same as the :term:`TARGET_OS`. The variable can
2914 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2915 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2916 "linux-musleabi" values possible.
2917
Andrew Geisslerf0343792020-11-18 10:42:21 -06002918 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05002919 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002920 is normally the same as :term:`TARGET_PREFIX`.
2921
Andrew Geisslerf0343792020-11-18 10:42:21 -06002922 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002923 Specifies the system, including the architecture and the operating
2924 system, for which the build is occurring in the context of the
2925 current recipe.
2926
2927 The OpenEmbedded build system automatically sets this variable based
2928 on :term:`HOST_ARCH`,
2929 :term:`HOST_VENDOR`, and
2930 :term:`HOST_OS` variables.
2931
2932 .. note::
2933
2934 You do not need to set the variable yourself.
2935
2936 Consider these two examples:
2937
2938 - Given a native recipe on a 32-bit x86 machine running Linux, the
2939 value is "i686-linux".
2940
2941 - Given a recipe being built for a little-endian MIPS target running
2942 Linux, the value might be "mipsel-linux".
2943
Andrew Geissler9aee5002022-03-30 16:27:02 +00002944 :term:`HOST_VENDOR`
2945 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
2946 same as :term:`TARGET_VENDOR`.
2947
Andrew Geisslerf0343792020-11-18 10:42:21 -06002948 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002949 A space-separated list (filter) of tools on the build host that
2950 should be allowed to be called from within build tasks. Using this
2951 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05002952 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002953 host, the OpenEmbedded build system produces an error and the build
2954 is not started.
2955
2956 For additional information, see
2957 :term:`HOSTTOOLS_NONFATAL`.
2958
Andrew Geisslerf0343792020-11-18 10:42:21 -06002959 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002960 A space-separated list (filter) of tools on the build host that
2961 should be allowed to be called from within build tasks. Using this
2962 filter helps reduce the possibility of host contamination. Unlike
2963 :term:`HOSTTOOLS`, the OpenEmbedded build system
2964 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05002965 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2966 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002967
Andrew Geissler9aee5002022-03-30 16:27:02 +00002968 :term:`ICECC_CLASS_DISABLE`
2969 Identifies user classes that you do not want the Icecream distributed
2970 compile support to consider. This variable is used by the
2971 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2972 your ``local.conf`` file.
2973
2974 When you list classes using this variable, the recipes inheriting
2975 those classes will not benefit from distributed compilation across
2976 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002977
Andrew Geisslerf0343792020-11-18 10:42:21 -06002978 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002979 Disables or enables the ``icecc`` (Icecream) function. For more
2980 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00002981 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002982 section.
2983
2984 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002985 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002986
2987 ICECC_DISABLED ??= "1"
2988
Andrew Geisslerc926e172021-05-07 16:11:35 -05002989 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002990
2991 ICECC_DISABLED = ""
2992
Andrew Geisslerf0343792020-11-18 10:42:21 -06002993 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002994 Points to the ``icecc-create-env`` script that you provide. This
2995 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2996 set this variable in your ``local.conf`` file.
2997
2998 If you do not point to a script that you provide, the OpenEmbedded
2999 build system uses the default script provided by the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003000 :oe_git:`icecc-create-env_0.1.bb
3001 </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>`
3002 recipe, which is a modified version and not the one that comes with
3003 ``icecream``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003004
Andrew Geisslerf0343792020-11-18 10:42:21 -06003005 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003006 Extra options passed to the ``make`` command during the
3007 :ref:`ref-tasks-compile` task that specify parallel
3008 compilation. This variable usually takes the form of "-j x", where x
3009 represents the maximum number of parallel threads ``make`` can run.
3010
3011 .. note::
3012
3013 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003014 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003015
3016 If your enabled machines support multiple cores, coming up with the
3017 maximum number of parallel threads that gives you the best
3018 performance could take some experimentation since machine speed,
3019 network lag, available memory, and existing machine loads can all
3020 affect build time. Consequently, unlike the
3021 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05003022 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003023 performance.
3024
Andrew Geissler09036742021-06-25 14:25:14 -05003025 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003026 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05003027 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003028
Andrew Geisslerf0343792020-11-18 10:42:21 -06003029 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003030 The location of the ``icecc`` binary. You can set this variable in
3031 your ``local.conf`` file. If your ``local.conf`` file does not define
3032 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
3033 to define it by locating ``icecc`` using ``which``.
3034
Andrew Geissler9aee5002022-03-30 16:27:02 +00003035 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003036 Identifies user recipes that you do not want the Icecream distributed
3037 compile support to consider. This variable is used by the
3038 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
3039 your ``local.conf`` file.
3040
Andrew Geissler595f6302022-01-24 19:11:47 +00003041 When you list recipes using this variable, you are excluding them
3042 from distributed compilation across remote hosts. Instead they will
3043 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003044
Andrew Geissler9aee5002022-03-30 16:27:02 +00003045 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003046 Identifies user recipes that use an empty
3047 :term:`PARALLEL_MAKE` variable that you want to
3048 force remote distributed compilation on using the Icecream
3049 distributed compile support. This variable is used by the
3050 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
3051 your ``local.conf`` file.
3052
Andrew Geisslerf0343792020-11-18 10:42:21 -06003053 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003054 The base name of image output files. This variable defaults to the
3055 recipe name (``${``\ :term:`PN`\ ``}``).
3056
Andrew Geisslerf0343792020-11-18 10:42:21 -06003057 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003058 A space-separated list of files installed into the boot partition
3059 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003060 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003061 the files are
3062 installed under the same name as the source files. To change the
3063 installed name, separate it from the original name with a semi-colon
3064 (;). Source files need to be located in
3065 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003066 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003067
3068 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3069 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3070
3071 Alternatively, source files can be picked up using a glob pattern. In
3072 this case, the destination file must have the same name as the base
3073 name of the source file path. To install files into a directory
3074 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05003075 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003076
3077 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
3078 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
3079
3080 The first example
3081 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3082 into the root of the target partition. The second example installs
3083 the same files into a ``boot`` directory within the target partition.
3084
3085 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003086 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003087 section of the Yocto Project Development Tasks Manual. Reference
3088 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003089 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003090
Patrick Williams975a06f2022-10-21 14:42:47 -05003091 :term:`IMAGE_BUILDINFO_FILE`
3092 When using the :ref:`image-buildinfo <ref-classes-image-buildinfo>` class,
3093 specifies the file in the image to write the build information into. The
3094 default value is "``${sysconfdir}/buildinfo``".
3095
3096 :term:`IMAGE_BUILDINFO_VARS`
3097 When using the :ref:`image-buildinfo <ref-classes-image-buildinfo>` class,
3098 specifies the list of variables to include in the `Build Configuration`
3099 section of the output file (as a space-separated list). Defaults to
3100 ":term:`DISTRO` :term:`DISTRO_VERSION`".
3101
Andrew Geisslerf0343792020-11-18 10:42:21 -06003102 :term:`IMAGE_CLASSES`
Patrick Williams975a06f2022-10-21 14:42:47 -05003103 A list of classes that all images should inherit. This is typically used
3104 to enable functionality across all image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003105
Patrick Williams975a06f2022-10-21 14:42:47 -05003106 Classes specified in :term:`IMAGE_CLASSES` must be located in the
3107 ``classes-recipe/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003108
Andrew Geisslerf0343792020-11-18 10:42:21 -06003109 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003110 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003111 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003112 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3113 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003114 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003115
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003116 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003117 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003118 ${EXTRA_IMAGECMD}"
3119
3120 You typically do not need to set this variable unless you are adding
3121 support for a new image type. For more examples on how to set this
3122 variable, see the :ref:`image_types <ref-classes-image_types>`
Patrick Williams975a06f2022-10-21 14:42:47 -05003123 class file, which is ``meta/classes-recipe/image_types.bbclass``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003124
Andrew Geisslerf0343792020-11-18 10:42:21 -06003125 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003126 Specifies one or more files that contain custom device tables that
3127 are passed to the ``makedevs`` command as part of creating an image.
3128 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003129 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003130 ``files/device_table-minimal.txt`` is used, which is located by
3131 :term:`BBPATH`. For details on how you should write
3132 device table files, see ``meta/files/device_table-minimal.txt`` as an
3133 example.
3134
Andrew Geissler9aee5002022-03-30 16:27:02 +00003135 :term:`IMAGE_EFI_BOOT_FILES`
3136 A space-separated list of files installed into the boot partition
3137 when preparing an image using the Wic tool with the
3138 ``bootimg-efi`` source plugin. By default,
3139 the files are
3140 installed under the same name as the source files. To change the
3141 installed name, separate it from the original name with a semi-colon
3142 (;). Source files need to be located in
3143 :term:`DEPLOY_DIR_IMAGE`. Here are two
3144 examples::
3145
3146 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3147 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3148
3149 Alternatively, source files can be picked up using a glob pattern. In
3150 this case, the destination file must have the same name as the base
3151 name of the source file path. To install files into a directory
3152 within the target location, pass its name after a semi-colon (;).
3153 Here are two examples::
3154
3155 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3156 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3157
3158 The first example
3159 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3160 into the root of the target partition. The second example installs
3161 the same files into a ``boot`` directory within the target partition.
3162
3163 You can find information on how to use the Wic tool in the
3164 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
3165 section of the Yocto Project Development Tasks Manual. Reference
3166 material for Wic is located in the
3167 ":doc:`/ref-manual/kickstart`" chapter.
3168
Andrew Geisslerf0343792020-11-18 10:42:21 -06003169 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003170 The primary list of features to include in an image. Typically, you
3171 configure this variable in an image recipe. Although you can use this
3172 variable from your ``local.conf`` file, which is found in the
3173 :term:`Build Directory`, best practices dictate that you do
3174 not.
3175
3176 .. note::
3177
3178 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003179 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003180
3181 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003182 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003183
3184 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06003185 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 -05003186 section in the Yocto Project Development Tasks Manual.
3187
Andrew Geisslerf0343792020-11-18 10:42:21 -06003188 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003189 Specifies the formats the OpenEmbedded build system uses during the
3190 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003191 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003192 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003193
3194 IMAGE_FSTYPES = "ext3 tar.bz2"
3195
3196 For the complete list of supported image formats from which you can
3197 choose, see :term:`IMAGE_TYPES`.
3198
3199 .. note::
3200
3201 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003202 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003203 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003204
3205 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003206 variable, you cannot update its contents by using ``:append``
3207 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003208 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003209
Andrew Geisslerf0343792020-11-18 10:42:21 -06003210 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003211 Used by recipes to specify the packages to install into an image
3212 through the :ref:`image <ref-classes-image>` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003213 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003214
Andrew Geissler09036742021-06-25 14:25:14 -05003215 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003216 install into an image through :ref:`ref-classes-image`. Additionally,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003217 there are "helper" classes such as the
3218 :ref:`core-image <ref-classes-core-image>` class which can
Andrew Geissler09036742021-06-25 14:25:14 -05003219 take lists used with :term:`IMAGE_FEATURES` and turn them into
3220 auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003221 default contents.
3222
Andrew Geisslerc926e172021-05-07 16:11:35 -05003223 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003224
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003225 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003226
3227 Be sure to include the space
3228 between the quotation character and the start of the package name or
3229 names.
3230
3231 .. note::
3232
3233 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003234 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003235 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003236 packages for installation. Instead, use the
3237 :term:`PACKAGE_INSTALL` variable, which
Patrick Williams2194f502022-10-16 14:26:09 -05003238 allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003239 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Patrick Williams2194f502022-10-16 14:26:09 -05003240 For information on creating an :term:`Initramfs`, see the
3241 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003242 section in the Yocto Project Development Tasks Manual.
3243
Andrew Geissler09036742021-06-25 14:25:14 -05003244 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003245 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003246 BitBake operator within the ``/conf/local.conf`` file or from
3247 within an image recipe is not recommended. Use of this operator
3248 in these ways can cause ordering issues. Since
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003249 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003250 value using the
3251 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003252 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003253 results in unexpected behavior when used within
3254 ``conf/local.conf``. Furthermore, the same operation from
3255 within an image recipe may or may not succeed depending on the
3256 specific situation. In both these cases, the behavior is
3257 contrary to how most users expect the ``+=`` operator to work.
3258
Andrew Geisslerf0343792020-11-18 10:42:21 -06003259 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003260 Specifies the list of locales to install into the image during the
3261 root filesystem construction process. The OpenEmbedded build system
3262 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003263 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003264 ensures that any locale packages that correspond to packages already
3265 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003266 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003267
3268 IMAGE_LINGUAS = "pt-br de-de"
3269
3270 In this example, the build system ensures any Brazilian Portuguese
3271 and German locale files that correspond to packages in the image are
3272 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3273 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3274 only provide locale files by language and not by country-specific
3275 language).
3276
3277 See the :term:`GLIBC_GENERATE_LOCALES`
3278 variable for information on generating GLIBC locales.
3279
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003280
3281 :term:`IMAGE_LINK_NAME`
3282 The name of the output image symlink (which does not include
3283 the version part as :term:`IMAGE_NAME` does). The default value
3284 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003285 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003286
3287 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3288
3289
Andrew Geisslerf0343792020-11-18 10:42:21 -06003290 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003291 The manifest file for the image. This file lists all the installed
3292 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003293 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003294
3295 packagename packagearch version
3296
Andrew Geissler09036742021-06-25 14:25:14 -05003297 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003298 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003299
Andrew Geissler09036742021-06-25 14:25:14 -05003300 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003301
3302 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003303 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003304 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003305 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003306 section in the Yocto Project Overview and Concepts Manual.
3307
Andrew Geisslerf0343792020-11-18 10:42:21 -06003308 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003309 The name of the output image files minus the extension. This variable
3310 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003311 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003312 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003313
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003314 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3315
3316 :term:`IMAGE_NAME_SUFFIX`
Andrew Geissler615f2f12022-07-15 14:00:58 -05003317 Suffix used for the image output filename --- defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003318 to distinguish the image file from other files created during image
3319 building; however if this suffix is redundant or not desired you can
3320 clear the value of this variable (set the value to ""). For example,
Patrick Williams2194f502022-10-16 14:26:09 -05003321 this is typically cleared in :term:`Initramfs` image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003322
Andrew Geisslerf0343792020-11-18 10:42:21 -06003323 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003324 Defines a multiplier that the build system applies to the initial
3325 image size for cases when the multiplier times the returned disk
3326 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003327 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003328 the multiplier applied to the initial image size creates free disk
3329 space in the image as overhead. By default, the build process uses a
3330 multiplier of 1.3 for this variable. This default value results in
3331 30% free disk space added to the image when this method is used to
3332 determine the final generated image size. You should be aware that
3333 post install scripts and the package management system uses disk
3334 space inside this overhead area. Consequently, the multiplier does
3335 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003336 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003337 determines the overall image size.
3338
3339 The default 30% free disk space typically gives the image enough room
3340 to boot and allows for basic post installs while still leaving a
3341 small amount of free disk space. If 30% free space is inadequate, you
3342 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003343 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003344
3345 IMAGE_OVERHEAD_FACTOR = "1.5"
3346
3347 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003348 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003349 variable.
3350
Andrew Geisslerf0343792020-11-18 10:42:21 -06003351 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003352 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3353 OpenEmbedded build system. The variable is defined appropriately by
3354 the :ref:`package_deb <ref-classes-package_deb>`,
3355 :ref:`package_rpm <ref-classes-package_rpm>`,
3356 :ref:`package_ipk <ref-classes-package_ipk>`, or
3357 :ref:`package_tar <ref-classes-package_tar>` class.
3358
3359 .. note::
3360
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003361 The ``package_tar`` class is broken and is not supported. It is
3362 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003363
3364 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
Andrew Geissler09036742021-06-25 14:25:14 -05003365 :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003366 for packaging up images and SDKs.
3367
Andrew Geissler09036742021-06-25 14:25:14 -05003368 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003369 variable is set indirectly through the appropriate
3370 :ref:`package_* <ref-classes-package>` class using the
3371 :term:`PACKAGE_CLASSES` variable. The
3372 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3373 or IPK) that appears with the variable
3374
3375 .. note::
3376
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003377 Files using the ``.tar`` format are never used as a substitute
3378 packaging format for DEB, RPM, and IPK formatted files for your image
3379 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003380
Andrew Geisslerf0343792020-11-18 10:42:21 -06003381 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003382 Specifies a list of functions to call once the OpenEmbedded build
3383 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003384 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003385
3386 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3387
3388 If you need to pass the root filesystem path to a command within the
3389 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3390 directory that becomes the root filesystem image. See the
3391 :term:`IMAGE_ROOTFS` variable for more
3392 information.
3393
Andrew Geisslerf0343792020-11-18 10:42:21 -06003394 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003395 Specifies a list of functions to call before the OpenEmbedded build
3396 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003397 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003398
3399 IMAGE_PREPROCESS_COMMAND += "function; ... "
3400
3401 If you need to pass the root filesystem path to a command within the
3402 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3403 directory that becomes the root filesystem image. See the
3404 :term:`IMAGE_ROOTFS` variable for more
3405 information.
3406
Andrew Geisslerf0343792020-11-18 10:42:21 -06003407 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003408 The location of the root filesystem while it is under construction
3409 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3410 variable is not configurable. Do not change it.
3411
Andrew Geisslerf0343792020-11-18 10:42:21 -06003412 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003413 Specifies the alignment for the output image file in Kbytes. If the
3414 size of the image is not a multiple of this value, then the size is
3415 rounded up to the nearest multiple of the value. The default value is
3416 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3417 additional information.
3418
Andrew Geisslerf0343792020-11-18 10:42:21 -06003419 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003420 Defines additional free disk space created in the image in Kbytes. By
3421 default, this variable is set to "0". This free disk space is added
3422 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003423 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003424
3425 This variable is particularly useful when you want to ensure that a
3426 specific amount of free disk space is available on a device after an
3427 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003428 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003429
3430 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3431
3432 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003433 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003434
3435 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3436
Andrew Geisslerf0343792020-11-18 10:42:21 -06003437 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003438 Defines the size in Kbytes for the generated image. The OpenEmbedded
3439 build system determines the final size for the generated image using
3440 an algorithm that takes into account the initial disk space used for
3441 the generated image, a requested size for the image, and requested
3442 additional free disk space to be added to the image. Programatically,
3443 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003444 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003445
3446 if (image-du * overhead) < rootfs-size:
3447 internal-rootfs-size = rootfs-size + xspace
3448 else:
3449 internal-rootfs-size = (image-du * overhead) + xspace
3450 where:
3451 image-du = Returned value of the du command on the image.
3452 overhead = IMAGE_OVERHEAD_FACTOR
3453 rootfs-size = IMAGE_ROOTFS_SIZE
3454 internal-rootfs-size = Initial root filesystem size before any modifications.
3455 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3456
3457 See the :term:`IMAGE_OVERHEAD_FACTOR`
3458 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3459 variables for related information.
3460
Andrew Geisslerf0343792020-11-18 10:42:21 -06003461 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003462 Specifies a dependency from one image type on another. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05003463 example from the :ref:`image-live <ref-classes-image-live>` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003464
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003465 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003466
3467 In the previous example, the variable ensures that when "live" is
3468 listed with the :term:`IMAGE_FSTYPES` variable,
3469 the OpenEmbedded build system produces an ``ext3`` image first since
3470 one of the components of the live image is an ``ext3`` formatted
3471 partition containing the root filesystem.
3472
Andrew Geisslerf0343792020-11-18 10:42:21 -06003473 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003474 Specifies the complete list of supported image types by default:
3475
3476 - btrfs
3477 - container
3478 - cpio
3479 - cpio.gz
3480 - cpio.lz4
3481 - cpio.lzma
3482 - cpio.xz
3483 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003484 - erofs
3485 - erofs-lz4
3486 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003487 - ext2
3488 - ext2.bz2
3489 - ext2.gz
3490 - ext2.lzma
3491 - ext3
3492 - ext3.gz
3493 - ext4
3494 - ext4.gz
3495 - f2fs
3496 - hddimg
3497 - iso
3498 - jffs2
3499 - jffs2.sum
3500 - multiubi
3501 - squashfs
3502 - squashfs-lz4
3503 - squashfs-lzo
3504 - squashfs-xz
3505 - tar
3506 - tar.bz2
3507 - tar.gz
3508 - tar.lz4
3509 - tar.xz
3510 - tar.zst
3511 - ubi
3512 - ubifs
3513 - wic
3514 - wic.bz2
3515 - wic.gz
3516 - wic.lzma
3517
3518 For more information about these types of images, see
Patrick Williams975a06f2022-10-21 14:42:47 -05003519 ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003520
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003521 :term:`IMAGE_VERSION_SUFFIX`
3522 Version suffix that is part of the default :term:`IMAGE_NAME` and
3523 :term:`KERNEL_ARTIFACT_NAME` values.
3524 Defaults to ``"-${DATETIME}"``, however you could set this to a
3525 version string that comes from your external build environment if
3526 desired, and this suffix would then be used consistently across
3527 the build artifacts.
3528
Andrew Geissler09036742021-06-25 14:25:14 -05003529 :term:`IMGDEPLOYDIR`
3530 When inheriting the :ref:`image <ref-classes-image>` class directly or
3531 through the :ref:`core-image <ref-classes-core-image>` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003532 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003533 that is set in the ``image`` class as follows::
3534
3535 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3536
3537 Recipes inheriting the ``image`` class should copy files to be
Andrew Geissler5f350902021-07-23 13:09:54 -04003538 deployed into :term:`IMGDEPLOYDIR`, and the class will take care of
Andrew Geissler09036742021-06-25 14:25:14 -05003539 copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3540
Andrew Geisslerf0343792020-11-18 10:42:21 -06003541 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003542 Helps define the recipe revision for recipes that share a common
3543 ``include`` file. You can think of this variable as part of the
3544 recipe revision as set from within an include file.
3545
3546 Suppose, for example, you have a set of recipes that are used across
3547 several projects. And, within each of those recipes the revision (its
3548 :term:`PR` value) is set accordingly. In this case, when
3549 the revision of those recipes changes, the burden is on you to find
3550 all those recipes and be sure that they get changed to reflect the
3551 updated version of the recipe. In this scenario, it can get
3552 complicated when recipes that are used in many places and provide
3553 common functionality are upgraded to a new revision.
3554
3555 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003556 :term:`INC_PR` variable inside the ``include`` files that the recipes
3557 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003558 help define the recipe revision.
3559
3560 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003561 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003562 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003563 can use the variable to set the :term:`PR` values in each recipe. You
3564 will notice that when you set a recipe's :term:`PR` you can provide more
3565 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003566
3567 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3568 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3569 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3570 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3571
3572 The
3573 first line of the example establishes the baseline revision to be
3574 used for all recipes that use the ``include`` file. The remaining
3575 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003576 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003577
Andrew Geisslerf0343792020-11-18 10:42:21 -06003578 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003579 Specifies a space-separated list of license names (as they would
3580 appear in :term:`LICENSE`) that should be excluded
3581 from the build. Recipes that provide no alternatives to listed
3582 incompatible licenses are not built. Packages that are individually
3583 licensed with the specified incompatible licenses will be deleted.
3584
Patrick Williams03907ee2022-05-01 06:28:52 -05003585 There is some support for wildcards in this variable's value,
3586 however it is restricted to specific licenses. Currently only
3587 these wildcards are allowed and expand as follows:
3588
3589 - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later``
3590 - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
3591 - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
3592
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003593 .. note::
3594
3595 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003596 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003597
Andrew Geissler9aee5002022-03-30 16:27:02 +00003598 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003599
3600
3601 Although you can use other settings, you might be required to
Patrick Williams975a06f2022-10-21 14:42:47 -05003602 remove dependencies on (or provide alternatives to) components that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003603 are required to produce a functional system image.
3604
Andrew Geissler615f2f12022-07-15 14:00:58 -05003605 :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
3606 Specifies a space-separated list of package and license pairs that
3607 are allowed to be used even if the license is specified in
3608 :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are
3609 separated using a colon. Example::
3610
3611 INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only"
3612
Andrew Geisslerf0343792020-11-18 10:42:21 -06003613 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003614 Causes the named class or classes to be inherited globally. Anonymous
3615 functions in the class or classes are not executed for the base
3616 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003617 system ignores changes to :term:`INHERIT` in individual recipes.
Patrick Williams975a06f2022-10-21 14:42:47 -05003618 Classes inherited using :term:`INHERIT` must be located in the
3619 ``classes-global/`` or ``classes/`` subdirectories.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003620
Andrew Geissler09036742021-06-25 14:25:14 -05003621 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003622 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
Andrew Geisslerd5838332022-05-27 11:33:10 -05003623 section in the BitBake User Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003624
Andrew Geisslerf0343792020-11-18 10:42:21 -06003625 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003626 Lists classes that will be inherited at the distribution level. It is
3627 unlikely that you want to edit this variable.
3628
Patrick Williams975a06f2022-10-21 14:42:47 -05003629 Classes specified in :term:`INHERIT_DISTRO` must be located in the
3630 ``classes-global/`` or ``classes/`` subdirectories.
3631
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003632 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003633 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003634
3635 INHERIT_DISTRO ?= "debian devshell sstate license"
3636
Andrew Geisslerf0343792020-11-18 10:42:21 -06003637 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003638 Prevents the default dependencies, namely the C compiler and standard
3639 C library (libc), from being added to :term:`DEPENDS`.
3640 This variable is usually used within recipes that do not require any
3641 compilation using the C compiler.
3642
3643 Set the variable to "1" to prevent the default dependencies from
3644 being added.
3645
Andrew Geisslerf0343792020-11-18 10:42:21 -06003646 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003647 Prevents the OpenEmbedded build system from splitting out debug
3648 information during packaging. By default, the build system splits out
3649 debugging information during the
3650 :ref:`ref-tasks-package` task. For more information on
3651 how debug information is split out, see the
3652 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3653 variable.
3654
3655 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003656 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003657 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003658
3659 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3660
Andrew Geisslerf0343792020-11-18 10:42:21 -06003661 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003662 If set to "1", causes the build to not strip binaries in resulting
3663 packages and prevents the ``-dbg`` package from containing the source
3664 files.
3665
3666 By default, the OpenEmbedded build system strips binaries and puts
3667 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003668 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003669 plan to debug in general.
3670
Andrew Geisslerf0343792020-11-18 10:42:21 -06003671 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003672 If set to "1", causes the build to not strip binaries in the
3673 resulting sysroot.
3674
3675 By default, the OpenEmbedded build system strips binaries in the
3676 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003677 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003678 this stripping.
3679
3680 If you want to use this variable, include the
3681 :ref:`staging <ref-classes-staging>` class. This class uses a
3682 ``sys_strip()`` function to test for the variable and acts
3683 accordingly.
3684
3685 .. note::
3686
Andrew Geissler09036742021-06-25 14:25:14 -05003687 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003688 special circumstances. For example, suppose you are building
3689 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003690 even if the toolchain's binaries are strippable, there are other files
3691 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003692
Patrick Williams2194f502022-10-16 14:26:09 -05003693 :term:`Initramfs`
3694 An Initial RAM Filesystem (:term:`Initramfs`) is an optionally compressed
3695 `cpio <https://en.wikipedia.org/wiki/Cpio>`__ archive which is extracted
3696 by the Linux kernel into RAM in a special `tmpfs <https://en.wikipedia.org/wiki/Tmpfs>`__
3697 instance, used as the initial root filesystem.
3698
3699 This is a replacement for the legacy init RAM disk ("initrd")
3700 technique, booting on an emulated block device in RAM, but being less
3701 efficient because of the overhead of going through a filesystem and
3702 having to duplicate accessed file contents in the file cache in RAM,
3703 as for any block device.
3704
3705 .. note:
3706
3707 As far as bootloaders are concerned, :term:`Initramfs` and "initrd"
3708 images are still copied to RAM in the same way. That's why most
3709 most bootloaders refer to :term:`Initramfs` images as "initrd"
3710 or "init RAM disk".
3711
3712 This kind of mechanism is typically used for two reasons:
3713
3714 - For booting the same kernel binary on multiple systems requiring
3715 different device drivers. The Initramfs image is then customized
3716 for each type of system, to include the specific kernel modules
3717 necessary to access the final root filesystem. This technique
3718 is used on all GNU / Linux distributions for desktops and servers.
3719
3720 - For booting faster. As the root filesystem is extracted into RAM,
3721 accessing the first user-space applications is very fast, compared
3722 to having to initialize a block device, to access multiple blocks
3723 from it, and to go through a filesystem having its own overhead.
3724 For example, this allows to display a splashscreen very early,
3725 and to later take care of mounting the final root filesystem and
3726 loading less time-critical kernel drivers.
3727
3728 This cpio archive can either be loaded to RAM by the bootloader,
3729 or be included in the kernel binary.
3730
3731 For information on creating and using an :term:`Initramfs`, see the
3732 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`"
3733 section in the Yocto Project Development Tasks Manual.
3734
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003735 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
Patrick Williams2194f502022-10-16 14:26:09 -05003736 Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs` where the
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003737 :term:`INITRAMFS_IMAGE` will be fetched from.
3738 This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the
3739 :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed
Patrick Williams2194f502022-10-16 14:26:09 -05003740 when building an :term:`Initramfs` image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003741
Andrew Geisslerf0343792020-11-18 10:42:21 -06003742 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003743 Defines the format for the output image of an initial RAM filesystem
Patrick Williams2194f502022-10-16 14:26:09 -05003744 (:term:`Initramfs`), which is used during boot. Supported formats are the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003745 same as those supported by the
3746 :term:`IMAGE_FSTYPES` variable.
3747
3748 The default value of this variable, which is set in the
3749 ``meta/conf/bitbake.conf`` configuration file in the
3750 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
Patrick Williams2194f502022-10-16 14:26:09 -05003751 :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003752 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3753 an optionally compressed cpio archive.
3754
Andrew Geisslerf0343792020-11-18 10:42:21 -06003755 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003756 Specifies the :term:`PROVIDES` name of an image
Patrick Williams2194f502022-10-16 14:26:09 -05003757 recipe that is used to build an initial RAM filesystem (:term:`Initramfs`)
Andrew Geissler09036742021-06-25 14:25:14 -05003758 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003759 additional recipe to be built as a dependency to whatever root
3760 filesystem recipe you might be using (e.g. ``core-image-sato``). The
Patrick Williams2194f502022-10-16 14:26:09 -05003761 :term:`Initramfs` image recipe you provide should set
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003762 :term:`IMAGE_FSTYPES` to
3763 :term:`INITRAMFS_FSTYPES`.
3764
Patrick Williams2194f502022-10-16 14:26:09 -05003765 An :term:`Initramfs` image provides a temporary root filesystem used for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003766 early system initialization (e.g. loading of modules needed to locate
3767 and mount the "real" root filesystem).
3768
3769 .. note::
3770
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003771 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3772 recipe in the :term:`Source Directory`
Patrick Williams2194f502022-10-16 14:26:09 -05003773 for an example :term:`Initramfs` recipe. To select this sample recipe as
3774 the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003775 to "core-image-minimal-initramfs".
3776
3777 You can also find more information by referencing the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003778 ``meta-poky/conf/templates/default/local.conf.sample.extended``
3779 configuration file in the Source Directory, the :ref:`image
3780 <ref-classes-image>` class, and the :ref:`kernel <ref-classes-kernel>`
3781 class to see how to use the :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003782
Andrew Geissler09036742021-06-25 14:25:14 -05003783 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Patrick Williams2194f502022-10-16 14:26:09 -05003784 :term:`Initramfs` image is built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003785
3786 For more information, you can also see the
3787 :term:`INITRAMFS_IMAGE_BUNDLE`
3788 variable, which allows the generated image to be bundled inside the
Patrick Williams2194f502022-10-16 14:26:09 -05003789 kernel image. Additionally, for information on creating an :term:`Initramfs`
3790 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003791 in the Yocto Project Development Tasks Manual.
3792
Andrew Geisslerf0343792020-11-18 10:42:21 -06003793 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003794 Controls whether or not the image recipe specified by
3795 :term:`INITRAMFS_IMAGE` is run through an
3796 extra pass
3797 (:ref:`ref-tasks-bundle_initramfs`) during
3798 kernel compilation in order to build a single binary that contains
Patrick Williams2194f502022-10-16 14:26:09 -05003799 both the kernel image and the initial RAM filesystem (:term:`Initramfs`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003800 image. This makes use of the
3801 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3802 feature.
3803
3804 .. note::
3805
Patrick Williams2194f502022-10-16 14:26:09 -05003806 Bundling the :term:`Initramfs` with the kernel conflates the code in the
3807 :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
3808 compatible software may be part of a bundled :term:`Initramfs`.
Patrick Williams93c203f2021-10-06 16:15:23 -05003809
3810 .. note::
3811
Patrick Williams2194f502022-10-16 14:26:09 -05003812 Using an extra compilation pass to bundle the :term:`Initramfs` avoids a
3813 circular dependency between the kernel recipe and the :term:`Initramfs`
3814 recipe should the :term:`Initramfs` include kernel modules. Should that be
3815 the case, the :term:`Initramfs` recipe depends on the kernel for the
3816 kernel modules, and the kernel depends on the :term:`Initramfs` recipe
3817 since the :term:`Initramfs` is bundled inside the kernel image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003818
3819 The combined binary is deposited into the ``tmp/deploy`` directory,
3820 which is part of the :term:`Build Directory`.
3821
3822 Setting the variable to "1" in a configuration file causes the
3823 OpenEmbedded build system to generate a kernel image with the
Patrick Williams2194f502022-10-16 14:26:09 -05003824 :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003825
3826 INITRAMFS_IMAGE_BUNDLE = "1"
3827
3828 By default, the
3829 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05003830 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003831
3832 INITRAMFS_IMAGE_BUNDLE ?= ""
3833
3834 .. note::
3835
Andrew Geissler09036742021-06-25 14:25:14 -05003836 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003837 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003838
3839 See the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003840 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003841 file for additional information. Also, for information on creating an
Patrick Williams2194f502022-10-16 14:26:09 -05003842 :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003843 in the Yocto Project Development Tasks Manual.
3844
Andrew Geisslerf0343792020-11-18 10:42:21 -06003845 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003846 The link name of the initial RAM filesystem image. This variable is
Patrick Williams975a06f2022-10-21 14:42:47 -05003847 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003848 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003849
3850 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3851
3852 The value of the
3853 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003854 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003855
3856 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3857
3858 See the :term:`MACHINE` variable for additional
3859 information.
3860
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003861 :term:`INITRAMFS_MULTICONFIG`
3862 Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class.
3863
3864 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
3865 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
3866
Patrick Williams2194f502022-10-16 14:26:09 -05003867 For more information on how to bundle an :term:`Initramfs` image from a separate
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003868 multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`"
3869 section in the Yocto Project Development Tasks Manual.
3870
Andrew Geisslerf0343792020-11-18 10:42:21 -06003871 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003872 The base name of the initial RAM filesystem image. This variable is
Patrick Williams975a06f2022-10-21 14:42:47 -05003873 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003874 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003875
3876 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3877
3878 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003879 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003880
3881 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3882
Andrew Geisslerf0343792020-11-18 10:42:21 -06003883 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003884 Indicates list of filesystem images to concatenate and use as an
3885 initial RAM disk (``initrd``).
3886
Andrew Geissler09036742021-06-25 14:25:14 -05003887 The :term:`INITRD` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003888 :ref:`image-live <ref-classes-image-live>` class.
3889
Andrew Geisslerf0343792020-11-18 10:42:21 -06003890 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003891 When building a "live" bootable image (i.e. when
3892 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05003893 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003894 provide the initial RAM disk image. The default value is
3895 "core-image-minimal-initramfs".
3896
3897 See the :ref:`image-live <ref-classes-image-live>` class for more
3898 information.
3899
Andrew Geisslerf0343792020-11-18 10:42:21 -06003900 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003901 The filename of the initialization script as installed to
3902 ``${sysconfdir}/init.d``.
3903
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003904 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003905 The variable is mandatory.
3906
Andrew Geisslerf0343792020-11-18 10:42:21 -06003907 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003908 A list of the packages that contain initscripts. If multiple packages
3909 are specified, you need to append the package name to the other
3910 ``INITSCRIPT_*`` as an override.
3911
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003912 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003913 The variable is optional and defaults to the :term:`PN`
3914 variable.
3915
Andrew Geisslerf0343792020-11-18 10:42:21 -06003916 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003917 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003918
3919 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3920
3921 In this example, the script has a runlevel of 99, starts the script
3922 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3923
3924 The variable's default value is "defaults", which is set in the
3925 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3926
Andrew Geissler09036742021-06-25 14:25:14 -05003927 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003928 ``update-rc.d`` command. For more information on valid parameters,
3929 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003930 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003931
Andrew Geisslerf0343792020-11-18 10:42:21 -06003932 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003933 Specifies the QA checks to skip for a specific package within a
3934 recipe. For example, to skip the check for symbolic link ``.so``
3935 files in the main package of a recipe, add the following to the
3936 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05003937 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003938
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003939 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003940
Andrew Geissler595f6302022-01-24 19:11:47 +00003941 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003942 list of the valid QA checks you can specify using this variable.
3943
Andrew Geisslerf0343792020-11-18 10:42:21 -06003944 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003945 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05003946 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003947 configuration level to disable this behavior.
3948
Andrew Geisslerf0343792020-11-18 10:42:21 -06003949 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003950 When the IPK backend is in use and package management is enabled on
3951 the target, you can use this variable to set up ``opkg`` in the
3952 target image to point to package feeds on a nominated server. Once
3953 the feed is established, you can perform installations or upgrades
3954 using the package manager at runtime.
3955
Andrew Geisslerf0343792020-11-18 10:42:21 -06003956 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003957 Defines the kernel architecture used when assembling the
3958 configuration. Architectures supported for this release are:
3959
3960 - powerpc
3961 - i386
3962 - x86_64
3963 - arm
3964 - qemu
3965 - mips
3966
Andrew Geissler5f350902021-07-23 13:09:54 -04003967 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003968
Andrew Geisslerf0343792020-11-18 10:42:21 -06003969 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003970 A regular expression used by the build process to explicitly identify
3971 the kernel branch that is validated, patched, and configured during a
3972 build. You must set this variable to ensure the exact kernel branch
3973 you want is being used by the build process.
3974
3975 Values for this variable are set in the kernel's recipe file and the
3976 kernel's append file. For example, if you are using the
3977 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05003978 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003979 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003980
3981 KBRANCH ?= "standard/base"
3982
3983 This variable is also used from the kernel's append file to identify
3984 the kernel branch specific to a particular machine or target
3985 hardware. Continuing with the previous kernel example, the kernel's
3986 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3987 BSP layer for a given machine. For example, the append file for the
3988 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3989 machines (``meta-yocto-bsp``) is named
3990 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05003991 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003992
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003993 KBRANCH:genericx86 = "standard/base"
3994 KBRANCH:genericx86-64 = "standard/base"
3995 KBRANCH:edgerouter = "standard/edgerouter"
3996 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003997
Andrew Geissler09036742021-06-25 14:25:14 -05003998 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003999 identify the kernel branch to use when building for each supported
4000 BSP.
4001
Andrew Geisslerf0343792020-11-18 10:42:21 -06004002 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004003 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
4004 class, specifies an "in-tree" kernel configuration file for use
4005 during a kernel build.
4006
4007 Typically, when using a ``defconfig`` to configure a kernel during a
4008 build, you place the file in your layer in the same manner as you
4009 would place patch files and configuration fragment files (i.e.
4010 "out-of-tree"). However, if you want to use a ``defconfig`` file that
4011 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05004012 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004013 :term:`KMACHINE` variable to point to the
4014 ``defconfig`` file.
4015
4016 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05004017 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004018
4019 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
4020
Andrew Geissler09036742021-06-25 14:25:14 -05004021 Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05004022 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004023
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004024 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004025
Andrew Geisslerc926e172021-05-07 16:11:35 -05004026 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004027
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004028 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004029
4030 For more
Andrew Geissler09036742021-06-25 14:25:14 -05004031 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004032 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004033 section in the Yocto Project Linux Kernel Development Manual.
4034
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004035 :term:`KCONFIG_MODE`
4036 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
4037 class, specifies the kernel configuration values to use for options
4038 not specified in the provided ``defconfig`` file. Valid options are::
4039
4040 KCONFIG_MODE = "alldefconfig"
4041 KCONFIG_MODE = "allnoconfig"
4042
4043 In ``alldefconfig`` mode the options not explicitly specified will be
4044 assigned their Kconfig default value. In ``allnoconfig`` mode the
4045 options not explicitly specified will be disabled in the kernel
4046 config.
4047
Andrew Geissler09036742021-06-25 14:25:14 -05004048 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004049 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
4050 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
4051 in ``${WORKDIR}`` through a meta-layer will be handled in
4052 ``allnoconfig`` mode.
4053
4054 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05004055 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004056 be explicitly set.
4057
4058 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
4059 generated by copying the ``.config`` file from a working Linux kernel
4060 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05004061 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004062 not need to be explicitly set.
4063
4064 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
4065 generated using the
4066 :ref:`ref-tasks-savedefconfig`
4067 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05004068 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004069
4070 KCONFIG_MODE = "alldefconfig"
4071
Andrew Geisslerf0343792020-11-18 10:42:21 -06004072 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004073 Specifies an alternate kernel image type for creation in addition to
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004074 the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and
4075 :term:`KERNEL_IMAGETYPES` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004076
Andrew Geisslerf0343792020-11-18 10:42:21 -06004077 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004078 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05004079 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004080 variable.
4081
Andrew Geissler09036742021-06-25 14:25:14 -05004082 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004083 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004084 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004085
4086 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4087
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004088 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
4089 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004090
Andrew Geisslerf0343792020-11-18 10:42:21 -06004091 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004092 A list of classes defining kernel image types that the
4093 :ref:`kernel <ref-classes-kernel>` class should inherit. You
4094 typically append this variable to enable extended image types. An
4095 example is the "kernel-fitimage", which enables fitImage support and
Patrick Williams975a06f2022-10-21 14:42:47 -05004096 resides in ``meta/classes-recipe/kernel-fitimage.bbclass``. You can register
Andrew Geissler595f6302022-01-24 19:11:47 +00004097 custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004098 variable.
4099
Patrick Williams03907ee2022-05-01 06:28:52 -05004100 :term:`KERNEL_DEBUG_TIMESTAMPS`
4101 If set to "1", enables timestamping functionality during building
4102 the kernel. The default is "0" to disable this for reproducibility
4103 reasons.
4104
Patrick Williams975a06f2022-10-21 14:42:47 -05004105 :term:`KERNEL_DEPLOY_DEPEND`
4106 Provides a means of controlling the dependency of an image recipe
4107 on the kernel. The default value is "virtual/kernel:do_deploy",
4108 however for a small initramfs image or other images that do not
4109 need the kernel, this can be set to "" in the image recipe.
4110
Andrew Geisslerf0343792020-11-18 10:42:21 -06004111 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004112 Specifies the name of the generated Linux kernel device tree (i.e.
4113 the ``.dtb``) file.
4114
4115 .. note::
4116
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004117 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004118 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004119
4120 In order to use this variable, the
4121 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4122 be inherited.
4123
Andrew Geisslerf0343792020-11-18 10:42:21 -06004124 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004125 The link name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004126 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004127 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004128
4129 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4130
4131 The
4132 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004133 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004134
4135 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4136
4137 See the :term:`MACHINE` variable for additional
4138 information.
4139
Andrew Geisslerf0343792020-11-18 10:42:21 -06004140 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004141 The base name of the kernel device tree binary (DTB). This variable
Patrick Williams975a06f2022-10-21 14:42:47 -05004142 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004143 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004144
4145 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4146
4147 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004148 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004149
4150 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4151
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004152 :term:`KERNEL_DTC_FLAGS`
4153 Specifies the ``dtc`` flags that are passed to the Linux kernel build
4154 system when generating the device trees (via ``DTC_FLAGS`` environment
4155 variable).
4156
4157 In order to use this variable, the
4158 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4159 be inherited.
4160
Andrew Geisslerf0343792020-11-18 10:42:21 -06004161 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004162 Specifies additional ``make`` command-line arguments the OpenEmbedded
4163 build system passes on when compiling the kernel.
4164
Andrew Geisslerf0343792020-11-18 10:42:21 -06004165 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004166 Includes additional kernel metadata. In the OpenEmbedded build
4167 system, the default Board Support Packages (BSPs)
4168 :term:`Metadata` is provided through the
4169 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004170 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004171 the kernel recipe or kernel append file to further add metadata for
4172 all BSPs or specific BSPs.
4173
4174 The metadata you add through this variable includes config fragments
4175 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004176 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004177 variable for a specific machine. In this way, you can provide
4178 validated, but optional, sets of kernel configurations and features.
4179
4180 For example, the following example from the ``linux-yocto-rt_4.12``
4181 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4182 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004183 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004184
4185 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004186 KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
4187 KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc"
4188 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4189 KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004190
Andrew Geisslerf0343792020-11-18 10:42:21 -06004191 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004192 The link name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004193 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004194 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004195
4196 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4197
4198 The value of the
4199 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004200 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004201
4202 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4203
4204 See the :term:`MACHINE` variable for additional
4205 information.
4206
Andrew Geisslerf0343792020-11-18 10:42:21 -06004207 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004208 The base name of the kernel flattened image tree (FIT) image. This
Patrick Williams975a06f2022-10-21 14:42:47 -05004209 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004210 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004211
4212 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4213
4214 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004215 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004216
4217 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4218
Andrew Geisslerf0343792020-11-18 10:42:21 -06004219 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004220 The link name for the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004221 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004222
4223 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4224
4225 The value of
4226 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004227 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004228
4229 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4230
4231 See the :term:`MACHINE` variable for additional
4232 information.
4233
Andrew Geisslerf0343792020-11-18 10:42:21 -06004234 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004235 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004236 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004237 checked against the set value during the
4238 :ref:`ref-tasks-sizecheck` task. The task fails if
4239 the kernel image file is larger than the setting.
4240
Andrew Geissler09036742021-06-25 14:25:14 -05004241 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004242 limited amount of space in which the kernel image must be stored.
4243
4244 By default, this variable is not set, which means the size of the
4245 kernel image is not checked.
4246
Andrew Geisslerf0343792020-11-18 10:42:21 -06004247 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004248 The base name of the kernel image. This variable is set in the
Patrick Williams975a06f2022-10-21 14:42:47 -05004249 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004250
4251 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4252
4253 The value of the
4254 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004255 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004256
4257 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4258
Andrew Geisslerf0343792020-11-18 10:42:21 -06004259 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004260 The type of kernel to build for a device, usually set by the machine
4261 configuration files and defaults to "zImage". This variable is used
4262 when building the kernel and is passed to ``make`` as the target to
4263 build.
4264
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004265 To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
4266
4267 :term:`KERNEL_IMAGETYPES`
4268 Lists additional types of kernel images to build for a device in addition
4269 to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
4270 machine configuration files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004271
Andrew Geisslerf0343792020-11-18 10:42:21 -06004272 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004273 Lists kernel modules that need to be auto-loaded during boot.
4274
4275 .. note::
4276
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004277 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004278 variable.
4279
Andrew Geissler09036742021-06-25 14:25:14 -05004280 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004281 can be recognized by the kernel recipe or by an out-of-tree kernel
4282 module recipe (e.g. a machine configuration file, a distribution
4283 configuration file, an append file for the recipe, or the recipe
4284 itself).
4285
Andrew Geisslerc926e172021-05-07 16:11:35 -05004286 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004287
4288 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4289
Andrew Geissler09036742021-06-25 14:25:14 -05004290 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004291 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4292 the list of modules to be auto-loaded on boot. The modules appear
4293 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004294 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004295
4296 KERNEL_MODULE_AUTOLOAD += "module_name"
4297
4298 For information on how to populate the ``modname.conf`` file with
4299 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4300
Andrew Geisslerf0343792020-11-18 10:42:21 -06004301 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004302 Provides a list of modules for which the OpenEmbedded build system
4303 expects to find ``module_conf_``\ modname values that specify
4304 configuration for each of the modules. For information on how to
4305 provide those module configurations, see the
4306 :term:`module_conf_* <module_conf>` variable.
4307
Andrew Geisslerf0343792020-11-18 10:42:21 -06004308 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004309 The location of the kernel sources. This variable is set to the value
4310 of the :term:`STAGING_KERNEL_DIR` within
4311 the :ref:`module <ref-classes-module>` class. For information on
4312 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004313 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004314 section in the Yocto Project Linux Kernel Development Manual.
4315
4316 To help maximize compatibility with out-of-tree drivers used to build
4317 modules, the OpenEmbedded build system also recognizes and uses the
4318 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004319 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004320 used by external Makefiles to point to the kernel source directory.
4321
Andrew Geisslerf0343792020-11-18 10:42:21 -06004322 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004323 The location of the kernel sources. This variable is set to the value
4324 of the :term:`STAGING_KERNEL_DIR` within
4325 the :ref:`module <ref-classes-module>` class. For information on
4326 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004327 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004328 section in the Yocto Project Linux Kernel Development Manual.
4329
4330 To help maximize compatibility with out-of-tree drivers used to build
4331 modules, the OpenEmbedded build system also recognizes and uses the
4332 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004333 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004334 used by external Makefiles to point to the kernel source directory.
4335
Andrew Geisslerf0343792020-11-18 10:42:21 -06004336 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004337 Specifies the version of the kernel as extracted from ``version.h``
4338 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004339 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004340 configured. Consequently, attempting to refer to this variable in
4341 contexts prior to configuration will not work.
4342
Andrew Geisslerf0343792020-11-18 10:42:21 -06004343 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004344 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004345 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004346 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004347 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004348 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Patrick Williams2194f502022-10-16 14:26:09 -05004349 :term:`Initramfs` recipe. Setting the variable there when the data is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004350 needed avoids a potential dependency loop.
4351
Andrew Geisslerf0343792020-11-18 10:42:21 -06004352 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004353 Provides a short description of a configuration fragment. You use
4354 this variable in the ``.scc`` file that describes a configuration
4355 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004356 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004357
4358 define KFEATURE_DESCRIPTION "Enable SMP"
4359
Andrew Geisslerf0343792020-11-18 10:42:21 -06004360 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004361 The machine as known by the kernel. Sometimes the machine name used
4362 by the kernel does not match the machine name used by the
4363 OpenEmbedded build system. For example, the machine name that the
4364 OpenEmbedded build system understands as ``core2-32-intel-common``
4365 goes by a different name in the Linux Yocto kernel. The kernel
4366 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004367 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004368 OpenEmbedded build system machine name.
4369
4370 These mappings between different names occur in the Yocto Linux
4371 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004372 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004373
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004374 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4375 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4376 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4377 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4378 KMACHINE:core2-32-intel-common = "intel-core2-32"
4379 KBRANCH:core2-32-intel-common = "standard/base"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004380 KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004381
Andrew Geissler09036742021-06-25 14:25:14 -05004382 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004383 that the kernel understands the machine name as "intel-core2-32".
4384 However, the OpenEmbedded build system understands the machine as
4385 "core2-32-intel-common".
4386
Andrew Geisslerf0343792020-11-18 10:42:21 -06004387 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004388 Defines the kernel type to be used in assembling the configuration.
4389 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004390 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004391 section in the
4392 Yocto Project Linux Kernel Development Manual for more information on
4393 kernel types.
4394
Andrew Geissler09036742021-06-25 14:25:14 -05004395 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004396 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004397 value you use must match the value used for the
4398 :term:`LINUX_KERNEL_TYPE` value used by the
4399 kernel recipe.
4400
Andrew Geisslerf0343792020-11-18 10:42:21 -06004401 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004402 Provides a list of targets for automatic configuration.
4403
4404 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4405 information on how this variable is used.
4406
Andrew Geisslerf0343792020-11-18 10:42:21 -06004407 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004408 Lists the layers, separated by spaces, on which this recipe depends.
4409 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004410 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004411
4412 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4413
4414 In this previous example,
4415 version 3 of "anotherlayer" is compared against
4416 :term:`LAYERVERSION`\ ``_anotherlayer``.
4417
4418 An error is produced if any dependency is missing or the version
4419 numbers (if specified) do not match exactly. This variable is used in
4420 the ``conf/layer.conf`` file and must be suffixed with the name of
4421 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4422
Andrew Geisslerf0343792020-11-18 10:42:21 -06004423 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004424 When used inside the ``layer.conf`` configuration file, this variable
4425 provides the path of the current layer. This variable is not
4426 available outside of ``layer.conf`` and references are expanded
4427 immediately when parsing of the file completes.
4428
Andrew Geisslerf0343792020-11-18 10:42:21 -06004429 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004430 Lists the layers, separated by spaces, recommended for use with this
4431 layer.
4432
4433 Optionally, you can specify a specific layer version for a
4434 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004435 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004436
4437 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4438
4439 In this previous example, version 3 of "anotherlayer" is compared
4440 against ``LAYERVERSION_anotherlayer``.
4441
4442 This variable is used in the ``conf/layer.conf`` file and must be
4443 suffixed with the name of the specific layer (e.g.
4444 ``LAYERRECOMMENDS_mylayer``).
4445
Andrew Geisslerf0343792020-11-18 10:42:21 -06004446 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004447 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004448 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004449 allows the layer maintainer to indicate which combinations of the
4450 layer and OE-Core can be expected to work. The variable gives the
4451 system a way to detect when a layer has not been tested with new
4452 releases of OE-Core (e.g. the layer is not maintained).
4453
4454 To specify the OE-Core versions for which a layer is compatible, use
4455 this variable in your layer's ``conf/layer.conf`` configuration file.
4456 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004457 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004458 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004459 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004460
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004461 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004462
4463 .. note::
4464
Andrew Geissler09036742021-06-25 14:25:14 -05004465 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004466 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004467 The OpenEmbedded build system produces a warning if the variable
4468 is not set for any given layer.
4469
Andrew Geissler09209ee2020-12-13 08:44:15 -06004470 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004471 section in the Yocto Project Development Tasks Manual.
4472
Andrew Geisslerf0343792020-11-18 10:42:21 -06004473 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004474 Optionally specifies the version of a layer as a single number. You
4475 can use this within :term:`LAYERDEPENDS` for
4476 another layer in order to depend on a specific version of the layer.
4477 This variable is used in the ``conf/layer.conf`` file and must be
4478 suffixed with the name of the specific layer (e.g.
4479 ``LAYERVERSION_mylayer``).
4480
Andrew Geisslerf0343792020-11-18 10:42:21 -06004481 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004482 The minimal command and arguments used to run the linker.
4483
Andrew Geisslerf0343792020-11-18 10:42:21 -06004484 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004485 Specifies the flags to pass to the linker. This variable is exported
4486 to an environment variable and thus made visible to the software
4487 being built during the compilation step.
4488
Andrew Geissler09036742021-06-25 14:25:14 -05004489 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004490 being built:
4491
4492 - :term:`TARGET_LDFLAGS` when building for the
4493 target
4494
4495 - :term:`BUILD_LDFLAGS` when building for the
4496 build host (i.e. ``-native``)
4497
4498 - :term:`BUILDSDK_LDFLAGS` when building for
4499 an SDK (i.e. ``nativesdk-``)
4500
Andrew Geisslerf0343792020-11-18 10:42:21 -06004501 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004502 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4503 that the :ref:`debian <ref-classes-debian>` class applies its
4504 naming policy to given a recipe that packages multiple libraries.
4505
Andrew Geissler595f6302022-01-24 19:11:47 +00004506 This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004507
Andrew Geisslerf0343792020-11-18 10:42:21 -06004508 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004509 Checksums of the license text in the recipe source code.
4510
4511 This variable tracks changes in license text of the source code
4512 files. If the license text is changed, it will trigger a build
4513 failure, which gives the developer an opportunity to review any
4514 license change.
4515
4516 This variable must be defined for all recipes (unless
4517 :term:`LICENSE` is set to "CLOSED").
4518
Andrew Geissler09209ee2020-12-13 08:44:15 -06004519 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004520 section in the Yocto Project Development Tasks Manual.
4521
Andrew Geisslerf0343792020-11-18 10:42:21 -06004522 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004523 The list of source licenses for the recipe. Follow these rules:
4524
4525 - Do not use spaces within individual license names.
4526
4527 - Separate license names using \| (pipe) when there is a choice
4528 between licenses.
4529
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004530 - Separate license names using & (ampersand) when there are
4531 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004532
4533 - You can use spaces between license names.
4534
4535 - For standard licenses, use the names of the files in
4536 ``meta/files/common-licenses/`` or the
4537 :term:`SPDXLICENSEMAP` flag names defined in
4538 ``meta/conf/licenses.conf``.
4539
Andrew Geisslerc926e172021-05-07 16:11:35 -05004540 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004541
Andrew Geissler9aee5002022-03-30 16:27:02 +00004542 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4543 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4544 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004545
4546 The first example is from the
4547 recipes for Qt, which the user may choose to distribute under either
4548 the LGPL version 2.1 or GPL version 3. The second example is from
4549 Cairo where two licenses cover different parts of the source code.
4550 The final example is from ``sysstat``, which presents a single
4551 license.
4552
4553 You can also specify licenses on a per-package basis to handle
4554 situations where components of the output have different licenses.
4555 For example, a piece of software whose code is licensed under GPLv2
4556 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004557 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004558
Andrew Geissler9aee5002022-03-30 16:27:02 +00004559 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4560 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004561 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004562
Andrew Geisslerf0343792020-11-18 10:42:21 -06004563 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004564 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004565 build system to create an extra package (i.e.
4566 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4567 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004568 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004569
4570 The ``${PN}-lic`` package installs a directory in
4571 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4572 name, and installs files in that directory that contain license and
4573 copyright information (i.e. copies of the appropriate license files
4574 from ``meta/common-licenses`` that match the licenses specified in
4575 the :term:`LICENSE` variable of the recipe metadata
4576 and copies of files marked in
4577 :term:`LIC_FILES_CHKSUM` as containing
4578 license text).
4579
4580 For related information on providing license text, see the
4581 :term:`COPY_LIC_DIRS` variable, the
4582 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004583 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004584 section in the Yocto Project Development Tasks Manual.
4585
Andrew Geisslerf0343792020-11-18 10:42:21 -06004586 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004587 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00004588 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004589 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004590 separate them with spaces.
4591
4592 This value is independent of :term:`LICENSE` and is
4593 typically used to mark recipes that might require additional licenses
4594 in order to be used in a commercial product. For more information,
4595 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004596 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004597 section in the Yocto Project Development Tasks Manual.
4598
Andrew Geissler9aee5002022-03-30 16:27:02 +00004599 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004600 Lists license flags that when specified in
4601 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004602 prevent that recipe from being built. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004603 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004604 section in the Yocto Project Development Tasks Manual.
4605
Andrew Geisslerf0343792020-11-18 10:42:21 -06004606 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004607 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004608 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004609 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004610 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004611 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004612
4613 LICENSE_PATH += "path-to-additional-common-licenses"
4614
Andrew Geisslerf0343792020-11-18 10:42:21 -06004615 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004616 Defines the kernel type to be used in assembling the configuration.
4617 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004618 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004619 section in the
4620 Yocto Project Linux Kernel Development Manual for more information on
4621 kernel types.
4622
Andrew Geissler09036742021-06-25 14:25:14 -05004623 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004624 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004625 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004626 the kernel tools to find the appropriate description within the
4627 kernel :term:`Metadata` with which to build out the sources
4628 and configuration.
4629
Andrew Geisslerf0343792020-11-18 10:42:21 -06004630 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004631 The Linux version from ``kernel.org`` on which the Linux kernel image
4632 being built using the OpenEmbedded build system is based. You define
4633 this variable in the kernel recipe. For example, the
4634 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004635 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004636
4637 LINUX_VERSION ?= "3.4.24"
4638
Andrew Geissler09036742021-06-25 14:25:14 -05004639 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004640 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004641
4642 PV = "${LINUX_VERSION}+git${SRCPV}"
4643
Andrew Geisslerf0343792020-11-18 10:42:21 -06004644 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004645 A string extension compiled into the version string of the Linux
4646 kernel built with the OpenEmbedded build system. You define this
4647 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004648 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004649
4650 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4651
4652 Defining this variable essentially sets the Linux kernel
4653 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4654 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004655 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004656
4657 $ uname -r
4658 3.7.0-rc8-custom
4659
Andrew Geisslerf0343792020-11-18 10:42:21 -06004660 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004661 Specifies the directory to which the OpenEmbedded build system writes
4662 overall log files. The default directory is ``${TMPDIR}/log``.
4663
4664 For the directory containing logs specific to each task, see the
4665 :term:`T` variable.
4666
Andrew Geisslerf0343792020-11-18 10:42:21 -06004667 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004668 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004669 :term:`MACHINE` in the ``local.conf`` file found in the
4670 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004671 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004672 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004673
4674 MACHINE ?= "qemux86"
4675
4676 The variable corresponds to a machine configuration file of the same
4677 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004678 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004679 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004680 the :term:`Source Directory` in
4681 ``meta/conf/machine``.
4682
4683 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004684 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004685
4686 MACHINE ?= "qemuarm"
4687 MACHINE ?= "qemuarm64"
4688 MACHINE ?= "qemumips"
4689 MACHINE ?= "qemumips64"
4690 MACHINE ?= "qemuppc"
4691 MACHINE ?= "qemux86"
4692 MACHINE ?= "qemux86-64"
4693 MACHINE ?= "genericx86"
4694 MACHINE ?= "genericx86-64"
4695 MACHINE ?= "beaglebone"
4696 MACHINE ?= "edgerouter"
4697
4698 The last five are Yocto Project reference hardware
4699 boards, which are provided in the ``meta-yocto-bsp`` layer.
4700
4701 .. note::
4702
4703 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004704 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004705
Andrew Geisslerf0343792020-11-18 10:42:21 -06004706 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004707 Specifies the name of the machine-specific architecture. This
4708 variable is set automatically from :term:`MACHINE` or
4709 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05004710 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004711
Andrew Geisslerf0343792020-11-18 10:42:21 -06004712 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004713 A list of required machine-specific packages to install as part of
4714 the image being built. The build process depends on these packages
4715 being present. Furthermore, because this is a "machine-essential"
4716 variable, the list of packages are essential for the machine to boot.
4717 The impact of this variable affects images based on
4718 ``packagegroup-core-boot``, including the ``core-image-minimal``
4719 image.
4720
4721 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05004722 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004723 that the image being built has a build dependency on the variable's
4724 list of packages. In other words, the image will not build if a file
4725 in this list is not found.
4726
4727 As an example, suppose the machine for which you are building
4728 requires ``example-init`` to be run during boot to initialize the
4729 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05004730 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004731
4732 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4733
Andrew Geisslerf0343792020-11-18 10:42:21 -06004734 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004735 A list of recommended machine-specific packages to install as part of
4736 the image being built. The build process does not depend on these
4737 packages being present. However, because this is a
4738 "machine-essential" variable, the list of packages are essential for
4739 the machine to boot. The impact of this variable affects images based
4740 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4741 image.
4742
Andrew Geissler09036742021-06-25 14:25:14 -05004743 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004744 variable with the exception that the image being built does not have
4745 a build dependency on the variable's list of packages. In other
4746 words, the image will still build if a package in this list is not
4747 found. Typically, this variable is used to handle essential kernel
4748 modules, whose functionality may be selected to be built into the
4749 kernel rather than as a module, in which case a package will not be
4750 produced.
4751
4752 Consider an example where you have a custom kernel where a specific
4753 touchscreen driver is required for the machine to be usable. However,
4754 the driver can be built as a module or into the kernel depending on
4755 the kernel configuration. If the driver is built as a module, you
4756 want it to be installed. But, when the driver is built into the
4757 kernel, you still want the build to succeed. This variable sets up a
4758 "recommends" relationship so that in the latter case, the build will
4759 not fail due to the missing package. To accomplish this, assuming the
4760 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05004761 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004762
4763 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4764
4765 .. note::
4766
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004767 In this example, the ``kernel-module-ab123`` recipe needs to
4768 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4769 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4770 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004771
4772 Some examples of these machine essentials are flash, screen,
4773 keyboard, mouse, or touchscreen drivers (depending on the machine).
4774
Andrew Geisslerf0343792020-11-18 10:42:21 -06004775 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004776 A list of machine-specific packages to install as part of the image
4777 being built that are not essential for the machine to boot. However,
4778 the build process for more fully-featured images depends on the
4779 packages being present.
4780
4781 This variable affects all images based on ``packagegroup-base``,
4782 which does not include the ``core-image-minimal`` or
4783 ``core-image-full-cmdline`` images.
4784
Andrew Geissler09036742021-06-25 14:25:14 -05004785 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004786 with the exception that the image being built has a build dependency
4787 on the variable's list of packages. In other words, the image will
4788 not build if a file in this list is not found.
4789
4790 An example is a machine that has WiFi capability but is not essential
4791 for the machine to boot the image. However, if you are building a
4792 more fully-featured image, you want to enable the WiFi. The package
4793 containing the firmware for the WiFi hardware is always expected to
4794 exist, so it is acceptable for the build process to depend upon
4795 finding the package. In this case, assuming the package for the
4796 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004797 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004798
4799 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4800
Andrew Geisslerf0343792020-11-18 10:42:21 -06004801 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004802 A list of machine-specific packages to install as part of the image
4803 being built that are not essential for booting the machine. The image
4804 being built has no build dependency on this list of packages.
4805
4806 This variable affects only images based on ``packagegroup-base``,
4807 which does not include the ``core-image-minimal`` or
4808 ``core-image-full-cmdline`` images.
4809
Andrew Geissler09036742021-06-25 14:25:14 -05004810 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004811 with the exception that the image being built does not have a build
4812 dependency on the variable's list of packages. In other words, the
4813 image will build if a file in this list is not found.
4814
4815 An example is a machine that has WiFi capability but is not essential
4816 For the machine to boot the image. However, if you are building a
4817 more fully-featured image, you want to enable WiFi. In this case, the
4818 package containing the WiFi kernel module will not be produced if the
4819 WiFi driver is built into the kernel, in which case you still want
4820 the build to succeed instead of failing as a result of the package
4821 not being found. To accomplish this, assuming the package for the
4822 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004823 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004824
4825 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4826
Andrew Geisslerf0343792020-11-18 10:42:21 -06004827 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004828 Specifies the list of hardware features the
4829 :term:`MACHINE` is capable of supporting. For related
4830 information on enabling features, see the
4831 :term:`DISTRO_FEATURES`,
4832 :term:`COMBINED_FEATURES`, and
4833 :term:`IMAGE_FEATURES` variables.
4834
4835 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004836 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004837
Andrew Geisslerf0343792020-11-18 10:42:21 -06004838 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05004839 Features to be added to :term:`MACHINE_FEATURES` if not also present in
4840 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004841
4842 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4843 not intended to be user-configurable. It is best to just reference
4844 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004845 all machine configurations. See the ":ref:`ref-features-backfill`"
4846 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004847
Andrew Geisslerf0343792020-11-18 10:42:21 -06004848 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05004849 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4850 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004851 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004852
Andrew Geisslerf0343792020-11-18 10:42:21 -06004853 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004854 A colon-separated list of overrides that apply to the current
4855 machine. By default, this list includes the value of
4856 :term:`MACHINE`.
4857
Andrew Geissler09036742021-06-25 14:25:14 -05004858 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004859 should apply to a machine. For example, all machines emulated in QEMU
4860 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4861 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05004862 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004863
4864 MACHINEOVERRIDES =. "qemuall:"
4865
4866 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004867 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004868 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004869 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004870
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004871 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004872 file://wired-setup \
4873 "
4874
4875 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05004876 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004877 value of :term:`OVERRIDES`.
4878
Andrew Geisslerf0343792020-11-18 10:42:21 -06004879 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004880 The email address of the distribution maintainer.
4881
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004882 :term:`METADATA_BRANCH`
4883 The branch currently checked out for the OpenEmbedded-Core layer (path
4884 determined by :term:`COREBASE`).
4885
4886 :term:`METADATA_REVISION`
4887 The revision currently checked out for the OpenEmbedded-Core layer (path
4888 determined by :term:`COREBASE`).
4889
Andrew Geisslerf0343792020-11-18 10:42:21 -06004890 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004891 Specifies additional paths from which the OpenEmbedded build system
4892 gets source code. When the build system searches for source code, it
4893 first tries the local download directory. If that location fails, the
4894 build system tries locations defined by
4895 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05004896 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004897
4898 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05004899 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004900 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4901
Andrew Geisslerf0343792020-11-18 10:42:21 -06004902 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004903 Specifies a prefix has been added to :term:`PN` to create a
4904 special version of a recipe or package (i.e. a Multilib version). The
4905 variable is used in places where the prefix needs to be added to or
4906 removed from a the name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05004907 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004908
4909 .. note::
4910
Andrew Geissler09036742021-06-25 14:25:14 -05004911 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004912 historical and comes from a time when ``nativesdk`` was a suffix
4913 rather than a prefix on the recipe name. When ``nativesdk`` was turned
Andrew Geissler09036742021-06-25 14:25:14 -05004914 into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004915
Andrew Geissler09036742021-06-25 14:25:14 -05004916 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004917 :term:`BBCLASSEXTEND` is used to provide a
4918 ``nativesdk`` version of a recipe in addition to the target version.
4919 If that recipe declares build-time dependencies on tasks in other
4920 recipes by using :term:`DEPENDS`, then a dependency on
4921 "foo" will automatically get rewritten to a dependency on
4922 "nativesdk-foo". However, dependencies like the following will not
Andrew Geisslerc926e172021-05-07 16:11:35 -05004923 get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004924
4925 do_foo[depends] += "recipe:do_foo"
4926
4927 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004928 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004929
4930 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4931
Andrew Geissler09036742021-06-25 14:25:14 -05004932 :term:`module_autoload`
4933 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04004934 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05004935 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004936
4937 module_autoload_rfcomm = "rfcomm"
4938
Andrew Geisslerc926e172021-05-07 16:11:35 -05004939 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004940
4941 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4942
4943 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4944
Andrew Geissler09036742021-06-25 14:25:14 -05004945 :term:`module_conf`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004946 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004947 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4948 file.
4949
4950 You can use this variable anywhere that it can be recognized by the
4951 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4952 configuration file, a distribution configuration file, an append file
4953 for the recipe, or the recipe itself). If you use this variable, you
4954 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00004955 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004956 variable.
4957
Andrew Geisslerc926e172021-05-07 16:11:35 -05004958 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004959
4960 module_conf_module_name = "modprobe.d-syntax"
4961
4962 You must use the kernel module name override.
4963
4964 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04004965 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004966
Andrew Geissler5f350902021-07-23 13:09:54 -04004967 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004968 populate the ``/etc/modprobe.d/modname.conf`` file with
4969 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05004970 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004971
4972 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4973
4974 For information on how to specify kernel modules to auto-load on
4975 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4976
Andrew Geisslerf0343792020-11-18 10:42:21 -06004977 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004978 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4979 "0" to disable creation of this file, which contains all of the
4980 kernel modules resulting from a kernel build.
4981
Andrew Geisslerf0343792020-11-18 10:42:21 -06004982 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004983 The link name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05004984 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004985
4986 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4987
4988 The value
4989 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004990 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004991
4992 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4993
4994 See the :term:`MACHINE` variable for additional information.
4995
Andrew Geisslerf0343792020-11-18 10:42:21 -06004996 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004997 The base name of the kernel module tarball. This variable is set in
Patrick Williams975a06f2022-10-21 14:42:47 -05004998 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004999
5000 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
5001
5002 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05005003 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005004
5005 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
5006
Patrick Williams975a06f2022-10-21 14:42:47 -05005007 :term:`MOUNT_BASE`
5008 On non-systemd systems (where ``udev-extraconf`` is being used),
5009 specifies the base directory for auto-mounting filesystems. The
5010 default value is "/run/media".
5011
Andrew Geisslerf0343792020-11-18 10:42:21 -06005012 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005013 Uniquely identifies the type of the target system for which packages
5014 are being built. This variable allows output for different types of
5015 target systems to be put into different subdirectories of the same
5016 output directory.
5017
Andrew Geisslerc926e172021-05-07 16:11:35 -05005018 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005019
5020 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
5021
5022 Some classes (e.g.
5023 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05005024 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005025
5026 See the :term:`STAMP` variable for an example. See the
5027 :term:`STAGING_DIR_TARGET` variable for more information.
5028
Andrew Geisslerf0343792020-11-18 10:42:21 -06005029 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005030 A string identifying the host distribution. Strings consist of the
5031 host distributor ID followed by the release, as reported by the
5032 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
5033 example, when running a build on Ubuntu 12.10, the value is
5034 "Ubuntu-12.10". If this information is unable to be determined, the
5035 value resolves to "Unknown".
5036
5037 This variable is used by default to isolate native shared state
5038 packages for different distributions (e.g. to avoid problems with
5039 ``glibc`` version incompatibilities). Additionally, the variable is
5040 checked against
5041 :term:`SANITY_TESTED_DISTROS` if that
5042 variable is set.
5043
Andrew Geisslerf0343792020-11-18 10:42:21 -06005044 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005045 The minimal command and arguments to run ``nm``.
5046
Andrew Geisslerf0343792020-11-18 10:42:21 -06005047 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005048 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005049 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005050 licenses that are not in any way common. Also, new licenses are added
5051 occasionally to avoid introducing a lot of common license files,
5052 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05005053 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005054 not exist in common licenses.
5055
Andrew Geissler09036742021-06-25 14:25:14 -05005056 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05005057 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005058
5059 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
5060
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005061 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005062 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05005063 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005064
5065 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
5066
Andrew Geisslerf0343792020-11-18 10:42:21 -06005067 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005068 Prevents installation of all "recommended-only" packages.
5069 Recommended-only packages are packages installed only through the
5070 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05005071 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005072
5073 NO_RECOMMENDATIONS = "1"
5074
5075 You can set this variable globally in your ``local.conf`` file or you
5076 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005077 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005078
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005079 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005080
5081 It is important to realize that if you choose to not install packages
5082 using this variable and some other packages are dependent on them
5083 (i.e. listed in a recipe's :term:`RDEPENDS`
5084 variable), the OpenEmbedded build system ignores your request and
5085 will install the packages to avoid dependency errors.
5086
5087 .. note::
5088
5089 Some recommended packages might be required for certain system
5090 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005091 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005092
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005093 This variable is only supported when using the IPK and RPM
5094 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005095
5096 See the :term:`BAD_RECOMMENDATIONS` and
5097 the :term:`PACKAGE_EXCLUDE` variables for
5098 related information.
5099
Andrew Geisslerf0343792020-11-18 10:42:21 -06005100 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005101 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005102 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05005103 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005104 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005105
5106 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005107 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
5108 FILES:${PN}-dbg = "/usr/src/debug/"
5109 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005110
Andrew Geissler09036742021-06-25 14:25:14 -05005111 :term:`NON_MULTILIB_RECIPES`
5112 A list of recipes that should not be built for multilib. OE-Core's
5113 ``multilib.conf`` file defines a reasonable starting point for this
5114 list with::
5115
5116 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
5117
Andrew Geisslerf0343792020-11-18 10:42:21 -06005118 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005119 The minimal command and arguments to run ``objcopy``.
5120
Andrew Geisslerf0343792020-11-18 10:42:21 -06005121 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005122 The minimal command and arguments to run ``objdump``.
5123
Andrew Geisslerf0343792020-11-18 10:42:21 -06005124 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005125 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
5126 this variable specifies additional arguments passed to the "sed"
5127 command. The sed command alters any paths in configuration scripts
5128 that have been set up during compilation. Inheriting this class
5129 results in all paths in these scripts being changed to point into the
5130 ``sysroots/`` directory so that all builds that use the script will
5131 use the correct directories for the cross compiling layout.
5132
Patrick Williams975a06f2022-10-21 14:42:47 -05005133 See the ``meta/classes-recipe/binconfig.bbclass`` in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005134 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00005135 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005136
Andrew Geisslerf0343792020-11-18 10:42:21 -06005137 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005138 An internal variable used to tell the OpenEmbedded build system what
5139 Python modules to import for every Python function run by the system.
5140
5141 .. note::
5142
5143 Do not set this variable. It is for internal use only.
5144
Andrew Geisslerf0343792020-11-18 10:42:21 -06005145 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005146 The name of the build environment setup script for the purposes of
5147 setting up the environment within the extensible SDK. The default
5148 value is "oe-init-build-env".
5149
5150 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05005151 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005152
Andrew Geisslerf0343792020-11-18 10:42:21 -06005153 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005154 Controls how the OpenEmbedded build system spawns interactive
5155 terminals on the host development system (e.g. using the BitBake
5156 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005157 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005158 the Yocto Project Development Tasks Manual.
5159
Andrew Geissler5f350902021-07-23 13:09:54 -04005160 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005161
5162 - auto
5163 - gnome
5164 - xfce
5165 - rxvt
5166 - screen
5167 - konsole
5168 - none
5169
Andrew Geisslerf0343792020-11-18 10:42:21 -06005170 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005171 The directory from which the top-level build environment setup script
5172 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005173 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05005174 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005175 contains the script.
5176
5177 For additional information on how this variable is used, see the
5178 initialization script.
5179
Andrew Geisslerf0343792020-11-18 10:42:21 -06005180 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005181 Declares the oldest version of the Linux kernel that the produced
5182 binaries must support. This variable is passed into the build of the
5183 Embedded GNU C Library (``glibc``).
5184
5185 The default for this variable comes from the
5186 ``meta/conf/bitbake.conf`` configuration file. You can override this
5187 default by setting the variable in a custom distribution
5188 configuration file.
5189
Patrick Williams975a06f2022-10-21 14:42:47 -05005190 :term:`OVERLAYFS_ETC_DEVICE`
5191 When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is
5192 inherited, specifies the device to be mounted for the read/write
5193 layer of ``/etc``. There is no default, so you must set this if you
5194 wish to enable :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`, for
5195 example, assuming ``/dev/mmcblk0p2`` was the desired device::
5196
5197 OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2"
5198
5199 :term:`OVERLAYFS_ETC_EXPOSE_LOWER`
5200 When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is
5201 inherited, if set to "1" then a read-only access to the original
5202 ``/etc`` content will be provided as a ``lower/`` subdirectory of
5203 :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0".
5204
5205 :term:`OVERLAYFS_ETC_FSTYPE`
5206 When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is
5207 inherited, specifies the file system type for the read/write
5208 layer of ``/etc``. There is no default, so you must set this if you
5209 wish to enable :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`,
5210 for example, assuming the file system is ext4::
5211
5212 OVERLAYFS_ETC_FSTYPE = "ext4"
5213
5214 :term:`OVERLAYFS_ETC_MOUNT_OPTIONS`
5215 When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is
5216 inherited, specifies the mount options for the read-write layer.
5217 The default value is "defaults".
5218
5219 :term:`OVERLAYFS_ETC_MOUNT_POINT`
5220 When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is
5221 inherited, specifies the parent mount path for the filesystem layers.
5222 There is no default, so you must set this if you wish to enable
5223 :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`, for example if
5224 the desired path is "/data"::
5225
5226 OVERLAYFS_ETC_MOUNT_POINT = "/data"
5227
5228 :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME`
5229 When the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>` class is
5230 inherited, controls how the generated init will be named. For more
5231 information, see the :ref:`overlayfs-etc <ref-classes-overlayfs-etc>`
5232 class documentation. The default value is "1".
5233
5234 :term:`OVERLAYFS_MOUNT_POINT`
5235 When inheriting the :ref:`overlayfs <ref-classes-overlayfs>` class,
5236 specifies mount point(s) to be used. For example::
5237
5238 OVERLAYFS_MOUNT_POINT[data] = "/data"
5239
5240 The assumes you have a ``data.mount`` systemd unit defined elsewhere
5241 in your BSP (e.g. in ``systemd-machine-units`` recipe) and it is
5242 installed into the image. For more information see
5243 :ref:`overlayfs <ref-classes-overlayfs>`.
5244
5245 .. note::
5246
5247 Although the :ref:`overlayfs <ref-classes-overlayfs>` class is
5248 inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT`
5249 should be set in your machine configuration.
5250
5251 :term:`OVERLAYFS_QA_SKIP`
5252 When inheriting the :ref:`overlayfs <ref-classes-overlayfs>` class,
5253 provides the ability to disable QA checks for particular overlayfs
5254 mounts. For example::
5255
5256 OVERLAYFS_QA_SKIP[data] = "mount-configured"
5257
5258 .. note::
5259
5260 Although the :ref:`overlayfs <ref-classes-overlayfs>` class is
5261 inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP`
5262 should be set in your machine configuration.
5263
5264 :term:`OVERLAYFS_WRITABLE_PATHS`
5265 When inheriting the :ref:`overlayfs <ref-classes-overlayfs>` class,
5266 specifies writable paths used at runtime for the recipe. For
5267 example::
5268
5269 OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application"
5270
Andrew Geisslerf0343792020-11-18 10:42:21 -06005271 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005272 A colon-separated list of overrides that currently apply. Overrides
5273 are a BitBake mechanism that allows variables to be selectively
5274 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005275 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005276 the current recipe being built, the machine for which it is being
5277 built, and so forth.
5278
5279 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005280 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005281 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005282 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005283
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005284 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005285
5286 See the
5287 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5288 section in the BitBake User Manual for more information on the
5289 overrides mechanism.
5290
Andrew Geissler09036742021-06-25 14:25:14 -05005291 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005292 :term:`CLASSOVERRIDE`,
5293 :term:`MACHINEOVERRIDES`, and
5294 :term:`DISTROOVERRIDES` variables. Another
5295 important override included by default is ``pn-${PN}``. This override
5296 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005297 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005298
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005299 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005300
5301 .. note::
5302
Andrew Geissler09036742021-06-25 14:25:14 -05005303 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005304 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005305 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005306 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005307
Andrew Geisslerf0343792020-11-18 10:42:21 -06005308 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005309 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005310
5311 ${PN}-${PV}
5312
Andrew Geisslerf0343792020-11-18 10:42:21 -06005313 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005314 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005315
5316 You may find you need to inject additional metadata into packages.
5317 This variable allows you to do that by setting the injected data as
5318 the value. Multiple fields can be added by splitting the content with
5319 the literal separator "\n".
5320
5321 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5322 to do package type specific settings. It can also be made package
5323 specific by using the package name as a suffix.
5324
5325 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005326 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005327 section in the Yocto Project Development Tasks Manual.
5328
Andrew Geisslerf0343792020-11-18 10:42:21 -06005329 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005330 The architecture of the resulting package or packages.
5331
5332 By default, the value of this variable is set to
5333 :term:`TUNE_PKGARCH` when building for the
5334 target, :term:`BUILD_ARCH` when building for the
5335 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5336 SDK.
5337
5338 .. note::
5339
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005340 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005341
5342 However, if your recipe's output packages are built specific to the
5343 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005344 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005345 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005346
5347 PACKAGE_ARCH = "${MACHINE_ARCH}"
5348
Andrew Geisslerf0343792020-11-18 10:42:21 -06005349 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005350 Specifies a list of architectures compatible with the target machine.
5351 This variable is set automatically and should not normally be
5352 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005353 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005354 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5355
Andrew Geisslerf0343792020-11-18 10:42:21 -06005356 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005357 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005358 that those added packages can pick up files that would normally be
5359 included in the default package.
5360
Andrew Geisslerf0343792020-11-18 10:42:21 -06005361 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005362 This variable, which is set in the ``local.conf`` configuration file
5363 found in the ``conf`` folder of the
5364 :term:`Build Directory`, specifies the package manager the
5365 OpenEmbedded build system uses when packaging data.
5366
5367 You can provide one or more of the following arguments for the
5368 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5369 package_tar"
5370
5371 .. note::
5372
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005373 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005374 class has limited functionality due to no support for package
5375 dependencies by that backend. Therefore, it is recommended that
5376 you do not use it.
5377
5378 The build system uses only the first argument in the list as the
5379 package manager when creating your image or SDK. However, packages
5380 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005381 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005382
5383 PACKAGE_CLASSES ?= "package_ipk"
5384
5385 The OpenEmbedded build system uses
5386 the IPK package manager to create your image or SDK.
5387
5388 For information on packaging and build performance effects as a
5389 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005390 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005391
Andrew Geisslerf0343792020-11-18 10:42:21 -06005392 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005393 Determines how to split up and package debug and source information
5394 when creating debugging packages to be used with the GNU Project
5395 Debugger (GDB). In general, based on the value of this variable,
5396 you can combine the source and debug info in a single package,
5397 you can break out the source into a separate package that can be
5398 installed independently, or you can choose to not have the source
5399 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005400
Patrick Williams93c203f2021-10-06 16:15:23 -05005401 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005402
Patrick Williams93c203f2021-10-06 16:15:23 -05005403 - "``.debug``": All debugging and source info is placed in a single
5404 ``*-dbg`` package; debug symbol files are placed next to the
5405 binary in a ``.debug`` directory so that, if a binary is installed
5406 into ``/bin``, the corresponding debug symbol file is installed
5407 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5408 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005409
Patrick Williams93c203f2021-10-06 16:15:23 -05005410 - "``debug-file-directory``": As above, all debugging and source info
5411 is placed in a single ``*-dbg`` package; debug symbol files are
5412 placed entirely under the directory ``/usr/lib/debug`` and separated
5413 by the path from where the binary is installed, so that if a binary
5414 is installed in ``/bin``, the corresponding debug symbols are installed
5415 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5416 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005417
Patrick Williams93c203f2021-10-06 16:15:23 -05005418 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5419 ``*-dbg`` package as with the ``.debug`` value, while source is
5420 placed in a separate ``*-src`` package, which can be installed
5421 independently. This is the default setting for this variable,
5422 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005423
Patrick Williams93c203f2021-10-06 16:15:23 -05005424 - "``debug-without-src``": The same behavior as with the ``.debug``
5425 setting, but no source is packaged at all.
5426
5427 .. note::
5428
5429 Much of the above package splitting can be overridden via
5430 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005431
5432 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005433 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005434 in the Yocto Project Development Tasks Manual.
5435
Andrew Geisslerf0343792020-11-18 10:42:21 -06005436 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005437 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005438 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005439
5440 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5441
5442 You can set this variable globally in your ``local.conf`` file or you
5443 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005444 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005445
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005446 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005447
5448 If you choose to not install a package using this variable and some
5449 other package is dependent on it (i.e. listed in a recipe's
5450 :term:`RDEPENDS` variable), the OpenEmbedded build
5451 system generates a fatal installation error. Because the build system
5452 halts the process with a fatal error, you can use the variable with
5453 an iterative development process to remove specific components from a
5454 system.
5455
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005456 This variable is supported only when using the IPK and RPM
5457 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005458
5459 See the :term:`NO_RECOMMENDATIONS` and the
5460 :term:`BAD_RECOMMENDATIONS` variables for
5461 related information.
5462
Andrew Geissler9aee5002022-03-30 16:27:02 +00005463 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5464 Prevents specific packages from being installed when you are
5465 installing complementary packages.
5466
5467 You might find that you want to prevent installing certain packages
5468 when you are installing complementary packages. For example, if you
5469 are using :term:`IMAGE_FEATURES` to install
5470 ``dev-pkgs``, you might not want to install all packages from a
5471 particular multilib. If you find yourself in this situation, you can
5472 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5473 expressions to match the packages you want to exclude.
5474
Andrew Geisslerf0343792020-11-18 10:42:21 -06005475 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005476 Specifies the list of architectures compatible with the device CPU.
5477 This variable is useful when you build for several different devices
5478 that use miscellaneous processors such as XScale and ARM926-EJS.
5479
Andrew Geisslerf0343792020-11-18 10:42:21 -06005480 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005481 Optionally specifies the package architectures used as part of the
5482 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005483 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005484 URI, which is constructed using the
5485 :term:`PACKAGE_FEED_URIS` and
5486 :term:`PACKAGE_FEED_BASE_PATHS`
5487 variables.
5488
5489 .. note::
5490
Andrew Geissler09036742021-06-25 14:25:14 -05005491 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005492 variable to allow specific package architectures. If you do
5493 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005494 case, you can omit this variable. Omitting the variable results in
5495 all available architectures for the current machine being included
5496 into remote package feeds.
5497
Andrew Geissler09036742021-06-25 14:25:14 -05005498 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5499 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005500 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005501
5502 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5503 https://example.com/packagerepos/updates"
5504 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5505 PACKAGE_FEED_ARCHS = "all core2-64"
5506
5507 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005508
5509 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005510
5511 https://example.com/packagerepos/release/rpm/all
5512 https://example.com/packagerepos/release/rpm/core2-64
5513 https://example.com/packagerepos/release/rpm-dev/all
5514 https://example.com/packagerepos/release/rpm-dev/core2-64
5515 https://example.com/packagerepos/updates/rpm/all
5516 https://example.com/packagerepos/updates/rpm/core2-64
5517 https://example.com/packagerepos/updates/rpm-dev/all
5518 https://example.com/packagerepos/updates/rpm-dev/core2-64
5519
Andrew Geisslerf0343792020-11-18 10:42:21 -06005520 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005521 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005522 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005523 package feed URI used by the OpenEmbedded build system. The base path
5524 lies between the :term:`PACKAGE_FEED_URIS`
5525 and :term:`PACKAGE_FEED_ARCHS` variables.
5526
Andrew Geissler09036742021-06-25 14:25:14 -05005527 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5528 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005529 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005530
5531 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5532 https://example.com/packagerepos/updates"
5533 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5534 PACKAGE_FEED_ARCHS = "all core2-64"
5535
5536 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005537
5538 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005539
5540 https://example.com/packagerepos/release/rpm/all
5541 https://example.com/packagerepos/release/rpm/core2-64
5542 https://example.com/packagerepos/release/rpm-dev/all
5543 https://example.com/packagerepos/release/rpm-dev/core2-64
5544 https://example.com/packagerepos/updates/rpm/all
5545 https://example.com/packagerepos/updates/rpm/core2-64
5546 https://example.com/packagerepos/updates/rpm-dev/all
5547 https://example.com/packagerepos/updates/rpm-dev/core2-64
5548
Andrew Geisslerf0343792020-11-18 10:42:21 -06005549 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005550 Specifies the front portion of the package feed URI used by the
5551 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005552 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005553 :term:`PACKAGE_FEED_BASE_PATHS`, and
5554 :term:`PACKAGE_FEED_ARCHS` variables.
5555
Andrew Geissler09036742021-06-25 14:25:14 -05005556 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5557 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005558 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005559
5560 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5561 https://example.com/packagerepos/updates"
5562 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5563 PACKAGE_FEED_ARCHS = "all core2-64"
5564
5565 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005566
5567 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005568
5569 https://example.com/packagerepos/release/rpm/all
5570 https://example.com/packagerepos/release/rpm/core2-64
5571 https://example.com/packagerepos/release/rpm-dev/all
5572 https://example.com/packagerepos/release/rpm-dev/core2-64
5573 https://example.com/packagerepos/updates/rpm/all
5574 https://example.com/packagerepos/updates/rpm/core2-64
5575 https://example.com/packagerepos/updates/rpm-dev/all
5576 https://example.com/packagerepos/updates/rpm-dev/core2-64
5577
Andrew Geisslerf0343792020-11-18 10:42:21 -06005578 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005579 The final list of packages passed to the package manager for
5580 installation into the image.
5581
5582 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005583 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005584 not the final list of packages that are actually installed. This
5585 variable is internal to the image construction code. Consequently, in
5586 general, you should use the
5587 :term:`IMAGE_INSTALL` variable to specify
5588 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005589 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Patrick Williams2194f502022-10-16 14:26:09 -05005590 image. When working with an initial RAM filesystem (:term:`Initramfs`) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005591 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Patrick Williams2194f502022-10-16 14:26:09 -05005592 :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005593 in the Yocto Project Development Tasks Manual.
5594
Andrew Geisslerf0343792020-11-18 10:42:21 -06005595 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005596 Specifies a list of packages the OpenEmbedded build system attempts
5597 to install when creating an image. If a listed package fails to
5598 install, the build system does not generate an error. This variable
5599 is generally not user-defined.
5600
Andrew Geisslerf0343792020-11-18 10:42:21 -06005601 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005602 Specifies a list of functions run to pre-process the
5603 :term:`PKGD` directory prior to splitting the files out
5604 to individual packages.
5605
Andrew Geisslerf0343792020-11-18 10:42:21 -06005606 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005607 Specifies a list of dependencies for post-installation and
5608 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005609 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005610 creation time rather than on the target but depends on a native tool
5611 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005612 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005613
5614 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005615 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005616 section in the Yocto Project Development Tasks Manual.
5617
Andrew Geisslerf0343792020-11-18 10:42:21 -06005618 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005619 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005620 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005621 recipes when you specify features and then arguments that define
5622 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005623 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005624
5625 PACKAGECONFIG ??= "f1 f2 f3 ..."
5626 PACKAGECONFIG[f1] = "\
5627 --with-f1, \
5628 --without-f1, \
5629 build-deps-for-f1, \
5630 runtime-deps-for-f1, \
5631 runtime-recommends-for-f1, \
5632 packageconfig-conflicts-for-f1"
5633 PACKAGECONFIG[f2] = "\
5634 ... and so on and so on ...
5635
Andrew Geissler5f350902021-07-23 13:09:54 -04005636 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005637 list of the features to enable. Following the features, you can
5638 determine the behavior of each feature by providing up to six
5639 order-dependent arguments, which are separated by commas. You can
5640 omit any argument you like but must retain the separating commas. The
5641 order is important and specifies the following:
5642
5643 1. Extra arguments that should be added to the configure script
5644 argument list (:term:`EXTRA_OECONF` or
5645 :term:`PACKAGECONFIG_CONFARGS`) if
5646 the feature is enabled.
5647
Andrew Geissler09036742021-06-25 14:25:14 -05005648 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5649 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005650
5651 3. Additional build dependencies (:term:`DEPENDS`)
5652 that should be added if the feature is enabled.
5653
5654 4. Additional runtime dependencies (:term:`RDEPENDS`)
5655 that should be added if the feature is enabled.
5656
5657 5. Additional runtime recommendations
5658 (:term:`RRECOMMENDS`) that should be added if
5659 the feature is enabled.
5660
Andrew Geissler09036742021-06-25 14:25:14 -05005661 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005662 settings for this feature.
5663
Andrew Geissler09036742021-06-25 14:25:14 -05005664 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005665 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5666 three arguments that determine the feature's behavior.
5667 ::
5668
5669 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5670
5671 The
5672 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5673 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005674 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005675 other hand, if the feature is disabled say through a ``.bbappend``
5676 file in another layer, then the second argument ``--without-gtk3`` is
5677 added to the configure script instead.
5678
Andrew Geissler09036742021-06-25 14:25:14 -05005679 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005680 regardless of whether you are creating a block or changing a block.
5681 When creating a block, use the structure inside your recipe.
5682
Andrew Geissler09036742021-06-25 14:25:14 -05005683 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005684 so one of two ways:
5685
5686 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05005687 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05005688 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005689 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005690
5691 PACKAGECONFIG = "f4 f5"
5692
Andrew Geisslerc926e172021-05-07 16:11:35 -05005693 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005694
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005695 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005696
5697 - *Configuration file:* This method is identical to changing the
5698 block through an append file except you edit your ``local.conf``
5699 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05005700 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005701
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005702 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005703
Andrew Geisslerc926e172021-05-07 16:11:35 -05005704 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005705
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005706 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005707
Andrew Geisslerf0343792020-11-18 10:42:21 -06005708 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005709 A space-separated list of configuration options generated from the
5710 :term:`PACKAGECONFIG` setting.
5711
5712 Classes such as :ref:`autotools <ref-classes-autotools>` and
Andrew Geissler09036742021-06-25 14:25:14 -05005713 :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5714 pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5715 respectively. If you are using :term:`PACKAGECONFIG` but not a class that
Patrick Williams2194f502022-10-16 14:26:09 -05005716 handles the :ref:`ref-tasks-configure` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05005717 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005718
Andrew Geisslerf0343792020-11-18 10:42:21 -06005719 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005720 For recipes inheriting the
5721 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05005722 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005723 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5724 should not be automatically created by the ``packagegroup`` recipe,
5725 which is the default behavior.
5726
Andrew Geisslerf0343792020-11-18 10:42:21 -06005727 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005728 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005729 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005730
Andrew Geissler5199d832021-09-24 16:47:35 -05005731 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005732
5733 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05005734 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005735 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05005736 package. If a file matches the :term:`FILES` variable for more than one
5737 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005738 (leftmost) package.
5739
5740 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005741 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005742 :ref:`ref-tasks-install` task) are not generated,
5743 unless generation is forced through the
5744 :term:`ALLOW_EMPTY` variable.
5745
Andrew Geisslerf0343792020-11-18 10:42:21 -06005746 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005747 A promise that your recipe satisfies runtime dependencies for
5748 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05005749 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005750 only states that they should be satisfied. For example, if a hard,
5751 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05005752 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005753 variable, but a package with the module name is never actually
5754 produced, then the other package will be broken. Thus, if you attempt
5755 to include that package in an image, you will get a dependency
5756 failure from the packaging system during the
5757 :ref:`ref-tasks-rootfs` task.
5758
5759 Typically, if there is a chance that such a situation can occur and
5760 the package that is not created is valid without the dependency being
5761 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05005762 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005763
Andrew Geissler09036742021-06-25 14:25:14 -05005764 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005765 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005766 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005767 section in the Yocto Project Development Tasks Manual.
5768
Andrew Geisslerf0343792020-11-18 10:42:21 -06005769 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005770 Specifies a list of functions run to perform additional splitting of
5771 files into individual packages. Recipes can either prepend to this
5772 variable or prepend to the ``populate_packages`` function in order to
5773 perform additional package splitting. In either case, the function
5774 should set :term:`PACKAGES`,
5775 :term:`FILES`, :term:`RDEPENDS` and
5776 other packaging variables appropriately in order to perform the
5777 desired splitting.
5778
Andrew Geisslerf0343792020-11-18 10:42:21 -06005779 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005780 Extra options passed to the ``make`` command during the
5781 :ref:`ref-tasks-compile` task in order to specify
5782 parallel compilation on the local build host. This variable is
5783 usually in the form "-j x", where x represents the maximum number of
5784 parallel threads ``make`` can run.
5785
5786 .. note::
5787
Andrew Geissler09036742021-06-25 14:25:14 -05005788 In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005789 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5790 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005791
5792 By default, the OpenEmbedded build system automatically sets this
5793 variable to be equal to the number of cores the build system uses.
5794
5795 .. note::
5796
5797 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05005798 the :ref:`ref-tasks-compile` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05005799 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005800 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005801 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005802 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005803
5804 For single socket systems (i.e. one CPU), you should not have to
5805 override this variable to gain optimal parallelism during builds.
5806 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05005807 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005808 not set higher than "-j 20".
5809
5810 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005811 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005812 section in the Yocto Project Development Tasks Manual.
5813
Andrew Geisslerf0343792020-11-18 10:42:21 -06005814 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005815 Extra options passed to the ``make install`` command during the
5816 :ref:`ref-tasks-install` task in order to specify
5817 parallel installation. This variable defaults to the value of
5818 :term:`PARALLEL_MAKE`.
5819
5820 .. note::
5821
Andrew Geissler09036742021-06-25 14:25:14 -05005822 In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005823 be called with
5824 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5825 way to ensure this is to use the ``oe_runmake`` function.
5826
5827 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05005828 the :ref:`ref-tasks-install` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005829 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005830 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005831 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005832 section in the Yocto Project Development Tasks Manual.
5833
Andrew Geisslerf0343792020-11-18 10:42:21 -06005834 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005835 Determines the action to take when a patch fails. You can set this
5836 variable to one of two values: "noop" and "user".
5837
5838 The default value of "noop" causes the build to simply fail when the
5839 OpenEmbedded build system cannot successfully apply a patch. Setting
5840 the value to "user" causes the build system to launch a shell and
5841 places you in the right location so that you can manually resolve the
5842 conflicts.
5843
5844 Set this variable in your ``local.conf`` file.
5845
Andrew Geisslerf0343792020-11-18 10:42:21 -06005846 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005847 Specifies the utility used to apply patches for a recipe during the
5848 :ref:`ref-tasks-patch` task. You can specify one of
5849 three utilities: "patch", "quilt", or "git". The default utility used
5850 is "quilt" except for the quilt-native recipe itself. Because the
5851 quilt tool is not available at the time quilt-native is being
5852 patched, it uses "patch".
5853
5854 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005855 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005856
5857 PATCHTOOL = "patch"
5858 PATCHTOOL = "quilt"
5859 PATCHTOOL = "git"
5860
Andrew Geisslerf0343792020-11-18 10:42:21 -06005861 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005862 The epoch of the recipe. By default, this variable is unset. The
5863 variable is used to make upgrades possible when the versioning scheme
5864 changes in some backwards incompatible way.
5865
Andrew Geissler09036742021-06-25 14:25:14 -05005866 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005867
Andrew Geissler9aee5002022-03-30 16:27:02 +00005868 :term:`PEP517_WHEEL_PATH`
5869 When used by recipes that inherit the
5870 :ref:`python_pep517 <ref-classes-python_pep517>` class,
5871 denotes the path to ``dist/`` (short for distribution) where the
5872 binary archive ``wheel`` is built.
5873
Andrew Geisslerf0343792020-11-18 10:42:21 -06005874 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005875 Specifies the recipe or package name and includes all version and
5876 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5877 ``bash-4.2-r1/``). This variable is comprised of the following:
5878 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5879
Andrew Geisslerf0343792020-11-18 10:42:21 -06005880 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005881 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5882 class, this variable identifies packages that contain the pixbuf
5883 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5884 class assumes that the loaders are in the recipe's main package (i.e.
5885 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5886 loaders you need are in a package other than that main package.
5887
Andrew Geisslerf0343792020-11-18 10:42:21 -06005888 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005889 The name of the resulting package created by the OpenEmbedded build
5890 system.
5891
5892 .. note::
5893
Andrew Geissler09036742021-06-25 14:25:14 -05005894 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005895
5896 For example, when the :ref:`debian <ref-classes-debian>` class
5897 renames the output package, it does so by setting
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005898 ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005899
Andrew Geisslerf0343792020-11-18 10:42:21 -06005900 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005901 The path to ``pkg-config`` files for the current build context.
5902 ``pkg-config`` reads this variable from the environment.
5903
Andrew Geisslerf0343792020-11-18 10:42:21 -06005904 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005905 Points to the destination directory for files to be packaged before
5906 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005907 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005908
5909 ${WORKDIR}/package
5910
5911 Do not change this default.
5912
Andrew Geisslerf0343792020-11-18 10:42:21 -06005913 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005914 Points to a shared, global-state directory that holds data generated
5915 during the packaging process. During the packaging process, the
5916 :ref:`ref-tasks-packagedata` task packages data
5917 for each recipe and installs it into this temporary, shared area.
5918 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05005919 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005920
5921 ${STAGING_DIR_HOST}/pkgdata
5922
5923 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005924 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005925 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005926 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005927 section in the Yocto Project Development Tasks Manual. For more
5928 information on the shared, global-state directory, see
5929 :term:`STAGING_DIR_HOST`.
5930
Andrew Geisslerf0343792020-11-18 10:42:21 -06005931 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005932 Points to the parent directory for files to be packaged after they
5933 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005934 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005935
5936 ${WORKDIR}/packages-split
5937
5938 Under this directory, the build system creates directories for each
5939 package specified in :term:`PACKAGES`. Do not change
5940 this default.
5941
Andrew Geisslerf0343792020-11-18 10:42:21 -06005942 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005943 Points to a temporary work area where the
5944 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05005945 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005946
5947 ${WORKDIR}/pkgdata
5948
5949 Do not change this default.
5950
5951 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05005952 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005953 :term:`PKGDATA_DIR` to make it available globally.
5954
Andrew Geisslerf0343792020-11-18 10:42:21 -06005955 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05005956 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005957 is set to :term:`PE`.
5958
Andrew Geisslerf0343792020-11-18 10:42:21 -06005959 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005960 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005961 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005962
Andrew Geisslerf0343792020-11-18 10:42:21 -06005963 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005964 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005965 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005966
Andrew Geisslerf0343792020-11-18 10:42:21 -06005967 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005968 This variable can have two separate functions depending on the
5969 context: a recipe name or a resulting package name.
5970
Andrew Geissler09036742021-06-25 14:25:14 -05005971 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005972 OpenEmbedded build system as input to create a package. The name is
5973 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05005974 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005975 will be "expat".
5976
5977 The variable refers to a package name in the context of a file
5978 created or produced by the OpenEmbedded build system.
5979
Andrew Geissler09036742021-06-25 14:25:14 -05005980 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005981 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04005982 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05005983 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005984 and ``lib64-bash``, respectively.
5985
Andrew Geisslerf0343792020-11-18 10:42:21 -06005986 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005987 Specifies a list of functions to call once the OpenEmbedded build
5988 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005989 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005990
5991 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5992
5993 If you need to pass the SDK path to a command within a function, you
5994 can use ``${SDK_DIR}``, which points to the parent directory used by
5995 the OpenEmbedded build system when creating SDK output. See the
5996 :term:`SDK_DIR` variable for more information.
5997
Andrew Geisslerf0343792020-11-18 10:42:21 -06005998 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005999 Specifies a list of functions to call once the OpenEmbedded build
6000 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05006001 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006002
6003 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
6004
6005 If you need to pass the SDK path to a command within a function, you
6006 can use ``${SDK_DIR}``, which points to the parent directory used by
6007 the OpenEmbedded build system when creating SDK output. See the
6008 :term:`SDK_DIR` variable for more information.
6009
Andrew Geisslerf0343792020-11-18 10:42:21 -06006010 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006011 The revision of the recipe. The default value for this variable is
6012 "r0". Subsequent revisions of the recipe conventionally have the
6013 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05006014 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006015
6016 .. note::
6017
Andrew Geissler09036742021-06-25 14:25:14 -05006018 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006019 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06006020 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006021 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06006022 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006023 mechanisms.
6024
Andrew Geissler09036742021-06-25 14:25:14 -05006025 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006026 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05006027 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006028 :term:`PKGR`, helps the package manager distinguish which
6029 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05006030 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
6031 the same :term:`PV` usually means that the packages all install the same
6032 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006033 packaging fixes.
6034
6035 .. note::
6036
Andrew Geissler09036742021-06-25 14:25:14 -05006037 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006038 package contents or metadata.
6039
Andrew Geissler5f350902021-07-23 13:09:54 -04006040 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006041 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006042 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006043 in the Yocto Project Development Tasks Manual for more information.
6044
Andrew Geisslerf0343792020-11-18 10:42:21 -06006045 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006046 If multiple recipes provide the same item, this variable determines
6047 which recipe is preferred and thus provides the item (i.e. the
6048 preferred provider). You should always suffix this variable with the
6049 name of the provided item. And, you should define the variable using
6050 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05006051 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006052
6053 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
6054
6055 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05006056 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006057 the recipe you prefer to provide "virtual/kernel".
6058
Andrew Geisslerc926e172021-05-07 16:11:35 -05006059 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006060
6061 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
6062 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
6063
6064 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06006065 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006066 section in the Yocto Project Development Tasks Manual.
6067
6068 .. note::
6069
Andrew Geissler09036742021-06-25 14:25:14 -05006070 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006071 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05006072 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006073 desirable since this mechanism is designed to select between mutually
6074 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006075
Andrew Geisslerf0343792020-11-18 10:42:21 -06006076 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006077 If there are multiple versions of a recipe available, this variable
6078 determines which version should be given preference. You must always
6079 suffix the variable with the :term:`PN` you want to select (`python` in
6080 the first example below), and you should specify the :term:`PV`
6081 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006082
Andrew Geissler09036742021-06-25 14:25:14 -05006083 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006084 through the "``%``" character. You can use the character to match any
6085 number of characters, which can be useful when specifying versions
6086 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05006087 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006088
6089 PREFERRED_VERSION_python = "3.4.0"
6090 PREFERRED_VERSION_linux-yocto = "5.0%"
6091
6092 .. note::
6093
6094 The use of the "%" character is limited in that it only works at the end of the
6095 string. You cannot use the wildcard character in any other
6096 location of the string.
6097
6098 The specified version is matched against :term:`PV`, which
6099 does not necessarily match the version part of the recipe's filename.
6100 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05006101 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006102
6103 PV = "1.1+git${SRCPV}"
6104
6105 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05006106 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006107
6108 PREFERRED_VERSION_foo = "1.1+git%"
6109
6110 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05006111 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006112
6113 PREFERRED_VERSION_foo = "git"
6114
Andrew Geissler09036742021-06-25 14:25:14 -05006115 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006116 configuration files in a way that is hard to change. You can use
6117 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05006118 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006119
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006120 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006121
6122 Although not recommended, worst case, you can also use the
6123 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006124 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006125
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006126 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006127
6128 .. note::
6129
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006130 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05006131 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006132
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006133 If a recipe with the specified version is not available, a warning
6134 message will be shown. See :term:`REQUIRED_VERSION` if you want this
6135 to be an error instead.
6136
Andrew Geisslerf0343792020-11-18 10:42:21 -06006137 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006138 Specifies additional paths from which the OpenEmbedded build system
6139 gets source code. When the build system searches for source code, it
6140 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05006141 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006142 source, and then locations specified by
6143 :term:`MIRRORS` in that order.
6144
6145 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006146 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006147 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
6148
6149 Typically, you could add a specific server for the build system to
6150 attempt before any others by adding something like the following to
6151 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006152 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006153
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006154 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00006155 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6156 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6157 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6158 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006159
6160 These changes cause the
6161 build system to intercept Git, FTP, HTTP, and HTTPS requests and
6162 direct them to the ``http://`` sources mirror. You can use
6163 ``file://`` URLs to point to local directories or network shares as
6164 well.
6165
Andrew Geisslerf0343792020-11-18 10:42:21 -06006166 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006167 Indicates the importance of a package.
6168
Andrew Geissler09036742021-06-25 14:25:14 -05006169 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006170 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05006171 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006172 normally set within recipes.
6173
Andrew Geissler09036742021-06-25 14:25:14 -05006174 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006175 "optional", which is the default.
6176
Andrew Geisslerf0343792020-11-18 10:42:21 -06006177 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006178 Specifies libraries installed within a recipe that should be ignored
6179 by the OpenEmbedded build system's shared library resolver. This
6180 variable is typically used when software being built by a recipe has
6181 its own private versions of a library normally provided by another
6182 recipe. In this case, you would not want the package containing the
6183 private libraries to be set as a dependency on other unrelated
6184 packages that should instead depend on the package providing the
6185 standard version of the library.
6186
6187 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05006188 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006189
6190 PRIVATE_LIBS = "libmozjs.so \
6191 libxpcom.so \
6192 libnspr4.so \
6193 libxul.so \
6194 libmozalloc.so \
6195 libplc4.so \
6196 libplds4.so"
6197
6198 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006199 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006200 section in the Yocto Project Overview and Concepts Manual.
6201
Andrew Geisslerf0343792020-11-18 10:42:21 -06006202 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006203 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05006204 default, a recipe's own :term:`PN` is implicitly already in its
6205 :term:`PROVIDES` list and therefore does not need to mention that it
6206 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006207 aliases are synonyms for the recipe and can be useful for satisfying
6208 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006209 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006210
Andrew Geissler09036742021-06-25 14:25:14 -05006211 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05006212 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006213
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006214 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006215
Andrew Geissler09036742021-06-25 14:25:14 -05006216 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006217 results in the "eudev" recipe also being available as simply "udev".
6218
6219 .. note::
6220
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006221 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
6222 to `PROVIDES`, so while using "+=" in the above example may not be
6223 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006224
6225 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05006226 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006227 virtual target is a name that corresponds to some particular
6228 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05006229 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006230 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05006231 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006232
6233 Conventionally, virtual targets have names on the form
6234 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6235 of the name and has no syntactical significance.
6236
6237 The :term:`PREFERRED_PROVIDER` variable is
6238 used to select which particular recipe provides a virtual target.
6239
6240 .. note::
6241
6242 A corresponding mechanism for virtual runtime dependencies
6243 (packages) exists. However, the mechanism does not depend on any
6244 special functionality beyond ordinary variable assignments. For
6245 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6246 the component that manages the ``/dev`` directory.
6247
6248 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006249 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006250
6251 VIRTUAL-RUNTIME_dev_manager = "udev"
6252
6253
Andrew Geisslerf0343792020-11-18 10:42:21 -06006254 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006255 The network based :term:`PR` service host and port.
6256
Andrew Geissler87f5cff2022-09-30 13:13:31 -05006257 The ``conf/templates/default/local.conf.sample.extended`` configuration
6258 file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST`
6259 variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006260
6261 PRSERV_HOST = "localhost:0"
6262
6263 You must
6264 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06006265 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006266 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006267
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006268
6269 :term:`PSEUDO_IGNORE_PATHS`
6270 A comma-separated (without spaces) list of path prefixes that should be ignored
6271 by pseudo when monitoring and recording file operations, in order to avoid
6272 problems with files being written to outside of the pseudo context and
6273 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6274 and can include partial directory (or file) names.
6275
6276
Andrew Geisslerf0343792020-11-18 10:42:21 -06006277 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006278 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06006279 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006280 functionality is enabled when building a recipe. You should not set
6281 this variable directly. Enabling and disabling building Package Tests
6282 at build time should be done by adding "ptest" to (or removing it
6283 from) :term:`DISTRO_FEATURES`.
6284
Andrew Geisslerf0343792020-11-18 10:42:21 -06006285 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006286 The version of the recipe. The version is normally extracted from the
6287 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006288 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6289 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006290 building an unstable (i.e. development) version from a source code
6291 repository (e.g. Git or Subversion).
6292
Andrew Geissler09036742021-06-25 14:25:14 -05006293 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006294
Patrick Williams975a06f2022-10-21 14:42:47 -05006295 :term:`PYPI_PACKAGE`
6296 When inheriting the :ref:`pypi <ref-classes-pypi>` class, specifies the
6297 `PyPI <https://pypi.org/>`__ package name to be built. The default value
6298 is set based upon :term:`BPN` (stripping any "python-" or "python3-"
6299 prefix off if present), however for some packages it will need to be set
6300 explicitly if that will not match the package name (e.g. where the
6301 package name has a prefix, underscores, uppercase letters etc.)
6302
Andrew Geisslerf0343792020-11-18 10:42:21 -06006303 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006304 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006305 :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006306 Application Binary Interface (ABI) currently in use for Python. By
6307 default, the ABI is "m". You do not have to set this variable as the
6308 OpenEmbedded build system sets it for you.
6309
6310 The OpenEmbedded build system uses the ABI to construct directory
6311 names used when installing the Python headers and libraries in
6312 sysroot (e.g. ``.../python3.3m/...``).
6313
Andrew Geisslerf0343792020-11-18 10:42:21 -06006314 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006315 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006316 :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the
Andrew Geissler09036742021-06-25 14:25:14 -05006317 major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006318 be "python3". You do not have to set this variable as the
6319 OpenEmbedded build system automatically sets it for you.
6320
6321 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006322 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006323
6324 DEPENDS += "${PYTHON_PN}-native"
6325
6326 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006327 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006328
Patrick Williams03907ee2022-05-01 06:28:52 -05006329 :term:`QA_EMPTY_DIRS`
6330 Specifies a list of directories that are expected to be empty when
6331 packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or
6332 :term:`WARN_QA` these will be checked and an error or warning
6333 (respectively) will be produced.
6334
6335 The default :term:`QA_EMPTY_DIRS` value is set in
6336 :ref:`insane.bbclass <ref-classes-insane>`.
6337
6338 :term:`QA_EMPTY_DIRS_RECOMMENDATION`
6339 Specifies a recommendation for why a directory must be empty,
6340 which will be included in the error message if a specific directory
6341 is found to contain files. Must be overridden with the directory
6342 path to match on.
6343
6344 If no recommendation is specified for a directory, then the default
6345 "but it is expected to be empty" will be used.
6346
6347 An example message shows if files were present in '/dev'::
6348
6349 QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime"
6350
Andrew Geisslerf0343792020-11-18 10:42:21 -06006351 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006352 The minimal command and arguments to run ``ranlib``.
6353
Andrew Geisslerf0343792020-11-18 10:42:21 -06006354 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006355 The list of packages that conflict with packages. Note that packages
6356 will not be installed if conflicting packages are not first removed.
6357
6358 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006359 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006360
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006361 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006362
6363 BitBake, which the OpenEmbedded build system uses, supports
6364 specifying versioned dependencies. Although the syntax varies
6365 depending on the packaging format, BitBake hides these differences
6366 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006367 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006368
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006369 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006370
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006371 For ``operator``, you can specify the following:
6372
6373 - =
6374 - <
6375 - >
6376 - <=
6377 - >=
6378
6379 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006380 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006381
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006382 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006383
Andrew Geisslerf0343792020-11-18 10:42:21 -06006384 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006385 Lists runtime dependencies of a package. These dependencies are other
6386 packages that must be installed in order for the package to function
6387 correctly. As an example, the following assignment declares that the
6388 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006389 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006390
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006391 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006392
6393 The most common types of package
6394 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006395 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006396 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006397 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006398 section in the Yocto Project Overview and Concepts Manual.
6399
Andrew Geissler09036742021-06-25 14:25:14 -05006400 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006401 ``bar`` and ``baz`` will be declared as dependencies inside the
6402 package ``foo`` when it is written out by one of the
Patrick Williams2194f502022-10-16 14:26:09 -05006403 :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006404 Exactly how this is done depends on which package format is used,
6405 which is determined by
6406 :term:`PACKAGE_CLASSES`. When the
6407 corresponding package manager installs the package, it will know to
6408 also install the packages on which it depends.
6409
6410 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006411 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006412 added. This dependency is from the recipe's
6413 :ref:`ref-tasks-build` (not to be confused with
6414 :ref:`ref-tasks-compile`) task to the
Patrick Williams2194f502022-10-16 14:26:09 -05006415 :ref:`do_package_write_* <ref-tasks-package_write_deb>` task of the recipes that build ``bar`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006416 ``baz``.
6417
Andrew Geissler09036742021-06-25 14:25:14 -05006418 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geissler615f2f12022-07-15 14:00:58 -05006419 names of other packages --- they cannot be recipe names. Although
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006420 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006421 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006422 variable. For an example of the default list of packages created from
6423 a recipe, see the :term:`PACKAGES` variable.
6424
Andrew Geissler09036742021-06-25 14:25:14 -05006425 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006426 you should always use the variable in a form with an attached package
6427 name (remember that a single recipe can build multiple packages). For
6428 example, suppose you are building a development package that depends
6429 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006430 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006431
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006432 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006433
6434 In the example,
6435 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006436 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006437 the variable.
6438
6439 .. note::
6440
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006441 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006442 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006443 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006444 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006445 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006446
Andrew Geissler09036742021-06-25 14:25:14 -05006447 The package names you use with :term:`RDEPENDS` must appear as they would
6448 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006449 allows a different name to be used for the final package (e.g. the
6450 :ref:`debian <ref-classes-debian>` class uses this to rename
6451 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006452 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006453 independent of the package format used.
6454
6455 BitBake, which the OpenEmbedded build system uses, supports
6456 specifying versioned dependencies. Although the syntax varies
6457 depending on the packaging format, BitBake hides these differences
6458 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006459 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006460
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006461 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006462
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006463 For ``operator``, you can specify the following:
6464
6465 - =
6466 - <
6467 - >
6468 - <=
6469 - >=
6470
6471 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006472
6473 .. note::
6474
Andrew Geissler09036742021-06-25 14:25:14 -05006475 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006476 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006477
6478 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006479 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006480
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006481 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006482
6483 For information on build-time dependencies, see the
6484 :term:`DEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05006485 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6486 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006487 BitBake User Manual for additional information on tasks and
6488 dependencies.
6489
Andrew Geissler5199d832021-09-24 16:47:35 -05006490 :term:`RECIPE_NO_UPDATE_REASON`
6491 If a recipe should not be replaced by a more recent upstream version,
6492 putting the reason why in this variable in a recipe allows
6493 ``devtool check-upgrade-status`` command to display it, as explained
6494 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6495 section.
6496
Andrew Geisslerf0343792020-11-18 10:42:21 -06006497 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006498 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006499 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006500 class, this variable identifies distribution features that must exist
6501 in the current configuration in order for the OpenEmbedded build
6502 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006503 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6504 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006505 the recipe will be skipped, and if the build system attempts to build
6506 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006507
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006508 :term:`REQUIRED_VERSION`
6509 If there are multiple versions of a recipe available, this variable
6510 determines which version should be given preference.
6511 :term:`REQUIRED_VERSION` works in exactly the same manner as
6512 :term:`PREFERRED_VERSION`, except that if the specified version is not
6513 available then an error message is shown and the build fails
6514 immediately.
6515
6516 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6517 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6518
Andrew Geisslerf0343792020-11-18 10:42:21 -06006519 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006520 With ``rm_work`` enabled, this variable specifies a list of recipes
6521 whose work directories should not be removed. See the
Andrew Geissler595f6302022-01-24 19:11:47 +00006522 ":ref:`ref-classes-rm-work`" section for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006523 details.
6524
Andrew Geisslerf0343792020-11-18 10:42:21 -06006525 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006526 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006527 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006528
6529 ROOT_HOME ??= "/home/root"
6530
6531 .. note::
6532
6533 This default value is likely used because some embedded solutions
6534 prefer to have a read-only root filesystem and prefer to keep
6535 writeable data in one place.
6536
6537 You can override the default by setting the variable in any layer or
6538 in the ``local.conf`` file. Because the default is set using a "weak"
6539 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006540 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006541
6542 ROOT_HOME = "/root"
6543 ROOT_HOME ?= "/root"
6544
6545 These
6546 override examples use ``/root``, which is probably the most commonly
6547 used override.
6548
Andrew Geisslerf0343792020-11-18 10:42:21 -06006549 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006550 Indicates a filesystem image to include as the root filesystem.
6551
Andrew Geissler09036742021-06-25 14:25:14 -05006552 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006553 :ref:`image-live <ref-classes-image-live>` class.
6554
Andrew Geisslerf0343792020-11-18 10:42:21 -06006555 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006556 Specifies a list of functions to call after the OpenEmbedded build
6557 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006558 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006559
6560 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6561
6562 If you need to pass the root filesystem path to a command within a
6563 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6564 directory that becomes the root filesystem image. See the
6565 :term:`IMAGE_ROOTFS` variable for more
6566 information.
6567
Andrew Geisslerf0343792020-11-18 10:42:21 -06006568 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006569 Specifies a list of functions to call once the OpenEmbedded build
6570 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006571 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006572
6573 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6574
6575 If you need to pass the root filesystem path to a command within a
6576 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6577 directory that becomes the root filesystem image. See the
6578 :term:`IMAGE_ROOTFS` variable for more
6579 information.
6580
Andrew Geisslerf0343792020-11-18 10:42:21 -06006581 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006582 Specifies a list of functions to call after the OpenEmbedded build
6583 system has removed unnecessary packages. When runtime package
6584 management is disabled in the image, several packages are removed
6585 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006586 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006587
6588 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6589
6590 If you need to pass the root filesystem path to a command within a
6591 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6592 directory that becomes the root filesystem image. See the
6593 :term:`IMAGE_ROOTFS` variable for more
6594 information.
6595
Andrew Geisslerf0343792020-11-18 10:42:21 -06006596 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006597 Specifies a list of functions to call before the OpenEmbedded build
6598 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006599 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006600
6601 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6602
6603 If you need to pass the root filesystem path to a command within a
6604 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6605 directory that becomes the root filesystem image. See the
6606 :term:`IMAGE_ROOTFS` variable for more
6607 information.
6608
Andrew Geisslerf0343792020-11-18 10:42:21 -06006609 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006610 A list of package name aliases that a package also provides. These
6611 aliases are useful for satisfying runtime dependencies of other
6612 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006613 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006614
6615 .. note::
6616
Andrew Geissler09036742021-06-25 14:25:14 -05006617 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006618
6619 As with all package-controlling variables, you must always use the
6620 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006621 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006622
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006623 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006624
Andrew Geisslerf0343792020-11-18 10:42:21 -06006625 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006626 A list of packages that extends the usability of a package being
6627 built. The package being built does not depend on this list of
6628 packages in order to successfully build, but rather uses them for
6629 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006630 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006631
Andrew Geissler09036742021-06-25 14:25:14 -05006632 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006633 list of packages when installing the built package. However, you can
6634 prevent listed packages from being installed by using the
6635 :term:`BAD_RECOMMENDATIONS`,
6636 :term:`NO_RECOMMENDATIONS`, and
6637 :term:`PACKAGE_EXCLUDE` variables.
6638
Andrew Geissler09036742021-06-25 14:25:14 -05006639 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006640 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006641 through the :term:`PACKAGES` or
6642 :term:`PACKAGES_DYNAMIC` variables or the
6643 :term:`RPROVIDES` variable, or an error will occur
6644 during the build. If such a recipe does exist and the package is not
6645 produced, the build continues without error.
6646
Andrew Geissler09036742021-06-25 14:25:14 -05006647 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006648 you should always attach an override to the variable to specify the
6649 particular package whose usability is being extended. For example,
6650 suppose you are building a development package that is extended to
6651 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006652 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006653
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006654 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006655
6656 In the
6657 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006658 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006659 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006660
6661 BitBake, which the OpenEmbedded build system uses, supports
6662 specifying versioned recommends. Although the syntax varies depending
6663 on the packaging format, BitBake hides these differences from you.
6664 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006665 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006666
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006667 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006668
6669 For ``operator``, you can specify the following:
6670
6671 - =
6672 - <
6673 - >
6674 - <=
6675 - >=
6676
6677 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006678 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006679
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006680 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006681
Andrew Geisslerf0343792020-11-18 10:42:21 -06006682 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006683 A list of packages replaced by a package. The package manager uses
6684 this variable to determine which package should be installed to
6685 replace other package(s) during an upgrade. In order to also have the
6686 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05006687 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006688
6689 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05006690 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006691
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006692 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006693
6694 BitBake, which the OpenEmbedded build system uses, supports
6695 specifying versioned replacements. Although the syntax varies
6696 depending on the packaging format, BitBake hides these differences
6697 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006698 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006699
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006700 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006701
6702 For ``operator``, you can specify the following:
6703
6704 - =
6705 - <
6706 - >
6707 - <=
6708 - >=
6709
6710 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05006711 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006712
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006713 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006714
Andrew Geisslerf0343792020-11-18 10:42:21 -06006715 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006716 A list of additional packages that you can suggest for installation
6717 by the package manager at the time a package is installed. Not all
6718 package managers support this functionality.
6719
6720 As with all package-controlling variables, you must always use this
6721 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006722 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006723
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006724 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006725
Andrew Geisslerf0343792020-11-18 10:42:21 -06006726 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006727 The location in the :term:`Build Directory` where
6728 unpacked recipe source code resides. By default, this directory is
6729 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6730 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6731 version. If the source tarball extracts the code to a directory named
6732 anything other than ``${BPN}-${PV}``, or if the source code is
6733 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05006734 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006735 to find the unpacked source.
6736
6737 As an example, assume a :term:`Source Directory`
6738 top-level folder named ``poky`` and a default Build Directory at
6739 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05006740 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006741
6742 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6743
6744 The unpacked source code resides in the ``db-5.1.19`` folder.
6745
6746 This next example assumes a Git repository. By default, Git
6747 repositories are cloned to ``${WORKDIR}/git`` during
6748 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05006749 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006750 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006751
Andrew Geissler9aee5002022-03-30 16:27:02 +00006752 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006753 S = "${WORKDIR}/git"
6754
Andrew Geisslerf0343792020-11-18 10:42:21 -06006755 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006756 Specifies a list of command-line utilities that should be checked for
6757 during the initial sanity checking process when running BitBake. If
6758 any of the utilities are not installed on the build host, then
6759 BitBake immediately exits with an error.
6760
Andrew Geisslerf0343792020-11-18 10:42:21 -06006761 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006762 A list of the host distribution identifiers that the build system has
6763 been tested against. Identifiers consist of the host distributor ID
6764 followed by the release, as reported by the ``lsb_release`` tool or
6765 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05006766 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006767 not empty and the current value of
6768 :term:`NATIVELSBSTRING` does not appear in the
6769 list, then the build system reports a warning that indicates the
6770 current host distribution has not been tested as a build host.
6771
Andrew Geisslerf0343792020-11-18 10:42:21 -06006772 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006773 The target architecture for the SDK. Typically, you do not directly
6774 set this variable. Instead, use :term:`SDKMACHINE`.
6775
Patrick Williams975a06f2022-10-21 14:42:47 -05006776 :term:`SDK_BUILDINFO_FILE`
6777 When using the :ref:`image-buildinfo <ref-classes-image-buildinfo>` class,
6778 specifies the file in the SDK to write the build information into. The
6779 default value is "``/buildinfo``".
6780
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006781 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05006782 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Andrew Geissler87f5cff2022-09-30 13:13:31 -05006783 "1" and a ``conf/templateconf.cfg`` file exists in the build directory
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006784 (:term:`TOPDIR`) then this will be copied into the SDK.
6785
Andrew Geisslerf0343792020-11-18 10:42:21 -06006786 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006787 The directory set up and used by the
6788 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6789 the SDK is deployed. The ``populate_sdk_base`` class defines
Andrew Geissler09036742021-06-25 14:25:14 -05006790 :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006791
6792 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6793
Andrew Geisslerf0343792020-11-18 10:42:21 -06006794 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006795 The parent directory used by the OpenEmbedded build system when
6796 creating SDK output. The
6797 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05006798 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006799
6800 SDK_DIR = "${WORKDIR}/sdk"
6801
6802 .. note::
6803
Andrew Geissler09036742021-06-25 14:25:14 -05006804 The :term:`SDK_DIR` directory is a temporary directory as it is part of
6805 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006806
Andrew Geisslerf0343792020-11-18 10:42:21 -06006807 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006808 Controls whether or not shared state artifacts are copied into the
6809 extensible SDK. The default value of "full" copies all of the
6810 required shared state artifacts into the extensible SDK. The value
6811 "minimal" leaves these artifacts out of the SDK.
6812
6813 .. note::
6814
6815 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006816 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6817 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006818
Andrew Geisslerf0343792020-11-18 10:42:21 -06006819 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006820 The manifest file for the host part of the SDK. This file lists all
6821 the installed packages that make up the host part of the SDK. The
6822 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006823 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006824
6825 packagename packagearch version
6826
6827 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006828 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006829
6830 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6831
6832 The location is derived using the :term:`SDK_DEPLOY` and
6833 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6834
Andrew Geisslerf0343792020-11-18 10:42:21 -06006835 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006836 When set to "1", specifies to include the packagedata for all recipes
6837 in the "world" target in the extensible SDK. Including this data
6838 allows the ``devtool search`` command to find these recipes in search
6839 results, as well as allows the ``devtool add`` command to map
6840 dependencies more effectively.
6841
6842 .. note::
6843
Andrew Geissler09036742021-06-25 14:25:14 -05006844 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006845 variable significantly increases build time because all of world
6846 needs to be built. Enabling the variable also slightly increases
6847 the size of the extensible SDK.
6848
Andrew Geisslerf0343792020-11-18 10:42:21 -06006849 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006850 When set to "1", specifies to include the toolchain in the extensible
6851 SDK. Including the toolchain is useful particularly when
6852 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6853 the SDK reasonably small but you still want to provide a usable
6854 toolchain. For example, suppose you want to use the toolchain from an
6855 IDE or from other tools and you do not want to perform additional
6856 steps to install the toolchain.
6857
Andrew Geissler09036742021-06-25 14:25:14 -05006858 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6859 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6860 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006861
Andrew Geisslerf0343792020-11-18 10:42:21 -06006862 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006863 The base name for SDK output files. The name is derived from the
6864 :term:`DISTRO`, :term:`TCLIBC`,
6865 :term:`SDK_ARCH`,
6866 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05006867 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006868
6869 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6870
Andrew Geisslerf0343792020-11-18 10:42:21 -06006871 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006872 Specifies the operating system for which the SDK will be built. The
6873 default value is the value of :term:`BUILD_OS`.
6874
Andrew Geisslerf0343792020-11-18 10:42:21 -06006875 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006876 The location used by the OpenEmbedded build system when creating SDK
6877 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05006878 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006879
6880 SDK_DIR = "${WORKDIR}/sdk"
6881 SDK_OUTPUT = "${SDK_DIR}/image"
6882 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6883
6884 .. note::
6885
Andrew Geissler09036742021-06-25 14:25:14 -05006886 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006887 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6888 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006889
Andrew Geisslerf0343792020-11-18 10:42:21 -06006890 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006891 Specifies a list of architectures compatible with the SDK machine.
6892 This variable is set automatically and should not normally be
6893 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05006894 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006895 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6896
Andrew Geisslerf0343792020-11-18 10:42:21 -06006897 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006898 Specifies a list of functions to call once the OpenEmbedded build
6899 system creates the SDK. You can specify functions separated by
6900 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6901
6902 If you need to pass an SDK path to a command within a function, you
6903 can use ``${SDK_DIR}``, which points to the parent directory used by
6904 the OpenEmbedded build system when creating SDK output. See the
6905 :term:`SDK_DIR` variable for more information.
6906
Andrew Geisslerf0343792020-11-18 10:42:21 -06006907 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006908 The toolchain binary prefix used for ``nativesdk`` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05006909 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006910 :term:`TARGET_PREFIX` when building
6911 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6912
Andrew Geisslerf0343792020-11-18 10:42:21 -06006913 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006914 A list of shared state tasks added to the extensible SDK. By default,
6915 the following tasks are added:
6916
Patrick Williams2194f502022-10-16 14:26:09 -05006917 - :ref:`ref-tasks-populate_lic`
6918 - :ref:`ref-tasks-package_qa`
6919 - :ref:`ref-tasks-populate_sysroot`
6920 - :ref:`ref-tasks-deploy`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006921
6922 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05006923 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006924 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05006925 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006926 tasks that are needed in order to build
6927 :term:`SDK_TARGETS`).
6928
Andrew Geisslerf0343792020-11-18 10:42:21 -06006929 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006930 Specifies the system, including the architecture and the operating
6931 system, for which the SDK will be built.
6932
6933 The OpenEmbedded build system automatically sets this variable based
6934 on :term:`SDK_ARCH`,
6935 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05006936 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006937 variable yourself.
6938
Andrew Geisslerf0343792020-11-18 10:42:21 -06006939 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006940 The manifest file for the target part of the SDK. This file lists all
6941 the installed packages that make up the target part of the SDK. The
6942 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006943 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006944
6945 packagename packagearch version
6946
6947 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006948 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006949
6950 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6951
6952 The location is derived using the :term:`SDK_DEPLOY` and
6953 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6954
Andrew Geisslerf0343792020-11-18 10:42:21 -06006955 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006956 A list of targets to install from shared state as part of the
6957 standard or extensible SDK installation. The default value is "${PN}"
6958 (i.e. the image from which the SDK is built).
6959
Andrew Geissler09036742021-06-25 14:25:14 -05006960 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006961 would not be changed.
6962
Andrew Geisslerf0343792020-11-18 10:42:21 -06006963 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006964 The title to be printed when running the SDK installer. By default,
6965 this title is based on the :term:`DISTRO_NAME` or
6966 :term:`DISTRO` variable and is set in the
6967 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006968 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006969
6970 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6971
6972 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006973 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006974
6975 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006976 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006977 section in the Yocto Project Application Development and the
6978 Extensible Software Development Kit (eSDK) manual.
6979
Patrick Williams975a06f2022-10-21 14:42:47 -05006980 :term:`SDK_TOOLCHAIN_LANGS`
6981 Specifies programming languages to support in the SDK, as a
6982 space-separated list. Currently supported items are ``rust`` and ``go``.
6983
Andrew Geisslerf0343792020-11-18 10:42:21 -06006984 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006985 An optional URL for an update server for the extensible SDK. If set,
6986 the value is used as the default update server when running
6987 ``devtool sdk-update`` within the extensible SDK.
6988
Andrew Geisslerf0343792020-11-18 10:42:21 -06006989 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006990 Specifies the name of the SDK vendor.
6991
Andrew Geisslerf0343792020-11-18 10:42:21 -06006992 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006993 Specifies the version of the SDK. The Poky distribution configuration file
6994 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05006995 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006996
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006997 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006998
6999 For additional information, see the
7000 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007001 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007002
Andrew Geisslerf0343792020-11-18 10:42:21 -06007003 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007004 The default installation directory for the Extensible SDK. By
7005 default, this directory is based on the :term:`DISTRO`
7006 variable and is set in the
7007 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007008 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007009
7010 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
7011
7012 For the
Andrew Geissler09036742021-06-25 14:25:14 -05007013 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007014
7015 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007016 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007017 section in the Yocto Project Application Development and the
7018 Extensible Software Development Kit (eSDK) manual.
7019
Andrew Geisslerf0343792020-11-18 10:42:21 -06007020 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05007021 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007022 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007023
7024 $ bitbake -c populate_sdk imagename
7025
Andrew Geisslerf0343792020-11-18 10:42:21 -06007026 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00007027 The machine for which the SDK is built. In other words, the SDK is built
7028 such that it runs on the target you specify with the :term:`SDKMACHINE`
7029 value. The value points to a corresponding ``.conf`` file under
7030 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
7031 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
7032 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007033
Andrew Geissler595f6302022-01-24 19:11:47 +00007034 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
7035 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007036
7037 .. note::
7038
Andrew Geissler09036742021-06-25 14:25:14 -05007039 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007040 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00007041 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007042
Andrew Geisslerf0343792020-11-18 10:42:21 -06007043 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007044 Defines the path offered to the user for installation of the SDK that
7045 is generated by the OpenEmbedded build system. The path appears as
7046 the default location for installing the SDK when you run the SDK's
7047 installation script. You can override the offered path when you run
7048 the script.
7049
Andrew Geisslerf0343792020-11-18 10:42:21 -06007050 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007051 The full path to the sysroot used for cross-compilation within an SDK
7052 as it will be when installed into the default
7053 :term:`SDKPATH`.
7054
Andrew Geisslerf0343792020-11-18 10:42:21 -06007055 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007056 The section in which packages should be categorized. Package
7057 management utilities can make use of this variable.
7058
Andrew Geisslerf0343792020-11-18 10:42:21 -06007059 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007060 Specifies the optimization flags passed to the C compiler when
7061 building for the target. The flags are passed through the default
7062 value of the :term:`TARGET_CFLAGS` variable.
7063
Andrew Geissler09036742021-06-25 14:25:14 -05007064 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007065 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
7066 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007067
Andrew Geisslerf0343792020-11-18 10:42:21 -06007068 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007069 Defines a serial console (TTY) to enable using
7070 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
7071 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05007072 separated by a space. You cannot specify more than one TTY device::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007073
7074 SERIAL_CONSOLE = "115200 ttyS0"
7075
7076 .. note::
7077
Andrew Geissler09036742021-06-25 14:25:14 -05007078 The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007079 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007080
Andrew Geisslerf0343792020-11-18 10:42:21 -06007081 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007082 Defines a serial console (TTY) to enable using
7083 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
7084 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05007085 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007086
7087 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
7088
Andrew Geisslerf0343792020-11-18 10:42:21 -06007089 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007090 Specifies serial consoles, which must be listed in
7091 :term:`SERIAL_CONSOLES`, to check against
7092 ``/proc/console`` before enabling them using getty. This variable
7093 allows aliasing in the format: <device>:<alias>. If a device was
7094 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05007095 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007096
7097 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
7098
7099 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05007100 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
7101 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
7102 incompatible with customizations such as the following::
7103
7104 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007105
Andrew Geissler595f6302022-01-24 19:11:47 +00007106 :term:`SETUPTOOLS_BUILD_ARGS`
7107 When used by recipes that inherit the
7108 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
7109 be used to specify additional arguments to be passed to ``setup.py build``
7110 in the ``setuptools3_do_compile()`` task.
7111
7112 :term:`SETUPTOOLS_INSTALL_ARGS`
7113 When used by recipes that inherit the
7114 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
7115 be used to specify additional arguments to be passed to ``setup.py install``
7116 in the ``setuptools3_do_install()`` task.
7117
7118 :term:`SETUPTOOLS_SETUP_PATH`
7119 When used by recipes that inherit the
7120 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
7121 be used to specify the directory in which the ``setup.py`` file is
7122 located if it is not at the root of the source tree (as specified by
7123 :term:`S`). For example, in a recipe where the sources are fetched from
7124 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
7125 subdirectory, you would have this::
7126
7127 S = "${WORKDIR}/git"
7128 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
7129
Andrew Geisslerf0343792020-11-18 10:42:21 -06007130 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007131 A list of recipe dependencies that should not be used to determine
7132 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007133 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007134
7135 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
7136
7137 In the previous example, ``intone`` depends on ``mplayer2``.
7138
7139 You can use the special token ``"*"`` on the left-hand side of the
7140 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05007141 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007142
7143 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
7144
7145 In the previous example, all recipes except ``quilt-native`` ignore
7146 task signatures from the ``quilt-native`` recipe when determining
7147 their task signatures.
7148
7149 Use of this variable is one mechanism to remove dependencies that
7150 affect task signatures and thus force rebuilds when a recipe changes.
7151
7152 .. note::
7153
7154 If you add an inappropriate dependency for a recipe relationship,
7155 the software might break during runtime if the interface of the
7156 second recipe was changed after the first recipe had been built.
7157
Andrew Geisslerf0343792020-11-18 10:42:21 -06007158 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007159 A list of recipes that are completely stable and will never change.
7160 The ABI for the recipes in the list are presented by output from the
7161 tasks run to build the recipe. Use of this variable is one way to
7162 remove dependencies from one recipe on another that affect task
7163 signatures and thus force rebuilds when the recipe changes.
7164
7165 .. note::
7166
7167 If you add an inappropriate variable to this list, the software
7168 might break at runtime if the interface of the recipe was changed
7169 after the other had been built.
7170
Andrew Geisslerf0343792020-11-18 10:42:21 -06007171 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007172 Specifies the number of bits for the target system CPU. The value
7173 should be either "32" or "64".
7174
Andrew Geisslerf0343792020-11-18 10:42:21 -06007175 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007176 Specifies the endian byte order of the target system. The value
7177 should be either "le" for little-endian or "be" for big-endian.
7178
Andrew Geisslerf0343792020-11-18 10:42:21 -06007179 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007180 Enables removal of all files from the "Provides" section of an RPM
7181 package. Removal of these files is required for packages containing
7182 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
7183
7184 To enable file removal, set the variable to "1" in your
7185 ``conf/local.conf`` configuration file in your:
7186 :term:`Build Directory`.
7187 ::
7188
7189 SKIP_FILEDEPS = "1"
7190
Andrew Geissler9aee5002022-03-30 16:27:02 +00007191 :term:`SKIP_RECIPE`
7192 Used to prevent the OpenEmbedded build system from building a given
7193 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
7194 and provide a reason, which will be reported when attempting to
7195 build the recipe.
7196
7197 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
7198 variable in your ``local.conf`` file or distribution configuration.
7199 Here is an example which prevents ``myrecipe`` from being built::
7200
7201 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
7202
Andrew Geisslerf0343792020-11-18 10:42:21 -06007203 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007204 Groups together machines based upon the same family of SOC (System On
7205 Chip). You typically set this variable in a common ``.inc`` file that
7206 you include in the configuration files of all the machines.
7207
7208 .. note::
7209
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007210 You must include ``conf/machine/include/soc-family.inc`` for this
7211 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007212
Andrew Geisslerf0343792020-11-18 10:42:21 -06007213 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007214 Defines the suffix for shared libraries used on the target platform.
7215 By default, this suffix is ".so.*" for all Linux-based systems and is
7216 defined in the ``meta/conf/bitbake.conf`` configuration file.
7217
7218 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007219 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007220
Andrew Geisslerf0343792020-11-18 10:42:21 -06007221 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007222 Defines the suffix for the development symbolic link (symlink) for
7223 shared libraries on the target platform. By default, this suffix is
7224 ".so" for Linux-based systems and is defined in the
7225 ``meta/conf/bitbake.conf`` configuration file.
7226
7227 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007228 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007229
Andrew Geisslereff27472021-10-29 15:35:00 -05007230 :term:`SOURCE_DATE_EPOCH`
7231 This defines a date expressed in number of seconds since
7232 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
7233 multiple build systems to force a timestamp in built binaries.
7234 Many upstream projects already support this variable.
7235
7236 You will find more details in the `official specifications
7237 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
7238
7239 A value for each recipe is computed from the sources by
7240 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
7241
7242 If a recipe wishes to override the default behavior, it should set its
7243 own :term:`SOURCE_DATE_EPOCH` value::
7244
7245 SOURCE_DATE_EPOCH = "1613559011"
7246
Andrew Geisslerf0343792020-11-18 10:42:21 -06007247 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007248 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05007249 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007250 your ``local.conf`` configuration file ensures the source for all
7251 recipes are fetched regardless of whether or not a recipe is
7252 compatible with the configuration. A recipe is considered
7253 incompatible with the currently configured machine when either or
7254 both the :term:`COMPATIBLE_MACHINE`
7255 variable and :term:`COMPATIBLE_HOST` variables
7256 specify compatibility with a machine other than that of the current
7257 machine or host.
7258
7259 .. note::
7260
Andrew Geissler09036742021-06-25 14:25:14 -05007261 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007262 variable unless you are creating a source mirror. In other words,
7263 do not set the variable during a normal build.
7264
Andrew Geisslerf0343792020-11-18 10:42:21 -06007265 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007266 Defines your own :term:`PREMIRRORS` from which to
7267 first fetch source before attempting to fetch from the upstream
7268 specified in :term:`SRC_URI`.
7269
7270 To use this variable, you must globally inherit the
7271 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007272 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007273
7274 INHERIT += "own-mirrors"
7275 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7276
7277 .. note::
7278
Andrew Geissler09036742021-06-25 14:25:14 -05007279 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007280
Andrew Geisslerf0343792020-11-18 10:42:21 -06007281 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007282 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007283 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007284 mappings, see the ``meta/conf/licenses.conf`` file.
7285
7286 For additional information, see the :term:`LICENSE`
7287 variable.
7288
Andrew Geisslerf0343792020-11-18 10:42:21 -06007289 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007290 A list of prefixes for :term:`PN` used by the OpenEmbedded
7291 build system to create variants of recipes or packages. The list
7292 specifies the prefixes to strip off during certain circumstances such
7293 as the generation of the :term:`BPN` variable.
7294
Andrew Geisslerf0343792020-11-18 10:42:21 -06007295 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007296 The file type for the Secondary Program Loader (SPL). Some devices
7297 use an SPL from which to boot (e.g. the BeagleBone development
7298 board). For such cases, you can declare the file type of the SPL
7299 binary in the ``u-boot.inc`` include file, which is used in the
7300 U-Boot recipe.
7301
7302 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007303 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007304
7305 # Some versions of u-boot build an SPL (Second Program Loader) image that
7306 # should be packaged along with the u-boot binary as well as placed in the
7307 # deploy directory. For those versions they can set the following variables
7308 # to allow packaging the SPL.
7309 SPL_BINARY ?= ""
7310 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7311 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7312 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7313
Andrew Geissler09036742021-06-25 14:25:14 -05007314 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007315 various ``SPL_*`` variables used by the OpenEmbedded build system.
7316
7317 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007318 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007319 section in the Yocto Project Board Support Package Developer's Guide
7320 for additional information.
7321
Andrew Geisslerf0343792020-11-18 10:42:21 -06007322 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007323
Andrew Geissler595f6302022-01-24 19:11:47 +00007324 See the BitBake manual for the initial description for this variable:
7325 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007326
Andrew Geissler595f6302022-01-24 19:11:47 +00007327 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007328
Andrew Geissler595f6302022-01-24 19:11:47 +00007329 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007330
Andrew Geissler615f2f12022-07-15 14:00:58 -05007331 - ``apply`` --- whether to apply the patch or not. The default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007332 action is to apply the patch.
7333
Andrew Geissler615f2f12022-07-15 14:00:58 -05007334 - ``striplevel`` --- which striplevel to use when applying the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007335 patch. The default level is 1.
7336
Andrew Geissler615f2f12022-07-15 14:00:58 -05007337 - ``patchdir`` --- specifies the directory in which the patch should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007338 be applied. The default is ``${``\ :term:`S`\ ``}``.
7339
7340 Here are options specific to recipes building code from a revision
7341 control system:
7342
Andrew Geissler615f2f12022-07-15 14:00:58 -05007343 - ``mindate`` --- apply the patch only if
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007344 :term:`SRCDATE` is equal to or greater than
7345 ``mindate``.
7346
Andrew Geissler615f2f12022-07-15 14:00:58 -05007347 - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007348 than ``maxdate``.
7349
Andrew Geissler615f2f12022-07-15 14:00:58 -05007350 - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007351 greater than ``minrev``.
7352
Andrew Geissler615f2f12022-07-15 14:00:58 -05007353 - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007354 than ``maxrev``.
7355
Andrew Geissler615f2f12022-07-15 14:00:58 -05007356 - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007357 ``rev``.
7358
Andrew Geissler615f2f12022-07-15 14:00:58 -05007359 - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007360 ``rev``.
7361
Andrew Geissler595f6302022-01-24 19:11:47 +00007362 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007363
Andrew Geissler595f6302022-01-24 19:11:47 +00007364 If you want the build system to pick up files specified through
7365 a :term:`SRC_URI` statement from your append file, you need to be
7366 sure to extend the :term:`FILESPATH` variable by also using the
7367 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007368
Andrew Geisslerf0343792020-11-18 10:42:21 -06007369 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007370 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007371 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007372 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007373 variable to "0" disables this behavior.
7374
Andrew Geisslerf0343792020-11-18 10:42:21 -06007375 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007376 The date of the source code used to build the package. This variable
7377 applies only if the source was fetched from a Source Code Manager
7378 (SCM).
7379
Andrew Geisslerf0343792020-11-18 10:42:21 -06007380 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007381 Returns the version string of the current package. This string is
7382 used to help define the value of :term:`PV`.
7383
Andrew Geissler09036742021-06-25 14:25:14 -05007384 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007385 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007386 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007387
7388 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7389
Andrew Geissler09036742021-06-25 14:25:14 -05007390 Recipes that need to define :term:`PV` do so with the help of the
7391 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007392 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007393 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007394
7395 PV = "0.12-git${SRCPV}"
7396
Andrew Geisslerf0343792020-11-18 10:42:21 -06007397 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007398 The revision of the source code used to build the package. This
7399 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7400 that if you want to build a fixed revision and you want to avoid
7401 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007402 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007403 identifier and not just a tag.
7404
7405 .. note::
7406
7407 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007408 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007409 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007410 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007411 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007412
Andrew Geissler09036742021-06-25 14:25:14 -05007413 :term:`SRCTREECOVEREDTASKS`
7414 A list of tasks that are typically not relevant (and therefore skipped)
7415 when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7416 class. The default value as set in that class file is the set of tasks
7417 that are rarely needed when using external source::
7418
7419 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7420
7421 The notable exception is when processing external kernel source as
7422 defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7423 class file (formatted for aesthetics)::
7424
7425 SRCTREECOVEREDTASKS += "\
7426 do_validate_branches \
7427 do_kernel_configcheck \
7428 do_kernel_checkout \
7429 do_fetch \
7430 do_unpack \
7431 do_patch \
7432 "
7433
7434 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7435 variables for more information.
7436
Andrew Geisslerf0343792020-11-18 10:42:21 -06007437 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007438 The directory for the shared state cache.
7439
Andrew Geissler615f2f12022-07-15 14:00:58 -05007440 :term:`SSTATE_EXCLUDEDEPS_SYSROOT`
7441 This variable allows to specify indirect dependencies to exclude
7442 from sysroots, for example to avoid the situations when a dependency on
7443 any ``-native`` recipe will pull in all dependencies of that recipe
7444 in the recipe sysroot. This behaviour might not always be wanted,
7445 for example when that ``-native`` recipe depends on build tools
7446 that are not relevant for the current recipe.
7447
7448 This way, irrelevant dependencies are ignored, which could have
7449 prevented the reuse of prebuilt artifacts stored in the Shared
7450 State Cache.
7451
7452 ``SSTATE_EXCLUDEDEPS_SYSROOT`` is evaluated as two regular
7453 expressions of recipe and dependency to ignore. An example
7454 is the rule in :oe_git:`meta/conf/layer.conf </meta/conf/layer.conf>`::
7455
7456 # Nothing needs to depend on libc-initial
7457 # base-passwd/shadow-sysroot don't need their dependencies
7458 SSTATE_EXCLUDEDEPS_SYSROOT += "\
7459 .*->.*-initial.* \
7460 .*(base-passwd|shadow-sysroot)->.* \
7461 "
7462
7463 The ``->`` substring represents the dependency between
7464 the two regular expressions.
7465
Andrew Geisslerf0343792020-11-18 10:42:21 -06007466 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007467 If set to "1", allows fetches from mirrors that are specified in
7468 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007469 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7470 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7471 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007472 your shared state cache, but you want to disable any other fetching
7473 from the network.
7474
Andrew Geisslerf0343792020-11-18 10:42:21 -06007475 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007476 Configures the OpenEmbedded build system to search other mirror
7477 locations for prebuilt cache data objects before building out the
7478 data. This variable works like fetcher :term:`MIRRORS`
7479 and :term:`PREMIRRORS` and points to the cache
7480 locations to check for the shared state (sstate) objects.
7481
7482 You can specify a filesystem directory or a remote URL such as HTTP
7483 or FTP. The locations you specify need to contain the shared state
7484 cache (sstate-cache) results from previous builds. The sstate-cache
7485 you point to can also be from builds on other machines.
7486
7487 When pointing to sstate build artifacts on another machine that uses
7488 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007489 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007490 paths to server paths. The paths need to take into account
7491 :term:`NATIVELSBSTRING` set by the
7492 :ref:`uninative <ref-classes-uninative>` class. For example, the
7493 following maps the local search path ``universal-4.9`` to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007494 server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007495
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007496 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007497
7498 If a mirror uses the same structure as
7499 :term:`SSTATE_DIR`, you need to add "PATH" at the
7500 end as shown in the examples below. The build system substitutes the
7501 correct path within the directory structure.
7502 ::
7503
7504 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007505 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007506 file://.* file:///some-local-dir/sstate/PATH"
7507
Andrew Geisslerf0343792020-11-18 10:42:21 -06007508 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007509 Controls the list of files the OpenEmbedded build system scans for
7510 hardcoded installation paths. The variable uses a space-separated
7511 list of filenames (not paths) with standard wildcard characters
7512 allowed.
7513
7514 During a build, the OpenEmbedded build system creates a shared state
7515 (sstate) object during the first stage of preparing the sysroots.
7516 That object is scanned for hardcoded paths for original installation
7517 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007518 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7519 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007520 than the variable being comprehensively set. The
7521 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7522 of files.
7523
7524 For details on the process, see the
7525 :ref:`staging <ref-classes-staging>` class.
7526
Andrew Geisslerf0343792020-11-18 10:42:21 -06007527 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007528 Specifies the path to the ``/lib`` subdirectory of the sysroot
7529 directory for the build host.
7530
Andrew Geisslerf0343792020-11-18 10:42:21 -06007531 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007532 Specifies the path to the ``/lib`` subdirectory of the sysroot
7533 directory for the target for which the current recipe is being built
7534 (:term:`STAGING_DIR_HOST`).
7535
Andrew Geisslerf0343792020-11-18 10:42:21 -06007536 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007537 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7538 directory for the target for which the current recipe is being built
7539 (:term:`STAGING_DIR_HOST`).
7540
Andrew Geisslerf0343792020-11-18 10:42:21 -06007541 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007542 Specifies the path to the directory containing binary configuration
7543 scripts. These scripts provide configuration information for other
7544 software that wants to make use of libraries or include files
7545 provided by the software associated with the script.
7546
7547 .. note::
7548
7549 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007550 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7551 library to which you are linking, it is recommended you use
7552 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007553
Andrew Geisslerf0343792020-11-18 10:42:21 -06007554 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007555 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7556 directory for the build host.
7557
Andrew Geisslerf0343792020-11-18 10:42:21 -06007558 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007559 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7560 directory for the target for which the current recipe is being built
7561 (:term:`STAGING_DIR_HOST`).
7562
Andrew Geisslerf0343792020-11-18 10:42:21 -06007563 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007564 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7565 directory for the build host.
7566
Andrew Geisslerf0343792020-11-18 10:42:21 -06007567 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007568 Helps construct the ``recipe-sysroots`` directory, which is used
7569 during packaging.
7570
7571 For information on how staging for recipe-specific sysroots occurs,
7572 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007573 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007574 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007575 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007576 section in the Yocto Project Overview and Concepts Manual, and the
7577 :term:`SYSROOT_DIRS` variable.
7578
7579 .. note::
7580
Andrew Geissler09036742021-06-25 14:25:14 -05007581 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007582 directory because the OpenEmbedded build system manages the
7583 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007584 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007585 task and then the OpenEmbedded build system will stage a subset of
7586 those files into the sysroot.
7587
Andrew Geisslerf0343792020-11-18 10:42:21 -06007588 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007589 Specifies the path to the sysroot directory for the system on which
7590 the component is built to run (the system that hosts the component).
7591 For most recipes, this sysroot is the one in which that recipe's
7592 :ref:`ref-tasks-populate_sysroot` task copies
7593 files. Exceptions include ``-native`` recipes, where the
Patrick Williams2194f502022-10-16 14:26:09 -05007594 :ref:`ref-tasks-populate_sysroot` task instead uses
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007595 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007596 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007597 have the following values:
7598
7599 - For recipes building for the target machine, the value is
7600 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7601
7602 - For native recipes building for the build host, the value is empty
7603 given the assumption that when building for the build host, the
7604 build host's own directories should be used.
7605
7606 .. note::
7607
7608 ``-native`` recipes are not installed into host paths like such
7609 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04007610 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007611 standard build environment variables such as
7612 :term:`CPPFLAGS` and
7613 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05007614 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007615 headers using, for example, GCC's ``-isystem`` option.
7616
7617 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7618 should be viewed as input variables by tasks such as
7619 :ref:`ref-tasks-configure`,
7620 :ref:`ref-tasks-compile`, and
7621 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05007622 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007623 for ``-native`` recipes, as they make use of host headers and
7624 libraries.
7625
Andrew Geisslerf0343792020-11-18 10:42:21 -06007626 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007627 Specifies the path to the sysroot directory used when building
7628 components that run on the build host itself.
7629
Andrew Geisslerf0343792020-11-18 10:42:21 -06007630 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007631 Specifies the path to the sysroot used for the system for which the
7632 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05007633 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007634 :term:`STAGING_DIR_HOST`.
7635
7636 Some recipes build binaries that can run on the target system but
7637 those binaries in turn generate code for another different system
7638 (e.g. cross-canadian recipes). Using terminology from GNU, the
7639 primary system is referred to as the "HOST" and the secondary, or
7640 different, system is referred to as the "TARGET". Thus, the binaries
7641 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05007642 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7643 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007644 sysroot used for the "TARGET" system.
7645
Andrew Geisslerf0343792020-11-18 10:42:21 -06007646 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007647 Specifies the path to the ``/etc`` subdirectory of the sysroot
7648 directory for the build host.
7649
Andrew Geisslerf0343792020-11-18 10:42:21 -06007650 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007651 Specifies the path to the ``/usr`` subdirectory of the sysroot
7652 directory for the target for which the current recipe is being built
7653 (:term:`STAGING_DIR_HOST`).
7654
Andrew Geisslerf0343792020-11-18 10:42:21 -06007655 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007656 Specifies the path to the ``/usr/include`` subdirectory of the
7657 sysroot directory for the target for which the current recipe being
7658 built (:term:`STAGING_DIR_HOST`).
7659
Andrew Geisslerf0343792020-11-18 10:42:21 -06007660 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007661 Specifies the path to the ``/usr/include`` subdirectory of the
7662 sysroot directory for the build host.
7663
Andrew Geisslerf0343792020-11-18 10:42:21 -06007664 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007665 Points to the directory containing the kernel build artifacts.
7666 Recipes building software that needs to access kernel build artifacts
7667 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05007668 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007669 after the kernel has been built.
7670
Andrew Geisslerf0343792020-11-18 10:42:21 -06007671 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007672 The directory with kernel headers that are required to build
7673 out-of-tree modules.
7674
Andrew Geisslerf0343792020-11-18 10:42:21 -06007675 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007676 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7677 directory for the target for which the current recipe is being built
7678 (:term:`STAGING_DIR_HOST`).
7679
Andrew Geisslerf0343792020-11-18 10:42:21 -06007680 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007681 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7682 directory for the build host.
7683
Andrew Geisslerf0343792020-11-18 10:42:21 -06007684 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007685 Specifies the base path used to create recipe stamp files. The path
7686 to an actual stamp file is constructed by evaluating this string and
7687 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05007688 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007689 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007690
7691 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7692
7693 For information on how BitBake uses stamp files to determine if a
7694 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007695 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007696 section in the Yocto Project Overview and Concepts Manual.
7697
7698 See :term:`STAMPS_DIR`,
7699 :term:`MULTIMACH_TARGET_SYS`,
7700 :term:`PN`, :term:`EXTENDPE`,
7701 :term:`PV`, and :term:`PR` for related variable
7702 information.
7703
Andrew Geisslerf0343792020-11-18 10:42:21 -06007704 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007705 Specifies the base directory in which the OpenEmbedded build system
7706 places stamps. The default directory is ``${TMPDIR}/stamps``.
7707
Andrew Geisslerf0343792020-11-18 10:42:21 -06007708 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007709 The minimal command and arguments to run ``strip``, which is used to
7710 strip symbols.
7711
Andrew Geisslerf0343792020-11-18 10:42:21 -06007712 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007713 The short (72 characters or less) summary of the binary package for
7714 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05007715 :term:`SUMMARY` is used to define the
7716 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007717 not set in the recipe.
7718
Andrew Geisslerf0343792020-11-18 10:42:21 -06007719 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007720 The directory in which files checked out of a Subversion system are
7721 stored.
7722
Andrew Geisslerf0343792020-11-18 10:42:21 -06007723 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007724 Specifies the kernel boot default console. If you want to use a
7725 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007726 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007727
7728 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7729
7730 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7731 this variable to null but then checks for a value later.
7732
Andrew Geisslerf0343792020-11-18 10:42:21 -06007733 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007734 Lists additional options to add to the syslinux file. You need to set
7735 this variable in your recipe. If you want to list multiple options,
7736 separate the options with a semicolon character (``;``).
7737
7738 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7739 to create a set of options.
7740
Andrew Geisslerf0343792020-11-18 10:42:21 -06007741 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007742 Specifies the alternate serial port or turns it off. To turn off
7743 serial, set this variable to an empty string in your recipe. The
7744 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007745 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007746
7747 SYSLINUX_SERIAL ?= "0 115200"
7748
7749 The class checks for and uses the variable as needed.
7750
Andrew Geisslerf0343792020-11-18 10:42:21 -06007751 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007752 Specifies the alternate console=tty... kernel boot argument. The
7753 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007754 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007755
7756 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7757
7758 The class checks for and uses the variable as needed.
7759
Andrew Geisslerf0343792020-11-18 10:42:21 -06007760 :term:`SYSLINUX_SPLASH`
7761 An ``.LSS`` file used as the background for the VGA boot menu when
7762 you use the boot menu. You need to set this variable in your recipe.
7763
7764 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7765 variable and if found, the OpenEmbedded build system installs the
7766 splash screen.
7767
7768 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007769 Points to the temporary directory under the work directory (default
7770 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7771 where the files populated into the sysroot are assembled during the
7772 :ref:`ref-tasks-populate_sysroot` task.
7773
Andrew Geisslerf0343792020-11-18 10:42:21 -06007774 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007775 Directories that are staged into the sysroot by the
7776 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05007777 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007778
7779 SYSROOT_DIRS = " \
7780 ${includedir} \
7781 ${libdir} \
7782 ${base_libdir} \
7783 ${nonarch_base_libdir} \
7784 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007785 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007786 "
7787
Andrew Geissler9aee5002022-03-30 16:27:02 +00007788 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007789 Directories that are not staged into the sysroot by the
7790 :ref:`ref-tasks-populate_sysroot` task. You
7791 can use this variable to exclude certain subdirectories of
7792 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007793 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007794
Andrew Geissler9aee5002022-03-30 16:27:02 +00007795 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007796 ${mandir} \
7797 ${docdir} \
7798 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007799 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007800 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05007801 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007802 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05007803 ${datadir}/gtk-doc/html \
7804 ${datadir}/installed-tests \
7805 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007806 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05007807 ${datadir}/terminfo \
7808 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007809 "
7810
Andrew Geisslerf0343792020-11-18 10:42:21 -06007811 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007812 Extra directories staged into the sysroot by the
7813 :ref:`ref-tasks-populate_sysroot` task for
7814 ``-native`` recipes, in addition to those specified in
7815 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05007816 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007817
7818 SYSROOT_DIRS_NATIVE = " \
7819 ${bindir} \
7820 ${sbindir} \
7821 ${base_bindir} \
7822 ${base_sbindir} \
7823 ${libexecdir} \
7824 ${sysconfdir} \
7825 ${localstatedir} \
7826 "
7827
7828 .. note::
7829
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007830 Programs built by ``-native`` recipes run directly from the sysroot
7831 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7832 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007833
Andrew Geisslerf0343792020-11-18 10:42:21 -06007834 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007835 A list of functions to execute after files are staged into the
7836 sysroot. These functions are usually used to apply additional
7837 processing on the staged files, or to stage additional files.
7838
Andrew Geisslerf0343792020-11-18 10:42:21 -06007839 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007840 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7841 this variable specifies whether the specified service in
7842 :term:`SYSTEMD_SERVICE` should start
7843 automatically or not. By default, the service is enabled to
7844 automatically start at boot time. The default setting is in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007845 :ref:`systemd <ref-classes-systemd>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007846
7847 SYSTEMD_AUTO_ENABLE ??= "enable"
7848
7849 You can disable the service by setting the variable to "disable".
7850
Andrew Geisslerf0343792020-11-18 10:42:21 -06007851 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007852 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007853 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007854 configuration file that should be used. By default, the
7855 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007856 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007857
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05007858 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007859
7860 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007861 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007862
Andrew Geisslerf0343792020-11-18 10:42:21 -06007863 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007864 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007865 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007866 list of entry files (``*.conf``) to install that contain one boot
7867 entry per file. By default, the
7868 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007869 :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007870
7871 SYSTEMD_BOOT_ENTRIES ?= ""
7872
7873 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007874 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007875
Andrew Geisslerf0343792020-11-18 10:42:21 -06007876 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007877 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007878 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007879 boot menu timeout in seconds. By default, the
7880 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007881 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007882
7883 SYSTEMD_BOOT_TIMEOUT ?= "10"
7884
7885 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007886 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007887
Andrew Geissler615f2f12022-07-15 14:00:58 -05007888 :term:`SYSTEMD_DEFAULT_TARGET`
7889
7890 This variable allows to set the default unit that systemd starts at bootup.
7891 Usually, this is either ``multi-user.target`` or ``graphical.target``.
7892 This works by creating a ``default.target`` symbolic link to the chosen systemd
7893 target file.
7894
7895 See `systemd's documentation
7896 <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__
7897 for details.
7898
7899 For example, this variable is used in the
7900 `core-image-minimal-xfce.bb
7901 <https://git.openembedded.org/meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>`__
7902 recipe::
7903
7904 SYSTEMD_DEFAULT_TARGET = "graphical.target"
7905
Andrew Geisslerf0343792020-11-18 10:42:21 -06007906 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007907 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7908 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05007909 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007910 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007911 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007912
7913 SYSTEMD_PACKAGES ?= "${PN}"
7914
7915 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05007916 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007917 the build system can find the systemd unit files.
7918
Andrew Geisslerf0343792020-11-18 10:42:21 -06007919 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007920 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7921 this variable specifies the systemd service name for a package.
7922
Andrew Geissler615f2f12022-07-15 14:00:58 -05007923 Multiple services can be specified, each one separated by a space.
7924
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007925 When you specify this file in your recipe, use a package name
7926 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007927 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007928
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007929 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007930
Andrew Geissler615f2f12022-07-15 14:00:58 -05007931 The package overrides that can be specified are directly related to the value of
7932 term:`SYSTEMD_PACKAGES`. Overrides not included in term:`SYSTEMD_PACKAGES`
7933 will be silently ignored.
7934
Andrew Geisslerf0343792020-11-18 10:42:21 -06007935 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007936 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007937 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007938 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007939 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007940 (allowing login), assuming :term:`USE_VT` is not set to
7941 "0".
7942
Andrew Geissler09036742021-06-25 14:25:14 -05007943 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007944 run a getty on the first virtual terminal).
7945
Andrew Geisslerf0343792020-11-18 10:42:21 -06007946 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007947 This variable points to a directory were BitBake places temporary
7948 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007949 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007950
7951 T = "${WORKDIR}/temp"
7952
7953 The :term:`WORKDIR` is the directory into which
7954 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7955 file sets this variable.
7956
Andrew Geissler09036742021-06-25 14:25:14 -05007957 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007958 :term:`TMPDIR` variable, which points to the root of
7959 the directory tree where BitBake places the output of an entire
7960 build.
7961
Andrew Geisslerf0343792020-11-18 10:42:21 -06007962 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007963 The target machine's architecture. The OpenEmbedded build system
7964 supports many architectures. Here is an example list of architectures
7965 supported. This list is by no means complete as the architecture is
7966 configurable:
7967
7968 - arm
7969 - i586
7970 - x86_64
7971 - powerpc
7972 - powerpc64
7973 - mips
7974 - mipsel
7975
7976 For additional information on machine architectures, see the
7977 :term:`TUNE_ARCH` variable.
7978
Andrew Geisslerf0343792020-11-18 10:42:21 -06007979 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007980 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007981 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007982 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007983 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007984
7985 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7986
Andrew Geisslerf0343792020-11-18 10:42:21 -06007987 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007988 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007989 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007990 :term:`TUNE_CCARGS` by default.
7991
7992 .. note::
7993
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007994 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05007995 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7996 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007997
Andrew Geisslerf0343792020-11-18 10:42:21 -06007998 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007999 This is a specific kernel compiler flag for a CPU or Application
8000 Binary Interface (ABI) tune. The flag is used rarely and only for
8001 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05008002 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008003 variable allows the kernel (and associated modules) to use a
8004 different configuration. See the
8005 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
8006 :term:`Source Directory` for an example.
8007
Andrew Geisslerf0343792020-11-18 10:42:21 -06008008 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008009 Specifies the flags to pass to the C compiler when building for the
8010 target. When building in the target context,
8011 :term:`CFLAGS` is set to the value of this variable by
8012 default.
8013
Andrew Geissler09036742021-06-25 14:25:14 -05008014 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
8015 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008016 executables built using the SDK also have the flags applied.
8017
Andrew Geisslerf0343792020-11-18 10:42:21 -06008018 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008019 Specifies the flags to pass to the C pre-processor (i.e. to both the
8020 C and the C++ compilers) when building for the target. When building
8021 in the target context, :term:`CPPFLAGS` is set to the
8022 value of this variable by default.
8023
8024 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008025 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008026 value so that executables built using the SDK also have the flags
8027 applied.
8028
Andrew Geisslerf0343792020-11-18 10:42:21 -06008029 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008030 Specifies the flags to pass to the C++ compiler when building for the
8031 target. When building in the target context,
8032 :term:`CXXFLAGS` is set to the value of this variable
8033 by default.
8034
8035 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008036 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008037 value so that executables built using the SDK also have the flags
8038 applied.
8039
Andrew Geisslerf0343792020-11-18 10:42:21 -06008040 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008041 Specifies the method for handling FPU code. For FPU-less targets,
8042 which include most ARM CPUs, the variable must be set to "soft". If
8043 not, the kernel emulation gets used, which results in a performance
8044 penalty.
8045
Andrew Geisslerf0343792020-11-18 10:42:21 -06008046 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008047 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05008048 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008049 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05008050 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008051
8052 TARGET_LD_ARCH = "${TUNE_LDARGS}"
8053
Andrew Geisslerf0343792020-11-18 10:42:21 -06008054 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008055 Specifies the flags to pass to the linker when building for the
8056 target. When building in the target context,
8057 :term:`LDFLAGS` is set to the value of this variable
8058 by default.
8059
8060 Additionally, the SDK's environment setup script sets the
8061 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05008062 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008063 have the flags applied.
8064
Andrew Geisslerf0343792020-11-18 10:42:21 -06008065 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008066 Specifies the target's operating system. The variable can be set to
8067 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008068 for musl libc. For ARM/EABI targets, the possible values are
8069 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008070
Andrew Geisslerf0343792020-11-18 10:42:21 -06008071 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008072 Specifies the prefix used for the toolchain binary target tools.
8073
8074 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04008075 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008076
8077 - For recipes building for the target machine, the value is
8078 "${:term:`TARGET_SYS`}-".
8079
8080 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04008081 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008082
8083 - For native SDK recipes (``nativesdk``), the build system sets the
Andrew Geissler09036742021-06-25 14:25:14 -05008084 variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008085
Andrew Geisslerf0343792020-11-18 10:42:21 -06008086 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008087 Specifies the system, including the architecture and the operating
8088 system, for which the build is occurring in the context of the
8089 current recipe.
8090
8091 The OpenEmbedded build system automatically sets this variable based
8092 on :term:`TARGET_ARCH`,
8093 :term:`TARGET_VENDOR`, and
8094 :term:`TARGET_OS` variables.
8095
8096 .. note::
8097
Andrew Geissler09036742021-06-25 14:25:14 -05008098 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008099
8100 Consider these two examples:
8101
8102 - Given a native recipe on a 32-bit, x86 machine running Linux, the
8103 value is "i686-linux".
8104
8105 - Given a recipe being built for a little-endian, MIPS target
8106 running Linux, the value might be "mipsel-linux".
8107
Andrew Geisslerf0343792020-11-18 10:42:21 -06008108 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008109 Specifies the name of the target vendor.
8110
Andrew Geisslerf0343792020-11-18 10:42:21 -06008111 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008112 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008113 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008114
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008115 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008116
Andrew Geisslerf0343792020-11-18 10:42:21 -06008117 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008118 Specifies a suffix to be appended onto the
8119 :term:`TMPDIR` value. The suffix identifies the
8120 ``libc`` variant for building. When you are building for multiple
8121 variants with the same :term:`Build Directory`, this
8122 mechanism ensures that output for different ``libc`` variants is kept
8123 separate to avoid potential conflicts.
8124
8125 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04008126 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008127 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05008128 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008129 in no suffix being applied.
8130
Andrew Geisslerf0343792020-11-18 10:42:21 -06008131 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05008132 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008133 characteristics of the generated packages and images by telling the
8134 OpenEmbedded build system which toolchain profile to use. By default,
8135 the OpenEmbedded build system builds its own internal toolchain. The
8136 variable's default value is "default", which uses that internal
8137 toolchain.
8138
8139 .. note::
8140
Andrew Geissler09036742021-06-25 14:25:14 -05008141 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008142 responsibility to ensure that the toolchain is compatible with the
8143 default toolchain. Using older or newer versions of these
8144 components might cause build problems. See the Release Notes for
8145 the Yocto Project release for the specific components with which
8146 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008147 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008148 page on the Yocto Project website and click on the "RELEASE
8149 INFORMATION" link for the appropriate release.
8150
Andrew Geissler09036742021-06-25 14:25:14 -05008151 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008152 which controls the variant of the GNU standard C library (``libc``)
8153 used during the build process: ``glibc`` or ``musl``.
8154
8155 With additional layers, it is possible to use a pre-compiled external
8156 toolchain. One example is the Sourcery G++ Toolchain. The support for
8157 this toolchain resides in the separate Mentor Graphics
8158 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008159 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008160
8161 The layer's ``README`` file contains information on how to use the
8162 Sourcery G++ Toolchain as an external toolchain. In summary, you must
8163 be sure to add the layer to your ``bblayers.conf`` file in front of
8164 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
8165 in your ``local.conf`` file to the location in which you installed
8166 the toolchain.
8167
8168 The fundamentals used for this example apply to any external
8169 toolchain. You can use ``meta-sourcery`` as a template for adding
8170 support for other external toolchains.
8171
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008172 :term:`TC_CXX_RUNTIME`
8173 Specifies the C/C++ STL and runtime variant to use during
8174 the build process. Default value is 'gnu'
8175
8176 You can select "gnu", "llvm", or "android".
8177
Andrew Geisslerd5838332022-05-27 11:33:10 -05008178 :term:`TEMPLATECONF`
8179 Specifies the directory used by the build system to find templates
8180 from which to build the ``bblayers.conf`` and ``local.conf`` files.
8181 Use this variable if you wish to customize such files, and the default
8182 BitBake targets shown when sourcing the ``oe-init-build-env`` script.
8183
8184 For details, see the
8185 :ref:`dev-manual/common-tasks:creating a custom template configuration directory`
8186 section in the Yocto Project Development Tasks manual.
8187
8188 .. note::
8189
8190 You must set this variable in the external environment in order
8191 for it to work.
8192
Andrew Geisslerf0343792020-11-18 10:42:21 -06008193 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008194 The location the OpenEmbedded build system uses to export tests when
8195 the :term:`TEST_EXPORT_ONLY` variable is set
8196 to "1".
8197
Andrew Geissler09036742021-06-25 14:25:14 -05008198 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008199 ``"${TMPDIR}/testimage/${PN}"``.
8200
Andrew Geisslerf0343792020-11-18 10:42:21 -06008201 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008202 Specifies to export the tests only. Set this variable to "1" if you
8203 do not want to run the tests but you want them to be exported in a
8204 manner that you to run them outside of the build system.
8205
Andrew Geisslerf0343792020-11-18 10:42:21 -06008206 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008207 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05008208 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008209
8210 .. note::
8211
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008212 Actual test results reside in the task log (``log.do_testimage``),
8213 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008214
Andrew Geisslerf0343792020-11-18 10:42:21 -06008215 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008216 For automated hardware testing, specifies the command to use to
8217 control the power of the target machine under test. Typically, this
8218 command would point to a script that performs the appropriate action
8219 (e.g. interacting with a web-enabled power strip). The specified
8220 command should expect to receive as the last argument "off", "on" or
8221 "cycle" specifying to power off, on, or cycle (power off and then
8222 power on) the device, respectively.
8223
Andrew Geisslerf0343792020-11-18 10:42:21 -06008224 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008225 For automated hardware testing, specifies additional arguments to
8226 pass through to the command specified in
8227 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008228 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008229 wish, for example, to separate the machine-specific and
8230 non-machine-specific parts of the arguments.
8231
Andrew Geisslerf0343792020-11-18 10:42:21 -06008232 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008233 The time in seconds allowed for an image to boot before automated
8234 runtime tests begin to run against an image. The default timeout
8235 period to allow the boot process to reach the login prompt is 500
8236 seconds. You can specify a different value in the ``local.conf``
8237 file.
8238
8239 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008240 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008241 section in the Yocto Project Development Tasks Manual.
8242
Andrew Geisslerf0343792020-11-18 10:42:21 -06008243 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008244 For automated hardware testing, specifies the command to use to
8245 connect to the serial console of the target machine under test. This
8246 command simply needs to connect to the serial console and forward
8247 that connection to standard input and output as any normal terminal
8248 program does.
8249
8250 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05008251 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008252
8253 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8254
Andrew Geisslerf0343792020-11-18 10:42:21 -06008255 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008256 For automated hardware testing, specifies additional arguments to
8257 pass through to the command specified in
8258 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008259 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008260 wish, for example, to separate the machine-specific and
8261 non-machine-specific parts of the command.
8262
Andrew Geisslerf0343792020-11-18 10:42:21 -06008263 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008264 The IP address of the build machine (host machine). This IP address
8265 is usually automatically detected. However, if detection fails, this
8266 variable needs to be set to the IP address of the build machine (i.e.
8267 where the build is taking place).
8268
8269 .. note::
8270
Andrew Geissler09036742021-06-25 14:25:14 -05008271 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008272 tests such as the "dnf" test suite, which needs to download packages
8273 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008274
Andrew Geisslerf0343792020-11-18 10:42:21 -06008275 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008276 An ordered list of tests (modules) to run against an image when
8277 performing automated runtime testing.
8278
8279 The OpenEmbedded build system provides a core set of tests that can
8280 be used against images.
8281
8282 .. note::
8283
8284 Currently, there is only support for running these tests under
8285 QEMU.
8286
8287 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05008288 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008289 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008290
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008291 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008292
8293 Alternatively, you can
8294 provide the "auto" option to have all applicable tests run against
8295 the image.
8296 ::
8297
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008298 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008299
8300 Using this option causes the
8301 build system to automatically run tests that are applicable to the
8302 image. Tests that are not applicable are skipped.
8303
8304 The order in which tests are run is important. Tests that depend on
8305 another test must appear later in the list than the test on which
8306 they depend. For example, if you append the list of tests with two
8307 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05008308 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008309
8310 TEST_SUITES = "test_A test_B"
8311
8312 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008313 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008314 section in the Yocto Project Development Tasks Manual.
8315
Andrew Geisslerf0343792020-11-18 10:42:21 -06008316 :term:`TEST_TARGET`
8317 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008318 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008319
8320 TEST_TARGET = "qemu"
8321
8322 A target controller is a class that defines how an image gets
8323 deployed on a target and how a target is started. A layer can extend
8324 the controllers by adding a module in the layer's
8325 ``/lib/oeqa/controllers`` directory and by inheriting the
8326 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05008327 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008328
Andrew Geissler5f350902021-07-23 13:09:54 -04008329 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06008330
8331 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008332 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06008333 in the Yocto Project Development Tasks Manual for more
8334 information.
8335
8336 - *"simpleremote":* Runs the tests on target hardware that is
8337 already up and running. The hardware can be on the network or it
8338 can be a device running an image on QEMU. You must also set
8339 :term:`TEST_TARGET_IP` when you use
8340 "simpleremote".
8341
8342 .. note::
8343
8344 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008345 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008346
8347 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008348 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008349 section in the Yocto Project Development Tasks Manual.
8350
8351 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05008352 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06008353 variable has no effect when :term:`TEST_TARGET` is
8354 set to "qemu".
8355
8356 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008357 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008358
8359 TEST_TARGET_IP = "192.168.1.4:2201"
8360
8361 Specifying a port is
8362 useful when SSH is started on a non-standard port or in cases when
8363 your hardware under test is behind a firewall or network that is not
8364 directly accessible from your host and you need to do port address
8365 translation.
8366
8367 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008368 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008369 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008370 any image that successfully builds to automatically boot under QEMU.
8371 Using the variable also adds in dependencies so that any SDK for
8372 which testing is requested is automatically built first.
8373
8374 These tests are written in Python making use of the ``unittest``
8375 module, and the majority of them run commands on the target system
8376 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8377 file in the :term:`Build Directory` to have the
8378 OpenEmbedded build system automatically run these tests after an
8379 image successfully builds:
8380
8381 TESTIMAGE_AUTO = "1"
8382
8383 For more information
8384 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008385 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008386 section in the Yocto Project Development Tasks Manual and the
Patrick Williams975a06f2022-10-21 14:42:47 -05008387 ":ref:`ref-classes-testimage`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008388
Andrew Geisslerf0343792020-11-18 10:42:21 -06008389 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008390 The directory in which the file BitBake is currently parsing is
8391 located. Do not manually set this variable.
8392
Andrew Geisslerf0343792020-11-18 10:42:21 -06008393 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008394 The time the build was started. Times appear using the hour, minute,
8395 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8396 seconds past 1400 hours).
8397
Andrew Geisslerf0343792020-11-18 10:42:21 -06008398 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008399 This variable is the base directory the OpenEmbedded build system
8400 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008401 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008402 ``tmp`` within the :term:`Build Directory`.
8403
8404 If you want to establish this directory in a location other than the
8405 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008406 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008407
8408 #TMPDIR = "${TOPDIR}/tmp"
8409
Andrew Geissler09036742021-06-25 14:25:14 -05008410 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008411 which does not use NFS, while having the Build Directory use NFS.
8412
Andrew Geissler09036742021-06-25 14:25:14 -05008413 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008414 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8415 persistent inodes). Due to various issues with NFS and bugs in some
8416 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008417 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008418
Andrew Geisslerf0343792020-11-18 10:42:21 -06008419 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008420 This variable lists packages the OpenEmbedded build system uses when
8421 building an SDK, which contains a cross-development environment. The
8422 packages specified by this variable are part of the toolchain set
8423 that runs on the :term:`SDKMACHINE`, and each
8424 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008425 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008426
8427 $ bitbake -c populate_sdk imagename
8428
8429 In this case, a default list of packages is
8430 set in this variable, but you can add additional packages to the
8431 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008432 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008433 in the Yocto Project Application Development and the Extensible
8434 Software Development Kit (eSDK) manual for more information.
8435
8436 For background information on cross-development toolchains in the
8437 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008438 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008439 section in the Yocto Project Overview and Concepts Manual. For
8440 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008441 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008442
Andrew Geisslereff27472021-10-29 15:35:00 -05008443 Note that this variable applies to building an SDK, not an eSDK,
8444 in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
8445 used instead.
8446
8447 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8448 This variable allows to extend what is installed in the host
8449 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8450 applying to SDKs.
8451
Andrew Geisslerf0343792020-11-18 10:42:21 -06008452 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008453 This variable defines the name used for the toolchain output. The
8454 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008455 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008456
8457 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8458
8459 See
8460 the :term:`SDK_NAME` and
8461 :term:`SDK_VERSION` variables for additional
8462 information.
8463
Andrew Geisslerf0343792020-11-18 10:42:21 -06008464 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008465 This variable lists packages the OpenEmbedded build system uses when
8466 it creates the target part of an SDK (i.e. the part built for the
8467 target hardware), which includes libraries and headers. Use this
8468 variable to add individual packages to the part of the SDK that runs
8469 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008470 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008471 in the Yocto Project Application Development and the Extensible
8472 Software Development Kit (eSDK) manual for more information.
8473
8474 For background information on cross-development toolchains in the
8475 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008476 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008477 section in the Yocto Project Overview and Concepts Manual. For
8478 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008479 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008480
Andrew Geisslerf0343792020-11-18 10:42:21 -06008481 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008482 A sanitized version of :term:`TARGET_ARCH`. This
8483 variable is used where the architecture is needed in a value where
8484 underscores are not allowed, for example within package filenames. In
8485 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008486 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008487
8488 Do not edit this variable.
8489
Andrew Geisslerf0343792020-11-18 10:42:21 -06008490 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008491 The GNU canonical architecture for a specific architecture (i.e.
8492 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8493 this value to setup configuration.
8494
Andrew Geissler09036742021-06-25 14:25:14 -05008495 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008496 definitions can be a single static definition, or can be dynamically
8497 adjusted. You can see details for a given CPU family by looking at
8498 the architecture's ``README`` file. For example, the
8499 ``meta/conf/machine/include/mips/README`` file in the
8500 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008501 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008502
Andrew Geissler09036742021-06-25 14:25:14 -05008503 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008504 :term:`TARGET_ARCH`, which defines the target
8505 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008506 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008507
8508 TARGET_ARCH = "${TUNE_ARCH}"
8509
8510 The following list, which is by no means complete since architectures
8511 are configurable, shows supported machine architectures:
8512
8513 - arm
8514 - i586
8515 - x86_64
8516 - powerpc
8517 - powerpc64
8518 - mips
8519 - mipsel
8520
Andrew Geisslerf0343792020-11-18 10:42:21 -06008521 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008522 Specifies architecture-specific assembler flags for the target
8523 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008524 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008525 typically under ``meta/conf/machine/include/`` and are influenced
8526 through :term:`TUNE_FEATURES`. For example, the
8527 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008528 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008529
8530 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8531
8532 .. note::
8533
8534 Board Support Packages (BSPs) select the tune. The selected tune,
8535 in turn, affects the tune variables themselves (i.e. the tune can
8536 supply its own set of flags).
8537
Andrew Geisslerf0343792020-11-18 10:42:21 -06008538 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008539 Specifies architecture-specific C compiler flags for the target
8540 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008541 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008542 typically under ``meta/conf/machine/include/`` and are influenced
8543 through :term:`TUNE_FEATURES`.
8544
8545 .. note::
8546
8547 Board Support Packages (BSPs) select the tune. The selected tune,
8548 in turn, affects the tune variables themselves (i.e. the tune can
8549 supply its own set of flags).
8550
Andrew Geisslerf0343792020-11-18 10:42:21 -06008551 :term:`TUNE_FEATURES`
8552 Features used to "tune" a compiler for optimal use given a specific
8553 processor. The features are defined within the tune files and allow
8554 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8555 the features.
8556
8557 The OpenEmbedded build system verifies the features to be sure they
8558 are not conflicting and that they are supported.
8559
8560 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008561 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008562
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008563 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008564
8565 See the :term:`DEFAULTTUNE` variable for more information.
8566
8567 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008568 Specifies architecture-specific linker flags for the target system.
8569 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008570 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008571 typically under ``meta/conf/machine/include/`` and are influenced
8572 through :term:`TUNE_FEATURES`. For example, the
8573 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008574 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008575
8576 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8577
8578 .. note::
8579
8580 Board Support Packages (BSPs) select the tune. The selected tune,
8581 in turn, affects the tune variables themselves (i.e. the tune can
8582 supply its own set of flags).
8583
Andrew Geisslerf0343792020-11-18 10:42:21 -06008584 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008585 The package architecture understood by the packaging system to define
8586 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008587 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008588
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008589 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008590
8591 These tune-specific package architectures are defined in the machine
8592 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008593 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008594
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008595 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008596
Andrew Geisslerf0343792020-11-18 10:42:21 -06008597 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008598 Specifies CPU or Application Binary Interface (ABI) tuning features
8599 that conflict with feature.
8600
8601 Known tuning conflicts are specified in the machine include files in
8602 the :term:`Source Directory`. Here is an example from
8603 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8604 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05008605 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008606
8607 TUNECONFLICTS[n32] = "o32 n64"
8608
Andrew Geisslerf0343792020-11-18 10:42:21 -06008609 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008610 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8611 feature. The specified feature is stored as a flag. Valid features
8612 are specified in the machine include files (e.g.
8613 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05008614 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008615
8616 TUNEVALID[bigendian] = "Enable big-endian mode."
8617
8618 See the machine include files in the :term:`Source Directory`
8619 for these features.
8620
Andrew Geisslerf0343792020-11-18 10:42:21 -06008621 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008622 Configures the :term:`UBOOT_MACHINE` and can
8623 also define :term:`IMAGE_FSTYPES` for individual
8624 cases.
8625
8626 Following is an example from the ``meta-fsl-arm`` layer. ::
8627
8628 UBOOT_CONFIG ??= "sd"
8629 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8630 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8631 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8632 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8633
8634 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05008635 :term:`UBOOT_MACHINE`. The "sd" configuration defines
8636 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04008637 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008638
Andrew Geissler09036742021-06-25 14:25:14 -05008639 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008640 :ref:`uboot-config <ref-classes-uboot-config>`
8641 class.
8642
Andrew Geisslerf0343792020-11-18 10:42:21 -06008643 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008644 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008645 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008646 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8647 the load address to be used in
8648 creating the dtb sections of Image Tree Source for the FIT image.
8649
Andrew Geisslerf0343792020-11-18 10:42:21 -06008650 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008651 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008652 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008653 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8654 creating the dtbo sections of Image Tree Source for the FIT image.
8655
Andrew Geisslerf0343792020-11-18 10:42:21 -06008656 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008657 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008658 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008659 command-line parameter to the ``uboot-mkimage`` utility.
8660
Andrew Geisslerf0343792020-11-18 10:42:21 -06008661 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008662 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008663 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008664 command-line parameter to the ``uboot-mkimage`` utility.
8665
Andrew Geisslerf0343792020-11-18 10:42:21 -06008666 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008667 Appends a string to the name of the local version of the U-Boot
8668 image. For example, assuming the version of the U-Boot image built
8669 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05008670 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008671
8672 UBOOT_LOCALVERSION = "-yocto"
8673
Andrew Geisslerf0343792020-11-18 10:42:21 -06008674 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008675 Specifies the value passed on the ``make`` command line when building
8676 a U-Boot image. The value indicates the target platform
8677 configuration. You typically set this variable from the machine
8678 configuration file (i.e. ``conf/machine/machine_name.conf``).
8679
8680 Please see the "Selection of Processor Architecture and Board Type"
8681 section in the U-Boot README for valid values for this variable.
8682
Andrew Geisslerf0343792020-11-18 10:42:21 -06008683 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008684 Specifies the target called in the ``Makefile``. The default target
8685 is "all".
8686
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008687 :term:`UBOOT_MKIMAGE`
8688 Specifies the name of the mkimage command as used by the
8689 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8690 the FIT image. This can be used to substitute an alternative command, wrapper
8691 script or function if desired. The default is "uboot-mkimage".
8692
Andrew Geisslerf0343792020-11-18 10:42:21 -06008693 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008694 Options for the device tree compiler passed to mkimage '-D'
8695 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geissler5f350902021-07-23 13:09:54 -04008696 If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008697 pass the ``-D`` option to mkimage.
8698
Patrick Williams975a06f2022-10-21 14:42:47 -05008699 :term:`UBOOT_MKIMAGE_KERNEL_TYPE`
8700 Specifies the type argument for the kernel as passed to ``uboot-mkimage``.
8701 The default value is "kernel".
8702
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008703 :term:`UBOOT_MKIMAGE_SIGN`
8704 Specifies the name of the mkimage command as used by the
8705 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8706 the FIT image after it has been assembled (if enabled). This can be used
8707 to substitute an alternative command, wrapper script or function if
8708 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8709
8710 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8711 Optionally specifies additional arguments for the
8712 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8713 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008714
Andrew Geisslerf0343792020-11-18 10:42:21 -06008715 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008716 Specifies the entrypoint for the RAM disk image.
8717 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008718 :term:`UBOOT_RD_ENTRYPOINT` variable is used
Andrew Geissler4873add2020-11-02 18:44:49 -06008719 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8720 entrypoint to be used in creating the Image Tree Source for
8721 the FIT image.
8722
Andrew Geisslerf0343792020-11-18 10:42:21 -06008723 :term:`UBOOT_RD_LOADADDRESS`
8724 Specifies the load address for the RAM disk image.
8725 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008726 :term:`UBOOT_RD_LOADADDRESS` variable is used
Andrew Geisslerf0343792020-11-18 10:42:21 -06008727 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8728 load address to be used in creating the Image Tree Source for
8729 the FIT image.
8730
8731 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008732 Enable signing of FIT image. The default value is "0".
8733
Andrew Geisslerf0343792020-11-18 10:42:21 -06008734 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008735 Location of the directory containing the RSA key and
8736 certificate used for signing FIT image.
8737
Andrew Geisslerf0343792020-11-18 10:42:21 -06008738 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008739 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008740 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8741 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8742 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8743
Andrew Geisslerf0343792020-11-18 10:42:21 -06008744 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008745 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8746 has a ``.sb`` extension.
8747
8748 The default U-Boot extension is ``.bin``
8749
Andrew Geisslerf0343792020-11-18 10:42:21 -06008750 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008751 Specifies the target used for building U-Boot. The target is passed
8752 directly as part of the "make" command (e.g. SPL and AIS). If you do
8753 not specifically set this variable, the OpenEmbedded build process
8754 passes and uses "all" for the target during the U-Boot building
8755 process.
8756
Andrew Geissler9aee5002022-03-30 16:27:02 +00008757 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008758 Specifies a list of options that, if reported by the configure script
8759 as being invalid, should not generate a warning during the
8760 :ref:`ref-tasks-configure` task. Normally, invalid
8761 configure options are simply not passed to the configure script (e.g.
8762 should be removed from :term:`EXTRA_OECONF` or
8763 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008764 However, there are common options that are passed to all
8765 configure scripts at a class level, but might not be valid for some
8766 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00008767 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008768
8769 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00008770 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008771 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8772 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8773
Andrew Geisslerf0343792020-11-18 10:42:21 -06008774 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008775 For recipes inheriting the
Andrew Geissler09036742021-06-25 14:25:14 -05008776 :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008777 specifies the package that contains the initscript that is enabled.
8778
8779 The default value is "${PN}". Given that almost all recipes that
8780 install initscripts package them in the main package for the recipe,
8781 you rarely need to set this variable in individual recipes.
8782
Andrew Geissler5199d832021-09-24 16:47:35 -05008783 :term:`UPSTREAM_CHECK_COMMITS`
8784 You can perform a per-recipe check for what the latest upstream
8785 source code version is by calling ``devtool latest-version recipe``. If
8786 the recipe source code is provided from Git repositories, but
8787 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
8788 to ``1`` in the recipe, and the OpenEmbedded build system
8789 will compare the latest commit with the one currently specified
8790 by the recipe (:term:`SRCREV`).
8791 ::
8792
8793 UPSTREAM_CHECK_COMMITS = "1"
8794
Andrew Geisslerf0343792020-11-18 10:42:21 -06008795 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008796 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008797 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008798 the recipe source code is provided from Git repositories, the
8799 OpenEmbedded build system determines the latest upstream version by
8800 picking the latest tag from the list of all repository tags.
8801
Andrew Geissler09036742021-06-25 14:25:14 -05008802 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008803 regular expression to filter only the relevant tags should the
8804 default filter not work correctly.
8805 ::
8806
8807 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8808
Andrew Geisslerf0343792020-11-18 10:42:21 -06008809 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05008810 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008811 regular expression instead of the default one when the package
8812 checking system is parsing the page found using
8813 :term:`UPSTREAM_CHECK_URI`.
8814 ::
8815
8816 UPSTREAM_CHECK_REGEX = "package_regex"
8817
Andrew Geisslerf0343792020-11-18 10:42:21 -06008818 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008819 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008820 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008821 the source code is provided from tarballs, the latest version is
8822 determined by fetching the directory listing where the tarball is and
8823 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05008824 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008825 contains the link to the latest tarball.
8826 ::
8827
8828 UPSTREAM_CHECK_URI = "recipe_url"
8829
Andrew Geissler5199d832021-09-24 16:47:35 -05008830 :term:`UPSTREAM_VERSION_UNKNOWN`
8831 You can perform a per-recipe check for what the latest upstream
8832 source code version is by calling ``devtool latest-version recipe``.
8833 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
8834 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
8835 the recipe allows to determine what the latest upstream version is,
8836 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
8837 to acknowledge that the check cannot be performed.
8838 ::
8839
8840 UPSTREAM_VERSION_UNKNOWN = "1"
8841
Andrew Geisslerf0343792020-11-18 10:42:21 -06008842 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008843 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05008844 default value used for :term:`USE_DEVFS` is "1" when no value is
8845 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008846 statically populated ``/dev`` directory.
8847
Andrew Geissler09209ee2020-12-13 08:44:15 -06008848 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008849 the Yocto Project Development Tasks Manual for information on how to
8850 use this variable.
8851
Andrew Geisslerf0343792020-11-18 10:42:21 -06008852 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008853 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008854 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008855 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008856 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008857 virtual terminals in order to enable logging in through those
8858 terminals.
8859
Andrew Geissler09036742021-06-25 14:25:14 -05008860 The default value used for :term:`USE_VT` is "1" when no default value is
8861 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008862 machine configuration file for machines that do not have a graphical
8863 display attached and therefore do not need virtual terminal
8864 functionality.
8865
Andrew Geisslerf0343792020-11-18 10:42:21 -06008866 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008867 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00008868 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008869
Patrick Williams975a06f2022-10-21 14:42:47 -05008870 Classes inherited using :term:`USER_CLASSES` must be located in the
8871 ``classes-global/`` or ``classes/`` subdirectories.
8872
Andrew Geisslerc926e172021-05-07 16:11:35 -05008873 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008874
Andrew Geissler9aee5002022-03-30 16:27:02 +00008875 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008876
8877 For more information, see
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008878 ``meta-poky/conf/templates/default/local.conf.sample`` in the
8879 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008880
Andrew Geisslerf0343792020-11-18 10:42:21 -06008881 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008882 If set to ``error``, forces the OpenEmbedded build system to produce
8883 an error if the user identification (``uid``) and group
8884 identification (``gid``) values are not defined in any of the files
8885 listed in :term:`USERADD_UID_TABLES` and
8886 :term:`USERADD_GID_TABLES`. If set to
8887 ``warn``, a warning will be issued instead.
8888
8889 The default behavior for the build system is to dynamically apply
8890 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05008891 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008892 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05008893 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008894 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008895
8896 USERADD_ERROR_DYNAMIC = "error"
8897
8898 Overriding the
8899 default behavior implies you are going to also take steps to set
8900 static ``uid`` and ``gid`` values through use of the
8901 :term:`USERADDEXTENSION`,
8902 :term:`USERADD_UID_TABLES`, and
8903 :term:`USERADD_GID_TABLES` variables.
8904
8905 .. note::
8906
8907 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05008908 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008909 When it is set to ``warn``, the build system will report a warning for
8910 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8911 to ``error``, it will only report errors for recipes that are actually
8912 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008913 This saves you from having to add static IDs for recipes that you
8914 know will never be built.
8915
Andrew Geisslerf0343792020-11-18 10:42:21 -06008916 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008917 Specifies a password file to use for obtaining static group
8918 identification (``gid``) values when the OpenEmbedded build system
8919 adds a group to the system during package installation.
8920
8921 When applying static group identification (``gid``) values, the
8922 OpenEmbedded build system looks in :term:`BBPATH` for a
8923 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008924 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008925
8926
8927 USERADD_GID_TABLES = "files/group"
8928
8929 .. note::
8930
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008931 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8932 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008933
Andrew Geisslerf0343792020-11-18 10:42:21 -06008934 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008935 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8936 this variable specifies the individual packages within the recipe
8937 that require users and/or groups to be added.
8938
8939 You must set this variable if the recipe inherits the class. For
8940 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008941 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008942
8943 USERADD_PACKAGES = "${PN}"
8944
8945 .. note::
8946
Andrew Geissler09036742021-06-25 14:25:14 -05008947 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008948 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8949 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008950
Andrew Geisslerf0343792020-11-18 10:42:21 -06008951 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008952 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8953 this variable specifies for a package what parameters should pass to
8954 the ``useradd`` command if you add a user to the system when the
8955 package is installed.
8956
Andrew Geisslerc926e172021-05-07 16:11:35 -05008957 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008958
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008959 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008960 --no-create-home --shell /bin/false \
8961 --user-group messagebus"
8962
8963 For information on the
8964 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008965 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008966
Andrew Geisslerf0343792020-11-18 10:42:21 -06008967 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008968 Specifies a password file to use for obtaining static user
8969 identification (``uid``) values when the OpenEmbedded build system
8970 adds a user to the system during package installation.
8971
8972 When applying static user identification (``uid``) values, the
8973 OpenEmbedded build system looks in :term:`BBPATH` for a
8974 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008975 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008976
8977 USERADD_UID_TABLES = "files/passwd"
8978
8979 .. note::
8980
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008981 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8982 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008983
Andrew Geisslerf0343792020-11-18 10:42:21 -06008984 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008985 When set to "useradd-staticids", causes the OpenEmbedded build system
8986 to base all user and group additions on a static ``passwd`` and
8987 ``group`` files found in :term:`BBPATH`.
8988
8989 To use static user identification (``uid``) and group identification
8990 (``gid``) values, set the variable as follows in your ``local.conf``
8991 file: USERADDEXTENSION = "useradd-staticids"
8992
8993 .. note::
8994
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008995 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008996 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008997 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008998
8999 If you use static ``uid`` and ``gid`` information, you must also
9000 specify the ``files/passwd`` and ``files/group`` files by setting the
9001 :term:`USERADD_UID_TABLES` and
9002 :term:`USERADD_GID_TABLES` variables.
9003 Additionally, you should also set the
9004 :term:`USERADD_ERROR_DYNAMIC` variable.
9005
Andrew Geisslerf0343792020-11-18 10:42:21 -06009006 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009007 Specifies the persistence of the target's ``/var/log`` directory,
9008 which is used to house postinstall target log files.
9009
Andrew Geissler09036742021-06-25 14:25:14 -05009010 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009011 file is not persistent. You can override this setting by setting the
9012 variable to "no" to make the log directory persistent.
9013
Andrew Geisslerf0343792020-11-18 10:42:21 -06009014 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009015 Specifies the quality assurance checks whose failures are reported as
9016 warnings by the OpenEmbedded build system. You set this variable in
9017 your distribution configuration file. For a list of the checks you
9018 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00009019 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009020
Patrick Williams975a06f2022-10-21 14:42:47 -05009021 :term:`WATCHDOG_TIMEOUT`
9022 Specifies the timeout in seconds used by the ``watchdog`` recipe and
9023 also by ``systemd`` during reboot. The default is 60 seconds.
9024
9025 :term:`WIRELESS_DAEMON`
9026 For ``connman`` and ``packagegroup-base``, specifies the wireless
9027 daemon to use. The default is "wpa-supplicant" (note that the value
9028 uses a dash and not an underscore).
9029
Andrew Geisslerf0343792020-11-18 10:42:21 -06009030 :term:`WKS_FILE`
9031 Specifies the location of the Wic kickstart file that is used by the
9032 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05009033 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06009034 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06009035 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06009036 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06009037 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06009038
9039 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009040 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05009041 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009042 applicable when Wic images are active (i.e. when
9043 :term:`IMAGE_FSTYPES` contains entries related
9044 to Wic). If your recipe does not create Wic images, the variable has
9045 no effect.
9046
Andrew Geissler09036742021-06-25 14:25:14 -05009047 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009048 :term:`DEPENDS` variable. When you use the variable in
9049 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05009050 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009051
Andrew Geissler09036742021-06-25 14:25:14 -05009052 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009053 specify a list of additional dependencies (e.g. native tools,
9054 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05009055 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009056
9057 WKS_FILE_DEPENDS = "some-native-tool"
9058
9059 In the
9060 previous example, some-native-tool would be replaced with an actual
9061 native tool on which the build would depend.
9062
Andrew Geisslerd5838332022-05-27 11:33:10 -05009063 :term:`WKS_FILES`
9064 Specifies a list of candidate Wic kickstart files to be used by the
9065 OpenEmbedded build system to create a partitioned image. Only the
9066 first one that is found, from left to right, will be used.
9067
9068 This is only useful when there are multiple ``.wks`` files that can be
9069 used to produce an image. A typical case is when multiple layers are
9070 used for different hardware platforms, each supplying a different
9071 ``.wks`` file. In this case, you specify all possible ones through
9072 :term:`WKS_FILES`.
9073
9074 If only one ``.wks`` file is used, set :term:`WKS_FILE` instead.
9075
Andrew Geisslerf0343792020-11-18 10:42:21 -06009076 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009077 The pathname of the work directory in which the OpenEmbedded build
9078 system builds a recipe. This directory is located within the
9079 :term:`TMPDIR` directory structure and is specific to
9080 the recipe being built and the system for which it is being built.
9081
Andrew Geissler09036742021-06-25 14:25:14 -05009082 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009083
9084 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
9085
9086 The actual directory depends on several things:
9087
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009088 - :term:`TMPDIR`: The top-level build output directory
9089 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
9090 - :term:`PN`: The recipe name
Andrew Geissler615f2f12022-07-15 14:00:58 -05009091 - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which
9092 is usually the case for most recipes, then `EXTENDPE` is blank.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05009093 - :term:`PV`: The recipe version
9094 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009095
9096 As an example, assume a Source Directory top-level folder name
9097 ``poky``, a default Build Directory at ``poky/build``, and a
9098 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
9099 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
9100 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05009101 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009102
9103 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
9104
Andrew Geisslerf0343792020-11-18 10:42:21 -06009105 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009106 Specifies the packages that should be installed to provide an X
9107 server and drivers for the current machine, assuming your image
9108 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
9109 indirectly, includes "x11-base" in
9110 :term:`IMAGE_FEATURES`.
9111
Andrew Geissler09036742021-06-25 14:25:14 -05009112 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009113 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
Patrick Williams03907ee2022-05-01 06:28:52 -05009114
9115 :term:`XZ_THREADS`
9116 Specifies the number of parallel threads that should be used when
9117 using xz compression.
9118
9119 By default this scales with core count, but is never set less than 2
9120 to ensure that multi-threaded mode is always used so that the output
9121 file contents are deterministic. Builds will work with a value of 1
9122 but the output will differ compared to the output from the compression
9123 generated when more than one thread is used.
9124
9125 On systems where many tasks run in parallel, setting a limit to this
9126 can be helpful in controlling system resource usage.
9127
9128 :term:`XZ_MEMLIMIT`
9129 Specifies the maximum memory the xz compression should use as a percentage
9130 of system memory. If unconstrained the xz compressor can use large amounts of
9131 memory and become problematic with parallelism elsewhere in the build.
9132 "50%" has been found to be a good value.
9133
9134 :term:`ZSTD_THREADS`
9135 Specifies the number of parallel threads that should be used when
9136 using ZStandard compression.
9137
9138 By default this scales with core count, but is never set less than 2
9139 to ensure that multi-threaded mode is always used so that the output
9140 file contents are deterministic. Builds will work with a value of 1
9141 but the output will differ compared to the output from the compression
9142 generated when more than one thread is used.
9143
9144 On systems where many tasks run in parallel, setting a limit to this
9145 can be helpful in controlling system resource usage.