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:: |
| 20 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 21 | :term:`ABIEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 22 | Extension to the Application Binary Interface (ABI) field of the GNU |
| 23 | canonical architecture name (e.g. "eabi"). |
| 24 | |
| 25 | ABI extensions are set in the machine include files. For example, the |
| 26 | ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 27 | following extension:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 28 | |
| 29 | ABIEXTENSION = "eabi" |
| 30 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 31 | :term:`ALLOW_EMPTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 32 | Specifies whether to produce an output package even if it is empty. |
| 33 | By default, BitBake does not produce empty packages. This default |
| 34 | behavior can cause issues when there is an |
| 35 | :term:`RDEPENDS` or some other hard runtime |
| 36 | requirement on the existence of the package. |
| 37 | |
| 38 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 39 | conjunction with a package name override, as in:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 40 | |
| 41 | ALLOW_EMPTY_${PN} = "1" |
| 42 | ALLOW_EMPTY_${PN}-dev = "1" |
| 43 | ALLOW_EMPTY_${PN}-staticdev = "1" |
| 44 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 45 | :term:`ALTERNATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 46 | Lists commands in a package that need an alternative binary naming |
| 47 | scheme. Sometimes the same command is provided in multiple packages. |
| 48 | When this occurs, the OpenEmbedded build system needs to use the |
| 49 | alternatives system to create a different binary naming scheme so the |
| 50 | commands can co-exist. |
| 51 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 52 | To use the variable, list out the package's commands that are also |
| 53 | provided by another package. For example, if the ``busybox`` package |
| 54 | has four such commands, you identify them as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 55 | |
| 56 | ALTERNATIVE_busybox = "sh sed test bracket" |
| 57 | |
| 58 | For more information on the alternatives system, see the |
| 59 | ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" |
| 60 | section. |
| 61 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 62 | :term:`ALTERNATIVE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 63 | Used by the alternatives system to map duplicated commands to actual |
| 64 | locations. For example, if the ``bracket`` command provided by the |
| 65 | ``busybox`` package is duplicated through another package, you must |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 66 | use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 67 | location:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 68 | |
| 69 | ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/[" |
| 70 | |
| 71 | In this example, the binary for the ``bracket`` command (i.e. ``[``) |
| 72 | from the ``busybox`` package resides in ``/usr/bin/``. |
| 73 | |
| 74 | .. note:: |
| 75 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 76 | 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] | 77 | |
| 78 | For more information on the alternatives system, see the |
| 79 | ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" |
| 80 | section. |
| 81 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 82 | :term:`ALTERNATIVE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 83 | Used by the alternatives system to create default priorities for |
| 84 | duplicated commands. You can use the variable to create a single |
| 85 | default regardless of the command name or package, a default for |
| 86 | specific duplicated commands regardless of the package, or a default |
| 87 | for specific commands tied to particular packages. Here are the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 88 | available syntax forms:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 89 | |
| 90 | ALTERNATIVE_PRIORITY = "priority" |
| 91 | ALTERNATIVE_PRIORITY[name] = "priority" |
| 92 | ALTERNATIVE_PRIORITY_pkg[name] = "priority" |
| 93 | |
| 94 | For more information on the alternatives system, see the |
| 95 | ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" |
| 96 | section. |
| 97 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 98 | :term:`ALTERNATIVE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 99 | Used by the alternatives system to create default link locations for |
| 100 | duplicated commands. You can use the variable to create a single |
| 101 | default location for all duplicated commands regardless of the |
| 102 | command name or package, a default for specific duplicated commands |
| 103 | regardless of the package, or a default for specific commands tied to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 104 | particular packages. Here are the available syntax forms:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 105 | |
| 106 | ALTERNATIVE_TARGET = "target" |
| 107 | ALTERNATIVE_TARGET[name] = "target" |
| 108 | ALTERNATIVE_TARGET_pkg[name] = "target" |
| 109 | |
| 110 | .. note:: |
| 111 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 112 | If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 113 | from the :term:`ALTERNATIVE_LINK_NAME` variable. |
| 114 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 115 | If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the |
| 116 | same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 117 | appended to it. |
| 118 | |
| 119 | Finally, if the file referenced has not been renamed, the |
| 120 | alternatives system will rename it to avoid the need to rename |
| 121 | alternative files in the :ref:`ref-tasks-install` |
| 122 | task while retaining support for the command if necessary. |
| 123 | |
| 124 | For more information on the alternatives system, see the |
| 125 | ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" |
| 126 | section. |
| 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:`AUTO_SYSLINUXMENU` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 211 | Enables creating an automatic menu for the syslinux bootloader. You |
| 212 | must set this variable in your recipe. The |
| 213 | :ref:`syslinux <ref-classes-syslinux>` class checks this variable. |
| 214 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 215 | :term:`AUTOREV` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 216 | 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] | 217 | use the latest source revision in the repository. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 218 | |
| 219 | SRCREV = "${AUTOREV}" |
| 220 | |
| 221 | If you use the previous statement to retrieve the latest version of |
| 222 | software, you need to be sure :term:`PV` contains |
| 223 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you |
| 224 | have a kernel recipe that inherits the |
| 225 | :ref:`kernel <ref-classes-kernel>` class and you use the previous |
| 226 | statement. In this example, ``${SRCPV}`` does not automatically get |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 227 | 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] | 228 | so that it does contain ``${SRCPV}``. |
| 229 | |
| 230 | For more information see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 231 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 232 | section in the Yocto Project Development Tasks Manual. |
| 233 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 234 | :term:`AVAILABLE_LICENSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 235 | List of licenses found in the directories specified by |
| 236 | :term:`COMMON_LICENSE_DIR` and |
| 237 | :term:`LICENSE_PATH`. |
| 238 | |
| 239 | .. note:: |
| 240 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 241 | It is assumed that all changes to :term:`COMMON_LICENSE_DIR` and |
| 242 | :term:`LICENSE_PATH` have been done before :term:`AVAILABLE_LICENSES` |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 243 | is defined (in :ref:`ref-classes-license`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 244 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 245 | :term:`AVAILTUNES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 246 | The list of defined CPU and Application Binary Interface (ABI) |
| 247 | tunings (i.e. "tunes") available for use by the OpenEmbedded build |
| 248 | system. |
| 249 | |
| 250 | The list simply presents the tunes that are available. Not all tunes |
| 251 | may be compatible with a particular machine configuration, or with |
| 252 | each other in a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 253 | :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] | 254 | configuration. |
| 255 | |
| 256 | To add a tune to the list, be sure to append it with spaces using the |
| 257 | "+=" BitBake operator. Do not simply replace the list by using the |
| 258 | "=" operator. See the |
| 259 | ":ref:`Basic Syntax <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax>`" section in the BitBake |
| 260 | User Manual for more information. |
| 261 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 262 | :term:`AZ_SAS` |
| 263 | Azure Storage Shared Access Signature, when using the |
| 264 | :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` |
| 265 | This variable can be defined to be used by the fetcher to authenticate |
| 266 | and gain access to non-public artifacts. |
| 267 | :: |
| 268 | |
| 269 | AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" |
| 270 | |
| 271 | For more information see Microsoft's Azure Storage documentation at |
| 272 | https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview |
| 273 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 274 | :term:`B` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 275 | The directory within the :term:`Build Directory` in |
| 276 | which the OpenEmbedded build system places generated objects during a |
| 277 | recipe's build process. By default, this directory is the same as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 278 | :term:`S` directory, which is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 279 | |
| 280 | S = "${WORKDIR}/${BP}" |
| 281 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 282 | You can separate the (:term:`S`) directory and the directory pointed to |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 283 | by the :term:`B` variable. Most Autotools-based recipes support |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 284 | separating these directories. The build system defaults to using |
| 285 | separate directories for ``gcc`` and some kernel recipes. |
| 286 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 287 | :term:`BAD_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 288 | Lists "recommended-only" packages to not install. Recommended-only |
| 289 | packages are packages installed only through the |
| 290 | :term:`RRECOMMENDS` variable. You can prevent any |
| 291 | of these "recommended" packages from being installed by listing them |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 292 | with the :term:`BAD_RECOMMENDATIONS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 293 | |
| 294 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." |
| 295 | |
| 296 | You can set this variable globally in your ``local.conf`` file or you |
| 297 | can attach it to a specific image recipe by using the recipe name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 298 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 299 | |
| 300 | BAD_RECOMMENDATIONS_pn-target_image = "package_name" |
| 301 | |
| 302 | It is important to realize that if you choose to not install packages |
| 303 | using this variable and some other packages are dependent on them |
| 304 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 305 | variable), the OpenEmbedded build system ignores your request and |
| 306 | will install the packages to avoid dependency errors. |
| 307 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 308 | This variable is supported only when using the IPK and RPM |
| 309 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 310 | |
| 311 | See the :term:`NO_RECOMMENDATIONS` and the |
| 312 | :term:`PACKAGE_EXCLUDE` variables for related |
| 313 | information. |
| 314 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 315 | :term:`BASE_LIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 316 | The library directory name for the CPU or Application Binary |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 317 | Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 318 | 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] | 319 | section in the Yocto Project Development Tasks Manual for information |
| 320 | on Multilib. |
| 321 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 322 | 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] | 323 | the :term:`Source Directory`. If Multilib is not |
| 324 | being used, the value defaults to "lib". |
| 325 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 326 | :term:`BASE_WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 327 | Points to the base of the work directory for all recipes. The default |
| 328 | value is "${TMPDIR}/work". |
| 329 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 330 | :term:`BB_ALLOWED_NETWORKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 331 | Specifies a space-delimited list of hosts that the fetcher is allowed |
| 332 | to use to obtain the required source code. Following are |
| 333 | considerations surrounding this variable: |
| 334 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 335 | - 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] | 336 | or set to "0". |
| 337 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 338 | - There is limited support for wildcard matching against the beginning of |
| 339 | host names. For example, the following setting matches |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 340 | ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``. |
| 341 | :: |
| 342 | |
| 343 | BB_ALLOWED_NETWORKS = "*.gnu.org" |
| 344 | |
| 345 | .. note:: |
| 346 | |
| 347 | The use of the "``*``" character only works at the beginning of |
| 348 | a host name and it must be isolated from the remainder of the |
| 349 | host name. You cannot use the wildcard character in any other |
| 350 | location of the name or combined with the front part of the |
| 351 | name. |
| 352 | |
| 353 | For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` |
| 354 | is not. |
| 355 | |
| 356 | - Mirrors not in the host list are skipped and logged in debug. |
| 357 | |
| 358 | - Attempts to access networks not in the host list cause a failure. |
| 359 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 360 | Using :term:`BB_ALLOWED_NETWORKS` in conjunction with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 361 | :term:`PREMIRRORS` is very useful. Adding the host |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 362 | 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] | 363 | fetched from an allowed location and avoids raising an error when a |
| 364 | host that is not allowed is in a :term:`SRC_URI` |
| 365 | statement. This is because the fetcher does not attempt to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 366 | host listed in :term:`SRC_URI` after a successful fetch from the |
| 367 | :term:`PREMIRRORS` occurs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 368 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 369 | :term:`BB_DANGLINGAPPENDS_WARNONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 370 | Defines how BitBake handles situations where an append file |
| 371 | (``.bbappend``) has no corresponding recipe file (``.bb``). This |
| 372 | condition often occurs when layers get out of sync (e.g. ``oe-core`` |
| 373 | bumps a recipe version and the old recipe no longer exists and the |
| 374 | other layer has not been updated to the new version of the recipe |
| 375 | yet). |
| 376 | |
| 377 | The default fatal behavior is safest because it is the sane reaction |
| 378 | given something is out of sync. It is important to realize when your |
| 379 | changes are no longer being applied. |
| 380 | |
| 381 | You can change the default behavior by setting this variable to "1", |
| 382 | "yes", or "true" in your ``local.conf`` file, which is located in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 383 | :term:`Build Directory`: Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 384 | |
| 385 | BB_DANGLINGAPPENDS_WARNONLY = "1" |
| 386 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 387 | :term:`BB_DISKMON_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 388 | Monitors disk space and available inodes during the build and allows |
| 389 | you to control the build based on these parameters. |
| 390 | |
| 391 | Disk space monitoring is disabled by default. To enable monitoring, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 392 | 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] | 393 | found in the :term:`Build Directory`. Use the |
| 394 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 395 | |
| 396 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 397 | |
| 398 | BB_DISKMON_DIRS = "action,dir,threshold [...]" |
| 399 | |
| 400 | where: |
| 401 | |
| 402 | action is: |
| 403 | ABORT: Immediately abort the build when |
| 404 | a threshold is broken. |
| 405 | STOPTASKS: Stop the build after the currently |
| 406 | executing tasks have finished when |
| 407 | a threshold is broken. |
| 408 | WARN: Issue a warning but continue the |
| 409 | build when a threshold is broken. |
| 410 | Subsequent warnings are issued as |
| 411 | defined by the BB_DISKMON_WARNINTERVAL |
| 412 | variable, which must be defined in |
| 413 | the conf/local.conf file. |
| 414 | |
| 415 | dir is: |
| 416 | Any directory you choose. You can specify one or |
| 417 | more directories to monitor by separating the |
| 418 | groupings with a space. If two directories are |
| 419 | on the same device, only the first directory |
| 420 | is monitored. |
| 421 | |
| 422 | threshold is: |
| 423 | Either the minimum available disk space, |
| 424 | the minimum number of free inodes, or |
| 425 | both. You must specify at least one. To |
| 426 | omit one or the other, simply omit the value. |
| 427 | Specify the threshold using G, M, K for Gbytes, |
| 428 | Mbytes, and Kbytes, respectively. If you do |
| 429 | not specify G, M, or K, Kbytes is assumed by |
| 430 | default. Do not use GB, MB, or KB. |
| 431 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 432 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 433 | |
| 434 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
| 435 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
| 436 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" |
| 437 | |
| 438 | The first example works only if you also provide the |
| 439 | :term:`BB_DISKMON_WARNINTERVAL` |
| 440 | variable in the ``conf/local.conf``. This example causes the build |
| 441 | system to immediately abort when either the disk space in |
| 442 | ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops |
| 443 | below 100 Kbytes. Because two directories are provided with the |
| 444 | variable, the build system also issue a warning when the disk space |
| 445 | in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number |
| 446 | of free inodes drops below 100 Kbytes. Subsequent warnings are issued |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 447 | during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 448 | variable. |
| 449 | |
| 450 | The second example stops the build after all currently executing |
| 451 | tasks complete when the minimum disk space in the ``${TMPDIR}`` |
| 452 | directory drops below 1 Gbyte. No disk monitoring occurs for the free |
| 453 | inodes in this case. |
| 454 | |
| 455 | The final example immediately aborts the build when the number of |
| 456 | free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No |
| 457 | disk space monitoring for the directory itself occurs in this case. |
| 458 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 459 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 460 | Defines the disk space and free inode warning intervals. To set these |
| 461 | intervals, define the variable in your ``conf/local.conf`` file in |
| 462 | the :term:`Build Directory`. |
| 463 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 464 | 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] | 465 | must also use the :term:`BB_DISKMON_DIRS` |
| 466 | variable and define its action as "WARN". During the build, |
| 467 | subsequent warnings are issued each time disk space or number of free |
| 468 | inodes further reduces by the respective interval. |
| 469 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 470 | If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you |
| 471 | do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 472 | monitoring interval defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 473 | |
| 474 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 475 | |
| 476 | When specifying the variable in your configuration file, use the |
| 477 | following form: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 478 | |
| 479 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 480 | |
| 481 | BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" |
| 482 | |
| 483 | where: |
| 484 | |
| 485 | disk_space_interval is: |
| 486 | An interval of memory expressed in either |
| 487 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 488 | respectively. You cannot use GB, MB, or KB. |
| 489 | |
| 490 | disk_inode_interval is: |
| 491 | An interval of free inodes expressed in either |
| 492 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 493 | respectively. You cannot use GB, MB, or KB. |
| 494 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 495 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 496 | |
| 497 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
| 498 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 499 | |
| 500 | These variables cause the |
| 501 | OpenEmbedded build system to issue subsequent warnings each time the |
| 502 | available disk space further reduces by 50 Mbytes or the number of |
| 503 | free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` |
| 504 | directory. Subsequent warnings based on the interval occur each time |
| 505 | a respective interval is reached beyond the initial warning (i.e. 1 |
| 506 | Gbytes and 100 Kbytes). |
| 507 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 508 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 509 | Causes tarballs of the source control repositories (e.g. Git |
| 510 | repositories), including metadata, to be placed in the |
| 511 | :term:`DL_DIR` directory. |
| 512 | |
| 513 | For performance reasons, creating and placing tarballs of these |
| 514 | repositories is not the default action by the OpenEmbedded build |
| 515 | system. |
| 516 | :: |
| 517 | |
| 518 | BB_GENERATE_MIRROR_TARBALLS = "1" |
| 519 | |
| 520 | Set this variable in your |
| 521 | ``local.conf`` file in the :term:`Build Directory`. |
| 522 | |
| 523 | Once you have the tarballs containing your source files, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 524 | 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] | 525 | source control work directories. |
| 526 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 527 | :term:`BB_NUMBER_THREADS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 528 | The maximum number of tasks BitBake should run in parallel at any one |
| 529 | time. The OpenEmbedded build system automatically configures this |
| 530 | variable to be equal to the number of cores on the build system. For |
| 531 | example, a system with a dual core processor that also uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 532 | hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 533 | to "4". |
| 534 | |
| 535 | For single socket systems (i.e. one CPU), you should not have to |
| 536 | override this variable to gain optimal parallelism during builds. |
| 537 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 538 | 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] | 539 | is not set higher than "20". |
| 540 | |
| 541 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 542 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 543 | section in the Yocto Project Development Tasks Manual. |
| 544 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 545 | :term:`BB_SERVER_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 546 | Specifies the time (in seconds) after which to unload the BitBake |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 547 | server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 548 | long the BitBake server stays resident between invocations. |
| 549 | |
| 550 | For example, the following statement in your ``local.conf`` file |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 551 | instructs the server to be unloaded after 20 seconds of inactivity:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 552 | |
| 553 | BB_SERVER_TIMEOUT = "20" |
| 554 | |
| 555 | If you want the server to never be unloaded, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 556 | set :term:`BB_SERVER_TIMEOUT` to "-1". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 557 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 558 | :term:`BBCLASSEXTEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 559 | 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] | 560 | software. There are common variants for recipes as "natives" like |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 561 | ``quilt-native``, which is a copy of Quilt built to run on the build |
| 562 | system; "crosses" such as ``gcc-cross``, which is a compiler built to |
| 563 | run on the build machine but produces binaries that run on the target |
| 564 | :term:`MACHINE`; "nativesdk", which targets the SDK |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 565 | machine instead of :term:`MACHINE`; and "mulitlibs" in the form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 566 | "``multilib:``\ multilib_name". |
| 567 | |
| 568 | 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] | 569 | 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] | 570 | |
| 571 | BBCLASSEXTEND =+ "native nativesdk" |
| 572 | BBCLASSEXTEND =+ "multilib:multilib_name" |
| 573 | |
| 574 | .. note:: |
| 575 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 576 | Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 577 | variants by rewriting variable values and applying overrides such |
| 578 | as ``_class-native``. For example, to generate a native version of |
| 579 | a recipe, a :term:`DEPENDS` on "foo" is rewritten |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 580 | to a :term:`DEPENDS` on "foo-native". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 581 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 582 | Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 583 | Parsing once adds some limitations. For example, it is not |
| 584 | possible to include a different file depending on the variant, |
| 585 | since ``include`` statements are processed when the recipe is |
| 586 | parsed. |
| 587 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 588 | :term:`BBFILE_COLLECTIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 589 | Lists the names of configured layers. These names are used to find |
| 590 | the other ``BBFILE_*`` variables. Typically, each layer will append |
| 591 | its name to this variable in its ``conf/layer.conf`` file. |
| 592 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 593 | :term:`BBFILE_PATTERN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 594 | Variable that expands to match files from |
| 595 | :term:`BBFILES` in a particular layer. This variable |
| 596 | is used in the ``conf/layer.conf`` file and must be suffixed with the |
| 597 | name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``). |
| 598 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 599 | :term:`BBFILE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 600 | Assigns the priority for recipe files in each layer. |
| 601 | |
| 602 | This variable is useful in situations where the same recipe appears |
| 603 | in more than one layer. Setting this variable allows you to |
| 604 | prioritize a layer against other layers that contain the same recipe |
| 605 | - effectively letting you control the precedence for the multiple |
| 606 | layers. The precedence established through this variable stands |
| 607 | regardless of a recipe's version (:term:`PV` variable). For |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 608 | example, a layer that has a recipe with a higher :term:`PV` value but for |
| 609 | which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 610 | has a lower precedence. |
| 611 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 612 | A larger value for the :term:`BBFILE_PRIORITY` variable results in a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 613 | higher precedence. For example, the value 6 has a higher precedence |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 614 | than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable |
| 615 | is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 616 | for more information. The default priority, if unspecified for a |
| 617 | layer with no dependencies, is the lowest defined priority + 1 (or 1 |
| 618 | if no priorities are defined). |
| 619 | |
| 620 | .. tip:: |
| 621 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 622 | You can use the command ``bitbake-layers show-layers`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 623 | to list all configured layers along with their priorities. |
| 624 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 625 | :term:`BBFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 626 | A space-separated list of recipe files BitBake uses to build |
| 627 | software. |
| 628 | |
| 629 | When specifying recipe files, you can pattern match using Python's |
| 630 | `glob <https://docs.python.org/3/library/glob.html>`_ syntax. |
| 631 | For details on the syntax, see the documentation by following the |
| 632 | previous link. |
| 633 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 634 | :term:`BBFILES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 635 | Activates content when identified layers are present. You identify |
| 636 | the layers by the collections that the layers define. |
| 637 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 638 | Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 639 | whose corresponding ``.bb`` file is in a layer that attempts to |
| 640 | modify other layers through ``.bbappend`` but does not want to |
| 641 | introduce a hard dependency on those other layers. |
| 642 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 643 | Use the following form for :term:`BBFILES_DYNAMIC`: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 644 | collection_name:filename_pattern The following example identifies two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 645 | collection names and two filename patterns:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 646 | |
| 647 | BBFILES_DYNAMIC += " \ |
| 648 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
| 649 | core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ |
| 650 | " |
| 651 | |
| 652 | This next example shows an error message that occurs because invalid |
| 653 | entries are found, which cause parsing to abort: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 654 | |
| 655 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 656 | |
| 657 | ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: |
| 658 | /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend |
| 659 | /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend |
| 660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 661 | :term:`BBINCLUDELOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 662 | Variable that controls how BitBake displays logs on build failure. |
| 663 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 664 | :term:`BBINCLUDELOGS_LINES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 665 | If :term:`BBINCLUDELOGS` is set, specifies the |
| 666 | maximum number of lines from the task log file to print when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 667 | reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 668 | the entire log is printed. |
| 669 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 670 | :term:`BBLAYERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 671 | Lists the layers to enable during the build. This variable is defined |
| 672 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 673 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 674 | |
| 675 | BBLAYERS = " \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 676 | /home/scottrif/poky/meta \ |
| 677 | /home/scottrif/poky/meta-poky \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 678 | /home/scottrif/poky/meta-yocto-bsp \ |
| 679 | /home/scottrif/poky/meta-mykernel \ |
| 680 | " |
| 681 | |
| 682 | This example enables four layers, one of which is a custom, |
| 683 | user-defined layer named ``meta-mykernel``. |
| 684 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 685 | :term:`BBMASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 686 | Prevents BitBake from processing recipes and recipe append files. |
| 687 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 688 | You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 689 | ``.bbappend`` files. BitBake ignores any recipe or recipe append |
| 690 | files that match any of the expressions. It is as if BitBake does not |
| 691 | see them at all. Consequently, matching files are not parsed or |
| 692 | otherwise used by BitBake. |
| 693 | |
| 694 | The values you provide are passed to Python's regular expression |
| 695 | compiler. Consequently, the syntax follows Python's Regular |
| 696 | Expression (re) syntax. The expressions are compared against the full |
| 697 | paths to the files. For complete syntax information, see Python's |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 698 | 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] | 699 | |
| 700 | The following example uses a complete regular expression to tell |
| 701 | BitBake to ignore all recipe and recipe append files in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 702 | ``meta-ti/recipes-misc/`` directory:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 703 | |
| 704 | BBMASK = "meta-ti/recipes-misc/" |
| 705 | |
| 706 | If you want to mask out multiple directories or recipes, you can |
| 707 | specify multiple regular expression fragments. This next example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 708 | masks out multiple directories and individual recipes:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 709 | |
| 710 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
| 711 | BBMASK += "/meta-oe/recipes-support/" |
| 712 | BBMASK += "/meta-foo/.*/openldap" |
| 713 | BBMASK += "opencv.*\.bbappend" |
| 714 | BBMASK += "lzma" |
| 715 | |
| 716 | .. note:: |
| 717 | |
| 718 | When specifying a directory name, use the trailing slash character |
| 719 | to ensure you match just that directory name. |
| 720 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 721 | :term:`BBMULTICONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 722 | Specifies each additional separate configuration when you are |
| 723 | building targets with multiple configurations. Use this variable in |
| 724 | your ``conf/local.conf`` configuration file. Specify a |
| 725 | multiconfigname for each configuration file you are using. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 726 | example, the following line specifies three configuration files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 727 | |
| 728 | BBMULTICONFIG = "configA configB configC" |
| 729 | |
| 730 | Each configuration file you |
| 731 | use must reside in the :term:`Build Directory` |
| 732 | ``conf/multiconfig`` directory (e.g. |
| 733 | build_directory\ ``/conf/multiconfig/configA.conf``). |
| 734 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 735 | For information on how to use :term:`BBMULTICONFIG` in an environment |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 736 | that supports building targets with multiple configurations, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 737 | ":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] | 738 | section in the Yocto Project Development Tasks Manual. |
| 739 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 740 | :term:`BBPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 741 | Used by BitBake to locate ``.bbclass`` and configuration files. This |
| 742 | variable is analogous to the ``PATH`` variable. |
| 743 | |
| 744 | .. note:: |
| 745 | |
| 746 | If you run BitBake from a directory outside of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 747 | :term:`Build Directory`, you must be sure to set :term:`BBPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 748 | 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] | 749 | environment variable and then run BitBake:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 750 | |
| 751 | $ BBPATH = "build_directory" |
| 752 | $ export BBPATH |
| 753 | $ bitbake target |
| 754 | |
| 755 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 756 | :term:`BBSERVER` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 757 | If defined in the BitBake environment, :term:`BBSERVER` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 758 | BitBake remote server. |
| 759 | |
| 760 | Use the following format to export the variable to the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 761 | environment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 762 | |
| 763 | export BBSERVER=localhost:$port |
| 764 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 765 | By default, :term:`BBSERVER` also appears in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 766 | :term:`bitbake:BB_HASHBASE_WHITELIST`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 767 | Consequently, :term:`BBSERVER` is excluded from checksum and dependency |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 768 | data. |
| 769 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 770 | :term:`BINCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 771 | When inheriting the |
| 772 | :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class, |
| 773 | this variable specifies binary configuration scripts to disable in |
| 774 | favor of using ``pkg-config`` to query the information. The |
| 775 | ``binconfig-disabled`` class will modify the specified scripts to |
| 776 | return an error so that calls to them can be easily found and |
| 777 | replaced. |
| 778 | |
| 779 | To add multiple scripts, separate them by spaces. Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 780 | from the ``libpng`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 781 | |
| 782 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
| 783 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 784 | :term:`BINCONFIG_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 785 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 786 | this variable specifies a wildcard for configuration scripts that |
| 787 | need editing. The scripts are edited to correct any paths that have |
| 788 | been set up during compilation so that they are correct for use when |
| 789 | installed into the sysroot and called by the build processes of other |
| 790 | recipes. |
| 791 | |
| 792 | .. note:: |
| 793 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 794 | The :term:`BINCONFIG_GLOB` variable uses |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 795 | `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, |
| 796 | which is recognition and expansion of wildcards during pattern |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 797 | matching. Shell globbing is very similar to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 798 | `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ |
| 799 | and `glob <https://docs.python.org/3/library/glob.html>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 800 | |
| 801 | For more information on how this variable works, see |
| 802 | ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`. |
| 803 | You can also find general |
| 804 | information on the class in the |
| 805 | ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section. |
| 806 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 807 | :term:`BP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 808 | The base recipe name and version but without any special recipe name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 809 | suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 810 | comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 811 | |
| 812 | ${BPN}-${PV} |
| 813 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 814 | :term:`BPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 815 | This variable is a version of the :term:`PN` variable with |
| 816 | common prefixes and suffixes removed, such as ``nativesdk-``, |
| 817 | ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. |
| 818 | The exact lists of prefixes and suffixes removed are specified by the |
| 819 | :term:`MLPREFIX` and |
| 820 | :term:`SPECIAL_PKGSUFFIX` variables, |
| 821 | respectively. |
| 822 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 823 | :term:`BUGTRACKER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 824 | Specifies a URL for an upstream bug tracking website for a recipe. |
| 825 | The OpenEmbedded build system does not use this variable. Rather, the |
| 826 | variable is a useful pointer in case a bug in the software being |
| 827 | built needs to be manually reported. |
| 828 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 829 | :term:`BUILD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 830 | Specifies the architecture of the build host (e.g. ``i686``). The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 831 | OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 832 | machine name reported by the ``uname`` command. |
| 833 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 834 | :term:`BUILD_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 835 | Specifies the architecture-specific assembler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 836 | host. By default, the value of :term:`BUILD_AS_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 837 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 838 | :term:`BUILD_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 839 | Specifies the architecture-specific C compiler flags for the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 840 | host. By default, the value of :term:`BUILD_CC_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 841 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 842 | :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 843 | 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] | 844 | compiler is being used as the linker. By default, :term:`BUILD_CCLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 845 | points to GCC and passes as arguments the value of |
| 846 | :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 847 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 848 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 849 | :term:`BUILD_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 850 | Specifies the flags to pass to the C compiler when building for the |
| 851 | build host. When building in the ``-native`` context, |
| 852 | :term:`CFLAGS` is set to the value of this variable by |
| 853 | default. |
| 854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 855 | :term:`BUILD_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 856 | Specifies the flags to pass to the C preprocessor (i.e. to both the C |
| 857 | and the C++ compilers) when building for the build host. When |
| 858 | building in the ``-native`` context, :term:`CPPFLAGS` |
| 859 | is set to the value of this variable by default. |
| 860 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 861 | :term:`BUILD_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 862 | Specifies the flags to pass to the C++ compiler when building for the |
| 863 | build host. When building in the ``-native`` context, |
| 864 | :term:`CXXFLAGS` is set to the value of this variable |
| 865 | by default. |
| 866 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 867 | :term:`BUILD_FC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 868 | Specifies the Fortran compiler command for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 869 | default, :term:`BUILD_FC` points to Gfortran and passes as arguments the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 870 | value of :term:`BUILD_CC_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 871 | :term:`BUILD_CC_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 872 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 873 | :term:`BUILD_LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 874 | Specifies the linker command for the build host. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 875 | :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] | 876 | the value of :term:`BUILD_LD_ARCH`, assuming |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 877 | :term:`BUILD_LD_ARCH` is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 878 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 879 | :term:`BUILD_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 880 | Specifies architecture-specific linker flags for the build host. By |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 881 | default, the value of :term:`BUILD_LD_ARCH` is empty. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 882 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 883 | :term:`BUILD_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 884 | Specifies the flags to pass to the linker when building for the build |
| 885 | host. When building in the ``-native`` context, |
| 886 | :term:`LDFLAGS` is set to the value of this variable |
| 887 | by default. |
| 888 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 889 | :term:`BUILD_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 890 | Specifies the optimization flags passed to the C compiler when |
| 891 | building for the build host or the SDK. The flags are passed through |
| 892 | the :term:`BUILD_CFLAGS` and |
| 893 | :term:`BUILDSDK_CFLAGS` default values. |
| 894 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 895 | The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 896 | -pipe". |
| 897 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 898 | :term:`BUILD_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 899 | Specifies the operating system in use on the build host (e.g. |
| 900 | "linux"). The OpenEmbedded build system sets the value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 901 | :term:`BUILD_OS` from the OS reported by the ``uname`` command - the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 902 | first word, converted to lower-case characters. |
| 903 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 904 | :term:`BUILD_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 905 | The toolchain binary prefix used for native recipes. The OpenEmbedded |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 906 | build system uses the :term:`BUILD_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 907 | :term:`TARGET_PREFIX` when building for |
| 908 | ``native`` recipes. |
| 909 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 910 | :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 911 | Specifies the command to be used to strip debugging symbols from |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 912 | binaries produced for the build host. By default, :term:`BUILD_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 913 | points to |
| 914 | ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. |
| 915 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 916 | :term:`BUILD_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 917 | Specifies the system, including the architecture and the operating |
| 918 | system, to use when building for the build host (i.e. when building |
| 919 | ``native`` recipes). |
| 920 | |
| 921 | The OpenEmbedded build system automatically sets this variable based |
| 922 | on :term:`BUILD_ARCH`, |
| 923 | :term:`BUILD_VENDOR`, and |
| 924 | :term:`BUILD_OS`. You do not need to set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 925 | :term:`BUILD_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 926 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 927 | :term:`BUILD_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 928 | Specifies the vendor name to use when building for the build host. |
| 929 | The default value is an empty string (""). |
| 930 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 931 | :term:`BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 932 | Points to the location of the :term:`Build Directory`. |
| 933 | You can define this directory indirectly through the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 934 | :ref:`structure-core-script` script by passing in a Build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 935 | 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] | 936 | not provide a Build Directory path, the :term:`BUILDDIR` defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 937 | ``build`` in the current directory. |
| 938 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 939 | :term:`BUILDHISTORY_COMMIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 940 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 941 | class, this variable specifies whether or not to commit the build |
| 942 | history output in a local Git repository. If set to "1", this local |
| 943 | repository will be maintained automatically by the ``buildhistory`` |
| 944 | class and a commit will be created on every build for changes to each |
| 945 | top-level subdirectory of the build history output (images, packages, |
| 946 | and sdk). If you want to track changes to build history over time, |
| 947 | you should set this value to "1". |
| 948 | |
| 949 | By default, the ``buildhistory`` class does not commit the build |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 950 | history output in a local Git repository:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 951 | |
| 952 | BUILDHISTORY_COMMIT ?= "0" |
| 953 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 954 | :term:`BUILDHISTORY_COMMIT_AUTHOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 955 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 956 | class, this variable specifies the author to use for each Git commit. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 957 | In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 958 | :term:`BUILDHISTORY_COMMIT` variable must |
| 959 | be set to "1". |
| 960 | |
| 961 | Git requires that the value you provide for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 962 | :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 963 | email@host". Providing an email address or host that is not valid |
| 964 | does not produce an error. |
| 965 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 966 | By default, the ``buildhistory`` class sets the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 967 | |
| 968 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
| 969 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 970 | :term:`BUILDHISTORY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 971 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 972 | class, this variable specifies the directory in which build history |
| 973 | information is kept. For more information on how the variable works, |
| 974 | see the ``buildhistory.class``. |
| 975 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 976 | By default, the ``buildhistory`` class sets the directory as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 977 | |
| 978 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" |
| 979 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 980 | :term:`BUILDHISTORY_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 981 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 982 | class, this variable specifies the build history features to be |
| 983 | enabled. For more information on how build history works, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 984 | ":ref:`dev-manual/common-tasks:maintaining build output quality`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 985 | section in the Yocto Project Development Tasks Manual. |
| 986 | |
| 987 | You can specify these features in the form of a space-separated list: |
| 988 | |
| 989 | - *image:* Analysis of the contents of images, which includes the |
| 990 | list of installed packages among other things. |
| 991 | |
| 992 | - *package:* Analysis of the contents of individual packages. |
| 993 | |
| 994 | - *sdk:* Analysis of the contents of the software development kit |
| 995 | (SDK). |
| 996 | |
| 997 | - *task:* Save output file signatures for |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 998 | :ref:`shared state <overview-manual/concepts:shared state cache>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 999 | (sstate) tasks. |
| 1000 | This saves one file per task and lists the SHA-256 checksums for |
| 1001 | each file staged (i.e. the output of the task). |
| 1002 | |
| 1003 | By default, the ``buildhistory`` class enables the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1004 | features:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1005 | |
| 1006 | BUILDHISTORY_FEATURES ?= "image package sdk" |
| 1007 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1008 | :term:`BUILDHISTORY_IMAGE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1009 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1010 | class, this variable specifies a list of paths to files copied from |
| 1011 | the image contents into the build history directory under an |
| 1012 | "image-files" directory in the directory for the image, so that you |
| 1013 | can track the contents of each file. The default is to copy |
| 1014 | ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for |
| 1015 | changes in user and group entries. You can modify the list to include |
| 1016 | any file. Specifying an invalid path does not produce an error. |
| 1017 | Consequently, you can include files that might not always be present. |
| 1018 | |
| 1019 | By default, the ``buildhistory`` class provides paths to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1020 | following files:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1021 | |
| 1022 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" |
| 1023 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1024 | :term:`BUILDHISTORY_PATH_PREFIX_STRIP` |
| 1025 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1026 | class, this variable specifies a common path prefix that should be |
| 1027 | stripped off the beginning of paths in the task signature list when the |
| 1028 | ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be |
| 1029 | useful when build history is populated from multiple sources that may not |
| 1030 | all use the same top level directory. |
| 1031 | |
| 1032 | By default, the ``buildhistory`` class sets the variable as follows:: |
| 1033 | |
| 1034 | BUILDHISTORY_PATH_PREFIX_STRIP ?= "" |
| 1035 | |
| 1036 | In this case, no prefixes will be stripped. |
| 1037 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1038 | :term:`BUILDHISTORY_PUSH_REPO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1039 | When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` |
| 1040 | class, this variable optionally specifies a remote repository to |
| 1041 | which build history pushes Git changes. In order for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1042 | :term:`BUILDHISTORY_PUSH_REPO` to work, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1043 | :term:`BUILDHISTORY_COMMIT` must be set to |
| 1044 | "1". |
| 1045 | |
| 1046 | The repository should correspond to a remote address that specifies a |
| 1047 | repository as understood by Git, or alternatively to a remote name |
| 1048 | that you have set up manually using ``git remote`` within the local |
| 1049 | repository. |
| 1050 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1051 | By default, the ``buildhistory`` class sets the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1052 | |
| 1053 | BUILDHISTORY_PUSH_REPO ?= "" |
| 1054 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1055 | :term:`BUILDSDK_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1056 | Specifies the flags to pass to the C compiler when building for the |
| 1057 | SDK. When building in the ``nativesdk-`` context, |
| 1058 | :term:`CFLAGS` is set to the value of this variable by |
| 1059 | default. |
| 1060 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1061 | :term:`BUILDSDK_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1062 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1063 | C and the C++ compilers) when building for the SDK. When building in |
| 1064 | the ``nativesdk-`` context, :term:`CPPFLAGS` is set |
| 1065 | to the value of this variable by default. |
| 1066 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1067 | :term:`BUILDSDK_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1068 | Specifies the flags to pass to the C++ compiler when building for the |
| 1069 | SDK. When building in the ``nativesdk-`` context, |
| 1070 | :term:`CXXFLAGS` is set to the value of this variable |
| 1071 | by default. |
| 1072 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1073 | :term:`BUILDSDK_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1074 | Specifies the flags to pass to the linker when building for the SDK. |
| 1075 | When building in the ``nativesdk-`` context, |
| 1076 | :term:`LDFLAGS` is set to the value of this variable |
| 1077 | by default. |
| 1078 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1079 | :term:`BUILDSTATS_BASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1080 | Points to the location of the directory that holds build statistics |
| 1081 | when you use and enable the |
| 1082 | :ref:`buildstats <ref-classes-buildstats>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1083 | :term:`BUILDSTATS_BASE` directory defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1084 | ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. |
| 1085 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1086 | :term:`BUSYBOX_SPLIT_SUID` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1087 | For the BusyBox recipe, specifies whether to split the output |
| 1088 | executable file into two parts: one for features that require |
| 1089 | ``setuid root``, and one for the remaining features (i.e. those that |
| 1090 | do not require ``setuid root``). |
| 1091 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1092 | The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1093 | splitting the output executable file. Set the variable to "0" to get |
| 1094 | a single output executable file. |
| 1095 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1096 | :term:`CACHE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1097 | Specifies the directory BitBake uses to store a cache of the |
| 1098 | :term:`Metadata` so it does not need to be parsed every time |
| 1099 | BitBake is started. |
| 1100 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1101 | :term:`CC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1102 | The minimal command and arguments used to run the C compiler. |
| 1103 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1104 | :term:`CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1105 | Specifies the flags to pass to the C compiler. This variable is |
| 1106 | exported to an environment variable and thus made visible to the |
| 1107 | software being built during the compilation step. |
| 1108 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1109 | Default initialization for :term:`CFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1110 | being built: |
| 1111 | |
| 1112 | - :term:`TARGET_CFLAGS` when building for the |
| 1113 | target |
| 1114 | |
| 1115 | - :term:`BUILD_CFLAGS` when building for the |
| 1116 | build host (i.e. ``-native``) |
| 1117 | |
| 1118 | - :term:`BUILDSDK_CFLAGS` when building for |
| 1119 | an SDK (i.e. ``nativesdk-``) |
| 1120 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1121 | :term:`CLASSOVERRIDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1122 | An internal variable specifying the special class override that |
| 1123 | should currently apply (e.g. "class-target", "class-native", and so |
| 1124 | forth). The classes that use this variable (e.g. |
| 1125 | :ref:`native <ref-classes-native>`, |
| 1126 | :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the |
| 1127 | variable to appropriate values. |
| 1128 | |
| 1129 | .. note:: |
| 1130 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1131 | :term:`CLASSOVERRIDE` gets its default "class-target" value from the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1132 | ``bitbake.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1133 | |
| 1134 | As an example, the following override allows you to install extra |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1135 | files, but only when building for the target:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1136 | |
| 1137 | do_install_append_class-target() { |
| 1138 | install my-extra-file ${D}${sysconfdir} |
| 1139 | } |
| 1140 | |
| 1141 | Here is an example where ``FOO`` is set to |
| 1142 | "native" when building for the build host, and to "other" when not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1143 | building for the build host:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1144 | |
| 1145 | FOO_class-native = "native" |
| 1146 | FOO = "other" |
| 1147 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1148 | The underlying mechanism behind :term:`CLASSOVERRIDE` is simply |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1149 | that it is included in the default value of |
| 1150 | :term:`OVERRIDES`. |
| 1151 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1152 | :term:`CLEANBROKEN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1153 | If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1154 | ``make clean`` command does not work for the software being built. |
| 1155 | Consequently, the OpenEmbedded build system will not try to run |
| 1156 | ``make clean`` during the :ref:`ref-tasks-configure` |
| 1157 | task, which is the default behavior. |
| 1158 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1159 | :term:`COMBINED_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1160 | Provides a list of hardware features that are enabled in both |
| 1161 | :term:`MACHINE_FEATURES` and |
| 1162 | :term:`DISTRO_FEATURES`. This select list of |
| 1163 | features contains features that make sense to be controlled both at |
| 1164 | the machine and distribution configuration level. For example, the |
| 1165 | "bluetooth" feature requires hardware support but should also be |
| 1166 | optional at the distribution level, in case the hardware supports |
| 1167 | Bluetooth but you do not ever intend to use it. |
| 1168 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1169 | :term:`COMMON_LICENSE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1170 | Points to ``meta/files/common-licenses`` in the |
| 1171 | :term:`Source Directory`, which is where generic license |
| 1172 | files reside. |
| 1173 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1174 | :term:`COMPATIBLE_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1175 | A regular expression that resolves to one or more hosts (when the |
| 1176 | recipe is native) or one or more targets (when the recipe is |
| 1177 | non-native) with which a recipe is compatible. The regular expression |
| 1178 | is matched against :term:`HOST_SYS`. You can use the |
| 1179 | variable to stop recipes from being built for classes of systems with |
| 1180 | which the recipes are not compatible. Stopping these builds is |
| 1181 | particularly useful with kernels. The variable also helps to increase |
| 1182 | parsing speed since the build system skips parsing recipes not |
| 1183 | compatible with the current system. |
| 1184 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1185 | :term:`COMPATIBLE_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1186 | A regular expression that resolves to one or more target machines |
| 1187 | with which a recipe is compatible. The regular expression is matched |
| 1188 | against :term:`MACHINEOVERRIDES`. You can use |
| 1189 | the variable to stop recipes from being built for machines with which |
| 1190 | the recipes are not compatible. Stopping these builds is particularly |
| 1191 | useful with kernels. The variable also helps to increase parsing |
| 1192 | speed since the build system skips parsing recipes not compatible |
| 1193 | with the current machine. |
| 1194 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1195 | :term:`COMPLEMENTARY_GLOB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1196 | Defines wildcards to match when installing a list of complementary |
| 1197 | packages for all the packages explicitly (or implicitly) installed in |
| 1198 | an image. |
| 1199 | |
| 1200 | .. note:: |
| 1201 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1202 | The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1203 | (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), |
| 1204 | which is similar to the Unix style pathname pattern expansion |
| 1205 | (`glob <https://docs.python.org/3/library/glob.html>`__). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1206 | |
| 1207 | The resulting list of complementary packages is associated with an |
| 1208 | item that can be added to |
| 1209 | :term:`IMAGE_FEATURES`. An example usage of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1210 | 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] | 1211 | will install -dev packages (containing headers and other development |
| 1212 | files) for every package in the image. |
| 1213 | |
| 1214 | To add a new feature item pointing to a wildcard, use a variable flag |
| 1215 | 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] | 1216 | wildcard. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1217 | |
| 1218 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' |
| 1219 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1220 | :term:`COMPONENTS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1221 | Stores sysroot components for each recipe. The OpenEmbedded build |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1222 | system uses :term:`COMPONENTS_DIR` when constructing recipe-specific |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1223 | sysroots for other recipes. |
| 1224 | |
| 1225 | The default is |
| 1226 | "``${``\ :term:`STAGING_DIR`\ ``}-components``." |
| 1227 | (i.e. |
| 1228 | "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). |
| 1229 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1230 | :term:`CONF_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1231 | Tracks the version of the local configuration file (i.e. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1232 | ``local.conf``). The value for :term:`CONF_VERSION` increments each time |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1233 | ``build/conf/`` compatibility changes. |
| 1234 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1235 | :term:`CONFFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1236 | Identifies editable or configurable files that are part of a package. |
| 1237 | If the Package Management System (PMS) is being used to update |
| 1238 | packages on the target system, it is possible that configuration |
| 1239 | files you have changed after the original installation and that you |
| 1240 | now want to remain unchanged are overwritten. In other words, |
| 1241 | 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] | 1242 | 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] | 1243 | variable to list the files in the package that you wish to prevent |
| 1244 | the PMS from overwriting during this update process. |
| 1245 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1246 | To use the :term:`CONFFILES` variable, provide a package name override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1247 | that identifies the resulting package. Then, provide a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1248 | space-separated list of files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1249 | |
| 1250 | CONFFILES_${PN} += "${sysconfdir}/file1 \ |
| 1251 | ${sysconfdir}/file2 ${sysconfdir}/file3" |
| 1252 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1253 | There is a relationship between the :term:`CONFFILES` and :term:`FILES` |
| 1254 | variables. The files listed within :term:`CONFFILES` must be a subset of |
| 1255 | the files listed within :term:`FILES`. Because the configuration files |
| 1256 | you provide with :term:`CONFFILES` are simply being identified so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1257 | 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] | 1258 | already be included as part of the package through the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1259 | variable. |
| 1260 | |
| 1261 | .. note:: |
| 1262 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1263 | When specifying paths as part of the :term:`CONFFILES` variable, it is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1264 | good practice to use appropriate path variables. |
| 1265 | For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` |
| 1266 | rather than ``/usr/bin``. You can find a list of these variables at |
| 1267 | the top of the ``meta/conf/bitbake.conf`` file in the |
| 1268 | :term:`Source Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1269 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1270 | :term:`CONFIG_INITRAMFS_SOURCE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1271 | Identifies the initial RAM filesystem (initramfs) source files. The |
| 1272 | OpenEmbedded build system receives and uses this kernel Kconfig |
| 1273 | variable as an environment variable. By default, the variable is set |
| 1274 | to null (""). |
| 1275 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1276 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1277 | with a ``.cpio`` suffix or a space-separated list of directories and |
| 1278 | files for building the initramfs image. A cpio archive should contain |
| 1279 | a filesystem archive to be used as an initramfs image. Directories |
| 1280 | should contain a filesystem layout to be included in the initramfs |
| 1281 | image. Files should contain entries according to the format described |
| 1282 | by the ``usr/gen_init_cpio`` program in the kernel tree. |
| 1283 | |
| 1284 | If you specify multiple directories and files, the initramfs image |
| 1285 | will be the aggregate of all of them. |
| 1286 | |
| 1287 | For information on creating an initramfs, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1288 | ":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] | 1289 | in the Yocto Project Development Tasks Manual. |
| 1290 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1291 | :term:`CONFIG_SITE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1292 | A list of files that contains ``autoconf`` test results relevant to |
| 1293 | the current build. This variable is used by the Autotools utilities |
| 1294 | when running ``configure``. |
| 1295 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1296 | :term:`CONFIGURE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1297 | The minimal arguments for GNU configure. |
| 1298 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1299 | :term:`CONFLICT_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1300 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1301 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1302 | class, this variable identifies distribution features that would be |
| 1303 | in conflict should the recipe be built. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1304 | :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also |
| 1305 | appears in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1306 | the recipe will be skipped, and if the build system attempts to build |
| 1307 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1308 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1309 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1310 | A space-separated list of licenses to exclude from the source |
| 1311 | archived by the :ref:`archiver <ref-classes-archiver>` class. In |
| 1312 | other words, if a license in a recipe's |
| 1313 | :term:`LICENSE` value is in the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1314 | :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1315 | class. |
| 1316 | |
| 1317 | .. note:: |
| 1318 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1319 | The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1320 | :term:`COPYLEFT_LICENSE_INCLUDE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1321 | |
| 1322 | The default value, which is "CLOSED Proprietary", for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1323 | :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1324 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
| 1325 | is inherited by the ``archiver`` class. |
| 1326 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1327 | :term:`COPYLEFT_LICENSE_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1328 | A space-separated list of licenses to include in the source archived |
| 1329 | by the :ref:`archiver <ref-classes-archiver>` class. In other |
| 1330 | words, if a license in a recipe's :term:`LICENSE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1331 | value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1332 | source is archived by the class. |
| 1333 | |
| 1334 | The default value is set by the |
| 1335 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
| 1336 | is inherited by the ``archiver`` class. The default value includes |
| 1337 | "GPL*", "LGPL*", and "AGPL*". |
| 1338 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1339 | :term:`COPYLEFT_PN_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1340 | A list of recipes to exclude in the source archived by the |
| 1341 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1342 | :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1343 | exclusion caused through the |
| 1344 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1345 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1346 | variables, respectively. |
| 1347 | |
| 1348 | The default value, which is "" indicating to not explicitly exclude |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1349 | 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] | 1350 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
| 1351 | is inherited by the ``archiver`` class. |
| 1352 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1353 | :term:`COPYLEFT_PN_INCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1354 | A list of recipes to include in the source archived by the |
| 1355 | :ref:`archiver <ref-classes-archiver>` class. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1356 | :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1357 | exclusion caused through the |
| 1358 | :term:`COPYLEFT_LICENSE_INCLUDE` and |
| 1359 | :term:`COPYLEFT_LICENSE_EXCLUDE` |
| 1360 | variables, respectively. |
| 1361 | |
| 1362 | The default value, which is "" indicating to not explicitly include |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1363 | 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] | 1364 | :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which |
| 1365 | is inherited by the ``archiver`` class. |
| 1366 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1367 | :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1368 | A space-separated list of recipe types to include in the source |
| 1369 | archived by the :ref:`archiver <ref-classes-archiver>` class. |
| 1370 | Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``, |
| 1371 | ``crosssdk``, and ``cross-canadian``. |
| 1372 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1373 | The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1374 | is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>` |
| 1375 | class, which is inherited by the ``archiver`` class. |
| 1376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1377 | :term:`COPY_LIC_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1378 | If set to "1" along with the |
| 1379 | :term:`COPY_LIC_MANIFEST` variable, the |
| 1380 | OpenEmbedded build system copies into the image the license files, |
| 1381 | which are located in ``/usr/share/common-licenses``, for each |
| 1382 | package. The license files are placed in directories within the image |
| 1383 | itself during build time. |
| 1384 | |
| 1385 | .. note:: |
| 1386 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1387 | The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1388 | newly installed packages to an image, which might be most suitable for |
| 1389 | read-only filesystems that cannot be upgraded. See the |
| 1390 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1391 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1392 | section in the Yocto Project Development Tasks Manual for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1393 | information on providing license text. |
| 1394 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1395 | :term:`COPY_LIC_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1396 | If set to "1", the OpenEmbedded build system copies the license |
| 1397 | manifest for the image to |
| 1398 | ``/usr/share/common-licenses/license.manifest`` within the image |
| 1399 | itself during build time. |
| 1400 | |
| 1401 | .. note:: |
| 1402 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1403 | The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1404 | newly installed packages to an image, which might be most suitable for |
| 1405 | read-only filesystems that cannot be upgraded. See the |
| 1406 | :term:`LICENSE_CREATE_PACKAGE` variable for additional information. |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1407 | You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1408 | section in the Yocto Project Development Tasks Manual for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1409 | information on providing license text. |
| 1410 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1411 | :term:`CORE_IMAGE_EXTRA_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1412 | Specifies the list of packages to be added to the image. You should |
| 1413 | only set this variable in the ``local.conf`` configuration file found |
| 1414 | in the :term:`Build Directory`. |
| 1415 | |
| 1416 | This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer |
| 1417 | supported. |
| 1418 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1419 | :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1420 | Specifies the parent directory of the OpenEmbedded-Core Metadata |
| 1421 | layer (i.e. ``meta``). |
| 1422 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1423 | It is an important distinction that :term:`COREBASE` points to the parent |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1424 | of this layer and not the layer itself. Consider an example where you |
| 1425 | have cloned the Poky Git repository and retained the ``poky`` name |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1426 | for your local copy of the repository. In this case, :term:`COREBASE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1427 | points to the ``poky`` folder because it is the parent directory of |
| 1428 | the ``poky/meta`` layer. |
| 1429 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1430 | :term:`COREBASE_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1431 | Lists files from the :term:`COREBASE` directory that |
| 1432 | should be copied other than the layers listed in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1433 | ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1434 | to copy metadata from the OpenEmbedded build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1435 | into the extensible SDK. |
| 1436 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1437 | Explicitly listing files in :term:`COREBASE` is needed because it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1438 | typically contains build directories and other files that should not |
| 1439 | normally be copied into the extensible SDK. Consequently, the value |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1440 | 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] | 1441 | are actually needed. |
| 1442 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1443 | :term:`CPP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1444 | The minimal command and arguments used to run the C preprocessor. |
| 1445 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1446 | :term:`CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1447 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 1448 | C and the C++ compilers). This variable is exported to an environment |
| 1449 | variable and thus made visible to the software being built during the |
| 1450 | compilation step. |
| 1451 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1452 | Default initialization for :term:`CPPFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1453 | being built: |
| 1454 | |
| 1455 | - :term:`TARGET_CPPFLAGS` when building for |
| 1456 | the target |
| 1457 | |
| 1458 | - :term:`BUILD_CPPFLAGS` when building for the |
| 1459 | build host (i.e. ``-native``) |
| 1460 | |
| 1461 | - :term:`BUILDSDK_CPPFLAGS` when building |
| 1462 | for an SDK (i.e. ``nativesdk-``) |
| 1463 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1464 | :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1465 | The toolchain binary prefix for the target tools. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1466 | :term:`CROSS_COMPILE` variable is the same as the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1467 | :term:`TARGET_PREFIX` variable. |
| 1468 | |
| 1469 | .. note:: |
| 1470 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1471 | The OpenEmbedded build system sets the :term:`CROSS_COMPILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1472 | variable only in certain contexts (e.g. when building for kernel |
| 1473 | and kernel module recipes). |
| 1474 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1475 | :term:`CVSDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1476 | The directory in which files checked out under the CVS system are |
| 1477 | stored. |
| 1478 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1479 | :term:`CXX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1480 | The minimal command and arguments used to run the C++ compiler. |
| 1481 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1482 | :term:`CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1483 | Specifies the flags to pass to the C++ compiler. This variable is |
| 1484 | exported to an environment variable and thus made visible to the |
| 1485 | software being built during the compilation step. |
| 1486 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1487 | Default initialization for :term:`CXXFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1488 | being built: |
| 1489 | |
| 1490 | - :term:`TARGET_CXXFLAGS` when building for |
| 1491 | the target |
| 1492 | |
| 1493 | - :term:`BUILD_CXXFLAGS` when building for the |
| 1494 | build host (i.e. ``-native``) |
| 1495 | |
| 1496 | - :term:`BUILDSDK_CXXFLAGS` when building |
| 1497 | for an SDK (i.e. ``nativesdk-``) |
| 1498 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1499 | :term:`D` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1500 | The destination directory. The location in the :term:`Build Directory` |
| 1501 | where components are installed by the |
| 1502 | :ref:`ref-tasks-install` task. This location defaults |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1503 | to:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1504 | |
| 1505 | ${WORKDIR}/image |
| 1506 | |
| 1507 | .. note:: |
| 1508 | |
| 1509 | Tasks that read from or write to this directory should run under |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1510 | :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1511 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1512 | :term:`DATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1513 | The date the build was started. Dates appear using the year, month, |
| 1514 | and day (YMD) format (e.g. "20150209" for February 9th, 2015). |
| 1515 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1516 | :term:`DATETIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1517 | The date and time on which the current build started. The format is |
| 1518 | suitable for timestamps. |
| 1519 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1520 | :term:`DEBIAN_NOAUTONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1521 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1522 | which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1523 | particular package should not be renamed according to Debian library |
| 1524 | 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] | 1525 | set this variable. Here is an example from the ``fontconfig`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1526 | |
| 1527 | DEBIAN_NOAUTONAME_fontconfig-utils = "1" |
| 1528 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1529 | :term:`DEBIANNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1530 | When the :ref:`debian <ref-classes-debian>` class is inherited, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1531 | which is the default behavior, :term:`DEBIANNAME` allows you to override |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1532 | the library name for an individual package. Overriding the library |
| 1533 | name in these cases is rare. You must use the package name as an |
| 1534 | override when you set this variable. Here is an example from the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1535 | ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1536 | |
| 1537 | DEBIANNAME_${PN} = "dbus-1" |
| 1538 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1539 | :term:`DEBUG_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1540 | Specifies to build packages with debugging information. This |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1541 | influences the value of the :term:`SELECTED_OPTIMIZATION` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1542 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1543 | :term:`DEBUG_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1544 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1545 | compiling a system for debugging. This variable defaults to "-O |
| 1546 | -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". |
| 1547 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1548 | :term:`DEFAULT_PREFERENCE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1549 | Specifies a weak bias for recipe selection priority. |
| 1550 | |
| 1551 | The most common usage of this is variable is to set it to "-1" within |
| 1552 | a recipe for a development version of a piece of software. Using the |
| 1553 | variable in this way causes the stable version of the recipe to build |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1554 | by default in the absence of :term:`PREFERRED_VERSION` being used to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1555 | build the development version. |
| 1556 | |
| 1557 | .. note:: |
| 1558 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1559 | The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1560 | by :term:`BBFILE_PRIORITY` if that variable is different between two |
| 1561 | layers that contain different versions of the same recipe. |
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:`DEFAULTTUNE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1564 | The default CPU and Application Binary Interface (ABI) tunings (i.e. |
| 1565 | the "tune") used by the OpenEmbedded build system. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1566 | :term:`DEFAULTTUNE` helps define |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1567 | :term:`TUNE_FEATURES`. |
| 1568 | |
| 1569 | The default tune is either implicitly or explicitly set by the |
| 1570 | machine (:term:`MACHINE`). However, you can override |
| 1571 | the setting using available tunes as defined with |
| 1572 | :term:`AVAILTUNES`. |
| 1573 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1574 | :term:`DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1575 | Lists a recipe's build-time dependencies. These are dependencies on |
| 1576 | other recipes whose contents (e.g. headers and shared libraries) are |
| 1577 | needed by the recipe at build time. |
| 1578 | |
| 1579 | As an example, consider a recipe ``foo`` that contains the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1580 | assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1581 | |
| 1582 | DEPENDS = "bar" |
| 1583 | |
| 1584 | The practical effect of the previous |
| 1585 | assignment is that all files installed by bar will be available in |
| 1586 | the appropriate staging sysroot, given by the |
| 1587 | :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the |
| 1588 | :ref:`ref-tasks-configure` task for ``foo`` runs. |
| 1589 | This mechanism is implemented by having ``do_configure`` depend on |
| 1590 | the :ref:`ref-tasks-populate_sysroot` task of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1591 | each recipe listed in :term:`DEPENDS`, through a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1592 | ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` |
| 1593 | declaration in the :ref:`base <ref-classes-base>` class. |
| 1594 | |
| 1595 | .. note:: |
| 1596 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1597 | It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1598 | explicitly. The standard classes and build-related variables are |
| 1599 | configured to automatically use the appropriate staging sysroots. |
| 1600 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1601 | As another example, :term:`DEPENDS` can also be used to add utilities |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1602 | that run on the build machine during the build. For example, a recipe |
| 1603 | that makes use of a code generator built by the recipe ``codegen`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1604 | might have the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1605 | |
| 1606 | DEPENDS = "codegen-native" |
| 1607 | |
| 1608 | For more |
| 1609 | information, see the :ref:`native <ref-classes-native>` class and |
| 1610 | the :term:`EXTRANATIVEPATH` variable. |
| 1611 | |
| 1612 | .. note:: |
| 1613 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1614 | - :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] | 1615 | it is a list of :term:`PROVIDES` names, which |
| 1616 | usually match recipe names. Putting a package name such as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1617 | "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1618 | instead, as this will put files from all the packages that make |
| 1619 | up ``foo``, which includes those from ``foo-dev``, into the |
| 1620 | sysroot. |
| 1621 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1622 | - One recipe having another recipe in :term:`DEPENDS` does not by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1623 | itself add any runtime dependencies between the packages |
| 1624 | produced by the two recipes. However, as explained in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1625 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1626 | section in the Yocto Project Overview and Concepts Manual, |
| 1627 | runtime dependencies will often be added automatically, meaning |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1628 | :term:`DEPENDS` alone is sufficient for most recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1629 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1630 | - Counterintuitively, :term:`DEPENDS` is often necessary even for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1631 | recipes that install precompiled components. For example, if |
| 1632 | ``libfoo`` is a precompiled library that links against |
| 1633 | ``libbar``, then linking against ``libfoo`` requires both |
| 1634 | ``libfoo`` and ``libbar`` to be available in the sysroot. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1635 | Without a :term:`DEPENDS` from the recipe that installs ``libfoo`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1636 | to the recipe that installs ``libbar``, other recipes might |
| 1637 | fail to link against ``libfoo``. |
| 1638 | |
| 1639 | For information on runtime dependencies, see the |
| 1640 | :term:`RDEPENDS` variable. You can also see the |
| 1641 | ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and |
| 1642 | ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the |
| 1643 | BitBake User Manual for additional information on tasks and |
| 1644 | dependencies. |
| 1645 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1646 | :term:`DEPLOY_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1647 | Points to the general area that the OpenEmbedded build system uses to |
| 1648 | place images, packages, SDKs, and other output files that are ready |
| 1649 | to be used outside of the build system. By default, this directory |
| 1650 | resides within the :term:`Build Directory` as |
| 1651 | ``${TMPDIR}/deploy``. |
| 1652 | |
| 1653 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1654 | ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1655 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1656 | ":ref:`overview-manual/concepts:images`", |
| 1657 | ":ref:`overview-manual/concepts:package feeds`", and |
| 1658 | ":ref:`overview-manual/concepts:application development sdk`" sections all in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1659 | Yocto Project Overview and Concepts Manual. |
| 1660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1661 | :term:`DEPLOY_DIR_DEB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1662 | Points to the area that the OpenEmbedded build system uses to place |
| 1663 | Debian packages that are ready to be used outside of the build |
| 1664 | system. This variable applies only when |
| 1665 | :term:`PACKAGE_CLASSES` contains |
| 1666 | "package_deb". |
| 1667 | |
| 1668 | The BitBake configuration file initially defines the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 1669 | :term:`DEPLOY_DIR_DEB` variable as a sub-folder of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1670 | :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1671 | |
| 1672 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
| 1673 | |
| 1674 | The :ref:`package_deb <ref-classes-package_deb>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1675 | :term:`DEPLOY_DIR_DEB` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1676 | :ref:`ref-tasks-package_write_deb` task |
| 1677 | writes Debian packages into the appropriate folder. For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1678 | information on how packaging works, see the |
| 1679 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1680 | in the Yocto Project Overview and Concepts Manual. |
| 1681 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1682 | :term:`DEPLOY_DIR_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1683 | Points to the area that the OpenEmbedded build system uses to place |
| 1684 | images and other associated output files that are ready to be |
| 1685 | deployed onto the target machine. The directory is machine-specific |
| 1686 | as it contains the ``${MACHINE}`` name. By default, this directory |
| 1687 | resides within the :term:`Build Directory` as |
| 1688 | ``${DEPLOY_DIR}/images/${MACHINE}/``. |
| 1689 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1690 | It must not be used directly in recipes when deploying files. Instead, |
| 1691 | it's only useful when a recipe needs to "read" a file already deployed |
| 1692 | by a dependency. So, it should be filled with the contents of |
| 1693 | :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or |
| 1694 | with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image |
| 1695 | <ref-classes-image>` class. |
| 1696 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1697 | For more information on the structure of the Build Directory, see |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1698 | ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1699 | For more detail on the contents of the ``deploy`` directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1700 | ":ref:`overview-manual/concepts:images`" and |
| 1701 | ":ref:`overview-manual/concepts:application development sdk`" sections both in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1702 | the Yocto Project Overview and Concepts Manual. |
| 1703 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1704 | :term:`DEPLOY_DIR_IPK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1705 | Points to the area that the OpenEmbedded build system uses to place |
| 1706 | IPK packages that are ready to be used outside of the build system. |
| 1707 | This variable applies only when |
| 1708 | :term:`PACKAGE_CLASSES` contains |
| 1709 | "package_ipk". |
| 1710 | |
| 1711 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1712 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1713 | |
| 1714 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
| 1715 | |
| 1716 | The :ref:`package_ipk <ref-classes-package_ipk>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1717 | :term:`DEPLOY_DIR_IPK` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1718 | :ref:`ref-tasks-package_write_ipk` task |
| 1719 | writes IPK packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1720 | on how packaging works, see the |
| 1721 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1722 | in the Yocto Project Overview and Concepts Manual. |
| 1723 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1724 | :term:`DEPLOY_DIR_RPM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1725 | Points to the area that the OpenEmbedded build system uses to place |
| 1726 | RPM packages that are ready to be used outside of the build system. |
| 1727 | This variable applies only when |
| 1728 | :term:`PACKAGE_CLASSES` contains |
| 1729 | "package_rpm". |
| 1730 | |
| 1731 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1732 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1733 | |
| 1734 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
| 1735 | |
| 1736 | The :ref:`package_rpm <ref-classes-package_rpm>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1737 | :term:`DEPLOY_DIR_RPM` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1738 | :ref:`ref-tasks-package_write_rpm` task |
| 1739 | writes RPM packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1740 | on how packaging works, see the |
| 1741 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1742 | in the Yocto Project Overview and Concepts Manual. |
| 1743 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1744 | :term:`DEPLOY_DIR_TAR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1745 | Points to the area that the OpenEmbedded build system uses to place |
| 1746 | tarballs that are ready to be used outside of the build system. This |
| 1747 | variable applies only when |
| 1748 | :term:`PACKAGE_CLASSES` contains |
| 1749 | "package_tar". |
| 1750 | |
| 1751 | The BitBake configuration file initially defines this variable as a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1752 | sub-folder of :term:`DEPLOY_DIR`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1753 | |
| 1754 | DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" |
| 1755 | |
| 1756 | The :ref:`package_tar <ref-classes-package_tar>` class uses the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1757 | :term:`DEPLOY_DIR_TAR` variable to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1758 | :ref:`ref-tasks-package_write_tar` task |
| 1759 | writes TAR packages into the appropriate folder. For more information |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1760 | on how packaging works, see the |
| 1761 | ":ref:`overview-manual/concepts:package feeds`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1762 | in the Yocto Project Overview and Concepts Manual. |
| 1763 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1764 | :term:`DEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1765 | When inheriting the :ref:`deploy <ref-classes-deploy>` class, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1766 | :term:`DEPLOYDIR` points to a temporary work area for deployed files that |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1767 | is set in the ``deploy`` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1768 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1769 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1770 | |
| 1771 | Recipes inheriting the ``deploy`` class should copy files to be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1772 | deployed into :term:`DEPLOYDIR`, and the class will take care of copying |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1773 | them into :term:`DEPLOY_DIR_IMAGE` |
| 1774 | afterwards. |
| 1775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1776 | :term:`DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1777 | The package description used by package managers. If not set, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1778 | :term:`DESCRIPTION` takes the value of the :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1779 | variable. |
| 1780 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1781 | :term:`DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1782 | The short name of the distribution. For information on the long name |
| 1783 | of the distribution, see the :term:`DISTRO_NAME` |
| 1784 | variable. |
| 1785 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1786 | The :term:`DISTRO` variable corresponds to a distribution configuration |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1787 | file whose root name is the same as the variable's argument and whose |
| 1788 | filename extension is ``.conf``. For example, the distribution |
| 1789 | configuration file for the Poky distribution is named ``poky.conf`` |
| 1790 | and resides in the ``meta-poky/conf/distro`` directory of the |
| 1791 | :term:`Source Directory`. |
| 1792 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1793 | Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1794 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1795 | |
| 1796 | DISTRO = "poky" |
| 1797 | |
| 1798 | Distribution configuration files are located in a ``conf/distro`` |
| 1799 | directory within the :term:`Metadata` that contains the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1800 | distribution configuration. The value for :term:`DISTRO` must not contain |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1801 | spaces, and is typically all lower-case. |
| 1802 | |
| 1803 | .. note:: |
| 1804 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1805 | If the :term:`DISTRO` variable is blank, a set of default configurations |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1806 | are used, which are specified within |
| 1807 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1808 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1809 | :term:`DISTRO_CODENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1810 | Specifies a codename for the distribution being built. |
| 1811 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1812 | :term:`DISTRO_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1813 | Specifies a list of distro-specific packages to add to all images. |
| 1814 | This variable takes affect through ``packagegroup-base`` so the |
| 1815 | variable only really applies to the more full-featured images that |
| 1816 | include ``packagegroup-base``. You can use this variable to keep |
| 1817 | distro policy out of generic images. As with all other distro |
| 1818 | variables, you set this variable in the distro ``.conf`` file. |
| 1819 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1820 | :term:`DISTRO_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1821 | Specifies a list of distro-specific packages to add to all images if |
| 1822 | the packages exist. The packages might not exist or be empty (e.g. |
| 1823 | kernel modules). The list of packages are automatically installed but |
| 1824 | you can remove them. |
| 1825 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1826 | :term:`DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1827 | The software support you want in your distribution for various |
| 1828 | features. You define your distribution features in the distribution |
| 1829 | configuration file. |
| 1830 | |
| 1831 | In most cases, the presence or absence of a feature in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1832 | :term:`DISTRO_FEATURES` is translated to the appropriate option supplied |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1833 | to the configure script during the |
| 1834 | :ref:`ref-tasks-configure` task for recipes that |
| 1835 | optionally support the feature. For example, specifying "x11" in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1836 | :term:`DISTRO_FEATURES`, causes every piece of software built for the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1837 | target that can optionally support X11 to have its X11 support |
| 1838 | enabled. |
| 1839 | |
| 1840 | Two more examples are Bluetooth and NFS support. For a more complete |
| 1841 | 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] | 1842 | provide with this variable, see the ":ref:`ref-features-distro`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1843 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1844 | :term:`DISTRO_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1845 | Features to be added to :term:`DISTRO_FEATURES` if not also present in |
| 1846 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1847 | |
| 1848 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 1849 | not intended to be user-configurable. It is best to just reference |
| 1850 | the variable to see which distro features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1851 | all distro configurations. See the ":ref:`ref-features-backfill`" section |
| 1852 | for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1853 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1854 | :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1855 | Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be |
| 1856 | backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1857 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1858 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1859 | :term:`DISTRO_FEATURES_DEFAULT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1860 | A convenience variable that gives you the default list of distro |
| 1861 | features with the exception of any features specific to the C library |
| 1862 | (``libc``). |
| 1863 | |
| 1864 | When creating a custom distribution, you might find it useful to be |
| 1865 | able to reuse the default |
| 1866 | :term:`DISTRO_FEATURES` options without the |
| 1867 | 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] | 1868 | :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1869 | |
| 1870 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" |
| 1871 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1872 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1873 | Specifies a list of features that if present in the target |
| 1874 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1875 | included in :term:`DISTRO_FEATURES` when building native recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1876 | variable is used in addition to the features filtered using the |
| 1877 | :term:`DISTRO_FEATURES_NATIVE` |
| 1878 | variable. |
| 1879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1880 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1881 | Specifies a list of features that if present in the target |
| 1882 | :term:`DISTRO_FEATURES` value should be |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1883 | included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1884 | variable is used in addition to the features filtered using the |
| 1885 | :term:`DISTRO_FEATURES_NATIVESDK` |
| 1886 | variable. |
| 1887 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1888 | :term:`DISTRO_FEATURES_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1889 | Specifies a list of features that should be included in |
| 1890 | :term:`DISTRO_FEATURES` when building native |
| 1891 | recipes. This variable is used in addition to the features filtered |
| 1892 | using the |
| 1893 | :term:`DISTRO_FEATURES_FILTER_NATIVE` |
| 1894 | variable. |
| 1895 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1896 | :term:`DISTRO_FEATURES_NATIVESDK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1897 | Specifies a list of features that should be included in |
| 1898 | :term:`DISTRO_FEATURES` when building |
| 1899 | nativesdk recipes. This variable is used in addition to the features |
| 1900 | filtered using the |
| 1901 | :term:`DISTRO_FEATURES_FILTER_NATIVESDK` |
| 1902 | variable. |
| 1903 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1904 | :term:`DISTRO_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1905 | The long name of the distribution. For information on the short name |
| 1906 | of the distribution, see the :term:`DISTRO` variable. |
| 1907 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1908 | The :term:`DISTRO_NAME` variable corresponds to a distribution |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1909 | configuration file whose root name is the same as the variable's |
| 1910 | argument and whose filename extension is ``.conf``. For example, the |
| 1911 | distribution configuration file for the Poky distribution is named |
| 1912 | ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory |
| 1913 | of the :term:`Source Directory`. |
| 1914 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1915 | Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1916 | as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1917 | |
| 1918 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" |
| 1919 | |
| 1920 | Distribution configuration files are located in a ``conf/distro`` |
| 1921 | directory within the :term:`Metadata` that contains the |
| 1922 | distribution configuration. |
| 1923 | |
| 1924 | .. note:: |
| 1925 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1926 | If the :term:`DISTRO_NAME` variable is blank, a set of default |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1927 | configurations are used, which are specified within |
| 1928 | ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1929 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1930 | :term:`DISTRO_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1931 | The version of the distribution. |
| 1932 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1933 | :term:`DISTROOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1934 | A colon-separated list of overrides specific to the current |
| 1935 | distribution. By default, this list includes the value of |
| 1936 | :term:`DISTRO`. |
| 1937 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1938 | You can extend :term:`DISTROOVERRIDES` to add extra overrides that should |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1939 | apply to the distribution. |
| 1940 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1941 | The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1942 | is included in the default value of |
| 1943 | :term:`OVERRIDES`. |
| 1944 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 1945 | :term:`DISTUTILS_SETUP_PATH` |
| 1946 | When used by recipes that inherit the |
| 1947 | :ref:`distutils3 <ref-classes-distutils3>` or |
| 1948 | :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should |
| 1949 | be used to specify the directory in which the ``setup.py`` file is |
| 1950 | located if it is not at the root of the source tree (as specified by |
| 1951 | :term:`S`). For example, in a recipe where the sources are fetched from |
| 1952 | a Git repository and ``setup.py`` is in a ``python/pythonmodule`` |
| 1953 | subdirectory, you would have this:: |
| 1954 | |
| 1955 | S = "${WORKDIR}/git" |
| 1956 | DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule" |
| 1957 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1958 | :term:`DL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1959 | The central download directory used by the build process to store |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1960 | downloads. By default, :term:`DL_DIR` gets files suitable for mirroring |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1961 | for everything except Git repositories. If you want tarballs of Git |
| 1962 | repositories, use the |
| 1963 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
| 1964 | variable. |
| 1965 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1966 | 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] | 1967 | ``conf/local.conf`` file. This directory is self-maintaining and you |
| 1968 | should not have to touch it. By default, the directory is |
| 1969 | ``downloads`` in the :term:`Build Directory`. |
| 1970 | :: |
| 1971 | |
| 1972 | #DL_DIR ?= "${TOPDIR}/downloads" |
| 1973 | |
| 1974 | To specify a different download directory, |
| 1975 | simply remove the comment from the line and provide your directory. |
| 1976 | |
| 1977 | During a first build, the system downloads many different source code |
| 1978 | tarballs from various upstream projects. Downloading can take a |
| 1979 | while, particularly if your network connection is slow. Tarballs are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1980 | 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] | 1981 | system looks there first to find source tarballs. |
| 1982 | |
| 1983 | .. note:: |
| 1984 | |
| 1985 | When wiping and rebuilding, you can preserve this directory to |
| 1986 | speed up this part of subsequent builds. |
| 1987 | |
| 1988 | You can safely share this directory between multiple builds on the |
| 1989 | same development machine. For additional information on how the build |
| 1990 | process gets source files when working behind a firewall or proxy |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1991 | server, see this specific question in the ":doc:`faq`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1992 | chapter. You can also refer to the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 1993 | ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1994 | Wiki page. |
| 1995 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1996 | :term:`DOC_COMPRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1997 | When inheriting the :ref:`compress_doc <ref-classes-compress_doc>` |
| 1998 | class, this variable sets the compression policy used when the |
| 1999 | OpenEmbedded build system compresses man pages and info pages. By |
| 2000 | default, the compression method used is gz (gzip). Other policies |
| 2001 | available are xz and bz2. |
| 2002 | |
| 2003 | For information on policies and on how to use this variable, see the |
| 2004 | comments in the ``meta/classes/compress_doc.bbclass`` file. |
| 2005 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2006 | :term:`EFI_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2007 | When building bootable images (i.e. where ``hddimg``, ``iso``, or |
| 2008 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2009 | :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2010 | default is "grub-efi", but "systemd-boot" can be used instead. |
| 2011 | |
| 2012 | See the :ref:`systemd-boot <ref-classes-systemd-boot>` and |
| 2013 | :ref:`image-live <ref-classes-image-live>` classes for more |
| 2014 | information. |
| 2015 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2016 | :term:`ENABLE_BINARY_LOCALE_GENERATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2017 | Variable that controls which locales for ``glibc`` are generated |
| 2018 | during the build (useful if the target device has 64Mbytes of RAM or |
| 2019 | less). |
| 2020 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2021 | :term:`ERR_REPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2022 | When used with the :ref:`report-error <ref-classes-report-error>` |
| 2023 | class, specifies the path used for storing the debug files created by |
| 2024 | the :ref:`error reporting |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2025 | tool <dev-manual/common-tasks:using the error reporting tool>`, which |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2026 | allows you to submit build errors you encounter to a central |
| 2027 | database. By default, the value of this variable is |
| 2028 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. |
| 2029 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2030 | 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] | 2031 | reporting tool to store the debug files as follows in your |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2032 | ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2033 | |
| 2034 | ERR_REPORT_DIR = "path" |
| 2035 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2036 | :term:`ERROR_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2037 | Specifies the quality assurance checks whose failures are reported as |
| 2038 | errors by the OpenEmbedded build system. You set this variable in |
| 2039 | your distribution configuration file. For a list of the checks you |
| 2040 | can control with this variable, see the |
| 2041 | ":ref:`insane.bbclass <ref-classes-insane>`" section. |
| 2042 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2043 | :term:`EXCLUDE_FROM_SHLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2044 | Triggers the OpenEmbedded build system's shared libraries resolver to |
| 2045 | exclude an entire package when scanning for shared libraries. |
| 2046 | |
| 2047 | .. note:: |
| 2048 | |
| 2049 | The shared libraries resolver's functionality results in part from |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2050 | the internal function ``package_do_shlibs``, which is part of the |
| 2051 | :ref:`ref-tasks-package` task. You should be aware that the shared |
| 2052 | libraries resolver might implicitly define some dependencies between |
| 2053 | packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2054 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2055 | The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2056 | :term:`PRIVATE_LIBS` variable, which excludes a |
| 2057 | package's particular libraries only and not the whole package. |
| 2058 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2059 | 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] | 2060 | particular package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2061 | |
| 2062 | EXCLUDE_FROM_SHLIBS = "1" |
| 2063 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2064 | :term:`EXCLUDE_FROM_WORLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2065 | Directs BitBake to exclude a recipe from world builds (i.e. |
| 2066 | ``bitbake world``). During world builds, BitBake locates, parses and |
| 2067 | builds all recipes found in every layer exposed in the |
| 2068 | ``bblayers.conf`` configuration file. |
| 2069 | |
| 2070 | To exclude a recipe from a world build using this variable, set the |
| 2071 | variable to "1" in the recipe. |
| 2072 | |
| 2073 | .. note:: |
| 2074 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2075 | 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] | 2076 | world build in order to satisfy dependencies of other recipes. Adding |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2077 | 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] | 2078 | explicitly added to the list of build targets in a world build. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2079 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2080 | :term:`EXTENDPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2081 | 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] | 2082 | version based on the recipe's :term:`PE` value. If :term:`PE` |
| 2083 | is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that |
| 2084 | value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1"). |
| 2085 | If a recipe's :term:`PE` is not set (the default) or is equal to zero, |
| 2086 | :term:`EXTENDPE` becomes "". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2087 | |
| 2088 | See the :term:`STAMP` variable for an example. |
| 2089 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2090 | :term:`EXTENDPKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2091 | The full package version specification as it appears on the final |
| 2092 | packages produced by a recipe. The variable's value is normally used |
| 2093 | to fix a runtime dependency to the exact same version of another |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2094 | package in the same recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2095 | |
| 2096 | RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" |
| 2097 | |
| 2098 | The dependency relationships are intended to force the package |
| 2099 | manager to upgrade these types of packages in lock-step. |
| 2100 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2101 | :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2102 | When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2103 | tools are not in the source tree. |
| 2104 | |
| 2105 | When kernel tools are available in the tree, they are preferred over |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2106 | any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2107 | variable tells the OpenEmbedded build system to prefer the installed |
| 2108 | external tools. See the |
| 2109 | :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in |
| 2110 | ``meta/classes`` to see how the variable is used. |
| 2111 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2112 | :term:`EXTERNALSRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2113 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2114 | class, this variable points to the source tree, which is outside of |
| 2115 | the OpenEmbedded build system. When set, this variable sets the |
| 2116 | :term:`S` variable, which is what the OpenEmbedded build |
| 2117 | system uses to locate unpacked recipe source code. |
| 2118 | |
| 2119 | For more information on ``externalsrc.bbclass``, see the |
| 2120 | ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You |
| 2121 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2122 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2123 | section in the Yocto Project Development Tasks Manual. |
| 2124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2125 | :term:`EXTERNALSRC_BUILD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2126 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
| 2127 | class, this variable points to the directory in which the recipe's |
| 2128 | source code is built, which is outside of the OpenEmbedded build |
| 2129 | system. When set, this variable sets the :term:`B` variable, |
| 2130 | which is what the OpenEmbedded build system uses to locate the Build |
| 2131 | Directory. |
| 2132 | |
| 2133 | For more information on ``externalsrc.bbclass``, see the |
| 2134 | ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You |
| 2135 | can also find information on how to use this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2136 | ":ref:`dev-manual/common-tasks:building software from an external source`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2137 | section in the Yocto Project Development Tasks Manual. |
| 2138 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2139 | :term:`EXTRA_AUTORECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2140 | For recipes inheriting the :ref:`autotools <ref-classes-autotools>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2141 | class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2142 | pass to the ``autoreconf`` command that is executed during the |
| 2143 | :ref:`ref-tasks-configure` task. |
| 2144 | |
| 2145 | The default value is "--exclude=autopoint". |
| 2146 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2147 | :term:`EXTRA_IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2148 | A list of additional features to include in an image. When listing |
| 2149 | more than one feature, separate them with a space. |
| 2150 | |
| 2151 | Typically, you configure this variable in your ``local.conf`` file, |
| 2152 | which is found in the :term:`Build Directory`. |
| 2153 | Although you can use this variable from within a recipe, best |
| 2154 | practices dictate that you do not. |
| 2155 | |
| 2156 | .. note:: |
| 2157 | |
| 2158 | To enable primary features from within the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2159 | :term:`IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2160 | |
| 2161 | Here are some examples of features you can add: |
| 2162 | |
| 2163 | - "dbg-pkgs" - Adds -dbg packages for all installed packages including |
| 2164 | symbol information for debugging and profiling. |
| 2165 | |
| 2166 | - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and |
| 2167 | enables post-installation logging. See the 'allow-empty-password' and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2168 | 'post-install-logging' features in the ":ref:`ref-features-image`" |
| 2169 | section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2170 | - "dev-pkgs" - Adds -dev packages for all installed packages. This is |
| 2171 | useful if you want to develop against the libraries in the image. |
| 2172 | - "read-only-rootfs" - Creates an image whose root filesystem is |
| 2173 | read-only. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2174 | ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2175 | section in the Yocto Project Development Tasks Manual for more |
| 2176 | information |
| 2177 | - "tools-debug" - Adds debugging tools such as gdb and strace. |
| 2178 | - "tools-sdk" - Adds development tools such as gcc, make, |
| 2179 | pkgconfig and so forth. |
| 2180 | - "tools-testapps" - Adds useful testing tools |
| 2181 | such as ts_print, aplay, arecord and so forth. |
| 2182 | |
| 2183 | For a complete list of image features that ships with the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2184 | Project, see the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2185 | |
| 2186 | 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] | 2187 | 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] | 2188 | section in the Yocto Project Development Tasks Manual. |
| 2189 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2190 | :term:`EXTRA_IMAGECMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2191 | Specifies additional options for the image creation command that has |
| 2192 | been specified in :term:`IMAGE_CMD`. When setting |
| 2193 | this variable, use an override for the associated image type. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2194 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2195 | |
| 2196 | EXTRA_IMAGECMD_ext3 ?= "-i 4096" |
| 2197 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2198 | :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2199 | A list of recipes to build that do not provide packages for |
| 2200 | installing into the root filesystem. |
| 2201 | |
| 2202 | 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] | 2203 | needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2204 | variable to list these recipes and thus specify the dependencies. A |
| 2205 | typical example is a required bootloader in a machine configuration. |
| 2206 | |
| 2207 | .. note:: |
| 2208 | |
| 2209 | To add packages to the root filesystem, see the various |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 2210 | :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2211 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2212 | :term:`EXTRANATIVEPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2213 | A list of subdirectories of |
| 2214 | ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` |
| 2215 | added to the beginning of the environment variable ``PATH``. As an |
| 2216 | example, the following prepends |
| 2217 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2218 | ``PATH``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2219 | |
| 2220 | EXTRANATIVEPATH = "foo bar" |
| 2221 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2222 | :term:`EXTRA_OECMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2223 | Additional `CMake <https://cmake.org/overview/>`__ options. See the |
| 2224 | :ref:`cmake <ref-classes-cmake>` class for additional information. |
| 2225 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2226 | :term:`EXTRA_OECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2227 | Additional ``configure`` script options. See |
| 2228 | :term:`PACKAGECONFIG_CONFARGS` for |
| 2229 | additional information on passing configure script options. |
| 2230 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2231 | :term:`EXTRA_OEMAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2232 | Additional GNU ``make`` options. |
| 2233 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2234 | Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2235 | variable to specify any required GNU options. |
| 2236 | |
| 2237 | :term:`PARALLEL_MAKE` and |
| 2238 | :term:`PARALLEL_MAKEINST` also make use of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2239 | :term:`EXTRA_OEMAKE` to pass the required flags. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2240 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2241 | :term:`EXTRA_OESCONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2242 | When inheriting the :ref:`scons <ref-classes-scons>` class, this |
| 2243 | variable specifies additional configuration options you want to pass |
| 2244 | to the ``scons`` command line. |
| 2245 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2246 | :term:`EXTRA_USERS_PARAMS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2247 | When inheriting the :ref:`extrausers <ref-classes-extrausers>` |
| 2248 | class, this variable provides image level user and group operations. |
| 2249 | This is a more global method of providing user and group |
| 2250 | configuration as compared to using the |
| 2251 | :ref:`useradd <ref-classes-useradd>` class, which ties user and |
| 2252 | group configurations to a specific recipe. |
| 2253 | |
| 2254 | The set list of commands you can configure using the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2255 | :term:`EXTRA_USERS_PARAMS` is shown in the ``extrausers`` class. These |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2256 | commands map to the normal Unix commands of the same names:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2257 | |
| 2258 | # EXTRA_USERS_PARAMS = "\ |
| 2259 | # useradd -p '' tester; \ |
| 2260 | # groupadd developers; \ |
| 2261 | # userdel nobody; \ |
| 2262 | # groupdel -g video; \ |
| 2263 | # groupmod -g 1020 developers; \ |
| 2264 | # usermod -s /bin/sh tester; \ |
| 2265 | # " |
| 2266 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2267 | Additionally there is a special ``passwd-expire`` command that will |
| 2268 | cause the password for a user to be expired and thus force changing it |
| 2269 | on first login, for example:: |
| 2270 | |
| 2271 | EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" |
| 2272 | |
| 2273 | .. note:: |
| 2274 | |
| 2275 | At present, ``passwd-expire`` may only work for remote logins when |
| 2276 | using OpenSSH and not dropbear as an SSH server. |
| 2277 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2278 | :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2279 | Defines one or more packages to include in an image when a specific |
| 2280 | item is included in :term:`IMAGE_FEATURES`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2281 | When setting the value, :term:`FEATURE_PACKAGES` should have the name of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2282 | the feature item as an override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2283 | |
| 2284 | FEATURE_PACKAGES_widget = "package1 package2" |
| 2285 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2286 | In this example, if "widget" were added to :term:`IMAGE_FEATURES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2287 | package1 and package2 would be included in the image. |
| 2288 | |
| 2289 | .. note:: |
| 2290 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2291 | Packages installed by features defined through :term:`FEATURE_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2292 | are often package groups. While similarly named, you should not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2293 | confuse the :term:`FEATURE_PACKAGES` variable with package groups, which |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2294 | are discussed elsewhere in the documentation. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2295 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2296 | :term:`FEED_DEPLOYDIR_BASE_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2297 | Points to the base URL of the server and location within the |
| 2298 | document-root that provides the metadata and packages required by |
| 2299 | OPKG to support runtime package management of IPK packages. You set |
| 2300 | this variable in your ``local.conf`` file. |
| 2301 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2302 | Consider the following example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2303 | |
| 2304 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" |
| 2305 | |
| 2306 | This example assumes you are serving |
| 2307 | your packages over HTTP and your databases are located in a directory |
| 2308 | named ``BOARD-dir``, which is underneath your HTTP server's |
| 2309 | document-root. In this case, the OpenEmbedded build system generates |
| 2310 | a set of configuration files for you in your target that work with |
| 2311 | the feed. |
| 2312 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2313 | :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2314 | The list of files and directories that are placed in a package. The |
| 2315 | :term:`PACKAGES` variable lists the packages |
| 2316 | generated by a recipe. |
| 2317 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2318 | To use the :term:`FILES` variable, provide a package name override that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2319 | identifies the resulting package. Then, provide a space-separated |
| 2320 | 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] | 2321 | part of the resulting package. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2322 | |
| 2323 | FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" |
| 2324 | |
| 2325 | .. note:: |
| 2326 | |
| 2327 | - When specifying files or paths, you can pattern match using |
| 2328 | Python's |
| 2329 | `glob <https://docs.python.org/3/library/glob.html>`_ |
| 2330 | syntax. For details on the syntax, see the documentation by |
| 2331 | following the previous link. |
| 2332 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2333 | - When specifying paths as part of the :term:`FILES` variable, it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2334 | good practice to use appropriate path variables. For example, |
| 2335 | use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` |
| 2336 | rather than ``/usr/bin``. You can find a list of these |
| 2337 | variables at the top of the ``meta/conf/bitbake.conf`` file in |
| 2338 | the :term:`Source Directory`. You will also |
| 2339 | find the default values of the various ``FILES_*`` variables in |
| 2340 | this file. |
| 2341 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2342 | 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] | 2343 | editable and you know they should not be overwritten during the |
| 2344 | package update process by the Package Management System (PMS), you |
| 2345 | can identify these files so that the PMS will not overwrite them. See |
| 2346 | the :term:`CONFFILES` variable for information on |
| 2347 | how to identify these files to the PMS. |
| 2348 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2349 | :term:`FILES_SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2350 | Defines the file specification to match |
| 2351 | :term:`SOLIBSDEV`. In other words, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2352 | :term:`FILES_SOLIBSDEV` defines the full path name of the development |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2353 | symbolic link (symlink) for shared libraries on the target platform. |
| 2354 | |
| 2355 | The following statement from the ``bitbake.conf`` shows how it is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2356 | set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2357 | |
| 2358 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
| 2359 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2360 | :term:`FILESEXTRAPATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2361 | Extends the search path the OpenEmbedded build system uses when |
| 2362 | looking for files and patches as it processes recipes and append |
| 2363 | files. The default directories BitBake uses when it processes recipes |
| 2364 | are initially defined by the :term:`FILESPATH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2365 | variable. You can extend :term:`FILESPATH` variable by using |
| 2366 | :term:`FILESEXTRAPATHS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2367 | |
| 2368 | Best practices dictate that you accomplish this by using |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2369 | :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2370 | prepend paths as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2371 | |
| 2372 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
| 2373 | |
| 2374 | In the above example, the build system first |
| 2375 | looks for files in a directory that has the same name as the |
| 2376 | corresponding append file. |
| 2377 | |
| 2378 | .. note:: |
| 2379 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2380 | When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2381 | expansion (``:=``) operator. Immediate expansion makes sure that |
| 2382 | BitBake evaluates :term:`THISDIR` at the time the |
| 2383 | directive is encountered rather than at some later time when |
| 2384 | expansion might result in a directory that does not contain the |
| 2385 | files you need. |
| 2386 | |
| 2387 | Also, include the trailing separating colon character if you are |
| 2388 | prepending. The trailing colon character is necessary because you |
| 2389 | are directing BitBake to extend the path by prepending directories |
| 2390 | to the search path. |
| 2391 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2392 | Here is another common use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2393 | |
| 2394 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 2395 | |
| 2396 | In this example, the build system extends the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2397 | :term:`FILESPATH` variable to include a directory named ``files`` that is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2398 | in the same directory as the corresponding append file. |
| 2399 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2400 | This next example specifically adds three paths:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2401 | |
| 2402 | FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:" |
| 2403 | |
| 2404 | A final example shows how you can extend the search path and include |
| 2405 | a :term:`MACHINE`-specific override, which is useful |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2406 | in a BSP layer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2407 | |
| 2408 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" |
| 2409 | |
| 2410 | The previous statement appears in the |
| 2411 | ``linux-yocto-dev.bbappend`` file, which is found in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2412 | :ref:`overview-manual/development-environment:yocto project source repositories` in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2413 | ``meta-intel/common/recipes-kernel/linux``. Here, the machine |
| 2414 | override is a special :term:`PACKAGE_ARCH` |
| 2415 | definition for multiple ``meta-intel`` machines. |
| 2416 | |
| 2417 | .. note:: |
| 2418 | |
| 2419 | 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] | 2420 | the value of :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2421 | |
| 2422 | By prepending paths in ``.bbappend`` files, you allow multiple append |
| 2423 | files that reside in different layers but are used for the same |
| 2424 | recipe to correctly extend the path. |
| 2425 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2426 | :term:`FILESOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2427 | A subset of :term:`OVERRIDES` used by the |
| 2428 | OpenEmbedded build system for creating |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2429 | :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2430 | uses overrides to automatically extend the |
| 2431 | :term:`FILESPATH` variable. For an example of how |
| 2432 | that works, see the :term:`FILESPATH` variable |
| 2433 | description. Additionally, you find more information on how overrides |
| 2434 | are handled in the |
| 2435 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 2436 | section of the BitBake User Manual. |
| 2437 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2438 | By default, the :term:`FILESOVERRIDES` variable is defined as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2439 | |
| 2440 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
| 2441 | |
| 2442 | .. note:: |
| 2443 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2444 | Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2445 | with expected overrides and are used in an expected manner by the |
| 2446 | build system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2447 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2448 | :term:`FILESPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2449 | The default set of directories the OpenEmbedded build system uses |
| 2450 | when searching for patches and files. |
| 2451 | |
| 2452 | During the build process, BitBake searches each directory in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2453 | :term:`FILESPATH` in the specified order when looking for files and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2454 | patches specified by each ``file://`` URI in a recipe's |
| 2455 | :term:`SRC_URI` statements. |
| 2456 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2457 | The default value for the :term:`FILESPATH` variable is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2458 | ``base.bbclass`` class found in ``meta/classes`` in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2459 | :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2460 | |
| 2461 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ |
| 2462 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" |
| 2463 | |
| 2464 | The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2465 | :term:`FILESPATH` variable is automatically extended using the overrides |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2466 | from the :term:`FILESOVERRIDES` variable. |
| 2467 | |
| 2468 | .. note:: |
| 2469 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2470 | - Do not hand-edit the :term:`FILESPATH` variable. If you want the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2471 | build system to look in directories other than the defaults, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2472 | extend the :term:`FILESPATH` variable by using the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2473 | :term:`FILESEXTRAPATHS` variable. |
| 2474 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2475 | - Be aware that the default :term:`FILESPATH` directories do not map |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2476 | to directories in custom layers where append files |
| 2477 | (``.bbappend``) are used. If you want the build system to find |
| 2478 | patches or files that reside with your append files, you need |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2479 | to extend the :term:`FILESPATH` variable by using the |
| 2480 | :term:`FILESEXTRAPATHS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2481 | |
| 2482 | 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] | 2483 | example, consider a case where there is the following directory structure |
| 2484 | for general and machine-specific configurations:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2485 | |
| 2486 | files/defconfig |
| 2487 | files/MACHINEA/defconfig |
| 2488 | files/MACHINEB/defconfig |
| 2489 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2490 | Also in the example, the :term:`SRC_URI` statement contains |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2491 | "file://defconfig". Given this scenario, you can set |
| 2492 | :term:`MACHINE` to "MACHINEA" and cause the build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2493 | system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2494 | "MACHINEB" and the build system uses files from ``files/MACHINEB``. |
| 2495 | Finally, for any machine other than "MACHINEA" and "MACHINEB", the |
| 2496 | build system uses files from ``files/defconfig``. |
| 2497 | |
| 2498 | You can find out more about the patching process in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2499 | ":ref:`overview-manual/concepts:patching`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2500 | in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2501 | ":ref:`dev-manual/common-tasks:patching code`" section in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2502 | the Yocto Project Development Tasks Manual. See the |
| 2503 | :ref:`ref-tasks-patch` task as well. |
| 2504 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2505 | :term:`FILESYSTEM_PERMS_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2506 | Allows you to define your own file permissions settings table as part |
| 2507 | of your configuration for the packaging process. For example, suppose |
| 2508 | you need a consistent set of custom permissions for a set of groups |
| 2509 | and users across an entire work project. It is best to do this in the |
| 2510 | packages themselves but this is not always possible. |
| 2511 | |
| 2512 | By default, the OpenEmbedded build system uses the ``fs-perms.txt``, |
| 2513 | which is located in the ``meta/files`` folder in the :term:`Source Directory`. |
| 2514 | If you create your own file |
| 2515 | permissions setting table, you should place it in your layer or the |
| 2516 | distro's layer. |
| 2517 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2518 | You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2519 | ``conf/local.conf`` file, which is found in the :term:`Build Directory`, |
| 2520 | to point to your custom |
| 2521 | ``fs-perms.txt``. You can specify more than a single file permissions |
| 2522 | setting table. The paths you specify to these files must be defined |
| 2523 | within the :term:`BBPATH` variable. |
| 2524 | |
| 2525 | For guidance on how to create your own file permissions settings |
| 2526 | table file, examine the existing ``fs-perms.txt``. |
| 2527 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2528 | :term:`FIT_DESC` |
| 2529 | Specifies the description string encoded into a fitImage. The default |
| 2530 | value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2531 | class as follows:: |
| 2532 | |
| 2533 | FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" |
| 2534 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2535 | :term:`FIT_GENERATE_KEYS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2536 | Decides whether to generate the keys for signing fitImage if they |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2537 | 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] | 2538 | The default value is 0. |
| 2539 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2540 | :term:`FIT_HASH_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2541 | Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256. |
| 2542 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2543 | :term:`FIT_KERNEL_COMP_ALG` |
| 2544 | Compression algorithm to use for the kernel image inside the FIT Image. |
| 2545 | At present, the only supported values are "gzip" (default) or "none" |
| 2546 | If you set this variable to anything other than "none" you may also need |
| 2547 | to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. |
| 2548 | |
| 2549 | :term:`FIT_KERNEL_COMP_ALG_EXTENSION` |
| 2550 | File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default |
| 2551 | value is ".gz". |
| 2552 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2553 | :term:`FIT_KEY_GENRSA_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2554 | Arguments to openssl genrsa for generating RSA private key for signing |
| 2555 | fitImage. The default value is "-F4". i.e. the public exponent 65537 to |
| 2556 | use. |
| 2557 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2558 | :term:`FIT_KEY_REQ_ARGS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2559 | Arguments to openssl req for generating certificate for signing fitImage. |
| 2560 | The default value is "-batch -new". batch for non interactive mode |
| 2561 | and new for generating new keys. |
| 2562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2563 | :term:`FIT_KEY_SIGN_PKCS` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2564 | Format for public key certificate used in signing fitImage. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2565 | The default value is "x509". |
| 2566 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2567 | :term:`FIT_SIGN_ALG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2568 | Specifies the signature algorithm used in creating the FIT Image. |
| 2569 | For e.g. rsa2048. |
| 2570 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2571 | :term:`FIT_SIGN_NUMBITS` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2572 | Size of private key in number of bits used in fitImage. The default |
| 2573 | value is "2048". |
| 2574 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2575 | :term:`FIT_SIGN_INDIVIDUAL` |
| 2576 | If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` |
| 2577 | class will sign the kernel, dtb and ramdisk images individually in addition |
| 2578 | to signing the fitImage itself. This could be useful if you are |
| 2579 | intending to verify signatures in another context than booting via |
| 2580 | U-Boot. |
| 2581 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2582 | :term:`FONT_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2583 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2584 | this variable specifies the runtime dependencies for font packages. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 2585 | By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2586 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2587 | :term:`FONT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2588 | When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, |
| 2589 | this variable identifies packages containing font files that need to |
| 2590 | be cached by Fontconfig. By default, the ``fontcache`` class assumes |
| 2591 | that fonts are in the recipe's main package (i.e. |
| 2592 | ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you |
| 2593 | need are in a package other than that main package. |
| 2594 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2595 | :term:`FORCE_RO_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2596 | Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` |
| 2597 | during the generation of the root filesystem. |
| 2598 | |
| 2599 | Set the variable to "1" to force the removal of these packages. |
| 2600 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2601 | :term:`FULL_OPTIMIZATION` |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 2602 | The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2603 | compiling an optimized system. This variable defaults to "-O2 -pipe |
| 2604 | ${DEBUG_FLAGS}". |
| 2605 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2606 | :term:`GCCPIE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2607 | Enables Position Independent Executables (PIE) within the GNU C |
| 2608 | Compiler (GCC). Enabling PIE in the GCC makes Return Oriented |
| 2609 | Programming (ROP) attacks much more difficult to execute. |
| 2610 | |
| 2611 | By default the ``security_flags.inc`` file enables PIE by setting the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2612 | variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2613 | |
| 2614 | GCCPIE ?= "--enable-default-pie" |
| 2615 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2616 | :term:`GCCVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2617 | Specifies the default version of the GNU C Compiler (GCC) used for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2618 | compilation. By default, :term:`GCCVERSION` is set to "8.x" in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2619 | ``meta/conf/distro/include/tcmode-default.inc`` include file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2620 | |
| 2621 | GCCVERSION ?= "8.%" |
| 2622 | |
| 2623 | You can override this value by setting it in a |
| 2624 | configuration file such as the ``local.conf``. |
| 2625 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2626 | :term:`GDB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2627 | The minimal command and arguments to run the GNU Debugger. |
| 2628 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2629 | :term:`GITDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2630 | The directory in which a local copy of a Git repository is stored |
| 2631 | when it is cloned. |
| 2632 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2633 | :term:`GLIBC_GENERATE_LOCALES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2634 | Specifies the list of GLIBC locales to generate should you not wish |
| 2635 | to generate all LIBC locals, which can be time consuming. |
| 2636 | |
| 2637 | .. note:: |
| 2638 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2639 | If you specifically remove the locale ``en_US.UTF-8``, you must set |
| 2640 | :term:`IMAGE_LINGUAS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2641 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2642 | You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2643 | By default, all locales are generated. |
| 2644 | :: |
| 2645 | |
| 2646 | GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" |
| 2647 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2648 | :term:`GROUPADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2649 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2650 | this variable specifies for a package what parameters should be |
| 2651 | passed to the ``groupadd`` command if you wish to add a group to the |
| 2652 | system when the package is installed. |
| 2653 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2654 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2655 | |
| 2656 | GROUPADD_PARAM_${PN} = "-r netdev" |
| 2657 | |
| 2658 | For information on the standard Linux shell command |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2659 | ``groupadd``, see https://linux.die.net/man/8/groupadd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2661 | :term:`GROUPMEMS_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2662 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 2663 | this variable specifies for a package what parameters should be |
| 2664 | passed to the ``groupmems`` command if you wish to modify the members |
| 2665 | of a group when the package is installed. |
| 2666 | |
| 2667 | For information on the standard Linux shell command ``groupmems``, |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 2668 | see https://linux.die.net/man/8/groupmems. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2669 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2670 | :term:`GRUB_GFXSERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2671 | Configures the GNU GRand Unified Bootloader (GRUB) to have graphics |
| 2672 | and serial in the boot menu. Set this variable to "1" in your |
| 2673 | ``local.conf`` or distribution configuration file to enable graphics |
| 2674 | and serial in the menu. |
| 2675 | |
| 2676 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 2677 | information on how this variable is used. |
| 2678 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2679 | :term:`GRUB_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2680 | Additional options to add to the GNU GRand Unified Bootloader (GRUB) |
| 2681 | configuration. Use a semi-colon character (``;``) to separate |
| 2682 | multiple options. |
| 2683 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2684 | The :term:`GRUB_OPTS` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2685 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2686 | on how this variable is used. |
| 2687 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2688 | :term:`GRUB_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2689 | Specifies the timeout before executing the default ``LABEL`` in the |
| 2690 | GNU GRand Unified Bootloader (GRUB). |
| 2691 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2692 | The :term:`GRUB_TIMEOUT` variable is optional. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2693 | :ref:`grub-efi <ref-classes-grub-efi>` class for more information |
| 2694 | on how this variable is used. |
| 2695 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2696 | :term:`GTKIMMODULES_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2697 | When inheriting the |
| 2698 | :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class, |
| 2699 | this variable specifies the packages that contain the GTK+ input |
| 2700 | method modules being installed when the modules are in packages other |
| 2701 | than the main package. |
| 2702 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2703 | :term:`HOMEPAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2704 | Website where more information about the software the recipe is |
| 2705 | building can be found. |
| 2706 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2707 | :term:`HOST_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2708 | The name of the target architecture, which is normally the same as |
| 2709 | :term:`TARGET_ARCH`. The OpenEmbedded build system |
| 2710 | supports many architectures. Here is an example list of architectures |
| 2711 | supported. This list is by no means complete as the architecture is |
| 2712 | configurable: |
| 2713 | |
| 2714 | - arm |
| 2715 | - i586 |
| 2716 | - x86_64 |
| 2717 | - powerpc |
| 2718 | - powerpc64 |
| 2719 | - mips |
| 2720 | - mipsel |
| 2721 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2722 | :term:`HOST_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2723 | Specifies architecture-specific compiler flags that are passed to the |
| 2724 | C compiler. |
| 2725 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2726 | Default initialization for :term:`HOST_CC_ARCH` varies depending on what |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2727 | is being built: |
| 2728 | |
| 2729 | - :term:`TARGET_CC_ARCH` when building for the |
| 2730 | target |
| 2731 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2732 | - :term:`BUILD_CC_ARCH` when building for the build host (i.e. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2733 | ``-native``) |
| 2734 | |
| 2735 | - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. |
| 2736 | ``nativesdk-``) |
| 2737 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2738 | :term:`HOST_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2739 | Specifies the name of the target operating system, which is normally |
| 2740 | the same as the :term:`TARGET_OS`. The variable can |
| 2741 | be set to "linux" for ``glibc``-based systems and to "linux-musl" for |
| 2742 | ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and |
| 2743 | "linux-musleabi" values possible. |
| 2744 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2745 | :term:`HOST_PREFIX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2746 | Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2747 | is normally the same as :term:`TARGET_PREFIX`. |
| 2748 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2749 | :term:`HOST_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2750 | Specifies the system, including the architecture and the operating |
| 2751 | system, for which the build is occurring in the context of the |
| 2752 | current recipe. |
| 2753 | |
| 2754 | The OpenEmbedded build system automatically sets this variable based |
| 2755 | on :term:`HOST_ARCH`, |
| 2756 | :term:`HOST_VENDOR`, and |
| 2757 | :term:`HOST_OS` variables. |
| 2758 | |
| 2759 | .. note:: |
| 2760 | |
| 2761 | You do not need to set the variable yourself. |
| 2762 | |
| 2763 | Consider these two examples: |
| 2764 | |
| 2765 | - Given a native recipe on a 32-bit x86 machine running Linux, the |
| 2766 | value is "i686-linux". |
| 2767 | |
| 2768 | - Given a recipe being built for a little-endian MIPS target running |
| 2769 | Linux, the value might be "mipsel-linux". |
| 2770 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2771 | :term:`HOSTTOOLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2772 | A space-separated list (filter) of tools on the build host that |
| 2773 | should be allowed to be called from within build tasks. Using this |
| 2774 | filter helps reduce the possibility of host contamination. If a tool |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2775 | 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] | 2776 | host, the OpenEmbedded build system produces an error and the build |
| 2777 | is not started. |
| 2778 | |
| 2779 | For additional information, see |
| 2780 | :term:`HOSTTOOLS_NONFATAL`. |
| 2781 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2782 | :term:`HOSTTOOLS_NONFATAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2783 | A space-separated list (filter) of tools on the build host that |
| 2784 | should be allowed to be called from within build tasks. Using this |
| 2785 | filter helps reduce the possibility of host contamination. Unlike |
| 2786 | :term:`HOSTTOOLS`, the OpenEmbedded build system |
| 2787 | 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] | 2788 | :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can |
| 2789 | use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2790 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2791 | :term:`HOST_VENDOR` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2792 | Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2793 | same as :term:`TARGET_VENDOR`. |
| 2794 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2795 | :term:`ICECC_DISABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2796 | Disables or enables the ``icecc`` (Icecream) function. For more |
| 2797 | information on this function and best practices for using this |
| 2798 | variable, see the ":ref:`icecc.bbclass <ref-classes-icecc>`" |
| 2799 | section. |
| 2800 | |
| 2801 | Setting this variable to "1" in your ``local.conf`` disables the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2802 | function:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2803 | |
| 2804 | ICECC_DISABLED ??= "1" |
| 2805 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2806 | To enable the function, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2807 | |
| 2808 | ICECC_DISABLED = "" |
| 2809 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2810 | :term:`ICECC_ENV_EXEC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2811 | Points to the ``icecc-create-env`` script that you provide. This |
| 2812 | variable is used by the :ref:`icecc <ref-classes-icecc>` class. You |
| 2813 | set this variable in your ``local.conf`` file. |
| 2814 | |
| 2815 | If you do not point to a script that you provide, the OpenEmbedded |
| 2816 | build system uses the default script provided by the |
| 2817 | ``icecc-create-env.bb`` recipe, which is a modified version and not |
| 2818 | the one that comes with ``icecc``. |
| 2819 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2820 | :term:`ICECC_PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2821 | Extra options passed to the ``make`` command during the |
| 2822 | :ref:`ref-tasks-compile` task that specify parallel |
| 2823 | compilation. This variable usually takes the form of "-j x", where x |
| 2824 | represents the maximum number of parallel threads ``make`` can run. |
| 2825 | |
| 2826 | .. note:: |
| 2827 | |
| 2828 | The options passed affect builds on all enabled machines on the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2829 | network, which are machines running the ``iceccd`` daemon. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2830 | |
| 2831 | If your enabled machines support multiple cores, coming up with the |
| 2832 | maximum number of parallel threads that gives you the best |
| 2833 | performance could take some experimentation since machine speed, |
| 2834 | network lag, available memory, and existing machine loads can all |
| 2835 | affect build time. Consequently, unlike the |
| 2836 | :term:`PARALLEL_MAKE` variable, there is no |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2837 | rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2838 | performance. |
| 2839 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2840 | 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] | 2841 | 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] | 2842 | cores as is done with :term:`PARALLEL_MAKE`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2843 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2844 | :term:`ICECC_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2845 | The location of the ``icecc`` binary. You can set this variable in |
| 2846 | your ``local.conf`` file. If your ``local.conf`` file does not define |
| 2847 | this variable, the :ref:`icecc <ref-classes-icecc>` class attempts |
| 2848 | to define it by locating ``icecc`` using ``which``. |
| 2849 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2850 | :term:`ICECC_USER_CLASS_BL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2851 | Identifies user classes that you do not want the Icecream distributed |
| 2852 | compile support to consider. This variable is used by the |
| 2853 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2854 | your ``local.conf`` file. |
| 2855 | |
| 2856 | When you list classes using this variable, you are "blacklisting" |
| 2857 | them from distributed compilation across remote hosts. Any classes |
| 2858 | you list will be distributed and compiled locally. |
| 2859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2860 | :term:`ICECC_USER_PACKAGE_BL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2861 | Identifies user recipes that you do not want the Icecream distributed |
| 2862 | compile support to consider. This variable is used by the |
| 2863 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2864 | your ``local.conf`` file. |
| 2865 | |
| 2866 | When you list packages using this variable, you are "blacklisting" |
| 2867 | them from distributed compilation across remote hosts. Any packages |
| 2868 | you list will be distributed and compiled locally. |
| 2869 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2870 | :term:`ICECC_USER_PACKAGE_WL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2871 | Identifies user recipes that use an empty |
| 2872 | :term:`PARALLEL_MAKE` variable that you want to |
| 2873 | force remote distributed compilation on using the Icecream |
| 2874 | distributed compile support. This variable is used by the |
| 2875 | :ref:`icecc <ref-classes-icecc>` class. You set this variable in |
| 2876 | your ``local.conf`` file. |
| 2877 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2878 | :term:`IMAGE_BASENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2879 | The base name of image output files. This variable defaults to the |
| 2880 | recipe name (``${``\ :term:`PN`\ ``}``). |
| 2881 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2882 | :term:`IMAGE_EFI_BOOT_FILES` |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2883 | A space-separated list of files installed into the boot partition |
| 2884 | when preparing an image using the Wic tool with the |
| 2885 | ``bootimg-efi`` source plugin. By default, |
| 2886 | the files are |
| 2887 | installed under the same name as the source files. To change the |
| 2888 | installed name, separate it from the original name with a semi-colon |
| 2889 | (;). Source files need to be located in |
| 2890 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2891 | examples:: |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2892 | |
| 2893 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" |
| 2894 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" |
| 2895 | |
| 2896 | Alternatively, source files can be picked up using a glob pattern. In |
| 2897 | this case, the destination file must have the same name as the base |
| 2898 | name of the source file path. To install files into a directory |
| 2899 | within the target location, pass its name after a semi-colon (;). |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2900 | Here are two examples:: |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2901 | |
| 2902 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" |
| 2903 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" |
| 2904 | |
| 2905 | The first example |
| 2906 | installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` |
| 2907 | into the root of the target partition. The second example installs |
| 2908 | the same files into a ``boot`` directory within the target partition. |
| 2909 | |
| 2910 | 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] | 2911 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2912 | section of the Yocto Project Development Tasks Manual. Reference |
| 2913 | material for Wic is located in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2914 | ":doc:`/ref-manual/kickstart`" chapter. |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2915 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2916 | :term:`IMAGE_BOOT_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2917 | A space-separated list of files installed into the boot partition |
| 2918 | when preparing an image using the Wic tool with the |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 2919 | ``bootimg-partition`` source plugin. By default, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2920 | the files are |
| 2921 | installed under the same name as the source files. To change the |
| 2922 | installed name, separate it from the original name with a semi-colon |
| 2923 | (;). Source files need to be located in |
| 2924 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2925 | examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2926 | |
| 2927 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" |
| 2928 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" |
| 2929 | |
| 2930 | Alternatively, source files can be picked up using a glob pattern. In |
| 2931 | this case, the destination file must have the same name as the base |
| 2932 | name of the source file path. To install files into a directory |
| 2933 | within the target location, pass its name after a semi-colon (;). |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2934 | Here are two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2935 | |
| 2936 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" |
| 2937 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" |
| 2938 | |
| 2939 | The first example |
| 2940 | installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` |
| 2941 | into the root of the target partition. The second example installs |
| 2942 | the same files into a ``boot`` directory within the target partition. |
| 2943 | |
| 2944 | 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] | 2945 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2946 | section of the Yocto Project Development Tasks Manual. Reference |
| 2947 | material for Wic is located in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 2948 | ":doc:`/ref-manual/kickstart`" chapter. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2949 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2950 | :term:`IMAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2951 | A list of classes that all images should inherit. You typically use |
| 2952 | this variable to specify the list of classes that register the |
| 2953 | different types of images the OpenEmbedded build system creates. |
| 2954 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2955 | The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2956 | set this variable in your ``local.conf`` or in a distribution |
| 2957 | configuration file. |
| 2958 | |
| 2959 | For more information, see ``meta/classes/image_types.bbclass`` in the |
| 2960 | :term:`Source Directory`. |
| 2961 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2962 | :term:`IMAGE_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2963 | Specifies the command to create the image file for a specific image |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 2964 | type, which corresponds to the value set in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2965 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, |
| 2966 | ``btrfs``, and so forth). When setting this variable, you should use |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 2967 | an override for the associated type. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2968 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2969 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ |
| 2970 | --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2971 | ${EXTRA_IMAGECMD}" |
| 2972 | |
| 2973 | You typically do not need to set this variable unless you are adding |
| 2974 | support for a new image type. For more examples on how to set this |
| 2975 | variable, see the :ref:`image_types <ref-classes-image_types>` |
| 2976 | class file, which is ``meta/classes/image_types.bbclass``. |
| 2977 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2978 | :term:`IMAGE_DEVICE_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2979 | Specifies one or more files that contain custom device tables that |
| 2980 | are passed to the ``makedevs`` command as part of creating an image. |
| 2981 | These files list basic device nodes that should be created under |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 2982 | ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2983 | ``files/device_table-minimal.txt`` is used, which is located by |
| 2984 | :term:`BBPATH`. For details on how you should write |
| 2985 | device table files, see ``meta/files/device_table-minimal.txt`` as an |
| 2986 | example. |
| 2987 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 2988 | :term:`IMAGE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2989 | The primary list of features to include in an image. Typically, you |
| 2990 | configure this variable in an image recipe. Although you can use this |
| 2991 | variable from your ``local.conf`` file, which is found in the |
| 2992 | :term:`Build Directory`, best practices dictate that you do |
| 2993 | not. |
| 2994 | |
| 2995 | .. note:: |
| 2996 | |
| 2997 | To enable extra features from outside the image recipe, use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 2998 | :term:`EXTRA_IMAGE_FEATURES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2999 | |
| 3000 | 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] | 3001 | the ":ref:`ref-features-image`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3002 | |
| 3003 | 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] | 3004 | 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] | 3005 | section in the Yocto Project Development Tasks Manual. |
| 3006 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3007 | :term:`IMAGE_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3008 | Specifies the formats the OpenEmbedded build system uses during the |
| 3009 | build when creating the root filesystem. For example, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3010 | :term:`IMAGE_FSTYPES` as follows causes the build system to create root |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3011 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3012 | |
| 3013 | IMAGE_FSTYPES = "ext3 tar.bz2" |
| 3014 | |
| 3015 | For the complete list of supported image formats from which you can |
| 3016 | choose, see :term:`IMAGE_TYPES`. |
| 3017 | |
| 3018 | .. note:: |
| 3019 | |
| 3020 | - If an image recipe uses the "inherit image" line and you are |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3021 | setting :term:`IMAGE_FSTYPES` inside the recipe, you must set |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3022 | :term:`IMAGE_FSTYPES` prior to using the "inherit image" line. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3023 | |
| 3024 | - Due to the way the OpenEmbedded build system processes this |
| 3025 | variable, you cannot update its contents by using ``_append`` |
| 3026 | or ``_prepend``. You must use the ``+=`` operator to add one or |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3027 | more options to the :term:`IMAGE_FSTYPES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3028 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3029 | :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3030 | Used by recipes to specify the packages to install into an image |
| 3031 | through the :ref:`image <ref-classes-image>` class. Use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3032 | :term:`IMAGE_INSTALL` variable with care to avoid ordering issues. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3033 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3034 | Image recipes set :term:`IMAGE_INSTALL` to specify the packages to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3035 | install into an image through ``image.bbclass``. Additionally, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3036 | there are "helper" classes such as the |
| 3037 | :ref:`core-image <ref-classes-core-image>` class which can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3038 | take lists used with :term:`IMAGE_FEATURES` and turn them into |
| 3039 | auto-generated entries in :term:`IMAGE_INSTALL` in addition to its |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3040 | default contents. |
| 3041 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3042 | 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] | 3043 | |
| 3044 | IMAGE_INSTALL_append = " package-name" |
| 3045 | |
| 3046 | Be sure to include the space |
| 3047 | between the quotation character and the start of the package name or |
| 3048 | names. |
| 3049 | |
| 3050 | .. note:: |
| 3051 | |
| 3052 | - When working with a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3053 | :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3054 | image, do not use the :term:`IMAGE_INSTALL` variable to specify |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3055 | packages for installation. Instead, use the |
| 3056 | :term:`PACKAGE_INSTALL` variable, which |
| 3057 | allows the initial RAM filesystem (initramfs) recipe to use a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3058 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3059 | For information on creating an initramfs, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3060 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3061 | section in the Yocto Project Development Tasks Manual. |
| 3062 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3063 | - Using :term:`IMAGE_INSTALL` with the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3064 | :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] | 3065 | BitBake operator within the ``/conf/local.conf`` file or from |
| 3066 | within an image recipe is not recommended. Use of this operator |
| 3067 | in these ways can cause ordering issues. Since |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3068 | ``core-image.bbclass`` sets :term:`IMAGE_INSTALL` to a default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3069 | value using the |
| 3070 | :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] | 3071 | operator, using a ``+=`` operation against :term:`IMAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3072 | results in unexpected behavior when used within |
| 3073 | ``conf/local.conf``. Furthermore, the same operation from |
| 3074 | within an image recipe may or may not succeed depending on the |
| 3075 | specific situation. In both these cases, the behavior is |
| 3076 | contrary to how most users expect the ``+=`` operator to work. |
| 3077 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3078 | :term:`IMAGE_LINGUAS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3079 | Specifies the list of locales to install into the image during the |
| 3080 | root filesystem construction process. The OpenEmbedded build system |
| 3081 | automatically splits locale files, which are used for localization, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3082 | into separate packages. Setting the :term:`IMAGE_LINGUAS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3083 | ensures that any locale packages that correspond to packages already |
| 3084 | selected for installation into the image are also installed. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3085 | an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3086 | |
| 3087 | IMAGE_LINGUAS = "pt-br de-de" |
| 3088 | |
| 3089 | In this example, the build system ensures any Brazilian Portuguese |
| 3090 | and German locale files that correspond to packages in the image are |
| 3091 | installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as |
| 3092 | ``*-locale-pt`` and ``*-locale-de``, since some software packages |
| 3093 | only provide locale files by language and not by country-specific |
| 3094 | language). |
| 3095 | |
| 3096 | See the :term:`GLIBC_GENERATE_LOCALES` |
| 3097 | variable for information on generating GLIBC locales. |
| 3098 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3099 | |
| 3100 | :term:`IMAGE_LINK_NAME` |
| 3101 | The name of the output image symlink (which does not include |
| 3102 | the version part as :term:`IMAGE_NAME` does). The default value |
| 3103 | is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3104 | variables:: |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3105 | |
| 3106 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" |
| 3107 | |
| 3108 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3109 | :term:`IMAGE_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3110 | The manifest file for the image. This file lists all the installed |
| 3111 | packages that make up the image. The file contains package |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3112 | information on a line-per-package basis as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3113 | |
| 3114 | packagename packagearch version |
| 3115 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3116 | The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3117 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3118 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3119 | IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3120 | |
| 3121 | The location is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3122 | derived using the :term:`IMGDEPLOYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3123 | and :term:`IMAGE_NAME` variables. You can find |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3124 | 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] | 3125 | section in the Yocto Project Overview and Concepts Manual. |
| 3126 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3127 | :term:`IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3128 | The name of the output image files minus the extension. This variable |
| 3129 | is derived using the :term:`IMAGE_BASENAME`, |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3130 | :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3131 | variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3132 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3133 | IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3134 | |
| 3135 | :term:`IMAGE_NAME_SUFFIX` |
| 3136 | Suffix used for the image output file name - defaults to ``".rootfs"`` |
| 3137 | to distinguish the image file from other files created during image |
| 3138 | building; however if this suffix is redundant or not desired you can |
| 3139 | clear the value of this variable (set the value to ""). For example, |
| 3140 | this is typically cleared in initramfs image recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3141 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3142 | :term:`IMAGE_OVERHEAD_FACTOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3143 | Defines a multiplier that the build system applies to the initial |
| 3144 | image size for cases when the multiplier times the returned disk |
| 3145 | usage value for the image is greater than the sum of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3146 | :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] | 3147 | the multiplier applied to the initial image size creates free disk |
| 3148 | space in the image as overhead. By default, the build process uses a |
| 3149 | multiplier of 1.3 for this variable. This default value results in |
| 3150 | 30% free disk space added to the image when this method is used to |
| 3151 | determine the final generated image size. You should be aware that |
| 3152 | post install scripts and the package management system uses disk |
| 3153 | space inside this overhead area. Consequently, the multiplier does |
| 3154 | not produce an image with all the theoretical free disk space. See |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3155 | :term:`IMAGE_ROOTFS_SIZE` for information on how the build system |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3156 | determines the overall image size. |
| 3157 | |
| 3158 | The default 30% free disk space typically gives the image enough room |
| 3159 | to boot and allows for basic post installs while still leaving a |
| 3160 | small amount of free disk space. If 30% free space is inadequate, you |
| 3161 | can increase the default value. For example, the following setting |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3162 | gives you 50% free space added to the image:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3163 | |
| 3164 | IMAGE_OVERHEAD_FACTOR = "1.5" |
| 3165 | |
| 3166 | Alternatively, you can ensure a specific amount of free disk space is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3167 | added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3168 | variable. |
| 3169 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3170 | :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3171 | Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the |
| 3172 | OpenEmbedded build system. The variable is defined appropriately by |
| 3173 | the :ref:`package_deb <ref-classes-package_deb>`, |
| 3174 | :ref:`package_rpm <ref-classes-package_rpm>`, |
| 3175 | :ref:`package_ipk <ref-classes-package_ipk>`, or |
| 3176 | :ref:`package_tar <ref-classes-package_tar>` class. |
| 3177 | |
| 3178 | .. note:: |
| 3179 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3180 | The ``package_tar`` class is broken and is not supported. It is |
| 3181 | recommended that you do not use it. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3182 | |
| 3183 | The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3184 | :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3185 | for packaging up images and SDKs. |
| 3186 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3187 | You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3188 | variable is set indirectly through the appropriate |
| 3189 | :ref:`package_* <ref-classes-package>` class using the |
| 3190 | :term:`PACKAGE_CLASSES` variable. The |
| 3191 | OpenEmbedded build system uses the first package type (e.g. DEB, RPM, |
| 3192 | or IPK) that appears with the variable |
| 3193 | |
| 3194 | .. note:: |
| 3195 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3196 | Files using the ``.tar`` format are never used as a substitute |
| 3197 | packaging format for DEB, RPM, and IPK formatted files for your image |
| 3198 | or SDK. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3199 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3200 | :term:`IMAGE_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3201 | Specifies a list of functions to call once the OpenEmbedded build |
| 3202 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3203 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3204 | |
| 3205 | IMAGE_POSTPROCESS_COMMAND += "function; ... " |
| 3206 | |
| 3207 | If you need to pass the root filesystem path to a command within the |
| 3208 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3209 | directory that becomes the root filesystem image. See the |
| 3210 | :term:`IMAGE_ROOTFS` variable for more |
| 3211 | information. |
| 3212 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3213 | :term:`IMAGE_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3214 | Specifies a list of functions to call before the OpenEmbedded build |
| 3215 | system creates the final image output files. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3216 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3217 | |
| 3218 | IMAGE_PREPROCESS_COMMAND += "function; ... " |
| 3219 | |
| 3220 | If you need to pass the root filesystem path to a command within the |
| 3221 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 3222 | directory that becomes the root filesystem image. See the |
| 3223 | :term:`IMAGE_ROOTFS` variable for more |
| 3224 | information. |
| 3225 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3226 | :term:`IMAGE_ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3227 | The location of the root filesystem while it is under construction |
| 3228 | (i.e. during the :ref:`ref-tasks-rootfs` task). This |
| 3229 | variable is not configurable. Do not change it. |
| 3230 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3231 | :term:`IMAGE_ROOTFS_ALIGNMENT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3232 | Specifies the alignment for the output image file in Kbytes. If the |
| 3233 | size of the image is not a multiple of this value, then the size is |
| 3234 | rounded up to the nearest multiple of the value. The default value is |
| 3235 | "1". See :term:`IMAGE_ROOTFS_SIZE` for |
| 3236 | additional information. |
| 3237 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3238 | :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3239 | Defines additional free disk space created in the image in Kbytes. By |
| 3240 | default, this variable is set to "0". This free disk space is added |
| 3241 | to the image after the build system determines the image size as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3242 | described in :term:`IMAGE_ROOTFS_SIZE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3243 | |
| 3244 | This variable is particularly useful when you want to ensure that a |
| 3245 | specific amount of free disk space is available on a device after an |
| 3246 | 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] | 3247 | free disk space is available, set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3248 | |
| 3249 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" |
| 3250 | |
| 3251 | For example, the Yocto Project Build Appliance specifically requests |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3252 | 40 Gbytes of extra space with the line:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3253 | |
| 3254 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" |
| 3255 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3256 | :term:`IMAGE_ROOTFS_SIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3257 | Defines the size in Kbytes for the generated image. The OpenEmbedded |
| 3258 | build system determines the final size for the generated image using |
| 3259 | an algorithm that takes into account the initial disk space used for |
| 3260 | the generated image, a requested size for the image, and requested |
| 3261 | additional free disk space to be added to the image. Programatically, |
| 3262 | the build system determines the final size of the generated image as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3263 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3264 | |
| 3265 | if (image-du * overhead) < rootfs-size: |
| 3266 | internal-rootfs-size = rootfs-size + xspace |
| 3267 | else: |
| 3268 | internal-rootfs-size = (image-du * overhead) + xspace |
| 3269 | where: |
| 3270 | image-du = Returned value of the du command on the image. |
| 3271 | overhead = IMAGE_OVERHEAD_FACTOR |
| 3272 | rootfs-size = IMAGE_ROOTFS_SIZE |
| 3273 | internal-rootfs-size = Initial root filesystem size before any modifications. |
| 3274 | xspace = IMAGE_ROOTFS_EXTRA_SPACE |
| 3275 | |
| 3276 | See the :term:`IMAGE_OVERHEAD_FACTOR` |
| 3277 | and :term:`IMAGE_ROOTFS_EXTRA_SPACE` |
| 3278 | variables for related information. |
| 3279 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3280 | :term:`IMAGE_TYPEDEP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3281 | Specifies a dependency from one image type on another. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3282 | example from the :ref:`image-live <ref-classes-image-live>` class:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3283 | |
| 3284 | IMAGE_TYPEDEP_live = "ext3" |
| 3285 | |
| 3286 | In the previous example, the variable ensures that when "live" is |
| 3287 | listed with the :term:`IMAGE_FSTYPES` variable, |
| 3288 | the OpenEmbedded build system produces an ``ext3`` image first since |
| 3289 | one of the components of the live image is an ``ext3`` formatted |
| 3290 | partition containing the root filesystem. |
| 3291 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3292 | :term:`IMAGE_TYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3293 | Specifies the complete list of supported image types by default: |
| 3294 | |
| 3295 | - btrfs |
| 3296 | - container |
| 3297 | - cpio |
| 3298 | - cpio.gz |
| 3299 | - cpio.lz4 |
| 3300 | - cpio.lzma |
| 3301 | - cpio.xz |
| 3302 | - cramfs |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3303 | - erofs |
| 3304 | - erofs-lz4 |
| 3305 | - erofs-lz4hc |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3306 | - ext2 |
| 3307 | - ext2.bz2 |
| 3308 | - ext2.gz |
| 3309 | - ext2.lzma |
| 3310 | - ext3 |
| 3311 | - ext3.gz |
| 3312 | - ext4 |
| 3313 | - ext4.gz |
| 3314 | - f2fs |
| 3315 | - hddimg |
| 3316 | - iso |
| 3317 | - jffs2 |
| 3318 | - jffs2.sum |
| 3319 | - multiubi |
| 3320 | - squashfs |
| 3321 | - squashfs-lz4 |
| 3322 | - squashfs-lzo |
| 3323 | - squashfs-xz |
| 3324 | - tar |
| 3325 | - tar.bz2 |
| 3326 | - tar.gz |
| 3327 | - tar.lz4 |
| 3328 | - tar.xz |
| 3329 | - tar.zst |
| 3330 | - ubi |
| 3331 | - ubifs |
| 3332 | - wic |
| 3333 | - wic.bz2 |
| 3334 | - wic.gz |
| 3335 | - wic.lzma |
| 3336 | |
| 3337 | For more information about these types of images, see |
| 3338 | ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`. |
| 3339 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3340 | :term:`IMAGE_VERSION_SUFFIX` |
| 3341 | Version suffix that is part of the default :term:`IMAGE_NAME` and |
| 3342 | :term:`KERNEL_ARTIFACT_NAME` values. |
| 3343 | Defaults to ``"-${DATETIME}"``, however you could set this to a |
| 3344 | version string that comes from your external build environment if |
| 3345 | desired, and this suffix would then be used consistently across |
| 3346 | the build artifacts. |
| 3347 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3348 | :term:`IMGDEPLOYDIR` |
| 3349 | When inheriting the :ref:`image <ref-classes-image>` class directly or |
| 3350 | through the :ref:`core-image <ref-classes-core-image>` class, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3351 | :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3352 | that is set in the ``image`` class as follows:: |
| 3353 | |
| 3354 | IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" |
| 3355 | |
| 3356 | Recipes inheriting the ``image`` class should copy files to be |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3357 | deployed into :term:`IMGDEPLOYDIR`, and the class will take care of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3358 | copying them into :term:`DEPLOY_DIR_IMAGE` afterwards. |
| 3359 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3360 | :term:`INC_PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3361 | Helps define the recipe revision for recipes that share a common |
| 3362 | ``include`` file. You can think of this variable as part of the |
| 3363 | recipe revision as set from within an include file. |
| 3364 | |
| 3365 | Suppose, for example, you have a set of recipes that are used across |
| 3366 | several projects. And, within each of those recipes the revision (its |
| 3367 | :term:`PR` value) is set accordingly. In this case, when |
| 3368 | the revision of those recipes changes, the burden is on you to find |
| 3369 | all those recipes and be sure that they get changed to reflect the |
| 3370 | updated version of the recipe. In this scenario, it can get |
| 3371 | complicated when recipes that are used in many places and provide |
| 3372 | common functionality are upgraded to a new revision. |
| 3373 | |
| 3374 | 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] | 3375 | :term:`INC_PR` variable inside the ``include`` files that the recipes |
| 3376 | 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] | 3377 | help define the recipe revision. |
| 3378 | |
| 3379 | The following provides an example that shows how to use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3380 | :term:`INC_PR` variable given a common ``include`` file that defines the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3381 | variable. Once the variable is defined in the ``include`` file, you |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3382 | can use the variable to set the :term:`PR` values in each recipe. You |
| 3383 | will notice that when you set a recipe's :term:`PR` you can provide more |
| 3384 | granular revisioning by appending values to the :term:`INC_PR` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3385 | |
| 3386 | recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" |
| 3387 | recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" |
| 3388 | recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0" |
| 3389 | recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" |
| 3390 | |
| 3391 | The |
| 3392 | first line of the example establishes the baseline revision to be |
| 3393 | used for all recipes that use the ``include`` file. The remaining |
| 3394 | lines in the example are from individual recipes and show how the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3395 | :term:`PR` value is set. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3396 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3397 | :term:`INCOMPATIBLE_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3398 | Specifies a space-separated list of license names (as they would |
| 3399 | appear in :term:`LICENSE`) that should be excluded |
| 3400 | from the build. Recipes that provide no alternatives to listed |
| 3401 | incompatible licenses are not built. Packages that are individually |
| 3402 | licensed with the specified incompatible licenses will be deleted. |
| 3403 | |
| 3404 | .. note:: |
| 3405 | |
| 3406 | This functionality is only regularly tested using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3407 | setting:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3408 | |
| 3409 | INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0" |
| 3410 | |
| 3411 | |
| 3412 | Although you can use other settings, you might be required to |
| 3413 | remove dependencies on or provide alternatives to components that |
| 3414 | are required to produce a functional system image. |
| 3415 | |
| 3416 | .. note:: |
| 3417 | |
| 3418 | It is possible to define a list of licenses that are allowed to be |
| 3419 | used instead of the licenses that are excluded. To do this, define |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3420 | a variable ``COMPATIBLE_LICENSES`` with the names of the licenses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3421 | that are allowed. Then define :term:`INCOMPATIBLE_LICENSE` as:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3422 | |
| 3423 | INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}" |
| 3424 | |
| 3425 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3426 | This will result in :term:`INCOMPATIBLE_LICENSE` containing the names of |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 3427 | all licenses from :term:`AVAILABLE_LICENSES` except the ones specified |
| 3428 | in ``COMPATIBLE_LICENSES``, thus only allowing the latter licenses to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3429 | be used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3430 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3431 | :term:`INHERIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3432 | Causes the named class or classes to be inherited globally. Anonymous |
| 3433 | functions in the class or classes are not executed for the base |
| 3434 | configuration and in each individual recipe. The OpenEmbedded build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3435 | system ignores changes to :term:`INHERIT` in individual recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3436 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3437 | For more information on :term:`INHERIT`, see the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3438 | :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
| 3439 | section in the Bitbake User Manual. |
| 3440 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3441 | :term:`INHERIT_DISTRO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3442 | Lists classes that will be inherited at the distribution level. It is |
| 3443 | unlikely that you want to edit this variable. |
| 3444 | |
| 3445 | The default value of the variable is set as follows in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3446 | ``meta/conf/distro/defaultsetup.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3447 | |
| 3448 | INHERIT_DISTRO ?= "debian devshell sstate license" |
| 3449 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3450 | :term:`INHIBIT_DEFAULT_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3451 | Prevents the default dependencies, namely the C compiler and standard |
| 3452 | C library (libc), from being added to :term:`DEPENDS`. |
| 3453 | This variable is usually used within recipes that do not require any |
| 3454 | compilation using the C compiler. |
| 3455 | |
| 3456 | Set the variable to "1" to prevent the default dependencies from |
| 3457 | being added. |
| 3458 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3459 | :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3460 | Prevents the OpenEmbedded build system from splitting out debug |
| 3461 | information during packaging. By default, the build system splits out |
| 3462 | debugging information during the |
| 3463 | :ref:`ref-tasks-package` task. For more information on |
| 3464 | how debug information is split out, see the |
| 3465 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
| 3466 | variable. |
| 3467 | |
| 3468 | To prevent the build system from splitting out debug information |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3469 | during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3470 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3471 | |
| 3472 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
| 3473 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3474 | :term:`INHIBIT_PACKAGE_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3475 | If set to "1", causes the build to not strip binaries in resulting |
| 3476 | packages and prevents the ``-dbg`` package from containing the source |
| 3477 | files. |
| 3478 | |
| 3479 | By default, the OpenEmbedded build system strips binaries and puts |
| 3480 | the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3481 | Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3482 | plan to debug in general. |
| 3483 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3484 | :term:`INHIBIT_SYSROOT_STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3485 | If set to "1", causes the build to not strip binaries in the |
| 3486 | resulting sysroot. |
| 3487 | |
| 3488 | By default, the OpenEmbedded build system strips binaries in the |
| 3489 | resulting sysroot. When you specifically set the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3490 | :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3491 | this stripping. |
| 3492 | |
| 3493 | If you want to use this variable, include the |
| 3494 | :ref:`staging <ref-classes-staging>` class. This class uses a |
| 3495 | ``sys_strip()`` function to test for the variable and acts |
| 3496 | accordingly. |
| 3497 | |
| 3498 | .. note:: |
| 3499 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3500 | Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3501 | special circumstances. For example, suppose you are building |
| 3502 | bare-metal firmware by using an external GCC toolchain. Furthermore, |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3503 | even if the toolchain's binaries are strippable, there are other files |
| 3504 | needed for the build that are not strippable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3505 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3506 | :term:`INITRAMFS_FSTYPES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3507 | Defines the format for the output image of an initial RAM filesystem |
| 3508 | (initramfs), which is used during boot. Supported formats are the |
| 3509 | same as those supported by the |
| 3510 | :term:`IMAGE_FSTYPES` variable. |
| 3511 | |
| 3512 | The default value of this variable, which is set in the |
| 3513 | ``meta/conf/bitbake.conf`` configuration file in the |
| 3514 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's |
| 3515 | initramfs mechanism, as opposed to the initial RAM filesystem |
| 3516 | `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects |
| 3517 | an optionally compressed cpio archive. |
| 3518 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3519 | :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3520 | Specifies the :term:`PROVIDES` name of an image |
| 3521 | recipe that is used to build an initial RAM filesystem (initramfs) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3522 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3523 | additional recipe to be built as a dependency to whatever root |
| 3524 | filesystem recipe you might be using (e.g. ``core-image-sato``). The |
| 3525 | initramfs image recipe you provide should set |
| 3526 | :term:`IMAGE_FSTYPES` to |
| 3527 | :term:`INITRAMFS_FSTYPES`. |
| 3528 | |
| 3529 | An initramfs image provides a temporary root filesystem used for |
| 3530 | early system initialization (e.g. loading of modules needed to locate |
| 3531 | and mount the "real" root filesystem). |
| 3532 | |
| 3533 | .. note:: |
| 3534 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3535 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` |
| 3536 | recipe in the :term:`Source Directory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3537 | for an example initramfs recipe. To select this sample recipe as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3538 | the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3539 | to "core-image-minimal-initramfs". |
| 3540 | |
| 3541 | You can also find more information by referencing the |
| 3542 | ``meta-poky/conf/local.conf.sample.extended`` configuration file in |
| 3543 | the Source Directory, the :ref:`image <ref-classes-image>` class, |
| 3544 | 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] | 3545 | the :term:`INITRAMFS_IMAGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3546 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3547 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3548 | initramfs image is built. |
| 3549 | |
| 3550 | For more information, you can also see the |
| 3551 | :term:`INITRAMFS_IMAGE_BUNDLE` |
| 3552 | variable, which allows the generated image to be bundled inside the |
| 3553 | kernel image. Additionally, for information on creating an initramfs |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3554 | 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] | 3555 | in the Yocto Project Development Tasks Manual. |
| 3556 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3557 | :term:`INITRAMFS_IMAGE_BUNDLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3558 | Controls whether or not the image recipe specified by |
| 3559 | :term:`INITRAMFS_IMAGE` is run through an |
| 3560 | extra pass |
| 3561 | (:ref:`ref-tasks-bundle_initramfs`) during |
| 3562 | kernel compilation in order to build a single binary that contains |
| 3563 | both the kernel image and the initial RAM filesystem (initramfs) |
| 3564 | image. This makes use of the |
| 3565 | :term:`CONFIG_INITRAMFS_SOURCE` kernel |
| 3566 | feature. |
| 3567 | |
| 3568 | .. note:: |
| 3569 | |
| 3570 | Using an extra compilation pass to bundle the initramfs avoids a |
| 3571 | circular dependency between the kernel recipe and the initramfs |
| 3572 | recipe should the initramfs include kernel modules. Should that be |
| 3573 | the case, the initramfs recipe depends on the kernel for the |
| 3574 | kernel modules, and the kernel depends on the initramfs recipe |
| 3575 | since the initramfs is bundled inside the kernel image. |
| 3576 | |
| 3577 | The combined binary is deposited into the ``tmp/deploy`` directory, |
| 3578 | which is part of the :term:`Build Directory`. |
| 3579 | |
| 3580 | Setting the variable to "1" in a configuration file causes the |
| 3581 | OpenEmbedded build system to generate a kernel image with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3582 | initramfs specified in :term:`INITRAMFS_IMAGE` bundled within:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3583 | |
| 3584 | INITRAMFS_IMAGE_BUNDLE = "1" |
| 3585 | |
| 3586 | By default, the |
| 3587 | :ref:`kernel <ref-classes-kernel>` class sets this variable to a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3588 | null string as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3589 | |
| 3590 | INITRAMFS_IMAGE_BUNDLE ?= "" |
| 3591 | |
| 3592 | .. note:: |
| 3593 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3594 | You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3595 | configuration file. You cannot set the variable in a recipe file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3596 | |
| 3597 | See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3598 | :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] | 3599 | file for additional information. Also, for information on creating an |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3600 | 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] | 3601 | in the Yocto Project Development Tasks Manual. |
| 3602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3603 | :term:`INITRAMFS_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3604 | The link name of the initial RAM filesystem image. This variable is |
| 3605 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3606 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3607 | |
| 3608 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" |
| 3609 | |
| 3610 | The value of the |
| 3611 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3612 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3613 | |
| 3614 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 3615 | |
| 3616 | See the :term:`MACHINE` variable for additional |
| 3617 | information. |
| 3618 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3619 | :term:`INITRAMFS_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3620 | The base name of the initial RAM filesystem image. This variable is |
| 3621 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3622 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3623 | |
| 3624 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" |
| 3625 | |
| 3626 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3627 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3628 | |
| 3629 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3630 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3631 | :term:`INITRD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3632 | Indicates list of filesystem images to concatenate and use as an |
| 3633 | initial RAM disk (``initrd``). |
| 3634 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3635 | The :term:`INITRD` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3636 | :ref:`image-live <ref-classes-image-live>` class. |
| 3637 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3638 | :term:`INITRD_IMAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3639 | When building a "live" bootable image (i.e. when |
| 3640 | :term:`IMAGE_FSTYPES` contains "live"), |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3641 | :term:`INITRD_IMAGE` specifies the image recipe that should be built to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3642 | provide the initial RAM disk image. The default value is |
| 3643 | "core-image-minimal-initramfs". |
| 3644 | |
| 3645 | See the :ref:`image-live <ref-classes-image-live>` class for more |
| 3646 | information. |
| 3647 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3648 | :term:`INITSCRIPT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3649 | The filename of the initialization script as installed to |
| 3650 | ``${sysconfdir}/init.d``. |
| 3651 | |
| 3652 | This variable is used in recipes when using ``update-rc.d.bbclass``. |
| 3653 | The variable is mandatory. |
| 3654 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3655 | :term:`INITSCRIPT_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3656 | A list of the packages that contain initscripts. If multiple packages |
| 3657 | are specified, you need to append the package name to the other |
| 3658 | ``INITSCRIPT_*`` as an override. |
| 3659 | |
| 3660 | This variable is used in recipes when using ``update-rc.d.bbclass``. |
| 3661 | The variable is optional and defaults to the :term:`PN` |
| 3662 | variable. |
| 3663 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3664 | :term:`INITSCRIPT_PARAMS` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3665 | 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] | 3666 | |
| 3667 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." |
| 3668 | |
| 3669 | In this example, the script has a runlevel of 99, starts the script |
| 3670 | in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. |
| 3671 | |
| 3672 | The variable's default value is "defaults", which is set in the |
| 3673 | :ref:`update-rc.d <ref-classes-update-rc.d>` class. |
| 3674 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3675 | The value in :term:`INITSCRIPT_PARAMS` is passed through to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3676 | ``update-rc.d`` command. For more information on valid parameters, |
| 3677 | please see the ``update-rc.d`` manual page at |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 3678 | 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] | 3679 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3680 | :term:`INSANE_SKIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3681 | Specifies the QA checks to skip for a specific package within a |
| 3682 | recipe. For example, to skip the check for symbolic link ``.so`` |
| 3683 | files in the main package of a recipe, add the following to the |
| 3684 | recipe. The package name override must be used, which in this example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3685 | is ``${PN}``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3686 | |
| 3687 | INSANE_SKIP_${PN} += "dev-so" |
| 3688 | |
| 3689 | See the ":ref:`insane.bbclass <ref-classes-insane>`" section for a |
| 3690 | list of the valid QA checks you can specify using this variable. |
| 3691 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3692 | :term:`INSTALL_TIMEZONE_FILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3693 | By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3694 | Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3695 | configuration level to disable this behavior. |
| 3696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3697 | :term:`IPK_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3698 | When the IPK backend is in use and package management is enabled on |
| 3699 | the target, you can use this variable to set up ``opkg`` in the |
| 3700 | target image to point to package feeds on a nominated server. Once |
| 3701 | the feed is established, you can perform installations or upgrades |
| 3702 | using the package manager at runtime. |
| 3703 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3704 | :term:`KARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3705 | Defines the kernel architecture used when assembling the |
| 3706 | configuration. Architectures supported for this release are: |
| 3707 | |
| 3708 | - powerpc |
| 3709 | - i386 |
| 3710 | - x86_64 |
| 3711 | - arm |
| 3712 | - qemu |
| 3713 | - mips |
| 3714 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 3715 | 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] | 3716 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3717 | :term:`KBRANCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3718 | A regular expression used by the build process to explicitly identify |
| 3719 | the kernel branch that is validated, patched, and configured during a |
| 3720 | build. You must set this variable to ensure the exact kernel branch |
| 3721 | you want is being used by the build process. |
| 3722 | |
| 3723 | Values for this variable are set in the kernel's recipe file and the |
| 3724 | kernel's append file. For example, if you are using the |
| 3725 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3726 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3727 | is set as follows in that kernel recipe file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3728 | |
| 3729 | KBRANCH ?= "standard/base" |
| 3730 | |
| 3731 | This variable is also used from the kernel's append file to identify |
| 3732 | the kernel branch specific to a particular machine or target |
| 3733 | hardware. Continuing with the previous kernel example, the kernel's |
| 3734 | append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the |
| 3735 | BSP layer for a given machine. For example, the append file for the |
| 3736 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA |
| 3737 | machines (``meta-yocto-bsp``) is named |
| 3738 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3739 | Here are the related statements from that append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3740 | |
| 3741 | KBRANCH_genericx86 = "standard/base" |
| 3742 | KBRANCH_genericx86-64 = "standard/base" |
| 3743 | KBRANCH_edgerouter = "standard/edgerouter" |
| 3744 | KBRANCH_beaglebone = "standard/beaglebone" |
| 3745 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3746 | The :term:`KBRANCH` statements |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3747 | identify the kernel branch to use when building for each supported |
| 3748 | BSP. |
| 3749 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3750 | :term:`KBUILD_DEFCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3751 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 3752 | class, specifies an "in-tree" kernel configuration file for use |
| 3753 | during a kernel build. |
| 3754 | |
| 3755 | Typically, when using a ``defconfig`` to configure a kernel during a |
| 3756 | build, you place the file in your layer in the same manner as you |
| 3757 | would place patch files and configuration fragment files (i.e. |
| 3758 | "out-of-tree"). However, if you want to use a ``defconfig`` file that |
| 3759 | 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] | 3760 | :term:`KBUILD_DEFCONFIG` variable and append the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3761 | :term:`KMACHINE` variable to point to the |
| 3762 | ``defconfig`` file. |
| 3763 | |
| 3764 | 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] | 3765 | using the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3766 | |
| 3767 | KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file |
| 3768 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3769 | Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3770 | a ``defconfig`` file named "bcm2709_defconfig":: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3771 | |
| 3772 | KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig" |
| 3773 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3774 | As an alternative, you can use the following within your append file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3775 | |
| 3776 | KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file |
| 3777 | |
| 3778 | For more |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3779 | information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 3780 | ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3781 | section in the Yocto Project Linux Kernel Development Manual. |
| 3782 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3783 | :term:`KCONFIG_MODE` |
| 3784 | When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 3785 | class, specifies the kernel configuration values to use for options |
| 3786 | not specified in the provided ``defconfig`` file. Valid options are:: |
| 3787 | |
| 3788 | KCONFIG_MODE = "alldefconfig" |
| 3789 | KCONFIG_MODE = "allnoconfig" |
| 3790 | |
| 3791 | In ``alldefconfig`` mode the options not explicitly specified will be |
| 3792 | assigned their Kconfig default value. In ``allnoconfig`` mode the |
| 3793 | options not explicitly specified will be disabled in the kernel |
| 3794 | config. |
| 3795 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3796 | 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] | 3797 | the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file |
| 3798 | will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed |
| 3799 | in ``${WORKDIR}`` through a meta-layer will be handled in |
| 3800 | ``allnoconfig`` mode. |
| 3801 | |
| 3802 | An "in-tree" ``defconfig`` file can be selected via the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3803 | :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] | 3804 | be explicitly set. |
| 3805 | |
| 3806 | A ``defconfig`` file compatible with ``allnoconfig`` mode can be |
| 3807 | generated by copying the ``.config`` file from a working Linux kernel |
| 3808 | build, renaming it to ``defconfig`` and placing it into the Linux |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3809 | kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3810 | not need to be explicitly set. |
| 3811 | |
| 3812 | A ``defconfig`` file compatible with ``alldefconfig`` mode can be |
| 3813 | generated using the |
| 3814 | :ref:`ref-tasks-savedefconfig` |
| 3815 | task and placed into the Linux kernel ``${WORKDIR}`` through your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3816 | meta-layer. Explicitely set :term:`KCONFIG_MODE`:: |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3817 | |
| 3818 | KCONFIG_MODE = "alldefconfig" |
| 3819 | |
| 3820 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3821 | :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3822 | Specifies an alternate kernel image type for creation in addition to |
| 3823 | the kernel image type specified using the |
| 3824 | :term:`KERNEL_IMAGETYPE` variable. |
| 3825 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3826 | :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3827 | 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] | 3828 | name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3829 | variable. |
| 3830 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3831 | The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3832 | ``meta/classes/kernel-artifact-names.bbclass`` file, has the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3833 | following default value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3834 | |
| 3835 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3836 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 3837 | See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE` |
| 3838 | and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3839 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3840 | :term:`KERNEL_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3841 | A list of classes defining kernel image types that the |
| 3842 | :ref:`kernel <ref-classes-kernel>` class should inherit. You |
| 3843 | typically append this variable to enable extended image types. An |
| 3844 | example is the "kernel-fitimage", which enables fitImage support and |
| 3845 | resides in ``meta/classes/kernel-fitimage.bbclass``. You can register |
| 3846 | custom kernel image types with the ``kernel`` class using this |
| 3847 | variable. |
| 3848 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3849 | :term:`KERNEL_DEVICETREE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3850 | Specifies the name of the generated Linux kernel device tree (i.e. |
| 3851 | the ``.dtb``) file. |
| 3852 | |
| 3853 | .. note:: |
| 3854 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 3855 | There is legacy support for specifying the full path to the device |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 3856 | tree. However, providing just the ``.dtb`` file is preferred. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3857 | |
| 3858 | In order to use this variable, the |
| 3859 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 3860 | be inherited. |
| 3861 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3862 | :term:`KERNEL_DTB_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3863 | The link name of the kernel device tree binary (DTB). This variable |
| 3864 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3865 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3866 | |
| 3867 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 3868 | |
| 3869 | The |
| 3870 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3871 | the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3872 | |
| 3873 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 3874 | |
| 3875 | See the :term:`MACHINE` variable for additional |
| 3876 | information. |
| 3877 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3878 | :term:`KERNEL_DTB_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3879 | The base name of the kernel device tree binary (DTB). This variable |
| 3880 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3881 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3882 | |
| 3883 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 3884 | |
| 3885 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3886 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3887 | |
| 3888 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3889 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 3890 | :term:`KERNEL_DTC_FLAGS` |
| 3891 | Specifies the ``dtc`` flags that are passed to the Linux kernel build |
| 3892 | system when generating the device trees (via ``DTC_FLAGS`` environment |
| 3893 | variable). |
| 3894 | |
| 3895 | In order to use this variable, the |
| 3896 | :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must |
| 3897 | be inherited. |
| 3898 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3899 | :term:`KERNEL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3900 | Specifies additional ``make`` command-line arguments the OpenEmbedded |
| 3901 | build system passes on when compiling the kernel. |
| 3902 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3903 | :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3904 | Includes additional kernel metadata. In the OpenEmbedded build |
| 3905 | system, the default Board Support Packages (BSPs) |
| 3906 | :term:`Metadata` is provided through the |
| 3907 | :term:`KMACHINE` and :term:`KBRANCH` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3908 | variables. You can use the :term:`KERNEL_FEATURES` variable from within |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3909 | the kernel recipe or kernel append file to further add metadata for |
| 3910 | all BSPs or specific BSPs. |
| 3911 | |
| 3912 | The metadata you add through this variable includes config fragments |
| 3913 | and features descriptions, which usually includes patches as well as |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3914 | config fragments. You typically override the :term:`KERNEL_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3915 | variable for a specific machine. In this way, you can provide |
| 3916 | validated, but optional, sets of kernel configurations and features. |
| 3917 | |
| 3918 | For example, the following example from the ``linux-yocto-rt_4.12`` |
| 3919 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs |
| 3920 | as well as "virtio" configurations to all QEMU machines. The last two |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3921 | statements add specific configurations to targeted machine types:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3922 | |
| 3923 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" |
| 3924 | KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}" |
| 3925 | KERNEL_FEATURES_append_qemuall = "cfg/virtio.scc" |
| 3926 | KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" |
| 3927 | KERNEL_FEATURES_append_qemux86-64 = "cfg/sound.scc" |
| 3928 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3929 | :term:`KERNEL_FIT_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3930 | The link name of the kernel flattened image tree (FIT) image. This |
| 3931 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3932 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3933 | |
| 3934 | KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 3935 | |
| 3936 | The value of the |
| 3937 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3938 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3939 | |
| 3940 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 3941 | |
| 3942 | See the :term:`MACHINE` variable for additional |
| 3943 | information. |
| 3944 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3945 | :term:`KERNEL_FIT_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3946 | The base name of the kernel flattened image tree (FIT) image. This |
| 3947 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3948 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3949 | |
| 3950 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 3951 | |
| 3952 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3953 | variable, which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3954 | |
| 3955 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3956 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3957 | :term:`KERNEL_IMAGE_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3958 | 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] | 3959 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3960 | |
| 3961 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 3962 | |
| 3963 | The value of |
| 3964 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3965 | file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3966 | |
| 3967 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 3968 | |
| 3969 | See the :term:`MACHINE` variable for additional |
| 3970 | information. |
| 3971 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3972 | :term:`KERNEL_IMAGE_MAXSIZE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3973 | Specifies the maximum size of the kernel image file in kilobytes. If |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3974 | :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] | 3975 | checked against the set value during the |
| 3976 | :ref:`ref-tasks-sizecheck` task. The task fails if |
| 3977 | the kernel image file is larger than the setting. |
| 3978 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 3979 | :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3980 | limited amount of space in which the kernel image must be stored. |
| 3981 | |
| 3982 | By default, this variable is not set, which means the size of the |
| 3983 | kernel image is not checked. |
| 3984 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3985 | :term:`KERNEL_IMAGE_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3986 | 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] | 3987 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3988 | |
| 3989 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 3990 | |
| 3991 | The value of the |
| 3992 | :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3993 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3994 | |
| 3995 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 3996 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 3997 | :term:`KERNEL_IMAGETYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 3998 | The type of kernel to build for a device, usually set by the machine |
| 3999 | configuration files and defaults to "zImage". This variable is used |
| 4000 | when building the kernel and is passed to ``make`` as the target to |
| 4001 | build. |
| 4002 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4003 | 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] | 4004 | specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4005 | variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4006 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4007 | :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4008 | Lists kernel modules that need to be auto-loaded during boot. |
| 4009 | |
| 4010 | .. note:: |
| 4011 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4012 | This variable replaces the deprecated :term:`module_autoload` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4013 | variable. |
| 4014 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4015 | You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4016 | can be recognized by the kernel recipe or by an out-of-tree kernel |
| 4017 | module recipe (e.g. a machine configuration file, a distribution |
| 4018 | configuration file, an append file for the recipe, or the recipe |
| 4019 | itself). |
| 4020 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4021 | Specify it as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4022 | |
| 4023 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" |
| 4024 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4025 | Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4026 | system to populate the ``/etc/modules-load.d/modname.conf`` file with |
| 4027 | the list of modules to be auto-loaded on boot. The modules appear |
| 4028 | 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] | 4029 | case:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4030 | |
| 4031 | KERNEL_MODULE_AUTOLOAD += "module_name" |
| 4032 | |
| 4033 | For information on how to populate the ``modname.conf`` file with |
| 4034 | ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. |
| 4035 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4036 | :term:`KERNEL_MODULE_PROBECONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4037 | Provides a list of modules for which the OpenEmbedded build system |
| 4038 | expects to find ``module_conf_``\ modname values that specify |
| 4039 | configuration for each of the modules. For information on how to |
| 4040 | provide those module configurations, see the |
| 4041 | :term:`module_conf_* <module_conf>` variable. |
| 4042 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4043 | :term:`KERNEL_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4044 | The location of the kernel sources. This variable is set to the value |
| 4045 | of the :term:`STAGING_KERNEL_DIR` within |
| 4046 | the :ref:`module <ref-classes-module>` class. For information on |
| 4047 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4048 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4049 | section in the Yocto Project Linux Kernel Development Manual. |
| 4050 | |
| 4051 | To help maximize compatibility with out-of-tree drivers used to build |
| 4052 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4053 | :term:`KERNEL_SRC` variable, which is identical to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4054 | the :term:`KERNEL_PATH` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4055 | used by external Makefiles to point to the kernel source directory. |
| 4056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4057 | :term:`KERNEL_SRC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4058 | The location of the kernel sources. This variable is set to the value |
| 4059 | of the :term:`STAGING_KERNEL_DIR` within |
| 4060 | the :ref:`module <ref-classes-module>` class. For information on |
| 4061 | how this variable is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4062 | ":ref:`kernel-dev/common:incorporating out-of-tree modules`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4063 | section in the Yocto Project Linux Kernel Development Manual. |
| 4064 | |
| 4065 | To help maximize compatibility with out-of-tree drivers used to build |
| 4066 | modules, the OpenEmbedded build system also recognizes and uses the |
| 4067 | :term:`KERNEL_PATH` variable, which is identical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4068 | to the :term:`KERNEL_SRC` variable. Both variables are common variables |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4069 | used by external Makefiles to point to the kernel source directory. |
| 4070 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4071 | :term:`KERNEL_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4072 | Specifies the version of the kernel as extracted from ``version.h`` |
| 4073 | or ``utsrelease.h`` within the kernel sources. Effects of setting |
| 4074 | this variable do not take affect until the kernel has been |
| 4075 | configured. Consequently, attempting to refer to this variable in |
| 4076 | contexts prior to configuration will not work. |
| 4077 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4078 | :term:`KERNELDEPMODDEPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4079 | Specifies whether the data referenced through |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4080 | :term:`PKGDATA_DIR` is needed or not. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4081 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4082 | 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] | 4083 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4084 | ``initramfs`` recipe. Setting the variable there when the data is not |
| 4085 | needed avoids a potential dependency loop. |
| 4086 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4087 | :term:`KFEATURE_DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4088 | Provides a short description of a configuration fragment. You use |
| 4089 | this variable in the ``.scc`` file that describes a configuration |
| 4090 | 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] | 4091 | to describe SMP being enabled:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4092 | |
| 4093 | define KFEATURE_DESCRIPTION "Enable SMP" |
| 4094 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4095 | :term:`KMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4096 | The machine as known by the kernel. Sometimes the machine name used |
| 4097 | by the kernel does not match the machine name used by the |
| 4098 | OpenEmbedded build system. For example, the machine name that the |
| 4099 | OpenEmbedded build system understands as ``core2-32-intel-common`` |
| 4100 | goes by a different name in the Linux Yocto kernel. The kernel |
| 4101 | understands that machine as ``intel-core2-32``. For cases like these, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4102 | the :term:`KMACHINE` variable maps the kernel machine name to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4103 | OpenEmbedded build system machine name. |
| 4104 | |
| 4105 | These mappings between different names occur in the Yocto Linux |
| 4106 | Kernel's ``meta`` branch. As an example take a look in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4107 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4108 | |
| 4109 | LINUX_VERSION_core2-32-intel-common = "3.19.0" |
| 4110 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" |
| 4111 | SRCREV_meta_core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" |
| 4112 | SRCREV_machine_core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" |
| 4113 | KMACHINE_core2-32-intel-common = "intel-core2-32" |
| 4114 | KBRANCH_core2-32-intel-common = "standard/base" |
| 4115 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" |
| 4116 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4117 | The :term:`KMACHINE` statement says |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4118 | that the kernel understands the machine name as "intel-core2-32". |
| 4119 | However, the OpenEmbedded build system understands the machine as |
| 4120 | "core2-32-intel-common". |
| 4121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4122 | :term:`KTYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4123 | Defines the kernel type to be used in assembling the configuration. |
| 4124 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4125 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4126 | section in the |
| 4127 | Yocto Project Linux Kernel Development Manual for more information on |
| 4128 | kernel types. |
| 4129 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4130 | You define the :term:`KTYPE` variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4131 | :ref:`kernel-dev/advanced:bsp descriptions`. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4132 | value you use must match the value used for the |
| 4133 | :term:`LINUX_KERNEL_TYPE` value used by the |
| 4134 | kernel recipe. |
| 4135 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4136 | :term:`LABELS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4137 | Provides a list of targets for automatic configuration. |
| 4138 | |
| 4139 | See the :ref:`grub-efi <ref-classes-grub-efi>` class for more |
| 4140 | information on how this variable is used. |
| 4141 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4142 | :term:`LAYERDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4143 | Lists the layers, separated by spaces, on which this recipe depends. |
| 4144 | Optionally, you can specify a specific layer version for a dependency |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4145 | 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] | 4146 | |
| 4147 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" |
| 4148 | |
| 4149 | In this previous example, |
| 4150 | version 3 of "anotherlayer" is compared against |
| 4151 | :term:`LAYERVERSION`\ ``_anotherlayer``. |
| 4152 | |
| 4153 | An error is produced if any dependency is missing or the version |
| 4154 | numbers (if specified) do not match exactly. This variable is used in |
| 4155 | the ``conf/layer.conf`` file and must be suffixed with the name of |
| 4156 | the specific layer (e.g. ``LAYERDEPENDS_mylayer``). |
| 4157 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4158 | :term:`LAYERDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4159 | When used inside the ``layer.conf`` configuration file, this variable |
| 4160 | provides the path of the current layer. This variable is not |
| 4161 | available outside of ``layer.conf`` and references are expanded |
| 4162 | immediately when parsing of the file completes. |
| 4163 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4164 | :term:`LAYERRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4165 | Lists the layers, separated by spaces, recommended for use with this |
| 4166 | layer. |
| 4167 | |
| 4168 | Optionally, you can specify a specific layer version for a |
| 4169 | recommendation by adding the version to the end of the layer name. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4170 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4171 | |
| 4172 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" |
| 4173 | |
| 4174 | In this previous example, version 3 of "anotherlayer" is compared |
| 4175 | against ``LAYERVERSION_anotherlayer``. |
| 4176 | |
| 4177 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4178 | suffixed with the name of the specific layer (e.g. |
| 4179 | ``LAYERRECOMMENDS_mylayer``). |
| 4180 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4181 | :term:`LAYERSERIES_COMPAT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4182 | Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4183 | a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4184 | allows the layer maintainer to indicate which combinations of the |
| 4185 | layer and OE-Core can be expected to work. The variable gives the |
| 4186 | system a way to detect when a layer has not been tested with new |
| 4187 | releases of OE-Core (e.g. the layer is not maintained). |
| 4188 | |
| 4189 | To specify the OE-Core versions for which a layer is compatible, use |
| 4190 | this variable in your layer's ``conf/layer.conf`` configuration file. |
| 4191 | For the list, use the Yocto Project |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4192 | :yocto_wiki:`Release Name </Releases>` (e.g. |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4193 | &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4194 | layer, use a space-separated list:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4195 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4196 | 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] | 4197 | |
| 4198 | .. note:: |
| 4199 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4200 | Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4201 | Compatible version 2 standard. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4202 | The OpenEmbedded build system produces a warning if the variable |
| 4203 | is not set for any given layer. |
| 4204 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4205 | See the ":ref:`dev-manual/common-tasks:creating your own layer`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4206 | section in the Yocto Project Development Tasks Manual. |
| 4207 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4208 | :term:`LAYERVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4209 | Optionally specifies the version of a layer as a single number. You |
| 4210 | can use this within :term:`LAYERDEPENDS` for |
| 4211 | another layer in order to depend on a specific version of the layer. |
| 4212 | This variable is used in the ``conf/layer.conf`` file and must be |
| 4213 | suffixed with the name of the specific layer (e.g. |
| 4214 | ``LAYERVERSION_mylayer``). |
| 4215 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4216 | :term:`LD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4217 | The minimal command and arguments used to run the linker. |
| 4218 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4219 | :term:`LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4220 | Specifies the flags to pass to the linker. This variable is exported |
| 4221 | to an environment variable and thus made visible to the software |
| 4222 | being built during the compilation step. |
| 4223 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4224 | Default initialization for :term:`LDFLAGS` varies depending on what is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4225 | being built: |
| 4226 | |
| 4227 | - :term:`TARGET_LDFLAGS` when building for the |
| 4228 | target |
| 4229 | |
| 4230 | - :term:`BUILD_LDFLAGS` when building for the |
| 4231 | build host (i.e. ``-native``) |
| 4232 | |
| 4233 | - :term:`BUILDSDK_LDFLAGS` when building for |
| 4234 | an SDK (i.e. ``nativesdk-``) |
| 4235 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4236 | :term:`LEAD_SONAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4237 | Specifies the lead (or primary) compiled library file (i.e. ``.so``) |
| 4238 | that the :ref:`debian <ref-classes-debian>` class applies its |
| 4239 | naming policy to given a recipe that packages multiple libraries. |
| 4240 | |
| 4241 | This variable works in conjunction with the ``debian`` class. |
| 4242 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4243 | :term:`LIC_FILES_CHKSUM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4244 | Checksums of the license text in the recipe source code. |
| 4245 | |
| 4246 | This variable tracks changes in license text of the source code |
| 4247 | files. If the license text is changed, it will trigger a build |
| 4248 | failure, which gives the developer an opportunity to review any |
| 4249 | license change. |
| 4250 | |
| 4251 | This variable must be defined for all recipes (unless |
| 4252 | :term:`LICENSE` is set to "CLOSED"). |
| 4253 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4254 | 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] | 4255 | section in the Yocto Project Development Tasks Manual. |
| 4256 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4257 | :term:`LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4258 | The list of source licenses for the recipe. Follow these rules: |
| 4259 | |
| 4260 | - Do not use spaces within individual license names. |
| 4261 | |
| 4262 | - Separate license names using \| (pipe) when there is a choice |
| 4263 | between licenses. |
| 4264 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4265 | - Separate license names using & (ampersand) when there are |
| 4266 | multiple licenses for different parts of the source. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4267 | |
| 4268 | - You can use spaces between license names. |
| 4269 | |
| 4270 | - For standard licenses, use the names of the files in |
| 4271 | ``meta/files/common-licenses/`` or the |
| 4272 | :term:`SPDXLICENSEMAP` flag names defined in |
| 4273 | ``meta/conf/licenses.conf``. |
| 4274 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4275 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4276 | |
| 4277 | LICENSE = "LGPLv2.1 | GPLv3" |
| 4278 | LICENSE = "MPL-1 & LGPLv2.1" |
| 4279 | LICENSE = "GPLv2+" |
| 4280 | |
| 4281 | The first example is from the |
| 4282 | recipes for Qt, which the user may choose to distribute under either |
| 4283 | the LGPL version 2.1 or GPL version 3. The second example is from |
| 4284 | Cairo where two licenses cover different parts of the source code. |
| 4285 | The final example is from ``sysstat``, which presents a single |
| 4286 | license. |
| 4287 | |
| 4288 | You can also specify licenses on a per-package basis to handle |
| 4289 | situations where components of the output have different licenses. |
| 4290 | For example, a piece of software whose code is licensed under GPLv2 |
| 4291 | but has accompanying documentation licensed under the GNU Free |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4292 | Documentation License 1.2 could be specified as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4293 | |
| 4294 | LICENSE = "GFDL-1.2 & GPLv2" |
| 4295 | LICENSE_${PN} = "GPLv2" |
| 4296 | LICENSE_${PN}-doc = "GFDL-1.2" |
| 4297 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4298 | :term:`LICENSE_CREATE_PACKAGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4299 | Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4300 | build system to create an extra package (i.e. |
| 4301 | ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add |
| 4302 | those packages to the |
| 4303 | :term:`RRECOMMENDS`\ ``_${PN}``. |
| 4304 | |
| 4305 | The ``${PN}-lic`` package installs a directory in |
| 4306 | ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base |
| 4307 | name, and installs files in that directory that contain license and |
| 4308 | copyright information (i.e. copies of the appropriate license files |
| 4309 | from ``meta/common-licenses`` that match the licenses specified in |
| 4310 | the :term:`LICENSE` variable of the recipe metadata |
| 4311 | and copies of files marked in |
| 4312 | :term:`LIC_FILES_CHKSUM` as containing |
| 4313 | license text). |
| 4314 | |
| 4315 | For related information on providing license text, see the |
| 4316 | :term:`COPY_LIC_DIRS` variable, the |
| 4317 | :term:`COPY_LIC_MANIFEST` variable, and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4318 | ":ref:`dev-manual/common-tasks:providing license text`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4319 | section in the Yocto Project Development Tasks Manual. |
| 4320 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4321 | :term:`LICENSE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4322 | Specifies additional flags for a recipe you must whitelist through |
| 4323 | :term:`LICENSE_FLAGS_WHITELIST` in |
| 4324 | order to allow the recipe to be built. When providing multiple flags, |
| 4325 | separate them with spaces. |
| 4326 | |
| 4327 | This value is independent of :term:`LICENSE` and is |
| 4328 | typically used to mark recipes that might require additional licenses |
| 4329 | in order to be used in a commercial product. For more information, |
| 4330 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4331 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4332 | section in the Yocto Project Development Tasks Manual. |
| 4333 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4334 | :term:`LICENSE_FLAGS_WHITELIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4335 | Lists license flags that when specified in |
| 4336 | :term:`LICENSE_FLAGS` within a recipe should not |
| 4337 | prevent that recipe from being built. This practice is otherwise |
| 4338 | known as "whitelisting" license flags. For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4339 | ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4340 | section in the Yocto Project Development Tasks Manual. |
| 4341 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4342 | :term:`LICENSE_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4343 | Path to additional licenses used during the build. By default, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4344 | OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4345 | directory that holds common license text used during the build. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4346 | :term:`LICENSE_PATH` variable allows you to extend that location to other |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4347 | areas that have additional licenses:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4348 | |
| 4349 | LICENSE_PATH += "path-to-additional-common-licenses" |
| 4350 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4351 | :term:`LINUX_KERNEL_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4352 | Defines the kernel type to be used in assembling the configuration. |
| 4353 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4354 | kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4355 | section in the |
| 4356 | Yocto Project Linux Kernel Development Manual for more information on |
| 4357 | kernel types. |
| 4358 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4359 | 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] | 4360 | "standard". Together with :term:`KMACHINE`, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4361 | :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4362 | the kernel tools to find the appropriate description within the |
| 4363 | kernel :term:`Metadata` with which to build out the sources |
| 4364 | and configuration. |
| 4365 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4366 | :term:`LINUX_VERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4367 | The Linux version from ``kernel.org`` on which the Linux kernel image |
| 4368 | being built using the OpenEmbedded build system is based. You define |
| 4369 | this variable in the kernel recipe. For example, the |
| 4370 | ``linux-yocto-3.4.bb`` kernel recipe found in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4371 | ``meta/recipes-kernel/linux`` defines the variables as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4372 | |
| 4373 | LINUX_VERSION ?= "3.4.24" |
| 4374 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4375 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4376 | for the recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4377 | |
| 4378 | PV = "${LINUX_VERSION}+git${SRCPV}" |
| 4379 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4380 | :term:`LINUX_VERSION_EXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4381 | A string extension compiled into the version string of the Linux |
| 4382 | kernel built with the OpenEmbedded build system. You define this |
| 4383 | variable in the kernel recipe. For example, the linux-yocto kernel |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4384 | recipes all define the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4385 | |
| 4386 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
| 4387 | |
| 4388 | Defining this variable essentially sets the Linux kernel |
| 4389 | configuration item ``CONFIG_LOCALVERSION``, which is visible through |
| 4390 | the ``uname`` command. Here is an example that shows the extension |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4391 | assuming it was set as previously shown:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4392 | |
| 4393 | $ uname -r |
| 4394 | 3.7.0-rc8-custom |
| 4395 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4396 | :term:`LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4397 | Specifies the directory to which the OpenEmbedded build system writes |
| 4398 | overall log files. The default directory is ``${TMPDIR}/log``. |
| 4399 | |
| 4400 | For the directory containing logs specific to each task, see the |
| 4401 | :term:`T` variable. |
| 4402 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4403 | :term:`MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4404 | Specifies the target device for which the image is built. You define |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4405 | :term:`MACHINE` in the ``local.conf`` file found in the |
| 4406 | :term:`Build Directory`. By default, :term:`MACHINE` is set to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4407 | "qemux86", which is an x86-based architecture machine to be emulated |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4408 | using QEMU:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4409 | |
| 4410 | MACHINE ?= "qemux86" |
| 4411 | |
| 4412 | The variable corresponds to a machine configuration file of the same |
| 4413 | name, through which machine-specific configurations are set. Thus, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4414 | when :term:`MACHINE` is set to "qemux86", the corresponding |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4415 | ``qemux86.conf`` machine configuration file can be found in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4416 | the :term:`Source Directory` in |
| 4417 | ``meta/conf/machine``. |
| 4418 | |
| 4419 | The list of machines supported by the Yocto Project as shipped |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4420 | include the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4421 | |
| 4422 | MACHINE ?= "qemuarm" |
| 4423 | MACHINE ?= "qemuarm64" |
| 4424 | MACHINE ?= "qemumips" |
| 4425 | MACHINE ?= "qemumips64" |
| 4426 | MACHINE ?= "qemuppc" |
| 4427 | MACHINE ?= "qemux86" |
| 4428 | MACHINE ?= "qemux86-64" |
| 4429 | MACHINE ?= "genericx86" |
| 4430 | MACHINE ?= "genericx86-64" |
| 4431 | MACHINE ?= "beaglebone" |
| 4432 | MACHINE ?= "edgerouter" |
| 4433 | |
| 4434 | The last five are Yocto Project reference hardware |
| 4435 | boards, which are provided in the ``meta-yocto-bsp`` layer. |
| 4436 | |
| 4437 | .. note:: |
| 4438 | |
| 4439 | Adding additional Board Support Package (BSP) layers to your |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4440 | configuration adds new possible settings for :term:`MACHINE`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4441 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4442 | :term:`MACHINE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4443 | Specifies the name of the machine-specific architecture. This |
| 4444 | variable is set automatically from :term:`MACHINE` or |
| 4445 | :term:`TUNE_PKGARCH`. You should not hand-edit |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4446 | the :term:`MACHINE_ARCH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4447 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4448 | :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4449 | A list of required machine-specific packages to install as part of |
| 4450 | the image being built. The build process depends on these packages |
| 4451 | being present. Furthermore, because this is a "machine-essential" |
| 4452 | variable, the list of packages are essential for the machine to boot. |
| 4453 | The impact of this variable affects images based on |
| 4454 | ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4455 | image. |
| 4456 | |
| 4457 | This variable is similar to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4458 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4459 | that the image being built has a build dependency on the variable's |
| 4460 | list of packages. In other words, the image will not build if a file |
| 4461 | in this list is not found. |
| 4462 | |
| 4463 | As an example, suppose the machine for which you are building |
| 4464 | requires ``example-init`` to be run during boot to initialize the |
| 4465 | 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] | 4466 | ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4467 | |
| 4468 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" |
| 4469 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4470 | :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4471 | A list of recommended machine-specific packages to install as part of |
| 4472 | the image being built. The build process does not depend on these |
| 4473 | packages being present. However, because this is a |
| 4474 | "machine-essential" variable, the list of packages are essential for |
| 4475 | the machine to boot. The impact of this variable affects images based |
| 4476 | on ``packagegroup-core-boot``, including the ``core-image-minimal`` |
| 4477 | image. |
| 4478 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4479 | This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4480 | variable with the exception that the image being built does not have |
| 4481 | a build dependency on the variable's list of packages. In other |
| 4482 | words, the image will still build if a package in this list is not |
| 4483 | found. Typically, this variable is used to handle essential kernel |
| 4484 | modules, whose functionality may be selected to be built into the |
| 4485 | kernel rather than as a module, in which case a package will not be |
| 4486 | produced. |
| 4487 | |
| 4488 | Consider an example where you have a custom kernel where a specific |
| 4489 | touchscreen driver is required for the machine to be usable. However, |
| 4490 | the driver can be built as a module or into the kernel depending on |
| 4491 | the kernel configuration. If the driver is built as a module, you |
| 4492 | want it to be installed. But, when the driver is built into the |
| 4493 | kernel, you still want the build to succeed. This variable sets up a |
| 4494 | "recommends" relationship so that in the latter case, the build will |
| 4495 | not fail due to the missing package. To accomplish this, assuming the |
| 4496 | package for the module was called ``kernel-module-ab123``, you would |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4497 | use the following in the machine's ``.conf`` configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4498 | |
| 4499 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
| 4500 | |
| 4501 | .. note:: |
| 4502 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4503 | In this example, the ``kernel-module-ab123`` recipe needs to |
| 4504 | explicitly set its :term:`PACKAGES` variable to ensure that BitBake |
| 4505 | does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to |
| 4506 | satisfy the dependency. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4507 | |
| 4508 | Some examples of these machine essentials are flash, screen, |
| 4509 | keyboard, mouse, or touchscreen drivers (depending on the machine). |
| 4510 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4511 | :term:`MACHINE_EXTRA_RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4512 | A list of machine-specific packages to install as part of the image |
| 4513 | being built that are not essential for the machine to boot. However, |
| 4514 | the build process for more fully-featured images depends on the |
| 4515 | packages being present. |
| 4516 | |
| 4517 | This variable affects all images based on ``packagegroup-base``, |
| 4518 | which does not include the ``core-image-minimal`` or |
| 4519 | ``core-image-full-cmdline`` images. |
| 4520 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4521 | The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4522 | with the exception that the image being built has a build dependency |
| 4523 | on the variable's list of packages. In other words, the image will |
| 4524 | not build if a file in this list is not found. |
| 4525 | |
| 4526 | An example is a machine that has WiFi capability but is not essential |
| 4527 | for the machine to boot the image. However, if you are building a |
| 4528 | more fully-featured image, you want to enable the WiFi. The package |
| 4529 | containing the firmware for the WiFi hardware is always expected to |
| 4530 | exist, so it is acceptable for the build process to depend upon |
| 4531 | finding the package. In this case, assuming the package for the |
| 4532 | firmware was called ``wifidriver-firmware``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4533 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4534 | |
| 4535 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" |
| 4536 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4537 | :term:`MACHINE_EXTRA_RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4538 | A list of machine-specific packages to install as part of the image |
| 4539 | being built that are not essential for booting the machine. The image |
| 4540 | being built has no build dependency on this list of packages. |
| 4541 | |
| 4542 | This variable affects only images based on ``packagegroup-base``, |
| 4543 | which does not include the ``core-image-minimal`` or |
| 4544 | ``core-image-full-cmdline`` images. |
| 4545 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4546 | This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4547 | with the exception that the image being built does not have a build |
| 4548 | dependency on the variable's list of packages. In other words, the |
| 4549 | image will build if a file in this list is not found. |
| 4550 | |
| 4551 | An example is a machine that has WiFi capability but is not essential |
| 4552 | For the machine to boot the image. However, if you are building a |
| 4553 | more fully-featured image, you want to enable WiFi. In this case, the |
| 4554 | package containing the WiFi kernel module will not be produced if the |
| 4555 | WiFi driver is built into the kernel, in which case you still want |
| 4556 | the build to succeed instead of failing as a result of the package |
| 4557 | not being found. To accomplish this, assuming the package for the |
| 4558 | module was called ``kernel-module-examplewifi``, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4559 | following in the ``.conf`` file for the machine:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4560 | |
| 4561 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" |
| 4562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4563 | :term:`MACHINE_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4564 | Specifies the list of hardware features the |
| 4565 | :term:`MACHINE` is capable of supporting. For related |
| 4566 | information on enabling features, see the |
| 4567 | :term:`DISTRO_FEATURES`, |
| 4568 | :term:`COMBINED_FEATURES`, and |
| 4569 | :term:`IMAGE_FEATURES` variables. |
| 4570 | |
| 4571 | For a list of hardware features supported by the Yocto Project as |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4572 | shipped, see the ":ref:`ref-features-machine`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4573 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4574 | :term:`MACHINE_FEATURES_BACKFILL` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4575 | Features to be added to :term:`MACHINE_FEATURES` if not also present in |
| 4576 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4577 | |
| 4578 | This variable is set in the ``meta/conf/bitbake.conf`` file. It is |
| 4579 | not intended to be user-configurable. It is best to just reference |
| 4580 | the variable to see which machine features are being backfilled for |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4581 | all machine configurations. See the ":ref:`ref-features-backfill`" |
| 4582 | section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4583 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4584 | :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4585 | Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be |
| 4586 | backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4587 | the ":ref:`ref-features-backfill`" section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4588 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4589 | :term:`MACHINEOVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4590 | A colon-separated list of overrides that apply to the current |
| 4591 | machine. By default, this list includes the value of |
| 4592 | :term:`MACHINE`. |
| 4593 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4594 | You can extend :term:`MACHINEOVERRIDES` to add extra overrides that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4595 | should apply to a machine. For example, all machines emulated in QEMU |
| 4596 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named |
| 4597 | ``meta/conf/machine/include/qemu.inc`` that prepends the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4598 | override to :term:`MACHINEOVERRIDES`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4599 | |
| 4600 | MACHINEOVERRIDES =. "qemuall:" |
| 4601 | |
| 4602 | This |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4603 | override allows variables to be overridden for all machines emulated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4604 | in QEMU, like in the following example from the ``connman-conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4605 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4606 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4607 | SRC_URI_append_qemuall = " file://wired.config \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4608 | file://wired-setup \ |
| 4609 | " |
| 4610 | |
| 4611 | The underlying mechanism behind |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4612 | :term:`MACHINEOVERRIDES` is simply that it is included in the default |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4613 | value of :term:`OVERRIDES`. |
| 4614 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4615 | :term:`MAINTAINER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4616 | The email address of the distribution maintainer. |
| 4617 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 4618 | :term:`METADATA_BRANCH` |
| 4619 | The branch currently checked out for the OpenEmbedded-Core layer (path |
| 4620 | determined by :term:`COREBASE`). |
| 4621 | |
| 4622 | :term:`METADATA_REVISION` |
| 4623 | The revision currently checked out for the OpenEmbedded-Core layer (path |
| 4624 | determined by :term:`COREBASE`). |
| 4625 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4626 | :term:`MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4627 | Specifies additional paths from which the OpenEmbedded build system |
| 4628 | gets source code. When the build system searches for source code, it |
| 4629 | first tries the local download directory. If that location fails, the |
| 4630 | build system tries locations defined by |
| 4631 | :term:`PREMIRRORS`, the upstream source, and then |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4632 | locations specified by :term:`MIRRORS` in that order. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4633 | |
| 4634 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4635 | the default value for :term:`MIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4636 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 4637 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4638 | :term:`MLPREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4639 | Specifies a prefix has been added to :term:`PN` to create a |
| 4640 | special version of a recipe or package (i.e. a Multilib version). The |
| 4641 | variable is used in places where the prefix needs to be added to or |
| 4642 | removed from a the name (e.g. the :term:`BPN` variable). |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4643 | :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] | 4644 | |
| 4645 | .. note:: |
| 4646 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4647 | The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4648 | historical and comes from a time when ``nativesdk`` was a suffix |
| 4649 | rather than a prefix on the recipe name. When ``nativesdk`` was turned |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4650 | 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] | 4651 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4652 | To help understand when :term:`MLPREFIX` might be needed, consider when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4653 | :term:`BBCLASSEXTEND` is used to provide a |
| 4654 | ``nativesdk`` version of a recipe in addition to the target version. |
| 4655 | If that recipe declares build-time dependencies on tasks in other |
| 4656 | recipes by using :term:`DEPENDS`, then a dependency on |
| 4657 | "foo" will automatically get rewritten to a dependency on |
| 4658 | "nativesdk-foo". However, dependencies like the following will not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4659 | get rewritten automatically:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4660 | |
| 4661 | do_foo[depends] += "recipe:do_foo" |
| 4662 | |
| 4663 | 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] | 4664 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4665 | |
| 4666 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" |
| 4667 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4668 | :term:`module_autoload` |
| 4669 | This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD` |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4670 | variable. You should replace all occurrences of :term:`module_autoload` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4671 | with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4672 | |
| 4673 | module_autoload_rfcomm = "rfcomm" |
| 4674 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4675 | should now be replaced with:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4676 | |
| 4677 | KERNEL_MODULE_AUTOLOAD += "rfcomm" |
| 4678 | |
| 4679 | See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. |
| 4680 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4681 | :term:`module_conf` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4682 | Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4683 | syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` |
| 4684 | file. |
| 4685 | |
| 4686 | You can use this variable anywhere that it can be recognized by the |
| 4687 | kernel recipe or out-of-tree kernel module recipe (e.g. a machine |
| 4688 | configuration file, a distribution configuration file, an append file |
| 4689 | for the recipe, or the recipe itself). If you use this variable, you |
| 4690 | must also be sure to list the module name in the |
| 4691 | :term:`KERNEL_MODULE_AUTOLOAD` |
| 4692 | variable. |
| 4693 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4694 | Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4695 | |
| 4696 | module_conf_module_name = "modprobe.d-syntax" |
| 4697 | |
| 4698 | You must use the kernel module name override. |
| 4699 | |
| 4700 | 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] | 4701 | the exact syntax you want to provide with :term:`module_conf`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4702 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4703 | Including :term:`module_conf` causes the OpenEmbedded build system to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4704 | populate the ``/etc/modprobe.d/modname.conf`` file with |
| 4705 | ``modprobe.d`` syntax lines. Here is an example that adds the options |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4706 | ``arg1`` and ``arg2`` to a module named ``mymodule``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4707 | |
| 4708 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" |
| 4709 | |
| 4710 | For information on how to specify kernel modules to auto-load on |
| 4711 | boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. |
| 4712 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4713 | :term:`MODULE_TARBALL_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4714 | Controls creation of the ``modules-*.tgz`` file. Set this variable to |
| 4715 | "0" to disable creation of this file, which contains all of the |
| 4716 | kernel modules resulting from a kernel build. |
| 4717 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4718 | :term:`MODULE_TARBALL_LINK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4719 | 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] | 4720 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4721 | |
| 4722 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
| 4723 | |
| 4724 | The value |
| 4725 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4726 | same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4727 | |
| 4728 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
| 4729 | |
| 4730 | See the :term:`MACHINE` variable for additional information. |
| 4731 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4732 | :term:`MODULE_TARBALL_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4733 | 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] | 4734 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4735 | |
| 4736 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
| 4737 | |
| 4738 | The value of the :term:`KERNEL_ARTIFACT_NAME` variable, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4739 | which is set in the same file, has the following value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4740 | |
| 4741 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 4742 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4743 | :term:`MULTIMACH_TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4744 | Uniquely identifies the type of the target system for which packages |
| 4745 | are being built. This variable allows output for different types of |
| 4746 | target systems to be put into different subdirectories of the same |
| 4747 | output directory. |
| 4748 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4749 | The default value of this variable is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4750 | |
| 4751 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} |
| 4752 | |
| 4753 | Some classes (e.g. |
| 4754 | :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4755 | :term:`MULTIMACH_TARGET_SYS` value. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4756 | |
| 4757 | See the :term:`STAMP` variable for an example. See the |
| 4758 | :term:`STAGING_DIR_TARGET` variable for more information. |
| 4759 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4760 | :term:`NATIVELSBSTRING` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4761 | A string identifying the host distribution. Strings consist of the |
| 4762 | host distributor ID followed by the release, as reported by the |
| 4763 | ``lsb_release`` tool or as read from ``/etc/lsb-release``. For |
| 4764 | example, when running a build on Ubuntu 12.10, the value is |
| 4765 | "Ubuntu-12.10". If this information is unable to be determined, the |
| 4766 | value resolves to "Unknown". |
| 4767 | |
| 4768 | This variable is used by default to isolate native shared state |
| 4769 | packages for different distributions (e.g. to avoid problems with |
| 4770 | ``glibc`` version incompatibilities). Additionally, the variable is |
| 4771 | checked against |
| 4772 | :term:`SANITY_TESTED_DISTROS` if that |
| 4773 | variable is set. |
| 4774 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4775 | :term:`NM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4776 | The minimal command and arguments to run ``nm``. |
| 4777 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4778 | :term:`NO_GENERIC_LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4779 | 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] | 4780 | recipe. There are packages, such as the linux-firmware package, with many |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4781 | licenses that are not in any way common. Also, new licenses are added |
| 4782 | occasionally to avoid introducing a lot of common license files, |
| 4783 | which are only applicable to a specific package. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4784 | :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] | 4785 | not exist in common licenses. |
| 4786 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4787 | 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] | 4788 | recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4789 | |
| 4790 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" |
| 4791 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4792 | Here is an example that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4793 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4794 | source:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4795 | |
| 4796 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
| 4797 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4798 | :term:`NO_RECOMMENDATIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4799 | Prevents installation of all "recommended-only" packages. |
| 4800 | Recommended-only packages are packages installed only through the |
| 4801 | :term:`RRECOMMENDS` variable). Setting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4802 | :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4803 | |
| 4804 | NO_RECOMMENDATIONS = "1" |
| 4805 | |
| 4806 | You can set this variable globally in your ``local.conf`` file or you |
| 4807 | 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] | 4808 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4809 | |
| 4810 | NO_RECOMMENDATIONS_pn-target_image = "1" |
| 4811 | |
| 4812 | It is important to realize that if you choose to not install packages |
| 4813 | using this variable and some other packages are dependent on them |
| 4814 | (i.e. listed in a recipe's :term:`RDEPENDS` |
| 4815 | variable), the OpenEmbedded build system ignores your request and |
| 4816 | will install the packages to avoid dependency errors. |
| 4817 | |
| 4818 | .. note:: |
| 4819 | |
| 4820 | Some recommended packages might be required for certain system |
| 4821 | functionality, such as kernel modules. It is up to you to add |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4822 | packages with the :term:`IMAGE_INSTALL` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4823 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4824 | This variable is only supported when using the IPK and RPM |
| 4825 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4826 | |
| 4827 | See the :term:`BAD_RECOMMENDATIONS` and |
| 4828 | the :term:`PACKAGE_EXCLUDE` variables for |
| 4829 | related information. |
| 4830 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4831 | :term:`NOAUTOPACKAGEDEBUG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4832 | Disables auto package from splitting ``.debug`` files. If a recipe |
| 4833 | requires ``FILES_${PN}-dbg`` to be set manually, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4834 | :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4835 | content of the debug package. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4836 | |
| 4837 | NOAUTOPACKAGEDEBUG = "1" |
| 4838 | FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" |
| 4839 | FILES_${PN}-dbg = "/usr/src/debug/" |
| 4840 | FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch" |
| 4841 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4842 | :term:`NON_MULTILIB_RECIPES` |
| 4843 | A list of recipes that should not be built for multilib. OE-Core's |
| 4844 | ``multilib.conf`` file defines a reasonable starting point for this |
| 4845 | list with:: |
| 4846 | |
| 4847 | NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot" |
| 4848 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4849 | :term:`OBJCOPY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4850 | The minimal command and arguments to run ``objcopy``. |
| 4851 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4852 | :term:`OBJDUMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4853 | The minimal command and arguments to run ``objdump``. |
| 4854 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4855 | :term:`OE_BINCONFIG_EXTRA_MANGLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4856 | When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, |
| 4857 | this variable specifies additional arguments passed to the "sed" |
| 4858 | command. The sed command alters any paths in configuration scripts |
| 4859 | that have been set up during compilation. Inheriting this class |
| 4860 | results in all paths in these scripts being changed to point into the |
| 4861 | ``sysroots/`` directory so that all builds that use the script will |
| 4862 | use the correct directories for the cross compiling layout. |
| 4863 | |
| 4864 | See the ``meta/classes/binconfig.bbclass`` in the |
| 4865 | :term:`Source Directory` for details on how this class |
| 4866 | applies these additional sed command arguments. For general |
| 4867 | information on the ``binconfig`` class, see the |
| 4868 | ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section. |
| 4869 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4870 | :term:`OE_IMPORTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4871 | An internal variable used to tell the OpenEmbedded build system what |
| 4872 | Python modules to import for every Python function run by the system. |
| 4873 | |
| 4874 | .. note:: |
| 4875 | |
| 4876 | Do not set this variable. It is for internal use only. |
| 4877 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4878 | :term:`OE_INIT_ENV_SCRIPT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4879 | The name of the build environment setup script for the purposes of |
| 4880 | setting up the environment within the extensible SDK. The default |
| 4881 | value is "oe-init-build-env". |
| 4882 | |
| 4883 | 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] | 4884 | :term:`OE_INIT_ENV_SCRIPT` variable to its name. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4885 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4886 | :term:`OE_TERMINAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4887 | Controls how the OpenEmbedded build system spawns interactive |
| 4888 | terminals on the host development system (e.g. using the BitBake |
| 4889 | command with the ``-c devshell`` command-line option). For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4890 | 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] | 4891 | the Yocto Project Development Tasks Manual. |
| 4892 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 4893 | You can use the following values for the :term:`OE_TERMINAL` variable: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4894 | |
| 4895 | - auto |
| 4896 | - gnome |
| 4897 | - xfce |
| 4898 | - rxvt |
| 4899 | - screen |
| 4900 | - konsole |
| 4901 | - none |
| 4902 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4903 | :term:`OEROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4904 | The directory from which the top-level build environment setup script |
| 4905 | is sourced. The Yocto Project provides a top-level build environment |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4906 | setup script: :ref:`structure-core-script`. When you run this |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4907 | script, the :term:`OEROOT` variable resolves to the directory that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4908 | contains the script. |
| 4909 | |
| 4910 | For additional information on how this variable is used, see the |
| 4911 | initialization script. |
| 4912 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4913 | :term:`OLDEST_KERNEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4914 | Declares the oldest version of the Linux kernel that the produced |
| 4915 | binaries must support. This variable is passed into the build of the |
| 4916 | Embedded GNU C Library (``glibc``). |
| 4917 | |
| 4918 | The default for this variable comes from the |
| 4919 | ``meta/conf/bitbake.conf`` configuration file. You can override this |
| 4920 | default by setting the variable in a custom distribution |
| 4921 | configuration file. |
| 4922 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4923 | :term:`OVERRIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4924 | A colon-separated list of overrides that currently apply. Overrides |
| 4925 | are a BitBake mechanism that allows variables to be selectively |
| 4926 | overridden at the end of parsing. The set of overrides in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4927 | :term:`OVERRIDES` represents the "state" during building, which includes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4928 | the current recipe being built, the machine for which it is being |
| 4929 | built, and so forth. |
| 4930 | |
| 4931 | 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] | 4932 | the colon-separated list in :term:`OVERRIDES`, then the following |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4933 | assignment will override ``FOO`` with the value "overridden" at the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4934 | end of parsing:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4935 | |
| 4936 | FOO_an-override = "overridden" |
| 4937 | |
| 4938 | See the |
| 4939 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
| 4940 | section in the BitBake User Manual for more information on the |
| 4941 | overrides mechanism. |
| 4942 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4943 | The default value of :term:`OVERRIDES` includes the values of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4944 | :term:`CLASSOVERRIDE`, |
| 4945 | :term:`MACHINEOVERRIDES`, and |
| 4946 | :term:`DISTROOVERRIDES` variables. Another |
| 4947 | important override included by default is ``pn-${PN}``. This override |
| 4948 | allows variables to be set for a single recipe within configuration |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4949 | (``.conf``) files. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4950 | |
| 4951 | FOO_pn-myrecipe = "myrecipe-specific value" |
| 4952 | |
| 4953 | .. note:: |
| 4954 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4955 | 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] | 4956 | in the output of the ``bitbake -e`` command. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4957 | ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4958 | Project Development Tasks Manual for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4959 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4960 | :term:`P` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4961 | The recipe name and version. :term:`P` is comprised of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4962 | |
| 4963 | ${PN}-${PV} |
| 4964 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4965 | :term:`PACKAGE_ADD_METADATA` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 4966 | This variable defines additional metadata to add to packages. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4967 | |
| 4968 | You may find you need to inject additional metadata into packages. |
| 4969 | This variable allows you to do that by setting the injected data as |
| 4970 | the value. Multiple fields can be added by splitting the content with |
| 4971 | the literal separator "\n". |
| 4972 | |
| 4973 | The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable |
| 4974 | to do package type specific settings. It can also be made package |
| 4975 | specific by using the package name as a suffix. |
| 4976 | |
| 4977 | You can find out more about applying this variable in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 4978 | ":ref:`dev-manual/common-tasks:adding custom metadata to packages`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4979 | section in the Yocto Project Development Tasks Manual. |
| 4980 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 4981 | :term:`PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4982 | The architecture of the resulting package or packages. |
| 4983 | |
| 4984 | By default, the value of this variable is set to |
| 4985 | :term:`TUNE_PKGARCH` when building for the |
| 4986 | target, :term:`BUILD_ARCH` when building for the |
| 4987 | build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the |
| 4988 | SDK. |
| 4989 | |
| 4990 | .. note:: |
| 4991 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 4992 | See :term:`SDK_ARCH` for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4993 | |
| 4994 | However, if your recipe's output packages are built specific to the |
| 4995 | target machine rather than generally for the architecture of the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 4996 | machine, you should set :term:`PACKAGE_ARCH` to the value of |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 4997 | :term:`MACHINE_ARCH` in the recipe as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 4998 | |
| 4999 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 5000 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5001 | :term:`PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5002 | Specifies a list of architectures compatible with the target machine. |
| 5003 | This variable is set automatically and should not normally be |
| 5004 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5005 | of priority. The default value for :term:`PACKAGE_ARCHS` is "all any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5006 | noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". |
| 5007 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5008 | :term:`PACKAGE_BEFORE_PN` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5009 | Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5010 | that those added packages can pick up files that would normally be |
| 5011 | included in the default package. |
| 5012 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5013 | :term:`PACKAGE_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5014 | This variable, which is set in the ``local.conf`` configuration file |
| 5015 | found in the ``conf`` folder of the |
| 5016 | :term:`Build Directory`, specifies the package manager the |
| 5017 | OpenEmbedded build system uses when packaging data. |
| 5018 | |
| 5019 | You can provide one or more of the following arguments for the |
| 5020 | variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk |
| 5021 | package_tar" |
| 5022 | |
| 5023 | .. note:: |
| 5024 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5025 | While it is a legal option, the ``package_tar`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5026 | class has limited functionality due to no support for package |
| 5027 | dependencies by that backend. Therefore, it is recommended that |
| 5028 | you do not use it. |
| 5029 | |
| 5030 | The build system uses only the first argument in the list as the |
| 5031 | package manager when creating your image or SDK. However, packages |
| 5032 | will be created using any additional packaging classes you specify. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5033 | For example, if you use the following in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5034 | |
| 5035 | PACKAGE_CLASSES ?= "package_ipk" |
| 5036 | |
| 5037 | The OpenEmbedded build system uses |
| 5038 | the IPK package manager to create your image or SDK. |
| 5039 | |
| 5040 | For information on packaging and build performance effects as a |
| 5041 | result of the package manager in use, see the |
| 5042 | ":ref:`package.bbclass <ref-classes-package>`" section. |
| 5043 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5044 | :term:`PACKAGE_DEBUG_SPLIT_STYLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5045 | Determines how to split up the binary and debug information when |
| 5046 | creating ``*-dbg`` packages to be used with the GNU Project Debugger |
| 5047 | (GDB). |
| 5048 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5049 | With the :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable, you can control |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5050 | where debug information, which can include or exclude source files, |
| 5051 | is stored: |
| 5052 | |
| 5053 | - ".debug": Debug symbol files are placed next to the binary in a |
| 5054 | ``.debug`` directory on the target. For example, if a binary is |
| 5055 | installed into ``/bin``, the corresponding debug symbol files are |
| 5056 | installed in ``/bin/.debug``. Source files are placed in |
| 5057 | ``/usr/src/debug``. |
| 5058 | |
| 5059 | - "debug-file-directory": Debug symbol files are placed under |
| 5060 | ``/usr/lib/debug`` on the target, and separated by the path from |
| 5061 | where the binary is installed. For example, if a binary is |
| 5062 | installed in ``/bin``, the corresponding debug symbols are |
| 5063 | installed in ``/usr/lib/debug/bin``. Source files are placed in |
| 5064 | ``/usr/src/debug``. |
| 5065 | |
| 5066 | - "debug-without-src": The same behavior as ".debug" previously |
| 5067 | described with the exception that no source files are installed. |
| 5068 | |
| 5069 | - "debug-with-srcpkg": The same behavior as ".debug" previously |
| 5070 | described with the exception that all source files are placed in a |
| 5071 | separate ``*-src`` pkg. This is the default behavior. |
| 5072 | |
| 5073 | You can find out more about debugging using GDB by reading the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5074 | ":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] | 5075 | in the Yocto Project Development Tasks Manual. |
| 5076 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5077 | :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5078 | Prevents specific packages from being installed when you are |
| 5079 | installing complementary packages. |
| 5080 | |
| 5081 | You might find that you want to prevent installing certain packages |
| 5082 | when you are installing complementary packages. For example, if you |
| 5083 | are using :term:`IMAGE_FEATURES` to install |
| 5084 | ``dev-pkgs``, you might not want to install all packages from a |
| 5085 | particular multilib. If you find yourself in this situation, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5086 | use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5087 | expressions to match the packages you want to exclude. |
| 5088 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5089 | :term:`PACKAGE_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5090 | Lists packages that should not be installed into an image. For |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5091 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5092 | |
| 5093 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." |
| 5094 | |
| 5095 | You can set this variable globally in your ``local.conf`` file or you |
| 5096 | 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] | 5097 | override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5098 | |
| 5099 | PACKAGE_EXCLUDE_pn-target_image = "package_name" |
| 5100 | |
| 5101 | If you choose to not install a package using this variable and some |
| 5102 | other package is dependent on it (i.e. listed in a recipe's |
| 5103 | :term:`RDEPENDS` variable), the OpenEmbedded build |
| 5104 | system generates a fatal installation error. Because the build system |
| 5105 | halts the process with a fatal error, you can use the variable with |
| 5106 | an iterative development process to remove specific components from a |
| 5107 | system. |
| 5108 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 5109 | This variable is supported only when using the IPK and RPM |
| 5110 | packaging backends. DEB is not supported. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5111 | |
| 5112 | See the :term:`NO_RECOMMENDATIONS` and the |
| 5113 | :term:`BAD_RECOMMENDATIONS` variables for |
| 5114 | related information. |
| 5115 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5116 | :term:`PACKAGE_EXTRA_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5117 | Specifies the list of architectures compatible with the device CPU. |
| 5118 | This variable is useful when you build for several different devices |
| 5119 | that use miscellaneous processors such as XScale and ARM926-EJS. |
| 5120 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5121 | :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5122 | Optionally specifies the package architectures used as part of the |
| 5123 | package feed URIs during the build. When used, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5124 | :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5125 | URI, which is constructed using the |
| 5126 | :term:`PACKAGE_FEED_URIS` and |
| 5127 | :term:`PACKAGE_FEED_BASE_PATHS` |
| 5128 | variables. |
| 5129 | |
| 5130 | .. note:: |
| 5131 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5132 | You can use the :term:`PACKAGE_FEED_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5133 | variable to whitelist specific package architectures. If you do |
| 5134 | not need to whitelist specific architectures, which is a common |
| 5135 | case, you can omit this variable. Omitting the variable results in |
| 5136 | all available architectures for the current machine being included |
| 5137 | into remote package feeds. |
| 5138 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5139 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5140 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5141 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5142 | |
| 5143 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5144 | https://example.com/packagerepos/updates" |
| 5145 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5146 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5147 | |
| 5148 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5149 | |
| 5150 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5151 | |
| 5152 | https://example.com/packagerepos/release/rpm/all |
| 5153 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5154 | https://example.com/packagerepos/release/rpm-dev/all |
| 5155 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5156 | https://example.com/packagerepos/updates/rpm/all |
| 5157 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5158 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5159 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5160 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5161 | :term:`PACKAGE_FEED_BASE_PATHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5162 | Specifies the base path used when constructing package feed URIs. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5163 | :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] | 5164 | package feed URI used by the OpenEmbedded build system. The base path |
| 5165 | lies between the :term:`PACKAGE_FEED_URIS` |
| 5166 | and :term:`PACKAGE_FEED_ARCHS` variables. |
| 5167 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5168 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5169 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5170 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5171 | |
| 5172 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5173 | https://example.com/packagerepos/updates" |
| 5174 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5175 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5176 | |
| 5177 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5178 | |
| 5179 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5180 | |
| 5181 | https://example.com/packagerepos/release/rpm/all |
| 5182 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5183 | https://example.com/packagerepos/release/rpm-dev/all |
| 5184 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5185 | https://example.com/packagerepos/updates/rpm/all |
| 5186 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5187 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5188 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5189 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5190 | :term:`PACKAGE_FEED_URIS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5191 | Specifies the front portion of the package feed URI used by the |
| 5192 | OpenEmbedded build system. Each final package feed URI is comprised |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5193 | of :term:`PACKAGE_FEED_URIS`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5194 | :term:`PACKAGE_FEED_BASE_PATHS`, and |
| 5195 | :term:`PACKAGE_FEED_ARCHS` variables. |
| 5196 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5197 | Consider the following example where the :term:`PACKAGE_FEED_URIS`, |
| 5198 | :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5199 | defined in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5200 | |
| 5201 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
| 5202 | https://example.com/packagerepos/updates" |
| 5203 | PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" |
| 5204 | PACKAGE_FEED_ARCHS = "all core2-64" |
| 5205 | |
| 5206 | Given these settings, the resulting package feeds are as follows: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5207 | |
| 5208 | .. code-block:: none |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5209 | |
| 5210 | https://example.com/packagerepos/release/rpm/all |
| 5211 | https://example.com/packagerepos/release/rpm/core2-64 |
| 5212 | https://example.com/packagerepos/release/rpm-dev/all |
| 5213 | https://example.com/packagerepos/release/rpm-dev/core2-64 |
| 5214 | https://example.com/packagerepos/updates/rpm/all |
| 5215 | https://example.com/packagerepos/updates/rpm/core2-64 |
| 5216 | https://example.com/packagerepos/updates/rpm-dev/all |
| 5217 | https://example.com/packagerepos/updates/rpm-dev/core2-64 |
| 5218 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5219 | :term:`PACKAGE_INSTALL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5220 | The final list of packages passed to the package manager for |
| 5221 | installation into the image. |
| 5222 | |
| 5223 | Because the package manager controls actual installation of all |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5224 | packages, the list of packages passed using :term:`PACKAGE_INSTALL` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5225 | not the final list of packages that are actually installed. This |
| 5226 | variable is internal to the image construction code. Consequently, in |
| 5227 | general, you should use the |
| 5228 | :term:`IMAGE_INSTALL` variable to specify |
| 5229 | packages for installation. The exception to this is when working with |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5230 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5231 | image. When working with an initial RAM filesystem (initramfs) image, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5232 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5233 | 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] | 5234 | in the Yocto Project Development Tasks Manual. |
| 5235 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5236 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5237 | Specifies a list of packages the OpenEmbedded build system attempts |
| 5238 | to install when creating an image. If a listed package fails to |
| 5239 | install, the build system does not generate an error. This variable |
| 5240 | is generally not user-defined. |
| 5241 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5242 | :term:`PACKAGE_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5243 | Specifies a list of functions run to pre-process the |
| 5244 | :term:`PKGD` directory prior to splitting the files out |
| 5245 | to individual packages. |
| 5246 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5247 | :term:`PACKAGE_WRITE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5248 | Specifies a list of dependencies for post-installation and |
| 5249 | pre-installation scripts on native/cross tools. If your |
| 5250 | post-installation or pre-installation script can execute at rootfs |
| 5251 | creation time rather than on the target but depends on a native tool |
| 5252 | in order to execute, you need to list the tools in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5253 | :term:`PACKAGE_WRITE_DEPS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5254 | |
| 5255 | For information on running post-installation scripts, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5256 | ":ref:`dev-manual/common-tasks:post-installation scripts`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5257 | section in the Yocto Project Development Tasks Manual. |
| 5258 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5259 | :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5260 | This variable provides a means of enabling or disabling features of a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5261 | recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5262 | recipes when you specify features and then arguments that define |
| 5263 | feature behaviors. Here is the basic block structure (broken over |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5264 | multiple lines for readability):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5265 | |
| 5266 | PACKAGECONFIG ??= "f1 f2 f3 ..." |
| 5267 | PACKAGECONFIG[f1] = "\ |
| 5268 | --with-f1, \ |
| 5269 | --without-f1, \ |
| 5270 | build-deps-for-f1, \ |
| 5271 | runtime-deps-for-f1, \ |
| 5272 | runtime-recommends-for-f1, \ |
| 5273 | packageconfig-conflicts-for-f1" |
| 5274 | PACKAGECONFIG[f2] = "\ |
| 5275 | ... and so on and so on ... |
| 5276 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5277 | The :term:`PACKAGECONFIG` variable itself specifies a space-separated |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5278 | list of the features to enable. Following the features, you can |
| 5279 | determine the behavior of each feature by providing up to six |
| 5280 | order-dependent arguments, which are separated by commas. You can |
| 5281 | omit any argument you like but must retain the separating commas. The |
| 5282 | order is important and specifies the following: |
| 5283 | |
| 5284 | 1. Extra arguments that should be added to the configure script |
| 5285 | argument list (:term:`EXTRA_OECONF` or |
| 5286 | :term:`PACKAGECONFIG_CONFARGS`) if |
| 5287 | the feature is enabled. |
| 5288 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5289 | 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or |
| 5290 | :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5291 | |
| 5292 | 3. Additional build dependencies (:term:`DEPENDS`) |
| 5293 | that should be added if the feature is enabled. |
| 5294 | |
| 5295 | 4. Additional runtime dependencies (:term:`RDEPENDS`) |
| 5296 | that should be added if the feature is enabled. |
| 5297 | |
| 5298 | 5. Additional runtime recommendations |
| 5299 | (:term:`RRECOMMENDS`) that should be added if |
| 5300 | the feature is enabled. |
| 5301 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5302 | 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5303 | settings for this feature. |
| 5304 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5305 | Consider the following :term:`PACKAGECONFIG` block taken from the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5306 | ``librsvg`` recipe. In this example the feature is ``gtk``, which has |
| 5307 | three arguments that determine the feature's behavior. |
| 5308 | :: |
| 5309 | |
| 5310 | PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" |
| 5311 | |
| 5312 | The |
| 5313 | ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is |
| 5314 | enabled. In this case, ``--with-gtk3`` is added to the configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5315 | 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] | 5316 | other hand, if the feature is disabled say through a ``.bbappend`` |
| 5317 | file in another layer, then the second argument ``--without-gtk3`` is |
| 5318 | added to the configure script instead. |
| 5319 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5320 | The basic :term:`PACKAGECONFIG` structure previously described holds true |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5321 | regardless of whether you are creating a block or changing a block. |
| 5322 | When creating a block, use the structure inside your recipe. |
| 5323 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5324 | 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] | 5325 | so one of two ways: |
| 5326 | |
| 5327 | - *Append file:* Create an append file named |
| 5328 | recipename\ ``.bbappend`` in your layer and override the value of |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5329 | :term:`PACKAGECONFIG`. You can either completely override the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5330 | variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5331 | |
| 5332 | PACKAGECONFIG = "f4 f5" |
| 5333 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5334 | Or, you can just append the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5335 | |
| 5336 | PACKAGECONFIG_append = " f4" |
| 5337 | |
| 5338 | - *Configuration file:* This method is identical to changing the |
| 5339 | block through an append file except you edit your ``local.conf`` |
| 5340 | or ``mydistro.conf`` file. As with append files previously |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5341 | described, you can either completely override the variable:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5342 | |
| 5343 | PACKAGECONFIG_pn-recipename = "f4 f5" |
| 5344 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5345 | Or, you can just amend the variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5346 | |
| 5347 | PACKAGECONFIG_append_pn-recipename = " f4" |
| 5348 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5349 | :term:`PACKAGECONFIG_CONFARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5350 | A space-separated list of configuration options generated from the |
| 5351 | :term:`PACKAGECONFIG` setting. |
| 5352 | |
| 5353 | Classes such as :ref:`autotools <ref-classes-autotools>` and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5354 | :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to |
| 5355 | pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``, |
| 5356 | respectively. If you are using :term:`PACKAGECONFIG` but not a class that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5357 | handles the ``do_configure`` task, then you need to use |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5358 | :term:`PACKAGECONFIG_CONFARGS` appropriately. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5359 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5360 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5361 | For recipes inheriting the |
| 5362 | :ref:`packagegroup <ref-classes-packagegroup>` class, setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5363 | :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5364 | normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) |
| 5365 | should not be automatically created by the ``packagegroup`` recipe, |
| 5366 | which is the default behavior. |
| 5367 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5368 | :term:`PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5369 | The list of packages the recipe creates. The default value is the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5370 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5371 | |
| 5372 | ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN} |
| 5373 | |
| 5374 | During packaging, the :ref:`ref-tasks-package` task |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5375 | goes through :term:`PACKAGES` and uses the :term:`FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5376 | variable corresponding to each package to assign files to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5377 | package. If a file matches the :term:`FILES` variable for more than one |
| 5378 | package in :term:`PACKAGES`, it will be assigned to the earliest |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5379 | (leftmost) package. |
| 5380 | |
| 5381 | Packages in the variable's list that are empty (i.e. where none of |
| 5382 | the patterns in ``FILES_``\ pkg match any files installed by the |
| 5383 | :ref:`ref-tasks-install` task) are not generated, |
| 5384 | unless generation is forced through the |
| 5385 | :term:`ALLOW_EMPTY` variable. |
| 5386 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5387 | :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5388 | A promise that your recipe satisfies runtime dependencies for |
| 5389 | optional modules that are found in other recipes. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5390 | :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5391 | only states that they should be satisfied. For example, if a hard, |
| 5392 | runtime dependency (:term:`RDEPENDS`) of another |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5393 | package is satisfied at build time through the :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5394 | variable, but a package with the module name is never actually |
| 5395 | produced, then the other package will be broken. Thus, if you attempt |
| 5396 | to include that package in an image, you will get a dependency |
| 5397 | failure from the packaging system during the |
| 5398 | :ref:`ref-tasks-rootfs` task. |
| 5399 | |
| 5400 | Typically, if there is a chance that such a situation can occur and |
| 5401 | the package that is not created is valid without the dependency being |
| 5402 | satisfied, then you should use :term:`RRECOMMENDS` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5403 | (a soft runtime dependency) instead of :term:`RDEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5404 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5405 | 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] | 5406 | you are splitting packages, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5407 | ":ref:`dev-manual/common-tasks:handling optional module packaging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5408 | section in the Yocto Project Development Tasks Manual. |
| 5409 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5410 | :term:`PACKAGESPLITFUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5411 | Specifies a list of functions run to perform additional splitting of |
| 5412 | files into individual packages. Recipes can either prepend to this |
| 5413 | variable or prepend to the ``populate_packages`` function in order to |
| 5414 | perform additional package splitting. In either case, the function |
| 5415 | should set :term:`PACKAGES`, |
| 5416 | :term:`FILES`, :term:`RDEPENDS` and |
| 5417 | other packaging variables appropriately in order to perform the |
| 5418 | desired splitting. |
| 5419 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5420 | :term:`PARALLEL_MAKE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5421 | Extra options passed to the ``make`` command during the |
| 5422 | :ref:`ref-tasks-compile` task in order to specify |
| 5423 | parallel compilation on the local build host. This variable is |
| 5424 | usually in the form "-j x", where x represents the maximum number of |
| 5425 | parallel threads ``make`` can run. |
| 5426 | |
| 5427 | .. note:: |
| 5428 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5429 | In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5430 | called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure |
| 5431 | this is to use the ``oe_runmake`` function. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5432 | |
| 5433 | By default, the OpenEmbedded build system automatically sets this |
| 5434 | variable to be equal to the number of cores the build system uses. |
| 5435 | |
| 5436 | .. note:: |
| 5437 | |
| 5438 | If the software being built experiences dependency issues during |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5439 | the ``do_compile`` task that result in race conditions, you can clear |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5440 | the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5441 | information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5442 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5443 | section in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5444 | |
| 5445 | For single socket systems (i.e. one CPU), you should not have to |
| 5446 | override this variable to gain optimal parallelism during builds. |
| 5447 | However, if you have very large systems that employ multiple physical |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5448 | 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] | 5449 | not set higher than "-j 20". |
| 5450 | |
| 5451 | For more information on speeding up builds, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5452 | ":ref:`dev-manual/common-tasks:speeding up a build`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5453 | section in the Yocto Project Development Tasks Manual. |
| 5454 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5455 | :term:`PARALLEL_MAKEINST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5456 | Extra options passed to the ``make install`` command during the |
| 5457 | :ref:`ref-tasks-install` task in order to specify |
| 5458 | parallel installation. This variable defaults to the value of |
| 5459 | :term:`PARALLEL_MAKE`. |
| 5460 | |
| 5461 | .. note:: |
| 5462 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5463 | In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5464 | be called with |
| 5465 | ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy |
| 5466 | way to ensure this is to use the ``oe_runmake`` function. |
| 5467 | |
| 5468 | If the software being built experiences dependency issues during |
| 5469 | the ``do_install`` task that result in race conditions, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5470 | clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5471 | workaround. For information on addressing race conditions, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5472 | ":ref:`dev-manual/common-tasks:debugging parallel make races`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5473 | section in the Yocto Project Development Tasks Manual. |
| 5474 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5475 | :term:`PATCHRESOLVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5476 | Determines the action to take when a patch fails. You can set this |
| 5477 | variable to one of two values: "noop" and "user". |
| 5478 | |
| 5479 | The default value of "noop" causes the build to simply fail when the |
| 5480 | OpenEmbedded build system cannot successfully apply a patch. Setting |
| 5481 | the value to "user" causes the build system to launch a shell and |
| 5482 | places you in the right location so that you can manually resolve the |
| 5483 | conflicts. |
| 5484 | |
| 5485 | Set this variable in your ``local.conf`` file. |
| 5486 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5487 | :term:`PATCHTOOL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5488 | Specifies the utility used to apply patches for a recipe during the |
| 5489 | :ref:`ref-tasks-patch` task. You can specify one of |
| 5490 | three utilities: "patch", "quilt", or "git". The default utility used |
| 5491 | is "quilt" except for the quilt-native recipe itself. Because the |
| 5492 | quilt tool is not available at the time quilt-native is being |
| 5493 | patched, it uses "patch". |
| 5494 | |
| 5495 | 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] | 5496 | the recipe using one of the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5497 | |
| 5498 | PATCHTOOL = "patch" |
| 5499 | PATCHTOOL = "quilt" |
| 5500 | PATCHTOOL = "git" |
| 5501 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5502 | :term:`PE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5503 | The epoch of the recipe. By default, this variable is unset. The |
| 5504 | variable is used to make upgrades possible when the versioning scheme |
| 5505 | changes in some backwards incompatible way. |
| 5506 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5507 | :term:`PE` is the default value of the :term:`PKGE` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5508 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5509 | :term:`PF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5510 | Specifies the recipe or package name and includes all version and |
| 5511 | revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and |
| 5512 | ``bash-4.2-r1/``). This variable is comprised of the following: |
| 5513 | ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} |
| 5514 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5515 | :term:`PIXBUF_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5516 | When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>` |
| 5517 | class, this variable identifies packages that contain the pixbuf |
| 5518 | loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache`` |
| 5519 | class assumes that the loaders are in the recipe's main package (i.e. |
| 5520 | ``${``\ :term:`PN`\ ``}``). Use this variable if the |
| 5521 | loaders you need are in a package other than that main package. |
| 5522 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5523 | :term:`PKG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5524 | The name of the resulting package created by the OpenEmbedded build |
| 5525 | system. |
| 5526 | |
| 5527 | .. note:: |
| 5528 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5529 | 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] | 5530 | |
| 5531 | For example, when the :ref:`debian <ref-classes-debian>` class |
| 5532 | renames the output package, it does so by setting |
| 5533 | ``PKG_packagename``. |
| 5534 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5535 | :term:`PKG_CONFIG_PATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5536 | The path to ``pkg-config`` files for the current build context. |
| 5537 | ``pkg-config`` reads this variable from the environment. |
| 5538 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5539 | :term:`PKGD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5540 | Points to the destination directory for files to be packaged before |
| 5541 | they are split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5542 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5543 | |
| 5544 | ${WORKDIR}/package |
| 5545 | |
| 5546 | Do not change this default. |
| 5547 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5548 | :term:`PKGDATA_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5549 | Points to a shared, global-state directory that holds data generated |
| 5550 | during the packaging process. During the packaging process, the |
| 5551 | :ref:`ref-tasks-packagedata` task packages data |
| 5552 | for each recipe and installs it into this temporary, shared area. |
| 5553 | This directory defaults to the following, which you should not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5554 | change:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5555 | |
| 5556 | ${STAGING_DIR_HOST}/pkgdata |
| 5557 | |
| 5558 | For examples of how this data is used, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5559 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5560 | section in the Yocto Project Overview and Concepts Manual and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5561 | ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5562 | section in the Yocto Project Development Tasks Manual. For more |
| 5563 | information on the shared, global-state directory, see |
| 5564 | :term:`STAGING_DIR_HOST`. |
| 5565 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5566 | :term:`PKGDEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5567 | Points to the parent directory for files to be packaged after they |
| 5568 | have been split into individual packages. This directory defaults to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5569 | the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5570 | |
| 5571 | ${WORKDIR}/packages-split |
| 5572 | |
| 5573 | Under this directory, the build system creates directories for each |
| 5574 | package specified in :term:`PACKAGES`. Do not change |
| 5575 | this default. |
| 5576 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5577 | :term:`PKGDESTWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5578 | Points to a temporary work area where the |
| 5579 | :ref:`ref-tasks-package` task saves package metadata. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5580 | The :term:`PKGDESTWORK` location defaults to the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5581 | |
| 5582 | ${WORKDIR}/pkgdata |
| 5583 | |
| 5584 | Do not change this default. |
| 5585 | |
| 5586 | The :ref:`ref-tasks-packagedata` task copies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5587 | package metadata from :term:`PKGDESTWORK` to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5588 | :term:`PKGDATA_DIR` to make it available globally. |
| 5589 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5590 | :term:`PKGE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5591 | 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] | 5592 | is set to :term:`PE`. |
| 5593 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5594 | :term:`PKGR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5595 | The revision of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5596 | :term:`PKGR` is set to :term:`PR`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5597 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5598 | :term:`PKGV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5599 | The version of the package(s) built by the recipe. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5600 | :term:`PKGV` is set to :term:`PV`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5601 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5602 | :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5603 | This variable can have two separate functions depending on the |
| 5604 | context: a recipe name or a resulting package name. |
| 5605 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5606 | :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] | 5607 | OpenEmbedded build system as input to create a package. The name is |
| 5608 | normally extracted from the recipe file name. For example, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5609 | 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] | 5610 | will be "expat". |
| 5611 | |
| 5612 | The variable refers to a package name in the context of a file |
| 5613 | created or produced by the OpenEmbedded build system. |
| 5614 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5615 | If applicable, the :term:`PN` variable also contains any special suffix |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5616 | or prefix. For example, using ``bash`` to build packages for the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5617 | native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5618 | packages for the target and for Multilib, :term:`PN` would be ``bash`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5619 | and ``lib64-bash``, respectively. |
| 5620 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5621 | :term:`PNBLACKLIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5622 | Lists recipes you do not want the OpenEmbedded build system to build. |
| 5623 | This variable works in conjunction with the |
| 5624 | :ref:`blacklist <ref-classes-blacklist>` class, which is inherited |
| 5625 | globally. |
| 5626 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5627 | To prevent a recipe from being built, use the :term:`PNBLACKLIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5628 | variable in your ``local.conf`` file. Here is an example that |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5629 | prevents ``myrecipe`` from being built:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5630 | |
| 5631 | PNBLACKLIST[myrecipe] = "Not supported by our organization." |
| 5632 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5633 | :term:`POPULATE_SDK_POST_HOST_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5634 | Specifies a list of functions to call once the OpenEmbedded build |
| 5635 | system has created the host part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5636 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5637 | |
| 5638 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " |
| 5639 | |
| 5640 | If you need to pass the SDK path to a command within a function, you |
| 5641 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 5642 | the OpenEmbedded build system when creating SDK output. See the |
| 5643 | :term:`SDK_DIR` variable for more information. |
| 5644 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5645 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5646 | Specifies a list of functions to call once the OpenEmbedded build |
| 5647 | system has created the target part of the SDK. You can specify |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5648 | functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5649 | |
| 5650 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " |
| 5651 | |
| 5652 | If you need to pass the SDK path to a command within a function, you |
| 5653 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 5654 | the OpenEmbedded build system when creating SDK output. See the |
| 5655 | :term:`SDK_DIR` variable for more information. |
| 5656 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5657 | :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5658 | The revision of the recipe. The default value for this variable is |
| 5659 | "r0". Subsequent revisions of the recipe conventionally have the |
| 5660 | values "r1", "r2", and so forth. When :term:`PV` increases, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5661 | :term:`PR` is conventionally reset to "r0". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5662 | |
| 5663 | .. note:: |
| 5664 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5665 | The OpenEmbedded build system does not need the aid of :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5666 | 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] | 5667 | :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5668 | :ref:`stamp <structure-build-tmp-stamps>` and |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5669 | :ref:`overview-manual/concepts:shared state cache` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5670 | mechanisms. |
| 5671 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5672 | The :term:`PR` variable primarily becomes significant when a package |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5673 | manager dynamically installs packages on an already built image. In |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5674 | this case, :term:`PR`, which is the default value of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5675 | :term:`PKGR`, helps the package manager distinguish which |
| 5676 | 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] | 5677 | same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with |
| 5678 | the same :term:`PV` usually means that the packages all install the same |
| 5679 | upstream version, but with later (:term:`PR`) version packages including |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5680 | packaging fixes. |
| 5681 | |
| 5682 | .. note:: |
| 5683 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5684 | :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] | 5685 | package contents or metadata. |
| 5686 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 5687 | Because manually managing :term:`PR` can be cumbersome and error-prone, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5688 | an automated solution exists. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5689 | ":ref:`dev-manual/common-tasks:working with a pr service`" section |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5690 | in the Yocto Project Development Tasks Manual for more information. |
| 5691 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5692 | :term:`PREFERRED_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5693 | If multiple recipes provide the same item, this variable determines |
| 5694 | which recipe is preferred and thus provides the item (i.e. the |
| 5695 | preferred provider). You should always suffix this variable with the |
| 5696 | name of the provided item. And, you should define the variable using |
| 5697 | the preferred recipe's name (:term:`PN`). Here is a common |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5698 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5699 | |
| 5700 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 5701 | |
| 5702 | In the previous example, multiple recipes are providing "virtual/kernel". |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5703 | 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] | 5704 | the recipe you prefer to provide "virtual/kernel". |
| 5705 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5706 | Following are more examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5707 | |
| 5708 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
| 5709 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
| 5710 | |
| 5711 | For more |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5712 | information, see the ":ref:`dev-manual/common-tasks:using virtual providers`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5713 | section in the Yocto Project Development Tasks Manual. |
| 5714 | |
| 5715 | .. note:: |
| 5716 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5717 | If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5718 | recipe that :term:`PROVIDES` that item but is not selected (defined) |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5719 | by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5720 | desirable since this mechanism is designed to select between mutually |
| 5721 | exclusive alternative providers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5722 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5723 | :term:`PREFERRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5724 | If there are multiple versions of a recipe available, this variable |
| 5725 | determines which version should be given preference. You must always |
| 5726 | suffix the variable with the :term:`PN` you want to select (`python` in |
| 5727 | the first example below), and you should specify the :term:`PV` |
| 5728 | accordingly (`3.4.0` in the example). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5729 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5730 | The :term:`PREFERRED_VERSION` variable supports limited wildcard use |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5731 | through the "``%``" character. You can use the character to match any |
| 5732 | number of characters, which can be useful when specifying versions |
| 5733 | that contain long revision numbers that potentially change. Here are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5734 | two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5735 | |
| 5736 | PREFERRED_VERSION_python = "3.4.0" |
| 5737 | PREFERRED_VERSION_linux-yocto = "5.0%" |
| 5738 | |
| 5739 | .. note:: |
| 5740 | |
| 5741 | The use of the "%" character is limited in that it only works at the end of the |
| 5742 | string. You cannot use the wildcard character in any other |
| 5743 | location of the string. |
| 5744 | |
| 5745 | The specified version is matched against :term:`PV`, which |
| 5746 | does not necessarily match the version part of the recipe's filename. |
| 5747 | 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] | 5748 | where ``foo_git.bb`` contains the following assignment:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5749 | |
| 5750 | PV = "1.1+git${SRCPV}" |
| 5751 | |
| 5752 | In this case, the correct way to select |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5753 | ``foo_git.bb`` is by using an assignment such as the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5754 | |
| 5755 | PREFERRED_VERSION_foo = "1.1+git%" |
| 5756 | |
| 5757 | Compare that previous example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5758 | against the following incorrect example, which does not work:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5759 | |
| 5760 | PREFERRED_VERSION_foo = "git" |
| 5761 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5762 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5763 | configuration files in a way that is hard to change. You can use |
| 5764 | :term:`OVERRIDES` to set a machine-specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5765 | override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5766 | |
| 5767 | PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%" |
| 5768 | |
| 5769 | Although not recommended, worst case, you can also use the |
| 5770 | "forcevariable" override, which is the strongest override possible. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5771 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5772 | |
| 5773 | PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%" |
| 5774 | |
| 5775 | .. note:: |
| 5776 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5777 | The ``\_forcevariable`` override is not handled specially. This override |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5778 | only works because the default value of :term:`OVERRIDES` includes "forcevariable". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5779 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5780 | If a recipe with the specified version is not available, a warning |
| 5781 | message will be shown. See :term:`REQUIRED_VERSION` if you want this |
| 5782 | to be an error instead. |
| 5783 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5784 | :term:`PREMIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5785 | Specifies additional paths from which the OpenEmbedded build system |
| 5786 | gets source code. When the build system searches for source code, it |
| 5787 | first tries the local download directory. If that location fails, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5788 | build system tries locations defined by :term:`PREMIRRORS`, the upstream |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5789 | source, and then locations specified by |
| 5790 | :term:`MIRRORS` in that order. |
| 5791 | |
| 5792 | Assuming your distribution (:term:`DISTRO`) is "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5793 | the default value for :term:`PREMIRRORS` is defined in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5794 | ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. |
| 5795 | |
| 5796 | Typically, you could add a specific server for the build system to |
| 5797 | attempt before any others by adding something like the following to |
| 5798 | the ``local.conf`` configuration file in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5799 | :term:`Build Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5800 | |
| 5801 | PREMIRRORS_prepend = "\ |
| 5802 | git://.*/.* http://www.yoctoproject.org/sources/ \n \ |
| 5803 | ftp://.*/.* http://www.yoctoproject.org/sources/ \n \ |
| 5804 | http://.*/.* http://www.yoctoproject.org/sources/ \n \ |
| 5805 | https://.*/.* http://www.yoctoproject.org/sources/ \n" |
| 5806 | |
| 5807 | These changes cause the |
| 5808 | build system to intercept Git, FTP, HTTP, and HTTPS requests and |
| 5809 | direct them to the ``http://`` sources mirror. You can use |
| 5810 | ``file://`` URLs to point to local directories or network shares as |
| 5811 | well. |
| 5812 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5813 | :term:`PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5814 | Indicates the importance of a package. |
| 5815 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5816 | :term:`PRIORITY` is considered to be part of the distribution policy |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5817 | because the importance of any given recipe depends on the purpose for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5818 | which the distribution is being produced. Thus, :term:`PRIORITY` is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5819 | normally set within recipes. |
| 5820 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5821 | You can set :term:`PRIORITY` to "required", "standard", "extra", and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5822 | "optional", which is the default. |
| 5823 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5824 | :term:`PRIVATE_LIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5825 | Specifies libraries installed within a recipe that should be ignored |
| 5826 | by the OpenEmbedded build system's shared library resolver. This |
| 5827 | variable is typically used when software being built by a recipe has |
| 5828 | its own private versions of a library normally provided by another |
| 5829 | recipe. In this case, you would not want the package containing the |
| 5830 | private libraries to be set as a dependency on other unrelated |
| 5831 | packages that should instead depend on the package providing the |
| 5832 | standard version of the library. |
| 5833 | |
| 5834 | Libraries specified in this variable should be specified by their |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5835 | file name. For example, from the Firefox recipe in meta-browser:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5836 | |
| 5837 | PRIVATE_LIBS = "libmozjs.so \ |
| 5838 | libxpcom.so \ |
| 5839 | libnspr4.so \ |
| 5840 | libxul.so \ |
| 5841 | libmozalloc.so \ |
| 5842 | libplc4.so \ |
| 5843 | libplds4.so" |
| 5844 | |
| 5845 | For more information, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5846 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5847 | section in the Yocto Project Overview and Concepts Manual. |
| 5848 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5849 | :term:`PROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5850 | 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] | 5851 | default, a recipe's own :term:`PN` is implicitly already in its |
| 5852 | :term:`PROVIDES` list and therefore does not need to mention that it |
| 5853 | provides itself. If a recipe uses :term:`PROVIDES`, the additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5854 | aliases are synonyms for the recipe and can be useful for satisfying |
| 5855 | dependencies of other recipes during the build as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5856 | :term:`DEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5857 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5858 | Consider the following example :term:`PROVIDES` statement from the recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5859 | file ``eudev_3.2.9.bb``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5860 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 5861 | PROVIDES += "udev" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5862 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5863 | The :term:`PROVIDES` statement |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5864 | results in the "eudev" recipe also being available as simply "udev". |
| 5865 | |
| 5866 | .. note:: |
| 5867 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 5868 | A recipe's own recipe name (:term:`PN`) is always implicitly prepended |
| 5869 | to `PROVIDES`, so while using "+=" in the above example may not be |
| 5870 | strictly necessary it is recommended to avoid confusion. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5871 | |
| 5872 | In addition to providing recipes under alternate names, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5873 | :term:`PROVIDES` mechanism is also used to implement virtual targets. A |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5874 | virtual target is a name that corresponds to some particular |
| 5875 | functionality (e.g. a Linux kernel). Recipes that provide the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5876 | functionality in question list the virtual target in :term:`PROVIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5877 | Recipes that depend on the functionality in question can include the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5878 | virtual target in :term:`DEPENDS` to leave the choice of provider open. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5879 | |
| 5880 | Conventionally, virtual targets have names on the form |
| 5881 | "virtual/function" (e.g. "virtual/kernel"). The slash is simply part |
| 5882 | of the name and has no syntactical significance. |
| 5883 | |
| 5884 | The :term:`PREFERRED_PROVIDER` variable is |
| 5885 | used to select which particular recipe provides a virtual target. |
| 5886 | |
| 5887 | .. note:: |
| 5888 | |
| 5889 | A corresponding mechanism for virtual runtime dependencies |
| 5890 | (packages) exists. However, the mechanism does not depend on any |
| 5891 | special functionality beyond ordinary variable assignments. For |
| 5892 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of |
| 5893 | the component that manages the ``/dev`` directory. |
| 5894 | |
| 5895 | Setting the "preferred provider" for runtime dependencies is as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5896 | simple as using the following assignment in a configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5897 | |
| 5898 | VIRTUAL-RUNTIME_dev_manager = "udev" |
| 5899 | |
| 5900 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5901 | :term:`PRSERV_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5902 | The network based :term:`PR` service host and port. |
| 5903 | |
| 5904 | The ``conf/local.conf.sample.extended`` configuration file in the |
| 5905 | :term:`Source Directory` shows how the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5906 | :term:`PRSERV_HOST` variable is set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5907 | |
| 5908 | PRSERV_HOST = "localhost:0" |
| 5909 | |
| 5910 | You must |
| 5911 | 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] | 5912 | service <dev-manual/common-tasks:working with a pr service>`. You can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5913 | 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] | 5914 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 5915 | |
| 5916 | :term:`PSEUDO_IGNORE_PATHS` |
| 5917 | A comma-separated (without spaces) list of path prefixes that should be ignored |
| 5918 | by pseudo when monitoring and recording file operations, in order to avoid |
| 5919 | problems with files being written to outside of the pseudo context and |
| 5920 | reduce pseudo's overhead. A path is ignored if it matches any prefix in the list |
| 5921 | and can include partial directory (or file) names. |
| 5922 | |
| 5923 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5924 | :term:`PTEST_ENABLED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5925 | Specifies whether or not :ref:`Package |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 5926 | Test <dev-manual/common-tasks:testing packages with ptest>` (ptest) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5927 | functionality is enabled when building a recipe. You should not set |
| 5928 | this variable directly. Enabling and disabling building Package Tests |
| 5929 | at build time should be done by adding "ptest" to (or removing it |
| 5930 | from) :term:`DISTRO_FEATURES`. |
| 5931 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5932 | :term:`PV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5933 | The version of the recipe. The version is normally extracted from the |
| 5934 | recipe filename. For example, if the recipe is named |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5935 | ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1". |
| 5936 | :term:`PV` is generally not overridden within a recipe unless it is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5937 | building an unstable (i.e. development) version from a source code |
| 5938 | repository (e.g. Git or Subversion). |
| 5939 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5940 | :term:`PV` is the default value of the :term:`PKGV` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5941 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5942 | :term:`PYTHON_ABI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5943 | When used by recipes that inherit the |
| 5944 | :ref:`distutils3 <ref-classes-distutils3>`, |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5945 | :ref:`setuptools3 <ref-classes-setuptools3>` classes, denotes the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5946 | Application Binary Interface (ABI) currently in use for Python. By |
| 5947 | default, the ABI is "m". You do not have to set this variable as the |
| 5948 | OpenEmbedded build system sets it for you. |
| 5949 | |
| 5950 | The OpenEmbedded build system uses the ABI to construct directory |
| 5951 | names used when installing the Python headers and libraries in |
| 5952 | sysroot (e.g. ``.../python3.3m/...``). |
| 5953 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5954 | Recipes that inherit the ``distutils3`` class during cross-builds also |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5955 | use this variable to locate the headers and libraries of the |
| 5956 | appropriate Python that the extension is targeting. |
| 5957 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5958 | :term:`PYTHON_PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5959 | When used by recipes that inherit the |
| 5960 | `distutils3 <ref-classes-distutils3>`, |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 5961 | :ref:`setuptools3 <ref-classes-setuptools3>` classes, specifies the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5962 | 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] | 5963 | be "python3". You do not have to set this variable as the |
| 5964 | OpenEmbedded build system automatically sets it for you. |
| 5965 | |
| 5966 | The variable allows recipes to use common infrastructure such as the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5967 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5968 | |
| 5969 | DEPENDS += "${PYTHON_PN}-native" |
| 5970 | |
| 5971 | In the previous example, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5972 | the version of the dependency is :term:`PYTHON_PN`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5973 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5974 | :term:`RANLIB` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5975 | The minimal command and arguments to run ``ranlib``. |
| 5976 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 5977 | :term:`RCONFLICTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5978 | The list of packages that conflict with packages. Note that packages |
| 5979 | will not be installed if conflicting packages are not first removed. |
| 5980 | |
| 5981 | Like all package-controlling variables, you must always use them in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 5982 | conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5983 | |
| 5984 | RCONFLICTS_${PN} = "another_conflicting_package_name" |
| 5985 | |
| 5986 | BitBake, which the OpenEmbedded build system uses, supports |
| 5987 | specifying versioned dependencies. Although the syntax varies |
| 5988 | depending on the packaging format, BitBake hides these differences |
| 5989 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5990 | :term:`RCONFLICTS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 5991 | |
| 5992 | RCONFLICTS_${PN} = "package (operator version)" |
| 5993 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 5994 | For ``operator``, you can specify the following: |
| 5995 | |
| 5996 | - = |
| 5997 | - < |
| 5998 | - > |
| 5999 | - <= |
| 6000 | - >= |
| 6001 | |
| 6002 | 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] | 6003 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6004 | |
| 6005 | RCONFLICTS_${PN} = "foo (>= 1.2)" |
| 6006 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6007 | :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6008 | Lists runtime dependencies of a package. These dependencies are other |
| 6009 | packages that must be installed in order for the package to function |
| 6010 | correctly. As an example, the following assignment declares that the |
| 6011 | package ``foo`` needs the packages ``bar`` and ``baz`` to be |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6012 | installed:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6013 | |
| 6014 | RDEPENDS_foo = "bar baz" |
| 6015 | |
| 6016 | The most common types of package |
| 6017 | runtime dependencies are automatically detected and added. Therefore, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6018 | most recipes do not need to set :term:`RDEPENDS`. For more information, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6019 | see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6020 | ":ref:`overview-manual/concepts:automatically added runtime dependencies`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6021 | section in the Yocto Project Overview and Concepts Manual. |
| 6022 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6023 | The practical effect of the above :term:`RDEPENDS` assignment is that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6024 | ``bar`` and ``baz`` will be declared as dependencies inside the |
| 6025 | package ``foo`` when it is written out by one of the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6026 | :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6027 | Exactly how this is done depends on which package format is used, |
| 6028 | which is determined by |
| 6029 | :term:`PACKAGE_CLASSES`. When the |
| 6030 | corresponding package manager installs the package, it will know to |
| 6031 | also install the packages on which it depends. |
| 6032 | |
| 6033 | To ensure that the packages ``bar`` and ``baz`` get built, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6034 | previous :term:`RDEPENDS` assignment also causes a task dependency to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6035 | added. This dependency is from the recipe's |
| 6036 | :ref:`ref-tasks-build` (not to be confused with |
| 6037 | :ref:`ref-tasks-compile`) task to the |
| 6038 | ``do_package_write_*`` task of the recipes that build ``bar`` and |
| 6039 | ``baz``. |
| 6040 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6041 | The names of the packages you list within :term:`RDEPENDS` must be the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6042 | names of other packages - they cannot be recipe names. Although |
| 6043 | package names and recipe names usually match, the important point |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6044 | here is that you are providing package names within the :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6045 | variable. For an example of the default list of packages created from |
| 6046 | a recipe, see the :term:`PACKAGES` variable. |
| 6047 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6048 | Because the :term:`RDEPENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6049 | you should always use the variable in a form with an attached package |
| 6050 | name (remember that a single recipe can build multiple packages). For |
| 6051 | example, suppose you are building a development package that depends |
| 6052 | on the ``perl`` package. In this case, you would use the following |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6053 | :term:`RDEPENDS` statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6054 | |
| 6055 | RDEPENDS_${PN}-dev += "perl" |
| 6056 | |
| 6057 | In the example, |
| 6058 | the development package depends on the ``perl`` package. Thus, the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 6059 | :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6060 | the variable. |
| 6061 | |
| 6062 | .. note:: |
| 6063 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6064 | ``RDEPENDS_${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6065 | by default. This default is set in the BitBake configuration file |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6066 | (``meta/conf/bitbake.conf``). Be careful not to accidentally remove |
| 6067 | ``${PN}`` when modifying ``RDEPENDS_${PN}-dev``. Use the "+=" operator |
| 6068 | rather than the "=" operator. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6069 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6070 | The package names you use with :term:`RDEPENDS` must appear as they would |
| 6071 | in the :term:`PACKAGES` variable. The :term:`PKG` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6072 | allows a different name to be used for the final package (e.g. the |
| 6073 | :ref:`debian <ref-classes-debian>` class uses this to rename |
| 6074 | packages), but this final package name cannot be used with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6075 | :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6076 | independent of the package format used. |
| 6077 | |
| 6078 | BitBake, which the OpenEmbedded build system uses, supports |
| 6079 | specifying versioned dependencies. Although the syntax varies |
| 6080 | depending on the packaging format, BitBake hides these differences |
| 6081 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6082 | :term:`RDEPENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6083 | |
| 6084 | RDEPENDS_${PN} = "package (operator version)" |
| 6085 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6086 | For ``operator``, you can specify the following: |
| 6087 | |
| 6088 | - = |
| 6089 | - < |
| 6090 | - > |
| 6091 | - <= |
| 6092 | - >= |
| 6093 | |
| 6094 | For version, provide the version number. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6095 | |
| 6096 | .. note:: |
| 6097 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6098 | You can use :term:`EXTENDPKGV` to provide a full package version |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6099 | specification. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6100 | |
| 6101 | 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] | 6102 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6103 | |
| 6104 | RDEPENDS_${PN} = "foo (>= 1.2)" |
| 6105 | |
| 6106 | For information on build-time dependencies, see the |
| 6107 | :term:`DEPENDS` variable. You can also see the |
| 6108 | ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and |
| 6109 | ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the |
| 6110 | BitBake User Manual for additional information on tasks and |
| 6111 | dependencies. |
| 6112 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6113 | :term:`REQUIRED_DISTRO_FEATURES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6114 | When inheriting the |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6115 | :ref:`features_check <ref-classes-features_check>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6116 | class, this variable identifies distribution features that must exist |
| 6117 | in the current configuration in order for the OpenEmbedded build |
| 6118 | system to build the recipe. In other words, if the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6119 | :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not |
| 6120 | appear in :term:`DISTRO_FEATURES` within the current configuration, then |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 6121 | the recipe will be skipped, and if the build system attempts to build |
| 6122 | the recipe then an error will be triggered. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6123 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6124 | :term:`REQUIRED_VERSION` |
| 6125 | If there are multiple versions of a recipe available, this variable |
| 6126 | determines which version should be given preference. |
| 6127 | :term:`REQUIRED_VERSION` works in exactly the same manner as |
| 6128 | :term:`PREFERRED_VERSION`, except that if the specified version is not |
| 6129 | available then an error message is shown and the build fails |
| 6130 | immediately. |
| 6131 | |
| 6132 | If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set |
| 6133 | for the same recipe, the :term:`REQUIRED_VERSION` value applies. |
| 6134 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6135 | :term:`RM_WORK_EXCLUDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6136 | With ``rm_work`` enabled, this variable specifies a list of recipes |
| 6137 | whose work directories should not be removed. See the |
| 6138 | ":ref:`rm_work.bbclass <ref-classes-rm-work>`" section for more |
| 6139 | details. |
| 6140 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6141 | :term:`ROOT_HOME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6142 | Defines the root home directory. By default, this directory is set as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6143 | follows in the BitBake configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6144 | |
| 6145 | ROOT_HOME ??= "/home/root" |
| 6146 | |
| 6147 | .. note:: |
| 6148 | |
| 6149 | This default value is likely used because some embedded solutions |
| 6150 | prefer to have a read-only root filesystem and prefer to keep |
| 6151 | writeable data in one place. |
| 6152 | |
| 6153 | You can override the default by setting the variable in any layer or |
| 6154 | in the ``local.conf`` file. Because the default is set using a "weak" |
| 6155 | assignment (i.e. "??="), you can use either of the following forms to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6156 | define your override:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6157 | |
| 6158 | ROOT_HOME = "/root" |
| 6159 | ROOT_HOME ?= "/root" |
| 6160 | |
| 6161 | These |
| 6162 | override examples use ``/root``, which is probably the most commonly |
| 6163 | used override. |
| 6164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6165 | :term:`ROOTFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6166 | Indicates a filesystem image to include as the root filesystem. |
| 6167 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6168 | The :term:`ROOTFS` variable is an optional variable used with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6169 | :ref:`image-live <ref-classes-image-live>` class. |
| 6170 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6171 | :term:`ROOTFS_POSTINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6172 | Specifies a list of functions to call after the OpenEmbedded build |
| 6173 | system has installed packages. You can specify functions separated by |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6174 | semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6175 | |
| 6176 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " |
| 6177 | |
| 6178 | If you need to pass the root filesystem path to a command within a |
| 6179 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6180 | directory that becomes the root filesystem image. See the |
| 6181 | :term:`IMAGE_ROOTFS` variable for more |
| 6182 | information. |
| 6183 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6184 | :term:`ROOTFS_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6185 | Specifies a list of functions to call once the OpenEmbedded build |
| 6186 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6187 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6188 | |
| 6189 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " |
| 6190 | |
| 6191 | If you need to pass the root filesystem path to a command within a |
| 6192 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6193 | directory that becomes the root filesystem image. See the |
| 6194 | :term:`IMAGE_ROOTFS` variable for more |
| 6195 | information. |
| 6196 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6197 | :term:`ROOTFS_POSTUNINSTALL_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6198 | Specifies a list of functions to call after the OpenEmbedded build |
| 6199 | system has removed unnecessary packages. When runtime package |
| 6200 | management is disabled in the image, several packages are removed |
| 6201 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6202 | You can specify functions separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6203 | |
| 6204 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " |
| 6205 | |
| 6206 | If you need to pass the root filesystem path to a command within a |
| 6207 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6208 | directory that becomes the root filesystem image. See the |
| 6209 | :term:`IMAGE_ROOTFS` variable for more |
| 6210 | information. |
| 6211 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6212 | :term:`ROOTFS_PREPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6213 | Specifies a list of functions to call before the OpenEmbedded build |
| 6214 | system has created the root filesystem. You can specify functions |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6215 | separated by semicolons:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6216 | |
| 6217 | ROOTFS_PREPROCESS_COMMAND += "function; ... " |
| 6218 | |
| 6219 | If you need to pass the root filesystem path to a command within a |
| 6220 | function, you can use ``${IMAGE_ROOTFS}``, which points to the |
| 6221 | directory that becomes the root filesystem image. See the |
| 6222 | :term:`IMAGE_ROOTFS` variable for more |
| 6223 | information. |
| 6224 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6225 | :term:`RPROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6226 | A list of package name aliases that a package also provides. These |
| 6227 | aliases are useful for satisfying runtime dependencies of other |
| 6228 | packages both during the build and on the target (as specified by |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6229 | :term:`RDEPENDS`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6230 | |
| 6231 | .. note:: |
| 6232 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6233 | 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] | 6234 | |
| 6235 | As with all package-controlling variables, you must always use the |
| 6236 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6237 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6238 | |
| 6239 | RPROVIDES_${PN} = "widget-abi-2" |
| 6240 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6241 | :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6242 | A list of packages that extends the usability of a package being |
| 6243 | built. The package being built does not depend on this list of |
| 6244 | packages in order to successfully build, but rather uses them for |
| 6245 | extended usability. To specify runtime dependencies for packages, see |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6246 | the :term:`RDEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6247 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6248 | The package manager will automatically install the :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6249 | list of packages when installing the built package. However, you can |
| 6250 | prevent listed packages from being installed by using the |
| 6251 | :term:`BAD_RECOMMENDATIONS`, |
| 6252 | :term:`NO_RECOMMENDATIONS`, and |
| 6253 | :term:`PACKAGE_EXCLUDE` variables. |
| 6254 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6255 | Packages specified in :term:`RRECOMMENDS` need not actually be produced. |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6256 | However, there must be a recipe providing each package, either |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6257 | through the :term:`PACKAGES` or |
| 6258 | :term:`PACKAGES_DYNAMIC` variables or the |
| 6259 | :term:`RPROVIDES` variable, or an error will occur |
| 6260 | during the build. If such a recipe does exist and the package is not |
| 6261 | produced, the build continues without error. |
| 6262 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6263 | Because the :term:`RRECOMMENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6264 | you should always attach an override to the variable to specify the |
| 6265 | particular package whose usability is being extended. For example, |
| 6266 | suppose you are building a development package that is extended to |
| 6267 | support wireless functionality. In this case, you would use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6268 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6269 | |
| 6270 | RRECOMMENDS_${PN}-dev += "wireless_package_name" |
| 6271 | |
| 6272 | In the |
| 6273 | example, the package name (``${PN}-dev``) must appear as it would in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6274 | the :term:`PACKAGES` namespace before any renaming of the output package |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6275 | by classes such as ``debian.bbclass``. |
| 6276 | |
| 6277 | BitBake, which the OpenEmbedded build system uses, supports |
| 6278 | specifying versioned recommends. Although the syntax varies depending |
| 6279 | on the packaging format, BitBake hides these differences from you. |
| 6280 | Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6281 | :term:`RRECOMMENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6282 | |
| 6283 | RRECOMMENDS_${PN} = "package (operator version)" |
| 6284 | |
| 6285 | For ``operator``, you can specify the following: |
| 6286 | |
| 6287 | - = |
| 6288 | - < |
| 6289 | - > |
| 6290 | - <= |
| 6291 | - >= |
| 6292 | |
| 6293 | 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] | 6294 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6295 | |
| 6296 | RRECOMMENDS_${PN} = "foo (>= 1.2)" |
| 6297 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6298 | :term:`RREPLACES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6299 | A list of packages replaced by a package. The package manager uses |
| 6300 | this variable to determine which package should be installed to |
| 6301 | replace other package(s) during an upgrade. In order to also have the |
| 6302 | 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] | 6303 | the other package to the :term:`RCONFLICTS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6304 | |
| 6305 | As with all package-controlling variables, you must use this variable |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6306 | in conjunction with a package name override. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6307 | |
| 6308 | RREPLACES_${PN} = "other_package_being_replaced" |
| 6309 | |
| 6310 | BitBake, which the OpenEmbedded build system uses, supports |
| 6311 | specifying versioned replacements. Although the syntax varies |
| 6312 | depending on the packaging format, BitBake hides these differences |
| 6313 | from you. Here is the general syntax to specify versions with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6314 | :term:`RREPLACES` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6315 | |
| 6316 | RREPLACES_${PN} = "package (operator version)" |
| 6317 | |
| 6318 | For ``operator``, you can specify the following: |
| 6319 | |
| 6320 | - = |
| 6321 | - < |
| 6322 | - > |
| 6323 | - <= |
| 6324 | - >= |
| 6325 | |
| 6326 | For example, the following sets up a replacement using version 1.2 |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6327 | or greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6328 | |
| 6329 | RREPLACES_${PN} = "foo (>= 1.2)" |
| 6330 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6331 | :term:`RSUGGESTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6332 | A list of additional packages that you can suggest for installation |
| 6333 | by the package manager at the time a package is installed. Not all |
| 6334 | package managers support this functionality. |
| 6335 | |
| 6336 | As with all package-controlling variables, you must always use this |
| 6337 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6338 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6339 | |
| 6340 | RSUGGESTS_${PN} = "useful_package another_package" |
| 6341 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6342 | :term:`S` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6343 | The location in the :term:`Build Directory` where |
| 6344 | unpacked recipe source code resides. By default, this directory is |
| 6345 | ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, |
| 6346 | where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe |
| 6347 | version. If the source tarball extracts the code to a directory named |
| 6348 | anything other than ``${BPN}-${PV}``, or if the source code is |
| 6349 | 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] | 6350 | :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] | 6351 | to find the unpacked source. |
| 6352 | |
| 6353 | As an example, assume a :term:`Source Directory` |
| 6354 | top-level folder named ``poky`` and a default Build Directory at |
| 6355 | ``poky/build``. In this case, the work directory the build system |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6356 | uses to keep the unpacked recipe for ``db`` is the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6357 | |
| 6358 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 |
| 6359 | |
| 6360 | The unpacked source code resides in the ``db-5.1.19`` folder. |
| 6361 | |
| 6362 | This next example assumes a Git repository. By default, Git |
| 6363 | repositories are cloned to ``${WORKDIR}/git`` during |
| 6364 | :ref:`ref-tasks-fetch`. Since this path is different |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6365 | 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] | 6366 | source can be located:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6367 | |
| 6368 | SRC_URI = "git://path/to/repo.git" |
| 6369 | S = "${WORKDIR}/git" |
| 6370 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6371 | :term:`SANITY_REQUIRED_UTILITIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6372 | Specifies a list of command-line utilities that should be checked for |
| 6373 | during the initial sanity checking process when running BitBake. If |
| 6374 | any of the utilities are not installed on the build host, then |
| 6375 | BitBake immediately exits with an error. |
| 6376 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6377 | :term:`SANITY_TESTED_DISTROS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6378 | A list of the host distribution identifiers that the build system has |
| 6379 | been tested against. Identifiers consist of the host distributor ID |
| 6380 | followed by the release, as reported by the ``lsb_release`` tool or |
| 6381 | as read from ``/etc/lsb-release``. Separate the list items with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6382 | explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6383 | not empty and the current value of |
| 6384 | :term:`NATIVELSBSTRING` does not appear in the |
| 6385 | list, then the build system reports a warning that indicates the |
| 6386 | current host distribution has not been tested as a build host. |
| 6387 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6388 | :term:`SDK_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6389 | The target architecture for the SDK. Typically, you do not directly |
| 6390 | set this variable. Instead, use :term:`SDKMACHINE`. |
| 6391 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6392 | :term:`SDK_CUSTOM_TEMPLATECONF` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6393 | 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] | 6394 | "1" and a ``conf/templateconf.conf`` file exists in the build directory |
| 6395 | (:term:`TOPDIR`) then this will be copied into the SDK. |
| 6396 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6397 | :term:`SDK_DEPLOY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6398 | The directory set up and used by the |
| 6399 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which |
| 6400 | the SDK is deployed. The ``populate_sdk_base`` class defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6401 | :term:`SDK_DEPLOY` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6402 | |
| 6403 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
| 6404 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6405 | :term:`SDK_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6406 | The parent directory used by the OpenEmbedded build system when |
| 6407 | creating SDK output. The |
| 6408 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6409 | the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6410 | |
| 6411 | SDK_DIR = "${WORKDIR}/sdk" |
| 6412 | |
| 6413 | .. note:: |
| 6414 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6415 | The :term:`SDK_DIR` directory is a temporary directory as it is part of |
| 6416 | :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6418 | :term:`SDK_EXT_TYPE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6419 | Controls whether or not shared state artifacts are copied into the |
| 6420 | extensible SDK. The default value of "full" copies all of the |
| 6421 | required shared state artifacts into the extensible SDK. The value |
| 6422 | "minimal" leaves these artifacts out of the SDK. |
| 6423 | |
| 6424 | .. note:: |
| 6425 | |
| 6426 | If you set the variable to "minimal", you need to ensure |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6427 | :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the |
| 6428 | artifacts to be fetched as needed. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6429 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6430 | :term:`SDK_HOST_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6431 | The manifest file for the host part of the SDK. This file lists all |
| 6432 | the installed packages that make up the host part of the SDK. The |
| 6433 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6434 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6435 | |
| 6436 | packagename packagearch version |
| 6437 | |
| 6438 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6439 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6440 | |
| 6441 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
| 6442 | |
| 6443 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6444 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6445 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6446 | :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6447 | When set to "1", specifies to include the packagedata for all recipes |
| 6448 | in the "world" target in the extensible SDK. Including this data |
| 6449 | allows the ``devtool search`` command to find these recipes in search |
| 6450 | results, as well as allows the ``devtool add`` command to map |
| 6451 | dependencies more effectively. |
| 6452 | |
| 6453 | .. note:: |
| 6454 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6455 | Enabling the :term:`SDK_INCLUDE_PKGDATA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6456 | variable significantly increases build time because all of world |
| 6457 | needs to be built. Enabling the variable also slightly increases |
| 6458 | the size of the extensible SDK. |
| 6459 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6460 | :term:`SDK_INCLUDE_TOOLCHAIN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6461 | When set to "1", specifies to include the toolchain in the extensible |
| 6462 | SDK. Including the toolchain is useful particularly when |
| 6463 | :term:`SDK_EXT_TYPE` is set to "minimal" to keep |
| 6464 | the SDK reasonably small but you still want to provide a usable |
| 6465 | toolchain. For example, suppose you want to use the toolchain from an |
| 6466 | IDE or from other tools and you do not want to perform additional |
| 6467 | steps to install the toolchain. |
| 6468 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6469 | The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if |
| 6470 | :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if |
| 6471 | :term:`SDK_EXT_TYPE` is set to "full". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6472 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6473 | :term:`SDK_INHERIT_BLACKLIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6474 | A list of classes to remove from the :term:`INHERIT` |
| 6475 | value globally within the extensible SDK configuration. The |
| 6476 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6477 | default value:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6478 | |
| 6479 | SDK_INHERIT_BLACKLIST ?= "buildhistory icecc" |
| 6480 | |
| 6481 | Some classes are not generally applicable within the extensible SDK |
| 6482 | context. You can use this variable to disable those classes. |
| 6483 | |
| 6484 | For additional information on how to customize the extensible SDK's |
| 6485 | configuration, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6486 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6487 | section in the Yocto Project Application Development and the |
| 6488 | Extensible Software Development Kit (eSDK) manual. |
| 6489 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6490 | :term:`SDK_LOCAL_CONF_BLACKLIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6491 | A list of variables not allowed through from the OpenEmbedded build |
| 6492 | system configuration into the extensible SDK configuration. Usually, |
| 6493 | these are variables that are specific to the machine on which the |
| 6494 | build system is running and thus would be potentially problematic |
| 6495 | within the extensible SDK. |
| 6496 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6497 | By default, :term:`SDK_LOCAL_CONF_BLACKLIST` is set in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6498 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and |
| 6499 | excludes the following variables: |
| 6500 | |
| 6501 | - :term:`CONF_VERSION` |
| 6502 | - :term:`BB_NUMBER_THREADS` |
| 6503 | - :term:`bitbake:BB_NUMBER_PARSE_THREADS` |
| 6504 | - :term:`PARALLEL_MAKE` |
| 6505 | - :term:`PRSERV_HOST` |
| 6506 | - :term:`SSTATE_MIRRORS` :term:`DL_DIR` |
| 6507 | - :term:`SSTATE_DIR` :term:`TMPDIR` |
| 6508 | - :term:`BB_SERVER_TIMEOUT` |
| 6509 | |
| 6510 | For additional information on how to customize the extensible SDK's |
| 6511 | configuration, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6512 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6513 | section in the Yocto Project Application Development and the |
| 6514 | Extensible Software Development Kit (eSDK) manual. |
| 6515 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6516 | :term:`SDK_LOCAL_CONF_WHITELIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6517 | A list of variables allowed through from the OpenEmbedded build |
| 6518 | system configuration into the extensible SDK configuration. By |
| 6519 | default, the list of variables is empty and is set in the |
| 6520 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. |
| 6521 | |
| 6522 | This list overrides the variables specified using the |
| 6523 | :term:`SDK_LOCAL_CONF_BLACKLIST` |
| 6524 | variable as well as any variables identified by automatic |
| 6525 | blacklisting due to the "/" character being found at the start of the |
| 6526 | value, which is usually indicative of being a path and thus might not |
| 6527 | be valid on the system where the SDK is installed. |
| 6528 | |
| 6529 | For additional information on how to customize the extensible SDK's |
| 6530 | configuration, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6531 | ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6532 | section in the Yocto Project Application Development and the |
| 6533 | Extensible Software Development Kit (eSDK) manual. |
| 6534 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6535 | :term:`SDK_NAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6536 | The base name for SDK output files. The name is derived from the |
| 6537 | :term:`DISTRO`, :term:`TCLIBC`, |
| 6538 | :term:`SDK_ARCH`, |
| 6539 | :term:`IMAGE_BASENAME`, and |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6540 | :term:`TUNE_PKGARCH` variables:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6541 | |
| 6542 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" |
| 6543 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6544 | :term:`SDK_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6545 | Specifies the operating system for which the SDK will be built. The |
| 6546 | default value is the value of :term:`BUILD_OS`. |
| 6547 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6548 | :term:`SDK_OUTPUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6549 | The location used by the OpenEmbedded build system when creating SDK |
| 6550 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6551 | class defines the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6552 | |
| 6553 | SDK_DIR = "${WORKDIR}/sdk" |
| 6554 | SDK_OUTPUT = "${SDK_DIR}/image" |
| 6555 | SDK_DEPLOY = "${DEPLOY_DIR}/sdk" |
| 6556 | |
| 6557 | .. note:: |
| 6558 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6559 | 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] | 6560 | :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is |
| 6561 | :term:`SDK_DEPLOY`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6563 | :term:`SDK_PACKAGE_ARCHS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6564 | Specifies a list of architectures compatible with the SDK machine. |
| 6565 | This variable is set automatically and should not normally be |
| 6566 | hand-edited. Entries are separated using spaces and listed in order |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6567 | 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] | 6568 | noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". |
| 6569 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6570 | :term:`SDK_POSTPROCESS_COMMAND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6571 | Specifies a list of functions to call once the OpenEmbedded build |
| 6572 | system creates the SDK. You can specify functions separated by |
| 6573 | semicolons: SDK_POSTPROCESS_COMMAND += "function; ... " |
| 6574 | |
| 6575 | If you need to pass an SDK path to a command within a function, you |
| 6576 | can use ``${SDK_DIR}``, which points to the parent directory used by |
| 6577 | the OpenEmbedded build system when creating SDK output. See the |
| 6578 | :term:`SDK_DIR` variable for more information. |
| 6579 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6580 | :term:`SDK_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6581 | The toolchain binary prefix used for ``nativesdk`` recipes. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6582 | OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6583 | :term:`TARGET_PREFIX` when building |
| 6584 | ``nativesdk`` recipes. The default value is "${SDK_SYS}-". |
| 6585 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6586 | :term:`SDK_RECRDEP_TASKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6587 | A list of shared state tasks added to the extensible SDK. By default, |
| 6588 | the following tasks are added: |
| 6589 | |
| 6590 | - do_populate_lic |
| 6591 | - do_package_qa |
| 6592 | - do_populate_sysroot |
| 6593 | - do_deploy |
| 6594 | |
| 6595 | Despite the default value of "" for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6596 | :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6597 | 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] | 6598 | :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6599 | tasks that are needed in order to build |
| 6600 | :term:`SDK_TARGETS`). |
| 6601 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6602 | :term:`SDK_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6603 | Specifies the system, including the architecture and the operating |
| 6604 | system, for which the SDK will be built. |
| 6605 | |
| 6606 | The OpenEmbedded build system automatically sets this variable based |
| 6607 | on :term:`SDK_ARCH`, |
| 6608 | :term:`SDK_VENDOR`, and |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6609 | :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] | 6610 | variable yourself. |
| 6611 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6612 | :term:`SDK_TARGET_MANIFEST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6613 | The manifest file for the target part of the SDK. This file lists all |
| 6614 | the installed packages that make up the target part of the SDK. The |
| 6615 | file contains package information on a line-per-package basis as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6616 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6617 | |
| 6618 | packagename packagearch version |
| 6619 | |
| 6620 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6621 | defines the manifest file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6622 | |
| 6623 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
| 6624 | |
| 6625 | The location is derived using the :term:`SDK_DEPLOY` and |
| 6626 | :term:`TOOLCHAIN_OUTPUTNAME` variables. |
| 6627 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6628 | :term:`SDK_TARGETS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6629 | A list of targets to install from shared state as part of the |
| 6630 | standard or extensible SDK installation. The default value is "${PN}" |
| 6631 | (i.e. the image from which the SDK is built). |
| 6632 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6633 | The :term:`SDK_TARGETS` variable is an internal variable and typically |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6634 | would not be changed. |
| 6635 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6636 | :term:`SDK_TITLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6637 | The title to be printed when running the SDK installer. By default, |
| 6638 | this title is based on the :term:`DISTRO_NAME` or |
| 6639 | :term:`DISTRO` variable and is set in the |
| 6640 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6641 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6642 | |
| 6643 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
| 6644 | |
| 6645 | For the default distribution "poky", |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6646 | :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6647 | |
| 6648 | For information on how to change this default title, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6649 | ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6650 | section in the Yocto Project Application Development and the |
| 6651 | Extensible Software Development Kit (eSDK) manual. |
| 6652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6653 | :term:`SDK_UPDATE_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6654 | An optional URL for an update server for the extensible SDK. If set, |
| 6655 | the value is used as the default update server when running |
| 6656 | ``devtool sdk-update`` within the extensible SDK. |
| 6657 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6658 | :term:`SDK_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6659 | Specifies the name of the SDK vendor. |
| 6660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6661 | :term:`SDK_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6662 | Specifies the version of the SDK. The Poky distribution configuration file |
| 6663 | (``/meta-poky/conf/distro/poky.conf``) sets the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6664 | :term:`SDK_VERSION` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6665 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6666 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6667 | |
| 6668 | For additional information, see the |
| 6669 | :term:`DISTRO_VERSION` and |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6670 | :term:`METADATA_REVISION` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6671 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6672 | :term:`SDKEXTPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6673 | The default installation directory for the Extensible SDK. By |
| 6674 | default, this directory is based on the :term:`DISTRO` |
| 6675 | variable and is set in the |
| 6676 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6677 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6678 | |
| 6679 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
| 6680 | |
| 6681 | For the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6682 | default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6683 | |
| 6684 | For information on how to change this default directory, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6685 | ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6686 | section in the Yocto Project Application Development and the |
| 6687 | Extensible Software Development Kit (eSDK) manual. |
| 6688 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6689 | :term:`SDKIMAGE_FEATURES` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6690 | Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6691 | the SDK generated from an image using the following command:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6692 | |
| 6693 | $ bitbake -c populate_sdk imagename |
| 6694 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6695 | :term:`SDKMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6696 | The machine for which the SDK is built. In other words, the SDK is |
| 6697 | built such that it runs on the target you specify with the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6698 | :term:`SDKMACHINE` value. The value points to a corresponding ``.conf`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6699 | file under ``conf/machine-sdk/``. |
| 6700 | |
| 6701 | You can use "i686" and "x86_64" as possible values for this variable. |
| 6702 | The variable defaults to "i686" and is set in the local.conf file in |
| 6703 | the Build Directory. |
| 6704 | :: |
| 6705 | |
| 6706 | SDKMACHINE ?= "i686" |
| 6707 | |
| 6708 | .. note:: |
| 6709 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6710 | You cannot set the :term:`SDKMACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6711 | variable in your distribution configuration file. If you do, the |
| 6712 | configuration will not take affect. |
| 6713 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6714 | :term:`SDKPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6715 | Defines the path offered to the user for installation of the SDK that |
| 6716 | is generated by the OpenEmbedded build system. The path appears as |
| 6717 | the default location for installing the SDK when you run the SDK's |
| 6718 | installation script. You can override the offered path when you run |
| 6719 | the script. |
| 6720 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6721 | :term:`SDKTARGETSYSROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6722 | The full path to the sysroot used for cross-compilation within an SDK |
| 6723 | as it will be when installed into the default |
| 6724 | :term:`SDKPATH`. |
| 6725 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6726 | :term:`SECTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6727 | The section in which packages should be categorized. Package |
| 6728 | management utilities can make use of this variable. |
| 6729 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6730 | :term:`SELECTED_OPTIMIZATION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6731 | Specifies the optimization flags passed to the C compiler when |
| 6732 | building for the target. The flags are passed through the default |
| 6733 | value of the :term:`TARGET_CFLAGS` variable. |
| 6734 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6735 | The :term:`SELECTED_OPTIMIZATION` variable takes the value of |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 6736 | :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which |
| 6737 | case the value of :term:`DEBUG_OPTIMIZATION` is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6738 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6739 | :term:`SERIAL_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6740 | Defines a serial console (TTY) to enable using |
| 6741 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 6742 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6743 | separated by a space. You cannot specify more than one TTY device:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6744 | |
| 6745 | SERIAL_CONSOLE = "115200 ttyS0" |
| 6746 | |
| 6747 | .. note:: |
| 6748 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6749 | The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6750 | :term:`SERIAL_CONSOLES` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6751 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6752 | :term:`SERIAL_CONSOLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6753 | Defines a serial console (TTY) to enable using |
| 6754 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
| 6755 | value that specifies the baud rate followed by the TTY device name |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6756 | separated by a semicolon. Use spaces to separate multiple devices:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6757 | |
| 6758 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" |
| 6759 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6760 | :term:`SERIAL_CONSOLES_CHECK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6761 | Specifies serial consoles, which must be listed in |
| 6762 | :term:`SERIAL_CONSOLES`, to check against |
| 6763 | ``/proc/console`` before enabling them using getty. This variable |
| 6764 | allows aliasing in the format: <device>:<alias>. If a device was |
| 6765 | listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6766 | ``/proc/console``, you would do the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6767 | |
| 6768 | SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0" |
| 6769 | |
| 6770 | This variable is currently only supported with SysVinit (i.e. not |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6771 | with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires |
| 6772 | ``/etc/inittab`` to be writable when used with SysVinit. This makes it |
| 6773 | incompatible with customizations such as the following:: |
| 6774 | |
| 6775 | EXTRA_IMAGE_FEATURES += "read-only-rootfs" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6776 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6777 | :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6778 | A list of recipe dependencies that should not be used to determine |
| 6779 | signatures of tasks from one recipe when they depend on tasks from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6780 | another recipe. For example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6781 | |
| 6782 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" |
| 6783 | |
| 6784 | In the previous example, ``intone`` depends on ``mplayer2``. |
| 6785 | |
| 6786 | You can use the special token ``"*"`` on the left-hand side of the |
| 6787 | dependency to match all recipes except the one on the right-hand |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6788 | side. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6789 | |
| 6790 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" |
| 6791 | |
| 6792 | In the previous example, all recipes except ``quilt-native`` ignore |
| 6793 | task signatures from the ``quilt-native`` recipe when determining |
| 6794 | their task signatures. |
| 6795 | |
| 6796 | Use of this variable is one mechanism to remove dependencies that |
| 6797 | affect task signatures and thus force rebuilds when a recipe changes. |
| 6798 | |
| 6799 | .. note:: |
| 6800 | |
| 6801 | If you add an inappropriate dependency for a recipe relationship, |
| 6802 | the software might break during runtime if the interface of the |
| 6803 | second recipe was changed after the first recipe had been built. |
| 6804 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6805 | :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6806 | A list of recipes that are completely stable and will never change. |
| 6807 | The ABI for the recipes in the list are presented by output from the |
| 6808 | tasks run to build the recipe. Use of this variable is one way to |
| 6809 | remove dependencies from one recipe on another that affect task |
| 6810 | signatures and thus force rebuilds when the recipe changes. |
| 6811 | |
| 6812 | .. note:: |
| 6813 | |
| 6814 | If you add an inappropriate variable to this list, the software |
| 6815 | might break at runtime if the interface of the recipe was changed |
| 6816 | after the other had been built. |
| 6817 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6818 | :term:`SITEINFO_BITS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6819 | Specifies the number of bits for the target system CPU. The value |
| 6820 | should be either "32" or "64". |
| 6821 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6822 | :term:`SITEINFO_ENDIANNESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6823 | Specifies the endian byte order of the target system. The value |
| 6824 | should be either "le" for little-endian or "be" for big-endian. |
| 6825 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6826 | :term:`SKIP_FILEDEPS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6827 | Enables removal of all files from the "Provides" section of an RPM |
| 6828 | package. Removal of these files is required for packages containing |
| 6829 | prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. |
| 6830 | |
| 6831 | To enable file removal, set the variable to "1" in your |
| 6832 | ``conf/local.conf`` configuration file in your: |
| 6833 | :term:`Build Directory`. |
| 6834 | :: |
| 6835 | |
| 6836 | SKIP_FILEDEPS = "1" |
| 6837 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6838 | :term:`SOC_FAMILY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6839 | Groups together machines based upon the same family of SOC (System On |
| 6840 | Chip). You typically set this variable in a common ``.inc`` file that |
| 6841 | you include in the configuration files of all the machines. |
| 6842 | |
| 6843 | .. note:: |
| 6844 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 6845 | You must include ``conf/machine/include/soc-family.inc`` for this |
| 6846 | variable to appear in :term:`MACHINEOVERRIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6847 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6848 | :term:`SOLIBS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6849 | Defines the suffix for shared libraries used on the target platform. |
| 6850 | By default, this suffix is ".so.*" for all Linux-based systems and is |
| 6851 | defined in the ``meta/conf/bitbake.conf`` configuration file. |
| 6852 | |
| 6853 | You will see this variable referenced in the default values of |
| 6854 | ``FILES_${PN}``. |
| 6855 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6856 | :term:`SOLIBSDEV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6857 | Defines the suffix for the development symbolic link (symlink) for |
| 6858 | shared libraries on the target platform. By default, this suffix is |
| 6859 | ".so" for Linux-based systems and is defined in the |
| 6860 | ``meta/conf/bitbake.conf`` configuration file. |
| 6861 | |
| 6862 | You will see this variable referenced in the default values of |
| 6863 | ``FILES_${PN}-dev``. |
| 6864 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6865 | :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6866 | 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] | 6867 | creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6868 | your ``local.conf`` configuration file ensures the source for all |
| 6869 | recipes are fetched regardless of whether or not a recipe is |
| 6870 | compatible with the configuration. A recipe is considered |
| 6871 | incompatible with the currently configured machine when either or |
| 6872 | both the :term:`COMPATIBLE_MACHINE` |
| 6873 | variable and :term:`COMPATIBLE_HOST` variables |
| 6874 | specify compatibility with a machine other than that of the current |
| 6875 | machine or host. |
| 6876 | |
| 6877 | .. note:: |
| 6878 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6879 | Do not set the :term:`SOURCE_MIRROR_FETCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6880 | variable unless you are creating a source mirror. In other words, |
| 6881 | do not set the variable during a normal build. |
| 6882 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6883 | :term:`SOURCE_MIRROR_URL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6884 | Defines your own :term:`PREMIRRORS` from which to |
| 6885 | first fetch source before attempting to fetch from the upstream |
| 6886 | specified in :term:`SRC_URI`. |
| 6887 | |
| 6888 | To use this variable, you must globally inherit the |
| 6889 | :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 6890 | the URL to your mirrors. Here is the general syntax:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6891 | |
| 6892 | INHERIT += "own-mirrors" |
| 6893 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" |
| 6894 | |
| 6895 | .. note:: |
| 6896 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6897 | You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6898 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6899 | :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6900 | Maps commonly used license names to their SPDX counterparts found in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6901 | ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6902 | mappings, see the ``meta/conf/licenses.conf`` file. |
| 6903 | |
| 6904 | For additional information, see the :term:`LICENSE` |
| 6905 | variable. |
| 6906 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6907 | :term:`SPECIAL_PKGSUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6908 | A list of prefixes for :term:`PN` used by the OpenEmbedded |
| 6909 | build system to create variants of recipes or packages. The list |
| 6910 | specifies the prefixes to strip off during certain circumstances such |
| 6911 | as the generation of the :term:`BPN` variable. |
| 6912 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6913 | :term:`SPL_BINARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6914 | The file type for the Secondary Program Loader (SPL). Some devices |
| 6915 | use an SPL from which to boot (e.g. the BeagleBone development |
| 6916 | board). For such cases, you can declare the file type of the SPL |
| 6917 | binary in the ``u-boot.inc`` include file, which is used in the |
| 6918 | U-Boot recipe. |
| 6919 | |
| 6920 | 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] | 6921 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6922 | |
| 6923 | # Some versions of u-boot build an SPL (Second Program Loader) image that |
| 6924 | # should be packaged along with the u-boot binary as well as placed in the |
| 6925 | # deploy directory. For those versions they can set the following variables |
| 6926 | # to allow packaging the SPL. |
| 6927 | SPL_BINARY ?= "" |
| 6928 | SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" |
| 6929 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" |
| 6930 | SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" |
| 6931 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6932 | The :term:`SPL_BINARY` variable helps form |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6933 | various ``SPL_*`` variables used by the OpenEmbedded build system. |
| 6934 | |
| 6935 | See the BeagleBone machine configuration example in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6936 | ":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] | 6937 | section in the Yocto Project Board Support Package Developer's Guide |
| 6938 | for additional information. |
| 6939 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 6940 | :term:`SRC_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6941 | The list of source files - local or remote. This variable tells the |
| 6942 | OpenEmbedded build system which bits to pull in for the build and how |
| 6943 | to pull them in. For example, if the recipe or append file only needs |
| 6944 | to fetch a tarball from the Internet, the recipe or append file uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 6945 | a single :term:`SRC_URI` entry. On the other hand, if the recipe or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6946 | append file needs to fetch a tarball, apply two patches, and include |
| 6947 | a custom file, the recipe or append file would include four instances |
| 6948 | of the variable. |
| 6949 | |
| 6950 | The following list explains the available URI protocols. URI |
| 6951 | protocols are highly dependent on particular BitBake Fetcher |
| 6952 | submodules. Depending on the fetcher BitBake uses, various URL |
| 6953 | parameters are employed. For specifics on the supported Fetchers, see |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6954 | the ":ref:`Fetchers <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`" section in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6955 | BitBake User Manual. |
| 6956 | |
| 6957 | - ``file://`` - Fetches files, which are usually files shipped |
| 6958 | with the :term:`Metadata`, from the local machine (e.g. |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 6959 | :ref:`patch <overview-manual/concepts:patching>` files). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6960 | The path is relative to the :term:`FILESPATH` |
| 6961 | variable. Thus, the build system searches, in order, from the |
| 6962 | following directories, which are assumed to be a subdirectories of |
| 6963 | the directory in which the recipe file (``.bb``) or append file |
| 6964 | (``.bbappend``) resides: |
| 6965 | |
| 6966 | - ``${BPN}`` - The base recipe name without any special suffix |
| 6967 | or version numbers. |
| 6968 | |
| 6969 | - ``${BP}`` - ``${BPN}-${PV}``. The base recipe name and |
| 6970 | version but without any special package name suffix. |
| 6971 | |
| 6972 | - *files -* Files within a directory, which is named ``files`` |
| 6973 | and is also alongside the recipe or append file. |
| 6974 | |
| 6975 | .. note:: |
| 6976 | |
| 6977 | If you want the build system to pick up files specified through |
| 6978 | a |
| 6979 | SRC_URI |
| 6980 | statement from your append file, you need to be sure to extend |
| 6981 | the |
| 6982 | FILESPATH |
| 6983 | variable by also using the |
| 6984 | FILESEXTRAPATHS |
| 6985 | variable from within your append file. |
| 6986 | |
| 6987 | - ``bzr://`` - Fetches files from a Bazaar revision control |
| 6988 | repository. |
| 6989 | |
| 6990 | - ``git://`` - Fetches files from a Git revision control |
| 6991 | repository. |
| 6992 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 6993 | - ``osc://`` - Fetches files from an OSC (openSUSE Build service) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6994 | revision control repository. |
| 6995 | |
| 6996 | - ``repo://`` - Fetches files from a repo (Git) repository. |
| 6997 | |
| 6998 | - ``ccrc://`` - Fetches files from a ClearCase repository. |
| 6999 | |
| 7000 | - ``http://`` - Fetches files from the Internet using ``http``. |
| 7001 | |
| 7002 | - ``https://`` - Fetches files from the Internet using ``https``. |
| 7003 | |
| 7004 | - ``ftp://`` - Fetches files from the Internet using ``ftp``. |
| 7005 | |
| 7006 | - ``cvs://`` - Fetches files from a CVS revision control |
| 7007 | repository. |
| 7008 | |
| 7009 | - ``hg://`` - Fetches files from a Mercurial (``hg``) revision |
| 7010 | control repository. |
| 7011 | |
| 7012 | - ``p4://`` - Fetches files from a Perforce (``p4``) revision |
| 7013 | control repository. |
| 7014 | |
| 7015 | - ``ssh://`` - Fetches files from a secure shell. |
| 7016 | |
| 7017 | - ``svn://`` - Fetches files from a Subversion (``svn``) revision |
| 7018 | control repository. |
| 7019 | |
| 7020 | - ``npm://`` - Fetches JavaScript modules from a registry. |
| 7021 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 7022 | - ``az://`` - Fetches files from an Azure Storage account. |
| 7023 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7024 | There are standard and recipe-specific options for :term:`SRC_URI`. Here are |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 7025 | standard ones: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7026 | |
| 7027 | - ``apply`` - Whether to apply the patch or not. The default |
| 7028 | action is to apply the patch. |
| 7029 | |
| 7030 | - ``striplevel`` - Which striplevel to use when applying the |
| 7031 | patch. The default level is 1. |
| 7032 | |
| 7033 | - ``patchdir`` - Specifies the directory in which the patch should |
| 7034 | be applied. The default is ``${``\ :term:`S`\ ``}``. |
| 7035 | |
| 7036 | Here are options specific to recipes building code from a revision |
| 7037 | control system: |
| 7038 | |
| 7039 | - ``mindate`` - Apply the patch only if |
| 7040 | :term:`SRCDATE` is equal to or greater than |
| 7041 | ``mindate``. |
| 7042 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7043 | - ``maxdate`` - Apply the patch only if :term:`SRCDATE` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7044 | than ``maxdate``. |
| 7045 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7046 | - ``minrev`` - Apply the patch only if :term:`SRCREV` is equal to or |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7047 | greater than ``minrev``. |
| 7048 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7049 | - ``maxrev`` - Apply the patch only if :term:`SRCREV` is not later |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7050 | than ``maxrev``. |
| 7051 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7052 | - ``rev`` - Apply the patch only if :term:`SRCREV` is equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7053 | ``rev``. |
| 7054 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7055 | - ``notrev`` - Apply the patch only if :term:`SRCREV` is not equal to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7056 | ``rev``. |
| 7057 | |
| 7058 | Here are some additional options worth mentioning: |
| 7059 | |
| 7060 | - ``unpack`` - Controls whether or not to unpack the file if it is |
| 7061 | an archive. The default action is to unpack the file. |
| 7062 | |
| 7063 | - ``destsuffix`` - Places the file (or extracts its contents) into |
| 7064 | the specified subdirectory of :term:`WORKDIR` when |
| 7065 | the Git fetcher is used. |
| 7066 | |
| 7067 | - ``subdir`` - Places the file (or extracts its contents) into the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7068 | specified subdirectory of :term:`WORKDIR` when the local (``file://``) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7069 | fetcher is used. |
| 7070 | |
| 7071 | - ``localdir`` - Places the file (or extracts its contents) into |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7072 | the specified subdirectory of :term:`WORKDIR` when the CVS fetcher is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7073 | used. |
| 7074 | |
| 7075 | - ``subpath`` - Limits the checkout to a specific subpath of the |
| 7076 | tree when using the Git fetcher is used. |
| 7077 | |
| 7078 | - ``name`` - Specifies a name to be used for association with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7079 | :term:`SRC_URI` checksums or :term:`SRCREV` when you have more than one |
| 7080 | file or git repository specified in :term:`SRC_URI`. For example:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7081 | |
| 7082 | SRC_URI = "git://example.com/foo.git;name=first \ |
| 7083 | git://example.com/bar.git;name=second \ |
| 7084 | http://example.com/file.tar.gz;name=third" |
| 7085 | |
| 7086 | SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15" |
| 7087 | SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f" |
| 7088 | SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de" |
| 7089 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7090 | |
| 7091 | - ``downloadfilename`` - Specifies the filename used when storing |
| 7092 | the downloaded file. |
| 7093 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7094 | :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7095 | By default, the OpenEmbedded build system automatically detects |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7096 | whether :term:`SRC_URI` contains files that are machine-specific. If so, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7097 | the build system automatically changes :term:`PACKAGE_ARCH`. Setting this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7098 | variable to "0" disables this behavior. |
| 7099 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7100 | :term:`SRCDATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7101 | The date of the source code used to build the package. This variable |
| 7102 | applies only if the source was fetched from a Source Code Manager |
| 7103 | (SCM). |
| 7104 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7105 | :term:`SRCPV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7106 | Returns the version string of the current package. This string is |
| 7107 | used to help define the value of :term:`PV`. |
| 7108 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7109 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7110 | configuration file in the :term:`Source Directory` as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7111 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7112 | |
| 7113 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
| 7114 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7115 | Recipes that need to define :term:`PV` do so with the help of the |
| 7116 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7117 | located in ``meta/recipes-connectivity`` in the Source Directory |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7118 | defines :term:`PV` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7119 | |
| 7120 | PV = "0.12-git${SRCPV}" |
| 7121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7122 | :term:`SRCREV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7123 | The revision of the source code used to build the package. This |
| 7124 | variable applies to Subversion, Git, Mercurial, and Bazaar only. Note |
| 7125 | that if you want to build a fixed revision and you want to avoid |
| 7126 | performing a query on the remote repository every time BitBake parses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7127 | 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] | 7128 | identifier and not just a tag. |
| 7129 | |
| 7130 | .. note:: |
| 7131 | |
| 7132 | For information on limitations when inheriting the latest revision |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7133 | of software using :term:`SRCREV`, see the :term:`AUTOREV` variable |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7134 | description and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7135 | ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7136 | section, which is in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7137 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7138 | :term:`SRCTREECOVEREDTASKS` |
| 7139 | A list of tasks that are typically not relevant (and therefore skipped) |
| 7140 | when building using the :ref:`externalsrc <ref-classes-externalsrc>` |
| 7141 | class. The default value as set in that class file is the set of tasks |
| 7142 | that are rarely needed when using external source:: |
| 7143 | |
| 7144 | SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" |
| 7145 | |
| 7146 | The notable exception is when processing external kernel source as |
| 7147 | defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>` |
| 7148 | class file (formatted for aesthetics):: |
| 7149 | |
| 7150 | SRCTREECOVEREDTASKS += "\ |
| 7151 | do_validate_branches \ |
| 7152 | do_kernel_configcheck \ |
| 7153 | do_kernel_checkout \ |
| 7154 | do_fetch \ |
| 7155 | do_unpack \ |
| 7156 | do_patch \ |
| 7157 | " |
| 7158 | |
| 7159 | See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` |
| 7160 | variables for more information. |
| 7161 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7162 | :term:`SSTATE_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7163 | The directory for the shared state cache. |
| 7164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7165 | :term:`SSTATE_MIRROR_ALLOW_NETWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7166 | If set to "1", allows fetches from mirrors that are specified in |
| 7167 | :term:`SSTATE_MIRRORS` to work even when |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7168 | fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to |
| 7169 | "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if |
| 7170 | 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] | 7171 | your shared state cache, but you want to disable any other fetching |
| 7172 | from the network. |
| 7173 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7174 | :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7175 | Configures the OpenEmbedded build system to search other mirror |
| 7176 | locations for prebuilt cache data objects before building out the |
| 7177 | data. This variable works like fetcher :term:`MIRRORS` |
| 7178 | and :term:`PREMIRRORS` and points to the cache |
| 7179 | locations to check for the shared state (sstate) objects. |
| 7180 | |
| 7181 | You can specify a filesystem directory or a remote URL such as HTTP |
| 7182 | or FTP. The locations you specify need to contain the shared state |
| 7183 | cache (sstate-cache) results from previous builds. The sstate-cache |
| 7184 | you point to can also be from builds on other machines. |
| 7185 | |
| 7186 | When pointing to sstate build artifacts on another machine that uses |
| 7187 | a different GCC version for native builds, you must configure |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7188 | :term:`SSTATE_MIRRORS` with a regular expression that maps local search |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7189 | paths to server paths. The paths need to take into account |
| 7190 | :term:`NATIVELSBSTRING` set by the |
| 7191 | :ref:`uninative <ref-classes-uninative>` class. For example, the |
| 7192 | following maps the local search path ``universal-4.9`` to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7193 | server-provided path server_url_sstate_path:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7194 | |
| 7195 | SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n" |
| 7196 | |
| 7197 | If a mirror uses the same structure as |
| 7198 | :term:`SSTATE_DIR`, you need to add "PATH" at the |
| 7199 | end as shown in the examples below. The build system substitutes the |
| 7200 | correct path within the directory structure. |
| 7201 | :: |
| 7202 | |
| 7203 | SSTATE_MIRRORS ?= "\ |
| 7204 | file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ |
| 7205 | file://.* file:///some-local-dir/sstate/PATH" |
| 7206 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7207 | :term:`SSTATE_SCAN_FILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7208 | Controls the list of files the OpenEmbedded build system scans for |
| 7209 | hardcoded installation paths. The variable uses a space-separated |
| 7210 | list of filenames (not paths) with standard wildcard characters |
| 7211 | allowed. |
| 7212 | |
| 7213 | During a build, the OpenEmbedded build system creates a shared state |
| 7214 | (sstate) object during the first stage of preparing the sysroots. |
| 7215 | That object is scanned for hardcoded paths for original installation |
| 7216 | locations. The list of files that are scanned for paths is controlled |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7217 | by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files |
| 7218 | 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] | 7219 | than the variable being comprehensively set. The |
| 7220 | :ref:`sstate <ref-classes-sstate>` class specifies the default list |
| 7221 | of files. |
| 7222 | |
| 7223 | For details on the process, see the |
| 7224 | :ref:`staging <ref-classes-staging>` class. |
| 7225 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7226 | :term:`STAGING_BASE_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7227 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7228 | directory for the build host. |
| 7229 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7230 | :term:`STAGING_BASELIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7231 | Specifies the path to the ``/lib`` subdirectory of the sysroot |
| 7232 | directory for the target for which the current recipe is being built |
| 7233 | (:term:`STAGING_DIR_HOST`). |
| 7234 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7235 | :term:`STAGING_BINDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7236 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7237 | directory for the target for which the current recipe is being built |
| 7238 | (:term:`STAGING_DIR_HOST`). |
| 7239 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7240 | :term:`STAGING_BINDIR_CROSS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7241 | Specifies the path to the directory containing binary configuration |
| 7242 | scripts. These scripts provide configuration information for other |
| 7243 | software that wants to make use of libraries or include files |
| 7244 | provided by the software associated with the script. |
| 7245 | |
| 7246 | .. note:: |
| 7247 | |
| 7248 | This style of build configuration has been largely replaced by |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7249 | ``pkg-config``. Consequently, if ``pkg-config`` is supported by the |
| 7250 | library to which you are linking, it is recommended you use |
| 7251 | ``pkg-config`` instead of a provided configuration script. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7252 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7253 | :term:`STAGING_BINDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7254 | Specifies the path to the ``/usr/bin`` subdirectory of the sysroot |
| 7255 | directory for the build host. |
| 7256 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7257 | :term:`STAGING_DATADIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7258 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7259 | directory for the target for which the current recipe is being built |
| 7260 | (:term:`STAGING_DIR_HOST`). |
| 7261 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7262 | :term:`STAGING_DATADIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7263 | Specifies the path to the ``/usr/share`` subdirectory of the sysroot |
| 7264 | directory for the build host. |
| 7265 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7266 | :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7267 | Helps construct the ``recipe-sysroots`` directory, which is used |
| 7268 | during packaging. |
| 7269 | |
| 7270 | For information on how staging for recipe-specific sysroots occurs, |
| 7271 | see the :ref:`ref-tasks-populate_sysroot` |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7272 | task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7273 | section in the Yocto Project Development Tasks Manual, the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7274 | ":ref:`overview-manual/concepts:configuration, compilation, and staging`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7275 | section in the Yocto Project Overview and Concepts Manual, and the |
| 7276 | :term:`SYSROOT_DIRS` variable. |
| 7277 | |
| 7278 | .. note:: |
| 7279 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7280 | Recipes should never write files directly under the :term:`STAGING_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7281 | directory because the OpenEmbedded build system manages the |
| 7282 | directory automatically. Instead, files should be installed to |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7283 | ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7284 | task and then the OpenEmbedded build system will stage a subset of |
| 7285 | those files into the sysroot. |
| 7286 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7287 | :term:`STAGING_DIR_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7288 | Specifies the path to the sysroot directory for the system on which |
| 7289 | the component is built to run (the system that hosts the component). |
| 7290 | For most recipes, this sysroot is the one in which that recipe's |
| 7291 | :ref:`ref-tasks-populate_sysroot` task copies |
| 7292 | files. Exceptions include ``-native`` recipes, where the |
| 7293 | ``do_populate_sysroot`` task instead uses |
| 7294 | :term:`STAGING_DIR_NATIVE`. Depending on |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7295 | 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] | 7296 | have the following values: |
| 7297 | |
| 7298 | - For recipes building for the target machine, the value is |
| 7299 | "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". |
| 7300 | |
| 7301 | - For native recipes building for the build host, the value is empty |
| 7302 | given the assumption that when building for the build host, the |
| 7303 | build host's own directories should be used. |
| 7304 | |
| 7305 | .. note:: |
| 7306 | |
| 7307 | ``-native`` recipes are not installed into host paths like such |
| 7308 | as ``/usr``. Rather, these recipes are installed into |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7309 | :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7310 | standard build environment variables such as |
| 7311 | :term:`CPPFLAGS` and |
| 7312 | :term:`CFLAGS` are set up so that both host paths |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7313 | and :term:`STAGING_DIR_NATIVE` are searched for libraries and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7314 | headers using, for example, GCC's ``-isystem`` option. |
| 7315 | |
| 7316 | Thus, the emphasis is that the ``STAGING_DIR*`` variables |
| 7317 | should be viewed as input variables by tasks such as |
| 7318 | :ref:`ref-tasks-configure`, |
| 7319 | :ref:`ref-tasks-compile`, and |
| 7320 | :ref:`ref-tasks-install`. Having the real system |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7321 | root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7322 | for ``-native`` recipes, as they make use of host headers and |
| 7323 | libraries. |
| 7324 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7325 | :term:`STAGING_DIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7326 | Specifies the path to the sysroot directory used when building |
| 7327 | components that run on the build host itself. |
| 7328 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7329 | :term:`STAGING_DIR_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7330 | Specifies the path to the sysroot used for the system for which the |
| 7331 | component generates code. For components that do not generate code, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7332 | which is the majority, :term:`STAGING_DIR_TARGET` is set to match |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7333 | :term:`STAGING_DIR_HOST`. |
| 7334 | |
| 7335 | Some recipes build binaries that can run on the target system but |
| 7336 | those binaries in turn generate code for another different system |
| 7337 | (e.g. cross-canadian recipes). Using terminology from GNU, the |
| 7338 | primary system is referred to as the "HOST" and the secondary, or |
| 7339 | different, system is referred to as the "TARGET". Thus, the binaries |
| 7340 | run on the "HOST" system and generate binaries for the "TARGET" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7341 | system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used |
| 7342 | for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7343 | sysroot used for the "TARGET" system. |
| 7344 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7345 | :term:`STAGING_ETCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7346 | Specifies the path to the ``/etc`` subdirectory of the sysroot |
| 7347 | directory for the build host. |
| 7348 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7349 | :term:`STAGING_EXECPREFIXDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7350 | Specifies the path to the ``/usr`` subdirectory of the sysroot |
| 7351 | directory for the target for which the current recipe is being built |
| 7352 | (:term:`STAGING_DIR_HOST`). |
| 7353 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7354 | :term:`STAGING_INCDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7355 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7356 | sysroot directory for the target for which the current recipe being |
| 7357 | built (:term:`STAGING_DIR_HOST`). |
| 7358 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7359 | :term:`STAGING_INCDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7360 | Specifies the path to the ``/usr/include`` subdirectory of the |
| 7361 | sysroot directory for the build host. |
| 7362 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7363 | :term:`STAGING_KERNEL_BUILDDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7364 | Points to the directory containing the kernel build artifacts. |
| 7365 | Recipes building software that needs to access kernel build artifacts |
| 7366 | (e.g. ``systemtap-uprobes``) can look in the directory specified with |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7367 | the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7368 | after the kernel has been built. |
| 7369 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7370 | :term:`STAGING_KERNEL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7371 | The directory with kernel headers that are required to build |
| 7372 | out-of-tree modules. |
| 7373 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7374 | :term:`STAGING_LIBDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7375 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7376 | directory for the target for which the current recipe is being built |
| 7377 | (:term:`STAGING_DIR_HOST`). |
| 7378 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7379 | :term:`STAGING_LIBDIR_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7380 | Specifies the path to the ``/usr/lib`` subdirectory of the sysroot |
| 7381 | directory for the build host. |
| 7382 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7383 | :term:`STAMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7384 | Specifies the base path used to create recipe stamp files. The path |
| 7385 | to an actual stamp file is constructed by evaluating this string and |
| 7386 | then appending additional information. Currently, the default |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7387 | assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7388 | file is:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7389 | |
| 7390 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 7391 | |
| 7392 | For information on how BitBake uses stamp files to determine if a |
| 7393 | task should be rerun, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7394 | ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7395 | section in the Yocto Project Overview and Concepts Manual. |
| 7396 | |
| 7397 | See :term:`STAMPS_DIR`, |
| 7398 | :term:`MULTIMACH_TARGET_SYS`, |
| 7399 | :term:`PN`, :term:`EXTENDPE`, |
| 7400 | :term:`PV`, and :term:`PR` for related variable |
| 7401 | information. |
| 7402 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7403 | :term:`STAMPS_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7404 | Specifies the base directory in which the OpenEmbedded build system |
| 7405 | places stamps. The default directory is ``${TMPDIR}/stamps``. |
| 7406 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7407 | :term:`STRIP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7408 | The minimal command and arguments to run ``strip``, which is used to |
| 7409 | strip symbols. |
| 7410 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7411 | :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7412 | The short (72 characters or less) summary of the binary package for |
| 7413 | packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7414 | :term:`SUMMARY` is used to define the |
| 7415 | :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7416 | not set in the recipe. |
| 7417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7418 | :term:`SVNDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7419 | The directory in which files checked out of a Subversion system are |
| 7420 | stored. |
| 7421 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7422 | :term:`SYSLINUX_DEFAULT_CONSOLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7423 | Specifies the kernel boot default console. If you want to use a |
| 7424 | console other than the default, set this variable in your recipe as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7425 | follows where "X" is the console number you want to use:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7426 | |
| 7427 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" |
| 7428 | |
| 7429 | The :ref:`syslinux <ref-classes-syslinux>` class initially sets |
| 7430 | this variable to null but then checks for a value later. |
| 7431 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7432 | :term:`SYSLINUX_OPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7433 | Lists additional options to add to the syslinux file. You need to set |
| 7434 | this variable in your recipe. If you want to list multiple options, |
| 7435 | separate the options with a semicolon character (``;``). |
| 7436 | |
| 7437 | The :ref:`syslinux <ref-classes-syslinux>` class uses this variable |
| 7438 | to create a set of options. |
| 7439 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7440 | :term:`SYSLINUX_SERIAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7441 | Specifies the alternate serial port or turns it off. To turn off |
| 7442 | serial, set this variable to an empty string in your recipe. The |
| 7443 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7444 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7445 | |
| 7446 | SYSLINUX_SERIAL ?= "0 115200" |
| 7447 | |
| 7448 | The class checks for and uses the variable as needed. |
| 7449 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7450 | :term:`SYSLINUX_SERIAL_TTY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7451 | Specifies the alternate console=tty... kernel boot argument. The |
| 7452 | variable's default value is set in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7453 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7454 | |
| 7455 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
| 7456 | |
| 7457 | The class checks for and uses the variable as needed. |
| 7458 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7459 | :term:`SYSLINUX_SPLASH` |
| 7460 | An ``.LSS`` file used as the background for the VGA boot menu when |
| 7461 | you use the boot menu. You need to set this variable in your recipe. |
| 7462 | |
| 7463 | The :ref:`syslinux <ref-classes-syslinux>` class checks for this |
| 7464 | variable and if found, the OpenEmbedded build system installs the |
| 7465 | splash screen. |
| 7466 | |
| 7467 | :term:`SYSROOT_DESTDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7468 | Points to the temporary directory under the work directory (default |
| 7469 | "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") |
| 7470 | where the files populated into the sysroot are assembled during the |
| 7471 | :ref:`ref-tasks-populate_sysroot` task. |
| 7472 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7473 | :term:`SYSROOT_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7474 | Directories that are staged into the sysroot by the |
| 7475 | :ref:`ref-tasks-populate_sysroot` task. By |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7476 | default, the following directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7477 | |
| 7478 | SYSROOT_DIRS = " \ |
| 7479 | ${includedir} \ |
| 7480 | ${libdir} \ |
| 7481 | ${base_libdir} \ |
| 7482 | ${nonarch_base_libdir} \ |
| 7483 | ${datadir} \ |
| 7484 | " |
| 7485 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7486 | :term:`SYSROOT_DIRS_BLACKLIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7487 | Directories that are not staged into the sysroot by the |
| 7488 | :ref:`ref-tasks-populate_sysroot` task. You |
| 7489 | can use this variable to exclude certain subdirectories of |
| 7490 | directories listed in :term:`SYSROOT_DIRS` from |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7491 | staging. By default, the following directories are not staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7492 | |
| 7493 | SYSROOT_DIRS_BLACKLIST = " \ |
| 7494 | ${mandir} \ |
| 7495 | ${docdir} \ |
| 7496 | ${infodir} \ |
| 7497 | ${datadir}/locale \ |
| 7498 | ${datadir}/applications \ |
| 7499 | ${datadir}/fonts \ |
| 7500 | ${datadir}/pixmaps \ |
| 7501 | " |
| 7502 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7503 | :term:`SYSROOT_DIRS_NATIVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7504 | Extra directories staged into the sysroot by the |
| 7505 | :ref:`ref-tasks-populate_sysroot` task for |
| 7506 | ``-native`` recipes, in addition to those specified in |
| 7507 | :term:`SYSROOT_DIRS`. By default, the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7508 | extra directories are staged:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7509 | |
| 7510 | SYSROOT_DIRS_NATIVE = " \ |
| 7511 | ${bindir} \ |
| 7512 | ${sbindir} \ |
| 7513 | ${base_bindir} \ |
| 7514 | ${base_sbindir} \ |
| 7515 | ${libexecdir} \ |
| 7516 | ${sysconfdir} \ |
| 7517 | ${localstatedir} \ |
| 7518 | " |
| 7519 | |
| 7520 | .. note:: |
| 7521 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7522 | Programs built by ``-native`` recipes run directly from the sysroot |
| 7523 | (:term:`STAGING_DIR_NATIVE`), which is why additional directories |
| 7524 | containing program executables and supporting files need to be staged. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7525 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7526 | :term:`SYSROOT_PREPROCESS_FUNCS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7527 | A list of functions to execute after files are staged into the |
| 7528 | sysroot. These functions are usually used to apply additional |
| 7529 | processing on the staged files, or to stage additional files. |
| 7530 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7531 | :term:`SYSTEMD_AUTO_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7532 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7533 | this variable specifies whether the specified service in |
| 7534 | :term:`SYSTEMD_SERVICE` should start |
| 7535 | automatically or not. By default, the service is enabled to |
| 7536 | automatically start at boot time. The default setting is in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7537 | :ref:`systemd <ref-classes-systemd>` class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7538 | |
| 7539 | SYSTEMD_AUTO_ENABLE ??= "enable" |
| 7540 | |
| 7541 | You can disable the service by setting the variable to "disable". |
| 7542 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7543 | :term:`SYSTEMD_BOOT_CFG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7544 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7545 | "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7546 | configuration file that should be used. By default, the |
| 7547 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7548 | :term:`SYSTEMD_BOOT_CFG` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7549 | |
| 7550 | SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf" |
| 7551 | |
| 7552 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7553 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7554 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7555 | :term:`SYSTEMD_BOOT_ENTRIES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7556 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7557 | "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7558 | list of entry files (``*.conf``) to install that contain one boot |
| 7559 | entry per file. By default, the |
| 7560 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7561 | :term:`SYSTEMD_BOOT_ENTRIES` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7562 | |
| 7563 | SYSTEMD_BOOT_ENTRIES ?= "" |
| 7564 | |
| 7565 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7566 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7567 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7568 | :term:`SYSTEMD_BOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7569 | When :term:`EFI_PROVIDER` is set to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7570 | "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7571 | boot menu timeout in seconds. By default, the |
| 7572 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7573 | :term:`SYSTEMD_BOOT_TIMEOUT` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7574 | |
| 7575 | SYSTEMD_BOOT_TIMEOUT ?= "10" |
| 7576 | |
| 7577 | For information on Systemd-boot, see the `Systemd-boot |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7578 | documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7579 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7580 | :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7581 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7582 | this variable locates the systemd unit files when they are not found |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7583 | in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7584 | variable is set such that the systemd unit files are assumed to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7585 | reside in the recipes main package:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7586 | |
| 7587 | SYSTEMD_PACKAGES ?= "${PN}" |
| 7588 | |
| 7589 | 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] | 7590 | 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] | 7591 | the build system can find the systemd unit files. |
| 7592 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7593 | :term:`SYSTEMD_SERVICE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7594 | When inheriting the :ref:`systemd <ref-classes-systemd>` class, |
| 7595 | this variable specifies the systemd service name for a package. |
| 7596 | |
| 7597 | When you specify this file in your recipe, use a package name |
| 7598 | override to indicate the package to which the value applies. Here is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7599 | an example from the connman recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7600 | |
| 7601 | SYSTEMD_SERVICE_${PN} = "connman.service" |
| 7602 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7603 | :term:`SYSVINIT_ENABLED_GETTYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7604 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7605 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7606 | specifies a space-separated list of the virtual terminals that should |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7607 | run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7608 | (allowing login), assuming :term:`USE_VT` is not set to |
| 7609 | "0". |
| 7610 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7611 | 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] | 7612 | run a getty on the first virtual terminal). |
| 7613 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7614 | :term:`T` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7615 | This variable points to a directory were BitBake places temporary |
| 7616 | files, which consist mostly of task logs and scripts, when building a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7617 | particular recipe. The variable is typically set as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7618 | |
| 7619 | T = "${WORKDIR}/temp" |
| 7620 | |
| 7621 | The :term:`WORKDIR` is the directory into which |
| 7622 | BitBake unpacks and builds the recipe. The default ``bitbake.conf`` |
| 7623 | file sets this variable. |
| 7624 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7625 | The :term:`T` variable is not to be confused with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7626 | :term:`TMPDIR` variable, which points to the root of |
| 7627 | the directory tree where BitBake places the output of an entire |
| 7628 | build. |
| 7629 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7630 | :term:`TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7631 | The target machine's architecture. The OpenEmbedded build system |
| 7632 | supports many architectures. Here is an example list of architectures |
| 7633 | supported. This list is by no means complete as the architecture is |
| 7634 | configurable: |
| 7635 | |
| 7636 | - arm |
| 7637 | - i586 |
| 7638 | - x86_64 |
| 7639 | - powerpc |
| 7640 | - powerpc64 |
| 7641 | - mips |
| 7642 | - mipsel |
| 7643 | |
| 7644 | For additional information on machine architectures, see the |
| 7645 | :term:`TUNE_ARCH` variable. |
| 7646 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7647 | :term:`TARGET_AS_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7648 | Specifies architecture-specific assembler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7649 | system. :term:`TARGET_AS_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7650 | :term:`TUNE_ASARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7651 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7652 | |
| 7653 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
| 7654 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7655 | :term:`TARGET_CC_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7656 | Specifies architecture-specific C compiler flags for the target |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7657 | system. :term:`TARGET_CC_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7658 | :term:`TUNE_CCARGS` by default. |
| 7659 | |
| 7660 | .. note:: |
| 7661 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7662 | It is a common workaround to append :term:`LDFLAGS` to |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7663 | :term:`TARGET_CC_ARCH` in recipes that build software for the target that |
| 7664 | would not otherwise respect the exported :term:`LDFLAGS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7665 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7666 | :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7667 | This is a specific kernel compiler flag for a CPU or Application |
| 7668 | Binary Interface (ABI) tune. The flag is used rarely and only for |
| 7669 | cases where a userspace :term:`TUNE_CCARGS` is not |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7670 | compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7671 | variable allows the kernel (and associated modules) to use a |
| 7672 | different configuration. See the |
| 7673 | ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the |
| 7674 | :term:`Source Directory` for an example. |
| 7675 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7676 | :term:`TARGET_CFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7677 | Specifies the flags to pass to the C compiler when building for the |
| 7678 | target. When building in the target context, |
| 7679 | :term:`CFLAGS` is set to the value of this variable by |
| 7680 | default. |
| 7681 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7682 | Additionally, the SDK's environment setup script sets the :term:`CFLAGS` |
| 7683 | variable in the environment to the :term:`TARGET_CFLAGS` value so that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7684 | executables built using the SDK also have the flags applied. |
| 7685 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7686 | :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7687 | Specifies the flags to pass to the C pre-processor (i.e. to both the |
| 7688 | C and the C++ compilers) when building for the target. When building |
| 7689 | in the target context, :term:`CPPFLAGS` is set to the |
| 7690 | value of this variable by default. |
| 7691 | |
| 7692 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7693 | :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7694 | value so that executables built using the SDK also have the flags |
| 7695 | applied. |
| 7696 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7697 | :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7698 | Specifies the flags to pass to the C++ compiler when building for the |
| 7699 | target. When building in the target context, |
| 7700 | :term:`CXXFLAGS` is set to the value of this variable |
| 7701 | by default. |
| 7702 | |
| 7703 | Additionally, the SDK's environment setup script sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7704 | :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7705 | value so that executables built using the SDK also have the flags |
| 7706 | applied. |
| 7707 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7708 | :term:`TARGET_FPU` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7709 | Specifies the method for handling FPU code. For FPU-less targets, |
| 7710 | which include most ARM CPUs, the variable must be set to "soft". If |
| 7711 | not, the kernel emulation gets used, which results in a performance |
| 7712 | penalty. |
| 7713 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7714 | :term:`TARGET_LD_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7715 | Specifies architecture-specific linker flags for the target system. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7716 | :term:`TARGET_LD_ARCH` is initialized from |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7717 | :term:`TUNE_LDARGS` by default in the BitBake |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7718 | configuration file (``meta/conf/bitbake.conf``):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7719 | |
| 7720 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
| 7721 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7722 | :term:`TARGET_LDFLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7723 | Specifies the flags to pass to the linker when building for the |
| 7724 | target. When building in the target context, |
| 7725 | :term:`LDFLAGS` is set to the value of this variable |
| 7726 | by default. |
| 7727 | |
| 7728 | Additionally, the SDK's environment setup script sets the |
| 7729 | :term:`LDFLAGS` variable in the environment to the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7730 | :term:`TARGET_LDFLAGS` value so that executables built using the SDK also |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7731 | have the flags applied. |
| 7732 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7733 | :term:`TARGET_OS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7734 | Specifies the target's operating system. The variable can be set to |
| 7735 | "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] | 7736 | for musl libc. For ARM/EABI targets, the possible values are |
| 7737 | "linux-gnueabi" and "linux-musleabi". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7738 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7739 | :term:`TARGET_PREFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7740 | Specifies the prefix used for the toolchain binary target tools. |
| 7741 | |
| 7742 | Depending on the type of recipe and the build target, |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7743 | :term:`TARGET_PREFIX` is set as follows: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7744 | |
| 7745 | - For recipes building for the target machine, the value is |
| 7746 | "${:term:`TARGET_SYS`}-". |
| 7747 | |
| 7748 | - For native recipes, the build system sets the variable to the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7749 | value of :term:`BUILD_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7750 | |
| 7751 | - For native SDK recipes (``nativesdk``), the build system sets the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7752 | variable to the value of :term:`SDK_PREFIX`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7753 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7754 | :term:`TARGET_SYS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7755 | Specifies the system, including the architecture and the operating |
| 7756 | system, for which the build is occurring in the context of the |
| 7757 | current recipe. |
| 7758 | |
| 7759 | The OpenEmbedded build system automatically sets this variable based |
| 7760 | on :term:`TARGET_ARCH`, |
| 7761 | :term:`TARGET_VENDOR`, and |
| 7762 | :term:`TARGET_OS` variables. |
| 7763 | |
| 7764 | .. note:: |
| 7765 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7766 | You do not need to set the :term:`TARGET_SYS` variable yourself. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7767 | |
| 7768 | Consider these two examples: |
| 7769 | |
| 7770 | - Given a native recipe on a 32-bit, x86 machine running Linux, the |
| 7771 | value is "i686-linux". |
| 7772 | |
| 7773 | - Given a recipe being built for a little-endian, MIPS target |
| 7774 | running Linux, the value might be "mipsel-linux". |
| 7775 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7776 | :term:`TARGET_VENDOR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7777 | Specifies the name of the target vendor. |
| 7778 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7779 | :term:`TCLIBC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7780 | Specifies the GNU standard C library (``libc``) variant to use during |
| 7781 | the build process. This variable replaces ``POKYLIBC``, which is no |
| 7782 | longer supported. |
| 7783 | |
| 7784 | You can select "glibc", "musl", "newlib", or "baremetal" |
| 7785 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7786 | :term:`TCLIBCAPPEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7787 | Specifies a suffix to be appended onto the |
| 7788 | :term:`TMPDIR` value. The suffix identifies the |
| 7789 | ``libc`` variant for building. When you are building for multiple |
| 7790 | variants with the same :term:`Build Directory`, this |
| 7791 | mechanism ensures that output for different ``libc`` variants is kept |
| 7792 | separate to avoid potential conflicts. |
| 7793 | |
| 7794 | In the ``defaultsetup.conf`` file, the default value of |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7795 | :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7796 | which normally only support one ``libc`` variant, set |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7797 | :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7798 | in no suffix being applied. |
| 7799 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7800 | :term:`TCMODE` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7801 | Specifies the toolchain selector. :term:`TCMODE` controls the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7802 | characteristics of the generated packages and images by telling the |
| 7803 | OpenEmbedded build system which toolchain profile to use. By default, |
| 7804 | the OpenEmbedded build system builds its own internal toolchain. The |
| 7805 | variable's default value is "default", which uses that internal |
| 7806 | toolchain. |
| 7807 | |
| 7808 | .. note:: |
| 7809 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7810 | 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] | 7811 | responsibility to ensure that the toolchain is compatible with the |
| 7812 | default toolchain. Using older or newer versions of these |
| 7813 | components might cause build problems. See the Release Notes for |
| 7814 | the Yocto Project release for the specific components with which |
| 7815 | the toolchain must be compatible. To access the Release Notes, go |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7816 | to the :yocto_home:`Downloads </software-overview/downloads>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7817 | page on the Yocto Project website and click on the "RELEASE |
| 7818 | INFORMATION" link for the appropriate release. |
| 7819 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7820 | The :term:`TCMODE` variable is similar to :term:`TCLIBC`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7821 | which controls the variant of the GNU standard C library (``libc``) |
| 7822 | used during the build process: ``glibc`` or ``musl``. |
| 7823 | |
| 7824 | With additional layers, it is possible to use a pre-compiled external |
| 7825 | toolchain. One example is the Sourcery G++ Toolchain. The support for |
| 7826 | this toolchain resides in the separate Mentor Graphics |
| 7827 | ``meta-sourcery`` layer at |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7828 | https://github.com/MentorEmbedded/meta-sourcery/. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7829 | |
| 7830 | The layer's ``README`` file contains information on how to use the |
| 7831 | Sourcery G++ Toolchain as an external toolchain. In summary, you must |
| 7832 | be sure to add the layer to your ``bblayers.conf`` file in front of |
| 7833 | the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable |
| 7834 | in your ``local.conf`` file to the location in which you installed |
| 7835 | the toolchain. |
| 7836 | |
| 7837 | The fundamentals used for this example apply to any external |
| 7838 | toolchain. You can use ``meta-sourcery`` as a template for adding |
| 7839 | support for other external toolchains. |
| 7840 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7841 | :term:`TEST_EXPORT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7842 | The location the OpenEmbedded build system uses to export tests when |
| 7843 | the :term:`TEST_EXPORT_ONLY` variable is set |
| 7844 | to "1". |
| 7845 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7846 | The :term:`TEST_EXPORT_DIR` variable defaults to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7847 | ``"${TMPDIR}/testimage/${PN}"``. |
| 7848 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7849 | :term:`TEST_EXPORT_ONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7850 | Specifies to export the tests only. Set this variable to "1" if you |
| 7851 | do not want to run the tests but you want them to be exported in a |
| 7852 | manner that you to run them outside of the build system. |
| 7853 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7854 | :term:`TEST_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7855 | Holds the SSH log and the boot log for QEMU machines. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7856 | :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7857 | |
| 7858 | .. note:: |
| 7859 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7860 | Actual test results reside in the task log (``log.do_testimage``), |
| 7861 | which is in the ``${WORKDIR}/temp/`` directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7862 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7863 | :term:`TEST_POWERCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7864 | For automated hardware testing, specifies the command to use to |
| 7865 | control the power of the target machine under test. Typically, this |
| 7866 | command would point to a script that performs the appropriate action |
| 7867 | (e.g. interacting with a web-enabled power strip). The specified |
| 7868 | command should expect to receive as the last argument "off", "on" or |
| 7869 | "cycle" specifying to power off, on, or cycle (power off and then |
| 7870 | power on) the device, respectively. |
| 7871 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7872 | :term:`TEST_POWERCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7873 | For automated hardware testing, specifies additional arguments to |
| 7874 | pass through to the command specified in |
| 7875 | :term:`TEST_POWERCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7876 | :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] | 7877 | wish, for example, to separate the machine-specific and |
| 7878 | non-machine-specific parts of the arguments. |
| 7879 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7880 | :term:`TEST_QEMUBOOT_TIMEOUT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7881 | The time in seconds allowed for an image to boot before automated |
| 7882 | runtime tests begin to run against an image. The default timeout |
| 7883 | period to allow the boot process to reach the login prompt is 500 |
| 7884 | seconds. You can specify a different value in the ``local.conf`` |
| 7885 | file. |
| 7886 | |
| 7887 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7888 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7889 | section in the Yocto Project Development Tasks Manual. |
| 7890 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7891 | :term:`TEST_SERIALCONTROL_CMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7892 | For automated hardware testing, specifies the command to use to |
| 7893 | connect to the serial console of the target machine under test. This |
| 7894 | command simply needs to connect to the serial console and forward |
| 7895 | that connection to standard input and output as any normal terminal |
| 7896 | program does. |
| 7897 | |
| 7898 | For example, to use the Picocom terminal program on serial device |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7899 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7900 | |
| 7901 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
| 7902 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7903 | :term:`TEST_SERIALCONTROL_EXTRA_ARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7904 | For automated hardware testing, specifies additional arguments to |
| 7905 | pass through to the command specified in |
| 7906 | :term:`TEST_SERIALCONTROL_CMD`. Setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7907 | :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] | 7908 | wish, for example, to separate the machine-specific and |
| 7909 | non-machine-specific parts of the command. |
| 7910 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7911 | :term:`TEST_SERVER_IP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7912 | The IP address of the build machine (host machine). This IP address |
| 7913 | is usually automatically detected. However, if detection fails, this |
| 7914 | variable needs to be set to the IP address of the build machine (i.e. |
| 7915 | where the build is taking place). |
| 7916 | |
| 7917 | .. note:: |
| 7918 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7919 | 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] | 7920 | tests such as the "dnf" test suite, which needs to download packages |
| 7921 | from ``WORKDIR/oe-rootfs-repo``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7922 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7923 | :term:`TEST_SUITES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7924 | An ordered list of tests (modules) to run against an image when |
| 7925 | performing automated runtime testing. |
| 7926 | |
| 7927 | The OpenEmbedded build system provides a core set of tests that can |
| 7928 | be used against images. |
| 7929 | |
| 7930 | .. note:: |
| 7931 | |
| 7932 | Currently, there is only support for running these tests under |
| 7933 | QEMU. |
| 7934 | |
| 7935 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7936 | 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] | 7937 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7938 | |
| 7939 | TEST_SUITES_append = " mytest" |
| 7940 | |
| 7941 | Alternatively, you can |
| 7942 | provide the "auto" option to have all applicable tests run against |
| 7943 | the image. |
| 7944 | :: |
| 7945 | |
| 7946 | TEST_SUITES_append = " auto" |
| 7947 | |
| 7948 | Using this option causes the |
| 7949 | build system to automatically run tests that are applicable to the |
| 7950 | image. Tests that are not applicable are skipped. |
| 7951 | |
| 7952 | The order in which tests are run is important. Tests that depend on |
| 7953 | another test must appear later in the list than the test on which |
| 7954 | they depend. For example, if you append the list of tests with two |
| 7955 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7956 | ``test_A``, then you must order the tests as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7957 | |
| 7958 | TEST_SUITES = "test_A test_B" |
| 7959 | |
| 7960 | For more information on testing images, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7961 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 7962 | section in the Yocto Project Development Tasks Manual. |
| 7963 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7964 | :term:`TEST_TARGET` |
| 7965 | Specifies the target controller to use when running tests against a |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 7966 | test image. The default controller to use is "qemu":: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7967 | |
| 7968 | TEST_TARGET = "qemu" |
| 7969 | |
| 7970 | A target controller is a class that defines how an image gets |
| 7971 | deployed on a target and how a target is started. A layer can extend |
| 7972 | the controllers by adding a module in the layer's |
| 7973 | ``/lib/oeqa/controllers`` directory and by inheriting the |
| 7974 | ``BaseTarget`` class, which is an abstract class that cannot be used |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7975 | as a value of :term:`TEST_TARGET`. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7976 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 7977 | You can provide the following arguments with :term:`TEST_TARGET`: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7978 | |
| 7979 | - *"qemu":* Boots a QEMU image and runs the tests. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7980 | ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7981 | in the Yocto Project Development Tasks Manual for more |
| 7982 | information. |
| 7983 | |
| 7984 | - *"simpleremote":* Runs the tests on target hardware that is |
| 7985 | already up and running. The hardware can be on the network or it |
| 7986 | can be a device running an image on QEMU. You must also set |
| 7987 | :term:`TEST_TARGET_IP` when you use |
| 7988 | "simpleremote". |
| 7989 | |
| 7990 | .. note:: |
| 7991 | |
| 7992 | This argument is defined in |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 7993 | ``meta/lib/oeqa/controllers/simpleremote.py``. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7994 | |
| 7995 | For information on running tests on hardware, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 7996 | ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 7997 | section in the Yocto Project Development Tasks Manual. |
| 7998 | |
| 7999 | :term:`TEST_TARGET_IP` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8000 | 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] | 8001 | variable has no effect when :term:`TEST_TARGET` is |
| 8002 | set to "qemu". |
| 8003 | |
| 8004 | 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] | 8005 | an example:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8006 | |
| 8007 | TEST_TARGET_IP = "192.168.1.4:2201" |
| 8008 | |
| 8009 | Specifying a port is |
| 8010 | useful when SSH is started on a non-standard port or in cases when |
| 8011 | your hardware under test is behind a firewall or network that is not |
| 8012 | directly accessible from your host and you need to do port address |
| 8013 | translation. |
| 8014 | |
| 8015 | :term:`TESTIMAGE_AUTO` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8016 | Automatically runs the series of automated tests for images when an |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8017 | image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8018 | any image that successfully builds to automatically boot under QEMU. |
| 8019 | Using the variable also adds in dependencies so that any SDK for |
| 8020 | which testing is requested is automatically built first. |
| 8021 | |
| 8022 | These tests are written in Python making use of the ``unittest`` |
| 8023 | module, and the majority of them run commands on the target system |
| 8024 | over ``ssh``. You can set this variable to "1" in your ``local.conf`` |
| 8025 | file in the :term:`Build Directory` to have the |
| 8026 | OpenEmbedded build system automatically run these tests after an |
| 8027 | image successfully builds: |
| 8028 | |
| 8029 | TESTIMAGE_AUTO = "1" |
| 8030 | |
| 8031 | For more information |
| 8032 | on enabling, running, and writing these tests, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8033 | ":ref:`dev-manual/common-tasks:performing automated runtime testing`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8034 | section in the Yocto Project Development Tasks Manual and the |
| 8035 | ":ref:`testimage*.bbclass <ref-classes-testimage*>`" section. |
| 8036 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8037 | :term:`THISDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8038 | The directory in which the file BitBake is currently parsing is |
| 8039 | located. Do not manually set this variable. |
| 8040 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8041 | :term:`TIME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8042 | The time the build was started. Times appear using the hour, minute, |
| 8043 | and second (HMS) format (e.g. "140159" for one minute and fifty-nine |
| 8044 | seconds past 1400 hours). |
| 8045 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8046 | :term:`TMPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8047 | This variable is the base directory the OpenEmbedded build system |
| 8048 | uses for all build output and intermediate files (other than the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8049 | shared state cache). By default, the :term:`TMPDIR` variable points to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8050 | ``tmp`` within the :term:`Build Directory`. |
| 8051 | |
| 8052 | If you want to establish this directory in a location other than the |
| 8053 | default, you can uncomment and edit the following statement in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8054 | ``conf/local.conf`` file in the :term:`Source Directory`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8055 | |
| 8056 | #TMPDIR = "${TOPDIR}/tmp" |
| 8057 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8058 | 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] | 8059 | which does not use NFS, while having the Build Directory use NFS. |
| 8060 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8061 | The filesystem used by :term:`TMPDIR` must have standard filesystem |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8062 | semantics (i.e. mixed-case files are unique, POSIX file locking, and |
| 8063 | persistent inodes). Due to various issues with NFS and bugs in some |
| 8064 | implementations, NFS does not meet this minimum requirement. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8065 | Consequently, :term:`TMPDIR` cannot be on NFS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8066 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8067 | :term:`TOOLCHAIN_HOST_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8068 | This variable lists packages the OpenEmbedded build system uses when |
| 8069 | building an SDK, which contains a cross-development environment. The |
| 8070 | packages specified by this variable are part of the toolchain set |
| 8071 | that runs on the :term:`SDKMACHINE`, and each |
| 8072 | package should usually have the prefix ``nativesdk-``. For example, |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8073 | consider the following command when building an SDK:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8074 | |
| 8075 | $ bitbake -c populate_sdk imagename |
| 8076 | |
| 8077 | In this case, a default list of packages is |
| 8078 | set in this variable, but you can add additional packages to the |
| 8079 | list. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8080 | ":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] | 8081 | in the Yocto Project Application Development and the Extensible |
| 8082 | Software Development Kit (eSDK) manual for more information. |
| 8083 | |
| 8084 | For background information on cross-development toolchains in the |
| 8085 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8086 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8087 | section in the Yocto Project Overview and Concepts Manual. For |
| 8088 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8089 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8090 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8091 | :term:`TOOLCHAIN_OUTPUTNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8092 | This variable defines the name used for the toolchain output. The |
| 8093 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8094 | the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8095 | |
| 8096 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" |
| 8097 | |
| 8098 | See |
| 8099 | the :term:`SDK_NAME` and |
| 8100 | :term:`SDK_VERSION` variables for additional |
| 8101 | information. |
| 8102 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8103 | :term:`TOOLCHAIN_TARGET_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8104 | This variable lists packages the OpenEmbedded build system uses when |
| 8105 | it creates the target part of an SDK (i.e. the part built for the |
| 8106 | target hardware), which includes libraries and headers. Use this |
| 8107 | variable to add individual packages to the part of the SDK that runs |
| 8108 | on the target. See the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8109 | ":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] | 8110 | in the Yocto Project Application Development and the Extensible |
| 8111 | Software Development Kit (eSDK) manual for more information. |
| 8112 | |
| 8113 | For background information on cross-development toolchains in the |
| 8114 | Yocto Project development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8115 | ":ref:`sdk-manual/intro:the cross-development toolchain`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8116 | section in the Yocto Project Overview and Concepts Manual. For |
| 8117 | information on setting up a cross-development environment, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8118 | :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8119 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8120 | :term:`TOPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8121 | The top-level :term:`Build Directory`. BitBake |
| 8122 | automatically sets this variable when you initialize your build |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8123 | environment using :ref:`structure-core-script`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8124 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8125 | :term:`TRANSLATED_TARGET_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8126 | A sanitized version of :term:`TARGET_ARCH`. This |
| 8127 | variable is used where the architecture is needed in a value where |
| 8128 | underscores are not allowed, for example within package filenames. In |
| 8129 | this case, dash characters replace any underscore characters used in |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8130 | :term:`TARGET_ARCH`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8131 | |
| 8132 | Do not edit this variable. |
| 8133 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8134 | :term:`TUNE_ARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8135 | The GNU canonical architecture for a specific architecture (i.e. |
| 8136 | ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses |
| 8137 | this value to setup configuration. |
| 8138 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8139 | :term:`TUNE_ARCH` definitions are specific to a given architecture. The |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8140 | definitions can be a single static definition, or can be dynamically |
| 8141 | adjusted. You can see details for a given CPU family by looking at |
| 8142 | the architecture's ``README`` file. For example, the |
| 8143 | ``meta/conf/machine/include/mips/README`` file in the |
| 8144 | :term:`Source Directory` provides information for |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8145 | :term:`TUNE_ARCH` specific to the ``mips`` architecture. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8146 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8147 | :term:`TUNE_ARCH` is tied closely to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8148 | :term:`TARGET_ARCH`, which defines the target |
| 8149 | machine's architecture. The BitBake configuration file |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8150 | (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8151 | |
| 8152 | TARGET_ARCH = "${TUNE_ARCH}" |
| 8153 | |
| 8154 | The following list, which is by no means complete since architectures |
| 8155 | are configurable, shows supported machine architectures: |
| 8156 | |
| 8157 | - arm |
| 8158 | - i586 |
| 8159 | - x86_64 |
| 8160 | - powerpc |
| 8161 | - powerpc64 |
| 8162 | - mips |
| 8163 | - mipsel |
| 8164 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8165 | :term:`TUNE_ASARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8166 | Specifies architecture-specific assembler flags for the target |
| 8167 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8168 | :term:`TUNE_ASARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8169 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8170 | through :term:`TUNE_FEATURES`. For example, the |
| 8171 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8172 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8173 | |
| 8174 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" |
| 8175 | |
| 8176 | .. note:: |
| 8177 | |
| 8178 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8179 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8180 | supply its own set of flags). |
| 8181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8182 | :term:`TUNE_CCARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8183 | Specifies architecture-specific C compiler flags for the target |
| 8184 | system. The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8185 | :term:`TUNE_CCARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8186 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8187 | through :term:`TUNE_FEATURES`. |
| 8188 | |
| 8189 | .. note:: |
| 8190 | |
| 8191 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8192 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8193 | supply its own set of flags). |
| 8194 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8195 | :term:`TUNE_FEATURES` |
| 8196 | Features used to "tune" a compiler for optimal use given a specific |
| 8197 | processor. The features are defined within the tune files and allow |
| 8198 | arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on |
| 8199 | the features. |
| 8200 | |
| 8201 | The OpenEmbedded build system verifies the features to be sure they |
| 8202 | are not conflicting and that they are supported. |
| 8203 | |
| 8204 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8205 | :term:`TUNE_FEATURES` as follows:: |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8206 | |
| 8207 | TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" |
| 8208 | |
| 8209 | See the :term:`DEFAULTTUNE` variable for more information. |
| 8210 | |
| 8211 | :term:`TUNE_LDARGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8212 | Specifies architecture-specific linker flags for the target system. |
| 8213 | The set of flags is based on the selected tune features. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8214 | :term:`TUNE_LDARGS` is set using the tune include files, which are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8215 | typically under ``meta/conf/machine/include/`` and are influenced |
| 8216 | through :term:`TUNE_FEATURES`. For example, the |
| 8217 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8218 | for the x86 architecture as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8219 | |
| 8220 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" |
| 8221 | |
| 8222 | .. note:: |
| 8223 | |
| 8224 | Board Support Packages (BSPs) select the tune. The selected tune, |
| 8225 | in turn, affects the tune variables themselves (i.e. the tune can |
| 8226 | supply its own set of flags). |
| 8227 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8228 | :term:`TUNE_PKGARCH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8229 | The package architecture understood by the packaging system to define |
| 8230 | the architecture, ABI, and tuning of output packages. The specific |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8231 | tune is defined using the "_tune" override as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8232 | |
| 8233 | TUNE_PKGARCH_tune-tune = "tune" |
| 8234 | |
| 8235 | These tune-specific package architectures are defined in the machine |
| 8236 | include files. Here is an example of the "core2-32" tuning as used in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8237 | the ``meta/conf/machine/include/tune-core2.inc`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8238 | |
| 8239 | TUNE_PKGARCH_tune-core2-32 = "core2-32" |
| 8240 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8241 | :term:`TUNEABI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8242 | An underlying Application Binary Interface (ABI) used by a particular |
| 8243 | tuning in a given toolchain layer. Providers that use prebuilt |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8244 | libraries can use the :term:`TUNEABI`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8245 | :term:`TUNEABI_OVERRIDE`, and |
| 8246 | :term:`TUNEABI_WHITELIST` variables to check |
| 8247 | compatibility of tunings against their selection of libraries. |
| 8248 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8249 | If :term:`TUNEABI` is undefined, then every tuning is allowed. See the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8250 | :ref:`sanity <ref-classes-sanity>` class to see how the variable is |
| 8251 | used. |
| 8252 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8253 | :term:`TUNEABI_OVERRIDE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8254 | If set, the OpenEmbedded system ignores the |
| 8255 | :term:`TUNEABI_WHITELIST` variable. |
| 8256 | Providers that use prebuilt libraries can use the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8257 | :term:`TUNEABI_OVERRIDE`, :term:`TUNEABI_WHITELIST`, and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8258 | :term:`TUNEABI` variables to check compatibility of a |
| 8259 | tuning against their selection of libraries. |
| 8260 | |
| 8261 | See the :ref:`sanity <ref-classes-sanity>` class to see how the |
| 8262 | variable is used. |
| 8263 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8264 | :term:`TUNEABI_WHITELIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8265 | A whitelist of permissible :term:`TUNEABI` values. If |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8266 | :term:`TUNEABI_WHITELIST` is not set, all tunes are allowed. Providers |
| 8267 | that use prebuilt libraries can use the :term:`TUNEABI_WHITELIST`, |
| 8268 | :term:`TUNEABI_OVERRIDE`, and :term:`TUNEABI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8269 | variables to check compatibility of a tuning against their selection |
| 8270 | of libraries. |
| 8271 | |
| 8272 | See the :ref:`sanity <ref-classes-sanity>` class to see how the |
| 8273 | variable is used. |
| 8274 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8275 | :term:`TUNECONFLICTS[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8276 | Specifies CPU or Application Binary Interface (ABI) tuning features |
| 8277 | that conflict with feature. |
| 8278 | |
| 8279 | Known tuning conflicts are specified in the machine include files in |
| 8280 | the :term:`Source Directory`. Here is an example from |
| 8281 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file |
| 8282 | that lists the "o32" and "n64" features as conflicting with the "n32" |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8283 | feature:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8284 | |
| 8285 | TUNECONFLICTS[n32] = "o32 n64" |
| 8286 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8287 | :term:`TUNEVALID[feature]` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8288 | Specifies a valid CPU or Application Binary Interface (ABI) tuning |
| 8289 | feature. The specified feature is stored as a flag. Valid features |
| 8290 | are specified in the machine include files (e.g. |
| 8291 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8292 | from that file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8293 | |
| 8294 | TUNEVALID[bigendian] = "Enable big-endian mode." |
| 8295 | |
| 8296 | See the machine include files in the :term:`Source Directory` |
| 8297 | for these features. |
| 8298 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8299 | :term:`UBOOT_CONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8300 | Configures the :term:`UBOOT_MACHINE` and can |
| 8301 | also define :term:`IMAGE_FSTYPES` for individual |
| 8302 | cases. |
| 8303 | |
| 8304 | Following is an example from the ``meta-fsl-arm`` layer. :: |
| 8305 | |
| 8306 | UBOOT_CONFIG ??= "sd" |
| 8307 | UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard" |
| 8308 | UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config" |
| 8309 | UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs" |
| 8310 | UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" |
| 8311 | |
| 8312 | 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] | 8313 | :term:`UBOOT_MACHINE`. The "sd" configuration defines |
| 8314 | "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8315 | "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] | 8316 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8317 | 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] | 8318 | :ref:`uboot-config <ref-classes-uboot-config>` |
| 8319 | class. |
| 8320 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8321 | :term:`UBOOT_DTB_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8322 | 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] | 8323 | image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8324 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify |
| 8325 | the load address to be used in |
| 8326 | creating the dtb sections of Image Tree Source for the FIT image. |
| 8327 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8328 | :term:`UBOOT_DTBO_LOADADDRESS` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8329 | 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] | 8330 | image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8331 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in |
| 8332 | creating the dtbo sections of Image Tree Source for the FIT image. |
| 8333 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8334 | :term:`UBOOT_ENTRYPOINT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8335 | 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] | 8336 | creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8337 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8338 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8339 | :term:`UBOOT_LOADADDRESS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8340 | 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] | 8341 | creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8342 | command-line parameter to the ``uboot-mkimage`` utility. |
| 8343 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8344 | :term:`UBOOT_LOCALVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8345 | Appends a string to the name of the local version of the U-Boot |
| 8346 | image. For example, assuming the version of the U-Boot image built |
| 8347 | 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] | 8348 | "2013.10-yocto" given the following statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8349 | |
| 8350 | UBOOT_LOCALVERSION = "-yocto" |
| 8351 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8352 | :term:`UBOOT_MACHINE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8353 | Specifies the value passed on the ``make`` command line when building |
| 8354 | a U-Boot image. The value indicates the target platform |
| 8355 | configuration. You typically set this variable from the machine |
| 8356 | configuration file (i.e. ``conf/machine/machine_name.conf``). |
| 8357 | |
| 8358 | Please see the "Selection of Processor Architecture and Board Type" |
| 8359 | section in the U-Boot README for valid values for this variable. |
| 8360 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8361 | :term:`UBOOT_MAKE_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8362 | Specifies the target called in the ``Makefile``. The default target |
| 8363 | is "all". |
| 8364 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8365 | :term:`UBOOT_MKIMAGE` |
| 8366 | Specifies the name of the mkimage command as used by the |
| 8367 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble |
| 8368 | the FIT image. This can be used to substitute an alternative command, wrapper |
| 8369 | script or function if desired. The default is "uboot-mkimage". |
| 8370 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8371 | :term:`UBOOT_MKIMAGE_DTCOPTS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8372 | Options for the device tree compiler passed to mkimage '-D' |
| 8373 | 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] | 8374 | 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] | 8375 | pass the ``-D`` option to mkimage. |
| 8376 | |
| 8377 | :term:`UBOOT_MKIMAGE_SIGN` |
| 8378 | Specifies the name of the mkimage command as used by the |
| 8379 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign |
| 8380 | the FIT image after it has been assembled (if enabled). This can be used |
| 8381 | to substitute an alternative command, wrapper script or function if |
| 8382 | desired. The default is "${:term:`UBOOT_MKIMAGE`}". |
| 8383 | |
| 8384 | :term:`UBOOT_MKIMAGE_SIGN_ARGS` |
| 8385 | Optionally specifies additional arguments for the |
| 8386 | :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the |
| 8387 | mkimage command when signing the FIT image. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8388 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8389 | :term:`UBOOT_RD_ENTRYPOINT` |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8390 | Specifies the entrypoint for the RAM disk image. |
| 8391 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8392 | :term:`UBOOT_RD_ENTRYPOINT` variable is used |
Andrew Geissler | 4873add | 2020-11-02 18:44:49 -0600 | [diff] [blame] | 8393 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8394 | entrypoint to be used in creating the Image Tree Source for |
| 8395 | the FIT image. |
| 8396 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8397 | :term:`UBOOT_RD_LOADADDRESS` |
| 8398 | Specifies the load address for the RAM disk image. |
| 8399 | During FIT image creation, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8400 | :term:`UBOOT_RD_LOADADDRESS` variable is used |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8401 | in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the |
| 8402 | load address to be used in creating the Image Tree Source for |
| 8403 | the FIT image. |
| 8404 | |
| 8405 | :term:`UBOOT_SIGN_ENABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8406 | Enable signing of FIT image. The default value is "0". |
| 8407 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8408 | :term:`UBOOT_SIGN_KEYDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8409 | Location of the directory containing the RSA key and |
| 8410 | certificate used for signing FIT image. |
| 8411 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8412 | :term:`UBOOT_SIGN_KEYNAME` |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8413 | 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] | 8414 | :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt |
| 8415 | certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have |
| 8416 | :term:`UBOOT_SIGN_KEYNAME` set to "dev". |
| 8417 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8418 | :term:`UBOOT_SUFFIX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8419 | Points to the generated U-Boot extension. For example, ``u-boot.sb`` |
| 8420 | has a ``.sb`` extension. |
| 8421 | |
| 8422 | The default U-Boot extension is ``.bin`` |
| 8423 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8424 | :term:`UBOOT_TARGET` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8425 | Specifies the target used for building U-Boot. The target is passed |
| 8426 | directly as part of the "make" command (e.g. SPL and AIS). If you do |
| 8427 | not specifically set this variable, the OpenEmbedded build process |
| 8428 | passes and uses "all" for the target during the U-Boot building |
| 8429 | process. |
| 8430 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8431 | :term:`UNKNOWN_CONFIGURE_WHITELIST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8432 | Specifies a list of options that, if reported by the configure script |
| 8433 | as being invalid, should not generate a warning during the |
| 8434 | :ref:`ref-tasks-configure` task. Normally, invalid |
| 8435 | configure options are simply not passed to the configure script (e.g. |
| 8436 | should be removed from :term:`EXTRA_OECONF` or |
| 8437 | :term:`PACKAGECONFIG_CONFARGS`). |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 8438 | However, there are common options that are passed to all |
| 8439 | configure scripts at a class level, but might not be valid for some |
| 8440 | configure scripts. Therefore warnings about these options are useless. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8441 | For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_WHITELIST`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8442 | |
| 8443 | The configure arguments check that uses |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8444 | :term:`UNKNOWN_CONFIGURE_WHITELIST` is part of the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8445 | :ref:`insane <ref-classes-insane>` class and is only enabled if the |
| 8446 | recipe inherits the :ref:`autotools <ref-classes-autotools>` class. |
| 8447 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8448 | :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8449 | For recipes inheriting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8450 | :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8451 | specifies the package that contains the initscript that is enabled. |
| 8452 | |
| 8453 | The default value is "${PN}". Given that almost all recipes that |
| 8454 | install initscripts package them in the main package for the recipe, |
| 8455 | you rarely need to set this variable in individual recipes. |
| 8456 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8457 | :term:`UPSTREAM_CHECK_GITTAGREGEX` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8458 | You can perform a per-recipe check for what the latest upstream |
| 8459 | source code version is by calling ``bitbake -c checkpkg`` recipe. If |
| 8460 | the recipe source code is provided from Git repositories, the |
| 8461 | OpenEmbedded build system determines the latest upstream version by |
| 8462 | picking the latest tag from the list of all repository tags. |
| 8463 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8464 | You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8465 | regular expression to filter only the relevant tags should the |
| 8466 | default filter not work correctly. |
| 8467 | :: |
| 8468 | |
| 8469 | UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" |
| 8470 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8471 | :term:`UPSTREAM_CHECK_REGEX` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8472 | Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8473 | regular expression instead of the default one when the package |
| 8474 | checking system is parsing the page found using |
| 8475 | :term:`UPSTREAM_CHECK_URI`. |
| 8476 | :: |
| 8477 | |
| 8478 | UPSTREAM_CHECK_REGEX = "package_regex" |
| 8479 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8480 | :term:`UPSTREAM_CHECK_URI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8481 | You can perform a per-recipe check for what the latest upstream |
| 8482 | source code version is by calling ``bitbake -c checkpkg`` recipe. If |
| 8483 | the source code is provided from tarballs, the latest version is |
| 8484 | determined by fetching the directory listing where the tarball is and |
| 8485 | attempting to find a later tarball. When this approach does not work, |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8486 | 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] | 8487 | contains the link to the latest tarball. |
| 8488 | :: |
| 8489 | |
| 8490 | UPSTREAM_CHECK_URI = "recipe_url" |
| 8491 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8492 | :term:`USE_DEVFS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8493 | Determines if ``devtmpfs`` is used for ``/dev`` population. The |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8494 | default value used for :term:`USE_DEVFS` is "1" when no value is |
| 8495 | 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] | 8496 | statically populated ``/dev`` directory. |
| 8497 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8498 | 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] | 8499 | the Yocto Project Development Tasks Manual for information on how to |
| 8500 | use this variable. |
| 8501 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8502 | :term:`USE_VT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8503 | When using |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8504 | :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8505 | determines whether or not to run a |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8506 | `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8507 | virtual terminals in order to enable logging in through those |
| 8508 | terminals. |
| 8509 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8510 | The default value used for :term:`USE_VT` is "1" when no default value is |
| 8511 | 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] | 8512 | machine configuration file for machines that do not have a graphical |
| 8513 | display attached and therefore do not need virtual terminal |
| 8514 | functionality. |
| 8515 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8516 | :term:`USER_CLASSES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8517 | A list of classes to globally inherit. These classes are used by the |
| 8518 | OpenEmbedded build system to enable extra features (e.g. |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8519 | ``buildstats``, ``image-prelink``, and so forth). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8520 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8521 | The default list is set in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8522 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8523 | USER_CLASSES ?= "buildstats image-prelink" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8524 | |
| 8525 | For more information, see |
| 8526 | ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`. |
| 8527 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8528 | :term:`USERADD_ERROR_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8529 | If set to ``error``, forces the OpenEmbedded build system to produce |
| 8530 | an error if the user identification (``uid``) and group |
| 8531 | identification (``gid``) values are not defined in any of the files |
| 8532 | listed in :term:`USERADD_UID_TABLES` and |
| 8533 | :term:`USERADD_GID_TABLES`. If set to |
| 8534 | ``warn``, a warning will be issued instead. |
| 8535 | |
| 8536 | The default behavior for the build system is to dynamically apply |
| 8537 | ``uid`` and ``gid`` values. Consequently, the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8538 | :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] | 8539 | on using statically assigned ``gid`` and ``uid`` values, you should |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8540 | set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8541 | file as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8542 | |
| 8543 | USERADD_ERROR_DYNAMIC = "error" |
| 8544 | |
| 8545 | Overriding the |
| 8546 | default behavior implies you are going to also take steps to set |
| 8547 | static ``uid`` and ``gid`` values through use of the |
| 8548 | :term:`USERADDEXTENSION`, |
| 8549 | :term:`USERADD_UID_TABLES`, and |
| 8550 | :term:`USERADD_GID_TABLES` variables. |
| 8551 | |
| 8552 | .. note:: |
| 8553 | |
| 8554 | There is a difference in behavior between setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8555 | :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``. |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8556 | When it is set to ``warn``, the build system will report a warning for |
| 8557 | every undefined ``uid`` and ``gid`` in any recipe. But when it is set |
| 8558 | to ``error``, it will only report errors for recipes that are actually |
| 8559 | built. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8560 | This saves you from having to add static IDs for recipes that you |
| 8561 | know will never be built. |
| 8562 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8563 | :term:`USERADD_GID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8564 | Specifies a password file to use for obtaining static group |
| 8565 | identification (``gid``) values when the OpenEmbedded build system |
| 8566 | adds a group to the system during package installation. |
| 8567 | |
| 8568 | When applying static group identification (``gid``) values, the |
| 8569 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8570 | ``files/group`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8571 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8572 | |
| 8573 | |
| 8574 | USERADD_GID_TABLES = "files/group" |
| 8575 | |
| 8576 | .. note:: |
| 8577 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8578 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8579 | causes the build system to use static ``gid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8580 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8581 | :term:`USERADD_PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8582 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8583 | this variable specifies the individual packages within the recipe |
| 8584 | that require users and/or groups to be added. |
| 8585 | |
| 8586 | You must set this variable if the recipe inherits the class. For |
| 8587 | example, the following enables adding a user for the main package in |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8588 | a recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8589 | |
| 8590 | USERADD_PACKAGES = "${PN}" |
| 8591 | |
| 8592 | .. note:: |
| 8593 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8594 | 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] | 8595 | variable, you need to set one or more of the :term:`USERADD_PARAM`, |
| 8596 | :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8597 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8598 | :term:`USERADD_PARAM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8599 | When inheriting the :ref:`useradd <ref-classes-useradd>` class, |
| 8600 | this variable specifies for a package what parameters should pass to |
| 8601 | the ``useradd`` command if you add a user to the system when the |
| 8602 | package is installed. |
| 8603 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8604 | Here is an example from the ``dbus`` recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8605 | |
| 8606 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ |
| 8607 | --no-create-home --shell /bin/false \ |
| 8608 | --user-group messagebus" |
| 8609 | |
| 8610 | For information on the |
| 8611 | standard Linux shell command ``useradd``, see |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 8612 | https://linux.die.net/man/8/useradd. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8613 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8614 | :term:`USERADD_UID_TABLES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8615 | Specifies a password file to use for obtaining static user |
| 8616 | identification (``uid``) values when the OpenEmbedded build system |
| 8617 | adds a user to the system during package installation. |
| 8618 | |
| 8619 | When applying static user identification (``uid``) values, the |
| 8620 | OpenEmbedded build system looks in :term:`BBPATH` for a |
| 8621 | ``files/passwd`` file and then applies those ``uid`` values. Set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8622 | variable as follows in your ``local.conf`` file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8623 | |
| 8624 | USERADD_UID_TABLES = "files/passwd" |
| 8625 | |
| 8626 | .. note:: |
| 8627 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8628 | Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" |
| 8629 | causes the build system to use static ``uid`` values. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8630 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8631 | :term:`USERADDEXTENSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8632 | When set to "useradd-staticids", causes the OpenEmbedded build system |
| 8633 | to base all user and group additions on a static ``passwd`` and |
| 8634 | ``group`` files found in :term:`BBPATH`. |
| 8635 | |
| 8636 | To use static user identification (``uid``) and group identification |
| 8637 | (``gid``) values, set the variable as follows in your ``local.conf`` |
| 8638 | file: USERADDEXTENSION = "useradd-staticids" |
| 8639 | |
| 8640 | .. note:: |
| 8641 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8642 | Setting this variable to use static ``uid`` and ``gid`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8643 | values causes the OpenEmbedded build system to employ the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8644 | :ref:`ref-classes-useradd` class. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8645 | |
| 8646 | If you use static ``uid`` and ``gid`` information, you must also |
| 8647 | specify the ``files/passwd`` and ``files/group`` files by setting the |
| 8648 | :term:`USERADD_UID_TABLES` and |
| 8649 | :term:`USERADD_GID_TABLES` variables. |
| 8650 | Additionally, you should also set the |
| 8651 | :term:`USERADD_ERROR_DYNAMIC` variable. |
| 8652 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8653 | :term:`VOLATILE_LOG_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8654 | Specifies the persistence of the target's ``/var/log`` directory, |
| 8655 | which is used to house postinstall target log files. |
| 8656 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8657 | 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] | 8658 | file is not persistent. You can override this setting by setting the |
| 8659 | variable to "no" to make the log directory persistent. |
| 8660 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8661 | :term:`WARN_QA` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8662 | Specifies the quality assurance checks whose failures are reported as |
| 8663 | warnings by the OpenEmbedded build system. You set this variable in |
| 8664 | your distribution configuration file. For a list of the checks you |
| 8665 | can control with this variable, see the |
| 8666 | ":ref:`insane.bbclass <ref-classes-insane>`" section. |
| 8667 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8668 | :term:`WKS_FILE` |
| 8669 | Specifies the location of the Wic kickstart file that is used by the |
| 8670 | OpenEmbedded build system to create a partitioned image |
| 8671 | (image\ ``.wic``). For information on how to create a partitioned |
| 8672 | image, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8673 | ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8674 | section in the Yocto Project Development Tasks Manual. For details on |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 8675 | the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8676 | |
| 8677 | :term:`WKS_FILE_DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8678 | When placed in the recipe that builds your image, this variable lists |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8679 | build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8680 | applicable when Wic images are active (i.e. when |
| 8681 | :term:`IMAGE_FSTYPES` contains entries related |
| 8682 | to Wic). If your recipe does not create Wic images, the variable has |
| 8683 | no effect. |
| 8684 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8685 | The :term:`WKS_FILE_DEPENDS` variable is similar to the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8686 | :term:`DEPENDS` variable. When you use the variable in |
| 8687 | your recipe that builds the Wic image, dependencies you list in the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8688 | :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8689 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8690 | With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8691 | specify a list of additional dependencies (e.g. native tools, |
| 8692 | bootloaders, and so forth), that are required to build Wic images. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8693 | Following is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8694 | |
| 8695 | WKS_FILE_DEPENDS = "some-native-tool" |
| 8696 | |
| 8697 | In the |
| 8698 | previous example, some-native-tool would be replaced with an actual |
| 8699 | native tool on which the build would depend. |
| 8700 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8701 | :term:`WORKDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8702 | The pathname of the work directory in which the OpenEmbedded build |
| 8703 | system builds a recipe. This directory is located within the |
| 8704 | :term:`TMPDIR` directory structure and is specific to |
| 8705 | the recipe being built and the system for which it is being built. |
| 8706 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8707 | The :term:`WORKDIR` directory is defined as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8708 | |
| 8709 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
| 8710 | |
| 8711 | The actual directory depends on several things: |
| 8712 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8713 | - :term:`TMPDIR`: The top-level build output directory |
| 8714 | - :term:`MULTIMACH_TARGET_SYS`: The target system identifier |
| 8715 | - :term:`PN`: The recipe name |
| 8716 | - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which |
| 8717 | is usually the case for most recipes, then `EXTENDPE` is blank) |
| 8718 | - :term:`PV`: The recipe version |
| 8719 | - :term:`PR`: The recipe revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8720 | |
| 8721 | As an example, assume a Source Directory top-level folder name |
| 8722 | ``poky``, a default Build Directory at ``poky/build``, and a |
| 8723 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose |
| 8724 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work |
| 8725 | directory the build system uses to build the package would be as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8726 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8727 | |
| 8728 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
| 8729 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8730 | :term:`XSERVER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8731 | Specifies the packages that should be installed to provide an X |
| 8732 | server and drivers for the current machine, assuming your image |
| 8733 | directly includes ``packagegroup-core-x11-xserver`` or, perhaps |
| 8734 | indirectly, includes "x11-base" in |
| 8735 | :term:`IMAGE_FEATURES`. |
| 8736 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 8737 | The default value of :term:`XSERVER`, if not specified in the machine |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8738 | configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". |
| 8739 | |