terms.rst 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. *******************
  3. Yocto Project Terms
  4. *******************
  5. Here 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/layers: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. Here 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:`buildtools`
  84. Build tools in binary form, providing required versions of development
  85. tools (such as Git, GCC, Python and make), to run the OpenEmbedded build
  86. system on a development host without such minimum versions.
  87. See the ":ref:`system-requirements-buildtools`" paragraph in the
  88. Reference Manual for details about downloading or building an archive
  89. of such tools.
  90. :term:`buildtools-extended`
  91. A set of :term:`buildtools` binaries extended with additional development
  92. tools, such as a required version of the GCC compiler to run the
  93. OpenEmbedded build system.
  94. See the ":ref:`system-requirements-buildtools`" paragraph in the
  95. Reference Manual for details about downloading or building an archive
  96. of such tools.
  97. :term:`buildtools-make`
  98. A variant of :term:`buildtools`, just providing the required
  99. version of ``make`` to run the OpenEmbedded build system.
  100. :term:`Classes`
  101. Files that provide for logic encapsulation and inheritance so that
  102. commonly used patterns can be defined once and then easily used in
  103. multiple recipes. For reference information on the Yocto Project classes,
  104. see the ":ref:`ref-manual/classes:Classes`" chapter. Class files end with the
  105. ``.bbclass`` filename extension.
  106. :term:`Configuration File`
  107. Files that hold global definitions of variables, user-defined variables,
  108. and hardware configuration information. These files tell the OpenEmbedded
  109. build system what to build and what to put into the image to support a
  110. particular platform.
  111. Configuration files end with a ``.conf`` filename extension. The
  112. :file:`conf/local.conf` configuration file in the :term:`Build Directory`
  113. contains user-defined variables that affect every build. The
  114. :file:`meta-poky/conf/distro/poky.conf` configuration file defines Yocto
  115. "distro" configuration variables used only when building with this
  116. policy. Machine configuration files, which are located throughout the
  117. :term:`Source Directory`, define variables for specific hardware and are
  118. only used when building for that target (e.g. the
  119. :file:`machine/beaglebone.conf` configuration file defines variables for
  120. the Texas Instruments ARM Cortex-A8 development board).
  121. :term:`Container Layer`
  122. A flexible definition that typically refers to a single Git checkout
  123. which contains multiple (and typically related) sub-layers which can
  124. be included independently in your project's ``bblayers.conf`` file.
  125. In some cases, such as with OpenEmbedded's :oe_git:`meta-openembedded </meta-openembedded>`
  126. layer, the top level ``meta-openembedded/`` directory is not itself an actual layer,
  127. so you would never explicitly include it in a ``bblayers.conf`` file;
  128. rather, you would include any number of its layer subdirectories, such as
  129. :oe_git:`meta-oe </meta-openembedded/tree/meta-oe>`, :oe_git:`meta-python
  130. </meta-openembedded/tree/meta-python>` and so on.
  131. On the other hand, some container layers (such as
  132. :yocto_git:`meta-security </meta-security>`)
  133. have a top-level directory that is itself an actual layer, as well as
  134. a variety of sub-layers, both of which could be included in your
  135. ``bblayers.conf`` file.
  136. In either case, the phrase "container layer" is simply used to describe
  137. a directory structure which contains multiple valid OpenEmbedded layers.
  138. :term:`Cross-Development Toolchain`
  139. In general, a cross-development toolchain is a collection of software
  140. development tools and utilities that run on one architecture and allow you
  141. to develop software for a different, or targeted, architecture. These
  142. toolchains contain cross-compilers, linkers, and debuggers that are
  143. specific to the target architecture.
  144. The Yocto Project supports two different cross-development toolchains:
  145. - A toolchain only used by and within BitBake when building an image for a
  146. target architecture.
  147. - A relocatable toolchain used outside of BitBake by developers when
  148. developing applications that will run on a targeted device.
  149. Creation of these toolchains is simple and automated. For information on
  150. toolchain concepts as they apply to the Yocto Project, see the
  151. ":ref:`overview-manual/concepts:Cross-Development
  152. Toolchain Generation`" section in the Yocto Project Overview and Concepts
  153. Manual. You can also find more information on using the relocatable
  154. toolchain in the :doc:`/sdk-manual/index` manual.
  155. :term:`Extensible Software Development Kit (eSDK)`
  156. A custom SDK for application developers. This eSDK allows developers to
  157. incorporate their library and programming changes back into the image to
  158. make their code available to other application developers.
  159. For information on the eSDK, see the :doc:`/sdk-manual/index` manual.
  160. :term:`Image`
  161. An image is an artifact of the BitBake build process given a collection of
  162. recipes and related Metadata. Images are the binary output that run on
  163. specific hardware or QEMU and are used for specific use-cases. For a list
  164. of the supported image types that the Yocto Project provides, see the
  165. ":ref:`ref-manual/images:Images`" chapter.
  166. :term:`Initramfs`
  167. An Initial RAM Filesystem (:term:`Initramfs`) is an optionally compressed
  168. :wikipedia:`cpio <Cpio>` archive which is extracted
  169. by the Linux kernel into RAM in a special :wikipedia:`tmpfs <Tmpfs>`
  170. instance, used as the initial root filesystem.
  171. This is a replacement for the legacy init RAM disk ("initrd")
  172. technique, booting on an emulated block device in RAM, but being less
  173. efficient because of the overhead of going through a filesystem and
  174. having to duplicate accessed file contents in the file cache in RAM,
  175. as for any block device.
  176. .. note::
  177. As far as bootloaders are concerned, :term:`Initramfs` and "initrd"
  178. images are still copied to RAM in the same way. That's why most
  179. most bootloaders refer to :term:`Initramfs` images as "initrd"
  180. or "init RAM disk".
  181. This kind of mechanism is typically used for two reasons:
  182. - For booting the same kernel binary on multiple systems requiring
  183. different device drivers. The :term:`Initramfs` image is then customized
  184. for each type of system, to include the specific kernel modules
  185. necessary to access the final root filesystem. This technique
  186. is used on all GNU / Linux distributions for desktops and servers.
  187. - For booting faster. As the root filesystem is extracted into RAM,
  188. accessing the first user-space applications is very fast, compared
  189. to having to initialize a block device, to access multiple blocks
  190. from it, and to go through a filesystem having its own overhead.
  191. For example, this allows to display a splashscreen very early,
  192. and to later take care of mounting the final root filesystem and
  193. loading less time-critical kernel drivers.
  194. This cpio archive can either be loaded to RAM by the bootloader,
  195. or be included in the kernel binary.
  196. For information on creating and using an :term:`Initramfs`, see the
  197. ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`"
  198. section in the Yocto Project Development Tasks Manual.
  199. :term:`Layer`
  200. A collection of related recipes. Layers allow you to consolidate related
  201. metadata to customize your build. Layers also isolate information used
  202. when building for multiple architectures. Layers are hierarchical in
  203. their ability to override previous specifications. You can include any
  204. number of available layers from the Yocto Project and customize the build
  205. by adding your layers after them. You can search the Layer Index for
  206. layers used within Yocto Project.
  207. For introductory information on layers, see the
  208. ":ref:`overview-manual/yp-intro:The Yocto Project Layer
  209. Model`" section in the Yocto Project Overview and Concepts Manual. For
  210. more detailed information on layers, see the
  211. ":ref:`dev-manual/layers:Understanding and Creating
  212. Layers`" section in the Yocto Project Development Tasks Manual. For a
  213. discussion specifically on BSP Layers, see the ":ref:`bsp-guide/bsp:BSP
  214. Layers`" section in the Yocto Project Board Support Packages (BSP)
  215. Developer's Guide.
  216. :term:`LTS`
  217. This term means "Long Term Support", and in the context of the Yocto
  218. Project, it corresponds to selected stable releases for which bug and
  219. security fixes are provided for at least four years. See
  220. the :ref:`ref-long-term-support-releases` section for details.
  221. :term:`Metadata`
  222. A key element of the Yocto Project is the Metadata that
  223. is used to construct a Linux distribution and is contained in the
  224. files that the :term:`OpenEmbedded Build System`
  225. parses when building an image. In general, Metadata includes recipes,
  226. configuration files, and other information that refers to the build
  227. instructions themselves, as well as the data used to control what
  228. things get built and the effects of the build. Metadata also includes
  229. commands and data used to indicate what versions of software are
  230. used, from where they are obtained, and changes or additions to the
  231. software itself (patches or auxiliary files) that are used to fix
  232. bugs or customize the software for use in a particular situation.
  233. OpenEmbedded-Core is an important set of validated metadata.
  234. In the context of the kernel ("kernel Metadata"), the term refers to
  235. the kernel config fragments and features contained in the
  236. :yocto_git:`yocto-kernel-cache </yocto-kernel-cache>`
  237. Git repository.
  238. :term:`Mixin`
  239. A :term:`Mixin` layer is a layer which can be created by the community to
  240. add a specific feature or support a new version of some package for an
  241. :term:`LTS` release. See the :ref:`ref-long-term-support-releases`
  242. section for details.
  243. :term:`OpenEmbedded-Core (OE-Core)`
  244. OE-Core is metadata comprised of
  245. foundational recipes, classes, and associated files that are meant to
  246. be common among many different OpenEmbedded-derived systems,
  247. including the Yocto Project. OE-Core is a curated subset of an
  248. original repository developed by the OpenEmbedded community that has
  249. been pared down into a smaller, core set of continuously validated
  250. recipes. The result is a tightly controlled and an quality-assured
  251. core set of recipes.
  252. You can see the Metadata in the ``meta`` directory of the Yocto
  253. Project :yocto_git:`Source Repositories </poky>`.
  254. :term:`OpenEmbedded Build System`
  255. The build system specific to the Yocto
  256. Project. The OpenEmbedded build system is based on another project
  257. known as "Poky", which uses :term:`BitBake` as the task
  258. executor. Throughout the Yocto Project documentation set, the
  259. OpenEmbedded build system is sometimes referred to simply as "the
  260. build system". If other build systems, such as a host or target build
  261. system are referenced, the documentation clearly states the
  262. difference.
  263. .. note::
  264. For some historical information about Poky, see the :term:`Poky` term.
  265. :term:`Package`
  266. In the context of the Yocto Project, this term refers to a
  267. recipe's packaged output produced by BitBake (i.e. a "baked recipe").
  268. A package is generally the compiled binaries produced from the
  269. recipe's sources. You "bake" something by running it through BitBake.
  270. It is worth noting that the term "package" can, in general, have
  271. subtle meanings. For example, the packages referred to in the
  272. ":ref:`ref-manual/system-requirements:required packages for the build host`"
  273. section are compiled binaries that, when installed, add functionality to
  274. your Linux distribution.
  275. Another point worth noting is that historically within the Yocto
  276. Project, recipes were referred to as packages --- thus, the existence
  277. of several BitBake variables that are seemingly mis-named, (e.g.
  278. :term:`PR`, :term:`PV`, and
  279. :term:`PE`).
  280. :term:`Package Groups`
  281. Arbitrary groups of software Recipes. You use
  282. package groups to hold recipes that, when built, usually accomplish a
  283. single task. For example, a package group could contain the recipes
  284. for a company's proprietary or value-add software. Or, the package
  285. group could contain the recipes that enable graphics. A package group
  286. is really just another recipe. Because package group files are
  287. recipes, they end with the ``.bb`` filename extension.
  288. :term:`Poky`
  289. Poky, which is pronounced *Pock*-ee, is a reference embedded
  290. distribution and a reference test configuration. Poky provides the
  291. following:
  292. - A base-level functional distro used to illustrate how to customize
  293. a distribution.
  294. - A means by which to test the Yocto Project components (i.e. Poky
  295. is used to validate the Yocto Project).
  296. - A vehicle through which you can download the Yocto Project.
  297. Poky is not a product level distro. Rather, it is a good starting
  298. point for customization.
  299. .. note::
  300. Poky began as an open-source project initially developed by
  301. OpenedHand. OpenedHand developed Poky from the existing
  302. OpenEmbedded build system to create a commercially supportable
  303. build system for embedded Linux. After Intel Corporation acquired
  304. OpenedHand, the poky project became the basis for the Yocto
  305. Project's build system.
  306. :term:`Recipe`
  307. A set of instructions for building packages. A recipe
  308. describes where you get source code, which patches to apply, how to
  309. configure the source, how to compile it and so on. Recipes also
  310. describe dependencies for libraries or for other recipes. Recipes
  311. represent the logical unit of execution, the software to build, the
  312. images to build, and use the ``.bb`` file extension.
  313. :term:`Reference Kit`
  314. A working example of a system, which includes a
  315. :term:`BSP<Board Support Package (BSP)>` as well as a
  316. :term:`build host<Build Host>` and other components, that can
  317. work on specific hardware.
  318. :term:`SBOM`
  319. This term means *Software Bill of Materials*. When you distribute
  320. software, it offers a description of all the components you used,
  321. their corresponding licenses, their dependencies, the changes that were
  322. applied and the known vulnerabilities that were fixed.
  323. This can be used by the recipients of the software to assess
  324. their exposure to license compliance and security vulnerability issues.
  325. See the :wikipedia:`Software Supply Chain <Software_supply_chain>`
  326. article on Wikipedia for more details.
  327. The OpenEmbedded Build System can generate such documentation for your
  328. project, in :term:`SPDX` format, based on all the metadata it used to
  329. build the software images. See the ":ref:`dev-manual/sbom:creating
  330. a software bill of materials`" section of the Development Tasks manual.
  331. :term:`Source Directory`
  332. This term refers to the directory structure
  333. created as a result of creating a local copy of the ``poky`` Git
  334. repository ``git://git.yoctoproject.org/poky`` or expanding a
  335. released ``poky`` tarball.
  336. .. note::
  337. Creating a local copy of the
  338. poky
  339. Git repository is the recommended method for setting up your
  340. Source Directory.
  341. Sometimes you might hear the term "poky directory" used to refer to
  342. this directory structure.
  343. .. note::
  344. The OpenEmbedded build system does not support file or directory
  345. names that contain spaces. Be sure that the Source Directory you
  346. use does not contain these types of names.
  347. The Source Directory contains BitBake, Documentation, Metadata and
  348. other files that all support the Yocto Project. Consequently, you
  349. must have the Source Directory in place on your development system in
  350. order to do any development using the Yocto Project.
  351. When you create a local copy of the Git repository, you can name the
  352. repository anything you like. Throughout much of the documentation,
  353. "poky" is used as the name of the top-level folder of the local copy
  354. of the poky Git repository. So, for example, cloning the ``poky`` Git
  355. repository results in a local Git repository whose top-level folder
  356. is also named "poky".
  357. While it is not recommended that you use tarball extraction to set up
  358. the Source Directory, if you do, the top-level directory name of the
  359. Source Directory is derived from the Yocto Project release tarball.
  360. For example, downloading and unpacking poky tarballs from
  361. :yocto_dl:`/releases/yocto/&DISTRO_REL_LATEST_TAG;/`
  362. results in a Source Directory whose root folder is named poky.
  363. It is important to understand the differences between the Source
  364. Directory created by unpacking a released tarball as compared to
  365. cloning ``git://git.yoctoproject.org/poky``. When you unpack a
  366. tarball, you have an exact copy of the files based on the time of
  367. release --- a fixed release point. Any changes you make to your local
  368. files in the Source Directory are on top of the release and will
  369. remain local only. On the other hand, when you clone the ``poky`` Git
  370. repository, you have an active development repository with access to
  371. the upstream repository's branches and tags. In this case, any local
  372. changes you make to the local Source Directory can be later applied
  373. to active development branches of the upstream ``poky`` Git
  374. repository.
  375. For more information on concepts related to Git repositories,
  376. branches, and tags, see the
  377. ":ref:`overview-manual/development-environment:repositories, tags, and branches`"
  378. section in the Yocto Project Overview and Concepts Manual.
  379. :term:`SPDX`
  380. This term means *Software Package Data Exchange*, and is used as an open
  381. standard for providing a *Software Bill of Materials* (:term:`SBOM`).
  382. This standard is developed through a `Linux Foundation project
  383. <https://spdx.dev/>`__ and is used by the OpenEmbedded Build System to
  384. provide an :term:`SBOM` associated to each software image.
  385. For details, see Wikipedia's :wikipedia:`SPDX page <Software_Package_Data_Exchange>`
  386. and the ":ref:`dev-manual/sbom:creating a software bill of materials`"
  387. section of the Development Tasks manual.
  388. :term:`Sysroot`
  389. When cross-compiling, the target file system may be differently laid
  390. out and contain different things compared to the host system. The concept
  391. of a *sysroot* is directory which looks like the target filesystem and
  392. can be used to cross-compile against.
  393. In the context of cross-compiling toolchains, a *sysroot*
  394. typically contains C library and kernel headers, plus the
  395. compiled binaries for the C library. A *multilib toolchain*
  396. can contain multiple variants of the C library binaries,
  397. each compiled for a target instruction set (such as ``armv5``,
  398. ``armv7`` and ``armv8``), and possibly optimized for a specific CPU core.
  399. In the more specific context of the OpenEmbedded build System and
  400. of the Yocto Project, each recipe has two sysroots:
  401. - A *target sysroot* contains all the **target** libraries and headers
  402. needed to build the recipe.
  403. - A *native sysroot* contains all the **host** files and executables
  404. needed to build the recipe.
  405. See the :term:`SYSROOT_* <SYSROOT_DESTDIR>` variables controlling
  406. how sysroots are created and stored.
  407. :term:`Task`
  408. A per-recipe unit of execution for BitBake (e.g.
  409. :ref:`ref-tasks-compile`,
  410. :ref:`ref-tasks-fetch`,
  411. :ref:`ref-tasks-patch`, and so forth).
  412. One of the major benefits of the build system is that, since each
  413. recipe will typically spawn the execution of numerous tasks,
  414. it is entirely possible that many tasks can execute in parallel,
  415. either tasks from separate recipes or independent tasks within
  416. the same recipe, potentially up to the parallelism of your
  417. build system.
  418. :term:`Toaster`
  419. A web interface to the Yocto Project's :term:`OpenEmbedded Build System`.
  420. The interface enables you to
  421. configure and run your builds. Information about builds is collected
  422. and stored in a database. For information on Toaster, see the
  423. :doc:`/toaster-manual/index`.
  424. :term:`Upstream`
  425. A reference to source code or repositories that are not
  426. local to the development system but located in a remote area that is
  427. controlled by the maintainer of the source code. For example, in
  428. order for a developer to work on a particular piece of code, they
  429. need to first get a copy of it from an "upstream" source.