Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2 | |
| 3 | ****************** |
| 4 | Variables Glossary |
| 5 | ****************** |
| 6 | |
| 7 | This chapter lists common variables used in the OpenEmbedded build |
| 8 | system and gives an overview of their function and contents. |
| 9 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 10 | :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 Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 18 | |
| 19 | .. glossary:: |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 20 | :sorted: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 21 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 22 | :term:`ABIEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 23 | 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 Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 28 | following extension:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 29 | |
| 30 | ABIEXTENSION = "eabi" |
| 31 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 32 | :term:`ALLOW_EMPTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 33 | 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 Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 40 | conjunction with a package name override, as in:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 41 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 42 | ALLOW_EMPTY:${PN} = "1" |
| 43 | ALLOW_EMPTY:${PN}-dev = "1" |
| 44 | ALLOW_EMPTY:${PN}-staticdev = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 45 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 46 | :term:`ALTERNATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 47 | 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 III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 53 | 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 Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 56 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 57 | ALTERNATIVE:busybox = "sh sed test bracket" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 58 | |
| 59 | For more information on the alternatives system, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 60 | ":ref:`ref-classes-update-alternatives`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 61 | section. |
| 62 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 63 | :term:`ALTERNATIVE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 64 | 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 Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 67 | use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 68 | location:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 69 | |
| 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 Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 77 | If :term:`ALTERNATIVE_LINK_NAME` is not defined, it defaults to ``${bindir}/name``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 78 | |
| 79 | For more information on the alternatives system, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 80 | ":ref:`ref-classes-update-alternatives`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 81 | section. |
| 82 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 83 | :term:`ALTERNATIVE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 84 | 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 Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 89 | available syntax forms:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 90 | |
| 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 Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 96 | ":ref:`ref-classes-update-alternatives`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 97 | section. |
| 98 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 99 | :term:`ALTERNATIVE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 100 | 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 Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 105 | particular packages. Here are the available syntax forms:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 106 | |
| 107 | ALTERNATIVE_TARGET = "target" |
| 108 | ALTERNATIVE_TARGET[name] = "target" |
| 109 | ALTERNATIVE_TARGET_pkg[name] = "target" |
| 110 | |
| 111 | .. note:: |
| 112 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 113 | If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 114 | from the :term:`ALTERNATIVE_LINK_NAME` variable. |
| 115 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 116 | If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the |
| 117 | same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 118 | 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 Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 126 | ":ref:`ref-classes-update-alternatives`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 127 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 128 | :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 Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 134 | if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES` |
| 135 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 136 | the recipe will be skipped, and if the build system attempts to build |
| 137 | the recipe then an error will be triggered. |
| 138 | |
| 139 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 140 | :term:`APPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 141 | An override list of append strings for each target specified with |
| 142 | :term:`LABELS`. |
| 143 | |
| 144 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 145 | information on how this variable is used. |
| 146 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 147 | :term:`AR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 148 | The minimal command and arguments used to run ``ar``. |
| 149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 150 | :term:`ARCHIVER_MODE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 151 | When used with the :ref:`archiver <ref-classes-archiver>` class, |
| 152 | determines the type of information used to create a released archive. |
| 153 | You can use this variable to create archives of patched source, |
| 154 | original source, configured source, and so forth by employing the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 155 | following variable flags (varflags):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 156 | |
| 157 | ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. |
| 158 | ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. |
| 159 | ARCHIVER_MODE[src] = "configured" # Uses configured source files. |
| 160 | ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch. |
| 161 | ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff. |
| 162 | ARCHIVER_MODE[dumpdata] = "1" # Uses environment data. |
| 163 | ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files. |
| 164 | ARCHIVER_MODE[srpm] = "1" # Uses RPM package files. |
| 165 | |
| 166 | For information on how the variable works, see the |
| 167 | ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`. |
| 168 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 169 | :term:`AS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 170 | Minimal command and arguments needed to run the assembler. |
| 171 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 172 | :term:`ASSUME_PROVIDED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 173 | Lists recipe names (:term:`PN` values) BitBake does not |
| 174 | attempt to build. Instead, BitBake assumes these recipes have already |
| 175 | been built. |
| 176 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 177 | In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 178 | tools that should not be built. An example is ``git-native``, which |
| 179 | when specified, allows for the Git binary from the host to be used |
| 180 | rather than building ``git-native``. |
| 181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 182 | :term:`ASSUME_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 183 | Provides additional ``shlibs`` provider mapping information, which |
| 184 | adds to or overwrites the information provided automatically by the |
| 185 | system. Separate multiple entries using spaces. |
| 186 | |
| 187 | As an example, use the following form to add an ``shlib`` provider of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 188 | shlibname in packagename with the optional version:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 189 | |
| 190 | shlibname:packagename[_version] |
| 191 | |
| 192 | Here is an example that adds a shared library named ``libEGL.so.1`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 193 | as being provided by the ``libegl-implementation`` package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 194 | |
| 195 | ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" |
| 196 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 197 | :term:`AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 198 | The email address used to contact the original author or authors in |
| 199 | order to send patches and forward bugs. |
| 200 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 201 | :term:`AUTO_LIBNAME_PKGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 202 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 203 | which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 204 | packages should be checked for libraries and renamed according to |
| 205 | Debian library package naming. |
| 206 | |
| 207 | The default value is "${PACKAGES}", which causes the debian class to |
| 208 | act on all packages that are explicitly generated by the recipe. |
| 209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 210 | :term:`AUTOREV` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 211 | When :term:`SRCREV` is set to the value of this variable, it specifies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 212 | use the latest source revision in the repository. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 213 | |
| 214 | SRCREV = "${AUTOREV}" |
| 215 | |
| 216 | If you use the previous statement to retrieve the latest version of |
| 217 | software, you need to be sure :term:`PV` contains |
| 218 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you |
| 219 | have a kernel recipe that inherits the |
| 220 | :ref:`kernel <ref-classes-kernel>` class and you use the previous |
| 221 | statement. In this example, ``${SRCPV}`` does not automatically get |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 222 | into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 223 | so that it does contain ``${SRCPV}``. |
| 224 | |
| 225 | For more information see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 226 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 227 | section in the Yocto Project Development Tasks Manual. |
| 228 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 229 | :term:`AUTO_SYSLINUXMENU` |
| 230 | Enables creating an automatic menu for the syslinux bootloader. You |
| 231 | must set this variable in your recipe. The |
| 232 | :ref:`syslinux <ref-classes-syslinux>` class checks this variable. |
| 233 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 234 | :term:`AVAILTUNES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 235 | The list of defined CPU and Application Binary Interface (ABI) |
| 236 | tunings (i.e. "tunes") available for use by the OpenEmbedded build |
| 237 | system. |
| 238 | |
| 239 | The list simply presents the tunes that are available. Not all tunes |
| 240 | may be compatible with a particular machine configuration, or with |
| 241 | each other in a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 242 | :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 243 | configuration. |
| 244 | |
| 245 | To add a tune to the list, be sure to append it with spaces using the |
| 246 | "+=" BitBake operator. Do not simply replace the list by using the |
| 247 | "=" operator. See the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 248 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 249 | User Manual for more information. |
| 250 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 251 | :term:`AZ_SAS` |
| 252 | Azure Storage Shared Access Signature, when using the |
| 253 | :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` |
| 254 | This variable can be defined to be used by the fetcher to authenticate |
| 255 | and gain access to non-public artifacts. |
| 256 | :: |
| 257 | |
| 258 | AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" |
| 259 | |
| 260 | For more information see Microsoft's Azure Storage documentation at |
| 261 | https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview |
| 262 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 263 | :term:`B` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 264 | The directory within the :term:`Build Directory` in |
| 265 | which the OpenEmbedded build system places generated objects during a |
| 266 | recipe's build process. By default, this directory is the same as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 267 | :term:`S` directory, which is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 268 | |
| 269 | S = "${WORKDIR}/${BP}" |
| 270 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 271 | You can separate the (:term:`S`) directory and the directory pointed to |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 272 | by the :term:`B` variable. Most Autotools-based recipes support |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 273 | separating these directories. The build system defaults to using |
| 274 | separate directories for ``gcc`` and some kernel recipes. |
| 275 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 276 | :term:`BAD_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 277 | Lists "recommended-only" packages to not install. Recommended-only |
| 278 | packages are packages installed only through the |
| 279 | :term:`RRECOMMENDS` variable. You can prevent any |
| 280 | of these "recommended" packages from being installed by listing them |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 281 | with the :term:`BAD_RECOMMENDATIONS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 282 | |
| 283 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." |
| 284 | |
| 285 | You can set this variable globally in your ``local.conf`` file or you |
| 286 | can attach it to a specific image recipe by using the recipe name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 287 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 288 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 289 | BAD_RECOMMENDATIONS:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 290 | |
| 291 | It is important to realize that if you choose to not install packages |
| 292 | using this variable and some other packages are dependent on them |
| 293 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 294 | variable), the OpenEmbedded build system ignores your request and |
| 295 | will install the packages to avoid dependency errors. |
| 296 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 297 | This variable is supported only when using the IPK and RPM |
| 298 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 299 | |
| 300 | See the :term:`NO_RECOMMENDATIONS` and the |
| 301 | :term:`PACKAGE_EXCLUDE` variables for related |
| 302 | information. |
| 303 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 304 | :term:`BASE_LIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 305 | The library directory name for the CPU or Application Binary |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 306 | Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 307 | context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 308 | section in the Yocto Project Development Tasks Manual for information |
| 309 | on Multilib. |
| 310 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 311 | The :term:`BASE_LIB` variable is defined in the machine include files in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 312 | the :term:`Source Directory`. If Multilib is not |
| 313 | being used, the value defaults to "lib". |
| 314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 315 | :term:`BASE_WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 316 | Points to the base of the work directory for all recipes. The default |
| 317 | value is "${TMPDIR}/work". |
| 318 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 319 | :term:`BB_ALLOWED_NETWORKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 320 | Specifies a space-delimited list of hosts that the fetcher is allowed |
| 321 | to use to obtain the required source code. Following are |
| 322 | considerations surrounding this variable: |
| 323 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 324 | - This host list is only used if :term:`BB_NO_NETWORK` is either not set |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 325 | or set to "0". |
| 326 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 327 | - There is limited support for wildcard matching against the beginning of |
| 328 | host names. For example, the following setting matches |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 329 | ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``. |
| 330 | :: |
| 331 | |
| 332 | BB_ALLOWED_NETWORKS = "*.gnu.org" |
| 333 | |
| 334 | .. note:: |
| 335 | |
| 336 | The use of the "``*``" character only works at the beginning of |
| 337 | a host name and it must be isolated from the remainder of the |
| 338 | host name. You cannot use the wildcard character in any other |
| 339 | location of the name or combined with the front part of the |
| 340 | name. |
| 341 | |
| 342 | For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` |
| 343 | is not. |
| 344 | |
| 345 | - Mirrors not in the host list are skipped and logged in debug. |
| 346 | |
| 347 | - Attempts to access networks not in the host list cause a failure. |
| 348 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 349 | Using :term:`BB_ALLOWED_NETWORKS` in conjunction with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 350 | :term:`PREMIRRORS` is very useful. Adding the host |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 351 | you want to use to :term:`PREMIRRORS` results in the source code being |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 352 | fetched from an allowed location and avoids raising an error when a |
| 353 | host that is not allowed is in a :term:`SRC_URI` |
| 354 | statement. This is because the fetcher does not attempt to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 355 | host listed in :term:`SRC_URI` after a successful fetch from the |
| 356 | :term:`PREMIRRORS` occurs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 357 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 358 | :term:`BB_DANGLINGAPPENDS_WARNONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 359 | Defines how BitBake handles situations where an append file |
| 360 | (``.bbappend``) has no corresponding recipe file (``.bb``). This |
| 361 | condition often occurs when layers get out of sync (e.g. ``oe-core`` |
| 362 | bumps a recipe version and the old recipe no longer exists and the |
| 363 | other layer has not been updated to the new version of the recipe |
| 364 | yet). |
| 365 | |
| 366 | The default fatal behavior is safest because it is the sane reaction |
| 367 | given something is out of sync. It is important to realize when your |
| 368 | changes are no longer being applied. |
| 369 | |
| 370 | You can change the default behavior by setting this variable to "1", |
| 371 | "yes", or "true" in your ``local.conf`` file, which is located in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 372 | :term:`Build Directory`: Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 373 | |
| 374 | BB_DANGLINGAPPENDS_WARNONLY = "1" |
| 375 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 376 | :term:`BB_DISKMON_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 377 | Monitors disk space and available inodes during the build and allows |
| 378 | you to control the build based on these parameters. |
| 379 | |
| 380 | Disk space monitoring is disabled by default. To enable monitoring, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 381 | add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 382 | found in the :term:`Build Directory`. Use the |
| 383 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 384 | |
| 385 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 386 | |
| 387 | BB_DISKMON_DIRS = "action,dir,threshold [...]" |
| 388 | |
| 389 | where: |
| 390 | |
| 391 | action is: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 392 | ABORT: Immediately stop the build when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 393 | a threshold is broken. |
| 394 | STOPTASKS: Stop the build after the currently |
| 395 | executing tasks have finished when |
| 396 | a threshold is broken. |
| 397 | WARN: Issue a warning but continue the |
| 398 | build when a threshold is broken. |
| 399 | Subsequent warnings are issued as |
| 400 | defined by the BB_DISKMON_WARNINTERVAL |
| 401 | variable, which must be defined in |
| 402 | the conf/local.conf file. |
| 403 | |
| 404 | dir is: |
| 405 | Any directory you choose. You can specify one or |
| 406 | more directories to monitor by separating the |
| 407 | groupings with a space. If two directories are |
| 408 | on the same device, only the first directory |
| 409 | is monitored. |
| 410 | |
| 411 | threshold is: |
| 412 | Either the minimum available disk space, |
| 413 | the minimum number of free inodes, or |
| 414 | both. You must specify at least one. To |
| 415 | omit one or the other, simply omit the value. |
| 416 | Specify the threshold using G, M, K for Gbytes, |
| 417 | Mbytes, and Kbytes, respectively. If you do |
| 418 | not specify G, M, or K, Kbytes is assumed by |
| 419 | default. Do not use GB, MB, or KB. |
| 420 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 421 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 422 | |
| 423 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
| 424 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
| 425 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" |
| 426 | |
| 427 | The first example works only if you also provide the |
| 428 | :term:`BB_DISKMON_WARNINTERVAL` |
| 429 | variable in the ``conf/local.conf``. This example causes the build |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 430 | system to immediately stop when either the disk space in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 431 | ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops |
| 432 | below 100 Kbytes. Because two directories are provided with the |
| 433 | variable, the build system also issue a warning when the disk space |
| 434 | in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number |
| 435 | of free inodes drops below 100 Kbytes. Subsequent warnings are issued |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 436 | during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 437 | variable. |
| 438 | |
| 439 | The second example stops the build after all currently executing |
| 440 | tasks complete when the minimum disk space in the ``${TMPDIR}`` |
| 441 | directory drops below 1 Gbyte. No disk monitoring occurs for the free |
| 442 | inodes in this case. |
| 443 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 444 | The final example immediately stops the build when the number of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 445 | free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No |
| 446 | disk space monitoring for the directory itself occurs in this case. |
| 447 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 448 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 449 | Defines the disk space and free inode warning intervals. To set these |
| 450 | intervals, define the variable in your ``conf/local.conf`` file in |
| 451 | the :term:`Build Directory`. |
| 452 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 453 | If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 454 | must also use the :term:`BB_DISKMON_DIRS` |
| 455 | variable and define its action as "WARN". During the build, |
| 456 | subsequent warnings are issued each time disk space or number of free |
| 457 | inodes further reduces by the respective interval. |
| 458 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 459 | If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you |
| 460 | do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 461 | monitoring interval defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 462 | |
| 463 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 464 | |
| 465 | When specifying the variable in your configuration file, use the |
| 466 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 467 | |
| 468 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 469 | |
| 470 | BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" |
| 471 | |
| 472 | where: |
| 473 | |
| 474 | disk_space_interval is: |
| 475 | An interval of memory expressed in either |
| 476 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 477 | respectively. You cannot use GB, MB, or KB. |
| 478 | |
| 479 | disk_inode_interval is: |
| 480 | An interval of free inodes expressed in either |
| 481 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 482 | respectively. You cannot use GB, MB, or KB. |
| 483 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 484 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 485 | |
| 486 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
| 487 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 488 | |
| 489 | These variables cause the |
| 490 | OpenEmbedded build system to issue subsequent warnings each time the |
| 491 | available disk space further reduces by 50 Mbytes or the number of |
| 492 | free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` |
| 493 | directory. Subsequent warnings based on the interval occur each time |
| 494 | a respective interval is reached beyond the initial warning (i.e. 1 |
| 495 | Gbytes and 100 Kbytes). |
| 496 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 497 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 498 | Causes tarballs of the source control repositories (e.g. Git |
| 499 | repositories), including metadata, to be placed in the |
| 500 | :term:`DL_DIR` directory. |
| 501 | |
| 502 | For performance reasons, creating and placing tarballs of these |
| 503 | repositories is not the default action by the OpenEmbedded build |
| 504 | system. |
| 505 | :: |
| 506 | |
| 507 | BB_GENERATE_MIRROR_TARBALLS = "1" |
| 508 | |
| 509 | Set this variable in your |
| 510 | ``local.conf`` file in the :term:`Build Directory`. |
| 511 | |
| 512 | Once you have the tarballs containing your source files, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 513 | clean up your :term:`DL_DIR` directory by deleting any Git or other |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 514 | source control work directories. |
| 515 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 516 | :term:`BB_NUMBER_THREADS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 517 | The maximum number of tasks BitBake should run in parallel at any one |
| 518 | time. The OpenEmbedded build system automatically configures this |
| 519 | variable to be equal to the number of cores on the build system. For |
| 520 | example, a system with a dual core processor that also uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 521 | hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 522 | to "4". |
| 523 | |
| 524 | For single socket systems (i.e. one CPU), you should not have to |
| 525 | override this variable to gain optimal parallelism during builds. |
| 526 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 527 | CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 528 | is not set higher than "20". |
| 529 | |
| 530 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 531 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 532 | section in the Yocto Project Development Tasks Manual. |
| 533 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 534 | :term:`BB_SERVER_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 535 | Specifies the time (in seconds) after which to unload the BitBake |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 536 | server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 537 | long the BitBake server stays resident between invocations. |
| 538 | |
| 539 | For example, the following statement in your ``local.conf`` file |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 540 | instructs the server to be unloaded after 20 seconds of inactivity:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 541 | |
| 542 | BB_SERVER_TIMEOUT = "20" |
| 543 | |
| 544 | If you want the server to never be unloaded, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 545 | set :term:`BB_SERVER_TIMEOUT` to "-1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 546 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 547 | :term:`BBCLASSEXTEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 548 | Allows you to extend a recipe so that it builds variants of the |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 549 | software. There are common variants for recipes as "natives" like |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 550 | ``quilt-native``, which is a copy of Quilt built to run on the build |
| 551 | system; "crosses" such as ``gcc-cross``, which is a compiler built to |
| 552 | run on the build machine but produces binaries that run on the target |
| 553 | :term:`MACHINE`; "nativesdk", which targets the SDK |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 554 | machine instead of :term:`MACHINE`; and "mulitlibs" in the form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 555 | "``multilib:``\ multilib_name". |
| 556 | |
| 557 | To build a different variant of the recipe with a minimal amount of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 558 | code, it usually is as simple as adding the following to your recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 559 | |
| 560 | BBCLASSEXTEND =+ "native nativesdk" |
| 561 | BBCLASSEXTEND =+ "multilib:multilib_name" |
| 562 | |
| 563 | .. note:: |
| 564 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 565 | Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 566 | variants by rewriting variable values and applying overrides such |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 567 | as ``:class-native``. For example, to generate a native version of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 568 | a recipe, a :term:`DEPENDS` on "foo" is rewritten |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 569 | to a :term:`DEPENDS` on "foo-native". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 570 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 571 | Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 572 | Parsing once adds some limitations. For example, it is not |
| 573 | possible to include a different file depending on the variant, |
| 574 | since ``include`` statements are processed when the recipe is |
| 575 | parsed. |
| 576 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 577 | :term:`BBFILE_COLLECTIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 578 | Lists the names of configured layers. These names are used to find |
| 579 | the other ``BBFILE_*`` variables. Typically, each layer will append |
| 580 | its name to this variable in its ``conf/layer.conf`` file. |
| 581 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 582 | :term:`BBFILE_PATTERN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 583 | Variable that expands to match files from |
| 584 | :term:`BBFILES` in a particular layer. This variable |
| 585 | is used in the ``conf/layer.conf`` file and must be suffixed with the |
| 586 | name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``). |
| 587 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 588 | :term:`BBFILE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 589 | Assigns the priority for recipe files in each layer. |
| 590 | |
| 591 | This variable is useful in situations where the same recipe appears |
| 592 | in more than one layer. Setting this variable allows you to |
| 593 | prioritize a layer against other layers that contain the same recipe |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 594 | --- effectively letting you control the precedence for the multiple |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 595 | layers. The precedence established through this variable stands |
| 596 | regardless of a recipe's version (:term:`PV` variable). For |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 597 | example, a layer that has a recipe with a higher :term:`PV` value but for |
| 598 | which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 599 | has a lower precedence. |
| 600 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 601 | A larger value for the :term:`BBFILE_PRIORITY` variable results in a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 602 | higher precedence. For example, the value 6 has a higher precedence |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 603 | than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable |
| 604 | is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 605 | for more information. The default priority, if unspecified for a |
| 606 | layer with no dependencies, is the lowest defined priority + 1 (or 1 |
| 607 | if no priorities are defined). |
| 608 | |
| 609 | .. tip:: |
| 610 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 611 | You can use the command ``bitbake-layers show-layers`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 612 | to list all configured layers along with their priorities. |
| 613 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 614 | :term:`BBFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 615 | A space-separated list of recipe files BitBake uses to build |
| 616 | software. |
| 617 | |
| 618 | When specifying recipe files, you can pattern match using Python's |
| 619 | `glob <https://docs.python.org/3/library/glob.html>`_ syntax. |
| 620 | For details on the syntax, see the documentation by following the |
| 621 | previous link. |
| 622 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 623 | :term:`BBFILES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 624 | Activates content when identified layers are present. You identify |
| 625 | the layers by the collections that the layers define. |
| 626 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 627 | Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 628 | whose corresponding ``.bb`` file is in a layer that attempts to |
| 629 | modify other layers through ``.bbappend`` but does not want to |
| 630 | introduce a hard dependency on those other layers. |
| 631 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 632 | Use the following form for :term:`BBFILES_DYNAMIC`: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 633 | ``collection_name:filename_pattern``. |
| 634 | |
| 635 | The following example identifies two collection names and two |
| 636 | filename patterns:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 637 | |
| 638 | BBFILES_DYNAMIC += " \ |
| 639 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
| 640 | core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ |
| 641 | " |
| 642 | |
| 643 | This next example shows an error message that occurs because invalid |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 644 | entries are found, which cause parsing to fail: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 645 | |
| 646 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 647 | |
| 648 | ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: |
| 649 | /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend |
| 650 | /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend |
| 651 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 652 | :term:`BBINCLUDELOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 653 | Variable that controls how BitBake displays logs on build failure. |
| 654 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 655 | :term:`BBINCLUDELOGS_LINES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 656 | If :term:`BBINCLUDELOGS` is set, specifies the |
| 657 | maximum number of lines from the task log file to print when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 658 | reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 659 | the entire log is printed. |
| 660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 661 | :term:`BBLAYERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 662 | Lists the layers to enable during the build. This variable is defined |
| 663 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 664 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 665 | |
| 666 | BBLAYERS = " \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 667 | /home/scottrif/poky/meta \ |
| 668 | /home/scottrif/poky/meta-poky \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 669 | /home/scottrif/poky/meta-yocto-bsp \ |
| 670 | /home/scottrif/poky/meta-mykernel \ |
| 671 | " |
| 672 | |
| 673 | This example enables four layers, one of which is a custom, |
| 674 | user-defined layer named ``meta-mykernel``. |
| 675 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 676 | :term:`BBMASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 677 | Prevents BitBake from processing recipes and recipe append files. |
| 678 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 679 | You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 680 | ``.bbappend`` files. BitBake ignores any recipe or recipe append |
| 681 | files that match any of the expressions. It is as if BitBake does not |
| 682 | see them at all. Consequently, matching files are not parsed or |
| 683 | otherwise used by BitBake. |
| 684 | |
| 685 | The values you provide are passed to Python's regular expression |
| 686 | compiler. Consequently, the syntax follows Python's Regular |
| 687 | Expression (re) syntax. The expressions are compared against the full |
| 688 | paths to the files. For complete syntax information, see Python's |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 689 | documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 690 | |
| 691 | The following example uses a complete regular expression to tell |
| 692 | BitBake to ignore all recipe and recipe append files in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 693 | ``meta-ti/recipes-misc/`` directory:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 694 | |
| 695 | BBMASK = "meta-ti/recipes-misc/" |
| 696 | |
| 697 | If you want to mask out multiple directories or recipes, you can |
| 698 | specify multiple regular expression fragments. This next example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 699 | masks out multiple directories and individual recipes:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 700 | |
| 701 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
| 702 | BBMASK += "/meta-oe/recipes-support/" |
| 703 | BBMASK += "/meta-foo/.*/openldap" |
| 704 | BBMASK += "opencv.*\.bbappend" |
| 705 | BBMASK += "lzma" |
| 706 | |
| 707 | .. note:: |
| 708 | |
| 709 | When specifying a directory name, use the trailing slash character |
| 710 | to ensure you match just that directory name. |
| 711 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 712 | :term:`BBMULTICONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 713 | Specifies each additional separate configuration when you are |
| 714 | building targets with multiple configurations. Use this variable in |
| 715 | your ``conf/local.conf`` configuration file. Specify a |
| 716 | multiconfigname for each configuration file you are using. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 717 | example, the following line specifies three configuration files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 718 | |
| 719 | BBMULTICONFIG = "configA configB configC" |
| 720 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 721 | Each configuration file you use must reside in a ``multiconfig`` |
| 722 | subdirectory of a configuration directory within a layer, or |
| 723 | within the :term:`Build Directory` (e.g. |
| 724 | ``build_directory/conf/multiconfig/configA.conf`` or |
| 725 | ``mylayer/conf/multiconfig/configB.conf``). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 726 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 727 | For information on how to use :term:`BBMULTICONFIG` in an environment |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 728 | that supports building targets with multiple configurations, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 729 | ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 730 | section in the Yocto Project Development Tasks Manual. |
| 731 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 732 | :term:`BBPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 733 | Used by BitBake to locate ``.bbclass`` and configuration files. This |
| 734 | variable is analogous to the ``PATH`` variable. |
| 735 | |
| 736 | .. note:: |
| 737 | |
| 738 | If you run BitBake from a directory outside of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 739 | :term:`Build Directory`, you must be sure to set :term:`BBPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 740 | to point to the Build Directory. Set the variable as you would any |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 741 | environment variable and then run BitBake:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 742 | |
| 743 | $ BBPATH = "build_directory" |
| 744 | $ export BBPATH |
| 745 | $ bitbake target |
| 746 | |
| 747 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 748 | :term:`BBSERVER` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 749 | If defined in the BitBake environment, :term:`BBSERVER` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 750 | BitBake remote server. |
| 751 | |
| 752 | Use the following format to export the variable to the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 753 | environment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 754 | |
| 755 | export BBSERVER=localhost:$port |
| 756 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 757 | By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 758 | Consequently, :term:`BBSERVER` is excluded from checksum and dependency |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 759 | data. |
| 760 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 761 | :term:`BINCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 762 | When inheriting the |
| 763 | :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class, |
| 764 | this variable specifies binary configuration scripts to disable in |
| 765 | favor of using ``pkg-config`` to query the information. The |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 766 | :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 767 | return an error so that calls to them can be easily found and |
| 768 | replaced. |
| 769 | |
| 770 | To add multiple scripts, separate them by spaces. Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 771 | from the ``libpng`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 772 | |
| 773 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
| 774 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 775 | :term:`BINCONFIG_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 776 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 777 | this variable specifies a wildcard for configuration scripts that |
| 778 | need editing. The scripts are edited to correct any paths that have |
| 779 | been set up during compilation so that they are correct for use when |
| 780 | installed into the sysroot and called by the build processes of other |
| 781 | recipes. |
| 782 | |
| 783 | .. note:: |
| 784 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 785 | The :term:`BINCONFIG_GLOB` variable uses |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 786 | `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, |
| 787 | which is recognition and expansion of wildcards during pattern |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 788 | matching. Shell globbing is very similar to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 789 | `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ |
| 790 | and `glob <https://docs.python.org/3/library/glob.html>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 791 | |
| 792 | For more information on how this variable works, see |
| 793 | ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`. |
| 794 | You can also find general |
| 795 | information on the class in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 796 | ":ref:`ref-classes-binconfig`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 797 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 798 | :term:`BP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 799 | The base recipe name and version but without any special recipe name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 800 | suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 801 | comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 802 | |
| 803 | ${BPN}-${PV} |
| 804 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 805 | :term:`BPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 806 | This variable is a version of the :term:`PN` variable with |
| 807 | common prefixes and suffixes removed, such as ``nativesdk-``, |
| 808 | ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. |
| 809 | The exact lists of prefixes and suffixes removed are specified by the |
| 810 | :term:`MLPREFIX` and |
| 811 | :term:`SPECIAL_PKGSUFFIX` variables, |
| 812 | respectively. |
| 813 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 814 | :term:`BUGTRACKER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 815 | Specifies a URL for an upstream bug tracking website for a recipe. |
| 816 | The OpenEmbedded build system does not use this variable. Rather, the |
| 817 | variable is a useful pointer in case a bug in the software being |
| 818 | built needs to be manually reported. |
| 819 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 820 | :term:`BUILD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 821 | Specifies the architecture of the build host (e.g. ``i686``). The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 822 | OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 823 | machine name reported by the ``uname`` command. |
| 824 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 825 | :term:`BUILD_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 826 | Specifies the architecture-specific assembler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 827 | host. By default, the value of :term:`BUILD_AS_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 828 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 829 | :term:`BUILD_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 830 | Specifies the architecture-specific C compiler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 831 | host. By default, the value of :term:`BUILD_CC_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 832 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 833 | :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 834 | Specifies the linker command to be used for the build host when the C |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 835 | compiler is being used as the linker. By default, :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 836 | points to GCC and passes as arguments the value of |
| 837 | :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 838 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 839 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 840 | :term:`BUILD_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 841 | Specifies the flags to pass to the C compiler when building for the |
| 842 | build host. When building in the ``-native`` context, |
| 843 | :term:`CFLAGS` is set to the value of this variable by |
| 844 | default. |
| 845 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 846 | :term:`BUILD_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 847 | Specifies the flags to pass to the C preprocessor (i.e. to both the C |
| 848 | and the C++ compilers) when building for the build host. When |
| 849 | building in the ``-native`` context, :term:`CPPFLAGS` |
| 850 | is set to the value of this variable by default. |
| 851 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 852 | :term:`BUILD_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 853 | Specifies the flags to pass to the C++ compiler when building for the |
| 854 | build host. When building in the ``-native`` context, |
| 855 | :term:`CXXFLAGS` is set to the value of this variable |
| 856 | by default. |
| 857 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 858 | :term:`BUILD_FC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 859 | Specifies the Fortran compiler command for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 860 | default, :term:`BUILD_FC` points to Gfortran and passes as arguments the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 861 | value of :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 862 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 863 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 864 | :term:`BUILD_LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 865 | Specifies the linker command for the build host. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 866 | :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 867 | the value of :term:`BUILD_LD_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 868 | :term:`BUILD_LD_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 869 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 870 | :term:`BUILD_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 871 | Specifies architecture-specific linker flags for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 872 | default, the value of :term:`BUILD_LD_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 873 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 874 | :term:`BUILD_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 875 | Specifies the flags to pass to the linker when building for the build |
| 876 | host. When building in the ``-native`` context, |
| 877 | :term:`LDFLAGS` is set to the value of this variable |
| 878 | by default. |
| 879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 880 | :term:`BUILD_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 881 | Specifies the optimization flags passed to the C compiler when |
| 882 | building for the build host or the SDK. The flags are passed through |
| 883 | the :term:`BUILD_CFLAGS` and |
| 884 | :term:`BUILDSDK_CFLAGS` default values. |
| 885 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 886 | The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 887 | -pipe". |
| 888 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 889 | :term:`BUILD_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 890 | Specifies the operating system in use on the build host (e.g. |
| 891 | "linux"). The OpenEmbedded build system sets the value of |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 892 | :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 893 | first word, converted to lower-case characters. |
| 894 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 895 | :term:`BUILD_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 896 | The toolchain binary prefix used for native recipes. The OpenEmbedded |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 897 | build system uses the :term:`BUILD_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 898 | :term:`TARGET_PREFIX` when building for |
| 899 | ``native`` recipes. |
| 900 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 901 | :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 902 | Specifies the command to be used to strip debugging symbols from |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 903 | binaries produced for the build host. By default, :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 904 | points to |
| 905 | ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. |
| 906 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 907 | :term:`BUILD_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 908 | Specifies the system, including the architecture and the operating |
| 909 | system, to use when building for the build host (i.e. when building |
| 910 | ``native`` recipes). |
| 911 | |
| 912 | The OpenEmbedded build system automatically sets this variable based |
| 913 | on :term:`BUILD_ARCH`, |
| 914 | :term:`BUILD_VENDOR`, and |
| 915 | :term:`BUILD_OS`. You do not need to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 916 | :term:`BUILD_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 917 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 918 | :term:`BUILD_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 919 | Specifies the vendor name to use when building for the build host. |
| 920 | The default value is an empty string (""). |
| 921 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 922 | :term:`BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 923 | Points to the location of the :term:`Build Directory`. |
| 924 | You can define this directory indirectly through the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 925 | :ref:`structure-core-script` script by passing in a Build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 926 | Directory path when you run the script. If you run the script and do |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 927 | not provide a Build Directory path, the :term:`BUILDDIR` defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 928 | ``build`` in the current directory. |
| 929 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 930 | :term:`BUILDHISTORY_COMMIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 931 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 932 | class, this variable specifies whether or not to commit the build |
| 933 | history output in a local Git repository. If set to "1", this local |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 934 | repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 935 | class and a commit will be created on every build for changes to each |
| 936 | top-level subdirectory of the build history output (images, packages, |
| 937 | and sdk). If you want to track changes to build history over time, |
| 938 | you should set this value to "1". |
| 939 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 940 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class does not commit the build |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 941 | history output in a local Git repository:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 942 | |
| 943 | BUILDHISTORY_COMMIT ?= "0" |
| 944 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 945 | :term:`BUILDHISTORY_COMMIT_AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 946 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 947 | class, this variable specifies the author to use for each Git commit. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 948 | In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 949 | :term:`BUILDHISTORY_COMMIT` variable must |
| 950 | be set to "1". |
| 951 | |
| 952 | Git requires that the value you provide for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 953 | :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 954 | email@host". Providing an email address or host that is not valid |
| 955 | does not produce an error. |
| 956 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 957 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 958 | |
| 959 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
| 960 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 961 | :term:`BUILDHISTORY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 962 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 963 | class, this variable specifies the directory in which build history |
| 964 | information is kept. For more information on how the variable works, |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 965 | see the :ref:`ref-classes-buildhistory` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 966 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 967 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 968 | |
| 969 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" |
| 970 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 971 | :term:`BUILDHISTORY_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 972 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 973 | class, this variable specifies the build history features to be |
| 974 | enabled. For more information on how build history works, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 975 | ":ref:`dev-manual/common-tasks:maintaining build output quality`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 976 | section in the Yocto Project Development Tasks Manual. |
| 977 | |
| 978 | You can specify these features in the form of a space-separated list: |
| 979 | |
| 980 | - *image:* Analysis of the contents of images, which includes the |
| 981 | list of installed packages among other things. |
| 982 | |
| 983 | - *package:* Analysis of the contents of individual packages. |
| 984 | |
| 985 | - *sdk:* Analysis of the contents of the software development kit |
| 986 | (SDK). |
| 987 | |
| 988 | - *task:* Save output file signatures for |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 989 | :ref:`shared state <overview-manual/concepts:shared state cache>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 990 | (sstate) tasks. |
| 991 | This saves one file per task and lists the SHA-256 checksums for |
| 992 | each file staged (i.e. the output of the task). |
| 993 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 994 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 995 | features:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 996 | |
| 997 | BUILDHISTORY_FEATURES ?= "image package sdk" |
| 998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 999 | :term:`BUILDHISTORY_IMAGE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1000 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1001 | class, this variable specifies a list of paths to files copied from |
| 1002 | the image contents into the build history directory under an |
| 1003 | "image-files" directory in the directory for the image, so that you |
| 1004 | can track the contents of each file. The default is to copy |
| 1005 | ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for |
| 1006 | changes in user and group entries. You can modify the list to include |
| 1007 | any file. Specifying an invalid path does not produce an error. |
| 1008 | Consequently, you can include files that might not always be present. |
| 1009 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1010 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1011 | following files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1012 | |
| 1013 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" |
| 1014 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1015 | :term:`BUILDHISTORY_PATH_PREFIX_STRIP` |
| 1016 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1017 | class, this variable specifies a common path prefix that should be |
| 1018 | stripped off the beginning of paths in the task signature list when the |
| 1019 | ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be |
| 1020 | useful when build history is populated from multiple sources that may not |
| 1021 | all use the same top level directory. |
| 1022 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1023 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows:: |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1024 | |
| 1025 | BUILDHISTORY_PATH_PREFIX_STRIP ?= "" |
| 1026 | |
| 1027 | In this case, no prefixes will be stripped. |
| 1028 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1029 | :term:`BUILDHISTORY_PUSH_REPO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1030 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1031 | class, this variable optionally specifies a remote repository to |
| 1032 | which build history pushes Git changes. In order for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1033 | :term:`BUILDHISTORY_PUSH_REPO` to work, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1034 | :term:`BUILDHISTORY_COMMIT` must be set to |
| 1035 | "1". |
| 1036 | |
| 1037 | The repository should correspond to a remote address that specifies a |
| 1038 | repository as understood by Git, or alternatively to a remote name |
| 1039 | that you have set up manually using ``git remote`` within the local |
| 1040 | repository. |
| 1041 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1042 | By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1043 | |
| 1044 | BUILDHISTORY_PUSH_REPO ?= "" |
| 1045 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1046 | :term:`BUILDSDK_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1047 | Specifies the flags to pass to the C compiler when building for the |
| 1048 | SDK. When building in the ``nativesdk-`` context, |
| 1049 | :term:`CFLAGS` is set to the value of this variable by |
| 1050 | default. |
| 1051 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1052 | :term:`BUILDSDK_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1053 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1054 | C and the C++ compilers) when building for the SDK. When building in |
| 1055 | the ``nativesdk-`` context, :term:`CPPFLAGS` is set |
| 1056 | to the value of this variable by default. |
| 1057 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1058 | :term:`BUILDSDK_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1059 | Specifies the flags to pass to the C++ compiler when building for the |
| 1060 | SDK. When building in the ``nativesdk-`` context, |
| 1061 | :term:`CXXFLAGS` is set to the value of this variable |
| 1062 | by default. |
| 1063 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1064 | :term:`BUILDSDK_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1065 | Specifies the flags to pass to the linker when building for the SDK. |
| 1066 | When building in the ``nativesdk-`` context, |
| 1067 | :term:`LDFLAGS` is set to the value of this variable |
| 1068 | by default. |
| 1069 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1070 | :term:`BUILDSTATS_BASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1071 | Points to the location of the directory that holds build statistics |
| 1072 | when you use and enable the |
| 1073 | :ref:`buildstats <ref-classes-buildstats>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1074 | :term:`BUILDSTATS_BASE` directory defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1075 | ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. |
| 1076 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1077 | :term:`BUSYBOX_SPLIT_SUID` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1078 | For the BusyBox recipe, specifies whether to split the output |
| 1079 | executable file into two parts: one for features that require |
| 1080 | ``setuid root``, and one for the remaining features (i.e. those that |
| 1081 | do not require ``setuid root``). |
| 1082 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1083 | The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1084 | splitting the output executable file. Set the variable to "0" to get |
| 1085 | a single output executable file. |
| 1086 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1087 | :term:`CACHE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1088 | Specifies the directory BitBake uses to store a cache of the |
| 1089 | :term:`Metadata` so it does not need to be parsed every time |
| 1090 | BitBake is started. |
| 1091 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1092 | :term:`CC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1093 | The minimal command and arguments used to run the C compiler. |
| 1094 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1095 | :term:`CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1096 | Specifies the flags to pass to the C compiler. This variable is |
| 1097 | exported to an environment variable and thus made visible to the |
| 1098 | software being built during the compilation step. |
| 1099 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1100 | Default initialization for :term:`CFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1101 | being built: |
| 1102 | |
| 1103 | - :term:`TARGET_CFLAGS` when building for the |
| 1104 | target |
| 1105 | |
| 1106 | - :term:`BUILD_CFLAGS` when building for the |
| 1107 | build host (i.e. ``-native``) |
| 1108 | |
| 1109 | - :term:`BUILDSDK_CFLAGS` when building for |
| 1110 | an SDK (i.e. ``nativesdk-``) |
| 1111 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1112 | :term:`CLASSOVERRIDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1113 | An internal variable specifying the special class override that |
| 1114 | should currently apply (e.g. "class-target", "class-native", and so |
| 1115 | forth). The classes that use this variable (e.g. |
| 1116 | :ref:`native <ref-classes-native>`, |
| 1117 | :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the |
| 1118 | variable to appropriate values. |
| 1119 | |
| 1120 | .. note:: |
| 1121 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1122 | :term:`CLASSOVERRIDE` gets its default "class-target" value from the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1123 | ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1124 | |
| 1125 | As an example, the following override allows you to install extra |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1126 | files, but only when building for the target:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1127 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1128 | do_install:append:class-target() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1129 | install my-extra-file ${D}${sysconfdir} |
| 1130 | } |
| 1131 | |
| 1132 | Here is an example where ``FOO`` is set to |
| 1133 | "native" when building for the build host, and to "other" when not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1134 | building for the build host:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1135 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1136 | FOO:class-native = "native" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1137 | FOO = "other" |
| 1138 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1139 | The underlying mechanism behind :term:`CLASSOVERRIDE` is simply |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1140 | that it is included in the default value of |
| 1141 | :term:`OVERRIDES`. |
| 1142 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1143 | :term:`CLEANBROKEN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1144 | If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1145 | ``make clean`` command does not work for the software being built. |
| 1146 | Consequently, the OpenEmbedded build system will not try to run |
| 1147 | ``make clean`` during the :ref:`ref-tasks-configure` |
| 1148 | task, which is the default behavior. |
| 1149 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1150 | :term:`COMBINED_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1151 | Provides a list of hardware features that are enabled in both |
| 1152 | :term:`MACHINE_FEATURES` and |
| 1153 | :term:`DISTRO_FEATURES`. This select list of |
| 1154 | features contains features that make sense to be controlled both at |
| 1155 | the machine and distribution configuration level. For example, the |
| 1156 | "bluetooth" feature requires hardware support but should also be |
| 1157 | optional at the distribution level, in case the hardware supports |
| 1158 | Bluetooth but you do not ever intend to use it. |
| 1159 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1160 | :term:`COMMON_LICENSE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1161 | Points to ``meta/files/common-licenses`` in the |
| 1162 | :term:`Source Directory`, which is where generic license |
| 1163 | files reside. |
| 1164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1165 | :term:`COMPATIBLE_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1166 | A regular expression that resolves to one or more hosts (when the |
| 1167 | recipe is native) or one or more targets (when the recipe is |
| 1168 | non-native) with which a recipe is compatible. The regular expression |
| 1169 | is matched against :term:`HOST_SYS`. You can use the |
| 1170 | variable to stop recipes from being built for classes of systems with |
| 1171 | which the recipes are not compatible. Stopping these builds is |
| 1172 | particularly useful with kernels. The variable also helps to increase |
| 1173 | parsing speed since the build system skips parsing recipes not |
| 1174 | compatible with the current system. |
| 1175 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1176 | :term:`COMPATIBLE_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1177 | A regular expression that resolves to one or more target machines |
| 1178 | with which a recipe is compatible. The regular expression is matched |
| 1179 | against :term:`MACHINEOVERRIDES`. You can use |
| 1180 | the variable to stop recipes from being built for machines with which |
| 1181 | the recipes are not compatible. Stopping these builds is particularly |
| 1182 | useful with kernels. The variable also helps to increase parsing |
| 1183 | speed since the build system skips parsing recipes not compatible |
| 1184 | with the current machine. |
| 1185 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1186 | :term:`COMPLEMENTARY_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1187 | Defines wildcards to match when installing a list of complementary |
| 1188 | packages for all the packages explicitly (or implicitly) installed in |
| 1189 | an image. |
| 1190 | |
| 1191 | .. note:: |
| 1192 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1193 | The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1194 | (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), |
| 1195 | which is similar to the Unix style pathname pattern expansion |
| 1196 | (`glob <https://docs.python.org/3/library/glob.html>`__). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1197 | |
| 1198 | The resulting list of complementary packages is associated with an |
| 1199 | item that can be added to |
| 1200 | :term:`IMAGE_FEATURES`. An example usage of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1201 | this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1202 | will install -dev packages (containing headers and other development |
| 1203 | files) for every package in the image. |
| 1204 | |
| 1205 | To add a new feature item pointing to a wildcard, use a variable flag |
| 1206 | to specify the feature item name and use the value to specify the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1207 | wildcard. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1208 | |
| 1209 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' |
| 1210 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1211 | :term:`COMPONENTS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1212 | Stores sysroot components for each recipe. The OpenEmbedded build |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1213 | system uses :term:`COMPONENTS_DIR` when constructing recipe-specific |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1214 | sysroots for other recipes. |
| 1215 | |
| 1216 | The default is |
| 1217 | "``${``\ :term:`STAGING_DIR`\ ``}-components``." |
| 1218 | (i.e. |
| 1219 | "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). |
| 1220 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1221 | :term:`CONF_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1222 | Tracks the version of the local configuration file (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1223 | ``local.conf``). The value for :term:`CONF_VERSION` increments each time |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1224 | ``build/conf/`` compatibility changes. |
| 1225 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1226 | :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1227 | Identifies editable or configurable files that are part of a package. |
| 1228 | If the Package Management System (PMS) is being used to update |
| 1229 | packages on the target system, it is possible that configuration |
| 1230 | files you have changed after the original installation and that you |
| 1231 | now want to remain unchanged are overwritten. In other words, |
| 1232 | editable files might exist in the package that you do not want reset |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1233 | as part of the package update process. You can use the :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1234 | variable to list the files in the package that you wish to prevent |
| 1235 | the PMS from overwriting during this update process. |
| 1236 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1237 | To use the :term:`CONFFILES` variable, provide a package name override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1238 | that identifies the resulting package. Then, provide a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1239 | space-separated list of files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1240 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1241 | CONFFILES:${PN} += "${sysconfdir}/file1 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1242 | ${sysconfdir}/file2 ${sysconfdir}/file3" |
| 1243 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1244 | There is a relationship between the :term:`CONFFILES` and :term:`FILES` |
| 1245 | variables. The files listed within :term:`CONFFILES` must be a subset of |
| 1246 | the files listed within :term:`FILES`. Because the configuration files |
| 1247 | you provide with :term:`CONFFILES` are simply being identified so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1248 | the PMS will not overwrite them, it makes sense that the files must |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1249 | already be included as part of the package through the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1250 | variable. |
| 1251 | |
| 1252 | .. note:: |
| 1253 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1254 | When specifying paths as part of the :term:`CONFFILES` variable, it is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1255 | good practice to use appropriate path variables. |
| 1256 | For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` |
| 1257 | rather than ``/usr/bin``. You can find a list of these variables at |
| 1258 | the top of the ``meta/conf/bitbake.conf`` file in the |
| 1259 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1260 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1261 | :term:`CONFIG_INITRAMFS_SOURCE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1262 | Identifies the initial RAM filesystem (initramfs) source files. The |
| 1263 | OpenEmbedded build system receives and uses this kernel Kconfig |
| 1264 | variable as an environment variable. By default, the variable is set |
| 1265 | to null (""). |
| 1266 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1267 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1268 | with a ``.cpio`` suffix or a space-separated list of directories and |
| 1269 | files for building the initramfs image. A cpio archive should contain |
| 1270 | a filesystem archive to be used as an initramfs image. Directories |
| 1271 | should contain a filesystem layout to be included in the initramfs |
| 1272 | image. Files should contain entries according to the format described |
| 1273 | by the ``usr/gen_init_cpio`` program in the kernel tree. |
| 1274 | |
| 1275 | If you specify multiple directories and files, the initramfs image |
| 1276 | will be the aggregate of all of them. |
| 1277 | |
| 1278 | For information on creating an initramfs, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1279 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1280 | in the Yocto Project Development Tasks Manual. |
| 1281 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1282 | :term:`CONFIG_SITE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1283 | A list of files that contains ``autoconf`` test results relevant to |
| 1284 | the current build. This variable is used by the Autotools utilities |
| 1285 | when running ``configure``. |
| 1286 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1287 | :term:`CONFIGURE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1288 | The minimal arguments for GNU configure. |
| 1289 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1290 | :term:`CONFLICT_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1291 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1292 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1293 | class, this variable identifies distribution features that would be |
| 1294 | in conflict should the recipe be built. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1295 | :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also |
| 1296 | appears in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1297 | the recipe will be skipped, and if the build system attempts to build |
| 1298 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1299 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1300 | :term:`CONVERSION_CMD` |
| 1301 | This variable is used for storing image conversion commands. |
| 1302 | Image conversion can convert an image into different objects like: |
| 1303 | |
| 1304 | - Compressed version of the image |
| 1305 | |
| 1306 | - Checksums for the image |
| 1307 | |
| 1308 | An example of :term:`CONVERSION_CMD` from :ref:`image-types |
| 1309 | <ref-classes-image_types>` class is:: |
| 1310 | |
| 1311 | CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
| 1312 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1313 | :term:`COPY_LIC_DIRS` |
| 1314 | If set to "1" along with the |
| 1315 | :term:`COPY_LIC_MANIFEST` variable, the |
| 1316 | OpenEmbedded build system copies into the image the license files, |
| 1317 | which are located in ``/usr/share/common-licenses``, for each |
| 1318 | package. The license files are placed in directories within the image |
| 1319 | itself during build time. |
| 1320 | |
| 1321 | .. note:: |
| 1322 | |
| 1323 | The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for |
| 1324 | newly installed packages to an image, which might be most suitable for |
| 1325 | read-only filesystems that cannot be upgraded. See the |
| 1326 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
| 1327 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
| 1328 | section in the Yocto Project Development Tasks Manual for |
| 1329 | information on providing license text. |
| 1330 | |
| 1331 | :term:`COPY_LIC_MANIFEST` |
| 1332 | If set to "1", the OpenEmbedded build system copies the license |
| 1333 | manifest for the image to |
| 1334 | ``/usr/share/common-licenses/license.manifest`` within the image |
| 1335 | itself during build time. |
| 1336 | |
| 1337 | .. note:: |
| 1338 | |
| 1339 | The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for |
| 1340 | newly installed packages to an image, which might be most suitable for |
| 1341 | read-only filesystems that cannot be upgraded. See the |
| 1342 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
| 1343 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
| 1344 | section in the Yocto Project Development Tasks Manual for |
| 1345 | information on providing license text. |
| 1346 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1347 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1348 | A space-separated list of licenses to exclude from the source |
| 1349 | archived by the :ref:`archiver <ref-classes-archiver>` class. In |
| 1350 | other words, if a license in a recipe's |
| 1351 | :term:`LICENSE` value is in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1352 | :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1353 | class. |
| 1354 | |
| 1355 | .. note:: |
| 1356 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1357 | The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1358 | :term:`COPYLEFT_LICENSE_INCLUDE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1359 | |
| 1360 | The default value, which is "CLOSED Proprietary", for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1361 | :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1362 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1363 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1364 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1365 | :term:`COPYLEFT_LICENSE_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1366 | A space-separated list of licenses to include in the source archived |
| 1367 | by the :ref:`archiver <ref-classes-archiver>` class. In other |
| 1368 | words, if a license in a recipe's :term:`LICENSE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1369 | value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1370 | source is archived by the class. |
| 1371 | |
| 1372 | The default value is set by the |
| 1373 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1374 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1375 | "GPL*", "LGPL*", and "AGPL*". |
| 1376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1377 | :term:`COPYLEFT_PN_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1378 | A list of recipes to exclude in the source archived by the |
| 1379 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1380 | :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1381 | exclusion caused through the |
| 1382 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1383 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1384 | variables, respectively. |
| 1385 | |
| 1386 | The default value, which is "" indicating to not explicitly exclude |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1387 | any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1388 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1389 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1390 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1391 | :term:`COPYLEFT_PN_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1392 | A list of recipes to include in the source archived by the |
| 1393 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1394 | :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1395 | exclusion caused through the |
| 1396 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1397 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1398 | variables, respectively. |
| 1399 | |
| 1400 | The default value, which is "" indicating to not explicitly include |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1401 | any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1402 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1403 | is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1404 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1405 | :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1406 | A space-separated list of recipe types to include in the source |
| 1407 | archived by the :ref:`archiver <ref-classes-archiver>` class. |
| 1408 | Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``, |
| 1409 | ``crosssdk``, and ``cross-canadian``. |
| 1410 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1411 | The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1412 | is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1413 | class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1414 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1415 | :term:`CORE_IMAGE_EXTRA_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1416 | Specifies the list of packages to be added to the image. You should |
| 1417 | only set this variable in the ``local.conf`` configuration file found |
| 1418 | in the :term:`Build Directory`. |
| 1419 | |
| 1420 | This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer |
| 1421 | supported. |
| 1422 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1423 | :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1424 | Specifies the parent directory of the OpenEmbedded-Core Metadata |
| 1425 | layer (i.e. ``meta``). |
| 1426 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1427 | It is an important distinction that :term:`COREBASE` points to the parent |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1428 | of this layer and not the layer itself. Consider an example where you |
| 1429 | have cloned the Poky Git repository and retained the ``poky`` name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1430 | for your local copy of the repository. In this case, :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1431 | points to the ``poky`` folder because it is the parent directory of |
| 1432 | the ``poky/meta`` layer. |
| 1433 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1434 | :term:`COREBASE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1435 | Lists files from the :term:`COREBASE` directory that |
| 1436 | should be copied other than the layers listed in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1437 | ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1438 | to copy metadata from the OpenEmbedded build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1439 | into the extensible SDK. |
| 1440 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1441 | Explicitly listing files in :term:`COREBASE` is needed because it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1442 | typically contains build directories and other files that should not |
| 1443 | normally be copied into the extensible SDK. Consequently, the value |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1444 | of :term:`COREBASE_FILES` is used in order to only copy the files that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1445 | are actually needed. |
| 1446 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1447 | :term:`CPP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1448 | The minimal command and arguments used to run the C preprocessor. |
| 1449 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1450 | :term:`CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1451 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1452 | C and the C++ compilers). This variable is exported to an environment |
| 1453 | variable and thus made visible to the software being built during the |
| 1454 | compilation step. |
| 1455 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1456 | Default initialization for :term:`CPPFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1457 | being built: |
| 1458 | |
| 1459 | - :term:`TARGET_CPPFLAGS` when building for |
| 1460 | the target |
| 1461 | |
| 1462 | - :term:`BUILD_CPPFLAGS` when building for the |
| 1463 | build host (i.e. ``-native``) |
| 1464 | |
| 1465 | - :term:`BUILDSDK_CPPFLAGS` when building |
| 1466 | for an SDK (i.e. ``nativesdk-``) |
| 1467 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1468 | :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1469 | The toolchain binary prefix for the target tools. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1470 | :term:`CROSS_COMPILE` variable is the same as the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1471 | :term:`TARGET_PREFIX` variable. |
| 1472 | |
| 1473 | .. note:: |
| 1474 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1475 | The OpenEmbedded build system sets the :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1476 | variable only in certain contexts (e.g. when building for kernel |
| 1477 | and kernel module recipes). |
| 1478 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1479 | :term:`CVE_CHECK_IGNORE` |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1480 | The list of CVE IDs which are ignored. Here is |
| 1481 | an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`:: |
| 1482 | |
| 1483 | # This is windows only issue. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1484 | CVE_CHECK_IGNORE += "CVE-2020-15523" |
| 1485 | |
| 1486 | :term:`CVE_CHECK_SKIP_RECIPE` |
| 1487 | The list of package names (:term:`PN`) for which |
| 1488 | CVEs (Common Vulnerabilities and Exposures) are ignored. |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1489 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1490 | :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 Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1494 | The default is ${:term:`BPN`}. If it does not match the name in the NIST CVE |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1495 | database or matches with multiple entries in the database, the default |
| 1496 | value needs to be changed. |
| 1497 | |
| 1498 | Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`:: |
| 1499 | |
| 1500 | CVE_PRODUCT = "oracle_berkeley_db berkeley_db" |
| 1501 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 1502 | Sometimes the product name is not specific enough, for example |
| 1503 | "tar" has been matching CVEs for the GNU ``tar`` package and also |
| 1504 | the ``node-tar`` node.js extension. To avoid this problem, use the |
| 1505 | vendor name as a prefix. The syntax for this is:: |
| 1506 | |
| 1507 | CVE_PRODUCT = "vendor:package" |
| 1508 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1509 | :term:`CVSDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1510 | The directory in which files checked out under the CVS system are |
| 1511 | stored. |
| 1512 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1513 | :term:`CXX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1514 | The minimal command and arguments used to run the C++ compiler. |
| 1515 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1516 | :term:`CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1517 | Specifies the flags to pass to the C++ compiler. This variable is |
| 1518 | exported to an environment variable and thus made visible to the |
| 1519 | software being built during the compilation step. |
| 1520 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1521 | Default initialization for :term:`CXXFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1522 | being built: |
| 1523 | |
| 1524 | - :term:`TARGET_CXXFLAGS` when building for |
| 1525 | the target |
| 1526 | |
| 1527 | - :term:`BUILD_CXXFLAGS` when building for the |
| 1528 | build host (i.e. ``-native``) |
| 1529 | |
| 1530 | - :term:`BUILDSDK_CXXFLAGS` when building |
| 1531 | for an SDK (i.e. ``nativesdk-``) |
| 1532 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1533 | :term:`D` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1534 | The destination directory. The location in the :term:`Build Directory` |
| 1535 | where components are installed by the |
| 1536 | :ref:`ref-tasks-install` task. This location defaults |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1537 | to:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1538 | |
| 1539 | ${WORKDIR}/image |
| 1540 | |
| 1541 | .. note:: |
| 1542 | |
| 1543 | Tasks that read from or write to this directory should run under |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1544 | :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1545 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1546 | :term:`DATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1547 | The date the build was started. Dates appear using the year, month, |
| 1548 | and day (YMD) format (e.g. "20150209" for February 9th, 2015). |
| 1549 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1550 | :term:`DATETIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1551 | The date and time on which the current build started. The format is |
| 1552 | suitable for timestamps. |
| 1553 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1554 | :term:`DEBIAN_NOAUTONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1555 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1556 | which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1557 | particular package should not be renamed according to Debian library |
| 1558 | package naming. You must use the package name as an override when you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1559 | set this variable. Here is an example from the ``fontconfig`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1560 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1561 | DEBIAN_NOAUTONAME:fontconfig-utils = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1563 | :term:`DEBIANNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1564 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1565 | which is the default behavior, :term:`DEBIANNAME` allows you to override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1566 | the library name for an individual package. Overriding the library |
| 1567 | name in these cases is rare. You must use the package name as an |
| 1568 | override when you set this variable. Here is an example from the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1569 | ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1570 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 1571 | DEBIANNAME:${PN} = "dbus-1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1572 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1573 | :term:`DEBUG_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1574 | Specifies to build packages with debugging information. This |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1575 | influences the value of the :term:`SELECTED_OPTIMIZATION` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1576 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1577 | :term:`DEBUG_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1578 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1579 | compiling a system for debugging. This variable defaults to "-O |
| 1580 | -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". |
| 1581 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1582 | :term:`DEBUG_PREFIX_MAP` |
| 1583 | Allows to set C compiler options, such as ``-fdebug-prefix-map``, |
| 1584 | ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to |
| 1585 | replace build-time paths by install-time ones in the debugging sections |
| 1586 | of binaries. This makes compiler output files location independent, |
| 1587 | at the cost of having to pass an extra command to tell the debugger |
| 1588 | where source files are. |
| 1589 | |
| 1590 | This is used by the Yocto Project to guarantee |
| 1591 | :doc:`/test-manual/reproducible-builds` even when the source code of |
| 1592 | a package uses the ``__FILE__`` or ``assert()`` macros. See the |
| 1593 | `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__ |
| 1594 | website for details. |
| 1595 | |
| 1596 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1597 | not intended to be user-configurable. |
| 1598 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1599 | :term:`DEFAULT_PREFERENCE` |
| 1600 | Specifies a weak bias for recipe selection priority. |
| 1601 | |
| 1602 | The most common usage of this is variable is to set it to "-1" within |
| 1603 | a recipe for a development version of a piece of software. Using the |
| 1604 | variable in this way causes the stable version of the recipe to build |
| 1605 | by default in the absence of :term:`PREFERRED_VERSION` being used to |
| 1606 | build the development version. |
| 1607 | |
| 1608 | .. note:: |
| 1609 | |
| 1610 | The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden |
| 1611 | by :term:`BBFILE_PRIORITY` if that variable is different between two |
| 1612 | layers that contain different versions of the same recipe. |
| 1613 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1614 | :term:`DEFAULTTUNE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1615 | The default CPU and Application Binary Interface (ABI) tunings (i.e. |
| 1616 | the "tune") used by the OpenEmbedded build system. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1617 | :term:`DEFAULTTUNE` helps define |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1618 | :term:`TUNE_FEATURES`. |
| 1619 | |
| 1620 | The default tune is either implicitly or explicitly set by the |
| 1621 | machine (:term:`MACHINE`). However, you can override |
| 1622 | the setting using available tunes as defined with |
| 1623 | :term:`AVAILTUNES`. |
| 1624 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1625 | :term:`DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1626 | Lists a recipe's build-time dependencies. These are dependencies on |
| 1627 | other recipes whose contents (e.g. headers and shared libraries) are |
| 1628 | needed by the recipe at build time. |
| 1629 | |
| 1630 | As an example, consider a recipe ``foo`` that contains the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1631 | assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1632 | |
| 1633 | DEPENDS = "bar" |
| 1634 | |
| 1635 | The practical effect of the previous |
| 1636 | assignment is that all files installed by bar will be available in |
| 1637 | the appropriate staging sysroot, given by the |
| 1638 | :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the |
| 1639 | :ref:`ref-tasks-configure` task for ``foo`` runs. |
| 1640 | This mechanism is implemented by having ``do_configure`` depend on |
| 1641 | the :ref:`ref-tasks-populate_sysroot` task of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1642 | each recipe listed in :term:`DEPENDS`, through a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1643 | ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` |
| 1644 | declaration in the :ref:`base <ref-classes-base>` class. |
| 1645 | |
| 1646 | .. note:: |
| 1647 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1648 | It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1649 | explicitly. The standard classes and build-related variables are |
| 1650 | configured to automatically use the appropriate staging sysroots. |
| 1651 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1652 | As another example, :term:`DEPENDS` can also be used to add utilities |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1653 | that run on the build machine during the build. For example, a recipe |
| 1654 | that makes use of a code generator built by the recipe ``codegen`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1655 | might have the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1656 | |
| 1657 | DEPENDS = "codegen-native" |
| 1658 | |
| 1659 | For more |
| 1660 | information, see the :ref:`native <ref-classes-native>` class and |
| 1661 | the :term:`EXTRANATIVEPATH` variable. |
| 1662 | |
| 1663 | .. note:: |
| 1664 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1665 | - :term:`DEPENDS` is a list of recipe names. Or, to be more precise, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1666 | it is a list of :term:`PROVIDES` names, which |
| 1667 | usually match recipe names. Putting a package name such as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1668 | "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1669 | instead, as this will put files from all the packages that make |
| 1670 | up ``foo``, which includes those from ``foo-dev``, into the |
| 1671 | sysroot. |
| 1672 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1673 | - One recipe having another recipe in :term:`DEPENDS` does not by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1674 | itself add any runtime dependencies between the packages |
| 1675 | produced by the two recipes. However, as explained in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1676 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1677 | section in the Yocto Project Overview and Concepts Manual, |
| 1678 | runtime dependencies will often be added automatically, meaning |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1679 | :term:`DEPENDS` alone is sufficient for most recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1680 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1681 | - Counterintuitively, :term:`DEPENDS` is often necessary even for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1682 | recipes that install precompiled components. For example, if |
| 1683 | ``libfoo`` is a precompiled library that links against |
| 1684 | ``libbar``, then linking against ``libfoo`` requires both |
| 1685 | ``libfoo`` and ``libbar`` to be available in the sysroot. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1686 | Without a :term:`DEPENDS` from the recipe that installs ``libfoo`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1687 | to the recipe that installs ``libbar``, other recipes might |
| 1688 | fail to link against ``libfoo``. |
| 1689 | |
| 1690 | For information on runtime dependencies, see the |
| 1691 | :term:`RDEPENDS` variable. You can also see the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1692 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 1693 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1694 | BitBake User Manual for additional information on tasks and |
| 1695 | dependencies. |
| 1696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1697 | :term:`DEPLOY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1698 | Points to the general area that the OpenEmbedded build system uses to |
| 1699 | place images, packages, SDKs, and other output files that are ready |
| 1700 | to be used outside of the build system. By default, this directory |
| 1701 | resides within the :term:`Build Directory` as |
| 1702 | ``${TMPDIR}/deploy``. |
| 1703 | |
| 1704 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1705 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1706 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1707 | ":ref:`overview-manual/concepts:images`", |
| 1708 | ":ref:`overview-manual/concepts:package feeds`", and |
| 1709 | ":ref:`overview-manual/concepts:application development sdk`" sections all in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1710 | Yocto Project Overview and Concepts Manual. |
| 1711 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1712 | :term:`DEPLOY_DIR_DEB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1713 | Points to the area that the OpenEmbedded build system uses to place |
| 1714 | Debian packages that are ready to be used outside of the build |
| 1715 | system. This variable applies only when |
| 1716 | :term:`PACKAGE_CLASSES` contains |
| 1717 | "package_deb". |
| 1718 | |
| 1719 | The BitBake configuration file initially defines the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1720 | :term:`DEPLOY_DIR_DEB` variable as a sub-folder of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1721 | :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1722 | |
| 1723 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
| 1724 | |
| 1725 | The :ref:`package_deb <ref-classes-package_deb>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1726 | :term:`DEPLOY_DIR_DEB` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1727 | :ref:`ref-tasks-package_write_deb` task |
| 1728 | writes Debian packages into the appropriate folder. For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1729 | information on how packaging works, see the |
| 1730 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1731 | in the Yocto Project Overview and Concepts Manual. |
| 1732 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1733 | :term:`DEPLOY_DIR_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1734 | Points to the area that the OpenEmbedded build system uses to place |
| 1735 | images and other associated output files that are ready to be |
| 1736 | deployed onto the target machine. The directory is machine-specific |
| 1737 | as it contains the ``${MACHINE}`` name. By default, this directory |
| 1738 | resides within the :term:`Build Directory` as |
| 1739 | ``${DEPLOY_DIR}/images/${MACHINE}/``. |
| 1740 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1741 | It must not be used directly in recipes when deploying files. Instead, |
| 1742 | it's only useful when a recipe needs to "read" a file already deployed |
| 1743 | by a dependency. So, it should be filled with the contents of |
| 1744 | :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or |
| 1745 | with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image |
| 1746 | <ref-classes-image>` class. |
| 1747 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1748 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1749 | ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1750 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1751 | ":ref:`overview-manual/concepts:images`" and |
| 1752 | ":ref:`overview-manual/concepts:application development sdk`" sections both in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1753 | the Yocto Project Overview and Concepts Manual. |
| 1754 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1755 | :term:`DEPLOY_DIR_IPK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1756 | Points to the area that the OpenEmbedded build system uses to place |
| 1757 | IPK packages that are ready to be used outside of the build system. |
| 1758 | This variable applies only when |
| 1759 | :term:`PACKAGE_CLASSES` contains |
| 1760 | "package_ipk". |
| 1761 | |
| 1762 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1763 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1764 | |
| 1765 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
| 1766 | |
| 1767 | The :ref:`package_ipk <ref-classes-package_ipk>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1768 | :term:`DEPLOY_DIR_IPK` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1769 | :ref:`ref-tasks-package_write_ipk` task |
| 1770 | writes IPK packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1771 | on how packaging works, see the |
| 1772 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1773 | in the Yocto Project Overview and Concepts Manual. |
| 1774 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1775 | :term:`DEPLOY_DIR_RPM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1776 | Points to the area that the OpenEmbedded build system uses to place |
| 1777 | RPM packages that are ready to be used outside of the build system. |
| 1778 | This variable applies only when |
| 1779 | :term:`PACKAGE_CLASSES` contains |
| 1780 | "package_rpm". |
| 1781 | |
| 1782 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1783 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1784 | |
| 1785 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
| 1786 | |
| 1787 | The :ref:`package_rpm <ref-classes-package_rpm>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1788 | :term:`DEPLOY_DIR_RPM` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1789 | :ref:`ref-tasks-package_write_rpm` task |
| 1790 | writes RPM packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1791 | on how packaging works, see the |
| 1792 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1793 | in the Yocto Project Overview and Concepts Manual. |
| 1794 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1795 | :term:`DEPLOY_DIR_TAR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1796 | Points to the area that the OpenEmbedded build system uses to place |
| 1797 | tarballs that are ready to be used outside of the build system. This |
| 1798 | variable applies only when |
| 1799 | :term:`PACKAGE_CLASSES` contains |
| 1800 | "package_tar". |
| 1801 | |
| 1802 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1803 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1804 | |
| 1805 | DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" |
| 1806 | |
| 1807 | The :ref:`package_tar <ref-classes-package_tar>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1808 | :term:`DEPLOY_DIR_TAR` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1809 | :ref:`ref-tasks-package_write_tar` task |
| 1810 | writes TAR packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1811 | on how packaging works, see the |
| 1812 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1813 | in the Yocto Project Overview and Concepts Manual. |
| 1814 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1815 | :term:`DEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1816 | When inheriting the :ref:`deploy <ref-classes-deploy>` class, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1817 | :term:`DEPLOYDIR` points to a temporary work area for deployed files that |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1818 | is set in the :ref:`deploy <ref-classes-deploy>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1819 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1820 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1821 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1822 | Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1823 | deployed into :term:`DEPLOYDIR`, and the class will take care of copying |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1824 | them into :term:`DEPLOY_DIR_IMAGE` |
| 1825 | afterwards. |
| 1826 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1827 | :term:`DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1828 | The package description used by package managers. If not set, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1829 | :term:`DESCRIPTION` takes the value of the :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1830 | variable. |
| 1831 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1832 | :term:`DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1833 | The short name of the distribution. For information on the long name |
| 1834 | of the distribution, see the :term:`DISTRO_NAME` |
| 1835 | variable. |
| 1836 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1837 | The :term:`DISTRO` variable corresponds to a distribution configuration |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1838 | file whose root name is the same as the variable's argument and whose |
| 1839 | filename extension is ``.conf``. For example, the distribution |
| 1840 | configuration file for the Poky distribution is named ``poky.conf`` |
| 1841 | and resides in the ``meta-poky/conf/distro`` directory of the |
| 1842 | :term:`Source Directory`. |
| 1843 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1844 | Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1845 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1846 | |
| 1847 | DISTRO = "poky" |
| 1848 | |
| 1849 | Distribution configuration files are located in a ``conf/distro`` |
| 1850 | directory within the :term:`Metadata` that contains the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1851 | distribution configuration. The value for :term:`DISTRO` must not contain |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1852 | spaces, and is typically all lower-case. |
| 1853 | |
| 1854 | .. note:: |
| 1855 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1856 | If the :term:`DISTRO` variable is blank, a set of default configurations |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1857 | are used, which are specified within |
| 1858 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1860 | :term:`DISTRO_CODENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1861 | Specifies a codename for the distribution being built. |
| 1862 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1863 | :term:`DISTRO_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1864 | Specifies a list of distro-specific packages to add to all images. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1865 | This variable takes effect through ``packagegroup-base`` so the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1866 | variable only really applies to the more full-featured images that |
| 1867 | include ``packagegroup-base``. You can use this variable to keep |
| 1868 | distro policy out of generic images. As with all other distro |
| 1869 | variables, you set this variable in the distro ``.conf`` file. |
| 1870 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1871 | :term:`DISTRO_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1872 | Specifies a list of distro-specific packages to add to all images if |
| 1873 | the packages exist. The packages might not exist or be empty (e.g. |
| 1874 | kernel modules). The list of packages are automatically installed but |
| 1875 | you can remove them. |
| 1876 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1877 | :term:`DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1878 | The software support you want in your distribution for various |
| 1879 | features. You define your distribution features in the distribution |
| 1880 | configuration file. |
| 1881 | |
| 1882 | In most cases, the presence or absence of a feature in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1883 | :term:`DISTRO_FEATURES` is translated to the appropriate option supplied |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1884 | to the configure script during the |
| 1885 | :ref:`ref-tasks-configure` task for recipes that |
| 1886 | optionally support the feature. For example, specifying "x11" in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1887 | :term:`DISTRO_FEATURES`, causes every piece of software built for the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1888 | target that can optionally support X11 to have its X11 support |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1889 | enabled. Note: just enabling :term:`DISTRO_FEATURES` alone doesn't |
| 1890 | enable feature support for packages, mechanisms such as making |
| 1891 | :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used |
| 1892 | to enable/disable package features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1893 | |
| 1894 | Two more examples are Bluetooth and NFS support. For a more complete |
| 1895 | list of features that ships with the Yocto Project and that you can |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1896 | provide with this variable, see the ":ref:`ref-features-distro`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1897 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1898 | :term:`DISTRO_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1899 | Features to be added to :term:`DISTRO_FEATURES` if not also present in |
| 1900 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1901 | |
| 1902 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1903 | not intended to be user-configurable. It is best to just reference |
| 1904 | the variable to see which distro features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1905 | all distro configurations. See the ":ref:`ref-features-backfill`" section |
| 1906 | for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1907 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1908 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1909 | Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be |
| 1910 | backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1911 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1912 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1913 | :term:`DISTRO_FEATURES_DEFAULT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1914 | A convenience variable that gives you the default list of distro |
| 1915 | features with the exception of any features specific to the C library |
| 1916 | (``libc``). |
| 1917 | |
| 1918 | When creating a custom distribution, you might find it useful to be |
| 1919 | able to reuse the default |
| 1920 | :term:`DISTRO_FEATURES` options without the |
| 1921 | need to write out the full set. Here is an example that uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1922 | :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1923 | |
| 1924 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" |
| 1925 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1926 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1927 | Specifies a list of features that if present in the target |
| 1928 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1929 | included in :term:`DISTRO_FEATURES` when building native recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1930 | variable is used in addition to the features filtered using the |
| 1931 | :term:`DISTRO_FEATURES_NATIVE` |
| 1932 | variable. |
| 1933 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1934 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1935 | Specifies a list of features that if present in the target |
| 1936 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1937 | included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1938 | variable is used in addition to the features filtered using the |
| 1939 | :term:`DISTRO_FEATURES_NATIVESDK` |
| 1940 | variable. |
| 1941 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1942 | :term:`DISTRO_FEATURES_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1943 | Specifies a list of features that should be included in |
| 1944 | :term:`DISTRO_FEATURES` when building native |
| 1945 | recipes. This variable is used in addition to the features filtered |
| 1946 | using the |
| 1947 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
| 1948 | variable. |
| 1949 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1950 | :term:`DISTRO_FEATURES_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1951 | Specifies a list of features that should be included in |
| 1952 | :term:`DISTRO_FEATURES` when building |
| 1953 | nativesdk recipes. This variable is used in addition to the features |
| 1954 | filtered using the |
| 1955 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
| 1956 | variable. |
| 1957 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1958 | :term:`DISTRO_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1959 | The long name of the distribution. For information on the short name |
| 1960 | of the distribution, see the :term:`DISTRO` variable. |
| 1961 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1962 | The :term:`DISTRO_NAME` variable corresponds to a distribution |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1963 | configuration file whose root name is the same as the variable's |
| 1964 | argument and whose filename extension is ``.conf``. For example, the |
| 1965 | distribution configuration file for the Poky distribution is named |
| 1966 | ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory |
| 1967 | of the :term:`Source Directory`. |
| 1968 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1969 | Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1970 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1971 | |
| 1972 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" |
| 1973 | |
| 1974 | Distribution configuration files are located in a ``conf/distro`` |
| 1975 | directory within the :term:`Metadata` that contains the |
| 1976 | distribution configuration. |
| 1977 | |
| 1978 | .. note:: |
| 1979 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1980 | If the :term:`DISTRO_NAME` variable is blank, a set of default |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1981 | configurations are used, which are specified within |
| 1982 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1983 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1984 | :term:`DISTRO_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1985 | The version of the distribution. |
| 1986 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1987 | :term:`DISTROOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1988 | A colon-separated list of overrides specific to the current |
| 1989 | distribution. By default, this list includes the value of |
| 1990 | :term:`DISTRO`. |
| 1991 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1992 | You can extend :term:`DISTROOVERRIDES` to add extra overrides that should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1993 | apply to the distribution. |
| 1994 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1995 | The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1996 | is included in the default value of |
| 1997 | :term:`OVERRIDES`. |
| 1998 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1999 | :term:`DL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2000 | The central download directory used by the build process to store |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2001 | downloads. By default, :term:`DL_DIR` gets files suitable for mirroring |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2002 | for everything except Git repositories. If you want tarballs of Git |
| 2003 | repositories, use the |
| 2004 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
| 2005 | variable. |
| 2006 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2007 | You can set this directory by defining the :term:`DL_DIR` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2008 | ``conf/local.conf`` file. This directory is self-maintaining and you |
| 2009 | should not have to touch it. By default, the directory is |
| 2010 | ``downloads`` in the :term:`Build Directory`. |
| 2011 | :: |
| 2012 | |
| 2013 | #DL_DIR ?= "${TOPDIR}/downloads" |
| 2014 | |
| 2015 | To specify a different download directory, |
| 2016 | simply remove the comment from the line and provide your directory. |
| 2017 | |
| 2018 | During a first build, the system downloads many different source code |
| 2019 | tarballs from various upstream projects. Downloading can take a |
| 2020 | while, particularly if your network connection is slow. Tarballs are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2021 | all stored in the directory defined by :term:`DL_DIR` and the build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2022 | system looks there first to find source tarballs. |
| 2023 | |
| 2024 | .. note:: |
| 2025 | |
| 2026 | When wiping and rebuilding, you can preserve this directory to |
| 2027 | speed up this part of subsequent builds. |
| 2028 | |
| 2029 | You can safely share this directory between multiple builds on the |
| 2030 | same development machine. For additional information on how the build |
| 2031 | process gets source files when working behind a firewall or proxy |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2032 | server, see this specific question in the ":doc:`faq`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2033 | chapter. You can also refer to the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2034 | ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2035 | Wiki page. |
| 2036 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2037 | :term:`DOC_COMPRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2038 | When inheriting the :ref:`compress_doc <ref-classes-compress_doc>` |
| 2039 | class, this variable sets the compression policy used when the |
| 2040 | OpenEmbedded build system compresses man pages and info pages. By |
| 2041 | default, the compression method used is gz (gzip). Other policies |
| 2042 | available are xz and bz2. |
| 2043 | |
| 2044 | For information on policies and on how to use this variable, see the |
| 2045 | comments in the ``meta/classes/compress_doc.bbclass`` file. |
| 2046 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2047 | :term:`EFI_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2048 | When building bootable images (i.e. where ``hddimg``, ``iso``, or |
| 2049 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2050 | :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2051 | default is "grub-efi", but "systemd-boot" can be used instead. |
| 2052 | |
| 2053 | See the :ref:`systemd-boot <ref-classes-systemd-boot>` and |
| 2054 | :ref:`image-live <ref-classes-image-live>` classes for more |
| 2055 | information. |
| 2056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2057 | :term:`ENABLE_BINARY_LOCALE_GENERATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2058 | Variable that controls which locales for ``glibc`` are generated |
| 2059 | during the build (useful if the target device has 64Mbytes of RAM or |
| 2060 | less). |
| 2061 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2062 | :term:`ERR_REPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2063 | When used with the :ref:`report-error <ref-classes-report-error>` |
| 2064 | class, specifies the path used for storing the debug files created by |
| 2065 | the :ref:`error reporting |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2066 | tool <dev-manual/common-tasks:using the error reporting tool>`, which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2067 | allows you to submit build errors you encounter to a central |
| 2068 | database. By default, the value of this variable is |
| 2069 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. |
| 2070 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2071 | You can set :term:`ERR_REPORT_DIR` to the path you want the error |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2072 | reporting tool to store the debug files as follows in your |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2073 | ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2074 | |
| 2075 | ERR_REPORT_DIR = "path" |
| 2076 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2077 | :term:`ERROR_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2078 | Specifies the quality assurance checks whose failures are reported as |
| 2079 | errors by the OpenEmbedded build system. You set this variable in |
| 2080 | your distribution configuration file. For a list of the checks you |
| 2081 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2082 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2083 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2084 | :term:`ESDK_CLASS_INHERIT_DISABLE` |
| 2085 | A list of classes to remove from the :term:`INHERIT` |
| 2086 | value globally within the extensible SDK configuration. The |
| 2087 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the |
| 2088 | default value:: |
| 2089 | |
| 2090 | ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc" |
| 2091 | |
| 2092 | Some classes are not generally applicable within the extensible SDK |
| 2093 | context. You can use this variable to disable those classes. |
| 2094 | |
| 2095 | For additional information on how to customize the extensible SDK's |
| 2096 | configuration, see the |
| 2097 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2098 | section in the Yocto Project Application Development and the |
| 2099 | Extensible Software Development Kit (eSDK) manual. |
| 2100 | |
| 2101 | :term:`ESDK_LOCALCONF_ALLOW` |
| 2102 | A list of variables allowed through from the OpenEmbedded build |
| 2103 | system configuration into the extensible SDK configuration. By |
| 2104 | default, the list of variables is empty and is set in the |
| 2105 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. |
| 2106 | |
| 2107 | This list overrides the variables specified using the |
| 2108 | :term:`ESDK_LOCALCONF_REMOVE` variable as well as |
| 2109 | other variables automatically added due to the "/" character |
| 2110 | being found at the start of the |
| 2111 | value, which is usually indicative of being a path and thus might not |
| 2112 | be valid on the system where the SDK is installed. |
| 2113 | |
| 2114 | For additional information on how to customize the extensible SDK's |
| 2115 | configuration, see the |
| 2116 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2117 | section in the Yocto Project Application Development and the |
| 2118 | Extensible Software Development Kit (eSDK) manual. |
| 2119 | |
| 2120 | :term:`ESDK_LOCALCONF_REMOVE` |
| 2121 | A list of variables not allowed through from the OpenEmbedded build |
| 2122 | system configuration into the extensible SDK configuration. Usually, |
| 2123 | these are variables that are specific to the machine on which the |
| 2124 | build system is running and thus would be potentially problematic |
| 2125 | within the extensible SDK. |
| 2126 | |
| 2127 | By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the |
| 2128 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and |
| 2129 | excludes the following variables: |
| 2130 | |
| 2131 | - :term:`CONF_VERSION` |
| 2132 | - :term:`BB_NUMBER_THREADS` |
| 2133 | - :term:`BB_NUMBER_PARSE_THREADS` |
| 2134 | - :term:`PARALLEL_MAKE` |
| 2135 | - :term:`PRSERV_HOST` |
| 2136 | - :term:`SSTATE_MIRRORS` :term:`DL_DIR` |
| 2137 | - :term:`SSTATE_DIR` :term:`TMPDIR` |
| 2138 | - :term:`BB_SERVER_TIMEOUT` |
| 2139 | |
| 2140 | For additional information on how to customize the extensible SDK's |
| 2141 | configuration, see the |
| 2142 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
| 2143 | section in the Yocto Project Application Development and the |
| 2144 | Extensible Software Development Kit (eSDK) manual. |
| 2145 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2146 | :term:`EXCLUDE_FROM_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2147 | Triggers the OpenEmbedded build system's shared libraries resolver to |
| 2148 | exclude an entire package when scanning for shared libraries. |
| 2149 | |
| 2150 | .. note:: |
| 2151 | |
| 2152 | The shared libraries resolver's functionality results in part from |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2153 | the internal function ``package_do_shlibs``, which is part of the |
| 2154 | :ref:`ref-tasks-package` task. You should be aware that the shared |
| 2155 | libraries resolver might implicitly define some dependencies between |
| 2156 | packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2157 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2158 | The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2159 | :term:`PRIVATE_LIBS` variable, which excludes a |
| 2160 | package's particular libraries only and not the whole package. |
| 2161 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2162 | Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2163 | particular package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2164 | |
| 2165 | EXCLUDE_FROM_SHLIBS = "1" |
| 2166 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2167 | :term:`EXCLUDE_FROM_WORLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2168 | Directs BitBake to exclude a recipe from world builds (i.e. |
| 2169 | ``bitbake world``). During world builds, BitBake locates, parses and |
| 2170 | builds all recipes found in every layer exposed in the |
| 2171 | ``bblayers.conf`` configuration file. |
| 2172 | |
| 2173 | To exclude a recipe from a world build using this variable, set the |
| 2174 | variable to "1" in the recipe. |
| 2175 | |
| 2176 | .. note:: |
| 2177 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2178 | Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2179 | world build in order to satisfy dependencies of other recipes. Adding |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2180 | a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2181 | explicitly added to the list of build targets in a world build. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2182 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2183 | :term:`EXTENDPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2184 | Used with file and pathnames to create a prefix for a recipe's |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2185 | version based on the recipe's :term:`PE` value. If :term:`PE` |
| 2186 | is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that |
| 2187 | value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1"). |
| 2188 | If a recipe's :term:`PE` is not set (the default) or is equal to zero, |
| 2189 | :term:`EXTENDPE` becomes "". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2190 | |
| 2191 | See the :term:`STAMP` variable for an example. |
| 2192 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2193 | :term:`EXTENDPKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2194 | The full package version specification as it appears on the final |
| 2195 | packages produced by a recipe. The variable's value is normally used |
| 2196 | to fix a runtime dependency to the exact same version of another |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2197 | package in the same recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2198 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2199 | RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2200 | |
| 2201 | The dependency relationships are intended to force the package |
| 2202 | manager to upgrade these types of packages in lock-step. |
| 2203 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2204 | :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2205 | When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2206 | tools are not in the source tree. |
| 2207 | |
| 2208 | When kernel tools are available in the tree, they are preferred over |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2209 | any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2210 | variable tells the OpenEmbedded build system to prefer the installed |
| 2211 | external tools. See the |
| 2212 | :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in |
| 2213 | ``meta/classes`` to see how the variable is used. |
| 2214 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2215 | :term:`EXTERNALSRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2216 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2217 | class, this variable points to the source tree, which is outside of |
| 2218 | the OpenEmbedded build system. When set, this variable sets the |
| 2219 | :term:`S` variable, which is what the OpenEmbedded build |
| 2220 | system uses to locate unpacked recipe source code. |
| 2221 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2222 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2223 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2224 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2225 | section in the Yocto Project Development Tasks Manual. |
| 2226 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2227 | :term:`EXTERNALSRC_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2228 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2229 | class, this variable points to the directory in which the recipe's |
| 2230 | source code is built, which is outside of the OpenEmbedded build |
| 2231 | system. When set, this variable sets the :term:`B` variable, |
| 2232 | which is what the OpenEmbedded build system uses to locate the Build |
| 2233 | Directory. |
| 2234 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2235 | See the ":ref:`ref-classes-externalsrc`" section for details. You |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2236 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2237 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2238 | section in the Yocto Project Development Tasks Manual. |
| 2239 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2240 | :term:`EXTRA_AUTORECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2241 | For recipes inheriting the :ref:`autotools <ref-classes-autotools>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2242 | class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2243 | pass to the ``autoreconf`` command that is executed during the |
| 2244 | :ref:`ref-tasks-configure` task. |
| 2245 | |
| 2246 | The default value is "--exclude=autopoint". |
| 2247 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2248 | :term:`EXTRA_IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2249 | A list of additional features to include in an image. When listing |
| 2250 | more than one feature, separate them with a space. |
| 2251 | |
| 2252 | Typically, you configure this variable in your ``local.conf`` file, |
| 2253 | which is found in the :term:`Build Directory`. |
| 2254 | Although you can use this variable from within a recipe, best |
| 2255 | practices dictate that you do not. |
| 2256 | |
| 2257 | .. note:: |
| 2258 | |
| 2259 | To enable primary features from within the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2260 | :term:`IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2261 | |
| 2262 | Here are some examples of features you can add: |
| 2263 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2264 | - "dbg-pkgs" --- adds -dbg packages for all installed packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2265 | symbol information for debugging and profiling. |
| 2266 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2267 | - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2268 | enables post-installation logging. See the 'allow-empty-password' and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2269 | 'post-install-logging' features in the ":ref:`ref-features-image`" |
| 2270 | section for more information. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2271 | - "dev-pkgs" --- adds -dev packages for all installed packages. This is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2272 | useful if you want to develop against the libraries in the image. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2273 | - "read-only-rootfs" --- creates an image whose root filesystem is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2274 | read-only. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2275 | ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2276 | section in the Yocto Project Development Tasks Manual for more |
| 2277 | information |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2278 | - "tools-debug" --- adds debugging tools such as gdb and strace. |
| 2279 | - "tools-sdk" --- adds development tools such as gcc, make, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2280 | pkgconfig and so forth. |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 2281 | - "tools-testapps" --- adds useful testing tools |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2282 | such as ts_print, aplay, arecord and so forth. |
| 2283 | |
| 2284 | For a complete list of image features that ships with the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2285 | Project, see the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2286 | |
| 2287 | For an example that shows how to customize your image by using this |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2288 | variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2289 | section in the Yocto Project Development Tasks Manual. |
| 2290 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2291 | :term:`EXTRA_IMAGECMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2292 | Specifies additional options for the image creation command that has |
| 2293 | been specified in :term:`IMAGE_CMD`. When setting |
| 2294 | this variable, use an override for the associated image type. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2295 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2296 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2297 | EXTRA_IMAGECMD:ext3 ?= "-i 4096" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2298 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2299 | :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2300 | A list of recipes to build that do not provide packages for |
| 2301 | installing into the root filesystem. |
| 2302 | |
| 2303 | Sometimes a recipe is required to build the final image but is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2304 | needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2305 | variable to list these recipes and thus specify the dependencies. A |
| 2306 | typical example is a required bootloader in a machine configuration. |
| 2307 | |
| 2308 | .. note:: |
| 2309 | |
| 2310 | To add packages to the root filesystem, see the various |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 2311 | :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2312 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2313 | :term:`EXTRA_OECMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2314 | Additional `CMake <https://cmake.org/overview/>`__ options. See the |
| 2315 | :ref:`cmake <ref-classes-cmake>` class for additional information. |
| 2316 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2317 | :term:`EXTRA_OECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2318 | Additional ``configure`` script options. See |
| 2319 | :term:`PACKAGECONFIG_CONFARGS` for |
| 2320 | additional information on passing configure script options. |
| 2321 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2322 | :term:`EXTRA_OEMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2323 | Additional GNU ``make`` options. |
| 2324 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2325 | Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2326 | variable to specify any required GNU options. |
| 2327 | |
| 2328 | :term:`PARALLEL_MAKE` and |
| 2329 | :term:`PARALLEL_MAKEINST` also make use of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2330 | :term:`EXTRA_OEMAKE` to pass the required flags. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2331 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2332 | :term:`EXTRA_OESCONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2333 | When inheriting the :ref:`scons <ref-classes-scons>` class, this |
| 2334 | variable specifies additional configuration options you want to pass |
| 2335 | to the ``scons`` command line. |
| 2336 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2337 | :term:`EXTRA_USERS_PARAMS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2338 | When inheriting the :ref:`extrausers <ref-classes-extrausers>` |
| 2339 | class, this variable provides image level user and group operations. |
| 2340 | This is a more global method of providing user and group |
| 2341 | configuration as compared to using the |
| 2342 | :ref:`useradd <ref-classes-useradd>` class, which ties user and |
| 2343 | group configurations to a specific recipe. |
| 2344 | |
| 2345 | The set list of commands you can configure using the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2346 | :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2347 | commands map to the normal Unix commands of the same names:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2348 | |
| 2349 | # EXTRA_USERS_PARAMS = "\ |
| 2350 | # useradd -p '' tester; \ |
| 2351 | # groupadd developers; \ |
| 2352 | # userdel nobody; \ |
| 2353 | # groupdel -g video; \ |
| 2354 | # groupmod -g 1020 developers; \ |
| 2355 | # usermod -s /bin/sh tester; \ |
| 2356 | # " |
| 2357 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 2358 | Hardcoded passwords are supported via the ``-p`` parameters for |
| 2359 | ``useradd`` or ``usermod``, but only hashed. |
| 2360 | |
| 2361 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns |
| 2362 | passwords. First on host, create the (escaped) password hash:: |
| 2363 | |
| 2364 | printf "%q" $(mkpasswd -m sha256crypt tester01) |
| 2365 | |
| 2366 | The resulting hash is set to a variable and used in ``useradd`` command parameters:: |
| 2367 | |
| 2368 | inherit extrausers |
| 2369 | PASSWD = "\$X\$ABC123\$A-Long-Hash" |
| 2370 | EXTRA_USERS_PARAMS = "\ |
| 2371 | useradd -p '${PASSWD}' tester-jim; \ |
| 2372 | useradd -p '${PASSWD}' tester-sue; \ |
| 2373 | " |
| 2374 | |
| 2375 | Finally, here is an example that sets the root password:: |
| 2376 | |
| 2377 | inherit extrausers |
| 2378 | EXTRA_USERS_PARAMS = "\ |
| 2379 | usermod -p '${PASSWD}' root; \ |
| 2380 | " |
| 2381 | |
| 2382 | .. note:: |
| 2383 | |
| 2384 | From a security perspective, hardcoding a default password is not |
| 2385 | generally a good idea or even legal in some jurisdictions. It is |
| 2386 | recommended that you do not do this if you are building a production |
| 2387 | image. |
| 2388 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2389 | Additionally there is a special ``passwd-expire`` command that will |
| 2390 | cause the password for a user to be expired and thus force changing it |
| 2391 | on first login, for example:: |
| 2392 | |
| 2393 | EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" |
| 2394 | |
| 2395 | .. note:: |
| 2396 | |
| 2397 | At present, ``passwd-expire`` may only work for remote logins when |
| 2398 | using OpenSSH and not dropbear as an SSH server. |
| 2399 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2400 | :term:`EXTRANATIVEPATH` |
| 2401 | A list of subdirectories of |
| 2402 | ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` |
| 2403 | added to the beginning of the environment variable ``PATH``. As an |
| 2404 | example, the following prepends |
| 2405 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to |
| 2406 | ``PATH``:: |
| 2407 | |
| 2408 | EXTRANATIVEPATH = "foo bar" |
| 2409 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2410 | :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2411 | Defines one or more packages to include in an image when a specific |
| 2412 | item is included in :term:`IMAGE_FEATURES`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2413 | When setting the value, :term:`FEATURE_PACKAGES` should have the name of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2414 | the feature item as an override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2415 | |
| 2416 | FEATURE_PACKAGES_widget = "package1 package2" |
| 2417 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2418 | In this example, if "widget" were added to :term:`IMAGE_FEATURES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2419 | package1 and package2 would be included in the image. |
| 2420 | |
| 2421 | .. note:: |
| 2422 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2423 | Packages installed by features defined through :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2424 | are often package groups. While similarly named, you should not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2425 | confuse the :term:`FEATURE_PACKAGES` variable with package groups, which |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2426 | are discussed elsewhere in the documentation. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2427 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2428 | :term:`FEED_DEPLOYDIR_BASE_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2429 | Points to the base URL of the server and location within the |
| 2430 | document-root that provides the metadata and packages required by |
| 2431 | OPKG to support runtime package management of IPK packages. You set |
| 2432 | this variable in your ``local.conf`` file. |
| 2433 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2434 | Consider the following example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2435 | |
| 2436 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" |
| 2437 | |
| 2438 | This example assumes you are serving |
| 2439 | your packages over HTTP and your databases are located in a directory |
| 2440 | named ``BOARD-dir``, which is underneath your HTTP server's |
| 2441 | document-root. In this case, the OpenEmbedded build system generates |
| 2442 | a set of configuration files for you in your target that work with |
| 2443 | the feed. |
| 2444 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2445 | :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2446 | The list of files and directories that are placed in a package. The |
| 2447 | :term:`PACKAGES` variable lists the packages |
| 2448 | generated by a recipe. |
| 2449 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2450 | To use the :term:`FILES` variable, provide a package name override that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2451 | identifies the resulting package. Then, provide a space-separated |
| 2452 | list of files or paths that identify the files you want included as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2453 | part of the resulting package. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2454 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2455 | FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2456 | |
| 2457 | .. note:: |
| 2458 | |
| 2459 | - When specifying files or paths, you can pattern match using |
| 2460 | Python's |
| 2461 | `glob <https://docs.python.org/3/library/glob.html>`_ |
| 2462 | syntax. For details on the syntax, see the documentation by |
| 2463 | following the previous link. |
| 2464 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2465 | - When specifying paths as part of the :term:`FILES` variable, it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2466 | good practice to use appropriate path variables. For example, |
| 2467 | use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` |
| 2468 | rather than ``/usr/bin``. You can find a list of these |
| 2469 | variables at the top of the ``meta/conf/bitbake.conf`` file in |
| 2470 | the :term:`Source Directory`. You will also |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2471 | find the default values of the various ``FILES:*`` variables in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2472 | this file. |
| 2473 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2474 | If some of the files you provide with the :term:`FILES` variable are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2475 | editable and you know they should not be overwritten during the |
| 2476 | package update process by the Package Management System (PMS), you |
| 2477 | can identify these files so that the PMS will not overwrite them. See |
| 2478 | the :term:`CONFFILES` variable for information on |
| 2479 | how to identify these files to the PMS. |
| 2480 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2481 | :term:`FILES_SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2482 | Defines the file specification to match |
| 2483 | :term:`SOLIBSDEV`. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2484 | :term:`FILES_SOLIBSDEV` defines the full path name of the development |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2485 | symbolic link (symlink) for shared libraries on the target platform. |
| 2486 | |
| 2487 | The following statement from the ``bitbake.conf`` shows how it is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2488 | set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2489 | |
| 2490 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
| 2491 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2492 | :term:`FILESEXTRAPATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2493 | Extends the search path the OpenEmbedded build system uses when |
| 2494 | looking for files and patches as it processes recipes and append |
| 2495 | files. The default directories BitBake uses when it processes recipes |
| 2496 | are initially defined by the :term:`FILESPATH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2497 | variable. You can extend :term:`FILESPATH` variable by using |
| 2498 | :term:`FILESEXTRAPATHS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2499 | |
| 2500 | Best practices dictate that you accomplish this by using |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2501 | :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2502 | prepend paths as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2503 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2504 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2505 | |
| 2506 | In the above example, the build system first |
| 2507 | looks for files in a directory that has the same name as the |
| 2508 | corresponding append file. |
| 2509 | |
| 2510 | .. note:: |
| 2511 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2512 | When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2513 | expansion (``:=``) operator. Immediate expansion makes sure that |
| 2514 | BitBake evaluates :term:`THISDIR` at the time the |
| 2515 | directive is encountered rather than at some later time when |
| 2516 | expansion might result in a directory that does not contain the |
| 2517 | files you need. |
| 2518 | |
| 2519 | Also, include the trailing separating colon character if you are |
| 2520 | prepending. The trailing colon character is necessary because you |
| 2521 | are directing BitBake to extend the path by prepending directories |
| 2522 | to the search path. |
| 2523 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2524 | Here is another common use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2525 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2526 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2527 | |
| 2528 | In this example, the build system extends the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2529 | :term:`FILESPATH` variable to include a directory named ``files`` that is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2530 | in the same directory as the corresponding append file. |
| 2531 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2532 | This next example specifically adds three paths:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2533 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2534 | FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2535 | |
| 2536 | A final example shows how you can extend the search path and include |
| 2537 | a :term:`MACHINE`-specific override, which is useful |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2538 | in a BSP layer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2539 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2540 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2541 | |
| 2542 | The previous statement appears in the |
| 2543 | ``linux-yocto-dev.bbappend`` file, which is found in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2544 | :ref:`overview-manual/development-environment:yocto project source repositories` in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2545 | ``meta-intel/common/recipes-kernel/linux``. Here, the machine |
| 2546 | override is a special :term:`PACKAGE_ARCH` |
| 2547 | definition for multiple ``meta-intel`` machines. |
| 2548 | |
| 2549 | .. note:: |
| 2550 | |
| 2551 | For a layer that supports a single BSP, the override could just be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2552 | the value of :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2553 | |
| 2554 | By prepending paths in ``.bbappend`` files, you allow multiple append |
| 2555 | files that reside in different layers but are used for the same |
| 2556 | recipe to correctly extend the path. |
| 2557 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2558 | :term:`FILESOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2559 | A subset of :term:`OVERRIDES` used by the |
| 2560 | OpenEmbedded build system for creating |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2561 | :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2562 | uses overrides to automatically extend the |
| 2563 | :term:`FILESPATH` variable. For an example of how |
| 2564 | that works, see the :term:`FILESPATH` variable |
| 2565 | description. Additionally, you find more information on how overrides |
| 2566 | are handled in the |
| 2567 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 2568 | section of the BitBake User Manual. |
| 2569 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2570 | By default, the :term:`FILESOVERRIDES` variable is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2571 | |
| 2572 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
| 2573 | |
| 2574 | .. note:: |
| 2575 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2576 | Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2577 | with expected overrides and are used in an expected manner by the |
| 2578 | build system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2579 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2580 | :term:`FILESPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2581 | The default set of directories the OpenEmbedded build system uses |
| 2582 | when searching for patches and files. |
| 2583 | |
| 2584 | During the build process, BitBake searches each directory in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2585 | :term:`FILESPATH` in the specified order when looking for files and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2586 | patches specified by each ``file://`` URI in a recipe's |
| 2587 | :term:`SRC_URI` statements. |
| 2588 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2589 | The default value for the :term:`FILESPATH` variable is defined in the |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2590 | :ref:`ref-classes-base` class found in ``meta/classes`` in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2591 | :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2592 | |
| 2593 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ |
| 2594 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" |
| 2595 | |
| 2596 | The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2597 | :term:`FILESPATH` variable is automatically extended using the overrides |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2598 | from the :term:`FILESOVERRIDES` variable. |
| 2599 | |
| 2600 | .. note:: |
| 2601 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2602 | - Do not hand-edit the :term:`FILESPATH` variable. If you want the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2603 | build system to look in directories other than the defaults, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2604 | extend the :term:`FILESPATH` variable by using the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2605 | :term:`FILESEXTRAPATHS` variable. |
| 2606 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2607 | - Be aware that the default :term:`FILESPATH` directories do not map |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2608 | to directories in custom layers where append files |
| 2609 | (``.bbappend``) are used. If you want the build system to find |
| 2610 | patches or files that reside with your append files, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2611 | to extend the :term:`FILESPATH` variable by using the |
| 2612 | :term:`FILESEXTRAPATHS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2613 | |
| 2614 | You can take advantage of this searching behavior in useful ways. For |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 2615 | example, consider a case where there is the following directory structure |
| 2616 | for general and machine-specific configurations:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2617 | |
| 2618 | files/defconfig |
| 2619 | files/MACHINEA/defconfig |
| 2620 | files/MACHINEB/defconfig |
| 2621 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2622 | Also in the example, the :term:`SRC_URI` statement contains |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2623 | "file://defconfig". Given this scenario, you can set |
| 2624 | :term:`MACHINE` to "MACHINEA" and cause the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2625 | system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2626 | "MACHINEB" and the build system uses files from ``files/MACHINEB``. |
| 2627 | Finally, for any machine other than "MACHINEA" and "MACHINEB", the |
| 2628 | build system uses files from ``files/defconfig``. |
| 2629 | |
| 2630 | You can find out more about the patching process in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2631 | ":ref:`overview-manual/concepts:patching`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2632 | in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2633 | ":ref:`dev-manual/common-tasks:patching code`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2634 | the Yocto Project Development Tasks Manual. See the |
| 2635 | :ref:`ref-tasks-patch` task as well. |
| 2636 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2637 | :term:`FILESYSTEM_PERMS_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2638 | Allows you to define your own file permissions settings table as part |
| 2639 | of your configuration for the packaging process. For example, suppose |
| 2640 | you need a consistent set of custom permissions for a set of groups |
| 2641 | and users across an entire work project. It is best to do this in the |
| 2642 | packages themselves but this is not always possible. |
| 2643 | |
| 2644 | By default, the OpenEmbedded build system uses the ``fs-perms.txt``, |
| 2645 | which is located in the ``meta/files`` folder in the :term:`Source Directory`. |
| 2646 | If you create your own file |
| 2647 | permissions setting table, you should place it in your layer or the |
| 2648 | distro's layer. |
| 2649 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2650 | You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2651 | ``conf/local.conf`` file, which is found in the :term:`Build Directory`, |
| 2652 | to point to your custom |
| 2653 | ``fs-perms.txt``. You can specify more than a single file permissions |
| 2654 | setting table. The paths you specify to these files must be defined |
| 2655 | within the :term:`BBPATH` variable. |
| 2656 | |
| 2657 | For guidance on how to create your own file permissions settings |
| 2658 | table file, examine the existing ``fs-perms.txt``. |
| 2659 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2660 | :term:`FIT_DESC` |
| 2661 | Specifies the description string encoded into a fitImage. The default |
| 2662 | value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2663 | class as follows:: |
| 2664 | |
| 2665 | FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" |
| 2666 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2667 | :term:`FIT_GENERATE_KEYS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2668 | Decides whether to generate the keys for signing fitImage if they |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2669 | don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2670 | The default value is 0. |
| 2671 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2672 | :term:`FIT_HASH_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2673 | Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256. |
| 2674 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2675 | :term:`FIT_KERNEL_COMP_ALG` |
| 2676 | Compression algorithm to use for the kernel image inside the FIT Image. |
| 2677 | At present, the only supported values are "gzip" (default) or "none" |
| 2678 | If you set this variable to anything other than "none" you may also need |
| 2679 | to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. |
| 2680 | |
| 2681 | :term:`FIT_KERNEL_COMP_ALG_EXTENSION` |
| 2682 | File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default |
| 2683 | value is ".gz". |
| 2684 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2685 | :term:`FIT_KEY_GENRSA_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2686 | Arguments to openssl genrsa for generating RSA private key for signing |
| 2687 | fitImage. The default value is "-F4". i.e. the public exponent 65537 to |
| 2688 | use. |
| 2689 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2690 | :term:`FIT_KEY_REQ_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2691 | Arguments to openssl req for generating certificate for signing fitImage. |
| 2692 | The default value is "-batch -new". batch for non interactive mode |
| 2693 | and new for generating new keys. |
| 2694 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2695 | :term:`FIT_KEY_SIGN_PKCS` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2696 | Format for public key certificate used in signing fitImage. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2697 | The default value is "x509". |
| 2698 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2699 | :term:`FIT_SIGN_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2700 | Specifies the signature algorithm used in creating the FIT Image. |
| 2701 | For e.g. rsa2048. |
| 2702 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2703 | :term:`FIT_SIGN_INDIVIDUAL` |
| 2704 | If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2705 | class will sign the kernel, dtb and ramdisk images individually in addition |
| 2706 | to signing the fitImage itself. This could be useful if you are |
| 2707 | intending to verify signatures in another context than booting via |
| 2708 | U-Boot. |
| 2709 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2710 | :term:`FIT_SIGN_NUMBITS` |
| 2711 | Size of private key in number of bits used in fitImage. The default |
| 2712 | value is "2048". |
| 2713 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2714 | :term:`FONT_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2715 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2716 | this variable specifies the runtime dependencies for font packages. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 2717 | By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2718 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2719 | :term:`FONT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2720 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2721 | this variable identifies packages containing font files that need to |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2722 | be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2723 | that fonts are in the recipe's main package (i.e. |
| 2724 | ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you |
| 2725 | need are in a package other than that main package. |
| 2726 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2727 | :term:`FORCE_RO_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2728 | Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` |
| 2729 | during the generation of the root filesystem. |
| 2730 | |
| 2731 | Set the variable to "1" to force the removal of these packages. |
| 2732 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2733 | :term:`FULL_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 2734 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2735 | compiling an optimized system. This variable defaults to "-O2 -pipe |
| 2736 | ${DEBUG_FLAGS}". |
| 2737 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2738 | :term:`GCCPIE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2739 | Enables Position Independent Executables (PIE) within the GNU C |
| 2740 | Compiler (GCC). Enabling PIE in the GCC makes Return Oriented |
| 2741 | Programming (ROP) attacks much more difficult to execute. |
| 2742 | |
| 2743 | By default the ``security_flags.inc`` file enables PIE by setting the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2744 | variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2745 | |
| 2746 | GCCPIE ?= "--enable-default-pie" |
| 2747 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2748 | :term:`GCCVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2749 | Specifies the default version of the GNU C Compiler (GCC) used for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2750 | compilation. By default, :term:`GCCVERSION` is set to "8.x" in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2751 | ``meta/conf/distro/include/tcmode-default.inc`` include file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2752 | |
| 2753 | GCCVERSION ?= "8.%" |
| 2754 | |
| 2755 | You can override this value by setting it in a |
| 2756 | configuration file such as the ``local.conf``. |
| 2757 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2758 | :term:`GDB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2759 | The minimal command and arguments to run the GNU Debugger. |
| 2760 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2761 | :term:`GIR_EXTRA_LIBS_PATH` |
| 2762 | Allows to specify an extra search path for ``.so`` files |
| 2763 | in GLib related recipes using GObject introspection, |
| 2764 | and which do not compile without this setting. |
| 2765 | See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`" |
| 2766 | section for details. |
| 2767 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2768 | :term:`GITDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2769 | The directory in which a local copy of a Git repository is stored |
| 2770 | when it is cloned. |
| 2771 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2772 | :term:`GLIBC_GENERATE_LOCALES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2773 | Specifies the list of GLIBC locales to generate should you not wish |
| 2774 | to generate all LIBC locals, which can be time consuming. |
| 2775 | |
| 2776 | .. note:: |
| 2777 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2778 | If you specifically remove the locale ``en_US.UTF-8``, you must set |
| 2779 | :term:`IMAGE_LINGUAS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2780 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2781 | You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2782 | By default, all locales are generated. |
| 2783 | :: |
| 2784 | |
| 2785 | GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" |
| 2786 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2787 | :term:`GROUPADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2788 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2789 | this variable specifies for a package what parameters should be |
| 2790 | passed to the ``groupadd`` command if you wish to add a group to the |
| 2791 | system when the package is installed. |
| 2792 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2793 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2794 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 2795 | GROUPADD_PARAM:${PN} = "-r netdev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2796 | |
| 2797 | For information on the standard Linux shell command |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2798 | ``groupadd``, see https://linux.die.net/man/8/groupadd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2799 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2800 | :term:`GROUPMEMS_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2801 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2802 | this variable specifies for a package what parameters should be |
| 2803 | passed to the ``groupmems`` command if you wish to modify the members |
| 2804 | of a group when the package is installed. |
| 2805 | |
| 2806 | For information on the standard Linux shell command ``groupmems``, |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2807 | see https://linux.die.net/man/8/groupmems. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2808 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2809 | :term:`GRUB_GFXSERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2810 | Configures the GNU GRand Unified Bootloader (GRUB) to have graphics |
| 2811 | and serial in the boot menu. Set this variable to "1" in your |
| 2812 | ``local.conf`` or distribution configuration file to enable graphics |
| 2813 | and serial in the menu. |
| 2814 | |
| 2815 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 2816 | information on how this variable is used. |
| 2817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2818 | :term:`GRUB_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2819 | Additional options to add to the GNU GRand Unified Bootloader (GRUB) |
| 2820 | configuration. Use a semi-colon character (``;``) to separate |
| 2821 | multiple options. |
| 2822 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2823 | The :term:`GRUB_OPTS` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2824 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2825 | on how this variable is used. |
| 2826 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2827 | :term:`GRUB_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2828 | Specifies the timeout before executing the default ``LABEL`` in the |
| 2829 | GNU GRand Unified Bootloader (GRUB). |
| 2830 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2831 | The :term:`GRUB_TIMEOUT` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2832 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2833 | on how this variable is used. |
| 2834 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2835 | :term:`GTKIMMODULES_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2836 | When inheriting the |
| 2837 | :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class, |
| 2838 | this variable specifies the packages that contain the GTK+ input |
| 2839 | method modules being installed when the modules are in packages other |
| 2840 | than the main package. |
| 2841 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2842 | :term:`HOMEPAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2843 | Website where more information about the software the recipe is |
| 2844 | building can be found. |
| 2845 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2846 | :term:`HOST_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2847 | The name of the target architecture, which is normally the same as |
| 2848 | :term:`TARGET_ARCH`. The OpenEmbedded build system |
| 2849 | supports many architectures. Here is an example list of architectures |
| 2850 | supported. This list is by no means complete as the architecture is |
| 2851 | configurable: |
| 2852 | |
| 2853 | - arm |
| 2854 | - i586 |
| 2855 | - x86_64 |
| 2856 | - powerpc |
| 2857 | - powerpc64 |
| 2858 | - mips |
| 2859 | - mipsel |
| 2860 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2861 | :term:`HOST_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2862 | Specifies architecture-specific compiler flags that are passed to the |
| 2863 | C compiler. |
| 2864 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2865 | Default initialization for :term:`HOST_CC_ARCH` varies depending on what |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2866 | is being built: |
| 2867 | |
| 2868 | - :term:`TARGET_CC_ARCH` when building for the |
| 2869 | target |
| 2870 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2871 | - :term:`BUILD_CC_ARCH` when building for the build host (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2872 | ``-native``) |
| 2873 | |
| 2874 | - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. |
| 2875 | ``nativesdk-``) |
| 2876 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2877 | :term:`HOST_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2878 | Specifies the name of the target operating system, which is normally |
| 2879 | the same as the :term:`TARGET_OS`. The variable can |
| 2880 | be set to "linux" for ``glibc``-based systems and to "linux-musl" for |
| 2881 | ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and |
| 2882 | "linux-musleabi" values possible. |
| 2883 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2884 | :term:`HOST_PREFIX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2885 | Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2886 | is normally the same as :term:`TARGET_PREFIX`. |
| 2887 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2888 | :term:`HOST_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2889 | Specifies the system, including the architecture and the operating |
| 2890 | system, for which the build is occurring in the context of the |
| 2891 | current recipe. |
| 2892 | |
| 2893 | The OpenEmbedded build system automatically sets this variable based |
| 2894 | on :term:`HOST_ARCH`, |
| 2895 | :term:`HOST_VENDOR`, and |
| 2896 | :term:`HOST_OS` variables. |
| 2897 | |
| 2898 | .. note:: |
| 2899 | |
| 2900 | You do not need to set the variable yourself. |
| 2901 | |
| 2902 | Consider these two examples: |
| 2903 | |
| 2904 | - Given a native recipe on a 32-bit x86 machine running Linux, the |
| 2905 | value is "i686-linux". |
| 2906 | |
| 2907 | - Given a recipe being built for a little-endian MIPS target running |
| 2908 | Linux, the value might be "mipsel-linux". |
| 2909 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2910 | :term:`HOST_VENDOR` |
| 2911 | Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the |
| 2912 | same as :term:`TARGET_VENDOR`. |
| 2913 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2914 | :term:`HOSTTOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2915 | A space-separated list (filter) of tools on the build host that |
| 2916 | should be allowed to be called from within build tasks. Using this |
| 2917 | filter helps reduce the possibility of host contamination. If a tool |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2918 | specified in the value of :term:`HOSTTOOLS` is not found on the build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2919 | host, the OpenEmbedded build system produces an error and the build |
| 2920 | is not started. |
| 2921 | |
| 2922 | For additional information, see |
| 2923 | :term:`HOSTTOOLS_NONFATAL`. |
| 2924 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2925 | :term:`HOSTTOOLS_NONFATAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2926 | A space-separated list (filter) of tools on the build host that |
| 2927 | should be allowed to be called from within build tasks. Using this |
| 2928 | filter helps reduce the possibility of host contamination. Unlike |
| 2929 | :term:`HOSTTOOLS`, the OpenEmbedded build system |
| 2930 | does not produce an error if a tool specified in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2931 | :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can |
| 2932 | use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2933 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2934 | :term:`ICECC_CLASS_DISABLE` |
| 2935 | Identifies user classes that you do not want the Icecream distributed |
| 2936 | compile support to consider. This variable is used by the |
| 2937 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2938 | your ``local.conf`` file. |
| 2939 | |
| 2940 | When you list classes using this variable, the recipes inheriting |
| 2941 | those classes will not benefit from distributed compilation across |
| 2942 | remote hosts. Instead they will be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2943 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2944 | :term:`ICECC_DISABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2945 | Disables or enables the ``icecc`` (Icecream) function. For more |
| 2946 | information on this function and best practices for using this |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2947 | variable, see the ":ref:`ref-classes-icecc`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2948 | section. |
| 2949 | |
| 2950 | Setting this variable to "1" in your ``local.conf`` disables the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2951 | function:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2952 | |
| 2953 | ICECC_DISABLED ??= "1" |
| 2954 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2955 | To enable the function, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2956 | |
| 2957 | ICECC_DISABLED = "" |
| 2958 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2959 | :term:`ICECC_ENV_EXEC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2960 | Points to the ``icecc-create-env`` script that you provide. This |
| 2961 | variable is used by the :ref:`icecc <ref-classes-icecc>` class. You |
| 2962 | set this variable in your ``local.conf`` file. |
| 2963 | |
| 2964 | If you do not point to a script that you provide, the OpenEmbedded |
| 2965 | build system uses the default script provided by the |
| 2966 | ``icecc-create-env.bb`` recipe, which is a modified version and not |
| 2967 | the one that comes with ``icecc``. |
| 2968 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2969 | :term:`ICECC_PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2970 | Extra options passed to the ``make`` command during the |
| 2971 | :ref:`ref-tasks-compile` task that specify parallel |
| 2972 | compilation. This variable usually takes the form of "-j x", where x |
| 2973 | represents the maximum number of parallel threads ``make`` can run. |
| 2974 | |
| 2975 | .. note:: |
| 2976 | |
| 2977 | The options passed affect builds on all enabled machines on the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2978 | network, which are machines running the ``iceccd`` daemon. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2979 | |
| 2980 | If your enabled machines support multiple cores, coming up with the |
| 2981 | maximum number of parallel threads that gives you the best |
| 2982 | performance could take some experimentation since machine speed, |
| 2983 | network lag, available memory, and existing machine loads can all |
| 2984 | affect build time. Consequently, unlike the |
| 2985 | :term:`PARALLEL_MAKE` variable, there is no |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2986 | rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2987 | performance. |
| 2988 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2989 | If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2990 | use it (i.e. the system does not detect and assign the number of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2991 | cores as is done with :term:`PARALLEL_MAKE`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2992 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2993 | :term:`ICECC_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2994 | The location of the ``icecc`` binary. You can set this variable in |
| 2995 | your ``local.conf`` file. If your ``local.conf`` file does not define |
| 2996 | this variable, the :ref:`icecc <ref-classes-icecc>` class attempts |
| 2997 | to define it by locating ``icecc`` using ``which``. |
| 2998 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2999 | :term:`ICECC_RECIPE_DISABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3000 | Identifies user recipes that you do not want the Icecream distributed |
| 3001 | compile support to consider. This variable is used by the |
| 3002 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 3003 | your ``local.conf`` file. |
| 3004 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3005 | When you list recipes using this variable, you are excluding them |
| 3006 | from distributed compilation across remote hosts. Instead they will |
| 3007 | be built locally. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3008 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3009 | :term:`ICECC_RECIPE_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3010 | Identifies user recipes that use an empty |
| 3011 | :term:`PARALLEL_MAKE` variable that you want to |
| 3012 | force remote distributed compilation on using the Icecream |
| 3013 | distributed compile support. This variable is used by the |
| 3014 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 3015 | your ``local.conf`` file. |
| 3016 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3017 | :term:`IMAGE_BASENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3018 | The base name of image output files. This variable defaults to the |
| 3019 | recipe name (``${``\ :term:`PN`\ ``}``). |
| 3020 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3021 | :term:`IMAGE_BOOT_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3022 | A space-separated list of files installed into the boot partition |
| 3023 | when preparing an image using the Wic tool with the |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3024 | ``bootimg-partition`` source plugin. By default, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3025 | the files are |
| 3026 | installed under the same name as the source files. To change the |
| 3027 | installed name, separate it from the original name with a semi-colon |
| 3028 | (;). Source files need to be located in |
| 3029 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3030 | examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3031 | |
| 3032 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" |
| 3033 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" |
| 3034 | |
| 3035 | Alternatively, source files can be picked up using a glob pattern. In |
| 3036 | this case, the destination file must have the same name as the base |
| 3037 | name of the source file path. To install files into a directory |
| 3038 | within the target location, pass its name after a semi-colon (;). |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3039 | Here are two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3040 | |
| 3041 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" |
| 3042 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" |
| 3043 | |
| 3044 | The first example |
| 3045 | installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` |
| 3046 | into the root of the target partition. The second example installs |
| 3047 | the same files into a ``boot`` directory within the target partition. |
| 3048 | |
| 3049 | You can find information on how to use the Wic tool in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3050 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3051 | section of the Yocto Project Development Tasks Manual. Reference |
| 3052 | material for Wic is located in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3053 | ":doc:`/ref-manual/kickstart`" chapter. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3054 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3055 | :term:`IMAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3056 | A list of classes that all images should inherit. You typically use |
| 3057 | this variable to specify the list of classes that register the |
| 3058 | different types of images the OpenEmbedded build system creates. |
| 3059 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3060 | The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3061 | set this variable in your ``local.conf`` or in a distribution |
| 3062 | configuration file. |
| 3063 | |
| 3064 | For more information, see ``meta/classes/image_types.bbclass`` in the |
| 3065 | :term:`Source Directory`. |
| 3066 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3067 | :term:`IMAGE_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3068 | Specifies the command to create the image file for a specific image |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3069 | type, which corresponds to the value set in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3070 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, |
| 3071 | ``btrfs``, and so forth). When setting this variable, you should use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3072 | an override for the associated type. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3073 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3074 | IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3075 | --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3076 | ${EXTRA_IMAGECMD}" |
| 3077 | |
| 3078 | You typically do not need to set this variable unless you are adding |
| 3079 | support for a new image type. For more examples on how to set this |
| 3080 | variable, see the :ref:`image_types <ref-classes-image_types>` |
| 3081 | class file, which is ``meta/classes/image_types.bbclass``. |
| 3082 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3083 | :term:`IMAGE_DEVICE_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3084 | Specifies one or more files that contain custom device tables that |
| 3085 | are passed to the ``makedevs`` command as part of creating an image. |
| 3086 | These files list basic device nodes that should be created under |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3087 | ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3088 | ``files/device_table-minimal.txt`` is used, which is located by |
| 3089 | :term:`BBPATH`. For details on how you should write |
| 3090 | device table files, see ``meta/files/device_table-minimal.txt`` as an |
| 3091 | example. |
| 3092 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3093 | :term:`IMAGE_EFI_BOOT_FILES` |
| 3094 | A space-separated list of files installed into the boot partition |
| 3095 | when preparing an image using the Wic tool with the |
| 3096 | ``bootimg-efi`` source plugin. By default, |
| 3097 | the files are |
| 3098 | installed under the same name as the source files. To change the |
| 3099 | installed name, separate it from the original name with a semi-colon |
| 3100 | (;). Source files need to be located in |
| 3101 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
| 3102 | examples:: |
| 3103 | |
| 3104 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" |
| 3105 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" |
| 3106 | |
| 3107 | Alternatively, source files can be picked up using a glob pattern. In |
| 3108 | this case, the destination file must have the same name as the base |
| 3109 | name of the source file path. To install files into a directory |
| 3110 | within the target location, pass its name after a semi-colon (;). |
| 3111 | Here are two examples:: |
| 3112 | |
| 3113 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" |
| 3114 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" |
| 3115 | |
| 3116 | The first example |
| 3117 | installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` |
| 3118 | into the root of the target partition. The second example installs |
| 3119 | the same files into a ``boot`` directory within the target partition. |
| 3120 | |
| 3121 | You can find information on how to use the Wic tool in the |
| 3122 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
| 3123 | section of the Yocto Project Development Tasks Manual. Reference |
| 3124 | material for Wic is located in the |
| 3125 | ":doc:`/ref-manual/kickstart`" chapter. |
| 3126 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3127 | :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3128 | The primary list of features to include in an image. Typically, you |
| 3129 | configure this variable in an image recipe. Although you can use this |
| 3130 | variable from your ``local.conf`` file, which is found in the |
| 3131 | :term:`Build Directory`, best practices dictate that you do |
| 3132 | not. |
| 3133 | |
| 3134 | .. note:: |
| 3135 | |
| 3136 | To enable extra features from outside the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3137 | :term:`EXTRA_IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3138 | |
| 3139 | For a list of image features that ships with the Yocto Project, see |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3140 | the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3141 | |
| 3142 | For an example that shows how to customize your image by using this |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3143 | variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3144 | section in the Yocto Project Development Tasks Manual. |
| 3145 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3146 | :term:`IMAGE_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3147 | Specifies the formats the OpenEmbedded build system uses during the |
| 3148 | build when creating the root filesystem. For example, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3149 | :term:`IMAGE_FSTYPES` as follows causes the build system to create root |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3150 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3151 | |
| 3152 | IMAGE_FSTYPES = "ext3 tar.bz2" |
| 3153 | |
| 3154 | For the complete list of supported image formats from which you can |
| 3155 | choose, see :term:`IMAGE_TYPES`. |
| 3156 | |
| 3157 | .. note:: |
| 3158 | |
| 3159 | - If an image recipe uses the "inherit image" line and you are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3160 | setting :term:`IMAGE_FSTYPES` inside the recipe, you must set |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3161 | :term:`IMAGE_FSTYPES` prior to using the "inherit image" line. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3162 | |
| 3163 | - Due to the way the OpenEmbedded build system processes this |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3164 | variable, you cannot update its contents by using ``:append`` |
| 3165 | or ``:prepend``. You must use the ``+=`` operator to add one or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3166 | more options to the :term:`IMAGE_FSTYPES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3167 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3168 | :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3169 | Used by recipes to specify the packages to install into an image |
| 3170 | through the :ref:`image <ref-classes-image>` class. Use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3171 | :term:`IMAGE_INSTALL` variable with care to avoid ordering issues. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3172 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3173 | Image recipes set :term:`IMAGE_INSTALL` to specify the packages to |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3174 | install into an image through :ref:`ref-classes-image`. Additionally, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3175 | there are "helper" classes such as the |
| 3176 | :ref:`core-image <ref-classes-core-image>` class which can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3177 | take lists used with :term:`IMAGE_FEATURES` and turn them into |
| 3178 | auto-generated entries in :term:`IMAGE_INSTALL` in addition to its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3179 | default contents. |
| 3180 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3181 | When you use this variable, it is best to use it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3182 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3183 | IMAGE_INSTALL:append = " package-name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3184 | |
| 3185 | Be sure to include the space |
| 3186 | between the quotation character and the start of the package name or |
| 3187 | names. |
| 3188 | |
| 3189 | .. note:: |
| 3190 | |
| 3191 | - When working with a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3192 | :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3193 | image, do not use the :term:`IMAGE_INSTALL` variable to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3194 | packages for installation. Instead, use the |
| 3195 | :term:`PACKAGE_INSTALL` variable, which |
| 3196 | allows the initial RAM filesystem (initramfs) recipe to use a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3197 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3198 | For information on creating an initramfs, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3199 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3200 | section in the Yocto Project Development Tasks Manual. |
| 3201 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3202 | - Using :term:`IMAGE_INSTALL` with the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3203 | :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3204 | BitBake operator within the ``/conf/local.conf`` file or from |
| 3205 | within an image recipe is not recommended. Use of this operator |
| 3206 | in these ways can cause ordering issues. Since |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3207 | :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3208 | value using the |
| 3209 | :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3210 | operator, using a ``+=`` operation against :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3211 | results in unexpected behavior when used within |
| 3212 | ``conf/local.conf``. Furthermore, the same operation from |
| 3213 | within an image recipe may or may not succeed depending on the |
| 3214 | specific situation. In both these cases, the behavior is |
| 3215 | contrary to how most users expect the ``+=`` operator to work. |
| 3216 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3217 | :term:`IMAGE_LINGUAS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3218 | Specifies the list of locales to install into the image during the |
| 3219 | root filesystem construction process. The OpenEmbedded build system |
| 3220 | automatically splits locale files, which are used for localization, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3221 | into separate packages. Setting the :term:`IMAGE_LINGUAS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3222 | ensures that any locale packages that correspond to packages already |
| 3223 | selected for installation into the image are also installed. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3224 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3225 | |
| 3226 | IMAGE_LINGUAS = "pt-br de-de" |
| 3227 | |
| 3228 | In this example, the build system ensures any Brazilian Portuguese |
| 3229 | and German locale files that correspond to packages in the image are |
| 3230 | installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as |
| 3231 | ``*-locale-pt`` and ``*-locale-de``, since some software packages |
| 3232 | only provide locale files by language and not by country-specific |
| 3233 | language). |
| 3234 | |
| 3235 | See the :term:`GLIBC_GENERATE_LOCALES` |
| 3236 | variable for information on generating GLIBC locales. |
| 3237 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3238 | |
| 3239 | :term:`IMAGE_LINK_NAME` |
| 3240 | The name of the output image symlink (which does not include |
| 3241 | the version part as :term:`IMAGE_NAME` does). The default value |
| 3242 | is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3243 | variables:: |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3244 | |
| 3245 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" |
| 3246 | |
| 3247 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3248 | :term:`IMAGE_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3249 | The manifest file for the image. This file lists all the installed |
| 3250 | packages that make up the image. The file contains package |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3251 | information on a line-per-package basis as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3252 | |
| 3253 | packagename packagearch version |
| 3254 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3255 | The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3256 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3257 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3258 | IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3259 | |
| 3260 | The location is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3261 | derived using the :term:`IMGDEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3262 | and :term:`IMAGE_NAME` variables. You can find |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3263 | information on how the image is created in the ":ref:`overview-manual/concepts:image generation`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3264 | section in the Yocto Project Overview and Concepts Manual. |
| 3265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3266 | :term:`IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3267 | The name of the output image files minus the extension. This variable |
| 3268 | is derived using the :term:`IMAGE_BASENAME`, |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3269 | :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3270 | variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3271 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3272 | IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3273 | |
| 3274 | :term:`IMAGE_NAME_SUFFIX` |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3275 | Suffix used for the image output filename --- defaults to ``".rootfs"`` |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3276 | to distinguish the image file from other files created during image |
| 3277 | building; however if this suffix is redundant or not desired you can |
| 3278 | clear the value of this variable (set the value to ""). For example, |
| 3279 | this is typically cleared in initramfs image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3280 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3281 | :term:`IMAGE_OVERHEAD_FACTOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3282 | Defines a multiplier that the build system applies to the initial |
| 3283 | image size for cases when the multiplier times the returned disk |
| 3284 | usage value for the image is greater than the sum of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3285 | :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3286 | the multiplier applied to the initial image size creates free disk |
| 3287 | space in the image as overhead. By default, the build process uses a |
| 3288 | multiplier of 1.3 for this variable. This default value results in |
| 3289 | 30% free disk space added to the image when this method is used to |
| 3290 | determine the final generated image size. You should be aware that |
| 3291 | post install scripts and the package management system uses disk |
| 3292 | space inside this overhead area. Consequently, the multiplier does |
| 3293 | not produce an image with all the theoretical free disk space. See |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3294 | :term:`IMAGE_ROOTFS_SIZE` for information on how the build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3295 | determines the overall image size. |
| 3296 | |
| 3297 | The default 30% free disk space typically gives the image enough room |
| 3298 | to boot and allows for basic post installs while still leaving a |
| 3299 | small amount of free disk space. If 30% free space is inadequate, you |
| 3300 | can increase the default value. For example, the following setting |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3301 | gives you 50% free space added to the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3302 | |
| 3303 | IMAGE_OVERHEAD_FACTOR = "1.5" |
| 3304 | |
| 3305 | Alternatively, you can ensure a specific amount of free disk space is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3306 | added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3307 | variable. |
| 3308 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3309 | :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3310 | Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the |
| 3311 | OpenEmbedded build system. The variable is defined appropriately by |
| 3312 | the :ref:`package_deb <ref-classes-package_deb>`, |
| 3313 | :ref:`package_rpm <ref-classes-package_rpm>`, |
| 3314 | :ref:`package_ipk <ref-classes-package_ipk>`, or |
| 3315 | :ref:`package_tar <ref-classes-package_tar>` class. |
| 3316 | |
| 3317 | .. note:: |
| 3318 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3319 | The ``package_tar`` class is broken and is not supported. It is |
| 3320 | recommended that you do not use it. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3321 | |
| 3322 | The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3323 | :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3324 | for packaging up images and SDKs. |
| 3325 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3326 | You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3327 | variable is set indirectly through the appropriate |
| 3328 | :ref:`package_* <ref-classes-package>` class using the |
| 3329 | :term:`PACKAGE_CLASSES` variable. The |
| 3330 | OpenEmbedded build system uses the first package type (e.g. DEB, RPM, |
| 3331 | or IPK) that appears with the variable |
| 3332 | |
| 3333 | .. note:: |
| 3334 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3335 | Files using the ``.tar`` format are never used as a substitute |
| 3336 | packaging format for DEB, RPM, and IPK formatted files for your image |
| 3337 | or SDK. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3338 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3339 | :term:`IMAGE_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3340 | Specifies a list of functions to call once the OpenEmbedded build |
| 3341 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3342 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3343 | |
| 3344 | IMAGE_POSTPROCESS_COMMAND += "function; ... " |
| 3345 | |
| 3346 | If you need to pass the root filesystem path to a command within the |
| 3347 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3348 | directory that becomes the root filesystem image. See the |
| 3349 | :term:`IMAGE_ROOTFS` variable for more |
| 3350 | information. |
| 3351 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3352 | :term:`IMAGE_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3353 | Specifies a list of functions to call before the OpenEmbedded build |
| 3354 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3355 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3356 | |
| 3357 | IMAGE_PREPROCESS_COMMAND += "function; ... " |
| 3358 | |
| 3359 | If you need to pass the root filesystem path to a command within the |
| 3360 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3361 | directory that becomes the root filesystem image. See the |
| 3362 | :term:`IMAGE_ROOTFS` variable for more |
| 3363 | information. |
| 3364 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3365 | :term:`IMAGE_ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3366 | The location of the root filesystem while it is under construction |
| 3367 | (i.e. during the :ref:`ref-tasks-rootfs` task). This |
| 3368 | variable is not configurable. Do not change it. |
| 3369 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3370 | :term:`IMAGE_ROOTFS_ALIGNMENT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3371 | Specifies the alignment for the output image file in Kbytes. If the |
| 3372 | size of the image is not a multiple of this value, then the size is |
| 3373 | rounded up to the nearest multiple of the value. The default value is |
| 3374 | "1". See :term:`IMAGE_ROOTFS_SIZE` for |
| 3375 | additional information. |
| 3376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3377 | :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3378 | Defines additional free disk space created in the image in Kbytes. By |
| 3379 | default, this variable is set to "0". This free disk space is added |
| 3380 | to the image after the build system determines the image size as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3381 | described in :term:`IMAGE_ROOTFS_SIZE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3382 | |
| 3383 | This variable is particularly useful when you want to ensure that a |
| 3384 | specific amount of free disk space is available on a device after an |
| 3385 | image is installed and running. For example, to be sure 5 Gbytes of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3386 | free disk space is available, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3387 | |
| 3388 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" |
| 3389 | |
| 3390 | For example, the Yocto Project Build Appliance specifically requests |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3391 | 40 Gbytes of extra space with the line:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3392 | |
| 3393 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" |
| 3394 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3395 | :term:`IMAGE_ROOTFS_SIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3396 | Defines the size in Kbytes for the generated image. The OpenEmbedded |
| 3397 | build system determines the final size for the generated image using |
| 3398 | an algorithm that takes into account the initial disk space used for |
| 3399 | the generated image, a requested size for the image, and requested |
| 3400 | additional free disk space to be added to the image. Programatically, |
| 3401 | the build system determines the final size of the generated image as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3402 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3403 | |
| 3404 | if (image-du * overhead) < rootfs-size: |
| 3405 | internal-rootfs-size = rootfs-size + xspace |
| 3406 | else: |
| 3407 | internal-rootfs-size = (image-du * overhead) + xspace |
| 3408 | where: |
| 3409 | image-du = Returned value of the du command on the image. |
| 3410 | overhead = IMAGE_OVERHEAD_FACTOR |
| 3411 | rootfs-size = IMAGE_ROOTFS_SIZE |
| 3412 | internal-rootfs-size = Initial root filesystem size before any modifications. |
| 3413 | xspace = IMAGE_ROOTFS_EXTRA_SPACE |
| 3414 | |
| 3415 | See the :term:`IMAGE_OVERHEAD_FACTOR` |
| 3416 | and :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
| 3417 | variables for related information. |
| 3418 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3419 | :term:`IMAGE_TYPEDEP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3420 | Specifies a dependency from one image type on another. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3421 | example from the :ref:`image-live <ref-classes-image-live>` class:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3422 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3423 | IMAGE_TYPEDEP:live = "ext3" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3424 | |
| 3425 | In the previous example, the variable ensures that when "live" is |
| 3426 | listed with the :term:`IMAGE_FSTYPES` variable, |
| 3427 | the OpenEmbedded build system produces an ``ext3`` image first since |
| 3428 | one of the components of the live image is an ``ext3`` formatted |
| 3429 | partition containing the root filesystem. |
| 3430 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3431 | :term:`IMAGE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3432 | Specifies the complete list of supported image types by default: |
| 3433 | |
| 3434 | - btrfs |
| 3435 | - container |
| 3436 | - cpio |
| 3437 | - cpio.gz |
| 3438 | - cpio.lz4 |
| 3439 | - cpio.lzma |
| 3440 | - cpio.xz |
| 3441 | - cramfs |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3442 | - erofs |
| 3443 | - erofs-lz4 |
| 3444 | - erofs-lz4hc |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3445 | - ext2 |
| 3446 | - ext2.bz2 |
| 3447 | - ext2.gz |
| 3448 | - ext2.lzma |
| 3449 | - ext3 |
| 3450 | - ext3.gz |
| 3451 | - ext4 |
| 3452 | - ext4.gz |
| 3453 | - f2fs |
| 3454 | - hddimg |
| 3455 | - iso |
| 3456 | - jffs2 |
| 3457 | - jffs2.sum |
| 3458 | - multiubi |
| 3459 | - squashfs |
| 3460 | - squashfs-lz4 |
| 3461 | - squashfs-lzo |
| 3462 | - squashfs-xz |
| 3463 | - tar |
| 3464 | - tar.bz2 |
| 3465 | - tar.gz |
| 3466 | - tar.lz4 |
| 3467 | - tar.xz |
| 3468 | - tar.zst |
| 3469 | - ubi |
| 3470 | - ubifs |
| 3471 | - wic |
| 3472 | - wic.bz2 |
| 3473 | - wic.gz |
| 3474 | - wic.lzma |
| 3475 | |
| 3476 | For more information about these types of images, see |
| 3477 | ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`. |
| 3478 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3479 | :term:`IMAGE_VERSION_SUFFIX` |
| 3480 | Version suffix that is part of the default :term:`IMAGE_NAME` and |
| 3481 | :term:`KERNEL_ARTIFACT_NAME` values. |
| 3482 | Defaults to ``"-${DATETIME}"``, however you could set this to a |
| 3483 | version string that comes from your external build environment if |
| 3484 | desired, and this suffix would then be used consistently across |
| 3485 | the build artifacts. |
| 3486 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3487 | :term:`IMGDEPLOYDIR` |
| 3488 | When inheriting the :ref:`image <ref-classes-image>` class directly or |
| 3489 | through the :ref:`core-image <ref-classes-core-image>` class, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3490 | :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3491 | that is set in the ``image`` class as follows:: |
| 3492 | |
| 3493 | IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" |
| 3494 | |
| 3495 | Recipes inheriting the ``image`` class should copy files to be |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3496 | deployed into :term:`IMGDEPLOYDIR`, and the class will take care of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3497 | copying them into :term:`DEPLOY_DIR_IMAGE` afterwards. |
| 3498 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3499 | :term:`INC_PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3500 | Helps define the recipe revision for recipes that share a common |
| 3501 | ``include`` file. You can think of this variable as part of the |
| 3502 | recipe revision as set from within an include file. |
| 3503 | |
| 3504 | Suppose, for example, you have a set of recipes that are used across |
| 3505 | several projects. And, within each of those recipes the revision (its |
| 3506 | :term:`PR` value) is set accordingly. In this case, when |
| 3507 | the revision of those recipes changes, the burden is on you to find |
| 3508 | all those recipes and be sure that they get changed to reflect the |
| 3509 | updated version of the recipe. In this scenario, it can get |
| 3510 | complicated when recipes that are used in many places and provide |
| 3511 | common functionality are upgraded to a new revision. |
| 3512 | |
| 3513 | A more efficient way of dealing with this situation is to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3514 | :term:`INC_PR` variable inside the ``include`` files that the recipes |
| 3515 | share and then expand the :term:`INC_PR` variable within the recipes to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3516 | help define the recipe revision. |
| 3517 | |
| 3518 | The following provides an example that shows how to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3519 | :term:`INC_PR` variable given a common ``include`` file that defines the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3520 | variable. Once the variable is defined in the ``include`` file, you |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3521 | can use the variable to set the :term:`PR` values in each recipe. You |
| 3522 | will notice that when you set a recipe's :term:`PR` you can provide more |
| 3523 | granular revisioning by appending values to the :term:`INC_PR` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3524 | |
| 3525 | recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" |
| 3526 | recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" |
| 3527 | recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0" |
| 3528 | recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" |
| 3529 | |
| 3530 | The |
| 3531 | first line of the example establishes the baseline revision to be |
| 3532 | used for all recipes that use the ``include`` file. The remaining |
| 3533 | lines in the example are from individual recipes and show how the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3534 | :term:`PR` value is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3535 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3536 | :term:`INCOMPATIBLE_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3537 | Specifies a space-separated list of license names (as they would |
| 3538 | appear in :term:`LICENSE`) that should be excluded |
| 3539 | from the build. Recipes that provide no alternatives to listed |
| 3540 | incompatible licenses are not built. Packages that are individually |
| 3541 | licensed with the specified incompatible licenses will be deleted. |
| 3542 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 3543 | There is some support for wildcards in this variable's value, |
| 3544 | however it is restricted to specific licenses. Currently only |
| 3545 | these wildcards are allowed and expand as follows: |
| 3546 | |
| 3547 | - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later`` |
| 3548 | - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later`` |
| 3549 | - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later`` |
| 3550 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3551 | .. note:: |
| 3552 | |
| 3553 | This functionality is only regularly tested using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3554 | setting:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3555 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3556 | INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3557 | |
| 3558 | |
| 3559 | Although you can use other settings, you might be required to |
| 3560 | remove dependencies on or provide alternatives to components that |
| 3561 | are required to produce a functional system image. |
| 3562 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 3563 | :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS` |
| 3564 | Specifies a space-separated list of package and license pairs that |
| 3565 | are allowed to be used even if the license is specified in |
| 3566 | :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are |
| 3567 | separated using a colon. Example:: |
| 3568 | |
| 3569 | INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only" |
| 3570 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3571 | :term:`INHERIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3572 | Causes the named class or classes to be inherited globally. Anonymous |
| 3573 | functions in the class or classes are not executed for the base |
| 3574 | configuration and in each individual recipe. The OpenEmbedded build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3575 | system ignores changes to :term:`INHERIT` in individual recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3576 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3577 | For more information on :term:`INHERIT`, see the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3578 | :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 3579 | section in the BitBake User Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3580 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3581 | :term:`INHERIT_DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3582 | Lists classes that will be inherited at the distribution level. It is |
| 3583 | unlikely that you want to edit this variable. |
| 3584 | |
| 3585 | The default value of the variable is set as follows in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3586 | ``meta/conf/distro/defaultsetup.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3587 | |
| 3588 | INHERIT_DISTRO ?= "debian devshell sstate license" |
| 3589 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3590 | :term:`INHIBIT_DEFAULT_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3591 | Prevents the default dependencies, namely the C compiler and standard |
| 3592 | C library (libc), from being added to :term:`DEPENDS`. |
| 3593 | This variable is usually used within recipes that do not require any |
| 3594 | compilation using the C compiler. |
| 3595 | |
| 3596 | Set the variable to "1" to prevent the default dependencies from |
| 3597 | being added. |
| 3598 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3599 | :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3600 | Prevents the OpenEmbedded build system from splitting out debug |
| 3601 | information during packaging. By default, the build system splits out |
| 3602 | debugging information during the |
| 3603 | :ref:`ref-tasks-package` task. For more information on |
| 3604 | how debug information is split out, see the |
| 3605 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
| 3606 | variable. |
| 3607 | |
| 3608 | To prevent the build system from splitting out debug information |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3609 | during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3610 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3611 | |
| 3612 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
| 3613 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3614 | :term:`INHIBIT_PACKAGE_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3615 | If set to "1", causes the build to not strip binaries in resulting |
| 3616 | packages and prevents the ``-dbg`` package from containing the source |
| 3617 | files. |
| 3618 | |
| 3619 | By default, the OpenEmbedded build system strips binaries and puts |
| 3620 | the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3621 | Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3622 | plan to debug in general. |
| 3623 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3624 | :term:`INHIBIT_SYSROOT_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3625 | If set to "1", causes the build to not strip binaries in the |
| 3626 | resulting sysroot. |
| 3627 | |
| 3628 | By default, the OpenEmbedded build system strips binaries in the |
| 3629 | resulting sysroot. When you specifically set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3630 | :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3631 | this stripping. |
| 3632 | |
| 3633 | If you want to use this variable, include the |
| 3634 | :ref:`staging <ref-classes-staging>` class. This class uses a |
| 3635 | ``sys_strip()`` function to test for the variable and acts |
| 3636 | accordingly. |
| 3637 | |
| 3638 | .. note:: |
| 3639 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3640 | Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3641 | special circumstances. For example, suppose you are building |
| 3642 | bare-metal firmware by using an external GCC toolchain. Furthermore, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3643 | even if the toolchain's binaries are strippable, there are other files |
| 3644 | needed for the build that are not strippable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3645 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3646 | :term:`INITRAMFS_DEPLOY_DIR_IMAGE` |
| 3647 | Indicates the deploy directory used by ``do_bundle_initramfs`` where the |
| 3648 | :term:`INITRAMFS_IMAGE` will be fetched from. |
| 3649 | This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the |
| 3650 | :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed |
| 3651 | when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`. |
| 3652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3653 | :term:`INITRAMFS_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3654 | Defines the format for the output image of an initial RAM filesystem |
| 3655 | (initramfs), which is used during boot. Supported formats are the |
| 3656 | same as those supported by the |
| 3657 | :term:`IMAGE_FSTYPES` variable. |
| 3658 | |
| 3659 | The default value of this variable, which is set in the |
| 3660 | ``meta/conf/bitbake.conf`` configuration file in the |
| 3661 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's |
| 3662 | initramfs mechanism, as opposed to the initial RAM filesystem |
| 3663 | `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects |
| 3664 | an optionally compressed cpio archive. |
| 3665 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3666 | :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3667 | Specifies the :term:`PROVIDES` name of an image |
| 3668 | recipe that is used to build an initial RAM filesystem (initramfs) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3669 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3670 | additional recipe to be built as a dependency to whatever root |
| 3671 | filesystem recipe you might be using (e.g. ``core-image-sato``). The |
| 3672 | initramfs image recipe you provide should set |
| 3673 | :term:`IMAGE_FSTYPES` to |
| 3674 | :term:`INITRAMFS_FSTYPES`. |
| 3675 | |
| 3676 | An initramfs image provides a temporary root filesystem used for |
| 3677 | early system initialization (e.g. loading of modules needed to locate |
| 3678 | and mount the "real" root filesystem). |
| 3679 | |
| 3680 | .. note:: |
| 3681 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3682 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` |
| 3683 | recipe in the :term:`Source Directory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3684 | for an example initramfs recipe. To select this sample recipe as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3685 | the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3686 | to "core-image-minimal-initramfs". |
| 3687 | |
| 3688 | You can also find more information by referencing the |
| 3689 | ``meta-poky/conf/local.conf.sample.extended`` configuration file in |
| 3690 | the Source Directory, the :ref:`image <ref-classes-image>` class, |
| 3691 | and the :ref:`kernel <ref-classes-kernel>` class to see how to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3692 | the :term:`INITRAMFS_IMAGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3693 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3694 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3695 | initramfs image is built. |
| 3696 | |
| 3697 | For more information, you can also see the |
| 3698 | :term:`INITRAMFS_IMAGE_BUNDLE` |
| 3699 | variable, which allows the generated image to be bundled inside the |
| 3700 | kernel image. Additionally, for information on creating an initramfs |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3701 | image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3702 | in the Yocto Project Development Tasks Manual. |
| 3703 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3704 | :term:`INITRAMFS_IMAGE_BUNDLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3705 | Controls whether or not the image recipe specified by |
| 3706 | :term:`INITRAMFS_IMAGE` is run through an |
| 3707 | extra pass |
| 3708 | (:ref:`ref-tasks-bundle_initramfs`) during |
| 3709 | kernel compilation in order to build a single binary that contains |
| 3710 | both the kernel image and the initial RAM filesystem (initramfs) |
| 3711 | image. This makes use of the |
| 3712 | :term:`CONFIG_INITRAMFS_SOURCE` kernel |
| 3713 | feature. |
| 3714 | |
| 3715 | .. note:: |
| 3716 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 3717 | Bundling the initramfs with the kernel conflates the code in the |
| 3718 | initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 |
| 3719 | compatible software may be part of a bundled initramfs. |
| 3720 | |
| 3721 | .. note:: |
| 3722 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3723 | Using an extra compilation pass to bundle the initramfs avoids a |
| 3724 | circular dependency between the kernel recipe and the initramfs |
| 3725 | recipe should the initramfs include kernel modules. Should that be |
| 3726 | the case, the initramfs recipe depends on the kernel for the |
| 3727 | kernel modules, and the kernel depends on the initramfs recipe |
| 3728 | since the initramfs is bundled inside the kernel image. |
| 3729 | |
| 3730 | The combined binary is deposited into the ``tmp/deploy`` directory, |
| 3731 | which is part of the :term:`Build Directory`. |
| 3732 | |
| 3733 | Setting the variable to "1" in a configuration file causes the |
| 3734 | OpenEmbedded build system to generate a kernel image with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3735 | initramfs specified in :term:`INITRAMFS_IMAGE` bundled within:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3736 | |
| 3737 | INITRAMFS_IMAGE_BUNDLE = "1" |
| 3738 | |
| 3739 | By default, the |
| 3740 | :ref:`kernel <ref-classes-kernel>` class sets this variable to a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3741 | null string as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3742 | |
| 3743 | INITRAMFS_IMAGE_BUNDLE ?= "" |
| 3744 | |
| 3745 | .. note:: |
| 3746 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3747 | You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3748 | configuration file. You cannot set the variable in a recipe file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3749 | |
| 3750 | See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3751 | :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3752 | file for additional information. Also, for information on creating an |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3753 | initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3754 | in the Yocto Project Development Tasks Manual. |
| 3755 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3756 | :term:`INITRAMFS_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3757 | The link name of the initial RAM filesystem image. This variable is |
| 3758 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3759 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3760 | |
| 3761 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" |
| 3762 | |
| 3763 | The value of the |
| 3764 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3765 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3766 | |
| 3767 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 3768 | |
| 3769 | See the :term:`MACHINE` variable for additional |
| 3770 | information. |
| 3771 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3772 | :term:`INITRAMFS_MULTICONFIG` |
| 3773 | Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class. |
| 3774 | |
| 3775 | This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from |
| 3776 | a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. |
| 3777 | |
| 3778 | For more information on how to bundle an initramfs image from a separate |
| 3779 | multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`" |
| 3780 | section in the Yocto Project Development Tasks Manual. |
| 3781 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3782 | :term:`INITRAMFS_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3783 | The base name of the initial RAM filesystem image. This variable is |
| 3784 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3785 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3786 | |
| 3787 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" |
| 3788 | |
| 3789 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3790 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3791 | |
| 3792 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3793 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3794 | :term:`INITRD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3795 | Indicates list of filesystem images to concatenate and use as an |
| 3796 | initial RAM disk (``initrd``). |
| 3797 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3798 | The :term:`INITRD` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3799 | :ref:`image-live <ref-classes-image-live>` class. |
| 3800 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3801 | :term:`INITRD_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3802 | When building a "live" bootable image (i.e. when |
| 3803 | :term:`IMAGE_FSTYPES` contains "live"), |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3804 | :term:`INITRD_IMAGE` specifies the image recipe that should be built to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3805 | provide the initial RAM disk image. The default value is |
| 3806 | "core-image-minimal-initramfs". |
| 3807 | |
| 3808 | See the :ref:`image-live <ref-classes-image-live>` class for more |
| 3809 | information. |
| 3810 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3811 | :term:`INITSCRIPT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3812 | The filename of the initialization script as installed to |
| 3813 | ``${sysconfdir}/init.d``. |
| 3814 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3815 | This variable is used in recipes when using :ref:`ref-classes-update-rc.d`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3816 | The variable is mandatory. |
| 3817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3818 | :term:`INITSCRIPT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3819 | A list of the packages that contain initscripts. If multiple packages |
| 3820 | are specified, you need to append the package name to the other |
| 3821 | ``INITSCRIPT_*`` as an override. |
| 3822 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3823 | This variable is used in recipes when using :ref:`ref-classes-update-rc.d`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3824 | The variable is optional and defaults to the :term:`PN` |
| 3825 | variable. |
| 3826 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3827 | :term:`INITSCRIPT_PARAMS` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3828 | Specifies the options to pass to ``update-rc.d``. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3829 | |
| 3830 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." |
| 3831 | |
| 3832 | In this example, the script has a runlevel of 99, starts the script |
| 3833 | in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. |
| 3834 | |
| 3835 | The variable's default value is "defaults", which is set in the |
| 3836 | :ref:`update-rc.d <ref-classes-update-rc.d>` class. |
| 3837 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3838 | The value in :term:`INITSCRIPT_PARAMS` is passed through to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3839 | ``update-rc.d`` command. For more information on valid parameters, |
| 3840 | please see the ``update-rc.d`` manual page at |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3841 | https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3842 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3843 | :term:`INSANE_SKIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3844 | Specifies the QA checks to skip for a specific package within a |
| 3845 | recipe. For example, to skip the check for symbolic link ``.so`` |
| 3846 | files in the main package of a recipe, add the following to the |
| 3847 | recipe. The package name override must be used, which in this example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3848 | is ``${PN}``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3849 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3850 | INSANE_SKIP:${PN} += "dev-so" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3851 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3852 | See the ":ref:`ref-classes-insane`" section for a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3853 | list of the valid QA checks you can specify using this variable. |
| 3854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3855 | :term:`INSTALL_TIMEZONE_FILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3856 | By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3857 | Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3858 | configuration level to disable this behavior. |
| 3859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3860 | :term:`IPK_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3861 | When the IPK backend is in use and package management is enabled on |
| 3862 | the target, you can use this variable to set up ``opkg`` in the |
| 3863 | target image to point to package feeds on a nominated server. Once |
| 3864 | the feed is established, you can perform installations or upgrades |
| 3865 | using the package manager at runtime. |
| 3866 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3867 | :term:`KARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3868 | Defines the kernel architecture used when assembling the |
| 3869 | configuration. Architectures supported for this release are: |
| 3870 | |
| 3871 | - powerpc |
| 3872 | - i386 |
| 3873 | - x86_64 |
| 3874 | - arm |
| 3875 | - qemu |
| 3876 | - mips |
| 3877 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3878 | You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3880 | :term:`KBRANCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3881 | A regular expression used by the build process to explicitly identify |
| 3882 | the kernel branch that is validated, patched, and configured during a |
| 3883 | build. You must set this variable to ensure the exact kernel branch |
| 3884 | you want is being used by the build process. |
| 3885 | |
| 3886 | Values for this variable are set in the kernel's recipe file and the |
| 3887 | kernel's append file. For example, if you are using the |
| 3888 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3889 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3890 | is set as follows in that kernel recipe file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3891 | |
| 3892 | KBRANCH ?= "standard/base" |
| 3893 | |
| 3894 | This variable is also used from the kernel's append file to identify |
| 3895 | the kernel branch specific to a particular machine or target |
| 3896 | hardware. Continuing with the previous kernel example, the kernel's |
| 3897 | append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the |
| 3898 | BSP layer for a given machine. For example, the append file for the |
| 3899 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA |
| 3900 | machines (``meta-yocto-bsp``) is named |
| 3901 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3902 | Here are the related statements from that append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3903 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3904 | KBRANCH:genericx86 = "standard/base" |
| 3905 | KBRANCH:genericx86-64 = "standard/base" |
| 3906 | KBRANCH:edgerouter = "standard/edgerouter" |
| 3907 | KBRANCH:beaglebone = "standard/beaglebone" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3908 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3909 | The :term:`KBRANCH` statements |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3910 | identify the kernel branch to use when building for each supported |
| 3911 | BSP. |
| 3912 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3913 | :term:`KBUILD_DEFCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3914 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 3915 | class, specifies an "in-tree" kernel configuration file for use |
| 3916 | during a kernel build. |
| 3917 | |
| 3918 | Typically, when using a ``defconfig`` to configure a kernel during a |
| 3919 | build, you place the file in your layer in the same manner as you |
| 3920 | would place patch files and configuration fragment files (i.e. |
| 3921 | "out-of-tree"). However, if you want to use a ``defconfig`` file that |
| 3922 | is part of the kernel tree (i.e. "in-tree"), you can use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3923 | :term:`KBUILD_DEFCONFIG` variable and append the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3924 | :term:`KMACHINE` variable to point to the |
| 3925 | ``defconfig`` file. |
| 3926 | |
| 3927 | To use the variable, set it in the append file for your kernel recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3928 | using the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3929 | |
| 3930 | KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file |
| 3931 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3932 | Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3933 | a ``defconfig`` file named "bcm2709_defconfig":: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3934 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3935 | KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3936 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3937 | As an alternative, you can use the following within your append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3938 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 3939 | KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3940 | |
| 3941 | For more |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3942 | information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3943 | ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3944 | section in the Yocto Project Linux Kernel Development Manual. |
| 3945 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3946 | :term:`KCONFIG_MODE` |
| 3947 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 3948 | class, specifies the kernel configuration values to use for options |
| 3949 | not specified in the provided ``defconfig`` file. Valid options are:: |
| 3950 | |
| 3951 | KCONFIG_MODE = "alldefconfig" |
| 3952 | KCONFIG_MODE = "allnoconfig" |
| 3953 | |
| 3954 | In ``alldefconfig`` mode the options not explicitly specified will be |
| 3955 | assigned their Kconfig default value. In ``allnoconfig`` mode the |
| 3956 | options not explicitly specified will be disabled in the kernel |
| 3957 | config. |
| 3958 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3959 | In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3960 | the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file |
| 3961 | will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed |
| 3962 | in ``${WORKDIR}`` through a meta-layer will be handled in |
| 3963 | ``allnoconfig`` mode. |
| 3964 | |
| 3965 | An "in-tree" ``defconfig`` file can be selected via the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3966 | :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3967 | be explicitly set. |
| 3968 | |
| 3969 | A ``defconfig`` file compatible with ``allnoconfig`` mode can be |
| 3970 | generated by copying the ``.config`` file from a working Linux kernel |
| 3971 | build, renaming it to ``defconfig`` and placing it into the Linux |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3972 | kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3973 | not need to be explicitly set. |
| 3974 | |
| 3975 | A ``defconfig`` file compatible with ``alldefconfig`` mode can be |
| 3976 | generated using the |
| 3977 | :ref:`ref-tasks-savedefconfig` |
| 3978 | task and placed into the Linux kernel ``${WORKDIR}`` through your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3979 | meta-layer. Explicitely set :term:`KCONFIG_MODE`:: |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3980 | |
| 3981 | KCONFIG_MODE = "alldefconfig" |
| 3982 | |
| 3983 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3984 | :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3985 | Specifies an alternate kernel image type for creation in addition to |
| 3986 | the kernel image type specified using the |
| 3987 | :term:`KERNEL_IMAGETYPE` variable. |
| 3988 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3989 | :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3990 | Specifies the name of all of the build artifacts. You can change the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3991 | name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3992 | variable. |
| 3993 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3994 | The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3995 | ``meta/classes/kernel-artifact-names.bbclass`` file, has the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3996 | following default value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3997 | |
| 3998 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3999 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 4000 | See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE` |
| 4001 | and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4002 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4003 | :term:`KERNEL_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4004 | A list of classes defining kernel image types that the |
| 4005 | :ref:`kernel <ref-classes-kernel>` class should inherit. You |
| 4006 | typically append this variable to enable extended image types. An |
| 4007 | example is the "kernel-fitimage", which enables fitImage support and |
| 4008 | resides in ``meta/classes/kernel-fitimage.bbclass``. You can register |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4009 | custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4010 | variable. |
| 4011 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 4012 | :term:`KERNEL_DEBUG_TIMESTAMPS` |
| 4013 | If set to "1", enables timestamping functionality during building |
| 4014 | the kernel. The default is "0" to disable this for reproducibility |
| 4015 | reasons. |
| 4016 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4017 | :term:`KERNEL_DEVICETREE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4018 | Specifies the name of the generated Linux kernel device tree (i.e. |
| 4019 | the ``.dtb``) file. |
| 4020 | |
| 4021 | .. note:: |
| 4022 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4023 | There is legacy support for specifying the full path to the device |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4024 | tree. However, providing just the ``.dtb`` file is preferred. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4025 | |
| 4026 | In order to use this variable, the |
| 4027 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 4028 | be inherited. |
| 4029 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4030 | :term:`KERNEL_DTB_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4031 | The link name of the kernel device tree binary (DTB). This variable |
| 4032 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4033 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4034 | |
| 4035 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4036 | |
| 4037 | The |
| 4038 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4039 | the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4040 | |
| 4041 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4042 | |
| 4043 | See the :term:`MACHINE` variable for additional |
| 4044 | information. |
| 4045 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4046 | :term:`KERNEL_DTB_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4047 | The base name of the kernel device tree binary (DTB). This variable |
| 4048 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4049 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4050 | |
| 4051 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4052 | |
| 4053 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4054 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4055 | |
| 4056 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4057 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4058 | :term:`KERNEL_DTC_FLAGS` |
| 4059 | Specifies the ``dtc`` flags that are passed to the Linux kernel build |
| 4060 | system when generating the device trees (via ``DTC_FLAGS`` environment |
| 4061 | variable). |
| 4062 | |
| 4063 | In order to use this variable, the |
| 4064 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 4065 | be inherited. |
| 4066 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4067 | :term:`KERNEL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4068 | Specifies additional ``make`` command-line arguments the OpenEmbedded |
| 4069 | build system passes on when compiling the kernel. |
| 4070 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4071 | :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4072 | Includes additional kernel metadata. In the OpenEmbedded build |
| 4073 | system, the default Board Support Packages (BSPs) |
| 4074 | :term:`Metadata` is provided through the |
| 4075 | :term:`KMACHINE` and :term:`KBRANCH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4076 | variables. You can use the :term:`KERNEL_FEATURES` variable from within |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4077 | the kernel recipe or kernel append file to further add metadata for |
| 4078 | all BSPs or specific BSPs. |
| 4079 | |
| 4080 | The metadata you add through this variable includes config fragments |
| 4081 | and features descriptions, which usually includes patches as well as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4082 | config fragments. You typically override the :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4083 | variable for a specific machine. In this way, you can provide |
| 4084 | validated, but optional, sets of kernel configurations and features. |
| 4085 | |
| 4086 | For example, the following example from the ``linux-yocto-rt_4.12`` |
| 4087 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs |
| 4088 | as well as "virtio" configurations to all QEMU machines. The last two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4089 | statements add specific configurations to targeted machine types:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4090 | |
| 4091 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4092 | KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" |
| 4093 | KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc" |
| 4094 | KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" |
| 4095 | KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4096 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4097 | :term:`KERNEL_FIT_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4098 | The link name of the kernel flattened image tree (FIT) image. This |
| 4099 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4100 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4101 | |
| 4102 | KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4103 | |
| 4104 | The value of the |
| 4105 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4106 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4107 | |
| 4108 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4109 | |
| 4110 | See the :term:`MACHINE` variable for additional |
| 4111 | information. |
| 4112 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4113 | :term:`KERNEL_FIT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4114 | The base name of the kernel flattened image tree (FIT) image. This |
| 4115 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4116 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4117 | |
| 4118 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4119 | |
| 4120 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4121 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4122 | |
| 4123 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4125 | :term:`KERNEL_IMAGE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4126 | The link name for the kernel image. This variable is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4127 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4128 | |
| 4129 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4130 | |
| 4131 | The value of |
| 4132 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4133 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4134 | |
| 4135 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4136 | |
| 4137 | See the :term:`MACHINE` variable for additional |
| 4138 | information. |
| 4139 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4140 | :term:`KERNEL_IMAGE_MAXSIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4141 | Specifies the maximum size of the kernel image file in kilobytes. If |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4142 | :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4143 | checked against the set value during the |
| 4144 | :ref:`ref-tasks-sizecheck` task. The task fails if |
| 4145 | the kernel image file is larger than the setting. |
| 4146 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4147 | :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4148 | limited amount of space in which the kernel image must be stored. |
| 4149 | |
| 4150 | By default, this variable is not set, which means the size of the |
| 4151 | kernel image is not checked. |
| 4152 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4153 | :term:`KERNEL_IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4154 | The base name of the kernel image. This variable is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4155 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4156 | |
| 4157 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4158 | |
| 4159 | The value of the |
| 4160 | :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4161 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4162 | |
| 4163 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4165 | :term:`KERNEL_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4166 | The type of kernel to build for a device, usually set by the machine |
| 4167 | configuration files and defaults to "zImage". This variable is used |
| 4168 | when building the kernel and is passed to ``make`` as the target to |
| 4169 | build. |
| 4170 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4171 | If you want to build an alternate kernel image type in addition to that |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4172 | specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4173 | variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4174 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4175 | :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4176 | Lists kernel modules that need to be auto-loaded during boot. |
| 4177 | |
| 4178 | .. note:: |
| 4179 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4180 | This variable replaces the deprecated :term:`module_autoload` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4181 | variable. |
| 4182 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4183 | You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4184 | can be recognized by the kernel recipe or by an out-of-tree kernel |
| 4185 | module recipe (e.g. a machine configuration file, a distribution |
| 4186 | configuration file, an append file for the recipe, or the recipe |
| 4187 | itself). |
| 4188 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4189 | Specify it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4190 | |
| 4191 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" |
| 4192 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4193 | Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4194 | system to populate the ``/etc/modules-load.d/modname.conf`` file with |
| 4195 | the list of modules to be auto-loaded on boot. The modules appear |
| 4196 | one-per-line in the file. Here is an example of the most common use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4197 | case:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4198 | |
| 4199 | KERNEL_MODULE_AUTOLOAD += "module_name" |
| 4200 | |
| 4201 | For information on how to populate the ``modname.conf`` file with |
| 4202 | ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. |
| 4203 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4204 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4205 | Provides a list of modules for which the OpenEmbedded build system |
| 4206 | expects to find ``module_conf_``\ modname values that specify |
| 4207 | configuration for each of the modules. For information on how to |
| 4208 | provide those module configurations, see the |
| 4209 | :term:`module_conf_* <module_conf>` variable. |
| 4210 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4211 | :term:`KERNEL_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4212 | The location of the kernel sources. This variable is set to the value |
| 4213 | of the :term:`STAGING_KERNEL_DIR` within |
| 4214 | the :ref:`module <ref-classes-module>` class. For information on |
| 4215 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4216 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4217 | section in the Yocto Project Linux Kernel Development Manual. |
| 4218 | |
| 4219 | To help maximize compatibility with out-of-tree drivers used to build |
| 4220 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4221 | :term:`KERNEL_SRC` variable, which is identical to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4222 | the :term:`KERNEL_PATH` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4223 | used by external Makefiles to point to the kernel source directory. |
| 4224 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4225 | :term:`KERNEL_SRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4226 | The location of the kernel sources. This variable is set to the value |
| 4227 | of the :term:`STAGING_KERNEL_DIR` within |
| 4228 | the :ref:`module <ref-classes-module>` class. For information on |
| 4229 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4230 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4231 | section in the Yocto Project Linux Kernel Development Manual. |
| 4232 | |
| 4233 | To help maximize compatibility with out-of-tree drivers used to build |
| 4234 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4235 | :term:`KERNEL_PATH` variable, which is identical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4236 | to the :term:`KERNEL_SRC` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4237 | used by external Makefiles to point to the kernel source directory. |
| 4238 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4239 | :term:`KERNEL_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4240 | Specifies the version of the kernel as extracted from ``version.h`` |
| 4241 | or ``utsrelease.h`` within the kernel sources. Effects of setting |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4242 | this variable do not take effect until the kernel has been |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4243 | configured. Consequently, attempting to refer to this variable in |
| 4244 | contexts prior to configuration will not work. |
| 4245 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4246 | :term:`KERNELDEPMODDEPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4247 | Specifies whether the data referenced through |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4248 | :term:`PKGDATA_DIR` is needed or not. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4249 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4250 | exists, but simply whether or not it is used. If you do not need to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4251 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4252 | ``initramfs`` recipe. Setting the variable there when the data is not |
| 4253 | needed avoids a potential dependency loop. |
| 4254 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4255 | :term:`KFEATURE_DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4256 | Provides a short description of a configuration fragment. You use |
| 4257 | this variable in the ``.scc`` file that describes a configuration |
| 4258 | fragment file. Here is the variable used in a file named ``smp.scc`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4259 | to describe SMP being enabled:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4260 | |
| 4261 | define KFEATURE_DESCRIPTION "Enable SMP" |
| 4262 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4263 | :term:`KMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4264 | The machine as known by the kernel. Sometimes the machine name used |
| 4265 | by the kernel does not match the machine name used by the |
| 4266 | OpenEmbedded build system. For example, the machine name that the |
| 4267 | OpenEmbedded build system understands as ``core2-32-intel-common`` |
| 4268 | goes by a different name in the Linux Yocto kernel. The kernel |
| 4269 | understands that machine as ``intel-core2-32``. For cases like these, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4270 | the :term:`KMACHINE` variable maps the kernel machine name to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4271 | OpenEmbedded build system machine name. |
| 4272 | |
| 4273 | These mappings between different names occur in the Yocto Linux |
| 4274 | Kernel's ``meta`` branch. As an example take a look in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4275 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4276 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4277 | LINUX_VERSION:core2-32-intel-common = "3.19.0" |
| 4278 | COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}" |
| 4279 | SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" |
| 4280 | SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" |
| 4281 | KMACHINE:core2-32-intel-common = "intel-core2-32" |
| 4282 | KBRANCH:core2-32-intel-common = "standard/base" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4283 | KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4284 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4285 | The :term:`KMACHINE` statement says |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4286 | that the kernel understands the machine name as "intel-core2-32". |
| 4287 | However, the OpenEmbedded build system understands the machine as |
| 4288 | "core2-32-intel-common". |
| 4289 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4290 | :term:`KTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4291 | Defines the kernel type to be used in assembling the configuration. |
| 4292 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4293 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4294 | section in the |
| 4295 | Yocto Project Linux Kernel Development Manual for more information on |
| 4296 | kernel types. |
| 4297 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4298 | You define the :term:`KTYPE` variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4299 | :ref:`kernel-dev/advanced:bsp descriptions`. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4300 | value you use must match the value used for the |
| 4301 | :term:`LINUX_KERNEL_TYPE` value used by the |
| 4302 | kernel recipe. |
| 4303 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4304 | :term:`LABELS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4305 | Provides a list of targets for automatic configuration. |
| 4306 | |
| 4307 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 4308 | information on how this variable is used. |
| 4309 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4310 | :term:`LAYERDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4311 | Lists the layers, separated by spaces, on which this recipe depends. |
| 4312 | Optionally, you can specify a specific layer version for a dependency |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4313 | by adding it to the end of the layer name. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4314 | |
| 4315 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" |
| 4316 | |
| 4317 | In this previous example, |
| 4318 | version 3 of "anotherlayer" is compared against |
| 4319 | :term:`LAYERVERSION`\ ``_anotherlayer``. |
| 4320 | |
| 4321 | An error is produced if any dependency is missing or the version |
| 4322 | numbers (if specified) do not match exactly. This variable is used in |
| 4323 | the ``conf/layer.conf`` file and must be suffixed with the name of |
| 4324 | the specific layer (e.g. ``LAYERDEPENDS_mylayer``). |
| 4325 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4326 | :term:`LAYERDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4327 | When used inside the ``layer.conf`` configuration file, this variable |
| 4328 | provides the path of the current layer. This variable is not |
| 4329 | available outside of ``layer.conf`` and references are expanded |
| 4330 | immediately when parsing of the file completes. |
| 4331 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4332 | :term:`LAYERRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4333 | Lists the layers, separated by spaces, recommended for use with this |
| 4334 | layer. |
| 4335 | |
| 4336 | Optionally, you can specify a specific layer version for a |
| 4337 | recommendation by adding the version to the end of the layer name. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4338 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4339 | |
| 4340 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" |
| 4341 | |
| 4342 | In this previous example, version 3 of "anotherlayer" is compared |
| 4343 | against ``LAYERVERSION_anotherlayer``. |
| 4344 | |
| 4345 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4346 | suffixed with the name of the specific layer (e.g. |
| 4347 | ``LAYERRECOMMENDS_mylayer``). |
| 4348 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4349 | :term:`LAYERSERIES_COMPAT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4350 | Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4351 | a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4352 | allows the layer maintainer to indicate which combinations of the |
| 4353 | layer and OE-Core can be expected to work. The variable gives the |
| 4354 | system a way to detect when a layer has not been tested with new |
| 4355 | releases of OE-Core (e.g. the layer is not maintained). |
| 4356 | |
| 4357 | To specify the OE-Core versions for which a layer is compatible, use |
| 4358 | this variable in your layer's ``conf/layer.conf`` configuration file. |
| 4359 | For the list, use the Yocto Project |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4360 | :yocto_wiki:`Release Name </Releases>` (e.g. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4361 | &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4362 | layer, use a space-separated list:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4363 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4364 | LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4365 | |
| 4366 | .. note:: |
| 4367 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4368 | Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4369 | Compatible version 2 standard. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4370 | The OpenEmbedded build system produces a warning if the variable |
| 4371 | is not set for any given layer. |
| 4372 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4373 | See the ":ref:`dev-manual/common-tasks:creating your own layer`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4374 | section in the Yocto Project Development Tasks Manual. |
| 4375 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4376 | :term:`LAYERVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4377 | Optionally specifies the version of a layer as a single number. You |
| 4378 | can use this within :term:`LAYERDEPENDS` for |
| 4379 | another layer in order to depend on a specific version of the layer. |
| 4380 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4381 | suffixed with the name of the specific layer (e.g. |
| 4382 | ``LAYERVERSION_mylayer``). |
| 4383 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4384 | :term:`LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4385 | The minimal command and arguments used to run the linker. |
| 4386 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4387 | :term:`LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4388 | Specifies the flags to pass to the linker. This variable is exported |
| 4389 | to an environment variable and thus made visible to the software |
| 4390 | being built during the compilation step. |
| 4391 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4392 | Default initialization for :term:`LDFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4393 | being built: |
| 4394 | |
| 4395 | - :term:`TARGET_LDFLAGS` when building for the |
| 4396 | target |
| 4397 | |
| 4398 | - :term:`BUILD_LDFLAGS` when building for the |
| 4399 | build host (i.e. ``-native``) |
| 4400 | |
| 4401 | - :term:`BUILDSDK_LDFLAGS` when building for |
| 4402 | an SDK (i.e. ``nativesdk-``) |
| 4403 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4404 | :term:`LEAD_SONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4405 | Specifies the lead (or primary) compiled library file (i.e. ``.so``) |
| 4406 | that the :ref:`debian <ref-classes-debian>` class applies its |
| 4407 | naming policy to given a recipe that packages multiple libraries. |
| 4408 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4409 | This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4410 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4411 | :term:`LIC_FILES_CHKSUM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4412 | Checksums of the license text in the recipe source code. |
| 4413 | |
| 4414 | This variable tracks changes in license text of the source code |
| 4415 | files. If the license text is changed, it will trigger a build |
| 4416 | failure, which gives the developer an opportunity to review any |
| 4417 | license change. |
| 4418 | |
| 4419 | This variable must be defined for all recipes (unless |
| 4420 | :term:`LICENSE` is set to "CLOSED"). |
| 4421 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4422 | For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4423 | section in the Yocto Project Development Tasks Manual. |
| 4424 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4425 | :term:`LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4426 | The list of source licenses for the recipe. Follow these rules: |
| 4427 | |
| 4428 | - Do not use spaces within individual license names. |
| 4429 | |
| 4430 | - Separate license names using \| (pipe) when there is a choice |
| 4431 | between licenses. |
| 4432 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4433 | - Separate license names using & (ampersand) when there are |
| 4434 | multiple licenses for different parts of the source. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4435 | |
| 4436 | - You can use spaces between license names. |
| 4437 | |
| 4438 | - For standard licenses, use the names of the files in |
| 4439 | ``meta/files/common-licenses/`` or the |
| 4440 | :term:`SPDXLICENSEMAP` flag names defined in |
| 4441 | ``meta/conf/licenses.conf``. |
| 4442 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4443 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4444 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4445 | LICENSE = "LGPL-2.1-only | GPL-3.0-only" |
| 4446 | LICENSE = "MPL-1.0 & LGPL-2.1-only" |
| 4447 | LICENSE = "GPL-2.0-or-later" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4448 | |
| 4449 | The first example is from the |
| 4450 | recipes for Qt, which the user may choose to distribute under either |
| 4451 | the LGPL version 2.1 or GPL version 3. The second example is from |
| 4452 | Cairo where two licenses cover different parts of the source code. |
| 4453 | The final example is from ``sysstat``, which presents a single |
| 4454 | license. |
| 4455 | |
| 4456 | You can also specify licenses on a per-package basis to handle |
| 4457 | situations where components of the output have different licenses. |
| 4458 | For example, a piece of software whose code is licensed under GPLv2 |
| 4459 | but has accompanying documentation licensed under the GNU Free |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4460 | Documentation License 1.2 could be specified as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4461 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4462 | LICENSE = "GFDL-1.2 & GPL-2.0-only" |
| 4463 | LICENSE:${PN} = "GPL-2.0.only" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4464 | LICENSE:${PN}-doc = "GFDL-1.2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4465 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4466 | :term:`LICENSE_CREATE_PACKAGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4467 | Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4468 | build system to create an extra package (i.e. |
| 4469 | ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add |
| 4470 | those packages to the |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4471 | :term:`RRECOMMENDS`\ ``:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4472 | |
| 4473 | The ``${PN}-lic`` package installs a directory in |
| 4474 | ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base |
| 4475 | name, and installs files in that directory that contain license and |
| 4476 | copyright information (i.e. copies of the appropriate license files |
| 4477 | from ``meta/common-licenses`` that match the licenses specified in |
| 4478 | the :term:`LICENSE` variable of the recipe metadata |
| 4479 | and copies of files marked in |
| 4480 | :term:`LIC_FILES_CHKSUM` as containing |
| 4481 | license text). |
| 4482 | |
| 4483 | For related information on providing license text, see the |
| 4484 | :term:`COPY_LIC_DIRS` variable, the |
| 4485 | :term:`COPY_LIC_MANIFEST` variable, and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4486 | ":ref:`dev-manual/common-tasks:providing license text`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4487 | section in the Yocto Project Development Tasks Manual. |
| 4488 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4489 | :term:`LICENSE_FLAGS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4490 | Specifies additional flags for a recipe you must allow through |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4491 | :term:`LICENSE_FLAGS_ACCEPTED` in |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4492 | order for the recipe to be built. When providing multiple flags, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4493 | separate them with spaces. |
| 4494 | |
| 4495 | This value is independent of :term:`LICENSE` and is |
| 4496 | typically used to mark recipes that might require additional licenses |
| 4497 | in order to be used in a commercial product. For more information, |
| 4498 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4499 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4500 | section in the Yocto Project Development Tasks Manual. |
| 4501 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4502 | :term:`LICENSE_FLAGS_ACCEPTED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4503 | Lists license flags that when specified in |
| 4504 | :term:`LICENSE_FLAGS` within a recipe should not |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4505 | prevent that recipe from being built. For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4506 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4507 | section in the Yocto Project Development Tasks Manual. |
| 4508 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4509 | :term:`LICENSE_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4510 | Path to additional licenses used during the build. By default, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4511 | OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4512 | directory that holds common license text used during the build. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4513 | :term:`LICENSE_PATH` variable allows you to extend that location to other |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4514 | areas that have additional licenses:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4515 | |
| 4516 | LICENSE_PATH += "path-to-additional-common-licenses" |
| 4517 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4518 | :term:`LINUX_KERNEL_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4519 | Defines the kernel type to be used in assembling the configuration. |
| 4520 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4521 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4522 | section in the |
| 4523 | Yocto Project Linux Kernel Development Manual for more information on |
| 4524 | kernel types. |
| 4525 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4526 | If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4527 | "standard". Together with :term:`KMACHINE`, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4528 | :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4529 | the kernel tools to find the appropriate description within the |
| 4530 | kernel :term:`Metadata` with which to build out the sources |
| 4531 | and configuration. |
| 4532 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4533 | :term:`LINUX_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4534 | The Linux version from ``kernel.org`` on which the Linux kernel image |
| 4535 | being built using the OpenEmbedded build system is based. You define |
| 4536 | this variable in the kernel recipe. For example, the |
| 4537 | ``linux-yocto-3.4.bb`` kernel recipe found in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4538 | ``meta/recipes-kernel/linux`` defines the variables as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4539 | |
| 4540 | LINUX_VERSION ?= "3.4.24" |
| 4541 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4542 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4543 | for the recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4544 | |
| 4545 | PV = "${LINUX_VERSION}+git${SRCPV}" |
| 4546 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4547 | :term:`LINUX_VERSION_EXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4548 | A string extension compiled into the version string of the Linux |
| 4549 | kernel built with the OpenEmbedded build system. You define this |
| 4550 | variable in the kernel recipe. For example, the linux-yocto kernel |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4551 | recipes all define the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4552 | |
| 4553 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
| 4554 | |
| 4555 | Defining this variable essentially sets the Linux kernel |
| 4556 | configuration item ``CONFIG_LOCALVERSION``, which is visible through |
| 4557 | the ``uname`` command. Here is an example that shows the extension |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4558 | assuming it was set as previously shown:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4559 | |
| 4560 | $ uname -r |
| 4561 | 3.7.0-rc8-custom |
| 4562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4563 | :term:`LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4564 | Specifies the directory to which the OpenEmbedded build system writes |
| 4565 | overall log files. The default directory is ``${TMPDIR}/log``. |
| 4566 | |
| 4567 | For the directory containing logs specific to each task, see the |
| 4568 | :term:`T` variable. |
| 4569 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4570 | :term:`MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4571 | Specifies the target device for which the image is built. You define |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4572 | :term:`MACHINE` in the ``local.conf`` file found in the |
| 4573 | :term:`Build Directory`. By default, :term:`MACHINE` is set to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4574 | "qemux86", which is an x86-based architecture machine to be emulated |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4575 | using QEMU:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4576 | |
| 4577 | MACHINE ?= "qemux86" |
| 4578 | |
| 4579 | The variable corresponds to a machine configuration file of the same |
| 4580 | name, through which machine-specific configurations are set. Thus, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4581 | when :term:`MACHINE` is set to "qemux86", the corresponding |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4582 | ``qemux86.conf`` machine configuration file can be found in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4583 | the :term:`Source Directory` in |
| 4584 | ``meta/conf/machine``. |
| 4585 | |
| 4586 | The list of machines supported by the Yocto Project as shipped |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4587 | include the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4588 | |
| 4589 | MACHINE ?= "qemuarm" |
| 4590 | MACHINE ?= "qemuarm64" |
| 4591 | MACHINE ?= "qemumips" |
| 4592 | MACHINE ?= "qemumips64" |
| 4593 | MACHINE ?= "qemuppc" |
| 4594 | MACHINE ?= "qemux86" |
| 4595 | MACHINE ?= "qemux86-64" |
| 4596 | MACHINE ?= "genericx86" |
| 4597 | MACHINE ?= "genericx86-64" |
| 4598 | MACHINE ?= "beaglebone" |
| 4599 | MACHINE ?= "edgerouter" |
| 4600 | |
| 4601 | The last five are Yocto Project reference hardware |
| 4602 | boards, which are provided in the ``meta-yocto-bsp`` layer. |
| 4603 | |
| 4604 | .. note:: |
| 4605 | |
| 4606 | Adding additional Board Support Package (BSP) layers to your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4607 | configuration adds new possible settings for :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4608 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4609 | :term:`MACHINE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4610 | Specifies the name of the machine-specific architecture. This |
| 4611 | variable is set automatically from :term:`MACHINE` or |
| 4612 | :term:`TUNE_PKGARCH`. You should not hand-edit |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4613 | the :term:`MACHINE_ARCH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4614 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4615 | :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4616 | A list of required machine-specific packages to install as part of |
| 4617 | the image being built. The build process depends on these packages |
| 4618 | being present. Furthermore, because this is a "machine-essential" |
| 4619 | variable, the list of packages are essential for the machine to boot. |
| 4620 | The impact of this variable affects images based on |
| 4621 | ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4622 | image. |
| 4623 | |
| 4624 | This variable is similar to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4625 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4626 | that the image being built has a build dependency on the variable's |
| 4627 | list of packages. In other words, the image will not build if a file |
| 4628 | in this list is not found. |
| 4629 | |
| 4630 | As an example, suppose the machine for which you are building |
| 4631 | requires ``example-init`` to be run during boot to initialize the |
| 4632 | hardware. In this case, you would use the following in the machine's |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4633 | ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4634 | |
| 4635 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" |
| 4636 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4637 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4638 | A list of recommended machine-specific packages to install as part of |
| 4639 | the image being built. The build process does not depend on these |
| 4640 | packages being present. However, because this is a |
| 4641 | "machine-essential" variable, the list of packages are essential for |
| 4642 | the machine to boot. The impact of this variable affects images based |
| 4643 | on ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4644 | image. |
| 4645 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4646 | This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4647 | variable with the exception that the image being built does not have |
| 4648 | a build dependency on the variable's list of packages. In other |
| 4649 | words, the image will still build if a package in this list is not |
| 4650 | found. Typically, this variable is used to handle essential kernel |
| 4651 | modules, whose functionality may be selected to be built into the |
| 4652 | kernel rather than as a module, in which case a package will not be |
| 4653 | produced. |
| 4654 | |
| 4655 | Consider an example where you have a custom kernel where a specific |
| 4656 | touchscreen driver is required for the machine to be usable. However, |
| 4657 | the driver can be built as a module or into the kernel depending on |
| 4658 | the kernel configuration. If the driver is built as a module, you |
| 4659 | want it to be installed. But, when the driver is built into the |
| 4660 | kernel, you still want the build to succeed. This variable sets up a |
| 4661 | "recommends" relationship so that in the latter case, the build will |
| 4662 | not fail due to the missing package. To accomplish this, assuming the |
| 4663 | package for the module was called ``kernel-module-ab123``, you would |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4664 | use the following in the machine's ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4665 | |
| 4666 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
| 4667 | |
| 4668 | .. note:: |
| 4669 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4670 | In this example, the ``kernel-module-ab123`` recipe needs to |
| 4671 | explicitly set its :term:`PACKAGES` variable to ensure that BitBake |
| 4672 | does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to |
| 4673 | satisfy the dependency. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4674 | |
| 4675 | Some examples of these machine essentials are flash, screen, |
| 4676 | keyboard, mouse, or touchscreen drivers (depending on the machine). |
| 4677 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4678 | :term:`MACHINE_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4679 | A list of machine-specific packages to install as part of the image |
| 4680 | being built that are not essential for the machine to boot. However, |
| 4681 | the build process for more fully-featured images depends on the |
| 4682 | packages being present. |
| 4683 | |
| 4684 | This variable affects all images based on ``packagegroup-base``, |
| 4685 | which does not include the ``core-image-minimal`` or |
| 4686 | ``core-image-full-cmdline`` images. |
| 4687 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4688 | The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4689 | with the exception that the image being built has a build dependency |
| 4690 | on the variable's list of packages. In other words, the image will |
| 4691 | not build if a file in this list is not found. |
| 4692 | |
| 4693 | An example is a machine that has WiFi capability but is not essential |
| 4694 | for the machine to boot the image. However, if you are building a |
| 4695 | more fully-featured image, you want to enable the WiFi. The package |
| 4696 | containing the firmware for the WiFi hardware is always expected to |
| 4697 | exist, so it is acceptable for the build process to depend upon |
| 4698 | finding the package. In this case, assuming the package for the |
| 4699 | firmware was called ``wifidriver-firmware``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4700 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4701 | |
| 4702 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" |
| 4703 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4704 | :term:`MACHINE_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4705 | A list of machine-specific packages to install as part of the image |
| 4706 | being built that are not essential for booting the machine. The image |
| 4707 | being built has no build dependency on this list of packages. |
| 4708 | |
| 4709 | This variable affects only images based on ``packagegroup-base``, |
| 4710 | which does not include the ``core-image-minimal`` or |
| 4711 | ``core-image-full-cmdline`` images. |
| 4712 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4713 | This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4714 | with the exception that the image being built does not have a build |
| 4715 | dependency on the variable's list of packages. In other words, the |
| 4716 | image will build if a file in this list is not found. |
| 4717 | |
| 4718 | An example is a machine that has WiFi capability but is not essential |
| 4719 | For the machine to boot the image. However, if you are building a |
| 4720 | more fully-featured image, you want to enable WiFi. In this case, the |
| 4721 | package containing the WiFi kernel module will not be produced if the |
| 4722 | WiFi driver is built into the kernel, in which case you still want |
| 4723 | the build to succeed instead of failing as a result of the package |
| 4724 | not being found. To accomplish this, assuming the package for the |
| 4725 | module was called ``kernel-module-examplewifi``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4726 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4727 | |
| 4728 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" |
| 4729 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4730 | :term:`MACHINE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4731 | Specifies the list of hardware features the |
| 4732 | :term:`MACHINE` is capable of supporting. For related |
| 4733 | information on enabling features, see the |
| 4734 | :term:`DISTRO_FEATURES`, |
| 4735 | :term:`COMBINED_FEATURES`, and |
| 4736 | :term:`IMAGE_FEATURES` variables. |
| 4737 | |
| 4738 | For a list of hardware features supported by the Yocto Project as |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4739 | shipped, see the ":ref:`ref-features-machine`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4740 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4741 | :term:`MACHINE_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4742 | Features to be added to :term:`MACHINE_FEATURES` if not also present in |
| 4743 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4744 | |
| 4745 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 4746 | not intended to be user-configurable. It is best to just reference |
| 4747 | the variable to see which machine features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4748 | all machine configurations. See the ":ref:`ref-features-backfill`" |
| 4749 | section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4750 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4751 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4752 | Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be |
| 4753 | backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4754 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4755 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4756 | :term:`MACHINEOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4757 | A colon-separated list of overrides that apply to the current |
| 4758 | machine. By default, this list includes the value of |
| 4759 | :term:`MACHINE`. |
| 4760 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4761 | You can extend :term:`MACHINEOVERRIDES` to add extra overrides that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4762 | should apply to a machine. For example, all machines emulated in QEMU |
| 4763 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named |
| 4764 | ``meta/conf/machine/include/qemu.inc`` that prepends the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4765 | override to :term:`MACHINEOVERRIDES`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4766 | |
| 4767 | MACHINEOVERRIDES =. "qemuall:" |
| 4768 | |
| 4769 | This |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4770 | override allows variables to be overridden for all machines emulated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4771 | in QEMU, like in the following example from the ``connman-conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4772 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4773 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4774 | SRC_URI:append:qemuall = " file://wired.config \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4775 | file://wired-setup \ |
| 4776 | " |
| 4777 | |
| 4778 | The underlying mechanism behind |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4779 | :term:`MACHINEOVERRIDES` is simply that it is included in the default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4780 | value of :term:`OVERRIDES`. |
| 4781 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4782 | :term:`MAINTAINER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4783 | The email address of the distribution maintainer. |
| 4784 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 4785 | :term:`METADATA_BRANCH` |
| 4786 | The branch currently checked out for the OpenEmbedded-Core layer (path |
| 4787 | determined by :term:`COREBASE`). |
| 4788 | |
| 4789 | :term:`METADATA_REVISION` |
| 4790 | The revision currently checked out for the OpenEmbedded-Core layer (path |
| 4791 | determined by :term:`COREBASE`). |
| 4792 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4793 | :term:`MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4794 | Specifies additional paths from which the OpenEmbedded build system |
| 4795 | gets source code. When the build system searches for source code, it |
| 4796 | first tries the local download directory. If that location fails, the |
| 4797 | build system tries locations defined by |
| 4798 | :term:`PREMIRRORS`, the upstream source, and then |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4799 | locations specified by :term:`MIRRORS` in that order. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4800 | |
| 4801 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4802 | the default value for :term:`MIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4803 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 4804 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4805 | :term:`MLPREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4806 | Specifies a prefix has been added to :term:`PN` to create a |
| 4807 | special version of a recipe or package (i.e. a Multilib version). The |
| 4808 | variable is used in places where the prefix needs to be added to or |
| 4809 | removed from a the name (e.g. the :term:`BPN` variable). |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4810 | :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4811 | |
| 4812 | .. note:: |
| 4813 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4814 | The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4815 | historical and comes from a time when ``nativesdk`` was a suffix |
| 4816 | rather than a prefix on the recipe name. When ``nativesdk`` was turned |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4817 | into a prefix, it made sense to set :term:`MLPREFIX` for it as well. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4818 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4819 | To help understand when :term:`MLPREFIX` might be needed, consider when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4820 | :term:`BBCLASSEXTEND` is used to provide a |
| 4821 | ``nativesdk`` version of a recipe in addition to the target version. |
| 4822 | If that recipe declares build-time dependencies on tasks in other |
| 4823 | recipes by using :term:`DEPENDS`, then a dependency on |
| 4824 | "foo" will automatically get rewritten to a dependency on |
| 4825 | "nativesdk-foo". However, dependencies like the following will not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4826 | get rewritten automatically:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4827 | |
| 4828 | do_foo[depends] += "recipe:do_foo" |
| 4829 | |
| 4830 | If you want such a dependency to also get transformed, you can do the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4831 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4832 | |
| 4833 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" |
| 4834 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4835 | :term:`module_autoload` |
| 4836 | This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4837 | variable. You should replace all occurrences of :term:`module_autoload` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4838 | with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4839 | |
| 4840 | module_autoload_rfcomm = "rfcomm" |
| 4841 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4842 | should now be replaced with:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4843 | |
| 4844 | KERNEL_MODULE_AUTOLOAD += "rfcomm" |
| 4845 | |
| 4846 | See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. |
| 4847 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4848 | :term:`module_conf` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4849 | Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4850 | syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` |
| 4851 | file. |
| 4852 | |
| 4853 | You can use this variable anywhere that it can be recognized by the |
| 4854 | kernel recipe or out-of-tree kernel module recipe (e.g. a machine |
| 4855 | configuration file, a distribution configuration file, an append file |
| 4856 | for the recipe, or the recipe itself). If you use this variable, you |
| 4857 | must also be sure to list the module name in the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4858 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4859 | variable. |
| 4860 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4861 | Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4862 | |
| 4863 | module_conf_module_name = "modprobe.d-syntax" |
| 4864 | |
| 4865 | You must use the kernel module name override. |
| 4866 | |
| 4867 | Run ``man modprobe.d`` in the shell to find out more information on |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4868 | the exact syntax you want to provide with :term:`module_conf`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4869 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4870 | Including :term:`module_conf` causes the OpenEmbedded build system to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4871 | populate the ``/etc/modprobe.d/modname.conf`` file with |
| 4872 | ``modprobe.d`` syntax lines. Here is an example that adds the options |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4873 | ``arg1`` and ``arg2`` to a module named ``mymodule``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4874 | |
| 4875 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" |
| 4876 | |
| 4877 | For information on how to specify kernel modules to auto-load on |
| 4878 | boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. |
| 4879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4880 | :term:`MODULE_TARBALL_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4881 | Controls creation of the ``modules-*.tgz`` file. Set this variable to |
| 4882 | "0" to disable creation of this file, which contains all of the |
| 4883 | kernel modules resulting from a kernel build. |
| 4884 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4885 | :term:`MODULE_TARBALL_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4886 | The link name of the kernel module tarball. This variable is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4887 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4888 | |
| 4889 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4890 | |
| 4891 | The value |
| 4892 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4893 | same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4894 | |
| 4895 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4896 | |
| 4897 | See the :term:`MACHINE` variable for additional information. |
| 4898 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4899 | :term:`MODULE_TARBALL_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4900 | The base name of the kernel module tarball. This variable is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4901 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4902 | |
| 4903 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4904 | |
| 4905 | The value of the :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4906 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4907 | |
| 4908 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4909 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4910 | :term:`MULTIMACH_TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4911 | Uniquely identifies the type of the target system for which packages |
| 4912 | are being built. This variable allows output for different types of |
| 4913 | target systems to be put into different subdirectories of the same |
| 4914 | output directory. |
| 4915 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4916 | The default value of this variable is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4917 | |
| 4918 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} |
| 4919 | |
| 4920 | Some classes (e.g. |
| 4921 | :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4922 | :term:`MULTIMACH_TARGET_SYS` value. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4923 | |
| 4924 | See the :term:`STAMP` variable for an example. See the |
| 4925 | :term:`STAGING_DIR_TARGET` variable for more information. |
| 4926 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4927 | :term:`NATIVELSBSTRING` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4928 | A string identifying the host distribution. Strings consist of the |
| 4929 | host distributor ID followed by the release, as reported by the |
| 4930 | ``lsb_release`` tool or as read from ``/etc/lsb-release``. For |
| 4931 | example, when running a build on Ubuntu 12.10, the value is |
| 4932 | "Ubuntu-12.10". If this information is unable to be determined, the |
| 4933 | value resolves to "Unknown". |
| 4934 | |
| 4935 | This variable is used by default to isolate native shared state |
| 4936 | packages for different distributions (e.g. to avoid problems with |
| 4937 | ``glibc`` version incompatibilities). Additionally, the variable is |
| 4938 | checked against |
| 4939 | :term:`SANITY_TESTED_DISTROS` if that |
| 4940 | variable is set. |
| 4941 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4942 | :term:`NM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4943 | The minimal command and arguments to run ``nm``. |
| 4944 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4945 | :term:`NO_GENERIC_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4946 | Avoids QA errors when you use a non-common, non-CLOSED license in a |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4947 | recipe. There are packages, such as the linux-firmware package, with many |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4948 | licenses that are not in any way common. Also, new licenses are added |
| 4949 | occasionally to avoid introducing a lot of common license files, |
| 4950 | which are only applicable to a specific package. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4951 | :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4952 | not exist in common licenses. |
| 4953 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4954 | The following example shows how to add :term:`NO_GENERIC_LICENSE` to a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4955 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4956 | |
| 4957 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" |
| 4958 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4959 | Here is an example that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4960 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4961 | source:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4962 | |
| 4963 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
| 4964 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4965 | :term:`NO_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4966 | Prevents installation of all "recommended-only" packages. |
| 4967 | Recommended-only packages are packages installed only through the |
| 4968 | :term:`RRECOMMENDS` variable). Setting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4969 | :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4970 | |
| 4971 | NO_RECOMMENDATIONS = "1" |
| 4972 | |
| 4973 | You can set this variable globally in your ``local.conf`` file or you |
| 4974 | can attach it to a specific image recipe by using the recipe name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4975 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4976 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 4977 | NO_RECOMMENDATIONS:pn-target_image = "1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4978 | |
| 4979 | It is important to realize that if you choose to not install packages |
| 4980 | using this variable and some other packages are dependent on them |
| 4981 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 4982 | variable), the OpenEmbedded build system ignores your request and |
| 4983 | will install the packages to avoid dependency errors. |
| 4984 | |
| 4985 | .. note:: |
| 4986 | |
| 4987 | Some recommended packages might be required for certain system |
| 4988 | functionality, such as kernel modules. It is up to you to add |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4989 | packages with the :term:`IMAGE_INSTALL` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4990 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4991 | This variable is only supported when using the IPK and RPM |
| 4992 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4993 | |
| 4994 | See the :term:`BAD_RECOMMENDATIONS` and |
| 4995 | the :term:`PACKAGE_EXCLUDE` variables for |
| 4996 | related information. |
| 4997 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4998 | :term:`NOAUTOPACKAGEDEBUG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4999 | Disables auto package from splitting ``.debug`` files. If a recipe |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5000 | requires ``FILES:${PN}-dbg`` to be set manually, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5001 | :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5002 | content of the debug package. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5003 | |
| 5004 | NOAUTOPACKAGEDEBUG = "1" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5005 | FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" |
| 5006 | FILES:${PN}-dbg = "/usr/src/debug/" |
| 5007 | FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5008 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5009 | :term:`NON_MULTILIB_RECIPES` |
| 5010 | A list of recipes that should not be built for multilib. OE-Core's |
| 5011 | ``multilib.conf`` file defines a reasonable starting point for this |
| 5012 | list with:: |
| 5013 | |
| 5014 | NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot" |
| 5015 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5016 | :term:`OBJCOPY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5017 | The minimal command and arguments to run ``objcopy``. |
| 5018 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5019 | :term:`OBJDUMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5020 | The minimal command and arguments to run ``objdump``. |
| 5021 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5022 | :term:`OE_BINCONFIG_EXTRA_MANGLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5023 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 5024 | this variable specifies additional arguments passed to the "sed" |
| 5025 | command. The sed command alters any paths in configuration scripts |
| 5026 | that have been set up during compilation. Inheriting this class |
| 5027 | results in all paths in these scripts being changed to point into the |
| 5028 | ``sysroots/`` directory so that all builds that use the script will |
| 5029 | use the correct directories for the cross compiling layout. |
| 5030 | |
| 5031 | See the ``meta/classes/binconfig.bbclass`` in the |
| 5032 | :term:`Source Directory` for details on how this class |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5033 | applies these additional sed command arguments. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5034 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5035 | :term:`OE_IMPORTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5036 | An internal variable used to tell the OpenEmbedded build system what |
| 5037 | Python modules to import for every Python function run by the system. |
| 5038 | |
| 5039 | .. note:: |
| 5040 | |
| 5041 | Do not set this variable. It is for internal use only. |
| 5042 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5043 | :term:`OE_INIT_ENV_SCRIPT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5044 | The name of the build environment setup script for the purposes of |
| 5045 | setting up the environment within the extensible SDK. The default |
| 5046 | value is "oe-init-build-env". |
| 5047 | |
| 5048 | If you use a custom script to set up your build environment, set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5049 | :term:`OE_INIT_ENV_SCRIPT` variable to its name. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5051 | :term:`OE_TERMINAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5052 | Controls how the OpenEmbedded build system spawns interactive |
| 5053 | terminals on the host development system (e.g. using the BitBake |
| 5054 | command with the ``-c devshell`` command-line option). For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5055 | information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5056 | the Yocto Project Development Tasks Manual. |
| 5057 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5058 | You can use the following values for the :term:`OE_TERMINAL` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5059 | |
| 5060 | - auto |
| 5061 | - gnome |
| 5062 | - xfce |
| 5063 | - rxvt |
| 5064 | - screen |
| 5065 | - konsole |
| 5066 | - none |
| 5067 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5068 | :term:`OEROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5069 | The directory from which the top-level build environment setup script |
| 5070 | is sourced. The Yocto Project provides a top-level build environment |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5071 | setup script: :ref:`structure-core-script`. When you run this |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5072 | script, the :term:`OEROOT` variable resolves to the directory that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5073 | contains the script. |
| 5074 | |
| 5075 | For additional information on how this variable is used, see the |
| 5076 | initialization script. |
| 5077 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5078 | :term:`OLDEST_KERNEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5079 | Declares the oldest version of the Linux kernel that the produced |
| 5080 | binaries must support. This variable is passed into the build of the |
| 5081 | Embedded GNU C Library (``glibc``). |
| 5082 | |
| 5083 | The default for this variable comes from the |
| 5084 | ``meta/conf/bitbake.conf`` configuration file. You can override this |
| 5085 | default by setting the variable in a custom distribution |
| 5086 | configuration file. |
| 5087 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5088 | :term:`OVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5089 | A colon-separated list of overrides that currently apply. Overrides |
| 5090 | are a BitBake mechanism that allows variables to be selectively |
| 5091 | overridden at the end of parsing. The set of overrides in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5092 | :term:`OVERRIDES` represents the "state" during building, which includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5093 | the current recipe being built, the machine for which it is being |
| 5094 | built, and so forth. |
| 5095 | |
| 5096 | As an example, if the string "an-override" appears as an element in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5097 | the colon-separated list in :term:`OVERRIDES`, then the following |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5098 | assignment will override ``FOO`` with the value "overridden" at the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5099 | end of parsing:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5100 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5101 | FOO:an-override = "overridden" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5102 | |
| 5103 | See the |
| 5104 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 5105 | section in the BitBake User Manual for more information on the |
| 5106 | overrides mechanism. |
| 5107 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5108 | The default value of :term:`OVERRIDES` includes the values of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5109 | :term:`CLASSOVERRIDE`, |
| 5110 | :term:`MACHINEOVERRIDES`, and |
| 5111 | :term:`DISTROOVERRIDES` variables. Another |
| 5112 | important override included by default is ``pn-${PN}``. This override |
| 5113 | allows variables to be set for a single recipe within configuration |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5114 | (``.conf``) files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5115 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5116 | FOO:pn-myrecipe = "myrecipe-specific value" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5117 | |
| 5118 | .. note:: |
| 5119 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5120 | An easy way to see what overrides apply is to search for :term:`OVERRIDES` |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5121 | in the output of the ``bitbake -e`` command. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5122 | ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5123 | Project Development Tasks Manual for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5125 | :term:`P` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5126 | The recipe name and version. :term:`P` is comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5127 | |
| 5128 | ${PN}-${PV} |
| 5129 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5130 | :term:`PACKAGE_ADD_METADATA` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5131 | This variable defines additional metadata to add to packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5132 | |
| 5133 | You may find you need to inject additional metadata into packages. |
| 5134 | This variable allows you to do that by setting the injected data as |
| 5135 | the value. Multiple fields can be added by splitting the content with |
| 5136 | the literal separator "\n". |
| 5137 | |
| 5138 | The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable |
| 5139 | to do package type specific settings. It can also be made package |
| 5140 | specific by using the package name as a suffix. |
| 5141 | |
| 5142 | You can find out more about applying this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5143 | ":ref:`dev-manual/common-tasks:adding custom metadata to packages`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5144 | section in the Yocto Project Development Tasks Manual. |
| 5145 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5146 | :term:`PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5147 | The architecture of the resulting package or packages. |
| 5148 | |
| 5149 | By default, the value of this variable is set to |
| 5150 | :term:`TUNE_PKGARCH` when building for the |
| 5151 | target, :term:`BUILD_ARCH` when building for the |
| 5152 | build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the |
| 5153 | SDK. |
| 5154 | |
| 5155 | .. note:: |
| 5156 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5157 | See :term:`SDK_ARCH` for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5158 | |
| 5159 | However, if your recipe's output packages are built specific to the |
| 5160 | target machine rather than generally for the architecture of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5161 | machine, you should set :term:`PACKAGE_ARCH` to the value of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5162 | :term:`MACHINE_ARCH` in the recipe as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5163 | |
| 5164 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 5165 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5166 | :term:`PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5167 | Specifies a list of architectures compatible with the target machine. |
| 5168 | This variable is set automatically and should not normally be |
| 5169 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5170 | of priority. The default value for :term:`PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5171 | noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". |
| 5172 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5173 | :term:`PACKAGE_BEFORE_PN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5174 | Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5175 | that those added packages can pick up files that would normally be |
| 5176 | included in the default package. |
| 5177 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5178 | :term:`PACKAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5179 | This variable, which is set in the ``local.conf`` configuration file |
| 5180 | found in the ``conf`` folder of the |
| 5181 | :term:`Build Directory`, specifies the package manager the |
| 5182 | OpenEmbedded build system uses when packaging data. |
| 5183 | |
| 5184 | You can provide one or more of the following arguments for the |
| 5185 | variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk |
| 5186 | package_tar" |
| 5187 | |
| 5188 | .. note:: |
| 5189 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5190 | While it is a legal option, the ``package_tar`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5191 | class has limited functionality due to no support for package |
| 5192 | dependencies by that backend. Therefore, it is recommended that |
| 5193 | you do not use it. |
| 5194 | |
| 5195 | The build system uses only the first argument in the list as the |
| 5196 | package manager when creating your image or SDK. However, packages |
| 5197 | will be created using any additional packaging classes you specify. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5198 | For example, if you use the following in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5199 | |
| 5200 | PACKAGE_CLASSES ?= "package_ipk" |
| 5201 | |
| 5202 | The OpenEmbedded build system uses |
| 5203 | the IPK package manager to create your image or SDK. |
| 5204 | |
| 5205 | For information on packaging and build performance effects as a |
| 5206 | result of the package manager in use, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5207 | ":ref:`ref-classes-package`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5208 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5209 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5210 | Determines how to split up and package debug and source information |
| 5211 | when creating debugging packages to be used with the GNU Project |
| 5212 | Debugger (GDB). In general, based on the value of this variable, |
| 5213 | you can combine the source and debug info in a single package, |
| 5214 | you can break out the source into a separate package that can be |
| 5215 | installed independently, or you can choose to not have the source |
| 5216 | packaged at all. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5217 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5218 | The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5219 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5220 | - "``.debug``": All debugging and source info is placed in a single |
| 5221 | ``*-dbg`` package; debug symbol files are placed next to the |
| 5222 | binary in a ``.debug`` directory so that, if a binary is installed |
| 5223 | into ``/bin``, the corresponding debug symbol file is installed |
| 5224 | in ``/bin/.debug``. Source files are installed in the same ``*-dbg`` |
| 5225 | package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5226 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5227 | - "``debug-file-directory``": As above, all debugging and source info |
| 5228 | is placed in a single ``*-dbg`` package; debug symbol files are |
| 5229 | placed entirely under the directory ``/usr/lib/debug`` and separated |
| 5230 | by the path from where the binary is installed, so that if a binary |
| 5231 | is installed in ``/bin``, the corresponding debug symbols are installed |
| 5232 | in ``/usr/lib/debug/bin``, and so on. As above, source is installed |
| 5233 | in the same package under ``/usr/src/debug``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5234 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5235 | - "``debug-with-srcpkg``": Debugging info is placed in the standard |
| 5236 | ``*-dbg`` package as with the ``.debug`` value, while source is |
| 5237 | placed in a separate ``*-src`` package, which can be installed |
| 5238 | independently. This is the default setting for this variable, |
| 5239 | as defined in Poky's ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5240 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 5241 | - "``debug-without-src``": The same behavior as with the ``.debug`` |
| 5242 | setting, but no source is packaged at all. |
| 5243 | |
| 5244 | .. note:: |
| 5245 | |
| 5246 | Much of the above package splitting can be overridden via |
| 5247 | use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5248 | |
| 5249 | You can find out more about debugging using GDB by reading the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5250 | ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5251 | in the Yocto Project Development Tasks Manual. |
| 5252 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5253 | :term:`PACKAGE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5254 | Lists packages that should not be installed into an image. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5255 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5256 | |
| 5257 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." |
| 5258 | |
| 5259 | You can set this variable globally in your ``local.conf`` file or you |
| 5260 | can attach it to a specific image recipe by using the recipe name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5261 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5262 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5263 | PACKAGE_EXCLUDE:pn-target_image = "package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5264 | |
| 5265 | If you choose to not install a package using this variable and some |
| 5266 | other package is dependent on it (i.e. listed in a recipe's |
| 5267 | :term:`RDEPENDS` variable), the OpenEmbedded build |
| 5268 | system generates a fatal installation error. Because the build system |
| 5269 | halts the process with a fatal error, you can use the variable with |
| 5270 | an iterative development process to remove specific components from a |
| 5271 | system. |
| 5272 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5273 | This variable is supported only when using the IPK and RPM |
| 5274 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5275 | |
| 5276 | See the :term:`NO_RECOMMENDATIONS` and the |
| 5277 | :term:`BAD_RECOMMENDATIONS` variables for |
| 5278 | related information. |
| 5279 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5280 | :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` |
| 5281 | Prevents specific packages from being installed when you are |
| 5282 | installing complementary packages. |
| 5283 | |
| 5284 | You might find that you want to prevent installing certain packages |
| 5285 | when you are installing complementary packages. For example, if you |
| 5286 | are using :term:`IMAGE_FEATURES` to install |
| 5287 | ``dev-pkgs``, you might not want to install all packages from a |
| 5288 | particular multilib. If you find yourself in this situation, you can |
| 5289 | use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular |
| 5290 | expressions to match the packages you want to exclude. |
| 5291 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5292 | :term:`PACKAGE_EXTRA_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5293 | Specifies the list of architectures compatible with the device CPU. |
| 5294 | This variable is useful when you build for several different devices |
| 5295 | that use miscellaneous processors such as XScale and ARM926-EJS. |
| 5296 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5297 | :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5298 | Optionally specifies the package architectures used as part of the |
| 5299 | package feed URIs during the build. When used, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5300 | :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5301 | URI, which is constructed using the |
| 5302 | :term:`PACKAGE_FEED_URIS` and |
| 5303 | :term:`PACKAGE_FEED_BASE_PATHS` |
| 5304 | variables. |
| 5305 | |
| 5306 | .. note:: |
| 5307 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5308 | You can use the :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5309 | variable to allow specific package architectures. If you do |
| 5310 | not need to allow specific architectures, which is a common |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5311 | case, you can omit this variable. Omitting the variable results in |
| 5312 | all available architectures for the current machine being included |
| 5313 | into remote package feeds. |
| 5314 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5315 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5316 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5317 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5318 | |
| 5319 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5320 | https://example.com/packagerepos/updates" |
| 5321 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5322 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5323 | |
| 5324 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5325 | |
| 5326 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5327 | |
| 5328 | https://example.com/packagerepos/release/rpm/all |
| 5329 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5330 | https://example.com/packagerepos/release/rpm-dev/all |
| 5331 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5332 | https://example.com/packagerepos/updates/rpm/all |
| 5333 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5334 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5335 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5336 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5337 | :term:`PACKAGE_FEED_BASE_PATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5338 | Specifies the base path used when constructing package feed URIs. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5339 | :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5340 | package feed URI used by the OpenEmbedded build system. The base path |
| 5341 | lies between the :term:`PACKAGE_FEED_URIS` |
| 5342 | and :term:`PACKAGE_FEED_ARCHS` variables. |
| 5343 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5344 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5345 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5346 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5347 | |
| 5348 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5349 | https://example.com/packagerepos/updates" |
| 5350 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5351 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5352 | |
| 5353 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5354 | |
| 5355 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5356 | |
| 5357 | https://example.com/packagerepos/release/rpm/all |
| 5358 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5359 | https://example.com/packagerepos/release/rpm-dev/all |
| 5360 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5361 | https://example.com/packagerepos/updates/rpm/all |
| 5362 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5363 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5364 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5365 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5366 | :term:`PACKAGE_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5367 | Specifies the front portion of the package feed URI used by the |
| 5368 | OpenEmbedded build system. Each final package feed URI is comprised |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5369 | of :term:`PACKAGE_FEED_URIS`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5370 | :term:`PACKAGE_FEED_BASE_PATHS`, and |
| 5371 | :term:`PACKAGE_FEED_ARCHS` variables. |
| 5372 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5373 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5374 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5375 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5376 | |
| 5377 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5378 | https://example.com/packagerepos/updates" |
| 5379 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5380 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5381 | |
| 5382 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5383 | |
| 5384 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5385 | |
| 5386 | https://example.com/packagerepos/release/rpm/all |
| 5387 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5388 | https://example.com/packagerepos/release/rpm-dev/all |
| 5389 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5390 | https://example.com/packagerepos/updates/rpm/all |
| 5391 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5392 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5393 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5394 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5395 | :term:`PACKAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5396 | The final list of packages passed to the package manager for |
| 5397 | installation into the image. |
| 5398 | |
| 5399 | Because the package manager controls actual installation of all |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5400 | packages, the list of packages passed using :term:`PACKAGE_INSTALL` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5401 | not the final list of packages that are actually installed. This |
| 5402 | variable is internal to the image construction code. Consequently, in |
| 5403 | general, you should use the |
| 5404 | :term:`IMAGE_INSTALL` variable to specify |
| 5405 | packages for installation. The exception to this is when working with |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5406 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5407 | image. When working with an initial RAM filesystem (initramfs) image, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5408 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5409 | initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5410 | in the Yocto Project Development Tasks Manual. |
| 5411 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5412 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5413 | Specifies a list of packages the OpenEmbedded build system attempts |
| 5414 | to install when creating an image. If a listed package fails to |
| 5415 | install, the build system does not generate an error. This variable |
| 5416 | is generally not user-defined. |
| 5417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5418 | :term:`PACKAGE_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5419 | Specifies a list of functions run to pre-process the |
| 5420 | :term:`PKGD` directory prior to splitting the files out |
| 5421 | to individual packages. |
| 5422 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5423 | :term:`PACKAGE_WRITE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5424 | Specifies a list of dependencies for post-installation and |
| 5425 | pre-installation scripts on native/cross tools. If your |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5426 | post-installation or pre-installation script can execute at root filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5427 | creation time rather than on the target but depends on a native tool |
| 5428 | in order to execute, you need to list the tools in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5429 | :term:`PACKAGE_WRITE_DEPS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5430 | |
| 5431 | For information on running post-installation scripts, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5432 | ":ref:`dev-manual/common-tasks:post-installation scripts`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5433 | section in the Yocto Project Development Tasks Manual. |
| 5434 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5435 | :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5436 | This variable provides a means of enabling or disabling features of a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5437 | recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5438 | recipes when you specify features and then arguments that define |
| 5439 | feature behaviors. Here is the basic block structure (broken over |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5440 | multiple lines for readability):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5441 | |
| 5442 | PACKAGECONFIG ??= "f1 f2 f3 ..." |
| 5443 | PACKAGECONFIG[f1] = "\ |
| 5444 | --with-f1, \ |
| 5445 | --without-f1, \ |
| 5446 | build-deps-for-f1, \ |
| 5447 | runtime-deps-for-f1, \ |
| 5448 | runtime-recommends-for-f1, \ |
| 5449 | packageconfig-conflicts-for-f1" |
| 5450 | PACKAGECONFIG[f2] = "\ |
| 5451 | ... and so on and so on ... |
| 5452 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5453 | The :term:`PACKAGECONFIG` variable itself specifies a space-separated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5454 | list of the features to enable. Following the features, you can |
| 5455 | determine the behavior of each feature by providing up to six |
| 5456 | order-dependent arguments, which are separated by commas. You can |
| 5457 | omit any argument you like but must retain the separating commas. The |
| 5458 | order is important and specifies the following: |
| 5459 | |
| 5460 | 1. Extra arguments that should be added to the configure script |
| 5461 | argument list (:term:`EXTRA_OECONF` or |
| 5462 | :term:`PACKAGECONFIG_CONFARGS`) if |
| 5463 | the feature is enabled. |
| 5464 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5465 | 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or |
| 5466 | :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5467 | |
| 5468 | 3. Additional build dependencies (:term:`DEPENDS`) |
| 5469 | that should be added if the feature is enabled. |
| 5470 | |
| 5471 | 4. Additional runtime dependencies (:term:`RDEPENDS`) |
| 5472 | that should be added if the feature is enabled. |
| 5473 | |
| 5474 | 5. Additional runtime recommendations |
| 5475 | (:term:`RRECOMMENDS`) that should be added if |
| 5476 | the feature is enabled. |
| 5477 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5478 | 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5479 | settings for this feature. |
| 5480 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5481 | Consider the following :term:`PACKAGECONFIG` block taken from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5482 | ``librsvg`` recipe. In this example the feature is ``gtk``, which has |
| 5483 | three arguments that determine the feature's behavior. |
| 5484 | :: |
| 5485 | |
| 5486 | PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" |
| 5487 | |
| 5488 | The |
| 5489 | ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is |
| 5490 | enabled. In this case, ``--with-gtk3`` is added to the configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5491 | script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5492 | other hand, if the feature is disabled say through a ``.bbappend`` |
| 5493 | file in another layer, then the second argument ``--without-gtk3`` is |
| 5494 | added to the configure script instead. |
| 5495 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5496 | The basic :term:`PACKAGECONFIG` structure previously described holds true |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5497 | regardless of whether you are creating a block or changing a block. |
| 5498 | When creating a block, use the structure inside your recipe. |
| 5499 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5500 | If you want to change an existing :term:`PACKAGECONFIG` block, you can do |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5501 | so one of two ways: |
| 5502 | |
| 5503 | - *Append file:* Create an append file named |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5504 | ``recipename.bbappend`` in your layer and override the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5505 | :term:`PACKAGECONFIG`. You can either completely override the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5506 | variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5507 | |
| 5508 | PACKAGECONFIG = "f4 f5" |
| 5509 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5510 | Or, you can just append the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5511 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5512 | PACKAGECONFIG:append = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5513 | |
| 5514 | - *Configuration file:* This method is identical to changing the |
| 5515 | block through an append file except you edit your ``local.conf`` |
| 5516 | or ``mydistro.conf`` file. As with append files previously |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5517 | described, you can either completely override the variable:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5518 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5519 | PACKAGECONFIG:pn-recipename = "f4 f5" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5520 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5521 | Or, you can just amend the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5522 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5523 | PACKAGECONFIG:append:pn-recipename = " f4" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5524 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5525 | :term:`PACKAGECONFIG_CONFARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5526 | A space-separated list of configuration options generated from the |
| 5527 | :term:`PACKAGECONFIG` setting. |
| 5528 | |
| 5529 | Classes such as :ref:`autotools <ref-classes-autotools>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5530 | :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to |
| 5531 | pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``, |
| 5532 | respectively. If you are using :term:`PACKAGECONFIG` but not a class that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5533 | handles the ``do_configure`` task, then you need to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5534 | :term:`PACKAGECONFIG_CONFARGS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5535 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5536 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5537 | For recipes inheriting the |
| 5538 | :ref:`packagegroup <ref-classes-packagegroup>` class, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5539 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5540 | normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) |
| 5541 | should not be automatically created by the ``packagegroup`` recipe, |
| 5542 | which is the default behavior. |
| 5543 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5544 | :term:`PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5545 | The list of packages the recipe creates. The default value is the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5546 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5547 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 5548 | ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN} |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5549 | |
| 5550 | During packaging, the :ref:`ref-tasks-package` task |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5551 | goes through :term:`PACKAGES` and uses the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5552 | variable corresponding to each package to assign files to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5553 | package. If a file matches the :term:`FILES` variable for more than one |
| 5554 | package in :term:`PACKAGES`, it will be assigned to the earliest |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5555 | (leftmost) package. |
| 5556 | |
| 5557 | Packages in the variable's list that are empty (i.e. where none of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5558 | the patterns in ``FILES:``\ pkg match any files installed by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5559 | :ref:`ref-tasks-install` task) are not generated, |
| 5560 | unless generation is forced through the |
| 5561 | :term:`ALLOW_EMPTY` variable. |
| 5562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5563 | :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5564 | A promise that your recipe satisfies runtime dependencies for |
| 5565 | optional modules that are found in other recipes. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5566 | :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5567 | only states that they should be satisfied. For example, if a hard, |
| 5568 | runtime dependency (:term:`RDEPENDS`) of another |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5569 | package is satisfied at build time through the :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5570 | variable, but a package with the module name is never actually |
| 5571 | produced, then the other package will be broken. Thus, if you attempt |
| 5572 | to include that package in an image, you will get a dependency |
| 5573 | failure from the packaging system during the |
| 5574 | :ref:`ref-tasks-rootfs` task. |
| 5575 | |
| 5576 | Typically, if there is a chance that such a situation can occur and |
| 5577 | the package that is not created is valid without the dependency being |
| 5578 | satisfied, then you should use :term:`RRECOMMENDS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5579 | (a soft runtime dependency) instead of :term:`RDEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5580 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5581 | For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5582 | you are splitting packages, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5583 | ":ref:`dev-manual/common-tasks:handling optional module packaging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5584 | section in the Yocto Project Development Tasks Manual. |
| 5585 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5586 | :term:`PACKAGESPLITFUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5587 | Specifies a list of functions run to perform additional splitting of |
| 5588 | files into individual packages. Recipes can either prepend to this |
| 5589 | variable or prepend to the ``populate_packages`` function in order to |
| 5590 | perform additional package splitting. In either case, the function |
| 5591 | should set :term:`PACKAGES`, |
| 5592 | :term:`FILES`, :term:`RDEPENDS` and |
| 5593 | other packaging variables appropriately in order to perform the |
| 5594 | desired splitting. |
| 5595 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5596 | :term:`PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5597 | Extra options passed to the ``make`` command during the |
| 5598 | :ref:`ref-tasks-compile` task in order to specify |
| 5599 | parallel compilation on the local build host. This variable is |
| 5600 | usually in the form "-j x", where x represents the maximum number of |
| 5601 | parallel threads ``make`` can run. |
| 5602 | |
| 5603 | .. note:: |
| 5604 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5605 | In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5606 | called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure |
| 5607 | this is to use the ``oe_runmake`` function. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5608 | |
| 5609 | By default, the OpenEmbedded build system automatically sets this |
| 5610 | variable to be equal to the number of cores the build system uses. |
| 5611 | |
| 5612 | .. note:: |
| 5613 | |
| 5614 | If the software being built experiences dependency issues during |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5615 | the ``do_compile`` task that result in race conditions, you can clear |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5616 | the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5617 | information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5618 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5619 | section in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5620 | |
| 5621 | For single socket systems (i.e. one CPU), you should not have to |
| 5622 | override this variable to gain optimal parallelism during builds. |
| 5623 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5624 | CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5625 | not set higher than "-j 20". |
| 5626 | |
| 5627 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5628 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5629 | section in the Yocto Project Development Tasks Manual. |
| 5630 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5631 | :term:`PARALLEL_MAKEINST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5632 | Extra options passed to the ``make install`` command during the |
| 5633 | :ref:`ref-tasks-install` task in order to specify |
| 5634 | parallel installation. This variable defaults to the value of |
| 5635 | :term:`PARALLEL_MAKE`. |
| 5636 | |
| 5637 | .. note:: |
| 5638 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5639 | In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5640 | be called with |
| 5641 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 5642 | way to ensure this is to use the ``oe_runmake`` function. |
| 5643 | |
| 5644 | If the software being built experiences dependency issues during |
| 5645 | the ``do_install`` task that result in race conditions, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5646 | clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5647 | workaround. For information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5648 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5649 | section in the Yocto Project Development Tasks Manual. |
| 5650 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5651 | :term:`PATCHRESOLVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5652 | Determines the action to take when a patch fails. You can set this |
| 5653 | variable to one of two values: "noop" and "user". |
| 5654 | |
| 5655 | The default value of "noop" causes the build to simply fail when the |
| 5656 | OpenEmbedded build system cannot successfully apply a patch. Setting |
| 5657 | the value to "user" causes the build system to launch a shell and |
| 5658 | places you in the right location so that you can manually resolve the |
| 5659 | conflicts. |
| 5660 | |
| 5661 | Set this variable in your ``local.conf`` file. |
| 5662 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5663 | :term:`PATCHTOOL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5664 | Specifies the utility used to apply patches for a recipe during the |
| 5665 | :ref:`ref-tasks-patch` task. You can specify one of |
| 5666 | three utilities: "patch", "quilt", or "git". The default utility used |
| 5667 | is "quilt" except for the quilt-native recipe itself. Because the |
| 5668 | quilt tool is not available at the time quilt-native is being |
| 5669 | patched, it uses "patch". |
| 5670 | |
| 5671 | If you wish to use an alternative patching tool, set the variable in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5672 | the recipe using one of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5673 | |
| 5674 | PATCHTOOL = "patch" |
| 5675 | PATCHTOOL = "quilt" |
| 5676 | PATCHTOOL = "git" |
| 5677 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5678 | :term:`PE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5679 | The epoch of the recipe. By default, this variable is unset. The |
| 5680 | variable is used to make upgrades possible when the versioning scheme |
| 5681 | changes in some backwards incompatible way. |
| 5682 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5683 | :term:`PE` is the default value of the :term:`PKGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5684 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5685 | :term:`PEP517_WHEEL_PATH` |
| 5686 | When used by recipes that inherit the |
| 5687 | :ref:`python_pep517 <ref-classes-python_pep517>` class, |
| 5688 | denotes the path to ``dist/`` (short for distribution) where the |
| 5689 | binary archive ``wheel`` is built. |
| 5690 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5691 | :term:`PF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5692 | Specifies the recipe or package name and includes all version and |
| 5693 | revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and |
| 5694 | ``bash-4.2-r1/``). This variable is comprised of the following: |
| 5695 | ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} |
| 5696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5697 | :term:`PIXBUF_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5698 | When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>` |
| 5699 | class, this variable identifies packages that contain the pixbuf |
| 5700 | loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache`` |
| 5701 | class assumes that the loaders are in the recipe's main package (i.e. |
| 5702 | ``${``\ :term:`PN`\ ``}``). Use this variable if the |
| 5703 | loaders you need are in a package other than that main package. |
| 5704 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5705 | :term:`PKG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5706 | The name of the resulting package created by the OpenEmbedded build |
| 5707 | system. |
| 5708 | |
| 5709 | .. note:: |
| 5710 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5711 | When using the :term:`PKG` variable, you must use a package name override. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5712 | |
| 5713 | For example, when the :ref:`debian <ref-classes-debian>` class |
| 5714 | renames the output package, it does so by setting |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5715 | ``PKG:packagename``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5716 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5717 | :term:`PKG_CONFIG_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5718 | The path to ``pkg-config`` files for the current build context. |
| 5719 | ``pkg-config`` reads this variable from the environment. |
| 5720 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5721 | :term:`PKGD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5722 | Points to the destination directory for files to be packaged before |
| 5723 | they are split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5724 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5725 | |
| 5726 | ${WORKDIR}/package |
| 5727 | |
| 5728 | Do not change this default. |
| 5729 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5730 | :term:`PKGDATA_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5731 | Points to a shared, global-state directory that holds data generated |
| 5732 | during the packaging process. During the packaging process, the |
| 5733 | :ref:`ref-tasks-packagedata` task packages data |
| 5734 | for each recipe and installs it into this temporary, shared area. |
| 5735 | This directory defaults to the following, which you should not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5736 | change:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5737 | |
| 5738 | ${STAGING_DIR_HOST}/pkgdata |
| 5739 | |
| 5740 | For examples of how this data is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5741 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5742 | section in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5743 | ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5744 | section in the Yocto Project Development Tasks Manual. For more |
| 5745 | information on the shared, global-state directory, see |
| 5746 | :term:`STAGING_DIR_HOST`. |
| 5747 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5748 | :term:`PKGDEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5749 | Points to the parent directory for files to be packaged after they |
| 5750 | have been split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5751 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5752 | |
| 5753 | ${WORKDIR}/packages-split |
| 5754 | |
| 5755 | Under this directory, the build system creates directories for each |
| 5756 | package specified in :term:`PACKAGES`. Do not change |
| 5757 | this default. |
| 5758 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5759 | :term:`PKGDESTWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5760 | Points to a temporary work area where the |
| 5761 | :ref:`ref-tasks-package` task saves package metadata. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5762 | The :term:`PKGDESTWORK` location defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5763 | |
| 5764 | ${WORKDIR}/pkgdata |
| 5765 | |
| 5766 | Do not change this default. |
| 5767 | |
| 5768 | The :ref:`ref-tasks-packagedata` task copies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5769 | package metadata from :term:`PKGDESTWORK` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5770 | :term:`PKGDATA_DIR` to make it available globally. |
| 5771 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5772 | :term:`PKGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5773 | The epoch of the package(s) built by the recipe. By default, :term:`PKGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5774 | is set to :term:`PE`. |
| 5775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5776 | :term:`PKGR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5777 | The revision of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5778 | :term:`PKGR` is set to :term:`PR`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5779 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5780 | :term:`PKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5781 | The version of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5782 | :term:`PKGV` is set to :term:`PV`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5783 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5784 | :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5785 | This variable can have two separate functions depending on the |
| 5786 | context: a recipe name or a resulting package name. |
| 5787 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5788 | :term:`PN` refers to a recipe name in the context of a file used by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5789 | OpenEmbedded build system as input to create a package. The name is |
| 5790 | normally extracted from the recipe file name. For example, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5791 | recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5792 | will be "expat". |
| 5793 | |
| 5794 | The variable refers to a package name in the context of a file |
| 5795 | created or produced by the OpenEmbedded build system. |
| 5796 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5797 | If applicable, the :term:`PN` variable also contains any special suffix |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5798 | or prefix. For example, using ``bash`` to build packages for the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5799 | native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5800 | packages for the target and for Multilib, :term:`PN` would be ``bash`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5801 | and ``lib64-bash``, respectively. |
| 5802 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5803 | :term:`POPULATE_SDK_POST_HOST_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5804 | Specifies a list of functions to call once the OpenEmbedded build |
| 5805 | system has created the host part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5806 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5807 | |
| 5808 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " |
| 5809 | |
| 5810 | If you need to pass the SDK path to a command within a function, you |
| 5811 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 5812 | the OpenEmbedded build system when creating SDK output. See the |
| 5813 | :term:`SDK_DIR` variable for more information. |
| 5814 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5815 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5816 | Specifies a list of functions to call once the OpenEmbedded build |
| 5817 | system has created the target part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5818 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5819 | |
| 5820 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " |
| 5821 | |
| 5822 | If you need to pass the SDK path to a command within a function, you |
| 5823 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 5824 | the OpenEmbedded build system when creating SDK output. See the |
| 5825 | :term:`SDK_DIR` variable for more information. |
| 5826 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5827 | :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5828 | The revision of the recipe. The default value for this variable is |
| 5829 | "r0". Subsequent revisions of the recipe conventionally have the |
| 5830 | values "r1", "r2", and so forth. When :term:`PV` increases, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5831 | :term:`PR` is conventionally reset to "r0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5832 | |
| 5833 | .. note:: |
| 5834 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5835 | The OpenEmbedded build system does not need the aid of :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5836 | to know when to rebuild a recipe. The build system uses the task |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5837 | :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5838 | :ref:`stamp <structure-build-tmp-stamps>` and |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5839 | :ref:`overview-manual/concepts:shared state cache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5840 | mechanisms. |
| 5841 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5842 | The :term:`PR` variable primarily becomes significant when a package |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5843 | manager dynamically installs packages on an already built image. In |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5844 | this case, :term:`PR`, which is the default value of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5845 | :term:`PKGR`, helps the package manager distinguish which |
| 5846 | package is the most recent one in cases where many packages have the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5847 | same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with |
| 5848 | the same :term:`PV` usually means that the packages all install the same |
| 5849 | upstream version, but with later (:term:`PR`) version packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5850 | packaging fixes. |
| 5851 | |
| 5852 | .. note:: |
| 5853 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5854 | :term:`PR` does not need to be increased for changes that do not change the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5855 | package contents or metadata. |
| 5856 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5857 | Because manually managing :term:`PR` can be cumbersome and error-prone, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5858 | an automated solution exists. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5859 | ":ref:`dev-manual/common-tasks:working with a pr service`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5860 | in the Yocto Project Development Tasks Manual for more information. |
| 5861 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5862 | :term:`PREFERRED_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5863 | If multiple recipes provide the same item, this variable determines |
| 5864 | which recipe is preferred and thus provides the item (i.e. the |
| 5865 | preferred provider). You should always suffix this variable with the |
| 5866 | name of the provided item. And, you should define the variable using |
| 5867 | the preferred recipe's name (:term:`PN`). Here is a common |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5868 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5869 | |
| 5870 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 5871 | |
| 5872 | In the previous example, multiple recipes are providing "virtual/kernel". |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5873 | The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5874 | the recipe you prefer to provide "virtual/kernel". |
| 5875 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5876 | Following are more examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5877 | |
| 5878 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
| 5879 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
| 5880 | |
| 5881 | For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5882 | information, see the ":ref:`dev-manual/common-tasks:using virtual providers`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5883 | section in the Yocto Project Development Tasks Manual. |
| 5884 | |
| 5885 | .. note:: |
| 5886 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5887 | If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5888 | recipe that :term:`PROVIDES` that item but is not selected (defined) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5889 | by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5890 | desirable since this mechanism is designed to select between mutually |
| 5891 | exclusive alternative providers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5892 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5893 | :term:`PREFERRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5894 | If there are multiple versions of a recipe available, this variable |
| 5895 | determines which version should be given preference. You must always |
| 5896 | suffix the variable with the :term:`PN` you want to select (`python` in |
| 5897 | the first example below), and you should specify the :term:`PV` |
| 5898 | accordingly (`3.4.0` in the example). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5899 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5900 | The :term:`PREFERRED_VERSION` variable supports limited wildcard use |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5901 | through the "``%``" character. You can use the character to match any |
| 5902 | number of characters, which can be useful when specifying versions |
| 5903 | that contain long revision numbers that potentially change. Here are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5904 | two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5905 | |
| 5906 | PREFERRED_VERSION_python = "3.4.0" |
| 5907 | PREFERRED_VERSION_linux-yocto = "5.0%" |
| 5908 | |
| 5909 | .. note:: |
| 5910 | |
| 5911 | The use of the "%" character is limited in that it only works at the end of the |
| 5912 | string. You cannot use the wildcard character in any other |
| 5913 | location of the string. |
| 5914 | |
| 5915 | The specified version is matched against :term:`PV`, which |
| 5916 | does not necessarily match the version part of the recipe's filename. |
| 5917 | For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5918 | where ``foo_git.bb`` contains the following assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5919 | |
| 5920 | PV = "1.1+git${SRCPV}" |
| 5921 | |
| 5922 | In this case, the correct way to select |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5923 | ``foo_git.bb`` is by using an assignment such as the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5924 | |
| 5925 | PREFERRED_VERSION_foo = "1.1+git%" |
| 5926 | |
| 5927 | Compare that previous example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5928 | against the following incorrect example, which does not work:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5929 | |
| 5930 | PREFERRED_VERSION_foo = "git" |
| 5931 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5932 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5933 | configuration files in a way that is hard to change. You can use |
| 5934 | :term:`OVERRIDES` to set a machine-specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5935 | override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5936 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5937 | PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5938 | |
| 5939 | Although not recommended, worst case, you can also use the |
| 5940 | "forcevariable" override, which is the strongest override possible. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5941 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5942 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5943 | PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5944 | |
| 5945 | .. note:: |
| 5946 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5947 | The ``:forcevariable`` override is not handled specially. This override |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5948 | only works because the default value of :term:`OVERRIDES` includes "forcevariable". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5949 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5950 | If a recipe with the specified version is not available, a warning |
| 5951 | message will be shown. See :term:`REQUIRED_VERSION` if you want this |
| 5952 | to be an error instead. |
| 5953 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5954 | :term:`PREMIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5955 | Specifies additional paths from which the OpenEmbedded build system |
| 5956 | gets source code. When the build system searches for source code, it |
| 5957 | first tries the local download directory. If that location fails, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5958 | build system tries locations defined by :term:`PREMIRRORS`, the upstream |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5959 | source, and then locations specified by |
| 5960 | :term:`MIRRORS` in that order. |
| 5961 | |
| 5962 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5963 | the default value for :term:`PREMIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5964 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 5965 | |
| 5966 | Typically, you could add a specific server for the build system to |
| 5967 | attempt before any others by adding something like the following to |
| 5968 | the ``local.conf`` configuration file in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5969 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5970 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 5971 | PREMIRRORS:prepend = "\ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5972 | git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 5973 | ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 5974 | http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ |
| 5975 | https://.*/.* &YOCTO_DL_URL;/mirror/sources/" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5976 | |
| 5977 | These changes cause the |
| 5978 | build system to intercept Git, FTP, HTTP, and HTTPS requests and |
| 5979 | direct them to the ``http://`` sources mirror. You can use |
| 5980 | ``file://`` URLs to point to local directories or network shares as |
| 5981 | well. |
| 5982 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5983 | :term:`PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5984 | Indicates the importance of a package. |
| 5985 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5986 | :term:`PRIORITY` is considered to be part of the distribution policy |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5987 | because the importance of any given recipe depends on the purpose for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5988 | which the distribution is being produced. Thus, :term:`PRIORITY` is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5989 | normally set within recipes. |
| 5990 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5991 | You can set :term:`PRIORITY` to "required", "standard", "extra", and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5992 | "optional", which is the default. |
| 5993 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5994 | :term:`PRIVATE_LIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5995 | Specifies libraries installed within a recipe that should be ignored |
| 5996 | by the OpenEmbedded build system's shared library resolver. This |
| 5997 | variable is typically used when software being built by a recipe has |
| 5998 | its own private versions of a library normally provided by another |
| 5999 | recipe. In this case, you would not want the package containing the |
| 6000 | private libraries to be set as a dependency on other unrelated |
| 6001 | packages that should instead depend on the package providing the |
| 6002 | standard version of the library. |
| 6003 | |
| 6004 | Libraries specified in this variable should be specified by their |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6005 | file name. For example, from the Firefox recipe in meta-browser:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6006 | |
| 6007 | PRIVATE_LIBS = "libmozjs.so \ |
| 6008 | libxpcom.so \ |
| 6009 | libnspr4.so \ |
| 6010 | libxul.so \ |
| 6011 | libmozalloc.so \ |
| 6012 | libplc4.so \ |
| 6013 | libplds4.so" |
| 6014 | |
| 6015 | For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6016 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6017 | section in the Yocto Project Overview and Concepts Manual. |
| 6018 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6019 | :term:`PROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6020 | A list of aliases by which a particular recipe can be known. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6021 | default, a recipe's own :term:`PN` is implicitly already in its |
| 6022 | :term:`PROVIDES` list and therefore does not need to mention that it |
| 6023 | provides itself. If a recipe uses :term:`PROVIDES`, the additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6024 | aliases are synonyms for the recipe and can be useful for satisfying |
| 6025 | dependencies of other recipes during the build as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6026 | :term:`DEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6027 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6028 | Consider the following example :term:`PROVIDES` statement from the recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6029 | file ``eudev_3.2.9.bb``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6030 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6031 | PROVIDES += "udev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6032 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6033 | The :term:`PROVIDES` statement |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6034 | results in the "eudev" recipe also being available as simply "udev". |
| 6035 | |
| 6036 | .. note:: |
| 6037 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6038 | A recipe's own recipe name (:term:`PN`) is always implicitly prepended |
| 6039 | to `PROVIDES`, so while using "+=" in the above example may not be |
| 6040 | strictly necessary it is recommended to avoid confusion. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6041 | |
| 6042 | In addition to providing recipes under alternate names, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6043 | :term:`PROVIDES` mechanism is also used to implement virtual targets. A |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6044 | virtual target is a name that corresponds to some particular |
| 6045 | functionality (e.g. a Linux kernel). Recipes that provide the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6046 | functionality in question list the virtual target in :term:`PROVIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6047 | Recipes that depend on the functionality in question can include the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6048 | virtual target in :term:`DEPENDS` to leave the choice of provider open. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6049 | |
| 6050 | Conventionally, virtual targets have names on the form |
| 6051 | "virtual/function" (e.g. "virtual/kernel"). The slash is simply part |
| 6052 | of the name and has no syntactical significance. |
| 6053 | |
| 6054 | The :term:`PREFERRED_PROVIDER` variable is |
| 6055 | used to select which particular recipe provides a virtual target. |
| 6056 | |
| 6057 | .. note:: |
| 6058 | |
| 6059 | A corresponding mechanism for virtual runtime dependencies |
| 6060 | (packages) exists. However, the mechanism does not depend on any |
| 6061 | special functionality beyond ordinary variable assignments. For |
| 6062 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of |
| 6063 | the component that manages the ``/dev`` directory. |
| 6064 | |
| 6065 | Setting the "preferred provider" for runtime dependencies is as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6066 | simple as using the following assignment in a configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6067 | |
| 6068 | VIRTUAL-RUNTIME_dev_manager = "udev" |
| 6069 | |
| 6070 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6071 | :term:`PRSERV_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6072 | The network based :term:`PR` service host and port. |
| 6073 | |
| 6074 | The ``conf/local.conf.sample.extended`` configuration file in the |
| 6075 | :term:`Source Directory` shows how the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6076 | :term:`PRSERV_HOST` variable is set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6077 | |
| 6078 | PRSERV_HOST = "localhost:0" |
| 6079 | |
| 6080 | You must |
| 6081 | set the variable if you want to automatically start a local :ref:`PR |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6082 | service <dev-manual/common-tasks:working with a pr service>`. You can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6083 | set :term:`PRSERV_HOST` to other values to use a remote PR service. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6084 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6085 | |
| 6086 | :term:`PSEUDO_IGNORE_PATHS` |
| 6087 | A comma-separated (without spaces) list of path prefixes that should be ignored |
| 6088 | by pseudo when monitoring and recording file operations, in order to avoid |
| 6089 | problems with files being written to outside of the pseudo context and |
| 6090 | reduce pseudo's overhead. A path is ignored if it matches any prefix in the list |
| 6091 | and can include partial directory (or file) names. |
| 6092 | |
| 6093 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6094 | :term:`PTEST_ENABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6095 | Specifies whether or not :ref:`Package |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6096 | Test <dev-manual/common-tasks:testing packages with ptest>` (ptest) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6097 | functionality is enabled when building a recipe. You should not set |
| 6098 | this variable directly. Enabling and disabling building Package Tests |
| 6099 | at build time should be done by adding "ptest" to (or removing it |
| 6100 | from) :term:`DISTRO_FEATURES`. |
| 6101 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6102 | :term:`PV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6103 | The version of the recipe. The version is normally extracted from the |
| 6104 | recipe filename. For example, if the recipe is named |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6105 | ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1". |
| 6106 | :term:`PV` is generally not overridden within a recipe unless it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6107 | building an unstable (i.e. development) version from a source code |
| 6108 | repository (e.g. Git or Subversion). |
| 6109 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6110 | :term:`PV` is the default value of the :term:`PKGV` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6111 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6112 | :term:`PYTHON_ABI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6113 | When used by recipes that inherit the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6114 | :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6115 | Application Binary Interface (ABI) currently in use for Python. By |
| 6116 | default, the ABI is "m". You do not have to set this variable as the |
| 6117 | OpenEmbedded build system sets it for you. |
| 6118 | |
| 6119 | The OpenEmbedded build system uses the ABI to construct directory |
| 6120 | names used when installing the Python headers and libraries in |
| 6121 | sysroot (e.g. ``.../python3.3m/...``). |
| 6122 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6123 | :term:`PYTHON_PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6124 | When used by recipes that inherit the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6125 | :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6126 | major Python version being built. For Python 3.x, :term:`PYTHON_PN` would |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6127 | be "python3". You do not have to set this variable as the |
| 6128 | OpenEmbedded build system automatically sets it for you. |
| 6129 | |
| 6130 | The variable allows recipes to use common infrastructure such as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6131 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6132 | |
| 6133 | DEPENDS += "${PYTHON_PN}-native" |
| 6134 | |
| 6135 | In the previous example, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6136 | the version of the dependency is :term:`PYTHON_PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6137 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 6138 | :term:`QA_EMPTY_DIRS` |
| 6139 | Specifies a list of directories that are expected to be empty when |
| 6140 | packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or |
| 6141 | :term:`WARN_QA` these will be checked and an error or warning |
| 6142 | (respectively) will be produced. |
| 6143 | |
| 6144 | The default :term:`QA_EMPTY_DIRS` value is set in |
| 6145 | :ref:`insane.bbclass <ref-classes-insane>`. |
| 6146 | |
| 6147 | :term:`QA_EMPTY_DIRS_RECOMMENDATION` |
| 6148 | Specifies a recommendation for why a directory must be empty, |
| 6149 | which will be included in the error message if a specific directory |
| 6150 | is found to contain files. Must be overridden with the directory |
| 6151 | path to match on. |
| 6152 | |
| 6153 | If no recommendation is specified for a directory, then the default |
| 6154 | "but it is expected to be empty" will be used. |
| 6155 | |
| 6156 | An example message shows if files were present in '/dev':: |
| 6157 | |
| 6158 | QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime" |
| 6159 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6160 | :term:`RANLIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6161 | The minimal command and arguments to run ``ranlib``. |
| 6162 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6163 | :term:`RCONFLICTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6164 | The list of packages that conflict with packages. Note that packages |
| 6165 | will not be installed if conflicting packages are not first removed. |
| 6166 | |
| 6167 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6168 | conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6169 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6170 | RCONFLICTS:${PN} = "another_conflicting_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6171 | |
| 6172 | BitBake, which the OpenEmbedded build system uses, supports |
| 6173 | specifying versioned dependencies. Although the syntax varies |
| 6174 | depending on the packaging format, BitBake hides these differences |
| 6175 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6176 | :term:`RCONFLICTS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6177 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6178 | RCONFLICTS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6179 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6180 | For ``operator``, you can specify the following: |
| 6181 | |
| 6182 | - = |
| 6183 | - < |
| 6184 | - > |
| 6185 | - <= |
| 6186 | - >= |
| 6187 | |
| 6188 | For example, the following sets up a dependency on version 1.2 or |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6189 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6190 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6191 | RCONFLICTS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6192 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6193 | :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6194 | Lists runtime dependencies of a package. These dependencies are other |
| 6195 | packages that must be installed in order for the package to function |
| 6196 | correctly. As an example, the following assignment declares that the |
| 6197 | package ``foo`` needs the packages ``bar`` and ``baz`` to be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6198 | installed:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6199 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6200 | RDEPENDS:foo = "bar baz" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6201 | |
| 6202 | The most common types of package |
| 6203 | runtime dependencies are automatically detected and added. Therefore, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6204 | most recipes do not need to set :term:`RDEPENDS`. For more information, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6205 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6206 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6207 | section in the Yocto Project Overview and Concepts Manual. |
| 6208 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6209 | The practical effect of the above :term:`RDEPENDS` assignment is that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6210 | ``bar`` and ``baz`` will be declared as dependencies inside the |
| 6211 | package ``foo`` when it is written out by one of the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6212 | :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6213 | Exactly how this is done depends on which package format is used, |
| 6214 | which is determined by |
| 6215 | :term:`PACKAGE_CLASSES`. When the |
| 6216 | corresponding package manager installs the package, it will know to |
| 6217 | also install the packages on which it depends. |
| 6218 | |
| 6219 | To ensure that the packages ``bar`` and ``baz`` get built, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6220 | previous :term:`RDEPENDS` assignment also causes a task dependency to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6221 | added. This dependency is from the recipe's |
| 6222 | :ref:`ref-tasks-build` (not to be confused with |
| 6223 | :ref:`ref-tasks-compile`) task to the |
| 6224 | ``do_package_write_*`` task of the recipes that build ``bar`` and |
| 6225 | ``baz``. |
| 6226 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6227 | The names of the packages you list within :term:`RDEPENDS` must be the |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 6228 | names of other packages --- they cannot be recipe names. Although |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6229 | package names and recipe names usually match, the important point |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6230 | here is that you are providing package names within the :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6231 | variable. For an example of the default list of packages created from |
| 6232 | a recipe, see the :term:`PACKAGES` variable. |
| 6233 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6234 | Because the :term:`RDEPENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6235 | you should always use the variable in a form with an attached package |
| 6236 | name (remember that a single recipe can build multiple packages). For |
| 6237 | example, suppose you are building a development package that depends |
| 6238 | on the ``perl`` package. In this case, you would use the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6239 | :term:`RDEPENDS` statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6240 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6241 | RDEPENDS:${PN}-dev += "perl" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6242 | |
| 6243 | In the example, |
| 6244 | the development package depends on the ``perl`` package. Thus, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6245 | :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6246 | the variable. |
| 6247 | |
| 6248 | .. note:: |
| 6249 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6250 | ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6251 | by default. This default is set in the BitBake configuration file |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6252 | (``meta/conf/bitbake.conf``). Be careful not to accidentally remove |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6253 | ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6254 | rather than the "=" operator. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6255 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6256 | The package names you use with :term:`RDEPENDS` must appear as they would |
| 6257 | in the :term:`PACKAGES` variable. The :term:`PKG` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6258 | allows a different name to be used for the final package (e.g. the |
| 6259 | :ref:`debian <ref-classes-debian>` class uses this to rename |
| 6260 | packages), but this final package name cannot be used with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6261 | :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6262 | independent of the package format used. |
| 6263 | |
| 6264 | BitBake, which the OpenEmbedded build system uses, supports |
| 6265 | specifying versioned dependencies. Although the syntax varies |
| 6266 | depending on the packaging format, BitBake hides these differences |
| 6267 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6268 | :term:`RDEPENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6269 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6270 | RDEPENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6271 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6272 | For ``operator``, you can specify the following: |
| 6273 | |
| 6274 | - = |
| 6275 | - < |
| 6276 | - > |
| 6277 | - <= |
| 6278 | - >= |
| 6279 | |
| 6280 | For version, provide the version number. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6281 | |
| 6282 | .. note:: |
| 6283 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6284 | You can use :term:`EXTENDPKGV` to provide a full package version |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6285 | specification. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6286 | |
| 6287 | For example, the following sets up a dependency on version 1.2 or |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6288 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6289 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6290 | RDEPENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6291 | |
| 6292 | For information on build-time dependencies, see the |
| 6293 | :term:`DEPENDS` variable. You can also see the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 6294 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and |
| 6295 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6296 | BitBake User Manual for additional information on tasks and |
| 6297 | dependencies. |
| 6298 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 6299 | :term:`RECIPE_NO_UPDATE_REASON` |
| 6300 | If a recipe should not be replaced by a more recent upstream version, |
| 6301 | putting the reason why in this variable in a recipe allows |
| 6302 | ``devtool check-upgrade-status`` command to display it, as explained |
| 6303 | in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" |
| 6304 | section. |
| 6305 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6306 | :term:`REQUIRED_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6307 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6308 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6309 | class, this variable identifies distribution features that must exist |
| 6310 | in the current configuration in order for the OpenEmbedded build |
| 6311 | system to build the recipe. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6312 | :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not |
| 6313 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6314 | the recipe will be skipped, and if the build system attempts to build |
| 6315 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6316 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6317 | :term:`REQUIRED_VERSION` |
| 6318 | If there are multiple versions of a recipe available, this variable |
| 6319 | determines which version should be given preference. |
| 6320 | :term:`REQUIRED_VERSION` works in exactly the same manner as |
| 6321 | :term:`PREFERRED_VERSION`, except that if the specified version is not |
| 6322 | available then an error message is shown and the build fails |
| 6323 | immediately. |
| 6324 | |
| 6325 | If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set |
| 6326 | for the same recipe, the :term:`REQUIRED_VERSION` value applies. |
| 6327 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6328 | :term:`RM_WORK_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6329 | With ``rm_work`` enabled, this variable specifies a list of recipes |
| 6330 | whose work directories should not be removed. See the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6331 | ":ref:`ref-classes-rm-work`" section for more |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6332 | details. |
| 6333 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6334 | :term:`ROOT_HOME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6335 | Defines the root home directory. By default, this directory is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6336 | follows in the BitBake configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6337 | |
| 6338 | ROOT_HOME ??= "/home/root" |
| 6339 | |
| 6340 | .. note:: |
| 6341 | |
| 6342 | This default value is likely used because some embedded solutions |
| 6343 | prefer to have a read-only root filesystem and prefer to keep |
| 6344 | writeable data in one place. |
| 6345 | |
| 6346 | You can override the default by setting the variable in any layer or |
| 6347 | in the ``local.conf`` file. Because the default is set using a "weak" |
| 6348 | assignment (i.e. "??="), you can use either of the following forms to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6349 | define your override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6350 | |
| 6351 | ROOT_HOME = "/root" |
| 6352 | ROOT_HOME ?= "/root" |
| 6353 | |
| 6354 | These |
| 6355 | override examples use ``/root``, which is probably the most commonly |
| 6356 | used override. |
| 6357 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6358 | :term:`ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6359 | Indicates a filesystem image to include as the root filesystem. |
| 6360 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6361 | The :term:`ROOTFS` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6362 | :ref:`image-live <ref-classes-image-live>` class. |
| 6363 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6364 | :term:`ROOTFS_POSTINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6365 | Specifies a list of functions to call after the OpenEmbedded build |
| 6366 | system has installed packages. You can specify functions separated by |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6367 | semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6368 | |
| 6369 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " |
| 6370 | |
| 6371 | If you need to pass the root filesystem path to a command within a |
| 6372 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6373 | directory that becomes the root filesystem image. See the |
| 6374 | :term:`IMAGE_ROOTFS` variable for more |
| 6375 | information. |
| 6376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6377 | :term:`ROOTFS_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6378 | Specifies a list of functions to call once the OpenEmbedded build |
| 6379 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6380 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6381 | |
| 6382 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " |
| 6383 | |
| 6384 | If you need to pass the root filesystem path to a command within a |
| 6385 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6386 | directory that becomes the root filesystem image. See the |
| 6387 | :term:`IMAGE_ROOTFS` variable for more |
| 6388 | information. |
| 6389 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6390 | :term:`ROOTFS_POSTUNINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6391 | Specifies a list of functions to call after the OpenEmbedded build |
| 6392 | system has removed unnecessary packages. When runtime package |
| 6393 | management is disabled in the image, several packages are removed |
| 6394 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6395 | You can specify functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6396 | |
| 6397 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " |
| 6398 | |
| 6399 | If you need to pass the root filesystem path to a command within a |
| 6400 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6401 | directory that becomes the root filesystem image. See the |
| 6402 | :term:`IMAGE_ROOTFS` variable for more |
| 6403 | information. |
| 6404 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6405 | :term:`ROOTFS_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6406 | Specifies a list of functions to call before the OpenEmbedded build |
| 6407 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6408 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6409 | |
| 6410 | ROOTFS_PREPROCESS_COMMAND += "function; ... " |
| 6411 | |
| 6412 | If you need to pass the root filesystem path to a command within a |
| 6413 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6414 | directory that becomes the root filesystem image. See the |
| 6415 | :term:`IMAGE_ROOTFS` variable for more |
| 6416 | information. |
| 6417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6418 | :term:`RPROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6419 | A list of package name aliases that a package also provides. These |
| 6420 | aliases are useful for satisfying runtime dependencies of other |
| 6421 | packages both during the build and on the target (as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6422 | :term:`RDEPENDS`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6423 | |
| 6424 | .. note:: |
| 6425 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6426 | A package's own name is implicitly already in its :term:`RPROVIDES` list. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6427 | |
| 6428 | As with all package-controlling variables, you must always use the |
| 6429 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6430 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6431 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6432 | RPROVIDES:${PN} = "widget-abi-2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6433 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6434 | :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6435 | A list of packages that extends the usability of a package being |
| 6436 | built. The package being built does not depend on this list of |
| 6437 | packages in order to successfully build, but rather uses them for |
| 6438 | extended usability. To specify runtime dependencies for packages, see |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6439 | the :term:`RDEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6440 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6441 | The package manager will automatically install the :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6442 | list of packages when installing the built package. However, you can |
| 6443 | prevent listed packages from being installed by using the |
| 6444 | :term:`BAD_RECOMMENDATIONS`, |
| 6445 | :term:`NO_RECOMMENDATIONS`, and |
| 6446 | :term:`PACKAGE_EXCLUDE` variables. |
| 6447 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6448 | Packages specified in :term:`RRECOMMENDS` need not actually be produced. |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6449 | However, there must be a recipe providing each package, either |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6450 | through the :term:`PACKAGES` or |
| 6451 | :term:`PACKAGES_DYNAMIC` variables or the |
| 6452 | :term:`RPROVIDES` variable, or an error will occur |
| 6453 | during the build. If such a recipe does exist and the package is not |
| 6454 | produced, the build continues without error. |
| 6455 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6456 | Because the :term:`RRECOMMENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6457 | you should always attach an override to the variable to specify the |
| 6458 | particular package whose usability is being extended. For example, |
| 6459 | suppose you are building a development package that is extended to |
| 6460 | support wireless functionality. In this case, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6461 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6462 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6463 | RRECOMMENDS:${PN}-dev += "wireless_package_name" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6464 | |
| 6465 | In the |
| 6466 | example, the package name (``${PN}-dev``) must appear as it would in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6467 | the :term:`PACKAGES` namespace before any renaming of the output package |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 6468 | by classes such as :ref:`ref-classes-debian`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6469 | |
| 6470 | BitBake, which the OpenEmbedded build system uses, supports |
| 6471 | specifying versioned recommends. Although the syntax varies depending |
| 6472 | on the packaging format, BitBake hides these differences from you. |
| 6473 | Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6474 | :term:`RRECOMMENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6475 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6476 | RRECOMMENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6477 | |
| 6478 | For ``operator``, you can specify the following: |
| 6479 | |
| 6480 | - = |
| 6481 | - < |
| 6482 | - > |
| 6483 | - <= |
| 6484 | - >= |
| 6485 | |
| 6486 | For example, the following sets up a recommend on version 1.2 or |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6487 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6488 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6489 | RRECOMMENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6490 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6491 | :term:`RREPLACES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6492 | A list of packages replaced by a package. The package manager uses |
| 6493 | this variable to determine which package should be installed to |
| 6494 | replace other package(s) during an upgrade. In order to also have the |
| 6495 | other package(s) removed at the same time, you must add the name of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6496 | the other package to the :term:`RCONFLICTS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6497 | |
| 6498 | As with all package-controlling variables, you must use this variable |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6499 | in conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6500 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6501 | RREPLACES:${PN} = "other_package_being_replaced" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6502 | |
| 6503 | BitBake, which the OpenEmbedded build system uses, supports |
| 6504 | specifying versioned replacements. Although the syntax varies |
| 6505 | depending on the packaging format, BitBake hides these differences |
| 6506 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6507 | :term:`RREPLACES` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6508 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6509 | RREPLACES:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6510 | |
| 6511 | For ``operator``, you can specify the following: |
| 6512 | |
| 6513 | - = |
| 6514 | - < |
| 6515 | - > |
| 6516 | - <= |
| 6517 | - >= |
| 6518 | |
| 6519 | For example, the following sets up a replacement using version 1.2 |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6520 | or greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6521 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6522 | RREPLACES:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6523 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6524 | :term:`RSUGGESTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6525 | A list of additional packages that you can suggest for installation |
| 6526 | by the package manager at the time a package is installed. Not all |
| 6527 | package managers support this functionality. |
| 6528 | |
| 6529 | As with all package-controlling variables, you must always use this |
| 6530 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6531 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6532 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 6533 | RSUGGESTS:${PN} = "useful_package another_package" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6534 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6535 | :term:`S` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6536 | The location in the :term:`Build Directory` where |
| 6537 | unpacked recipe source code resides. By default, this directory is |
| 6538 | ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, |
| 6539 | where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe |
| 6540 | version. If the source tarball extracts the code to a directory named |
| 6541 | anything other than ``${BPN}-${PV}``, or if the source code is |
| 6542 | fetched from an SCM such as Git or Subversion, then you must set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6543 | :term:`S` in the recipe so that the OpenEmbedded build system knows where |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6544 | to find the unpacked source. |
| 6545 | |
| 6546 | As an example, assume a :term:`Source Directory` |
| 6547 | top-level folder named ``poky`` and a default Build Directory at |
| 6548 | ``poky/build``. In this case, the work directory the build system |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6549 | uses to keep the unpacked recipe for ``db`` is the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6550 | |
| 6551 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 |
| 6552 | |
| 6553 | The unpacked source code resides in the ``db-5.1.19`` folder. |
| 6554 | |
| 6555 | This next example assumes a Git repository. By default, Git |
| 6556 | repositories are cloned to ``${WORKDIR}/git`` during |
| 6557 | :ref:`ref-tasks-fetch`. Since this path is different |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6558 | from the default value of :term:`S`, you must set it specifically so the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6559 | source can be located:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6560 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6561 | SRC_URI = "git://path/to/repo.git;branch=main" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6562 | S = "${WORKDIR}/git" |
| 6563 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6564 | :term:`SANITY_REQUIRED_UTILITIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6565 | Specifies a list of command-line utilities that should be checked for |
| 6566 | during the initial sanity checking process when running BitBake. If |
| 6567 | any of the utilities are not installed on the build host, then |
| 6568 | BitBake immediately exits with an error. |
| 6569 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6570 | :term:`SANITY_TESTED_DISTROS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6571 | A list of the host distribution identifiers that the build system has |
| 6572 | been tested against. Identifiers consist of the host distributor ID |
| 6573 | followed by the release, as reported by the ``lsb_release`` tool or |
| 6574 | as read from ``/etc/lsb-release``. Separate the list items with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6575 | explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6576 | not empty and the current value of |
| 6577 | :term:`NATIVELSBSTRING` does not appear in the |
| 6578 | list, then the build system reports a warning that indicates the |
| 6579 | current host distribution has not been tested as a build host. |
| 6580 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6581 | :term:`SDK_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6582 | The target architecture for the SDK. Typically, you do not directly |
| 6583 | set this variable. Instead, use :term:`SDKMACHINE`. |
| 6584 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6585 | :term:`SDK_CUSTOM_TEMPLATECONF` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6586 | When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6587 | "1" and a ``conf/templateconf.conf`` file exists in the build directory |
| 6588 | (:term:`TOPDIR`) then this will be copied into the SDK. |
| 6589 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6590 | :term:`SDK_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6591 | The directory set up and used by the |
| 6592 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which |
| 6593 | the SDK is deployed. The ``populate_sdk_base`` class defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6594 | :term:`SDK_DEPLOY` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6595 | |
| 6596 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
| 6597 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6598 | :term:`SDK_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6599 | The parent directory used by the OpenEmbedded build system when |
| 6600 | creating SDK output. The |
| 6601 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6602 | the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6603 | |
| 6604 | SDK_DIR = "${WORKDIR}/sdk" |
| 6605 | |
| 6606 | .. note:: |
| 6607 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6608 | The :term:`SDK_DIR` directory is a temporary directory as it is part of |
| 6609 | :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6610 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6611 | :term:`SDK_EXT_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6612 | Controls whether or not shared state artifacts are copied into the |
| 6613 | extensible SDK. The default value of "full" copies all of the |
| 6614 | required shared state artifacts into the extensible SDK. The value |
| 6615 | "minimal" leaves these artifacts out of the SDK. |
| 6616 | |
| 6617 | .. note:: |
| 6618 | |
| 6619 | If you set the variable to "minimal", you need to ensure |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6620 | :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the |
| 6621 | artifacts to be fetched as needed. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6622 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6623 | :term:`SDK_HOST_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6624 | The manifest file for the host part of the SDK. This file lists all |
| 6625 | the installed packages that make up the host part of the SDK. The |
| 6626 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6627 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6628 | |
| 6629 | packagename packagearch version |
| 6630 | |
| 6631 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6632 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6633 | |
| 6634 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
| 6635 | |
| 6636 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6637 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6638 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6639 | :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6640 | When set to "1", specifies to include the packagedata for all recipes |
| 6641 | in the "world" target in the extensible SDK. Including this data |
| 6642 | allows the ``devtool search`` command to find these recipes in search |
| 6643 | results, as well as allows the ``devtool add`` command to map |
| 6644 | dependencies more effectively. |
| 6645 | |
| 6646 | .. note:: |
| 6647 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6648 | Enabling the :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6649 | variable significantly increases build time because all of world |
| 6650 | needs to be built. Enabling the variable also slightly increases |
| 6651 | the size of the extensible SDK. |
| 6652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6653 | :term:`SDK_INCLUDE_TOOLCHAIN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6654 | When set to "1", specifies to include the toolchain in the extensible |
| 6655 | SDK. Including the toolchain is useful particularly when |
| 6656 | :term:`SDK_EXT_TYPE` is set to "minimal" to keep |
| 6657 | the SDK reasonably small but you still want to provide a usable |
| 6658 | toolchain. For example, suppose you want to use the toolchain from an |
| 6659 | IDE or from other tools and you do not want to perform additional |
| 6660 | steps to install the toolchain. |
| 6661 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6662 | The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if |
| 6663 | :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if |
| 6664 | :term:`SDK_EXT_TYPE` is set to "full". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6665 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6666 | :term:`SDK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6667 | The base name for SDK output files. The name is derived from the |
| 6668 | :term:`DISTRO`, :term:`TCLIBC`, |
| 6669 | :term:`SDK_ARCH`, |
| 6670 | :term:`IMAGE_BASENAME`, and |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6671 | :term:`TUNE_PKGARCH` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6672 | |
| 6673 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" |
| 6674 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6675 | :term:`SDK_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6676 | Specifies the operating system for which the SDK will be built. The |
| 6677 | default value is the value of :term:`BUILD_OS`. |
| 6678 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6679 | :term:`SDK_OUTPUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6680 | The location used by the OpenEmbedded build system when creating SDK |
| 6681 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6682 | class defines the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6683 | |
| 6684 | SDK_DIR = "${WORKDIR}/sdk" |
| 6685 | SDK_OUTPUT = "${SDK_DIR}/image" |
| 6686 | SDK_DEPLOY = "${DEPLOY_DIR}/sdk" |
| 6687 | |
| 6688 | .. note:: |
| 6689 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6690 | The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6691 | :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is |
| 6692 | :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6693 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6694 | :term:`SDK_PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6695 | Specifies a list of architectures compatible with the SDK machine. |
| 6696 | This variable is set automatically and should not normally be |
| 6697 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6698 | of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6699 | noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". |
| 6700 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6701 | :term:`SDK_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6702 | Specifies a list of functions to call once the OpenEmbedded build |
| 6703 | system creates the SDK. You can specify functions separated by |
| 6704 | semicolons: SDK_POSTPROCESS_COMMAND += "function; ... " |
| 6705 | |
| 6706 | If you need to pass an SDK path to a command within a function, you |
| 6707 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6708 | the OpenEmbedded build system when creating SDK output. See the |
| 6709 | :term:`SDK_DIR` variable for more information. |
| 6710 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6711 | :term:`SDK_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6712 | The toolchain binary prefix used for ``nativesdk`` recipes. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6713 | OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6714 | :term:`TARGET_PREFIX` when building |
| 6715 | ``nativesdk`` recipes. The default value is "${SDK_SYS}-". |
| 6716 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6717 | :term:`SDK_RECRDEP_TASKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6718 | A list of shared state tasks added to the extensible SDK. By default, |
| 6719 | the following tasks are added: |
| 6720 | |
| 6721 | - do_populate_lic |
| 6722 | - do_package_qa |
| 6723 | - do_populate_sysroot |
| 6724 | - do_deploy |
| 6725 | |
| 6726 | Despite the default value of "" for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6727 | :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6728 | to the SDK. To specify tasks beyond these four, you need to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6729 | :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6730 | tasks that are needed in order to build |
| 6731 | :term:`SDK_TARGETS`). |
| 6732 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6733 | :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6734 | Specifies the system, including the architecture and the operating |
| 6735 | system, for which the SDK will be built. |
| 6736 | |
| 6737 | The OpenEmbedded build system automatically sets this variable based |
| 6738 | on :term:`SDK_ARCH`, |
| 6739 | :term:`SDK_VENDOR`, and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6740 | :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6741 | variable yourself. |
| 6742 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6743 | :term:`SDK_TARGET_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6744 | The manifest file for the target part of the SDK. This file lists all |
| 6745 | the installed packages that make up the target part of the SDK. The |
| 6746 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6747 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6748 | |
| 6749 | packagename packagearch version |
| 6750 | |
| 6751 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6752 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6753 | |
| 6754 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
| 6755 | |
| 6756 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6757 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6758 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6759 | :term:`SDK_TARGETS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6760 | A list of targets to install from shared state as part of the |
| 6761 | standard or extensible SDK installation. The default value is "${PN}" |
| 6762 | (i.e. the image from which the SDK is built). |
| 6763 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6764 | The :term:`SDK_TARGETS` variable is an internal variable and typically |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6765 | would not be changed. |
| 6766 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6767 | :term:`SDK_TITLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6768 | The title to be printed when running the SDK installer. By default, |
| 6769 | this title is based on the :term:`DISTRO_NAME` or |
| 6770 | :term:`DISTRO` variable and is set in the |
| 6771 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6772 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6773 | |
| 6774 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
| 6775 | |
| 6776 | For the default distribution "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6777 | :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6778 | |
| 6779 | For information on how to change this default title, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6780 | ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6781 | section in the Yocto Project Application Development and the |
| 6782 | Extensible Software Development Kit (eSDK) manual. |
| 6783 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6784 | :term:`SDK_UPDATE_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6785 | An optional URL for an update server for the extensible SDK. If set, |
| 6786 | the value is used as the default update server when running |
| 6787 | ``devtool sdk-update`` within the extensible SDK. |
| 6788 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6789 | :term:`SDK_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6790 | Specifies the name of the SDK vendor. |
| 6791 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6792 | :term:`SDK_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6793 | Specifies the version of the SDK. The Poky distribution configuration file |
| 6794 | (``/meta-poky/conf/distro/poky.conf``) sets the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6795 | :term:`SDK_VERSION` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6796 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6797 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6798 | |
| 6799 | For additional information, see the |
| 6800 | :term:`DISTRO_VERSION` and |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6801 | :term:`METADATA_REVISION` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6802 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6803 | :term:`SDKEXTPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6804 | The default installation directory for the Extensible SDK. By |
| 6805 | default, this directory is based on the :term:`DISTRO` |
| 6806 | variable and is set in the |
| 6807 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6808 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6809 | |
| 6810 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
| 6811 | |
| 6812 | For the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6813 | default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6814 | |
| 6815 | For information on how to change this default directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6816 | ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6817 | section in the Yocto Project Application Development and the |
| 6818 | Extensible Software Development Kit (eSDK) manual. |
| 6819 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6820 | :term:`SDKIMAGE_FEATURES` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6821 | Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6822 | the SDK generated from an image using the following command:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6823 | |
| 6824 | $ bitbake -c populate_sdk imagename |
| 6825 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6826 | :term:`SDKMACHINE` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6827 | The machine for which the SDK is built. In other words, the SDK is built |
| 6828 | such that it runs on the target you specify with the :term:`SDKMACHINE` |
| 6829 | value. The value points to a corresponding ``.conf`` file under |
| 6830 | ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``, |
| 6831 | ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are |
| 6832 | :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6833 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6834 | The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the |
| 6835 | architecture of the build machine. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6836 | |
| 6837 | .. note:: |
| 6838 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6839 | You cannot set the :term:`SDKMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6840 | variable in your distribution configuration file. If you do, the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6841 | configuration will not take effect. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6842 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6843 | :term:`SDKPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6844 | Defines the path offered to the user for installation of the SDK that |
| 6845 | is generated by the OpenEmbedded build system. The path appears as |
| 6846 | the default location for installing the SDK when you run the SDK's |
| 6847 | installation script. You can override the offered path when you run |
| 6848 | the script. |
| 6849 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6850 | :term:`SDKTARGETSYSROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6851 | The full path to the sysroot used for cross-compilation within an SDK |
| 6852 | as it will be when installed into the default |
| 6853 | :term:`SDKPATH`. |
| 6854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6855 | :term:`SECTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6856 | The section in which packages should be categorized. Package |
| 6857 | management utilities can make use of this variable. |
| 6858 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6859 | :term:`SELECTED_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6860 | Specifies the optimization flags passed to the C compiler when |
| 6861 | building for the target. The flags are passed through the default |
| 6862 | value of the :term:`TARGET_CFLAGS` variable. |
| 6863 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6864 | The :term:`SELECTED_OPTIMIZATION` variable takes the value of |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6865 | :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which |
| 6866 | case the value of :term:`DEBUG_OPTIMIZATION` is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6867 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6868 | :term:`SERIAL_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6869 | Defines a serial console (TTY) to enable using |
| 6870 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 6871 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6872 | separated by a space. You cannot specify more than one TTY device:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6873 | |
| 6874 | SERIAL_CONSOLE = "115200 ttyS0" |
| 6875 | |
| 6876 | .. note:: |
| 6877 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6878 | The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6879 | :term:`SERIAL_CONSOLES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6880 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6881 | :term:`SERIAL_CONSOLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6882 | Defines a serial console (TTY) to enable using |
| 6883 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 6884 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6885 | separated by a semicolon. Use spaces to separate multiple devices:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6886 | |
| 6887 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" |
| 6888 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6889 | :term:`SERIAL_CONSOLES_CHECK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6890 | Specifies serial consoles, which must be listed in |
| 6891 | :term:`SERIAL_CONSOLES`, to check against |
| 6892 | ``/proc/console`` before enabling them using getty. This variable |
| 6893 | allows aliasing in the format: <device>:<alias>. If a device was |
| 6894 | listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6895 | ``/proc/console``, you would do the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6896 | |
| 6897 | SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0" |
| 6898 | |
| 6899 | This variable is currently only supported with SysVinit (i.e. not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6900 | with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires |
| 6901 | ``/etc/inittab`` to be writable when used with SysVinit. This makes it |
| 6902 | incompatible with customizations such as the following:: |
| 6903 | |
| 6904 | EXTRA_IMAGE_FEATURES += "read-only-rootfs" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6905 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6906 | :term:`SETUPTOOLS_BUILD_ARGS` |
| 6907 | When used by recipes that inherit the |
| 6908 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can |
| 6909 | be used to specify additional arguments to be passed to ``setup.py build`` |
| 6910 | in the ``setuptools3_do_compile()`` task. |
| 6911 | |
| 6912 | :term:`SETUPTOOLS_INSTALL_ARGS` |
| 6913 | When used by recipes that inherit the |
| 6914 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can |
| 6915 | be used to specify additional arguments to be passed to ``setup.py install`` |
| 6916 | in the ``setuptools3_do_install()`` task. |
| 6917 | |
| 6918 | :term:`SETUPTOOLS_SETUP_PATH` |
| 6919 | When used by recipes that inherit the |
| 6920 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should |
| 6921 | be used to specify the directory in which the ``setup.py`` file is |
| 6922 | located if it is not at the root of the source tree (as specified by |
| 6923 | :term:`S`). For example, in a recipe where the sources are fetched from |
| 6924 | a Git repository and ``setup.py`` is in a ``python/pythonmodule`` |
| 6925 | subdirectory, you would have this:: |
| 6926 | |
| 6927 | S = "${WORKDIR}/git" |
| 6928 | SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule" |
| 6929 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6930 | :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6931 | A list of recipe dependencies that should not be used to determine |
| 6932 | signatures of tasks from one recipe when they depend on tasks from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6933 | another recipe. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6934 | |
| 6935 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" |
| 6936 | |
| 6937 | In the previous example, ``intone`` depends on ``mplayer2``. |
| 6938 | |
| 6939 | You can use the special token ``"*"`` on the left-hand side of the |
| 6940 | dependency to match all recipes except the one on the right-hand |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6941 | side. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6942 | |
| 6943 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" |
| 6944 | |
| 6945 | In the previous example, all recipes except ``quilt-native`` ignore |
| 6946 | task signatures from the ``quilt-native`` recipe when determining |
| 6947 | their task signatures. |
| 6948 | |
| 6949 | Use of this variable is one mechanism to remove dependencies that |
| 6950 | affect task signatures and thus force rebuilds when a recipe changes. |
| 6951 | |
| 6952 | .. note:: |
| 6953 | |
| 6954 | If you add an inappropriate dependency for a recipe relationship, |
| 6955 | the software might break during runtime if the interface of the |
| 6956 | second recipe was changed after the first recipe had been built. |
| 6957 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6958 | :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6959 | A list of recipes that are completely stable and will never change. |
| 6960 | The ABI for the recipes in the list are presented by output from the |
| 6961 | tasks run to build the recipe. Use of this variable is one way to |
| 6962 | remove dependencies from one recipe on another that affect task |
| 6963 | signatures and thus force rebuilds when the recipe changes. |
| 6964 | |
| 6965 | .. note:: |
| 6966 | |
| 6967 | If you add an inappropriate variable to this list, the software |
| 6968 | might break at runtime if the interface of the recipe was changed |
| 6969 | after the other had been built. |
| 6970 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6971 | :term:`SITEINFO_BITS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6972 | Specifies the number of bits for the target system CPU. The value |
| 6973 | should be either "32" or "64". |
| 6974 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6975 | :term:`SITEINFO_ENDIANNESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6976 | Specifies the endian byte order of the target system. The value |
| 6977 | should be either "le" for little-endian or "be" for big-endian. |
| 6978 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6979 | :term:`SKIP_FILEDEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6980 | Enables removal of all files from the "Provides" section of an RPM |
| 6981 | package. Removal of these files is required for packages containing |
| 6982 | prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. |
| 6983 | |
| 6984 | To enable file removal, set the variable to "1" in your |
| 6985 | ``conf/local.conf`` configuration file in your: |
| 6986 | :term:`Build Directory`. |
| 6987 | :: |
| 6988 | |
| 6989 | SKIP_FILEDEPS = "1" |
| 6990 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6991 | :term:`SKIP_RECIPE` |
| 6992 | Used to prevent the OpenEmbedded build system from building a given |
| 6993 | recipe. Specify the :term:`PN` value as a variable flag (``varflag``) |
| 6994 | and provide a reason, which will be reported when attempting to |
| 6995 | build the recipe. |
| 6996 | |
| 6997 | To prevent a recipe from being built, use the :term:`SKIP_RECIPE` |
| 6998 | variable in your ``local.conf`` file or distribution configuration. |
| 6999 | Here is an example which prevents ``myrecipe`` from being built:: |
| 7000 | |
| 7001 | SKIP_RECIPE[myrecipe] = "Not supported by our organization." |
| 7002 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7003 | :term:`SOC_FAMILY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7004 | Groups together machines based upon the same family of SOC (System On |
| 7005 | Chip). You typically set this variable in a common ``.inc`` file that |
| 7006 | you include in the configuration files of all the machines. |
| 7007 | |
| 7008 | .. note:: |
| 7009 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7010 | You must include ``conf/machine/include/soc-family.inc`` for this |
| 7011 | variable to appear in :term:`MACHINEOVERRIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7012 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7013 | :term:`SOLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7014 | Defines the suffix for shared libraries used on the target platform. |
| 7015 | By default, this suffix is ".so.*" for all Linux-based systems and is |
| 7016 | defined in the ``meta/conf/bitbake.conf`` configuration file. |
| 7017 | |
| 7018 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7019 | ``FILES:${PN}``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7020 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7021 | :term:`SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7022 | Defines the suffix for the development symbolic link (symlink) for |
| 7023 | shared libraries on the target platform. By default, this suffix is |
| 7024 | ".so" for Linux-based systems and is defined in the |
| 7025 | ``meta/conf/bitbake.conf`` configuration file. |
| 7026 | |
| 7027 | You will see this variable referenced in the default values of |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7028 | ``FILES:${PN}-dev``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7029 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 7030 | :term:`SOURCE_DATE_EPOCH` |
| 7031 | This defines a date expressed in number of seconds since |
| 7032 | the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by |
| 7033 | multiple build systems to force a timestamp in built binaries. |
| 7034 | Many upstream projects already support this variable. |
| 7035 | |
| 7036 | You will find more details in the `official specifications |
| 7037 | <https://reproducible-builds.org/specs/source-date-epoch/>`__. |
| 7038 | |
| 7039 | A value for each recipe is computed from the sources by |
| 7040 | :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`. |
| 7041 | |
| 7042 | If a recipe wishes to override the default behavior, it should set its |
| 7043 | own :term:`SOURCE_DATE_EPOCH` value:: |
| 7044 | |
| 7045 | SOURCE_DATE_EPOCH = "1613559011" |
| 7046 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7047 | :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7048 | When you are fetching files to create a mirror of sources (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7049 | creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7050 | your ``local.conf`` configuration file ensures the source for all |
| 7051 | recipes are fetched regardless of whether or not a recipe is |
| 7052 | compatible with the configuration. A recipe is considered |
| 7053 | incompatible with the currently configured machine when either or |
| 7054 | both the :term:`COMPATIBLE_MACHINE` |
| 7055 | variable and :term:`COMPATIBLE_HOST` variables |
| 7056 | specify compatibility with a machine other than that of the current |
| 7057 | machine or host. |
| 7058 | |
| 7059 | .. note:: |
| 7060 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7061 | Do not set the :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7062 | variable unless you are creating a source mirror. In other words, |
| 7063 | do not set the variable during a normal build. |
| 7064 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7065 | :term:`SOURCE_MIRROR_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7066 | Defines your own :term:`PREMIRRORS` from which to |
| 7067 | first fetch source before attempting to fetch from the upstream |
| 7068 | specified in :term:`SRC_URI`. |
| 7069 | |
| 7070 | To use this variable, you must globally inherit the |
| 7071 | :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7072 | the URL to your mirrors. Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7073 | |
| 7074 | INHERIT += "own-mirrors" |
| 7075 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" |
| 7076 | |
| 7077 | .. note:: |
| 7078 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7079 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7080 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7081 | :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7082 | Maps commonly used license names to their SPDX counterparts found in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7083 | ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7084 | mappings, see the ``meta/conf/licenses.conf`` file. |
| 7085 | |
| 7086 | For additional information, see the :term:`LICENSE` |
| 7087 | variable. |
| 7088 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7089 | :term:`SPECIAL_PKGSUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7090 | A list of prefixes for :term:`PN` used by the OpenEmbedded |
| 7091 | build system to create variants of recipes or packages. The list |
| 7092 | specifies the prefixes to strip off during certain circumstances such |
| 7093 | as the generation of the :term:`BPN` variable. |
| 7094 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7095 | :term:`SPL_BINARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7096 | The file type for the Secondary Program Loader (SPL). Some devices |
| 7097 | use an SPL from which to boot (e.g. the BeagleBone development |
| 7098 | board). For such cases, you can declare the file type of the SPL |
| 7099 | binary in the ``u-boot.inc`` include file, which is used in the |
| 7100 | U-Boot recipe. |
| 7101 | |
| 7102 | The SPL file type is set to "null" by default in the ``u-boot.inc`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7103 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7104 | |
| 7105 | # Some versions of u-boot build an SPL (Second Program Loader) image that |
| 7106 | # should be packaged along with the u-boot binary as well as placed in the |
| 7107 | # deploy directory. For those versions they can set the following variables |
| 7108 | # to allow packaging the SPL. |
| 7109 | SPL_BINARY ?= "" |
| 7110 | SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" |
| 7111 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" |
| 7112 | SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" |
| 7113 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7114 | The :term:`SPL_BINARY` variable helps form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7115 | various ``SPL_*`` variables used by the OpenEmbedded build system. |
| 7116 | |
| 7117 | See the BeagleBone machine configuration example in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7118 | ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7119 | section in the Yocto Project Board Support Package Developer's Guide |
| 7120 | for additional information. |
| 7121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7122 | :term:`SRC_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7123 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7124 | See the BitBake manual for the initial description for this variable: |
| 7125 | :term:`bitbake:SRC_URI`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7126 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7127 | The following features are added by OpenEmbedded and the Yocto Project. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7128 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7129 | There are standard and recipe-specific options. Here are standard ones: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7130 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7131 | - ``apply`` --- whether to apply the patch or not. The default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7132 | action is to apply the patch. |
| 7133 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7134 | - ``striplevel`` --- which striplevel to use when applying the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7135 | patch. The default level is 1. |
| 7136 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7137 | - ``patchdir`` --- specifies the directory in which the patch should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7138 | be applied. The default is ``${``\ :term:`S`\ ``}``. |
| 7139 | |
| 7140 | Here are options specific to recipes building code from a revision |
| 7141 | control system: |
| 7142 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7143 | - ``mindate`` --- apply the patch only if |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7144 | :term:`SRCDATE` is equal to or greater than |
| 7145 | ``mindate``. |
| 7146 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7147 | - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7148 | than ``maxdate``. |
| 7149 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7150 | - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7151 | greater than ``minrev``. |
| 7152 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7153 | - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7154 | than ``maxrev``. |
| 7155 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7156 | - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7157 | ``rev``. |
| 7158 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7159 | - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7160 | ``rev``. |
| 7161 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7162 | .. note:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7163 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7164 | If you want the build system to pick up files specified through |
| 7165 | a :term:`SRC_URI` statement from your append file, you need to be |
| 7166 | sure to extend the :term:`FILESPATH` variable by also using the |
| 7167 | :term:`FILESEXTRAPATHS` variable from within your append file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7168 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7169 | :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7170 | By default, the OpenEmbedded build system automatically detects |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7171 | whether :term:`SRC_URI` contains files that are machine-specific. If so, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7172 | the build system automatically changes :term:`PACKAGE_ARCH`. Setting this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7173 | variable to "0" disables this behavior. |
| 7174 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7175 | :term:`SRCDATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7176 | The date of the source code used to build the package. This variable |
| 7177 | applies only if the source was fetched from a Source Code Manager |
| 7178 | (SCM). |
| 7179 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7180 | :term:`SRCPV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7181 | Returns the version string of the current package. This string is |
| 7182 | used to help define the value of :term:`PV`. |
| 7183 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7184 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7185 | configuration file in the :term:`Source Directory` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7186 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7187 | |
| 7188 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
| 7189 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7190 | Recipes that need to define :term:`PV` do so with the help of the |
| 7191 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7192 | located in ``meta/recipes-connectivity`` in the Source Directory |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7193 | defines :term:`PV` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7194 | |
| 7195 | PV = "0.12-git${SRCPV}" |
| 7196 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7197 | :term:`SRCREV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7198 | The revision of the source code used to build the package. This |
| 7199 | variable applies to Subversion, Git, Mercurial, and Bazaar only. Note |
| 7200 | that if you want to build a fixed revision and you want to avoid |
| 7201 | performing a query on the remote repository every time BitBake parses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7202 | your recipe, you should specify a :term:`SRCREV` that is a full revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7203 | identifier and not just a tag. |
| 7204 | |
| 7205 | .. note:: |
| 7206 | |
| 7207 | For information on limitations when inheriting the latest revision |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7208 | of software using :term:`SRCREV`, see the :term:`AUTOREV` variable |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7209 | description and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7210 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7211 | section, which is in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7212 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7213 | :term:`SRCTREECOVEREDTASKS` |
| 7214 | A list of tasks that are typically not relevant (and therefore skipped) |
| 7215 | when building using the :ref:`externalsrc <ref-classes-externalsrc>` |
| 7216 | class. The default value as set in that class file is the set of tasks |
| 7217 | that are rarely needed when using external source:: |
| 7218 | |
| 7219 | SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" |
| 7220 | |
| 7221 | The notable exception is when processing external kernel source as |
| 7222 | defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 7223 | class file (formatted for aesthetics):: |
| 7224 | |
| 7225 | SRCTREECOVEREDTASKS += "\ |
| 7226 | do_validate_branches \ |
| 7227 | do_kernel_configcheck \ |
| 7228 | do_kernel_checkout \ |
| 7229 | do_fetch \ |
| 7230 | do_unpack \ |
| 7231 | do_patch \ |
| 7232 | " |
| 7233 | |
| 7234 | See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` |
| 7235 | variables for more information. |
| 7236 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7237 | :term:`SSTATE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7238 | The directory for the shared state cache. |
| 7239 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7240 | :term:`SSTATE_EXCLUDEDEPS_SYSROOT` |
| 7241 | This variable allows to specify indirect dependencies to exclude |
| 7242 | from sysroots, for example to avoid the situations when a dependency on |
| 7243 | any ``-native`` recipe will pull in all dependencies of that recipe |
| 7244 | in the recipe sysroot. This behaviour might not always be wanted, |
| 7245 | for example when that ``-native`` recipe depends on build tools |
| 7246 | that are not relevant for the current recipe. |
| 7247 | |
| 7248 | This way, irrelevant dependencies are ignored, which could have |
| 7249 | prevented the reuse of prebuilt artifacts stored in the Shared |
| 7250 | State Cache. |
| 7251 | |
| 7252 | ``SSTATE_EXCLUDEDEPS_SYSROOT`` is evaluated as two regular |
| 7253 | expressions of recipe and dependency to ignore. An example |
| 7254 | is the rule in :oe_git:`meta/conf/layer.conf </meta/conf/layer.conf>`:: |
| 7255 | |
| 7256 | # Nothing needs to depend on libc-initial |
| 7257 | # base-passwd/shadow-sysroot don't need their dependencies |
| 7258 | SSTATE_EXCLUDEDEPS_SYSROOT += "\ |
| 7259 | .*->.*-initial.* \ |
| 7260 | .*(base-passwd|shadow-sysroot)->.* \ |
| 7261 | " |
| 7262 | |
| 7263 | The ``->`` substring represents the dependency between |
| 7264 | the two regular expressions. |
| 7265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7266 | :term:`SSTATE_MIRROR_ALLOW_NETWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7267 | If set to "1", allows fetches from mirrors that are specified in |
| 7268 | :term:`SSTATE_MIRRORS` to work even when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7269 | fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to |
| 7270 | "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if |
| 7271 | you have set :term:`SSTATE_MIRRORS` to point to an internal server for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7272 | your shared state cache, but you want to disable any other fetching |
| 7273 | from the network. |
| 7274 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7275 | :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7276 | Configures the OpenEmbedded build system to search other mirror |
| 7277 | locations for prebuilt cache data objects before building out the |
| 7278 | data. This variable works like fetcher :term:`MIRRORS` |
| 7279 | and :term:`PREMIRRORS` and points to the cache |
| 7280 | locations to check for the shared state (sstate) objects. |
| 7281 | |
| 7282 | You can specify a filesystem directory or a remote URL such as HTTP |
| 7283 | or FTP. The locations you specify need to contain the shared state |
| 7284 | cache (sstate-cache) results from previous builds. The sstate-cache |
| 7285 | you point to can also be from builds on other machines. |
| 7286 | |
| 7287 | When pointing to sstate build artifacts on another machine that uses |
| 7288 | a different GCC version for native builds, you must configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7289 | :term:`SSTATE_MIRRORS` with a regular expression that maps local search |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7290 | paths to server paths. The paths need to take into account |
| 7291 | :term:`NATIVELSBSTRING` set by the |
| 7292 | :ref:`uninative <ref-classes-uninative>` class. For example, the |
| 7293 | following maps the local search path ``universal-4.9`` to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7294 | server-provided path server_url_sstate_path:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7295 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7296 | SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7297 | |
| 7298 | If a mirror uses the same structure as |
| 7299 | :term:`SSTATE_DIR`, you need to add "PATH" at the |
| 7300 | end as shown in the examples below. The build system substitutes the |
| 7301 | correct path within the directory structure. |
| 7302 | :: |
| 7303 | |
| 7304 | SSTATE_MIRRORS ?= "\ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7305 | file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7306 | file://.* file:///some-local-dir/sstate/PATH" |
| 7307 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7308 | :term:`SSTATE_SCAN_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7309 | Controls the list of files the OpenEmbedded build system scans for |
| 7310 | hardcoded installation paths. The variable uses a space-separated |
| 7311 | list of filenames (not paths) with standard wildcard characters |
| 7312 | allowed. |
| 7313 | |
| 7314 | During a build, the OpenEmbedded build system creates a shared state |
| 7315 | (sstate) object during the first stage of preparing the sysroots. |
| 7316 | That object is scanned for hardcoded paths for original installation |
| 7317 | locations. The list of files that are scanned for paths is controlled |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7318 | by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files |
| 7319 | they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7320 | than the variable being comprehensively set. The |
| 7321 | :ref:`sstate <ref-classes-sstate>` class specifies the default list |
| 7322 | of files. |
| 7323 | |
| 7324 | For details on the process, see the |
| 7325 | :ref:`staging <ref-classes-staging>` class. |
| 7326 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7327 | :term:`STAGING_BASE_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7328 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7329 | directory for the build host. |
| 7330 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7331 | :term:`STAGING_BASELIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7332 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7333 | directory for the target for which the current recipe is being built |
| 7334 | (:term:`STAGING_DIR_HOST`). |
| 7335 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7336 | :term:`STAGING_BINDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7337 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7338 | directory for the target for which the current recipe is being built |
| 7339 | (:term:`STAGING_DIR_HOST`). |
| 7340 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7341 | :term:`STAGING_BINDIR_CROSS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7342 | Specifies the path to the directory containing binary configuration |
| 7343 | scripts. These scripts provide configuration information for other |
| 7344 | software that wants to make use of libraries or include files |
| 7345 | provided by the software associated with the script. |
| 7346 | |
| 7347 | .. note:: |
| 7348 | |
| 7349 | This style of build configuration has been largely replaced by |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7350 | ``pkg-config``. Consequently, if ``pkg-config`` is supported by the |
| 7351 | library to which you are linking, it is recommended you use |
| 7352 | ``pkg-config`` instead of a provided configuration script. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7353 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7354 | :term:`STAGING_BINDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7355 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7356 | directory for the build host. |
| 7357 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7358 | :term:`STAGING_DATADIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7359 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7360 | directory for the target for which the current recipe is being built |
| 7361 | (:term:`STAGING_DIR_HOST`). |
| 7362 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7363 | :term:`STAGING_DATADIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7364 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7365 | directory for the build host. |
| 7366 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7367 | :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7368 | Helps construct the ``recipe-sysroots`` directory, which is used |
| 7369 | during packaging. |
| 7370 | |
| 7371 | For information on how staging for recipe-specific sysroots occurs, |
| 7372 | see the :ref:`ref-tasks-populate_sysroot` |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7373 | task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7374 | section in the Yocto Project Development Tasks Manual, the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7375 | ":ref:`overview-manual/concepts:configuration, compilation, and staging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7376 | section in the Yocto Project Overview and Concepts Manual, and the |
| 7377 | :term:`SYSROOT_DIRS` variable. |
| 7378 | |
| 7379 | .. note:: |
| 7380 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7381 | Recipes should never write files directly under the :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7382 | directory because the OpenEmbedded build system manages the |
| 7383 | directory automatically. Instead, files should be installed to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7384 | ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7385 | task and then the OpenEmbedded build system will stage a subset of |
| 7386 | those files into the sysroot. |
| 7387 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7388 | :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7389 | Specifies the path to the sysroot directory for the system on which |
| 7390 | the component is built to run (the system that hosts the component). |
| 7391 | For most recipes, this sysroot is the one in which that recipe's |
| 7392 | :ref:`ref-tasks-populate_sysroot` task copies |
| 7393 | files. Exceptions include ``-native`` recipes, where the |
| 7394 | ``do_populate_sysroot`` task instead uses |
| 7395 | :term:`STAGING_DIR_NATIVE`. Depending on |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7396 | the type of recipe and the build target, :term:`STAGING_DIR_HOST` can |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7397 | have the following values: |
| 7398 | |
| 7399 | - For recipes building for the target machine, the value is |
| 7400 | "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". |
| 7401 | |
| 7402 | - For native recipes building for the build host, the value is empty |
| 7403 | given the assumption that when building for the build host, the |
| 7404 | build host's own directories should be used. |
| 7405 | |
| 7406 | .. note:: |
| 7407 | |
| 7408 | ``-native`` recipes are not installed into host paths like such |
| 7409 | as ``/usr``. Rather, these recipes are installed into |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7410 | :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7411 | standard build environment variables such as |
| 7412 | :term:`CPPFLAGS` and |
| 7413 | :term:`CFLAGS` are set up so that both host paths |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7414 | and :term:`STAGING_DIR_NATIVE` are searched for libraries and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7415 | headers using, for example, GCC's ``-isystem`` option. |
| 7416 | |
| 7417 | Thus, the emphasis is that the ``STAGING_DIR*`` variables |
| 7418 | should be viewed as input variables by tasks such as |
| 7419 | :ref:`ref-tasks-configure`, |
| 7420 | :ref:`ref-tasks-compile`, and |
| 7421 | :ref:`ref-tasks-install`. Having the real system |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7422 | root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7423 | for ``-native`` recipes, as they make use of host headers and |
| 7424 | libraries. |
| 7425 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7426 | :term:`STAGING_DIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7427 | Specifies the path to the sysroot directory used when building |
| 7428 | components that run on the build host itself. |
| 7429 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7430 | :term:`STAGING_DIR_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7431 | Specifies the path to the sysroot used for the system for which the |
| 7432 | component generates code. For components that do not generate code, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7433 | which is the majority, :term:`STAGING_DIR_TARGET` is set to match |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7434 | :term:`STAGING_DIR_HOST`. |
| 7435 | |
| 7436 | Some recipes build binaries that can run on the target system but |
| 7437 | those binaries in turn generate code for another different system |
| 7438 | (e.g. cross-canadian recipes). Using terminology from GNU, the |
| 7439 | primary system is referred to as the "HOST" and the secondary, or |
| 7440 | different, system is referred to as the "TARGET". Thus, the binaries |
| 7441 | run on the "HOST" system and generate binaries for the "TARGET" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7442 | system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used |
| 7443 | for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7444 | sysroot used for the "TARGET" system. |
| 7445 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7446 | :term:`STAGING_ETCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7447 | Specifies the path to the ``/etc`` subdirectory of the sysroot |
| 7448 | directory for the build host. |
| 7449 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7450 | :term:`STAGING_EXECPREFIXDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7451 | Specifies the path to the ``/usr`` subdirectory of the sysroot |
| 7452 | directory for the target for which the current recipe is being built |
| 7453 | (:term:`STAGING_DIR_HOST`). |
| 7454 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7455 | :term:`STAGING_INCDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7456 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7457 | sysroot directory for the target for which the current recipe being |
| 7458 | built (:term:`STAGING_DIR_HOST`). |
| 7459 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7460 | :term:`STAGING_INCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7461 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7462 | sysroot directory for the build host. |
| 7463 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7464 | :term:`STAGING_KERNEL_BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7465 | Points to the directory containing the kernel build artifacts. |
| 7466 | Recipes building software that needs to access kernel build artifacts |
| 7467 | (e.g. ``systemtap-uprobes``) can look in the directory specified with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7468 | the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7469 | after the kernel has been built. |
| 7470 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7471 | :term:`STAGING_KERNEL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7472 | The directory with kernel headers that are required to build |
| 7473 | out-of-tree modules. |
| 7474 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7475 | :term:`STAGING_LIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7476 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7477 | directory for the target for which the current recipe is being built |
| 7478 | (:term:`STAGING_DIR_HOST`). |
| 7479 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7480 | :term:`STAGING_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7481 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7482 | directory for the build host. |
| 7483 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7484 | :term:`STAMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7485 | Specifies the base path used to create recipe stamp files. The path |
| 7486 | to an actual stamp file is constructed by evaluating this string and |
| 7487 | then appending additional information. Currently, the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7488 | assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7489 | file is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7490 | |
| 7491 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 7492 | |
| 7493 | For information on how BitBake uses stamp files to determine if a |
| 7494 | task should be rerun, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7495 | ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7496 | section in the Yocto Project Overview and Concepts Manual. |
| 7497 | |
| 7498 | See :term:`STAMPS_DIR`, |
| 7499 | :term:`MULTIMACH_TARGET_SYS`, |
| 7500 | :term:`PN`, :term:`EXTENDPE`, |
| 7501 | :term:`PV`, and :term:`PR` for related variable |
| 7502 | information. |
| 7503 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7504 | :term:`STAMPS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7505 | Specifies the base directory in which the OpenEmbedded build system |
| 7506 | places stamps. The default directory is ``${TMPDIR}/stamps``. |
| 7507 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7508 | :term:`STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7509 | The minimal command and arguments to run ``strip``, which is used to |
| 7510 | strip symbols. |
| 7511 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7512 | :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7513 | The short (72 characters or less) summary of the binary package for |
| 7514 | packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7515 | :term:`SUMMARY` is used to define the |
| 7516 | :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7517 | not set in the recipe. |
| 7518 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7519 | :term:`SVNDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7520 | The directory in which files checked out of a Subversion system are |
| 7521 | stored. |
| 7522 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7523 | :term:`SYSLINUX_DEFAULT_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7524 | Specifies the kernel boot default console. If you want to use a |
| 7525 | console other than the default, set this variable in your recipe as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7526 | follows where "X" is the console number you want to use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7527 | |
| 7528 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" |
| 7529 | |
| 7530 | The :ref:`syslinux <ref-classes-syslinux>` class initially sets |
| 7531 | this variable to null but then checks for a value later. |
| 7532 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7533 | :term:`SYSLINUX_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7534 | Lists additional options to add to the syslinux file. You need to set |
| 7535 | this variable in your recipe. If you want to list multiple options, |
| 7536 | separate the options with a semicolon character (``;``). |
| 7537 | |
| 7538 | The :ref:`syslinux <ref-classes-syslinux>` class uses this variable |
| 7539 | to create a set of options. |
| 7540 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7541 | :term:`SYSLINUX_SERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7542 | Specifies the alternate serial port or turns it off. To turn off |
| 7543 | serial, set this variable to an empty string in your recipe. The |
| 7544 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7545 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7546 | |
| 7547 | SYSLINUX_SERIAL ?= "0 115200" |
| 7548 | |
| 7549 | The class checks for and uses the variable as needed. |
| 7550 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7551 | :term:`SYSLINUX_SERIAL_TTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7552 | Specifies the alternate console=tty... kernel boot argument. The |
| 7553 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7554 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7555 | |
| 7556 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
| 7557 | |
| 7558 | The class checks for and uses the variable as needed. |
| 7559 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7560 | :term:`SYSLINUX_SPLASH` |
| 7561 | An ``.LSS`` file used as the background for the VGA boot menu when |
| 7562 | you use the boot menu. You need to set this variable in your recipe. |
| 7563 | |
| 7564 | The :ref:`syslinux <ref-classes-syslinux>` class checks for this |
| 7565 | variable and if found, the OpenEmbedded build system installs the |
| 7566 | splash screen. |
| 7567 | |
| 7568 | :term:`SYSROOT_DESTDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7569 | Points to the temporary directory under the work directory (default |
| 7570 | "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") |
| 7571 | where the files populated into the sysroot are assembled during the |
| 7572 | :ref:`ref-tasks-populate_sysroot` task. |
| 7573 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7574 | :term:`SYSROOT_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7575 | Directories that are staged into the sysroot by the |
| 7576 | :ref:`ref-tasks-populate_sysroot` task. By |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7577 | default, the following directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7578 | |
| 7579 | SYSROOT_DIRS = " \ |
| 7580 | ${includedir} \ |
| 7581 | ${libdir} \ |
| 7582 | ${base_libdir} \ |
| 7583 | ${nonarch_base_libdir} \ |
| 7584 | ${datadir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7585 | /sysroot-only \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7586 | " |
| 7587 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7588 | :term:`SYSROOT_DIRS_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7589 | Directories that are not staged into the sysroot by the |
| 7590 | :ref:`ref-tasks-populate_sysroot` task. You |
| 7591 | can use this variable to exclude certain subdirectories of |
| 7592 | directories listed in :term:`SYSROOT_DIRS` from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7593 | staging. By default, the following directories are not staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7594 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7595 | SYSROOT_DIRS_IGNORE = " \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7596 | ${mandir} \ |
| 7597 | ${docdir} \ |
| 7598 | ${infodir} \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7599 | ${datadir}/X11/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7600 | ${datadir}/applications \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7601 | ${datadir}/bash-completion \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7602 | ${datadir}/fonts \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7603 | ${datadir}/gtk-doc/html \ |
| 7604 | ${datadir}/installed-tests \ |
| 7605 | ${datadir}/locale \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7606 | ${datadir}/pixmaps \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7607 | ${datadir}/terminfo \ |
| 7608 | ${libdir}/${BPN}/ptest \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7609 | " |
| 7610 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7611 | :term:`SYSROOT_DIRS_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7612 | Extra directories staged into the sysroot by the |
| 7613 | :ref:`ref-tasks-populate_sysroot` task for |
| 7614 | ``-native`` recipes, in addition to those specified in |
| 7615 | :term:`SYSROOT_DIRS`. By default, the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7616 | extra directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7617 | |
| 7618 | SYSROOT_DIRS_NATIVE = " \ |
| 7619 | ${bindir} \ |
| 7620 | ${sbindir} \ |
| 7621 | ${base_bindir} \ |
| 7622 | ${base_sbindir} \ |
| 7623 | ${libexecdir} \ |
| 7624 | ${sysconfdir} \ |
| 7625 | ${localstatedir} \ |
| 7626 | " |
| 7627 | |
| 7628 | .. note:: |
| 7629 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7630 | Programs built by ``-native`` recipes run directly from the sysroot |
| 7631 | (:term:`STAGING_DIR_NATIVE`), which is why additional directories |
| 7632 | containing program executables and supporting files need to be staged. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7633 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7634 | :term:`SYSROOT_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7635 | A list of functions to execute after files are staged into the |
| 7636 | sysroot. These functions are usually used to apply additional |
| 7637 | processing on the staged files, or to stage additional files. |
| 7638 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7639 | :term:`SYSTEMD_AUTO_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7640 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7641 | this variable specifies whether the specified service in |
| 7642 | :term:`SYSTEMD_SERVICE` should start |
| 7643 | automatically or not. By default, the service is enabled to |
| 7644 | automatically start at boot time. The default setting is in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7645 | :ref:`systemd <ref-classes-systemd>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7646 | |
| 7647 | SYSTEMD_AUTO_ENABLE ??= "enable" |
| 7648 | |
| 7649 | You can disable the service by setting the variable to "disable". |
| 7650 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7651 | :term:`SYSTEMD_BOOT_CFG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7652 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7653 | "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7654 | configuration file that should be used. By default, the |
| 7655 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7656 | :term:`SYSTEMD_BOOT_CFG` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7657 | |
| 7658 | SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf" |
| 7659 | |
| 7660 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7661 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7662 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7663 | :term:`SYSTEMD_BOOT_ENTRIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7664 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7665 | "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7666 | list of entry files (``*.conf``) to install that contain one boot |
| 7667 | entry per file. By default, the |
| 7668 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7669 | :term:`SYSTEMD_BOOT_ENTRIES` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7670 | |
| 7671 | SYSTEMD_BOOT_ENTRIES ?= "" |
| 7672 | |
| 7673 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7674 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7675 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7676 | :term:`SYSTEMD_BOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7677 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7678 | "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7679 | boot menu timeout in seconds. By default, the |
| 7680 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7681 | :term:`SYSTEMD_BOOT_TIMEOUT` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7682 | |
| 7683 | SYSTEMD_BOOT_TIMEOUT ?= "10" |
| 7684 | |
| 7685 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7686 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7687 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7688 | :term:`SYSTEMD_DEFAULT_TARGET` |
| 7689 | |
| 7690 | This variable allows to set the default unit that systemd starts at bootup. |
| 7691 | Usually, this is either ``multi-user.target`` or ``graphical.target``. |
| 7692 | This works by creating a ``default.target`` symbolic link to the chosen systemd |
| 7693 | target file. |
| 7694 | |
| 7695 | See `systemd's documentation |
| 7696 | <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__ |
| 7697 | for details. |
| 7698 | |
| 7699 | For example, this variable is used in the |
| 7700 | `core-image-minimal-xfce.bb |
| 7701 | <https://git.openembedded.org/meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>`__ |
| 7702 | recipe:: |
| 7703 | |
| 7704 | SYSTEMD_DEFAULT_TARGET = "graphical.target" |
| 7705 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7706 | :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7707 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7708 | this variable locates the systemd unit files when they are not found |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7709 | in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7710 | variable is set such that the systemd unit files are assumed to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7711 | reside in the recipes main package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7712 | |
| 7713 | SYSTEMD_PACKAGES ?= "${PN}" |
| 7714 | |
| 7715 | If these unit files are not in this recipe's main package, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7716 | to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7717 | the build system can find the systemd unit files. |
| 7718 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7719 | :term:`SYSTEMD_SERVICE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7720 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7721 | this variable specifies the systemd service name for a package. |
| 7722 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7723 | Multiple services can be specified, each one separated by a space. |
| 7724 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7725 | When you specify this file in your recipe, use a package name |
| 7726 | override to indicate the package to which the value applies. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7727 | an example from the connman recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7728 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 7729 | SYSTEMD_SERVICE:${PN} = "connman.service" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7730 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 7731 | The package overrides that can be specified are directly related to the value of |
| 7732 | term:`SYSTEMD_PACKAGES`. Overrides not included in term:`SYSTEMD_PACKAGES` |
| 7733 | will be silently ignored. |
| 7734 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7735 | :term:`SYSVINIT_ENABLED_GETTYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7736 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7737 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7738 | specifies a space-separated list of the virtual terminals that should |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7739 | run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7740 | (allowing login), assuming :term:`USE_VT` is not set to |
| 7741 | "0". |
| 7742 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7743 | The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7744 | run a getty on the first virtual terminal). |
| 7745 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7746 | :term:`T` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7747 | This variable points to a directory were BitBake places temporary |
| 7748 | files, which consist mostly of task logs and scripts, when building a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7749 | particular recipe. The variable is typically set as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7750 | |
| 7751 | T = "${WORKDIR}/temp" |
| 7752 | |
| 7753 | The :term:`WORKDIR` is the directory into which |
| 7754 | BitBake unpacks and builds the recipe. The default ``bitbake.conf`` |
| 7755 | file sets this variable. |
| 7756 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7757 | The :term:`T` variable is not to be confused with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7758 | :term:`TMPDIR` variable, which points to the root of |
| 7759 | the directory tree where BitBake places the output of an entire |
| 7760 | build. |
| 7761 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7762 | :term:`TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7763 | The target machine's architecture. The OpenEmbedded build system |
| 7764 | supports many architectures. Here is an example list of architectures |
| 7765 | supported. This list is by no means complete as the architecture is |
| 7766 | configurable: |
| 7767 | |
| 7768 | - arm |
| 7769 | - i586 |
| 7770 | - x86_64 |
| 7771 | - powerpc |
| 7772 | - powerpc64 |
| 7773 | - mips |
| 7774 | - mipsel |
| 7775 | |
| 7776 | For additional information on machine architectures, see the |
| 7777 | :term:`TUNE_ARCH` variable. |
| 7778 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7779 | :term:`TARGET_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7780 | Specifies architecture-specific assembler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7781 | system. :term:`TARGET_AS_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7782 | :term:`TUNE_ASARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7783 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7784 | |
| 7785 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
| 7786 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7787 | :term:`TARGET_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7788 | Specifies architecture-specific C compiler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7789 | system. :term:`TARGET_CC_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7790 | :term:`TUNE_CCARGS` by default. |
| 7791 | |
| 7792 | .. note:: |
| 7793 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7794 | It is a common workaround to append :term:`LDFLAGS` to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7795 | :term:`TARGET_CC_ARCH` in recipes that build software for the target that |
| 7796 | would not otherwise respect the exported :term:`LDFLAGS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7797 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7798 | :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7799 | This is a specific kernel compiler flag for a CPU or Application |
| 7800 | Binary Interface (ABI) tune. The flag is used rarely and only for |
| 7801 | cases where a userspace :term:`TUNE_CCARGS` is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7802 | compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7803 | variable allows the kernel (and associated modules) to use a |
| 7804 | different configuration. See the |
| 7805 | ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the |
| 7806 | :term:`Source Directory` for an example. |
| 7807 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7808 | :term:`TARGET_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7809 | Specifies the flags to pass to the C compiler when building for the |
| 7810 | target. When building in the target context, |
| 7811 | :term:`CFLAGS` is set to the value of this variable by |
| 7812 | default. |
| 7813 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7814 | Additionally, the SDK's environment setup script sets the :term:`CFLAGS` |
| 7815 | variable in the environment to the :term:`TARGET_CFLAGS` value so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7816 | executables built using the SDK also have the flags applied. |
| 7817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7818 | :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7819 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 7820 | C and the C++ compilers) when building for the target. When building |
| 7821 | in the target context, :term:`CPPFLAGS` is set to the |
| 7822 | value of this variable by default. |
| 7823 | |
| 7824 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7825 | :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7826 | value so that executables built using the SDK also have the flags |
| 7827 | applied. |
| 7828 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7829 | :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7830 | Specifies the flags to pass to the C++ compiler when building for the |
| 7831 | target. When building in the target context, |
| 7832 | :term:`CXXFLAGS` is set to the value of this variable |
| 7833 | by default. |
| 7834 | |
| 7835 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7836 | :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7837 | value so that executables built using the SDK also have the flags |
| 7838 | applied. |
| 7839 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7840 | :term:`TARGET_FPU` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7841 | Specifies the method for handling FPU code. For FPU-less targets, |
| 7842 | which include most ARM CPUs, the variable must be set to "soft". If |
| 7843 | not, the kernel emulation gets used, which results in a performance |
| 7844 | penalty. |
| 7845 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7846 | :term:`TARGET_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7847 | Specifies architecture-specific linker flags for the target system. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7848 | :term:`TARGET_LD_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7849 | :term:`TUNE_LDARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7850 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7851 | |
| 7852 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
| 7853 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7854 | :term:`TARGET_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7855 | Specifies the flags to pass to the linker when building for the |
| 7856 | target. When building in the target context, |
| 7857 | :term:`LDFLAGS` is set to the value of this variable |
| 7858 | by default. |
| 7859 | |
| 7860 | Additionally, the SDK's environment setup script sets the |
| 7861 | :term:`LDFLAGS` variable in the environment to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7862 | :term:`TARGET_LDFLAGS` value so that executables built using the SDK also |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7863 | have the flags applied. |
| 7864 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7865 | :term:`TARGET_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7866 | Specifies the target's operating system. The variable can be set to |
| 7867 | "linux" for glibc-based systems (GNU C Library) and to "linux-musl" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 7868 | for musl libc. For ARM/EABI targets, the possible values are |
| 7869 | "linux-gnueabi" and "linux-musleabi". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7870 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7871 | :term:`TARGET_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7872 | Specifies the prefix used for the toolchain binary target tools. |
| 7873 | |
| 7874 | Depending on the type of recipe and the build target, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7875 | :term:`TARGET_PREFIX` is set as follows: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7876 | |
| 7877 | - For recipes building for the target machine, the value is |
| 7878 | "${:term:`TARGET_SYS`}-". |
| 7879 | |
| 7880 | - For native recipes, the build system sets the variable to the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7881 | value of :term:`BUILD_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7882 | |
| 7883 | - For native SDK recipes (``nativesdk``), the build system sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7884 | variable to the value of :term:`SDK_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7885 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7886 | :term:`TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7887 | Specifies the system, including the architecture and the operating |
| 7888 | system, for which the build is occurring in the context of the |
| 7889 | current recipe. |
| 7890 | |
| 7891 | The OpenEmbedded build system automatically sets this variable based |
| 7892 | on :term:`TARGET_ARCH`, |
| 7893 | :term:`TARGET_VENDOR`, and |
| 7894 | :term:`TARGET_OS` variables. |
| 7895 | |
| 7896 | .. note:: |
| 7897 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7898 | You do not need to set the :term:`TARGET_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7899 | |
| 7900 | Consider these two examples: |
| 7901 | |
| 7902 | - Given a native recipe on a 32-bit, x86 machine running Linux, the |
| 7903 | value is "i686-linux". |
| 7904 | |
| 7905 | - Given a recipe being built for a little-endian, MIPS target |
| 7906 | running Linux, the value might be "mipsel-linux". |
| 7907 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7908 | :term:`TARGET_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7909 | Specifies the name of the target vendor. |
| 7910 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7911 | :term:`TCLIBC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7912 | Specifies the GNU standard C library (``libc``) variant to use during |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7913 | the build process. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7914 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7915 | You can select "glibc", "musl", "newlib", or "baremetal". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7916 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7917 | :term:`TCLIBCAPPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7918 | Specifies a suffix to be appended onto the |
| 7919 | :term:`TMPDIR` value. The suffix identifies the |
| 7920 | ``libc`` variant for building. When you are building for multiple |
| 7921 | variants with the same :term:`Build Directory`, this |
| 7922 | mechanism ensures that output for different ``libc`` variants is kept |
| 7923 | separate to avoid potential conflicts. |
| 7924 | |
| 7925 | In the ``defaultsetup.conf`` file, the default value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7926 | :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7927 | which normally only support one ``libc`` variant, set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7928 | :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7929 | in no suffix being applied. |
| 7930 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7931 | :term:`TCMODE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7932 | Specifies the toolchain selector. :term:`TCMODE` controls the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7933 | characteristics of the generated packages and images by telling the |
| 7934 | OpenEmbedded build system which toolchain profile to use. By default, |
| 7935 | the OpenEmbedded build system builds its own internal toolchain. The |
| 7936 | variable's default value is "default", which uses that internal |
| 7937 | toolchain. |
| 7938 | |
| 7939 | .. note:: |
| 7940 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7941 | If :term:`TCMODE` is set to a value other than "default", then it is your |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7942 | responsibility to ensure that the toolchain is compatible with the |
| 7943 | default toolchain. Using older or newer versions of these |
| 7944 | components might cause build problems. See the Release Notes for |
| 7945 | the Yocto Project release for the specific components with which |
| 7946 | the toolchain must be compatible. To access the Release Notes, go |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7947 | to the :yocto_home:`Downloads </software-overview/downloads>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7948 | page on the Yocto Project website and click on the "RELEASE |
| 7949 | INFORMATION" link for the appropriate release. |
| 7950 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7951 | The :term:`TCMODE` variable is similar to :term:`TCLIBC`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7952 | which controls the variant of the GNU standard C library (``libc``) |
| 7953 | used during the build process: ``glibc`` or ``musl``. |
| 7954 | |
| 7955 | With additional layers, it is possible to use a pre-compiled external |
| 7956 | toolchain. One example is the Sourcery G++ Toolchain. The support for |
| 7957 | this toolchain resides in the separate Mentor Graphics |
| 7958 | ``meta-sourcery`` layer at |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7959 | https://github.com/MentorEmbedded/meta-sourcery/. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7960 | |
| 7961 | The layer's ``README`` file contains information on how to use the |
| 7962 | Sourcery G++ Toolchain as an external toolchain. In summary, you must |
| 7963 | be sure to add the layer to your ``bblayers.conf`` file in front of |
| 7964 | the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable |
| 7965 | in your ``local.conf`` file to the location in which you installed |
| 7966 | the toolchain. |
| 7967 | |
| 7968 | The fundamentals used for this example apply to any external |
| 7969 | toolchain. You can use ``meta-sourcery`` as a template for adding |
| 7970 | support for other external toolchains. |
| 7971 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 7972 | :term:`TEMPLATECONF` |
| 7973 | Specifies the directory used by the build system to find templates |
| 7974 | from which to build the ``bblayers.conf`` and ``local.conf`` files. |
| 7975 | Use this variable if you wish to customize such files, and the default |
| 7976 | BitBake targets shown when sourcing the ``oe-init-build-env`` script. |
| 7977 | |
| 7978 | For details, see the |
| 7979 | :ref:`dev-manual/common-tasks:creating a custom template configuration directory` |
| 7980 | section in the Yocto Project Development Tasks manual. |
| 7981 | |
| 7982 | .. note:: |
| 7983 | |
| 7984 | You must set this variable in the external environment in order |
| 7985 | for it to work. |
| 7986 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7987 | :term:`TEST_EXPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7988 | The location the OpenEmbedded build system uses to export tests when |
| 7989 | the :term:`TEST_EXPORT_ONLY` variable is set |
| 7990 | to "1". |
| 7991 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7992 | The :term:`TEST_EXPORT_DIR` variable defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7993 | ``"${TMPDIR}/testimage/${PN}"``. |
| 7994 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7995 | :term:`TEST_EXPORT_ONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7996 | Specifies to export the tests only. Set this variable to "1" if you |
| 7997 | do not want to run the tests but you want them to be exported in a |
| 7998 | manner that you to run them outside of the build system. |
| 7999 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8000 | :term:`TEST_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8001 | Holds the SSH log and the boot log for QEMU machines. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8002 | :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8003 | |
| 8004 | .. note:: |
| 8005 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8006 | Actual test results reside in the task log (``log.do_testimage``), |
| 8007 | which is in the ``${WORKDIR}/temp/`` directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8008 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8009 | :term:`TEST_POWERCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8010 | For automated hardware testing, specifies the command to use to |
| 8011 | control the power of the target machine under test. Typically, this |
| 8012 | command would point to a script that performs the appropriate action |
| 8013 | (e.g. interacting with a web-enabled power strip). The specified |
| 8014 | command should expect to receive as the last argument "off", "on" or |
| 8015 | "cycle" specifying to power off, on, or cycle (power off and then |
| 8016 | power on) the device, respectively. |
| 8017 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8018 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8019 | For automated hardware testing, specifies additional arguments to |
| 8020 | pass through to the command specified in |
| 8021 | :term:`TEST_POWERCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8022 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8023 | wish, for example, to separate the machine-specific and |
| 8024 | non-machine-specific parts of the arguments. |
| 8025 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8026 | :term:`TEST_QEMUBOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8027 | The time in seconds allowed for an image to boot before automated |
| 8028 | runtime tests begin to run against an image. The default timeout |
| 8029 | period to allow the boot process to reach the login prompt is 500 |
| 8030 | seconds. You can specify a different value in the ``local.conf`` |
| 8031 | file. |
| 8032 | |
| 8033 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8034 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8035 | section in the Yocto Project Development Tasks Manual. |
| 8036 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8037 | :term:`TEST_SERIALCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8038 | For automated hardware testing, specifies the command to use to |
| 8039 | connect to the serial console of the target machine under test. This |
| 8040 | command simply needs to connect to the serial console and forward |
| 8041 | that connection to standard input and output as any normal terminal |
| 8042 | program does. |
| 8043 | |
| 8044 | For example, to use the Picocom terminal program on serial device |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8045 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8046 | |
| 8047 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
| 8048 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8049 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8050 | For automated hardware testing, specifies additional arguments to |
| 8051 | pass through to the command specified in |
| 8052 | :term:`TEST_SERIALCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8053 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8054 | wish, for example, to separate the machine-specific and |
| 8055 | non-machine-specific parts of the command. |
| 8056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8057 | :term:`TEST_SERVER_IP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8058 | The IP address of the build machine (host machine). This IP address |
| 8059 | is usually automatically detected. However, if detection fails, this |
| 8060 | variable needs to be set to the IP address of the build machine (i.e. |
| 8061 | where the build is taking place). |
| 8062 | |
| 8063 | .. note:: |
| 8064 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8065 | The :term:`TEST_SERVER_IP` variable is only used for a small number of |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8066 | tests such as the "dnf" test suite, which needs to download packages |
| 8067 | from ``WORKDIR/oe-rootfs-repo``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8068 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8069 | :term:`TEST_SUITES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8070 | An ordered list of tests (modules) to run against an image when |
| 8071 | performing automated runtime testing. |
| 8072 | |
| 8073 | The OpenEmbedded build system provides a core set of tests that can |
| 8074 | be used against images. |
| 8075 | |
| 8076 | .. note:: |
| 8077 | |
| 8078 | Currently, there is only support for running these tests under |
| 8079 | QEMU. |
| 8080 | |
| 8081 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8082 | your own tests to the list of tests by appending :term:`TEST_SUITES` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8083 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8084 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8085 | TEST_SUITES:append = " mytest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8086 | |
| 8087 | Alternatively, you can |
| 8088 | provide the "auto" option to have all applicable tests run against |
| 8089 | the image. |
| 8090 | :: |
| 8091 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8092 | TEST_SUITES:append = " auto" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8093 | |
| 8094 | Using this option causes the |
| 8095 | build system to automatically run tests that are applicable to the |
| 8096 | image. Tests that are not applicable are skipped. |
| 8097 | |
| 8098 | The order in which tests are run is important. Tests that depend on |
| 8099 | another test must appear later in the list than the test on which |
| 8100 | they depend. For example, if you append the list of tests with two |
| 8101 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8102 | ``test_A``, then you must order the tests as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8103 | |
| 8104 | TEST_SUITES = "test_A test_B" |
| 8105 | |
| 8106 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8107 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8108 | section in the Yocto Project Development Tasks Manual. |
| 8109 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8110 | :term:`TEST_TARGET` |
| 8111 | Specifies the target controller to use when running tests against a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8112 | test image. The default controller to use is "qemu":: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8113 | |
| 8114 | TEST_TARGET = "qemu" |
| 8115 | |
| 8116 | A target controller is a class that defines how an image gets |
| 8117 | deployed on a target and how a target is started. A layer can extend |
| 8118 | the controllers by adding a module in the layer's |
| 8119 | ``/lib/oeqa/controllers`` directory and by inheriting the |
| 8120 | ``BaseTarget`` class, which is an abstract class that cannot be used |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8121 | as a value of :term:`TEST_TARGET`. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8122 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8123 | You can provide the following arguments with :term:`TEST_TARGET`: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8124 | |
| 8125 | - *"qemu":* Boots a QEMU image and runs the tests. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8126 | ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8127 | in the Yocto Project Development Tasks Manual for more |
| 8128 | information. |
| 8129 | |
| 8130 | - *"simpleremote":* Runs the tests on target hardware that is |
| 8131 | already up and running. The hardware can be on the network or it |
| 8132 | can be a device running an image on QEMU. You must also set |
| 8133 | :term:`TEST_TARGET_IP` when you use |
| 8134 | "simpleremote". |
| 8135 | |
| 8136 | .. note:: |
| 8137 | |
| 8138 | This argument is defined in |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8139 | ``meta/lib/oeqa/controllers/simpleremote.py``. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8140 | |
| 8141 | For information on running tests on hardware, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8142 | ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8143 | section in the Yocto Project Development Tasks Manual. |
| 8144 | |
| 8145 | :term:`TEST_TARGET_IP` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8146 | The IP address of your hardware under test. The :term:`TEST_TARGET_IP` |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8147 | variable has no effect when :term:`TEST_TARGET` is |
| 8148 | set to "qemu". |
| 8149 | |
| 8150 | When you specify the IP address, you can also include a port. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8151 | an example:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8152 | |
| 8153 | TEST_TARGET_IP = "192.168.1.4:2201" |
| 8154 | |
| 8155 | Specifying a port is |
| 8156 | useful when SSH is started on a non-standard port or in cases when |
| 8157 | your hardware under test is behind a firewall or network that is not |
| 8158 | directly accessible from your host and you need to do port address |
| 8159 | translation. |
| 8160 | |
| 8161 | :term:`TESTIMAGE_AUTO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8162 | Automatically runs the series of automated tests for images when an |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8163 | image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8164 | any image that successfully builds to automatically boot under QEMU. |
| 8165 | Using the variable also adds in dependencies so that any SDK for |
| 8166 | which testing is requested is automatically built first. |
| 8167 | |
| 8168 | These tests are written in Python making use of the ``unittest`` |
| 8169 | module, and the majority of them run commands on the target system |
| 8170 | over ``ssh``. You can set this variable to "1" in your ``local.conf`` |
| 8171 | file in the :term:`Build Directory` to have the |
| 8172 | OpenEmbedded build system automatically run these tests after an |
| 8173 | image successfully builds: |
| 8174 | |
| 8175 | TESTIMAGE_AUTO = "1" |
| 8176 | |
| 8177 | For more information |
| 8178 | on enabling, running, and writing these tests, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8179 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8180 | section in the Yocto Project Development Tasks Manual and the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8181 | ":ref:`ref-classes-testimage*`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8182 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8183 | :term:`THISDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8184 | The directory in which the file BitBake is currently parsing is |
| 8185 | located. Do not manually set this variable. |
| 8186 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8187 | :term:`TIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8188 | The time the build was started. Times appear using the hour, minute, |
| 8189 | and second (HMS) format (e.g. "140159" for one minute and fifty-nine |
| 8190 | seconds past 1400 hours). |
| 8191 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8192 | :term:`TMPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8193 | This variable is the base directory the OpenEmbedded build system |
| 8194 | uses for all build output and intermediate files (other than the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8195 | shared state cache). By default, the :term:`TMPDIR` variable points to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8196 | ``tmp`` within the :term:`Build Directory`. |
| 8197 | |
| 8198 | If you want to establish this directory in a location other than the |
| 8199 | default, you can uncomment and edit the following statement in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8200 | ``conf/local.conf`` file in the :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8201 | |
| 8202 | #TMPDIR = "${TOPDIR}/tmp" |
| 8203 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8204 | An example use for this scenario is to set :term:`TMPDIR` to a local disk, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8205 | which does not use NFS, while having the Build Directory use NFS. |
| 8206 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8207 | The filesystem used by :term:`TMPDIR` must have standard filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8208 | semantics (i.e. mixed-case files are unique, POSIX file locking, and |
| 8209 | persistent inodes). Due to various issues with NFS and bugs in some |
| 8210 | implementations, NFS does not meet this minimum requirement. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8211 | Consequently, :term:`TMPDIR` cannot be on NFS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8212 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8213 | :term:`TOOLCHAIN_HOST_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8214 | This variable lists packages the OpenEmbedded build system uses when |
| 8215 | building an SDK, which contains a cross-development environment. The |
| 8216 | packages specified by this variable are part of the toolchain set |
| 8217 | that runs on the :term:`SDKMACHINE`, and each |
| 8218 | package should usually have the prefix ``nativesdk-``. For example, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8219 | consider the following command when building an SDK:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8220 | |
| 8221 | $ bitbake -c populate_sdk imagename |
| 8222 | |
| 8223 | In this case, a default list of packages is |
| 8224 | set in this variable, but you can add additional packages to the |
| 8225 | list. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8226 | ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8227 | in the Yocto Project Application Development and the Extensible |
| 8228 | Software Development Kit (eSDK) manual for more information. |
| 8229 | |
| 8230 | For background information on cross-development toolchains in the |
| 8231 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8232 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8233 | section in the Yocto Project Overview and Concepts Manual. For |
| 8234 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8235 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8236 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8237 | Note that this variable applies to building an SDK, not an eSDK, |
| 8238 | in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be |
| 8239 | used instead. |
| 8240 | |
| 8241 | :term:`TOOLCHAIN_HOST_TASK_ESDK` |
| 8242 | This variable allows to extend what is installed in the host |
| 8243 | portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK` |
| 8244 | applying to SDKs. |
| 8245 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8246 | :term:`TOOLCHAIN_OUTPUTNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8247 | This variable defines the name used for the toolchain output. The |
| 8248 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8249 | the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8250 | |
| 8251 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" |
| 8252 | |
| 8253 | See |
| 8254 | the :term:`SDK_NAME` and |
| 8255 | :term:`SDK_VERSION` variables for additional |
| 8256 | information. |
| 8257 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8258 | :term:`TOOLCHAIN_TARGET_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8259 | This variable lists packages the OpenEmbedded build system uses when |
| 8260 | it creates the target part of an SDK (i.e. the part built for the |
| 8261 | target hardware), which includes libraries and headers. Use this |
| 8262 | variable to add individual packages to the part of the SDK that runs |
| 8263 | on the target. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8264 | ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8265 | in the Yocto Project Application Development and the Extensible |
| 8266 | Software Development Kit (eSDK) manual for more information. |
| 8267 | |
| 8268 | For background information on cross-development toolchains in the |
| 8269 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8270 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8271 | section in the Yocto Project Overview and Concepts Manual. For |
| 8272 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8273 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8274 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8275 | :term:`TRANSLATED_TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8276 | A sanitized version of :term:`TARGET_ARCH`. This |
| 8277 | variable is used where the architecture is needed in a value where |
| 8278 | underscores are not allowed, for example within package filenames. In |
| 8279 | this case, dash characters replace any underscore characters used in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8280 | :term:`TARGET_ARCH`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8281 | |
| 8282 | Do not edit this variable. |
| 8283 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8284 | :term:`TUNE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8285 | The GNU canonical architecture for a specific architecture (i.e. |
| 8286 | ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses |
| 8287 | this value to setup configuration. |
| 8288 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8289 | :term:`TUNE_ARCH` definitions are specific to a given architecture. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8290 | definitions can be a single static definition, or can be dynamically |
| 8291 | adjusted. You can see details for a given CPU family by looking at |
| 8292 | the architecture's ``README`` file. For example, the |
| 8293 | ``meta/conf/machine/include/mips/README`` file in the |
| 8294 | :term:`Source Directory` provides information for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8295 | :term:`TUNE_ARCH` specific to the ``mips`` architecture. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8296 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8297 | :term:`TUNE_ARCH` is tied closely to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8298 | :term:`TARGET_ARCH`, which defines the target |
| 8299 | machine's architecture. The BitBake configuration file |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8300 | (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8301 | |
| 8302 | TARGET_ARCH = "${TUNE_ARCH}" |
| 8303 | |
| 8304 | The following list, which is by no means complete since architectures |
| 8305 | are configurable, shows supported machine architectures: |
| 8306 | |
| 8307 | - arm |
| 8308 | - i586 |
| 8309 | - x86_64 |
| 8310 | - powerpc |
| 8311 | - powerpc64 |
| 8312 | - mips |
| 8313 | - mipsel |
| 8314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8315 | :term:`TUNE_ASARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8316 | Specifies architecture-specific assembler flags for the target |
| 8317 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8318 | :term:`TUNE_ASARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8319 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8320 | through :term:`TUNE_FEATURES`. For example, the |
| 8321 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8322 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8323 | |
| 8324 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" |
| 8325 | |
| 8326 | .. note:: |
| 8327 | |
| 8328 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8329 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8330 | supply its own set of flags). |
| 8331 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8332 | :term:`TUNE_CCARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8333 | Specifies architecture-specific C compiler flags for the target |
| 8334 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8335 | :term:`TUNE_CCARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8336 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8337 | through :term:`TUNE_FEATURES`. |
| 8338 | |
| 8339 | .. note:: |
| 8340 | |
| 8341 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8342 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8343 | supply its own set of flags). |
| 8344 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8345 | :term:`TUNE_FEATURES` |
| 8346 | Features used to "tune" a compiler for optimal use given a specific |
| 8347 | processor. The features are defined within the tune files and allow |
| 8348 | arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on |
| 8349 | the features. |
| 8350 | |
| 8351 | The OpenEmbedded build system verifies the features to be sure they |
| 8352 | are not conflicting and that they are supported. |
| 8353 | |
| 8354 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8355 | :term:`TUNE_FEATURES` as follows:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8356 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8357 | TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8358 | |
| 8359 | See the :term:`DEFAULTTUNE` variable for more information. |
| 8360 | |
| 8361 | :term:`TUNE_LDARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8362 | Specifies architecture-specific linker flags for the target system. |
| 8363 | The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8364 | :term:`TUNE_LDARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8365 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8366 | through :term:`TUNE_FEATURES`. For example, the |
| 8367 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8368 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8369 | |
| 8370 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" |
| 8371 | |
| 8372 | .. note:: |
| 8373 | |
| 8374 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8375 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8376 | supply its own set of flags). |
| 8377 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8378 | :term:`TUNE_PKGARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8379 | The package architecture understood by the packaging system to define |
| 8380 | the architecture, ABI, and tuning of output packages. The specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8381 | tune is defined using the "_tune" override as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8382 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8383 | TUNE_PKGARCH:tune-tune = "tune" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8384 | |
| 8385 | These tune-specific package architectures are defined in the machine |
| 8386 | include files. Here is an example of the "core2-32" tuning as used in |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 8387 | the ``meta/conf/machine/include/x86/tune-core2.inc`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8388 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8389 | TUNE_PKGARCH:tune-core2-32 = "core2-32" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8390 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8391 | :term:`TUNECONFLICTS[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8392 | Specifies CPU or Application Binary Interface (ABI) tuning features |
| 8393 | that conflict with feature. |
| 8394 | |
| 8395 | Known tuning conflicts are specified in the machine include files in |
| 8396 | the :term:`Source Directory`. Here is an example from |
| 8397 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file |
| 8398 | that lists the "o32" and "n64" features as conflicting with the "n32" |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8399 | feature:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8400 | |
| 8401 | TUNECONFLICTS[n32] = "o32 n64" |
| 8402 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8403 | :term:`TUNEVALID[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8404 | Specifies a valid CPU or Application Binary Interface (ABI) tuning |
| 8405 | feature. The specified feature is stored as a flag. Valid features |
| 8406 | are specified in the machine include files (e.g. |
| 8407 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8408 | from that file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8409 | |
| 8410 | TUNEVALID[bigendian] = "Enable big-endian mode." |
| 8411 | |
| 8412 | See the machine include files in the :term:`Source Directory` |
| 8413 | for these features. |
| 8414 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8415 | :term:`UBOOT_CONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8416 | Configures the :term:`UBOOT_MACHINE` and can |
| 8417 | also define :term:`IMAGE_FSTYPES` for individual |
| 8418 | cases. |
| 8419 | |
| 8420 | Following is an example from the ``meta-fsl-arm`` layer. :: |
| 8421 | |
| 8422 | UBOOT_CONFIG ??= "sd" |
| 8423 | UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard" |
| 8424 | UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config" |
| 8425 | UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs" |
| 8426 | UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" |
| 8427 | |
| 8428 | In this example, "sd" is selected as the configuration of the possible four for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8429 | :term:`UBOOT_MACHINE`. The "sd" configuration defines |
| 8430 | "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8431 | "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8432 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8433 | For more information on how the :term:`UBOOT_CONFIG` is handled, see the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8434 | :ref:`uboot-config <ref-classes-uboot-config>` |
| 8435 | class. |
| 8436 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8437 | :term:`UBOOT_DTB_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8438 | Specifies the load address for the dtb image used by U-Boot. During FIT |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8439 | image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8440 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify |
| 8441 | the load address to be used in |
| 8442 | creating the dtb sections of Image Tree Source for the FIT image. |
| 8443 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8444 | :term:`UBOOT_DTBO_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8445 | Specifies the load address for the dtbo image used by U-Boot. During FIT |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8446 | image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8447 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in |
| 8448 | creating the dtbo sections of Image Tree Source for the FIT image. |
| 8449 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8450 | :term:`UBOOT_ENTRYPOINT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8451 | Specifies the entry point for the U-Boot image. During U-Boot image |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8452 | creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8453 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8454 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8455 | :term:`UBOOT_LOADADDRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8456 | Specifies the load address for the U-Boot image. During U-Boot image |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8457 | creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8458 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8459 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8460 | :term:`UBOOT_LOCALVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8461 | Appends a string to the name of the local version of the U-Boot |
| 8462 | image. For example, assuming the version of the U-Boot image built |
| 8463 | was "2013.10", the full version string reported by U-Boot would be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8464 | "2013.10-yocto" given the following statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8465 | |
| 8466 | UBOOT_LOCALVERSION = "-yocto" |
| 8467 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8468 | :term:`UBOOT_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8469 | Specifies the value passed on the ``make`` command line when building |
| 8470 | a U-Boot image. The value indicates the target platform |
| 8471 | configuration. You typically set this variable from the machine |
| 8472 | configuration file (i.e. ``conf/machine/machine_name.conf``). |
| 8473 | |
| 8474 | Please see the "Selection of Processor Architecture and Board Type" |
| 8475 | section in the U-Boot README for valid values for this variable. |
| 8476 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8477 | :term:`UBOOT_MAKE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8478 | Specifies the target called in the ``Makefile``. The default target |
| 8479 | is "all". |
| 8480 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8481 | :term:`UBOOT_MKIMAGE` |
| 8482 | Specifies the name of the mkimage command as used by the |
| 8483 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble |
| 8484 | the FIT image. This can be used to substitute an alternative command, wrapper |
| 8485 | script or function if desired. The default is "uboot-mkimage". |
| 8486 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8487 | :term:`UBOOT_MKIMAGE_DTCOPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8488 | Options for the device tree compiler passed to mkimage '-D' |
| 8489 | feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8490 | If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8491 | pass the ``-D`` option to mkimage. |
| 8492 | |
| 8493 | :term:`UBOOT_MKIMAGE_SIGN` |
| 8494 | Specifies the name of the mkimage command as used by the |
| 8495 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign |
| 8496 | the FIT image after it has been assembled (if enabled). This can be used |
| 8497 | to substitute an alternative command, wrapper script or function if |
| 8498 | desired. The default is "${:term:`UBOOT_MKIMAGE`}". |
| 8499 | |
| 8500 | :term:`UBOOT_MKIMAGE_SIGN_ARGS` |
| 8501 | Optionally specifies additional arguments for the |
| 8502 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the |
| 8503 | mkimage command when signing the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8504 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8505 | :term:`UBOOT_RD_ENTRYPOINT` |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8506 | Specifies the entrypoint for the RAM disk image. |
| 8507 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8508 | :term:`UBOOT_RD_ENTRYPOINT` variable is used |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8509 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8510 | entrypoint to be used in creating the Image Tree Source for |
| 8511 | the FIT image. |
| 8512 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8513 | :term:`UBOOT_RD_LOADADDRESS` |
| 8514 | Specifies the load address for the RAM disk image. |
| 8515 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8516 | :term:`UBOOT_RD_LOADADDRESS` variable is used |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8517 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8518 | load address to be used in creating the Image Tree Source for |
| 8519 | the FIT image. |
| 8520 | |
| 8521 | :term:`UBOOT_SIGN_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8522 | Enable signing of FIT image. The default value is "0". |
| 8523 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8524 | :term:`UBOOT_SIGN_KEYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8525 | Location of the directory containing the RSA key and |
| 8526 | certificate used for signing FIT image. |
| 8527 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8528 | :term:`UBOOT_SIGN_KEYNAME` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8529 | The name of keys used for signing U-Boot FIT image stored in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8530 | :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt |
| 8531 | certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have |
| 8532 | :term:`UBOOT_SIGN_KEYNAME` set to "dev". |
| 8533 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8534 | :term:`UBOOT_SUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8535 | Points to the generated U-Boot extension. For example, ``u-boot.sb`` |
| 8536 | has a ``.sb`` extension. |
| 8537 | |
| 8538 | The default U-Boot extension is ``.bin`` |
| 8539 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8540 | :term:`UBOOT_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8541 | Specifies the target used for building U-Boot. The target is passed |
| 8542 | directly as part of the "make" command (e.g. SPL and AIS). If you do |
| 8543 | not specifically set this variable, the OpenEmbedded build process |
| 8544 | passes and uses "all" for the target during the U-Boot building |
| 8545 | process. |
| 8546 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8547 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8548 | Specifies a list of options that, if reported by the configure script |
| 8549 | as being invalid, should not generate a warning during the |
| 8550 | :ref:`ref-tasks-configure` task. Normally, invalid |
| 8551 | configure options are simply not passed to the configure script (e.g. |
| 8552 | should be removed from :term:`EXTRA_OECONF` or |
| 8553 | :term:`PACKAGECONFIG_CONFARGS`). |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 8554 | However, there are common options that are passed to all |
| 8555 | configure scripts at a class level, but might not be valid for some |
| 8556 | configure scripts. Therefore warnings about these options are useless. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8557 | For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8558 | |
| 8559 | The configure arguments check that uses |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8560 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8561 | :ref:`insane <ref-classes-insane>` class and is only enabled if the |
| 8562 | recipe inherits the :ref:`autotools <ref-classes-autotools>` class. |
| 8563 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8564 | :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8565 | For recipes inheriting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8566 | :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8567 | specifies the package that contains the initscript that is enabled. |
| 8568 | |
| 8569 | The default value is "${PN}". Given that almost all recipes that |
| 8570 | install initscripts package them in the main package for the recipe, |
| 8571 | you rarely need to set this variable in individual recipes. |
| 8572 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8573 | :term:`UPSTREAM_CHECK_COMMITS` |
| 8574 | You can perform a per-recipe check for what the latest upstream |
| 8575 | source code version is by calling ``devtool latest-version recipe``. If |
| 8576 | the recipe source code is provided from Git repositories, but |
| 8577 | releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS` |
| 8578 | to ``1`` in the recipe, and the OpenEmbedded build system |
| 8579 | will compare the latest commit with the one currently specified |
| 8580 | by the recipe (:term:`SRCREV`). |
| 8581 | :: |
| 8582 | |
| 8583 | UPSTREAM_CHECK_COMMITS = "1" |
| 8584 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8585 | :term:`UPSTREAM_CHECK_GITTAGREGEX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8586 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8587 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8588 | the recipe source code is provided from Git repositories, the |
| 8589 | OpenEmbedded build system determines the latest upstream version by |
| 8590 | picking the latest tag from the list of all repository tags. |
| 8591 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8592 | You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8593 | regular expression to filter only the relevant tags should the |
| 8594 | default filter not work correctly. |
| 8595 | :: |
| 8596 | |
| 8597 | UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" |
| 8598 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8599 | :term:`UPSTREAM_CHECK_REGEX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8600 | Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8601 | regular expression instead of the default one when the package |
| 8602 | checking system is parsing the page found using |
| 8603 | :term:`UPSTREAM_CHECK_URI`. |
| 8604 | :: |
| 8605 | |
| 8606 | UPSTREAM_CHECK_REGEX = "package_regex" |
| 8607 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8608 | :term:`UPSTREAM_CHECK_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8609 | You can perform a per-recipe check for what the latest upstream |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8610 | source code version is by calling ``devtool latest-version recipe``. If |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8611 | the source code is provided from tarballs, the latest version is |
| 8612 | determined by fetching the directory listing where the tarball is and |
| 8613 | attempting to find a later tarball. When this approach does not work, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8614 | you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8615 | contains the link to the latest tarball. |
| 8616 | :: |
| 8617 | |
| 8618 | UPSTREAM_CHECK_URI = "recipe_url" |
| 8619 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 8620 | :term:`UPSTREAM_VERSION_UNKNOWN` |
| 8621 | You can perform a per-recipe check for what the latest upstream |
| 8622 | source code version is by calling ``devtool latest-version recipe``. |
| 8623 | If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`, |
| 8624 | :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in |
| 8625 | the recipe allows to determine what the latest upstream version is, |
| 8626 | you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe |
| 8627 | to acknowledge that the check cannot be performed. |
| 8628 | :: |
| 8629 | |
| 8630 | UPSTREAM_VERSION_UNKNOWN = "1" |
| 8631 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8632 | :term:`USE_DEVFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8633 | Determines if ``devtmpfs`` is used for ``/dev`` population. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8634 | default value used for :term:`USE_DEVFS` is "1" when no value is |
| 8635 | specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8636 | statically populated ``/dev`` directory. |
| 8637 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8638 | See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8639 | the Yocto Project Development Tasks Manual for information on how to |
| 8640 | use this variable. |
| 8641 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8642 | :term:`USE_VT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8643 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8644 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8645 | determines whether or not to run a |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8646 | `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8647 | virtual terminals in order to enable logging in through those |
| 8648 | terminals. |
| 8649 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8650 | The default value used for :term:`USE_VT` is "1" when no default value is |
| 8651 | specifically set. Typically, you would set :term:`USE_VT` to "0" in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8652 | machine configuration file for machines that do not have a graphical |
| 8653 | display attached and therefore do not need virtual terminal |
| 8654 | functionality. |
| 8655 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8656 | :term:`USER_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8657 | A list of classes to globally inherit. These classes are used by the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8658 | OpenEmbedded build system to enable extra features. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8659 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8660 | The default list is set in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8661 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8662 | USER_CLASSES ?= "buildstats" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8663 | |
| 8664 | For more information, see |
| 8665 | ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`. |
| 8666 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8667 | :term:`USERADD_ERROR_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8668 | If set to ``error``, forces the OpenEmbedded build system to produce |
| 8669 | an error if the user identification (``uid``) and group |
| 8670 | identification (``gid``) values are not defined in any of the files |
| 8671 | listed in :term:`USERADD_UID_TABLES` and |
| 8672 | :term:`USERADD_GID_TABLES`. If set to |
| 8673 | ``warn``, a warning will be issued instead. |
| 8674 | |
| 8675 | The default behavior for the build system is to dynamically apply |
| 8676 | ``uid`` and ``gid`` values. Consequently, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8677 | :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8678 | on using statically assigned ``gid`` and ``uid`` values, you should |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8679 | set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8680 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8681 | |
| 8682 | USERADD_ERROR_DYNAMIC = "error" |
| 8683 | |
| 8684 | Overriding the |
| 8685 | default behavior implies you are going to also take steps to set |
| 8686 | static ``uid`` and ``gid`` values through use of the |
| 8687 | :term:`USERADDEXTENSION`, |
| 8688 | :term:`USERADD_UID_TABLES`, and |
| 8689 | :term:`USERADD_GID_TABLES` variables. |
| 8690 | |
| 8691 | .. note:: |
| 8692 | |
| 8693 | There is a difference in behavior between setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8694 | :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8695 | When it is set to ``warn``, the build system will report a warning for |
| 8696 | every undefined ``uid`` and ``gid`` in any recipe. But when it is set |
| 8697 | to ``error``, it will only report errors for recipes that are actually |
| 8698 | built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8699 | This saves you from having to add static IDs for recipes that you |
| 8700 | know will never be built. |
| 8701 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8702 | :term:`USERADD_GID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8703 | Specifies a password file to use for obtaining static group |
| 8704 | identification (``gid``) values when the OpenEmbedded build system |
| 8705 | adds a group to the system during package installation. |
| 8706 | |
| 8707 | When applying static group identification (``gid``) values, the |
| 8708 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8709 | ``files/group`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8710 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8711 | |
| 8712 | |
| 8713 | USERADD_GID_TABLES = "files/group" |
| 8714 | |
| 8715 | .. note:: |
| 8716 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8717 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8718 | causes the build system to use static ``gid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8719 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8720 | :term:`USERADD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8721 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8722 | this variable specifies the individual packages within the recipe |
| 8723 | that require users and/or groups to be added. |
| 8724 | |
| 8725 | You must set this variable if the recipe inherits the class. For |
| 8726 | example, the following enables adding a user for the main package in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8727 | a recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8728 | |
| 8729 | USERADD_PACKAGES = "${PN}" |
| 8730 | |
| 8731 | .. note:: |
| 8732 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8733 | It follows that if you are going to use the :term:`USERADD_PACKAGES` |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8734 | variable, you need to set one or more of the :term:`USERADD_PARAM`, |
| 8735 | :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8736 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8737 | :term:`USERADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8738 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8739 | this variable specifies for a package what parameters should pass to |
| 8740 | the ``useradd`` command if you add a user to the system when the |
| 8741 | package is installed. |
| 8742 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8743 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8744 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 8745 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8746 | --no-create-home --shell /bin/false \ |
| 8747 | --user-group messagebus" |
| 8748 | |
| 8749 | For information on the |
| 8750 | standard Linux shell command ``useradd``, see |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8751 | https://linux.die.net/man/8/useradd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8752 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8753 | :term:`USERADD_UID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8754 | Specifies a password file to use for obtaining static user |
| 8755 | identification (``uid``) values when the OpenEmbedded build system |
| 8756 | adds a user to the system during package installation. |
| 8757 | |
| 8758 | When applying static user identification (``uid``) values, the |
| 8759 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8760 | ``files/passwd`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8761 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8762 | |
| 8763 | USERADD_UID_TABLES = "files/passwd" |
| 8764 | |
| 8765 | .. note:: |
| 8766 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8767 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8768 | causes the build system to use static ``uid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8769 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8770 | :term:`USERADDEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8771 | When set to "useradd-staticids", causes the OpenEmbedded build system |
| 8772 | to base all user and group additions on a static ``passwd`` and |
| 8773 | ``group`` files found in :term:`BBPATH`. |
| 8774 | |
| 8775 | To use static user identification (``uid``) and group identification |
| 8776 | (``gid``) values, set the variable as follows in your ``local.conf`` |
| 8777 | file: USERADDEXTENSION = "useradd-staticids" |
| 8778 | |
| 8779 | .. note:: |
| 8780 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8781 | Setting this variable to use static ``uid`` and ``gid`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8782 | values causes the OpenEmbedded build system to employ the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8783 | :ref:`ref-classes-useradd` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8784 | |
| 8785 | If you use static ``uid`` and ``gid`` information, you must also |
| 8786 | specify the ``files/passwd`` and ``files/group`` files by setting the |
| 8787 | :term:`USERADD_UID_TABLES` and |
| 8788 | :term:`USERADD_GID_TABLES` variables. |
| 8789 | Additionally, you should also set the |
| 8790 | :term:`USERADD_ERROR_DYNAMIC` variable. |
| 8791 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8792 | :term:`VOLATILE_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8793 | Specifies the persistence of the target's ``/var/log`` directory, |
| 8794 | which is used to house postinstall target log files. |
| 8795 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8796 | By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8797 | file is not persistent. You can override this setting by setting the |
| 8798 | variable to "no" to make the log directory persistent. |
| 8799 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8800 | :term:`WARN_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8801 | Specifies the quality assurance checks whose failures are reported as |
| 8802 | warnings by the OpenEmbedded build system. You set this variable in |
| 8803 | your distribution configuration file. For a list of the checks you |
| 8804 | can control with this variable, see the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8805 | ":ref:`ref-classes-insane`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8806 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8807 | :term:`WKS_FILE` |
| 8808 | Specifies the location of the Wic kickstart file that is used by the |
| 8809 | OpenEmbedded build system to create a partitioned image |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8810 | (``image.wic``). For information on how to create a partitioned |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8811 | image, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8812 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8813 | section in the Yocto Project Development Tasks Manual. For details on |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8814 | the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8815 | |
| 8816 | :term:`WKS_FILE_DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8817 | When placed in the recipe that builds your image, this variable lists |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8818 | build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8819 | applicable when Wic images are active (i.e. when |
| 8820 | :term:`IMAGE_FSTYPES` contains entries related |
| 8821 | to Wic). If your recipe does not create Wic images, the variable has |
| 8822 | no effect. |
| 8823 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8824 | The :term:`WKS_FILE_DEPENDS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8825 | :term:`DEPENDS` variable. When you use the variable in |
| 8826 | your recipe that builds the Wic image, dependencies you list in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8827 | :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8828 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8829 | With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8830 | specify a list of additional dependencies (e.g. native tools, |
| 8831 | bootloaders, and so forth), that are required to build Wic images. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8832 | Following is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8833 | |
| 8834 | WKS_FILE_DEPENDS = "some-native-tool" |
| 8835 | |
| 8836 | In the |
| 8837 | previous example, some-native-tool would be replaced with an actual |
| 8838 | native tool on which the build would depend. |
| 8839 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 8840 | :term:`WKS_FILES` |
| 8841 | Specifies a list of candidate Wic kickstart files to be used by the |
| 8842 | OpenEmbedded build system to create a partitioned image. Only the |
| 8843 | first one that is found, from left to right, will be used. |
| 8844 | |
| 8845 | This is only useful when there are multiple ``.wks`` files that can be |
| 8846 | used to produce an image. A typical case is when multiple layers are |
| 8847 | used for different hardware platforms, each supplying a different |
| 8848 | ``.wks`` file. In this case, you specify all possible ones through |
| 8849 | :term:`WKS_FILES`. |
| 8850 | |
| 8851 | If only one ``.wks`` file is used, set :term:`WKS_FILE` instead. |
| 8852 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8853 | :term:`WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8854 | The pathname of the work directory in which the OpenEmbedded build |
| 8855 | system builds a recipe. This directory is located within the |
| 8856 | :term:`TMPDIR` directory structure and is specific to |
| 8857 | the recipe being built and the system for which it is being built. |
| 8858 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8859 | The :term:`WORKDIR` directory is defined as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8860 | |
| 8861 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
| 8862 | |
| 8863 | The actual directory depends on several things: |
| 8864 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8865 | - :term:`TMPDIR`: The top-level build output directory |
| 8866 | - :term:`MULTIMACH_TARGET_SYS`: The target system identifier |
| 8867 | - :term:`PN`: The recipe name |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 8868 | - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which |
| 8869 | is usually the case for most recipes, then `EXTENDPE` is blank. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8870 | - :term:`PV`: The recipe version |
| 8871 | - :term:`PR`: The recipe revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8872 | |
| 8873 | As an example, assume a Source Directory top-level folder name |
| 8874 | ``poky``, a default Build Directory at ``poky/build``, and a |
| 8875 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose |
| 8876 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work |
| 8877 | directory the build system uses to build the package would be as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8878 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8879 | |
| 8880 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
| 8881 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8882 | :term:`XSERVER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8883 | Specifies the packages that should be installed to provide an X |
| 8884 | server and drivers for the current machine, assuming your image |
| 8885 | directly includes ``packagegroup-core-x11-xserver`` or, perhaps |
| 8886 | indirectly, includes "x11-base" in |
| 8887 | :term:`IMAGE_FEATURES`. |
| 8888 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8889 | The default value of :term:`XSERVER`, if not specified in the machine |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8890 | configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 8891 | |
| 8892 | :term:`XZ_THREADS` |
| 8893 | Specifies the number of parallel threads that should be used when |
| 8894 | using xz compression. |
| 8895 | |
| 8896 | By default this scales with core count, but is never set less than 2 |
| 8897 | to ensure that multi-threaded mode is always used so that the output |
| 8898 | file contents are deterministic. Builds will work with a value of 1 |
| 8899 | but the output will differ compared to the output from the compression |
| 8900 | generated when more than one thread is used. |
| 8901 | |
| 8902 | On systems where many tasks run in parallel, setting a limit to this |
| 8903 | can be helpful in controlling system resource usage. |
| 8904 | |
| 8905 | :term:`XZ_MEMLIMIT` |
| 8906 | Specifies the maximum memory the xz compression should use as a percentage |
| 8907 | of system memory. If unconstrained the xz compressor can use large amounts of |
| 8908 | memory and become problematic with parallelism elsewhere in the build. |
| 8909 | "50%" has been found to be a good value. |
| 8910 | |
| 8911 | :term:`ZSTD_THREADS` |
| 8912 | Specifies the number of parallel threads that should be used when |
| 8913 | using ZStandard compression. |
| 8914 | |
| 8915 | By default this scales with core count, but is never set less than 2 |
| 8916 | to ensure that multi-threaded mode is always used so that the output |
| 8917 | file contents are deterministic. Builds will work with a value of 1 |
| 8918 | but the output will differ compared to the output from the compression |
| 8919 | generated when more than one thread is used. |
| 8920 | |
| 8921 | On systems where many tasks run in parallel, setting a limit to this |
| 8922 | can be helpful in controlling system resource usage. |
| 8923 | |