summaryrefslogtreecommitdiffstats
path: root/documentation/overview-manual/overview-manual-concepts.rst
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2020-07-24 16:27:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 10:09:33 +0100
commitc473fa229239752367c5d573160fc8738cf1907e (patch)
treef8520ba3aa3cf911333dbd31e38e9a52203a0285 /documentation/overview-manual/overview-manual-concepts.rst
parent4cd953989de42c7a83f666c23e077d53b016a1f1 (diff)
downloadpoky-c473fa229239752367c5d573160fc8738cf1907e.tar.gz
sphinx: fix internal links
Many of the internal links were not converted probably from DocBook using pandoc. After looking at the various patterns, the follow series of 'naive' Python regexp were used to perform some additional automatic conversion. Also, since we rely on built-in glossary, all links to terms need to use the sphinx :term: syntax. This commit is generated using the following Python series of regexp: line = re.sub("`+(\w+)`* <(\&YOCTO_DOCS_REF_URL;)?#var-\\1>`__", ":term:`\\1`", line) line = re.sub("`+do_([a-z_]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-tasks-\\1>`__", ":ref:`ref-tasks-\\1`", line) line = re.sub("`+([a-z_\-\*\.]+).bbclass`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__", ":ref:`\\1.bbclass <ref-classes-\\1>`", line) line = re.sub("`+([a-z_\-\*\.]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__", ":ref:`\\1 <ref-classes-\\1>`", line) line = re.sub("`Source Directory <(\&YOCTO_DOCS_REF_URL;)?#source-directory>`__", ":term:`Source Directory`", line) line = re.sub("`Build Directory <(\&YOCTO_DOCS_REF_URL;)?#build-directory>`__", ":term:`Build Directory`", line) line = re.sub("`Metadata <(\&YOCTO_DOCS_REF_URL;)?#metadata>`__", ":term:`Metadata`", line) line = re.sub("`BitBake <(\&YOCTO_DOCS_REF_URL;)?#bitbake-term>`__", ":term:`BitBake`", line) line = re.sub("`Images <(\&YOCTO_DOCS_REF_URL;)?#ref-images>`__", ":ref:`ref-manual/ref-images:Images`", line) line = re.sub("`Classes <(\&YOCTO_DOCS_REF_URL;)?#ref-classes>`__", ":ref:`ref-manual/ref-classes:Classes`", line) line = re.sub("`workspace <(\&YOCTO_DOCS_REF_URL;)?#devtool-the-workspace-layer-structure>`__", ":ref:`devtool-the-workspace-layer-structure`", line) line = re.sub("`Open-?Embedded b?B?uild s?S?ystem <(\&YOCTO_DOCS_REF_URL;)?#build-system-term>`__", ":term:`OpenEmbedded Build System`", line) line = re.sub("`(OpenEmbedded-Core )?(\(?OE-Core\)? )?<(\&YOCTO_DOCS_REF_URL;)?#oe-core>`__", ":term:`OpenEmbedded-Core (OE-Core)`", line) It won't catch multiline strings, but it catches a very large number of occurences! (From yocto-docs rev: 3f537d17de5b1fb76ba3bee196481984a4826378) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/overview-manual/overview-manual-concepts.rst')
-rw-r--r--documentation/overview-manual/overview-manual-concepts.rst342
1 files changed, 171 insertions, 171 deletions
diff --git a/documentation/overview-manual/overview-manual-concepts.rst b/documentation/overview-manual/overview-manual-concepts.rst
index 3f4aa4f4c4..59096fbebf 100644
--- a/documentation/overview-manual/overview-manual-concepts.rst
+++ b/documentation/overview-manual/overview-manual-concepts.rst
@@ -14,9 +14,9 @@ explained.
14Yocto Project Components 14Yocto Project Components
15======================== 15========================
16 16
17The `BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__ task executor 17The :term:`BitBake` task executor
18together with various types of configuration files form the 18together with various types of configuration files form the
19`OpenEmbedded-Core <&YOCTO_DOCS_REF_URL;#oe-core>`__. This section 19:term:`OpenEmbedded-Core (OE-Core)`. This section
20overviews these components by describing their use and how they 20overviews these components by describing their use and how they
21interact. 21interact.
22 22
@@ -50,7 +50,7 @@ BitBake
50 50
51BitBake is the tool at the heart of the `OpenEmbedded build 51BitBake is the tool at the heart of the `OpenEmbedded build
52system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ and is responsible 52system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ and is responsible
53for parsing the `Metadata <&YOCTO_DOCS_REF_URL;#metadata>`__, generating 53for parsing the :term:`Metadata`, generating
54a list of tasks from it, and then executing those tasks. 54a list of tasks from it, and then executing those tasks.
55 55
56This section briefly introduces BitBake. If you want more information on 56This section briefly introduces BitBake. If you want more information on
@@ -107,7 +107,7 @@ Classes
107 107
108Class files (``.bbclass``) contain information that is useful to share 108Class files (``.bbclass``) contain information that is useful to share
109between recipes files. An example is the 109between recipes files. An example is the
110```autotools`` <&YOCTO_DOCS_REF_URL;#ref-classes-autotools>`__ class, 110:ref:`autotools <ref-classes-autotools>` class,
111which contains common settings for any application that Autotools uses. 111which contains common settings for any application that Autotools uses.
112The "`Classes <&YOCTO_DOCS_REF_URL;#ref-classes>`__" chapter in the 112The "`Classes <&YOCTO_DOCS_REF_URL;#ref-classes>`__" chapter in the
113Yocto Project Reference Manual provides details about classes and how to 113Yocto Project Reference Manual provides details about classes and how to
@@ -187,7 +187,7 @@ In general, the build's workflow consists of several functional areas:
187- *Source Files:* Upstream releases, local projects, and SCMs. 187- *Source Files:* Upstream releases, local projects, and SCMs.
188 188
189- *Build System:* Processes under the control of 189- *Build System:* Processes under the control of
190 `BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__. This block expands 190 :term:`BitBake`. This block expands
191 on how BitBake fetches source, applies patches, completes 191 on how BitBake fetches source, applies patches, completes
192 compilation, analyzes output for package generation, creates and 192 compilation, analyzes output for package generation, creates and
193 tests packages, generates images, and generates cross-development 193 tests packages, generates images, and generates cross-development
@@ -253,7 +253,7 @@ source the build environment setup script.
253Because the Poky repository is fundamentally an aggregation of existing 253Because the Poky repository is fundamentally an aggregation of existing
254repositories, some users might be familiar with running the ```` script 254repositories, some users might be familiar with running the ```` script
255in the context of separate 255in the context of separate
256`OpenEmbedded-Core <&YOCTO_DOCS_REF_URL;#oe-core>`__ and BitBake 256:term:`OpenEmbedded-Core (OE-Core)` and BitBake
257repositories rather than a single Poky repository. This discussion 257repositories rather than a single Poky repository. This discussion
258assumes the script is executed from within a cloned or unpacked version 258assumes the script is executed from within a cloned or unpacked version
259of Poky. 259of Poky.
@@ -281,29 +281,29 @@ script, see the
281in the ``meta-poky`` layer: 281in the ``meta-poky`` layer:
282 282
283- *Target Machine Selection:* Controlled by the 283- *Target Machine Selection:* Controlled by the
284 ```MACHINE`` <&YOCTO_DOCS_REF_URL;#var-MACHINE>`__ variable. 284 :term:`MACHINE` variable.
285 285
286- *Download Directory:* Controlled by the 286- *Download Directory:* Controlled by the
287 ```DL_DIR`` <&YOCTO_DOCS_REF_URL;#var-DL_DIR>`__ variable. 287 :term:`DL_DIR` variable.
288 288
289- *Shared State Directory:* Controlled by the 289- *Shared State Directory:* Controlled by the
290 ```SSTATE_DIR`` <&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR>`__ variable. 290 :term:`SSTATE_DIR` variable.
291 291
292- *Build Output:* Controlled by the 292- *Build Output:* Controlled by the
293 ```TMPDIR`` <&YOCTO_DOCS_REF_URL;#var-TMPDIR>`__ variable. 293 :term:`TMPDIR` variable.
294 294
295- *Distribution Policy:* Controlled by the 295- *Distribution Policy:* Controlled by the
296 ```DISTRO`` <&YOCTO_DOCS_REF_URL;#var-DISTRO>`__ variable. 296 :term:`DISTRO` variable.
297 297
298- *Packaging Format:* Controlled by the 298- *Packaging Format:* Controlled by the
299 ```PACKAGE_CLASSES`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES>`__ 299 :term:`PACKAGE_CLASSES`
300 variable. 300 variable.
301 301
302- *SDK Target Architecture:* Controlled by the 302- *SDK Target Architecture:* Controlled by the
303 ```SDKMACHINE`` <&YOCTO_DOCS_REF_URL;#var-SDKMACHINE>`__ variable. 303 :term:`SDKMACHINE` variable.
304 304
305- *Extra Image Packages:* Controlled by the 305- *Extra Image Packages:* Controlled by the
306 ```EXTRA_IMAGE_FEATURES`` <&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES>`__ 306 :term:`EXTRA_IMAGE_FEATURES`
307 variable. 307 variable.
308 308
309.. note:: 309.. note::
@@ -334,11 +334,11 @@ created by an autobuilder:
334 you had several build environments and they shared some common 334 you had several build environments and they shared some common
335 features. You can set these default build properties here. A good 335 features. You can set these default build properties here. A good
336 example is perhaps the packaging format to use through the 336 example is perhaps the packaging format to use through the
337 ```PACKAGE_CLASSES`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES>`__ 337 :term:`PACKAGE_CLASSES`
338 variable. 338 variable.
339 339
340 One useful scenario for using the ``conf/site.conf`` file is to 340 One useful scenario for using the ``conf/site.conf`` file is to
341 extend your ```BBPATH`` <&YOCTO_DOCS_REF_URL;#var-BBPATH>`__ variable 341 extend your :term:`BBPATH` variable
342 to include the path to a ``conf/site.conf``. Then, when BitBake looks 342 to include the path to a ``conf/site.conf``. Then, when BitBake looks
343 for Metadata using ``BBPATH``, it finds the ``conf/site.conf`` file 343 for Metadata using ``BBPATH``, it finds the ``conf/site.conf`` file
344 and applies your common configurations found in the file. To override 344 and applies your common configurations found in the file. To override
@@ -543,18 +543,18 @@ to build software. Finally, a combination of the two might exist, which
543would give the consumer a choice when deciding where to get source 543would give the consumer a choice when deciding where to get source
544files. 544files.
545 545
546BitBake uses the ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ 546BitBake uses the :term:`SRC_URI`
547variable to point to source files regardless of their location. Each 547variable to point to source files regardless of their location. Each
548recipe must have a ``SRC_URI`` variable that points to the source. 548recipe must have a ``SRC_URI`` variable that points to the source.
549 549
550Another area that plays a significant role in where source files come 550Another area that plays a significant role in where source files come
551from is pointed to by the 551from is pointed to by the
552```DL_DIR`` <&YOCTO_DOCS_REF_URL;#var-DL_DIR>`__ variable. This area is 552:term:`DL_DIR` variable. This area is
553a cache that can hold previously downloaded source. You can also 553a cache that can hold previously downloaded source. You can also
554instruct the OpenEmbedded build system to create tarballs from Git 554instruct the OpenEmbedded build system to create tarballs from Git
555repositories, which is not the default behavior, and store them in the 555repositories, which is not the default behavior, and store them in the
556``DL_DIR`` by using the 556``DL_DIR`` by using the
557```BB_GENERATE_MIRROR_TARBALLS`` <&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS>`__ 557:term:`BB_GENERATE_MIRROR_TARBALLS`
558variable. 558variable.
559 559
560Judicious use of a ``DL_DIR`` directory can save the build system a trip 560Judicious use of a ``DL_DIR`` directory can save the build system a trip
@@ -588,7 +588,7 @@ user checks in items (e.g. a local directory containing a development
588source tree used by the group). 588source tree used by the group).
589 589
590The canonical method through which to include a local project is to use 590The canonical method through which to include a local project is to use
591the ```externalsrc`` <&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc>`__ 591the :ref:`externalsrc <ref-classes-externalsrc>`
592class to include that local project. You use either the ``local.conf`` 592class to include that local project. You use either the ``local.conf``
593or a recipe's append file to override or set the recipe to point to the 593or a recipe's append file to override or set the recipe to point to the
594local directory on your disk to pull in the whole source tree. 594local directory on your disk to pull in the whole source tree.
@@ -602,8 +602,8 @@ Another place from which the build system can get source files is with
602`fetchers <&YOCTO_DOCS_BB_URL;#bb-fetchers>`__ employing various Source 602`fetchers <&YOCTO_DOCS_BB_URL;#bb-fetchers>`__ employing various Source
603Control Managers (SCMs) such as Git or Subversion. In such cases, a 603Control Managers (SCMs) such as Git or Subversion. In such cases, a
604repository is cloned or checked out. The 604repository is cloned or checked out. The
605```do_fetch`` <&YOCTO_DOCS_REF_URL;#ref-tasks-fetch>`__ task inside 605:ref:`ref-tasks-fetch` task inside
606BitBake uses the ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ 606BitBake uses the :term:`SRC_URI`
607variable and the argument's prefix to determine the correct fetcher 607variable and the argument's prefix to determine the correct fetcher
608module. 608module.
609 609
@@ -617,19 +617,19 @@ module.
617 variable in the Yocto Project Reference Manual. 617 variable in the Yocto Project Reference Manual.
618 618
619When fetching a repository, BitBake uses the 619When fetching a repository, BitBake uses the
620```SRCREV`` <&YOCTO_DOCS_REF_URL;#var-SRCREV>`__ variable to determine 620:term:`SRCREV` variable to determine
621the specific revision from which to build. 621the specific revision from which to build.
622 622
623Source Mirror(s) 623Source Mirror(s)
624~~~~~~~~~~~~~~~~ 624~~~~~~~~~~~~~~~~
625 625
626Two kinds of mirrors exist: pre-mirrors and regular mirrors. The 626Two kinds of mirrors exist: pre-mirrors and regular mirrors. The
627```PREMIRRORS`` <&YOCTO_DOCS_REF_URL;#var-PREMIRRORS>`__ and 627:term:`PREMIRRORS` and
628```MIRRORS`` <&YOCTO_DOCS_REF_URL;#var-MIRRORS>`__ variables point to 628:term:`MIRRORS` variables point to
629these, respectively. BitBake checks pre-mirrors before looking upstream 629these, respectively. BitBake checks pre-mirrors before looking upstream
630for any source files. Pre-mirrors are appropriate when you have a shared 630for any source files. Pre-mirrors are appropriate when you have a shared
631directory that is not a directory defined by the 631directory that is not a directory defined by the
632```DL_DIR`` <&YOCTO_DOCS_REF_URL;#var-DL_DIR>`__ variable. A Pre-mirror 632:term:`DL_DIR` variable. A Pre-mirror
633typically points to a shared directory that is local to your 633typically points to a shared directory that is local to your
634organization. 634organization.
635 635
@@ -657,10 +657,10 @@ the build system. Here is a more detailed look at the area:
657Package feeds are an intermediary step in the build process. The 657Package feeds are an intermediary step in the build process. The
658OpenEmbedded build system provides classes to generate different package 658OpenEmbedded build system provides classes to generate different package
659types, and you specify which classes to enable through the 659types, and you specify which classes to enable through the
660```PACKAGE_CLASSES`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES>`__ 660:term:`PACKAGE_CLASSES`
661variable. Before placing the packages into package feeds, the build 661variable. Before placing the packages into package feeds, the build
662process validates them with generated output quality assurance checks 662process validates them with generated output quality assurance checks
663through the ```insane`` <&YOCTO_DOCS_REF_URL;#ref-classes-insane>`__ 663through the :ref:`insane <ref-classes-insane>`
664class. 664class.
665 665
666The package feed area resides in the Build Directory. The directory the 666The package feed area resides in the Build Directory. The directory the
@@ -670,19 +670,19 @@ the "Package Feeds" box in the illustration and note the information to
670the right of that area. In particular, the following defines where 670the right of that area. In particular, the following defines where
671package files are kept: 671package files are kept:
672 672
673- ```DEPLOY_DIR`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR>`__: Defined as 673- :term:`DEPLOY_DIR`: Defined as
674 ``tmp/deploy`` in the Build Directory. 674 ``tmp/deploy`` in the Build Directory.
675 675
676- ``DEPLOY_DIR_*``: Depending on the package manager used, the package 676- ``DEPLOY_DIR_*``: Depending on the package manager used, the package
677 type sub-folder. Given RPM, IPK, or DEB packaging and tarball 677 type sub-folder. Given RPM, IPK, or DEB packaging and tarball
678 creation, the 678 creation, the
679 ```DEPLOY_DIR_RPM`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_RPM>`__, 679 :term:`DEPLOY_DIR_RPM`,
680 ```DEPLOY_DIR_IPK`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_IPK>`__, 680 :term:`DEPLOY_DIR_IPK`,
681 ```DEPLOY_DIR_DEB`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_DEB>`__, or 681 :term:`DEPLOY_DIR_DEB`, or
682 ```DEPLOY_DIR_TAR`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_TAR>`__, 682 :term:`DEPLOY_DIR_TAR`,
683 variables are used, respectively. 683 variables are used, respectively.
684 684
685- ```PACKAGE_ARCH`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH>`__: Defines 685- :term:`PACKAGE_ARCH`: Defines
686 architecture-specific sub-folders. For example, packages could exist 686 architecture-specific sub-folders. For example, packages could exist
687 for the i586 or qemux86 architectures. 687 for the i586 or qemux86 architectures.
688 688
@@ -690,11 +690,11 @@ BitBake uses the
690```do_package_write_*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb>`__ 690```do_package_write_*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb>`__
691tasks to generate packages and place them into the package holding area 691tasks to generate packages and place them into the package holding area
692(e.g. ``do_package_write_ipk`` for IPK packages). See the 692(e.g. ``do_package_write_ipk`` for IPK packages). See the
693"```do_package_write_deb`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb>`__", 693":ref:`ref-tasks-package_write_deb`",
694"```do_package_write_ipk`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_ipk>`__", 694":ref:`ref-tasks-package_write_ipk`",
695"```do_package_write_rpm`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_rpm>`__", 695":ref:`ref-tasks-package_write_rpm`",
696and 696and
697"```do_package_write_tar`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_tar>`__" 697":ref:`ref-tasks-package_write_tar`"
698sections in the Yocto Project Reference Manual for additional 698sections in the Yocto Project Reference Manual for additional
699information. As an example, consider a scenario where an IPK packaging 699information. As an example, consider a scenario where an IPK packaging
700manager is being used and package architecture support for both i586 and 700manager is being used and package architecture support for both i586 and
@@ -708,7 +708,7 @@ BitBake
708------- 708-------
709 709
710The OpenEmbedded build system uses 710The OpenEmbedded build system uses
711`BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__ to produce images and 711:term:`BitBake` to produce images and
712Software Development Kits (SDKs). You can see from the `general workflow 712Software Development Kits (SDKs). You can see from the `general workflow
713figure <#general-workflow-figure>`__, the BitBake area consists of 713figure <#general-workflow-figure>`__, the BitBake area consists of
714several functional areas. This section takes a closer look at each of 714several functional areas. This section takes a closer look at each of
@@ -731,8 +731,8 @@ code:
731.. image:: figures/source-fetching.png 731.. image:: figures/source-fetching.png
732 :align: center 732 :align: center
733 733
734The ```do_fetch`` <&YOCTO_DOCS_REF_URL;#ref-tasks-fetch>`__ and 734The :ref:`ref-tasks-fetch` and
735```do_unpack`` <&YOCTO_DOCS_REF_URL;#ref-tasks-unpack>`__ tasks fetch 735:ref:`ref-tasks-unpack` tasks fetch
736the source files and unpack them into the `Build 736the source files and unpack them into the `Build
737Directory <&YOCTO_DOCS_REF_URL;#build-directory>`__. 737Directory <&YOCTO_DOCS_REF_URL;#build-directory>`__.
738 738
@@ -756,17 +756,17 @@ Directory, see the
756the Yocto Project Reference Manual. 756the Yocto Project Reference Manual.
757 757
758Each recipe has an area in the Build Directory where the unpacked source 758Each recipe has an area in the Build Directory where the unpacked source
759code resides. The ```S`` <&YOCTO_DOCS_REF_URL;#var-S>`__ variable points 759code resides. The :term:`S` variable points
760to this area for a recipe's unpacked source code. The name of that 760to this area for a recipe's unpacked source code. The name of that
761directory for any given recipe is defined from several different 761directory for any given recipe is defined from several different
762variables. The preceding figure and the following list describe the 762variables. The preceding figure and the following list describe the
763Build Directory's hierarchy: 763Build Directory's hierarchy:
764 764
765- ```TMPDIR`` <&YOCTO_DOCS_REF_URL;#var-TMPDIR>`__: The base directory 765- :term:`TMPDIR`: The base directory
766 where the OpenEmbedded build system performs all its work during the 766 where the OpenEmbedded build system performs all its work during the
767 build. The default base directory is the ``tmp`` directory. 767 build. The default base directory is the ``tmp`` directory.
768 768
769- ```PACKAGE_ARCH`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH>`__: The 769- :term:`PACKAGE_ARCH`: The
770 architecture of the built package or packages. Depending on the 770 architecture of the built package or packages. Depending on the
771 eventual destination of the package or packages (i.e. machine 771 eventual destination of the package or packages (i.e. machine
772 architecture, `build 772 architecture, `build
@@ -774,33 +774,33 @@ Build Directory's hierarchy:
774 specific machine), ``PACKAGE_ARCH`` varies. See the variable's 774 specific machine), ``PACKAGE_ARCH`` varies. See the variable's
775 description for details. 775 description for details.
776 776
777- ```TARGET_OS`` <&YOCTO_DOCS_REF_URL;#var-TARGET_OS>`__: The operating 777- :term:`TARGET_OS`: The operating
778 system of the target device. A typical value would be "linux" (e.g. 778 system of the target device. A typical value would be "linux" (e.g.
779 "qemux86-poky-linux"). 779 "qemux86-poky-linux").
780 780
781- ```PN`` <&YOCTO_DOCS_REF_URL;#var-PN>`__: The name of the recipe used 781- :term:`PN`: The name of the recipe used
782 to build the package. This variable can have multiple meanings. 782 to build the package. This variable can have multiple meanings.
783 However, when used in the context of input files, ``PN`` represents 783 However, when used in the context of input files, ``PN`` represents
784 the the name of the recipe. 784 the the name of the recipe.
785 785
786- ```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__: The location 786- :term:`WORKDIR`: The location
787 where the OpenEmbedded build system builds a recipe (i.e. does the 787 where the OpenEmbedded build system builds a recipe (i.e. does the
788 work to create the package). 788 work to create the package).
789 789
790 - ```PV`` <&YOCTO_DOCS_REF_URL;#var-PV>`__: The version of the 790 - :term:`PV`: The version of the
791 recipe used to build the package. 791 recipe used to build the package.
792 792
793 - ```PR`` <&YOCTO_DOCS_REF_URL;#var-PR>`__: The revision of the 793 - :term:`PR`: The revision of the
794 recipe used to build the package. 794 recipe used to build the package.
795 795
796- ```S`` <&YOCTO_DOCS_REF_URL;#var-S>`__: Contains the unpacked source 796- :term:`S`: Contains the unpacked source
797 files for a given recipe. 797 files for a given recipe.
798 798
799 - ```BPN`` <&YOCTO_DOCS_REF_URL;#var-BPN>`__: The name of the recipe 799 - :term:`BPN`: The name of the recipe
800 used to build the package. The ``BPN`` variable is a version of 800 used to build the package. The ``BPN`` variable is a version of
801 the ``PN`` variable but with common prefixes and suffixes removed. 801 the ``PN`` variable but with common prefixes and suffixes removed.
802 802
803 - ```PV`` <&YOCTO_DOCS_REF_URL;#var-PV>`__: The version of the 803 - :term:`PV`: The version of the
804 recipe used to build the package. 804 recipe used to build the package.
805 805
806.. note:: 806.. note::
@@ -825,15 +825,15 @@ and applies them to the source files:
825.. image:: figures/patching.png 825.. image:: figures/patching.png
826 :align: center 826 :align: center
827 827
828The ```do_patch`` <&YOCTO_DOCS_REF_URL;#ref-tasks-patch>`__ task uses a 828The :ref:`ref-tasks-patch` task uses a
829recipe's ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ statements 829recipe's :term:`SRC_URI` statements
830and the ```FILESPATH`` <&YOCTO_DOCS_REF_URL;#var-FILESPATH>`__ variable 830and the :term:`FILESPATH` variable
831to locate applicable patch files. 831to locate applicable patch files.
832 832
833Default processing for patch files assumes the files have either 833Default processing for patch files assumes the files have either
834``*.patch`` or ``*.diff`` file types. You can use ``SRC_URI`` parameters 834``*.patch`` or ``*.diff`` file types. You can use ``SRC_URI`` parameters
835to change the way the build system recognizes patch files. See the 835to change the way the build system recognizes patch files. See the
836```do_patch`` <&YOCTO_DOCS_REF_URL;#ref-tasks-patch>`__ task for more 836:ref:`ref-tasks-patch` task for more
837information. 837information.
838 838
839BitBake finds and applies multiple patches for a single recipe in the 839BitBake finds and applies multiple patches for a single recipe in the
@@ -841,7 +841,7 @@ order in which it locates the patches. The ``FILESPATH`` variable
841defines the default set of directories that the build system uses to 841defines the default set of directories that the build system uses to
842search for patch files. Once found, patches are applied to the recipe's 842search for patch files. Once found, patches are applied to the recipe's
843source files, which are located in the 843source files, which are located in the
844```S`` <&YOCTO_DOCS_REF_URL;#var-S>`__ directory. 844:term:`S` directory.
845 845
846For more information on how the source directories are created, see the 846For more information on how the source directories are created, see the
847"`Source Fetching <#source-fetching-dev-environment>`__" section. For 847"`Source Fetching <#source-fetching-dev-environment>`__" section. For
@@ -871,13 +871,13 @@ to a holding area (staged) in preparation for packaging:
871 871
872This step in the build process consists of the following tasks: 872This step in the build process consists of the following tasks:
873 873
874- ```do_prepare_recipe_sysroot`` <&YOCTO_DOCS_REF_URL;#ref-tasks-prepare_recipe_sysroot>`__: 874- :ref:`ref-tasks-prepare_recipe_sysroot`:
875 This task sets up the two sysroots in 875 This task sets up the two sysroots in
876 ``${``\ ```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__\ ``}`` 876 ``${``\ :term:`WORKDIR`\ ``}``
877 (i.e. ``recipe-sysroot`` and ``recipe-sysroot-native``) so that 877 (i.e. ``recipe-sysroot`` and ``recipe-sysroot-native``) so that
878 during the packaging phase the sysroots can contain the contents of 878 during the packaging phase the sysroots can contain the contents of
879 the 879 the
880 ```do_populate_sysroot`` <&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot>`__ 880 :ref:`ref-tasks-populate_sysroot`
881 tasks of the recipes on which the recipe containing the tasks 881 tasks of the recipes on which the recipe containing the tasks
882 depends. A sysroot exists for both the target and for the native 882 depends. A sysroot exists for both the target and for the native
883 binaries, which run on the host system. 883 binaries, which run on the host system.
@@ -889,32 +889,32 @@ This step in the build process consists of the following tasks:
889 configure itself depending on the target for which it is being built. 889 configure itself depending on the target for which it is being built.
890 890
891 The configurations handled by the 891 The configurations handled by the
892 ```do_configure`` <&YOCTO_DOCS_REF_URL;#ref-tasks-configure>`__ task 892 :ref:`ref-tasks-configure` task
893 are specific to configurations for the source code being built by the 893 are specific to configurations for the source code being built by the
894 recipe. 894 recipe.
895 895
896 If you are using the 896 If you are using the
897 ```autotools`` <&YOCTO_DOCS_REF_URL;#ref-classes-autotools>`__ class, 897 :ref:`autotools <ref-classes-autotools>` class,
898 you can add additional configuration options by using the 898 you can add additional configuration options by using the
899 ```EXTRA_OECONF`` <&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF>`__ or 899 :term:`EXTRA_OECONF` or
900 ```PACKAGECONFIG_CONFARGS`` <&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS>`__ 900 :term:`PACKAGECONFIG_CONFARGS`
901 variables. For information on how this variable works within that 901 variables. For information on how this variable works within that
902 class, see the 902 class, see the
903 ```autotools`` <&YOCTO_DOCS_REF_URL;#ref-classes-autotools>`__ class 903 :ref:`autotools <ref-classes-autotools>` class
904 `here <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/autotools.bbclass>`__. 904 `here <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/autotools.bbclass>`__.
905 905
906- *``do_compile``*: Once a configuration task has been satisfied, 906- *``do_compile``*: Once a configuration task has been satisfied,
907 BitBake compiles the source using the 907 BitBake compiles the source using the
908 ```do_compile`` <&YOCTO_DOCS_REF_URL;#ref-tasks-compile>`__ task. 908 :ref:`ref-tasks-compile` task.
909 Compilation occurs in the directory pointed to by the 909 Compilation occurs in the directory pointed to by the
910 ```B`` <&YOCTO_DOCS_REF_URL;#var-B>`__ variable. Realize that the 910 :term:`B` variable. Realize that the
911 ``B`` directory is, by default, the same as the 911 ``B`` directory is, by default, the same as the
912 ```S`` <&YOCTO_DOCS_REF_URL;#var-S>`__ directory. 912 :term:`S` directory.
913 913
914- *``do_install``*: After compilation completes, BitBake executes the 914- *``do_install``*: After compilation completes, BitBake executes the
915 ```do_install`` <&YOCTO_DOCS_REF_URL;#ref-tasks-install>`__ task. 915 :ref:`ref-tasks-install` task.
916 This task copies files from the ``B`` directory and places them in a 916 This task copies files from the ``B`` directory and places them in a
917 holding area pointed to by the ```D`` <&YOCTO_DOCS_REF_URL;#var-D>`__ 917 holding area pointed to by the :term:`D`
918 variable. Packaging occurs later using files from this holding 918 variable. Packaging occurs later using files from this holding
919 directory. 919 directory.
920 920
@@ -929,10 +929,10 @@ analyzes the results and splits the output into packages:
929.. image:: figures/analysis-for-package-splitting.png 929.. image:: figures/analysis-for-package-splitting.png
930 :align: center 930 :align: center
931 931
932The ```do_package`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package>`__ and 932The :ref:`ref-tasks-package` and
933```do_packagedata`` <&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata>`__ 933:ref:`ref-tasks-packagedata`
934tasks combine to analyze the files found in the 934tasks combine to analyze the files found in the
935```D`` <&YOCTO_DOCS_REF_URL;#var-D>`__ directory and split them into 935:term:`D` directory and split them into
936subsets based on available packages and files. Analysis involves the 936subsets based on available packages and files. Analysis involves the
937following as well as other items: splitting out debugging symbols, 937following as well as other items: splitting out debugging symbols,
938looking at shared library dependencies between packages, and looking at 938looking at shared library dependencies between packages, and looking at
@@ -940,46 +940,46 @@ package relationships.
940 940
941The ``do_packagedata`` task creates package metadata based on the 941The ``do_packagedata`` task creates package metadata based on the
942analysis such that the build system can generate the final packages. The 942analysis such that the build system can generate the final packages. The
943```do_populate_sysroot`` <&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot>`__ 943:ref:`ref-tasks-populate_sysroot`
944task stages (copies) a subset of the files installed by the 944task stages (copies) a subset of the files installed by the
945```do_install`` <&YOCTO_DOCS_REF_URL;#ref-tasks-install>`__ task into 945:ref:`ref-tasks-install` task into
946the appropriate sysroot. Working, staged, and intermediate results of 946the appropriate sysroot. Working, staged, and intermediate results of
947the analysis and package splitting process use several areas: 947the analysis and package splitting process use several areas:
948 948
949- ```PKGD`` <&YOCTO_DOCS_REF_URL;#var-PKGD>`__: The destination 949- :term:`PKGD`: The destination
950 directory (i.e. ``package``) for packages before they are split into 950 directory (i.e. ``package``) for packages before they are split into
951 individual packages. 951 individual packages.
952 952
953- ```PKGDESTWORK`` <&YOCTO_DOCS_REF_URL;#var-PKGDESTWORK>`__: A 953- :term:`PKGDESTWORK`: A
954 temporary work area (i.e. ``pkgdata``) used by the ``do_package`` 954 temporary work area (i.e. ``pkgdata``) used by the ``do_package``
955 task to save package metadata. 955 task to save package metadata.
956 956
957- ```PKGDEST`` <&YOCTO_DOCS_REF_URL;#var-PKGDEST>`__: The parent 957- :term:`PKGDEST`: The parent
958 directory (i.e. ``packages-split``) for packages after they have been 958 directory (i.e. ``packages-split``) for packages after they have been
959 split. 959 split.
960 960
961- ```PKGDATA_DIR`` <&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR>`__: A shared, 961- :term:`PKGDATA_DIR`: A shared,
962 global-state directory that holds packaging metadata generated during 962 global-state directory that holds packaging metadata generated during
963 the packaging process. The packaging process copies metadata from 963 the packaging process. The packaging process copies metadata from
964 ``PKGDESTWORK`` to the ``PKGDATA_DIR`` area where it becomes globally 964 ``PKGDESTWORK`` to the ``PKGDATA_DIR`` area where it becomes globally
965 available. 965 available.
966 966
967- ```STAGING_DIR_HOST`` <&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_HOST>`__: 967- :term:`STAGING_DIR_HOST`:
968 The path for the sysroot for the system on which a component is built 968 The path for the sysroot for the system on which a component is built
969 to run (i.e. ``recipe-sysroot``). 969 to run (i.e. ``recipe-sysroot``).
970 970
971- ```STAGING_DIR_NATIVE`` <&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_NATIVE>`__: 971- :term:`STAGING_DIR_NATIVE`:
972 The path for the sysroot used when building components for the build 972 The path for the sysroot used when building components for the build
973 host (i.e. ``recipe-sysroot-native``). 973 host (i.e. ``recipe-sysroot-native``).
974 974
975- ```STAGING_DIR_TARGET`` <&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_TARGET>`__: 975- :term:`STAGING_DIR_TARGET`:
976 The path for the sysroot used when a component that is built to 976 The path for the sysroot used when a component that is built to
977 execute on a system and it generates code for yet another machine 977 execute on a system and it generates code for yet another machine
978 (e.g. cross-canadian recipes). 978 (e.g. cross-canadian recipes).
979 979
980The ```FILES`` <&YOCTO_DOCS_REF_URL;#var-FILES>`__ variable defines the 980The :term:`FILES` variable defines the
981files that go into each package in 981files that go into each package in
982```PACKAGES`` <&YOCTO_DOCS_REF_URL;#var-PACKAGES>`__. If you want 982:term:`PACKAGES`. If you want
983details on how this is accomplished, you can look at 983details on how this is accomplished, you can look at
984```package.bbclass`` <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/package.bbclass>`__. 984```package.bbclass`` <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/package.bbclass>`__.
985 985
@@ -1013,36 +1013,36 @@ system uses BitBake to generate the root filesystem image:
1013 1013
1014The image generation process consists of several stages and depends on 1014The image generation process consists of several stages and depends on
1015several tasks and variables. The 1015several tasks and variables. The
1016```do_rootfs`` <&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs>`__ task creates 1016:ref:`ref-tasks-rootfs` task creates
1017the root filesystem (file and directory structure) for an image. This 1017the root filesystem (file and directory structure) for an image. This
1018task uses several key variables to help create the list of packages to 1018task uses several key variables to help create the list of packages to
1019actually install: 1019actually install:
1020 1020
1021- ```IMAGE_INSTALL`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL>`__: Lists 1021- :term:`IMAGE_INSTALL`: Lists
1022 out the base set of packages from which to install from the Package 1022 out the base set of packages from which to install from the Package
1023 Feeds area. 1023 Feeds area.
1024 1024
1025- ```PACKAGE_EXCLUDE`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXCLUDE>`__: 1025- :term:`PACKAGE_EXCLUDE`:
1026 Specifies packages that should not be installed into the image. 1026 Specifies packages that should not be installed into the image.
1027 1027
1028- ```IMAGE_FEATURES`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES>`__: 1028- :term:`IMAGE_FEATURES`:
1029 Specifies features to include in the image. Most of these features 1029 Specifies features to include in the image. Most of these features
1030 map to additional packages for installation. 1030 map to additional packages for installation.
1031 1031
1032- ```PACKAGE_CLASSES`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES>`__: 1032- :term:`PACKAGE_CLASSES`:
1033 Specifies the package backend (e.g. RPM, DEB, or IPK) to use and 1033 Specifies the package backend (e.g. RPM, DEB, or IPK) to use and
1034 consequently helps determine where to locate packages within the 1034 consequently helps determine where to locate packages within the
1035 Package Feeds area. 1035 Package Feeds area.
1036 1036
1037- ```IMAGE_LINGUAS`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_LINGUAS>`__: 1037- :term:`IMAGE_LINGUAS`:
1038 Determines the language(s) for which additional language support 1038 Determines the language(s) for which additional language support
1039 packages are installed. 1039 packages are installed.
1040 1040
1041- ```PACKAGE_INSTALL`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL>`__: 1041- :term:`PACKAGE_INSTALL`:
1042 The final list of packages passed to the package manager for 1042 The final list of packages passed to the package manager for
1043 installation into the image. 1043 installation into the image.
1044 1044
1045With ```IMAGE_ROOTFS`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_ROOTFS>`__ 1045With :term:`IMAGE_ROOTFS`
1046pointing to the location of the filesystem under construction and the 1046pointing to the location of the filesystem under construction and the
1047``PACKAGE_INSTALL`` variable providing the final list of packages to 1047``PACKAGE_INSTALL`` variable providing the final list of packages to
1048install, the root file system is created. 1048install, the root file system is created.
@@ -1069,27 +1069,27 @@ root filesystem image. This file lists out, line-by-line, the installed
1069packages. The manifest file is useful for the 1069packages. The manifest file is useful for the
1070```testimage`` <&YOCTO_DOCS_REF_URL;#ref-classes-testimage*>`__ class, 1070```testimage`` <&YOCTO_DOCS_REF_URL;#ref-classes-testimage*>`__ class,
1071for example, to determine whether or not to run specific tests. See the 1071for example, to determine whether or not to run specific tests. See the
1072```IMAGE_MANIFEST`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_MANIFEST>`__ 1072:term:`IMAGE_MANIFEST`
1073variable for additional information. 1073variable for additional information.
1074 1074
1075Optimizing processes that are run across the image include ``mklibs``, 1075Optimizing processes that are run across the image include ``mklibs``,
1076``prelink``, and any other post-processing commands as defined by the 1076``prelink``, and any other post-processing commands as defined by the
1077```ROOTFS_POSTPROCESS_COMMAND`` <&YOCTO_DOCS_REF_URL;#var-ROOTFS_POSTPROCESS_COMMAND>`__ 1077:term:`ROOTFS_POSTPROCESS_COMMAND`
1078variable. The ``mklibs`` process optimizes the size of the libraries, 1078variable. The ``mklibs`` process optimizes the size of the libraries,
1079while the ``prelink`` process optimizes the dynamic linking of shared 1079while the ``prelink`` process optimizes the dynamic linking of shared
1080libraries to reduce start up time of executables. 1080libraries to reduce start up time of executables.
1081 1081
1082After the root filesystem is built, processing begins on the image 1082After the root filesystem is built, processing begins on the image
1083through the ```do_image`` <&YOCTO_DOCS_REF_URL;#ref-tasks-image>`__ 1083through the :ref:`ref-tasks-image`
1084task. The build system runs any pre-processing commands as defined by 1084task. The build system runs any pre-processing commands as defined by
1085the 1085the
1086```IMAGE_PREPROCESS_COMMAND`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_PREPROCESS_COMMAND>`__ 1086:term:`IMAGE_PREPROCESS_COMMAND`
1087variable. This variable specifies a list of functions to call before the 1087variable. This variable specifies a list of functions to call before the
1088build system creates the final image output files. 1088build system creates the final image output files.
1089 1089
1090The build system dynamically creates ``do_image_*`` tasks as needed, 1090The build system dynamically creates ``do_image_*`` tasks as needed,
1091based on the image types specified in the 1091based on the image types specified in the
1092```IMAGE_FSTYPES`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES>`__ variable. 1092:term:`IMAGE_FSTYPES` variable.
1093The process turns everything into an image file or a set of image files 1093The process turns everything into an image file or a set of image files
1094and can compress the root filesystem image to reduce the overall size of 1094and can compress the root filesystem image to reduce the overall size of
1095the image. The formats used for the root filesystem depend on the 1095the image. The formats used for the root filesystem depend on the
@@ -1105,7 +1105,7 @@ The final task involved in image creation is the
1105```do_image_complete`` <&YOCTO_DOCS_REF_URL;#ref-tasks-image-complete>`__ 1105```do_image_complete`` <&YOCTO_DOCS_REF_URL;#ref-tasks-image-complete>`__
1106task. This task completes the image by applying any image post 1106task. This task completes the image by applying any image post
1107processing as defined through the 1107processing as defined through the
1108```IMAGE_POSTPROCESS_COMMAND`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_POSTPROCESS_COMMAND>`__ 1108:term:`IMAGE_POSTPROCESS_COMMAND`
1109variable. The variable specifies a list of functions to call once the 1109variable. The variable specifies a list of functions to call once the
1110build system has created the final image output files. 1110build system has created the final image output files.
1111 1111
@@ -1143,9 +1143,9 @@ the extensible SDK (eSDK):
1143 1143
1144Like image generation, the SDK script process consists of several stages 1144Like image generation, the SDK script process consists of several stages
1145and depends on many variables. The 1145and depends on many variables. The
1146```do_populate_sdk`` <&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk>`__ 1146:ref:`ref-tasks-populate_sdk`
1147and 1147and
1148```do_populate_sdk_ext`` <&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk_ext>`__ 1148:ref:`ref-tasks-populate_sdk_ext`
1149tasks use these key variables to help create the list of packages to 1149tasks use these key variables to help create the list of packages to
1150actually install. For information on the variables listed in the figure, 1150actually install. For information on the variables listed in the figure,
1151see the "`Application Development SDK <#sdk-dev-environment>`__" 1151see the "`Application Development SDK <#sdk-dev-environment>`__"
@@ -1155,7 +1155,7 @@ The ``do_populate_sdk`` task helps create the standard SDK and handles
1155two parts: a target part and a host part. The target part is the part 1155two parts: a target part and a host part. The target part is the part
1156built for the target hardware and includes libraries and headers. The 1156built for the target hardware and includes libraries and headers. The
1157host part is the part of the SDK that runs on the 1157host part is the part of the SDK that runs on the
1158```SDKMACHINE`` <&YOCTO_DOCS_REF_URL;#var-SDKMACHINE>`__. 1158:term:`SDKMACHINE`.
1159 1159
1160The ``do_populate_sdk_ext`` task helps create the extensible SDK and 1160The ``do_populate_sdk_ext`` task helps create the extensible SDK and
1161handles host and target parts differently than its counter part does for 1161handles host and target parts differently than its counter part does for
@@ -1173,9 +1173,9 @@ Stamp Files and the Rerunning of Tasks
1173~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1174 1174
1175For each task that completes successfully, BitBake writes a stamp file 1175For each task that completes successfully, BitBake writes a stamp file
1176into the ```STAMPS_DIR`` <&YOCTO_DOCS_REF_URL;#var-STAMPS_DIR>`__ 1176into the :term:`STAMPS_DIR`
1177directory. The beginning of the stamp file's filename is determined by 1177directory. The beginning of the stamp file's filename is determined by
1178the ```STAMP`` <&YOCTO_DOCS_REF_URL;#var-STAMP>`__ variable, and the end 1178the :term:`STAMP` variable, and the end
1179of the name consists of the task's name and current `input 1179of the name consists of the task's name and current `input
1180checksum <#overview-checksums>`__. 1180checksum <#overview-checksums>`__.
1181 1181
@@ -1202,8 +1202,8 @@ file does not exist, the task is rerun.
1202 However, you should realize that stamp files only serve as a marker 1202 However, you should realize that stamp files only serve as a marker
1203 that some work has been done and that these files do not record task 1203 that some work has been done and that these files do not record task
1204 output. The actual task output would usually be somewhere in 1204 output. The actual task output would usually be somewhere in
1205 ```TMPDIR`` <&YOCTO_DOCS_REF_URL;#var-TMPDIR>`__ (e.g. in some 1205 :term:`TMPDIR` (e.g. in some
1206 recipe's ```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__.) What 1206 recipe's :term:`WORKDIR`.) What
1207 the sstate cache mechanism adds is a way to cache task output that 1207 the sstate cache mechanism adds is a way to cache task output that
1208 can then be shared between build machines. 1208 can then be shared between build machines.
1209 1209
@@ -1244,16 +1244,16 @@ locations as needed. In some cases, it makes sense to have a setscene
1244task variant (e.g. generating package files in the 1244task variant (e.g. generating package files in the
1245```do_package_write_*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb>`__ 1245```do_package_write_*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb>`__
1246task). In other cases, it does not make sense (e.g. a 1246task). In other cases, it does not make sense (e.g. a
1247```do_patch`` <&YOCTO_DOCS_REF_URL;#ref-tasks-patch>`__ task or a 1247:ref:`ref-tasks-patch` task or a
1248```do_unpack`` <&YOCTO_DOCS_REF_URL;#ref-tasks-unpack>`__ task) since 1248:ref:`ref-tasks-unpack` task) since
1249the work involved would be equal to or greater than the underlying task. 1249the work involved would be equal to or greater than the underlying task.
1250 1250
1251In the build system, the common tasks that have setscene variants are 1251In the build system, the common tasks that have setscene variants are
1252```do_package`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package>`__, 1252:ref:`ref-tasks-package`,
1253``do_package_write_*``, 1253``do_package_write_*``,
1254```do_deploy`` <&YOCTO_DOCS_REF_URL;#ref-tasks-deploy>`__, 1254:ref:`ref-tasks-deploy`,
1255```do_packagedata`` <&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata>`__, and 1255:ref:`ref-tasks-packagedata`, and
1256```do_populate_sysroot`` <&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot>`__. 1256:ref:`ref-tasks-populate_sysroot`.
1257Notice that these tasks represent most of the tasks whose output is an 1257Notice that these tasks represent most of the tasks whose output is an
1258end result. 1258end result.
1259 1259
@@ -1321,14 +1321,14 @@ The build process writes images out to the `Build
1321Directory <&YOCTO_DOCS_REF_URL;#build-directory>`__ inside the 1321Directory <&YOCTO_DOCS_REF_URL;#build-directory>`__ inside the
1322``tmp/deploy/images/machine/`` folder as shown in the figure. This 1322``tmp/deploy/images/machine/`` folder as shown in the figure. This
1323folder contains any files expected to be loaded on the target device. 1323folder contains any files expected to be loaded on the target device.
1324The ```DEPLOY_DIR`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR>`__ variable 1324The :term:`DEPLOY_DIR` variable
1325points to the ``deploy`` directory, while the 1325points to the ``deploy`` directory, while the
1326```DEPLOY_DIR_IMAGE`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_IMAGE>`__ 1326:term:`DEPLOY_DIR_IMAGE`
1327variable points to the appropriate directory containing images for the 1327variable points to the appropriate directory containing images for the
1328current configuration. 1328current configuration.
1329 1329
1330- kernel-image: A kernel binary file. The 1330- kernel-image: A kernel binary file. The
1331 ```KERNEL_IMAGETYPE`` <&YOCTO_DOCS_REF_URL;#var-KERNEL_IMAGETYPE>`__ 1331 :term:`KERNEL_IMAGETYPE`
1332 variable determines the naming scheme for the kernel image file. 1332 variable determines the naming scheme for the kernel image file.
1333 Depending on this variable, the file could begin with a variety of 1333 Depending on this variable, the file could begin with a variety of
1334 naming strings. The ``deploy/images/``\ machine directory can contain 1334 naming strings. The ``deploy/images/``\ machine directory can contain
@@ -1336,7 +1336,7 @@ current configuration.
1336 1336
1337- root-filesystem-image: Root filesystems for the target device (e.g. 1337- root-filesystem-image: Root filesystems for the target device (e.g.
1338 ``*.ext3`` or ``*.bz2`` files). The 1338 ``*.ext3`` or ``*.bz2`` files). The
1339 ```IMAGE_FSTYPES`` <&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES>`__ 1339 :term:`IMAGE_FSTYPES`
1340 variable determines the root filesystem image type. The 1340 variable determines the root filesystem image type. The
1341 ``deploy/images/``\ machine directory can contain multiple root 1341 ``deploy/images/``\ machine directory can contain multiple root
1342 filesystems for the machine. 1342 filesystems for the machine.
@@ -1344,7 +1344,7 @@ current configuration.
1344- kernel-modules: Tarballs that contain all the modules built for the 1344- kernel-modules: Tarballs that contain all the modules built for the
1345 kernel. Kernel module tarballs exist for legacy purposes and can be 1345 kernel. Kernel module tarballs exist for legacy purposes and can be
1346 suppressed by setting the 1346 suppressed by setting the
1347 ```MODULE_TARBALL_DEPLOY`` <&YOCTO_DOCS_REF_URL;#var-MODULE_TARBALL_DEPLOY>`__ 1347 :term:`MODULE_TARBALL_DEPLOY`
1348 variable to "0". The ``deploy/images/``\ machine directory can 1348 variable to "0". The ``deploy/images/``\ machine directory can
1349 contain multiple kernel module tarballs for the machine. 1349 contain multiple kernel module tarballs for the machine.
1350 1350
@@ -1401,72 +1401,72 @@ can initialize the environment before using the tools.
1401 Software Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual. 1401 Software Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
1402 1402
1403All the output files for an SDK are written to the ``deploy/sdk`` folder 1403All the output files for an SDK are written to the ``deploy/sdk`` folder
1404inside the `Build Directory <&YOCTO_DOCS_REF_URL;#build-directory>`__ as 1404inside the :term:`Build Directory` as
1405shown in the previous figure. Depending on the type of SDK, several 1405shown in the previous figure. Depending on the type of SDK, several
1406variables exist that help configure these files. The following list 1406variables exist that help configure these files. The following list
1407shows the variables associated with an extensible SDK: 1407shows the variables associated with an extensible SDK:
1408 1408
1409- ```DEPLOY_DIR`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR>`__: Points to 1409- :term:`DEPLOY_DIR`: Points to
1410 the ``deploy`` directory. 1410 the ``deploy`` directory.
1411 1411
1412- ```SDK_EXT_TYPE`` <&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE>`__: 1412- :term:`SDK_EXT_TYPE`:
1413 Controls whether or not shared state artifacts are copied into the 1413 Controls whether or not shared state artifacts are copied into the
1414 extensible SDK. By default, all required shared state artifacts are 1414 extensible SDK. By default, all required shared state artifacts are
1415 copied into the SDK. 1415 copied into the SDK.
1416 1416
1417- ```SDK_INCLUDE_PKGDATA`` <&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_PKGDATA>`__: 1417- :term:`SDK_INCLUDE_PKGDATA`:
1418 Specifies whether or not packagedata is included in the extensible 1418 Specifies whether or not packagedata is included in the extensible
1419 SDK for all recipes in the "world" target. 1419 SDK for all recipes in the "world" target.
1420 1420
1421- ```SDK_INCLUDE_TOOLCHAIN`` <&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN>`__: 1421- :term:`SDK_INCLUDE_TOOLCHAIN`:
1422 Specifies whether or not the toolchain is included when building the 1422 Specifies whether or not the toolchain is included when building the
1423 extensible SDK. 1423 extensible SDK.
1424 1424
1425- ```SDK_LOCAL_CONF_WHITELIST`` <&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_WHITELIST>`__: 1425- :term:`SDK_LOCAL_CONF_WHITELIST`:
1426 A list of variables allowed through from the build system 1426 A list of variables allowed through from the build system
1427 configuration into the extensible SDK configuration. 1427 configuration into the extensible SDK configuration.
1428 1428
1429- ```SDK_LOCAL_CONF_BLACKLIST`` <&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST>`__: 1429- :term:`SDK_LOCAL_CONF_BLACKLIST`:
1430 A list of variables not allowed through from the build system 1430 A list of variables not allowed through from the build system
1431 configuration into the extensible SDK configuration. 1431 configuration into the extensible SDK configuration.
1432 1432
1433- ```SDK_INHERIT_BLACKLIST`` <&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST>`__: 1433- :term:`SDK_INHERIT_BLACKLIST`:
1434 A list of classes to remove from the 1434 A list of classes to remove from the
1435 ```INHERIT`` <&YOCTO_DOCS_REF_URL;#var-INHERIT>`__ value globally 1435 :term:`INHERIT` value globally
1436 within the extensible SDK configuration. 1436 within the extensible SDK configuration.
1437 1437
1438This next list, shows the variables associated with a standard SDK: 1438This next list, shows the variables associated with a standard SDK:
1439 1439
1440- ```DEPLOY_DIR`` <&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR>`__: Points to 1440- :term:`DEPLOY_DIR`: Points to
1441 the ``deploy`` directory. 1441 the ``deploy`` directory.
1442 1442
1443- ```SDKMACHINE`` <&YOCTO_DOCS_REF_URL;#var-SDKMACHINE>`__: Specifies 1443- :term:`SDKMACHINE`: Specifies
1444 the architecture of the machine on which the cross-development tools 1444 the architecture of the machine on which the cross-development tools
1445 are run to create packages for the target hardware. 1445 are run to create packages for the target hardware.
1446 1446
1447- ```SDKIMAGE_FEATURES`` <&YOCTO_DOCS_REF_URL;#var-SDKIMAGE_FEATURES>`__: 1447- :term:`SDKIMAGE_FEATURES`:
1448 Lists the features to include in the "target" part of the SDK. 1448 Lists the features to include in the "target" part of the SDK.
1449 1449
1450- ```TOOLCHAIN_HOST_TASK`` <&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_HOST_TASK>`__: 1450- :term:`TOOLCHAIN_HOST_TASK`:
1451 Lists packages that make up the host part of the SDK (i.e. the part 1451 Lists packages that make up the host part of the SDK (i.e. the part
1452 that runs on the ``SDKMACHINE``). When you use 1452 that runs on the ``SDKMACHINE``). When you use
1453 ``bitbake -c populate_sdk imagename`` to create the SDK, a set of 1453 ``bitbake -c populate_sdk imagename`` to create the SDK, a set of
1454 default packages apply. This variable allows you to add more 1454 default packages apply. This variable allows you to add more
1455 packages. 1455 packages.
1456 1456
1457- ```TOOLCHAIN_TARGET_TASK`` <&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_TARGET_TASK>`__: 1457- :term:`TOOLCHAIN_TARGET_TASK`:
1458 Lists packages that make up the target part of the SDK (i.e. the part 1458 Lists packages that make up the target part of the SDK (i.e. the part
1459 built for the target hardware). 1459 built for the target hardware).
1460 1460
1461- ```SDKPATH`` <&YOCTO_DOCS_REF_URL;#var-SDKPATH>`__: Defines the 1461- :term:`SDKPATH`: Defines the
1462 default SDK installation path offered by the installation script. 1462 default SDK installation path offered by the installation script.
1463 1463
1464- ```SDK_HOST_MANIFEST`` <&YOCTO_DOCS_REF_URL;#var-SDK_HOST_MANIFEST>`__: 1464- :term:`SDK_HOST_MANIFEST`:
1465 Lists all the installed packages that make up the host part of the 1465 Lists all the installed packages that make up the host part of the
1466 SDK. This variable also plays a minor role for extensible SDK 1466 SDK. This variable also plays a minor role for extensible SDK
1467 development as well. However, it is mainly used for the standard SDK. 1467 development as well. However, it is mainly used for the standard SDK.
1468 1468
1469- ```SDK_TARGET_MANIFEST`` <&YOCTO_DOCS_REF_URL;#var-SDK_TARGET_MANIFEST>`__: 1469- :term:`SDK_TARGET_MANIFEST`:
1470 Lists all the installed packages that make up the target part of the 1470 Lists all the installed packages that make up the target part of the
1471 SDK. This variable also plays a minor role for extensible SDK 1471 SDK. This variable also plays a minor role for extensible SDK
1472 development as well. However, it is mainly used for the standard SDK. 1472 development as well. However, it is mainly used for the standard SDK.
@@ -1497,7 +1497,7 @@ toolchain construction and use.
1497Most of the work occurs on the Build Host. This is the machine used to 1497Most of the work occurs on the Build Host. This is the machine used to
1498build images and generally work within the the Yocto Project 1498build images and generally work within the the Yocto Project
1499environment. When you run 1499environment. When you run
1500`BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__ to create an image, the 1500:term:`BitBake` to create an image, the
1501OpenEmbedded build system uses the host ``gcc`` compiler to bootstrap a 1501OpenEmbedded build system uses the host ``gcc`` compiler to bootstrap a
1502cross-compiler named ``gcc-cross``. The ``gcc-cross`` compiler is what 1502cross-compiler named ``gcc-cross``. The ``gcc-cross`` compiler is what
1503BitBake uses to compile source files when creating the target image. You 1503BitBake uses to compile source files when creating the target image. You
@@ -1558,11 +1558,11 @@ relocatable SDK used to develop applications. When you run the
1558installer, it installs the toolchain, which contains the development 1558installer, it installs the toolchain, which contains the development
1559tools (e.g., ``gcc-cross-canadian``, ``binutils-cross-canadian``, and 1559tools (e.g., ``gcc-cross-canadian``, ``binutils-cross-canadian``, and
1560other ``nativesdk-*`` tools), which are tools native to the SDK (i.e. 1560other ``nativesdk-*`` tools), which are tools native to the SDK (i.e.
1561native to ```SDK_ARCH`` <&YOCTO_DOCS_REF_URL;#var-SDK_ARCH>`__), you 1561native to :term:`SDK_ARCH`), you
1562need to cross-compile and test your software. The figure shows the 1562need to cross-compile and test your software. The figure shows the
1563commands you use to easily build out this toolchain. This 1563commands you use to easily build out this toolchain. This
1564cross-development toolchain is built to execute on the 1564cross-development toolchain is built to execute on the
1565```SDKMACHINE`` <&YOCTO_DOCS_REF_URL;#var-SDKMACHINE>`__, which might or 1565:term:`SDKMACHINE`, which might or
1566might not be the same machine as the Build Host. 1566might not be the same machine as the Build Host.
1567 1567
1568.. note:: 1568.. note::
@@ -1603,7 +1603,7 @@ glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian
1603 (i.e. it is designed to run on the build host). 1603 (i.e. it is designed to run on the build host).
1604 1604
1605- ``gcc-cross-canadian``: The final relocatable cross-compiler. When 1605- ``gcc-cross-canadian``: The final relocatable cross-compiler. When
1606 run on the ```SDKMACHINE`` <&YOCTO_DOCS_REF_URL;#var-SDKMACHINE>`__, 1606 run on the :term:`SDKMACHINE`,
1607 this tool produces executable code that runs on the target device. 1607 this tool produces executable code that runs on the target device.
1608 Only one cross-canadian compiler is produced per architecture since 1608 Only one cross-canadian compiler is produced per architecture since
1609 they can be targeted at different processor optimizations using 1609 they can be targeted at different processor optimizations using
@@ -1623,7 +1623,7 @@ Shared State Cache
1623================== 1623==================
1624 1624
1625By design, the OpenEmbedded build system builds everything from scratch 1625By design, the OpenEmbedded build system builds everything from scratch
1626unless `BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__ can determine 1626unless :term:`BitBake` can determine
1627that parts do not need to be rebuilt. Fundamentally, building from 1627that parts do not need to be rebuilt. Fundamentally, building from
1628scratch is attractive as it means all parts are built fresh and no 1628scratch is attractive as it means all parts are built fresh and no
1629possibility of stale data exists that can cause problems. When 1629possibility of stale data exists that can cause problems. When
@@ -1664,7 +1664,7 @@ them if they are deemed to be valid.
1664.. note:: 1664.. note::
1665 1665
1666 - The build system does not maintain 1666 - The build system does not maintain
1667 ```PR`` <&YOCTO_DOCS_REF_URL;#var-PR>`__ information as part of 1667 :term:`PR` information as part of
1668 the shared state packages. Consequently, considerations exist that 1668 the shared state packages. Consequently, considerations exist that
1669 affect maintaining shared state feeds. For information on how the 1669 affect maintaining shared state feeds. For information on how the
1670 build system works with packages and can track incrementing ``PR`` 1670 build system works with packages and can track incrementing ``PR``
@@ -1695,8 +1695,8 @@ works on a per-task basis rather than a per-recipe basis. You might
1695wonder why using a per-task basis is preferred over a per-recipe basis. 1695wonder why using a per-task basis is preferred over a per-recipe basis.
1696To help explain, consider having the IPK packaging backend enabled and 1696To help explain, consider having the IPK packaging backend enabled and
1697then switching to DEB. In this case, the 1697then switching to DEB. In this case, the
1698```do_install`` <&YOCTO_DOCS_REF_URL;#ref-tasks-install>`__ and 1698:ref:`ref-tasks-install` and
1699```do_package`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package>`__ task outputs 1699:ref:`ref-tasks-package` task outputs
1700are still valid. However, with a per-recipe approach, the build would 1700are still valid. However, with a per-recipe approach, the build would
1701not include the ``.deb`` files. Consequently, you would have to 1701not include the ``.deb`` files. Consequently, you would have to
1702invalidate the whole build and rerun it. Rerunning everything is not the 1702invalidate the whole build and rerun it. Rerunning everything is not the
@@ -1720,7 +1720,7 @@ you a good idea of when the task's data changes.
1720 1720
1721To complicate the problem, there are things that should not be included 1721To complicate the problem, there are things that should not be included
1722in the checksum. First, there is the actual specific build path of a 1722in the checksum. First, there is the actual specific build path of a
1723given task - the ```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__. It 1723given task - the :term:`WORKDIR`. It
1724does not matter if the work directory changes because it should not 1724does not matter if the work directory changes because it should not
1725affect the output for target packages. Also, the build process has the 1725affect the output for target packages. Also, the build process has the
1726objective of making native or cross packages relocatable. 1726objective of making native or cross packages relocatable.
@@ -1755,9 +1755,9 @@ Like the ``WORKDIR`` case, situations exist where dependencies should be
1755ignored. For these situations, you can instruct the build process to 1755ignored. For these situations, you can instruct the build process to
1756ignore a dependency by using a line like the following: 1756ignore a dependency by using a line like the following:
1757PACKAGE_ARCHS[vardepsexclude] = "MACHINE" This example ensures that the 1757PACKAGE_ARCHS[vardepsexclude] = "MACHINE" This example ensures that the
1758```PACKAGE_ARCHS`` <&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCHS>`__ variable 1758:term:`PACKAGE_ARCHS` variable
1759does not depend on the value of 1759does not depend on the value of
1760```MACHINE`` <&YOCTO_DOCS_REF_URL;#var-MACHINE>`__, even if it does 1760:term:`MACHINE`, even if it does
1761reference it. 1761reference it.
1762 1762
1763Equally, there are cases where you need to add dependencies BitBake is 1763Equally, there are cases where you need to add dependencies BitBake is
@@ -1795,9 +1795,9 @@ STAGING_DIR_TARGET COREBASE PRSERV_HOST \\ PRSERV_DUMPDIR
1795PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \\ CCACHE_DIR 1795PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \\ CCACHE_DIR
1796EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX" The 1796EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX" The
1797previous example excludes 1797previous example excludes
1798```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__ since that variable 1798:term:`WORKDIR` since that variable
1799is actually constructed as a path within 1799is actually constructed as a path within
1800```TMPDIR`` <&YOCTO_DOCS_REF_URL;#var-TMPDIR>`__, which is on the 1800:term:`TMPDIR`, which is on the
1801whitelist. 1801whitelist.
1802 1802
1803The rules for deciding which hashes of dependent tasks to include 1803The rules for deciding which hashes of dependent tasks to include
@@ -1806,7 +1806,7 @@ accomplished with a Python function. The code in
1806``meta/lib/oe/sstatesig.py`` shows two examples of this and also 1806``meta/lib/oe/sstatesig.py`` shows two examples of this and also
1807illustrates how you can insert your own policy into the system if so 1807illustrates how you can insert your own policy into the system if so
1808desired. This file defines the two basic signature generators 1808desired. This file defines the two basic signature generators
1809`OE-Core <&YOCTO_DOCS_REF_URL;#oe-core>`__ uses: "OEBasic" and 1809:term:`OpenEmbedded-Core (OE-Core)` uses: "OEBasic" and
1810"OEBasicHash". By default, a dummy "noop" signature handler is enabled 1810"OEBasicHash". By default, a dummy "noop" signature handler is enabled
1811in BitBake. This means that behavior is unchanged from previous 1811in BitBake. This means that behavior is unchanged from previous
1812versions. OE-Core uses the "OEBasicHash" signature handler by default 1812versions. OE-Core uses the "OEBasicHash" signature handler by default
@@ -1816,7 +1816,7 @@ as the "OEBasic" version but adds the task hash to the `stamp
1816files <#stamp-files-and-the-rerunning-of-tasks>`__. This results in any 1816files <#stamp-files-and-the-rerunning-of-tasks>`__. This results in any
1817metadata change that changes the task hash, automatically causing the 1817metadata change that changes the task hash, automatically causing the
1818task to be run again. This removes the need to bump 1818task to be run again. This removes the need to bump
1819```PR`` <&YOCTO_DOCS_REF_URL;#var-PR>`__ values, and changes to metadata 1819:term:`PR` values, and changes to metadata
1820automatically ripple across the build. 1820automatically ripple across the build.
1821 1821
1822It is also worth noting that the end result of these signature 1822It is also worth noting that the end result of these signature
@@ -1842,7 +1842,7 @@ half the problem of supporting a shared state. The other half of the
1842problem is being able to use checksum information during the build and 1842problem is being able to use checksum information during the build and
1843being able to reuse or rebuild specific components. 1843being able to reuse or rebuild specific components.
1844 1844
1845The ```sstate`` <&YOCTO_DOCS_REF_URL;#ref-classes-sstate>`__ class is a 1845The :ref:`sstate <ref-classes-sstate>` class is a
1846relatively generic implementation of how to "capture" a snapshot of a 1846relatively generic implementation of how to "capture" a snapshot of a
1847given task. The idea is that the build process does not care about the 1847given task. The idea is that the build process does not care about the
1848source of a task's output. Output could be freshly built or it could be 1848source of a task's output. Output could be freshly built or it could be
@@ -1850,18 +1850,18 @@ downloaded and unpacked from somewhere. In other words, the build
1850process does not need to worry about its origin. 1850process does not need to worry about its origin.
1851 1851
1852Two types of output exist. One type is just about creating a directory 1852Two types of output exist. One type is just about creating a directory
1853in ```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__. A good example is 1853in :term:`WORKDIR`. A good example is
1854the output of either 1854the output of either
1855```do_install`` <&YOCTO_DOCS_REF_URL;#ref-tasks-install>`__ or 1855:ref:`ref-tasks-install` or
1856```do_package`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package>`__. The other 1856:ref:`ref-tasks-package`. The other
1857type of output occurs when a set of data is merged into a shared 1857type of output occurs when a set of data is merged into a shared
1858directory tree such as the sysroot. 1858directory tree such as the sysroot.
1859 1859
1860The Yocto Project team has tried to keep the details of the 1860The Yocto Project team has tried to keep the details of the
1861implementation hidden in ``sstate`` class. From a user's perspective, 1861implementation hidden in ``sstate`` class. From a user's perspective,
1862adding shared state wrapping to a task is as simple as this 1862adding shared state wrapping to a task is as simple as this
1863```do_deploy`` <&YOCTO_DOCS_REF_URL;#ref-tasks-deploy>`__ example taken 1863:ref:`ref-tasks-deploy` example taken
1864from the ```deploy`` <&YOCTO_DOCS_REF_URL;#ref-classes-deploy>`__ class: 1864from the :ref:`deploy <ref-classes-deploy>` class:
1865DEPLOYDIR = "${WORKDIR}/deploy-${PN}" SSTATETASKS += "do_deploy" 1865DEPLOYDIR = "${WORKDIR}/deploy-${PN}" SSTATETASKS += "do_deploy"
1866do_deploy[sstate-inputdirs] = "${DEPLOYDIR}" 1866do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
1867do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" python 1867do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" python
@@ -1871,9 +1871,9 @@ do_deploy[dirs] = "${DEPLOYDIR} ${B}" do_deploy[stamp-extra-info] =
1871 1871
1872- Adding "do_deploy" to ``SSTATETASKS`` adds some required 1872- Adding "do_deploy" to ``SSTATETASKS`` adds some required
1873 sstate-related processing, which is implemented in the 1873 sstate-related processing, which is implemented in the
1874 ```sstate`` <&YOCTO_DOCS_REF_URL;#ref-classes-sstate>`__ class, to 1874 :ref:`sstate <ref-classes-sstate>` class, to
1875 before and after the 1875 before and after the
1876 ```do_deploy`` <&YOCTO_DOCS_REF_URL;#ref-tasks-deploy>`__ task. 1876 :ref:`ref-tasks-deploy` task.
1877 1877
1878- The ``do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"`` declares that 1878- The ``do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"`` declares that
1879 ``do_deploy`` places its output in ``${DEPLOYDIR}`` when run normally 1879 ``do_deploy`` places its output in ``${DEPLOYDIR}`` when run normally
@@ -1965,8 +1965,8 @@ do_deploy[dirs] = "${DEPLOYDIR} ${B}" do_deploy[stamp-extra-info] =
1965 "${PACKAGELOCK}" 1965 "${PACKAGELOCK}"
1966 1966
1967Behind the scenes, the shared state code works by looking in 1967Behind the scenes, the shared state code works by looking in
1968```SSTATE_DIR`` <&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR>`__ and 1968:term:`SSTATE_DIR` and
1969```SSTATE_MIRRORS`` <&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS>`__ for 1969:term:`SSTATE_MIRRORS` for
1970shared state files. Here is an example: SSTATE_MIRRORS ?= "\\ file://.\* 1970shared state files. Here is an example: SSTATE_MIRRORS ?= "\\ file://.\*
1971http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \\n \\ 1971http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \\n \\
1972file://.\* file:///some/local/dir/sstate/PATH" 1972file://.\* file:///some/local/dir/sstate/PATH"
@@ -1998,7 +1998,7 @@ tasks on which it is dependent are not executed.
1998 1998
1999As a real world example, the aim is when building an IPK-based image, 1999As a real world example, the aim is when building an IPK-based image,
2000only the 2000only the
2001```do_package_write_ipk`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_ipk>`__ 2001:ref:`ref-tasks-package_write_ipk`
2002tasks would have their shared state packages fetched and extracted. 2002tasks would have their shared state packages fetched and extracted.
2003Since the sysroot is not used, it would never get extracted. This is 2003Since the sysroot is not used, it would never get extracted. This is
2004another reason why a task-based approach is preferred over a 2004another reason why a task-based approach is preferred over a
@@ -2011,22 +2011,22 @@ Automatically Added Runtime Dependencies
2011The OpenEmbedded build system automatically adds common types of runtime 2011The OpenEmbedded build system automatically adds common types of runtime
2012dependencies between packages, which means that you do not need to 2012dependencies between packages, which means that you do not need to
2013explicitly declare the packages using 2013explicitly declare the packages using
2014```RDEPENDS`` <&YOCTO_DOCS_REF_URL;#var-RDEPENDS>`__. Three automatic 2014:term:`RDEPENDS`. Three automatic
2015mechanisms exist (``shlibdeps``, ``pcdeps``, and ``depchains``) that 2015mechanisms exist (``shlibdeps``, ``pcdeps``, and ``depchains``) that
2016handle shared libraries, package configuration (pkg-config) modules, and 2016handle shared libraries, package configuration (pkg-config) modules, and
2017``-dev`` and ``-dbg`` packages, respectively. For other types of runtime 2017``-dev`` and ``-dbg`` packages, respectively. For other types of runtime
2018dependencies, you must manually declare the dependencies. 2018dependencies, you must manually declare the dependencies.
2019 2019
2020- ``shlibdeps``: During the 2020- ``shlibdeps``: During the
2021 ```do_package`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package>`__ task of 2021 :ref:`ref-tasks-package` task of
2022 each recipe, all shared libraries installed by the recipe are 2022 each recipe, all shared libraries installed by the recipe are
2023 located. For each shared library, the package that contains the 2023 located. For each shared library, the package that contains the
2024 shared library is registered as providing the shared library. More 2024 shared library is registered as providing the shared library. More
2025 specifically, the package is registered as providing the 2025 specifically, the package is registered as providing the
2026 `soname <https://en.wikipedia.org/wiki/Soname>`__ of the library. The 2026 `soname <https://en.wikipedia.org/wiki/Soname>`__ of the library. The
2027 resulting shared-library-to-package mapping is saved globally in 2027 resulting shared-library-to-package mapping is saved globally in
2028 ```PKGDATA_DIR`` <&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR>`__ by the 2028 :term:`PKGDATA_DIR` by the
2029 ```do_packagedata`` <&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata>`__ 2029 :ref:`ref-tasks-packagedata`
2030 task. 2030 task.
2031 2031
2032 Simultaneously, all executables and shared libraries installed by the 2032 Simultaneously, all executables and shared libraries installed by the
@@ -2047,7 +2047,7 @@ dependencies, you must manually declare the dependencies.
2047 If you want to avoid a package being registered as providing a 2047 If you want to avoid a package being registered as providing a
2048 particular shared library (e.g. because the library is for internal 2048 particular shared library (e.g. because the library is for internal
2049 use only), then add the library to 2049 use only), then add the library to
2050 ```PRIVATE_LIBS`` <&YOCTO_DOCS_REF_URL;#var-PRIVATE_LIBS>`__ inside 2050 :term:`PRIVATE_LIBS` inside
2051 the package's recipe. 2051 the package's recipe.
2052 2052
2053- ``pcdeps``: During the ``do_package`` task of each recipe, all 2053- ``pcdeps``: During the ``do_package`` task of each recipe, all
@@ -2082,7 +2082,7 @@ dependencies, you must manually declare the dependencies.
2082 need for a dependency between the packages. 2082 need for a dependency between the packages.
2083 2083
2084 The dependencies added by ``depchains`` are in the form of 2084 The dependencies added by ``depchains`` are in the form of
2085 ```RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS>`__. 2085 :term:`RRECOMMENDS`.
2086 2086
2087 .. note:: 2087 .. note::
2088 2088
@@ -2101,11 +2101,11 @@ dependencies, you must manually declare the dependencies.
2101 To ensure that the dependency chain is never broken, ``-dev`` and 2101 To ensure that the dependency chain is never broken, ``-dev`` and
2102 ``-dbg`` packages are always generated by default, even if the 2102 ``-dbg`` packages are always generated by default, even if the
2103 packages turn out to be empty. See the 2103 packages turn out to be empty. See the
2104 ```ALLOW_EMPTY`` <&YOCTO_DOCS_REF_URL;#var-ALLOW_EMPTY>`__ variable 2104 :term:`ALLOW_EMPTY` variable
2105 for more information. 2105 for more information.
2106 2106
2107The ``do_package`` task depends on the ``do_packagedata`` task of each 2107The ``do_package`` task depends on the ``do_packagedata`` task of each
2108recipe in ```DEPENDS`` <&YOCTO_DOCS_REF_URL;#var-DEPENDS>`__ through use 2108recipe in :term:`DEPENDS` through use
2109of a ``[``\ ```deptask`` <&YOCTO_DOCS_BB_URL;#variable-flags>`__\ ``]`` 2109of a ``[``\ ```deptask`` <&YOCTO_DOCS_BB_URL;#variable-flags>`__\ ``]``
2110declaration, which guarantees that the required 2110declaration, which guarantees that the required
2111shared-library/module-to-package mapping information will be available 2111shared-library/module-to-package mapping information will be available
@@ -2116,15 +2116,15 @@ Fakeroot and Pseudo
2116 2116
2117Some tasks are easier to implement when allowed to perform certain 2117Some tasks are easier to implement when allowed to perform certain
2118operations that are normally reserved for the root user (e.g. 2118operations that are normally reserved for the root user (e.g.
2119```do_install`` <&YOCTO_DOCS_REF_URL;#ref-tasks-install>`__, 2119:ref:`ref-tasks-install`,
2120```do_package_write*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb>`__, 2120```do_package_write*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb>`__,
2121```do_rootfs`` <&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs>`__, and 2121:ref:`ref-tasks-rootfs`, and
2122```do_image*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-image>`__). For example, 2122```do_image*`` <&YOCTO_DOCS_REF_URL;#ref-tasks-image>`__). For example,
2123the ``do_install`` task benefits from being able to set the UID and GID 2123the ``do_install`` task benefits from being able to set the UID and GID
2124of installed files to arbitrary values. 2124of installed files to arbitrary values.
2125 2125
2126One approach to allowing tasks to perform root-only operations would be 2126One approach to allowing tasks to perform root-only operations would be
2127to require `BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__ to run as 2127to require :term:`BitBake` to run as
2128root. However, this method is cumbersome and has security issues. The 2128root. However, this method is cumbersome and has security issues. The
2129approach that is actually used is to run tasks that benefit from root 2129approach that is actually used is to run tasks that benefit from root
2130privileges in a "fake" root environment. Within this environment, the 2130privileges in a "fake" root environment. Within this environment, the
@@ -2148,7 +2148,7 @@ which results in the illusion of running as root. To keep track of
2148"fake" file ownership and permissions resulting from operations that 2148"fake" file ownership and permissions resulting from operations that
2149require root permissions, Pseudo uses an SQLite 3 database. This 2149require root permissions, Pseudo uses an SQLite 3 database. This
2150database is stored in 2150database is stored in
2151``${``\ ```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__\ ``}/pseudo/files.db`` 2151``${``\ :term:`WORKDIR`\ ``}/pseudo/files.db``
2152for individual recipes. Storing the database in a file as opposed to in 2152for individual recipes. Storing the database in a file as opposed to in
2153memory gives persistence between tasks and builds, which is not 2153memory gives persistence between tasks and builds, which is not
2154accomplished using fakeroot. 2154accomplished using fakeroot.