terms.rst 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. *******************
  3. Yocto Project Terms
  4. *******************
  5. Following is a list of terms and definitions users new to the Yocto Project
  6. development environment might find helpful. While some of these terms are
  7. universal, the list includes them just in case:
  8. .. glossary::
  9. :term:`Append Files`
  10. Files that append build information to a recipe file. Append files are
  11. known as BitBake append files and ``.bbappend`` files. The OpenEmbedded
  12. build system expects every append file to have a corresponding recipe
  13. (``.bb``) file. Furthermore, the append file and corresponding recipe file
  14. must use the same root filename. The filenames can differ only in the
  15. file type suffix used (e.g. ``formfactor_0.0.bb`` and
  16. ``formfactor_0.0.bbappend``).
  17. Information in append files extends or overrides the information in the
  18. similarly-named recipe file. For an example of an append file in use, see
  19. the ":ref:`dev-manual/common-tasks:appending other layers metadata with your layer`"
  20. section in the Yocto Project Development Tasks Manual.
  21. When you name an append file, you can use the "``%``" wildcard character
  22. to allow for matching recipe names. For example, suppose you have an
  23. append file named as follows::
  24. busybox_1.21.%.bbappend
  25. That append file
  26. would match any ``busybox_1.21.x.bb`` version of the recipe. So,
  27. the append file would match any of the following recipe names:
  28. .. code-block:: shell
  29. busybox_1.21.1.bb
  30. busybox_1.21.2.bb
  31. busybox_1.21.3.bb
  32. busybox_1.21.10.bb
  33. busybox_1.21.25.bb
  34. .. note::
  35. The use of the "%" character is limited in that it only works
  36. directly in front of the .bbappend portion of the append file's
  37. name. You cannot use the wildcard character in any other location of
  38. the name.
  39. :term:`BitBake`
  40. The task executor and scheduler used by the OpenEmbedded build system to
  41. build images. For more information on BitBake, see the :doc:`BitBake User
  42. Manual <bitbake:index>`.
  43. :term:`Board Support Package (BSP)`
  44. A group of drivers, definitions, and other components that provide support
  45. for a specific hardware configuration. For more information on BSPs, see
  46. the :doc:`/bsp-guide/index`.
  47. :term:`Build Directory`
  48. This term refers to the area used by the OpenEmbedded build system for
  49. builds. The area is created when you ``source`` the setup environment
  50. script that is found in the Source Directory
  51. (i.e. :ref:`ref-manual/structure:\`\`oe-init-build-env\`\``). The
  52. :term:`TOPDIR` variable points to the :term:`Build Directory`.
  53. You have a lot of flexibility when creating the :term:`Build Directory`.
  54. Following are some examples that show how to create the directory. The
  55. examples assume your :term:`Source Directory` is named ``poky``:
  56. - Create the :term:`Build Directory` inside your Source Directory and let
  57. the name of the :term:`Build Directory` default to ``build``:
  58. .. code-block:: shell
  59. $ cd poky
  60. $ source oe-init-build-env
  61. - Create the :term:`Build Directory` inside your home directory and
  62. specifically name it ``test-builds``:
  63. .. code-block:: shell
  64. $ source poky/oe-init-build-env test-builds
  65. - Provide a directory path and specifically name the
  66. :term:`Build Directory`. Any intermediate folders in the pathname
  67. must exist. This next example creates a :term:`Build Directory`
  68. named ``YP-&DISTRO;`` within the existing directory ``mybuilds``:
  69. .. code-block:: shell
  70. $ source poky/oe-init-build-env mybuilds/YP-&DISTRO;
  71. .. note::
  72. By default, the :term:`Build Directory` contains :term:`TMPDIR`, which is a
  73. temporary directory the build system uses for its work. :term:`TMPDIR` cannot
  74. be under NFS. Thus, by default, the :term:`Build Directory` cannot be under
  75. NFS. However, if you need the :term:`Build Directory` to be under NFS, you can
  76. set this up by setting :term:`TMPDIR` in your ``local.conf`` file to use a local
  77. drive. Doing so effectively separates :term:`TMPDIR` from :term:`TOPDIR`, which is the
  78. :term:`Build Directory`.
  79. :term:`Build Host`
  80. The system used to build images in a Yocto Project Development
  81. environment. The build system is sometimes referred to as the development
  82. host.
  83. :term:`Classes`
  84. Files that provide for logic encapsulation and inheritance so that
  85. commonly used patterns can be defined once and then easily used in
  86. multiple recipes. For reference information on the Yocto Project classes,
  87. see the ":ref:`ref-manual/classes:Classes`" chapter. Class files end with the
  88. ``.bbclass`` filename extension.
  89. :term:`Configuration File`
  90. Files that hold global definitions of variables, user-defined variables,
  91. and hardware configuration information. These files tell the OpenEmbedded
  92. build system what to build and what to put into the image to support a
  93. particular platform.
  94. Configuration files end with a ``.conf`` filename extension. The
  95. :file:`conf/local.conf` configuration file in the :term:`Build Directory`
  96. contains user-defined variables that affect every build. The
  97. :file:`meta-poky/conf/distro/poky.conf` configuration file defines Yocto
  98. "distro" configuration variables used only when building with this
  99. policy. Machine configuration files, which are located throughout the
  100. :term:`Source Directory`, define variables for specific hardware and are
  101. only used when building for that target (e.g. the
  102. :file:`machine/beaglebone.conf` configuration file defines variables for
  103. the Texas Instruments ARM Cortex-A8 development board).
  104. :term:`Container Layer`
  105. A flexible definition that typically refers to a single Git checkout
  106. which contains multiple (and typically related) sub-layers which can
  107. be included independently in your project's ``bblayers.conf`` file.
  108. In some cases, such as with OpenEmbedded's :oe_git:`meta-openembedded </meta-openembedded>`
  109. layer, the top level ``meta-openembedded/`` directory is not itself an actual layer,
  110. so you would never explicitly include it in a ``bblayers.conf`` file;
  111. rather, you would include any number of its layer subdirectories, such as
  112. :oe_git:`meta-oe </meta-openembedded/tree/meta-oe>`, :oe_git:`meta-python
  113. </meta-openembedded/tree/meta-python>` and so on.
  114. On the other hand, some container layers (such as
  115. :yocto_git:`meta-security </meta-security>`)
  116. have a top-level directory that is itself an actual layer, as well as
  117. a variety of sub-layers, both of which could be included in your
  118. ``bblayers.conf`` file.
  119. In either case, the phrase "container layer" is simply used to describe
  120. a directory structure which contains multiple valid OpenEmbedded layers.
  121. :term:`Cross-Development Toolchain`
  122. In general, a cross-development toolchain is a collection of software
  123. development tools and utilities that run on one architecture and allow you
  124. to develop software for a different, or targeted, architecture. These
  125. toolchains contain cross-compilers, linkers, and debuggers that are
  126. specific to the target architecture.
  127. The Yocto Project supports two different cross-development toolchains:
  128. - A toolchain only used by and within BitBake when building an image for a
  129. target architecture.
  130. - A relocatable toolchain used outside of BitBake by developers when
  131. developing applications that will run on a targeted device.
  132. Creation of these toolchains is simple and automated. For information on
  133. toolchain concepts as they apply to the Yocto Project, see the
  134. ":ref:`overview-manual/concepts:Cross-Development
  135. Toolchain Generation`" section in the Yocto Project Overview and Concepts
  136. Manual. You can also find more information on using the relocatable
  137. toolchain in the :doc:`/sdk-manual/index` manual.
  138. :term:`Extensible Software Development Kit (eSDK)`
  139. A custom SDK for application developers. This eSDK allows developers to
  140. incorporate their library and programming changes back into the image to
  141. make their code available to other application developers.
  142. For information on the eSDK, see the :doc:`/sdk-manual/index` manual.
  143. :term:`Image`
  144. An image is an artifact of the BitBake build process given a collection of
  145. recipes and related Metadata. Images are the binary output that run on
  146. specific hardware or QEMU and are used for specific use-cases. For a list
  147. of the supported image types that the Yocto Project provides, see the
  148. ":ref:`ref-manual/images:Images`" chapter.
  149. :term:`Layer`
  150. A collection of related recipes. Layers allow you to consolidate related
  151. metadata to customize your build. Layers also isolate information used
  152. when building for multiple architectures. Layers are hierarchical in
  153. their ability to override previous specifications. You can include any
  154. number of available layers from the Yocto Project and customize the build
  155. by adding your layers after them. You can search the Layer Index for
  156. layers used within Yocto Project.
  157. For introductory information on layers, see the
  158. ":ref:`overview-manual/yp-intro:The Yocto Project Layer
  159. Model`" section in the Yocto Project Overview and Concepts Manual. For
  160. more detailed information on layers, see the
  161. ":ref:`dev-manual/common-tasks:Understanding and Creating
  162. Layers`" section in the Yocto Project Development Tasks Manual. For a
  163. discussion specifically on BSP Layers, see the ":ref:`bsp-guide/bsp:BSP
  164. Layers`" section in the Yocto Project Board Support Packages (BSP)
  165. Developer's Guide.
  166. :term:`Metadata`
  167. A key element of the Yocto Project is the Metadata that
  168. is used to construct a Linux distribution and is contained in the
  169. files that the :term:`OpenEmbedded Build System`
  170. parses when building an image. In general, Metadata includes recipes,
  171. configuration files, and other information that refers to the build
  172. instructions themselves, as well as the data used to control what
  173. things get built and the effects of the build. Metadata also includes
  174. commands and data used to indicate what versions of software are
  175. used, from where they are obtained, and changes or additions to the
  176. software itself (patches or auxiliary files) that are used to fix
  177. bugs or customize the software for use in a particular situation.
  178. OpenEmbedded-Core is an important set of validated metadata.
  179. In the context of the kernel ("kernel Metadata"), the term refers to
  180. the kernel config fragments and features contained in the
  181. :yocto_git:`yocto-kernel-cache </yocto-kernel-cache>`
  182. Git repository.
  183. :term:`OpenEmbedded-Core (OE-Core)`
  184. OE-Core is metadata comprised of
  185. foundational recipes, classes, and associated files that are meant to
  186. be common among many different OpenEmbedded-derived systems,
  187. including the Yocto Project. OE-Core is a curated subset of an
  188. original repository developed by the OpenEmbedded community that has
  189. been pared down into a smaller, core set of continuously validated
  190. recipes. The result is a tightly controlled and an quality-assured
  191. core set of recipes.
  192. You can see the Metadata in the ``meta`` directory of the Yocto
  193. Project :yocto_git:`Source Repositories </poky>`.
  194. :term:`OpenEmbedded Build System`
  195. The build system specific to the Yocto
  196. Project. The OpenEmbedded build system is based on another project
  197. known as "Poky", which uses :term:`BitBake` as the task
  198. executor. Throughout the Yocto Project documentation set, the
  199. OpenEmbedded build system is sometimes referred to simply as "the
  200. build system". If other build systems, such as a host or target build
  201. system are referenced, the documentation clearly states the
  202. difference.
  203. .. note::
  204. For some historical information about Poky, see the :term:`Poky` term.
  205. :term:`Package`
  206. In the context of the Yocto Project, this term refers to a
  207. recipe's packaged output produced by BitBake (i.e. a "baked recipe").
  208. A package is generally the compiled binaries produced from the
  209. recipe's sources. You "bake" something by running it through BitBake.
  210. It is worth noting that the term "package" can, in general, have
  211. subtle meanings. For example, the packages referred to in the
  212. ":ref:`ref-manual/system-requirements:required packages for the build host`"
  213. section are compiled binaries that, when installed, add functionality to
  214. your Linux distribution.
  215. Another point worth noting is that historically within the Yocto
  216. Project, recipes were referred to as packages --- thus, the existence
  217. of several BitBake variables that are seemingly mis-named, (e.g.
  218. :term:`PR`, :term:`PV`, and
  219. :term:`PE`).
  220. :term:`Package Groups`
  221. Arbitrary groups of software Recipes. You use
  222. package groups to hold recipes that, when built, usually accomplish a
  223. single task. For example, a package group could contain the recipes
  224. for a company's proprietary or value-add software. Or, the package
  225. group could contain the recipes that enable graphics. A package group
  226. is really just another recipe. Because package group files are
  227. recipes, they end with the ``.bb`` filename extension.
  228. :term:`Poky`
  229. Poky, which is pronounced *Pock*-ee, is a reference embedded
  230. distribution and a reference test configuration. Poky provides the
  231. following:
  232. - A base-level functional distro used to illustrate how to customize
  233. a distribution.
  234. - A means by which to test the Yocto Project components (i.e. Poky
  235. is used to validate the Yocto Project).
  236. - A vehicle through which you can download the Yocto Project.
  237. Poky is not a product level distro. Rather, it is a good starting
  238. point for customization.
  239. .. note::
  240. Poky began as an open-source project initially developed by
  241. OpenedHand. OpenedHand developed Poky from the existing
  242. OpenEmbedded build system to create a commercially supportable
  243. build system for embedded Linux. After Intel Corporation acquired
  244. OpenedHand, the poky project became the basis for the Yocto
  245. Project's build system.
  246. :term:`Recipe`
  247. A set of instructions for building packages. A recipe
  248. describes where you get source code, which patches to apply, how to
  249. configure the source, how to compile it and so on. Recipes also
  250. describe dependencies for libraries or for other recipes. Recipes
  251. represent the logical unit of execution, the software to build, the
  252. images to build, and use the ``.bb`` file extension.
  253. :term:`Reference Kit`
  254. A working example of a system, which includes a
  255. :term:`BSP<Board Support Package (BSP)>` as well as a
  256. :term:`build host<Build Host>` and other components, that can
  257. work on specific hardware.
  258. :term:`Source Directory`
  259. This term refers to the directory structure
  260. created as a result of creating a local copy of the ``poky`` Git
  261. repository ``git://git.yoctoproject.org/poky`` or expanding a
  262. released ``poky`` tarball.
  263. .. note::
  264. Creating a local copy of the
  265. poky
  266. Git repository is the recommended method for setting up your
  267. Source Directory.
  268. Sometimes you might hear the term "poky directory" used to refer to
  269. this directory structure.
  270. .. note::
  271. The OpenEmbedded build system does not support file or directory
  272. names that contain spaces. Be sure that the Source Directory you
  273. use does not contain these types of names.
  274. The Source Directory contains BitBake, Documentation, Metadata and
  275. other files that all support the Yocto Project. Consequently, you
  276. must have the Source Directory in place on your development system in
  277. order to do any development using the Yocto Project.
  278. When you create a local copy of the Git repository, you can name the
  279. repository anything you like. Throughout much of the documentation,
  280. "poky" is used as the name of the top-level folder of the local copy
  281. of the poky Git repository. So, for example, cloning the ``poky`` Git
  282. repository results in a local Git repository whose top-level folder
  283. is also named "poky".
  284. While it is not recommended that you use tarball extraction to set up
  285. the Source Directory, if you do, the top-level directory name of the
  286. Source Directory is derived from the Yocto Project release tarball.
  287. For example, downloading and unpacking poky tarballs from
  288. :yocto_dl:`/releases/yocto/&DISTRO_REL_TAG;/`
  289. results in a Source Directory whose root folder is named poky.
  290. It is important to understand the differences between the Source
  291. Directory created by unpacking a released tarball as compared to
  292. cloning ``git://git.yoctoproject.org/poky``. When you unpack a
  293. tarball, you have an exact copy of the files based on the time of
  294. release --- a fixed release point. Any changes you make to your local
  295. files in the Source Directory are on top of the release and will
  296. remain local only. On the other hand, when you clone the ``poky`` Git
  297. repository, you have an active development repository with access to
  298. the upstream repository's branches and tags. In this case, any local
  299. changes you make to the local Source Directory can be later applied
  300. to active development branches of the upstream ``poky`` Git
  301. repository.
  302. For more information on concepts related to Git repositories,
  303. branches, and tags, see the
  304. ":ref:`overview-manual/development-environment:repositories, tags, and branches`"
  305. section in the Yocto Project Overview and Concepts Manual.
  306. :term:`Sysroot`
  307. When cross-compiling, the target file system may be differently laid
  308. out and contain different things compared to the host system. The concept
  309. of a *sysroot* is directory which looks like the target filesystem and
  310. can be used to cross-compile against.
  311. In the context of cross-compiling toolchains, a *sysroot*
  312. typically contains C library and kernel headers, plus the
  313. compiled binaries for the C library. A *multilib toolchain*
  314. can contain multiple variants of the C library binaries,
  315. each compiled for a target instruction set (such as ``armv5``,
  316. ``armv7`` and ``armv8``), and possibly optimized for a specific CPU core.
  317. In the more specific context of the OpenEmbedded build System and
  318. of the Yocto Project, each recipe has two sysroots:
  319. - A *target sysroot* contains all the **target** libraries and headers
  320. needed to build the recipe.
  321. - A *native sysroot* contains all the **host** files and executables
  322. needed to build the recipe.
  323. See the :term:`SYSROOT_* <SYSROOT_DESTDIR>` variables controlling
  324. how sysroots are created and stored.
  325. :term:`Task`
  326. A per-recipe unit of execution for BitBake (e.g.
  327. :ref:`ref-tasks-compile`,
  328. :ref:`ref-tasks-fetch`,
  329. :ref:`ref-tasks-patch`, and so forth).
  330. One of the major benefits of the build system is that, since each
  331. recipe will typically spawn the execution of numerous tasks,
  332. it is entirely possible that many tasks can execute in parallel,
  333. either tasks from separate recipes or independent tasks within
  334. the same recipe, potentially up to the parallelism of your
  335. build system.
  336. :term:`Toaster`
  337. A web interface to the Yocto Project's :term:`OpenEmbedded Build System`.
  338. The interface enables you to
  339. configure and run your builds. Information about builds is collected
  340. and stored in a database. For information on Toaster, see the
  341. :doc:`/toaster-manual/index`.
  342. :term:`Upstream`
  343. A reference to source code or repositories that are not
  344. local to the development system but located in a remote area that is
  345. controlled by the maintainer of the source code. For example, in
  346. order for a developer to work on a particular piece of code, they
  347. need to first get a copy of it from an "upstream" source.