summaryrefslogtreecommitdiffstats
path: root/documentation/overview-manual/concepts.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/overview-manual/concepts.rst')
-rw-r--r--documentation/overview-manual/concepts.rst51
1 files changed, 17 insertions, 34 deletions
diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst
index ada5143b2a..2e3f1af442 100644
--- a/documentation/overview-manual/concepts.rst
+++ b/documentation/overview-manual/concepts.rst
@@ -55,8 +55,7 @@ This section briefly introduces BitBake. If you want more information on
55BitBake, see the :doc:`BitBake User Manual <bitbake:index>`. 55BitBake, see the :doc:`BitBake User Manual <bitbake:index>`.
56 56
57To see a list of the options BitBake supports, use either of the 57To see a list of the options BitBake supports, use either of the
58following commands: 58following commands::
59::
60 59
61 $ bitbake -h 60 $ bitbake -h
62 $ bitbake --help 61 $ bitbake --help
@@ -66,8 +65,7 @@ The most common usage for BitBake is ``bitbake recipename``, where
66to as the "target"). The target often equates to the first part of a 65to as the "target"). The target often equates to the first part of a
67recipe's filename (e.g. "foo" for a recipe named ``foo_1.3.0-r0.bb``). 66recipe's filename (e.g. "foo" for a recipe named ``foo_1.3.0-r0.bb``).
68So, to process the ``matchbox-desktop_1.2.3.bb`` recipe file, you might 67So, to process the ``matchbox-desktop_1.2.3.bb`` recipe file, you might
69type the following: 68type the following::
70::
71 69
72 $ bitbake matchbox-desktop 70 $ bitbake matchbox-desktop
73 71
@@ -1068,15 +1066,13 @@ the image. The formats used for the root filesystem depend on the
1068support compression. 1066support compression.
1069 1067
1070As an example, a dynamically created task when creating a particular 1068As an example, a dynamically created task when creating a particular
1071image type would take the following form: 1069image type would take the following form::
1072::
1073 1070
1074 do_image_type 1071 do_image_type
1075 1072
1076So, if the type 1073So, if the type
1077as specified by the ``IMAGE_FSTYPES`` were ``ext4``, the dynamically 1074as specified by the ``IMAGE_FSTYPES`` were ``ext4``, the dynamically
1078generated task would be as follows: 1075generated task would be as follows::
1079::
1080 1076
1081 do_image_ext4 1077 do_image_ext4
1082 1078
@@ -1478,8 +1474,7 @@ cross-compiler that is used internally within BitBake only.
1478 gcc-cross 1474 gcc-cross
1479 . 1475 .
1480 1476
1481The chain of events that occurs when the standard toolchain is bootstrapped: 1477The chain of events that occurs when the standard toolchain is bootstrapped::
1482::
1483 1478
1484 binutils-cross -> linux-libc-headers -> gcc-cross -> libgcc-initial -> glibc -> libgcc -> gcc-runtime 1479 binutils-cross -> linux-libc-headers -> gcc-cross -> libgcc-initial -> glibc -> libgcc -> gcc-runtime
1485 1480
@@ -1528,8 +1523,7 @@ might not be the same machine as the Build Host.
1528 can take advantage of pre-built images that ship with the Yocto 1523 can take advantage of pre-built images that ship with the Yocto
1529 Project and already contain cross-development toolchain installers. 1524 Project and already contain cross-development toolchain installers.
1530 1525
1531Here is the bootstrap process for the relocatable toolchain: 1526Here is the bootstrap process for the relocatable toolchain::
1532::
1533 1527
1534 gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian 1528 gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian
1535 1529
@@ -1703,8 +1697,7 @@ to the task.
1703 1697
1704Like the ``WORKDIR`` case, situations exist where dependencies should be 1698Like the ``WORKDIR`` case, situations exist where dependencies should be
1705ignored. For these situations, you can instruct the build process to 1699ignored. For these situations, you can instruct the build process to
1706ignore a dependency by using a line like the following: 1700ignore a dependency by using a line like the following::
1707::
1708 1701
1709 PACKAGE_ARCHS[vardepsexclude] = "MACHINE" 1702 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
1710 1703
@@ -1714,8 +1707,7 @@ reference it.
1714 1707
1715Equally, there are cases where you need to add dependencies BitBake is 1708Equally, there are cases where you need to add dependencies BitBake is
1716not able to find. You can accomplish this by using a line like the 1709not able to find. You can accomplish this by using a line like the
1717following: 1710following::
1718::
1719 1711
1720 PACKAGE_ARCHS[vardeps] = "MACHINE" 1712 PACKAGE_ARCHS[vardeps] = "MACHINE"
1721 1713
@@ -1745,8 +1737,7 @@ and the dependent task hashes can be influenced. Within the BitBake
1745configuration file, you can give BitBake some extra information to help 1737configuration file, you can give BitBake some extra information to help
1746it construct the basehash. The following statement effectively results 1738it construct the basehash. The following statement effectively results
1747in a list of global variable dependency excludes (i.e. variables never 1739in a list of global variable dependency excludes (i.e. variables never
1748included in any checksum): 1740included in any checksum)::
1749::
1750 1741
1751 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \\ 1742 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \\
1752 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \\ 1743 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \\
@@ -1771,8 +1762,7 @@ desired. This file defines the two basic signature generators
1771"OEBasicHash". By default, a dummy "noop" signature handler is enabled 1762"OEBasicHash". By default, a dummy "noop" signature handler is enabled
1772in BitBake. This means that behavior is unchanged from previous 1763in BitBake. This means that behavior is unchanged from previous
1773versions. OE-Core uses the "OEBasicHash" signature handler by default 1764versions. OE-Core uses the "OEBasicHash" signature handler by default
1774through this setting in the ``bitbake.conf`` file: 1765through this setting in the ``bitbake.conf`` file::
1775::
1776 1766
1777 BB_SIGNATURE_HANDLER ?= "OEBasicHash" 1767 BB_SIGNATURE_HANDLER ?= "OEBasicHash"
1778 1768
@@ -1826,8 +1816,7 @@ The Yocto Project team has tried to keep the details of the
1826implementation hidden in ``sstate`` class. From a user's perspective, 1816implementation hidden in ``sstate`` class. From a user's perspective,
1827adding shared state wrapping to a task is as simple as this 1817adding shared state wrapping to a task is as simple as this
1828:ref:`ref-tasks-deploy` example taken 1818:ref:`ref-tasks-deploy` example taken
1829from the :ref:`deploy <ref-classes-deploy>` class: 1819from the :ref:`deploy <ref-classes-deploy>` class::
1830::
1831 1820
1832 DEPLOYDIR = "${WORKDIR}/deploy-${PN}" 1821 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
1833 SSTATETASKS += "do_deploy" 1822 SSTATETASKS += "do_deploy"
@@ -1871,8 +1860,7 @@ The following list explains the previous example:
1871 instead, skipping the ``do_deploy`` task. 1860 instead, skipping the ``do_deploy`` task.
1872 1861
1873- The following task definition is glue logic needed to make the 1862- The following task definition is glue logic needed to make the
1874 previous settings effective: 1863 previous settings effective::
1875 ::
1876 1864
1877 python do_deploy_setscene () { 1865 python do_deploy_setscene () {
1878 sstate_setscene(d) 1866 sstate_setscene(d)
@@ -1898,8 +1886,7 @@ The following list explains the previous example:
1898 In cases where ``sstate-inputdirs`` and ``sstate-outputdirs`` would be 1886 In cases where ``sstate-inputdirs`` and ``sstate-outputdirs`` would be
1899 the same, you can use ``sstate-plaindirs``. For example, to preserve the 1887 the same, you can use ``sstate-plaindirs``. For example, to preserve the
1900 ${:term:`PKGD`} and ${:term:`PKGDEST`} output from the ``do_package`` 1888 ${:term:`PKGD`} and ${:term:`PKGDEST`} output from the ``do_package``
1901 task, use the following: 1889 task, use the following::
1902 ::
1903 1890
1904 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}" 1891 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
1905 1892
@@ -1917,24 +1904,21 @@ The following list explains the previous example:
1917 multiple directories. For example, the following declares 1904 multiple directories. For example, the following declares
1918 ``PKGDESTWORK`` and ``SHLIBWORK`` as shared state input directories, 1905 ``PKGDESTWORK`` and ``SHLIBWORK`` as shared state input directories,
1919 which populates the shared state cache, and ``PKGDATA_DIR`` and 1906 which populates the shared state cache, and ``PKGDATA_DIR`` and
1920 ``SHLIBSDIR`` as the corresponding shared state output directories: 1907 ``SHLIBSDIR`` as the corresponding shared state output directories::
1921 ::
1922 1908
1923 do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}" 1909 do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
1924 do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}" 1910 do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
1925 1911
1926- These methods also include the ability to take a lockfile when 1912- These methods also include the ability to take a lockfile when
1927 manipulating shared state directory structures, for cases where file 1913 manipulating shared state directory structures, for cases where file
1928 additions or removals are sensitive: 1914 additions or removals are sensitive::
1929 ::
1930 1915
1931 do_package[sstate-lockfile] = "${PACKAGELOCK}" 1916 do_package[sstate-lockfile] = "${PACKAGELOCK}"
1932 1917
1933Behind the scenes, the shared state code works by looking in 1918Behind the scenes, the shared state code works by looking in
1934:term:`SSTATE_DIR` and 1919:term:`SSTATE_DIR` and
1935:term:`SSTATE_MIRRORS` for 1920:term:`SSTATE_MIRRORS` for
1936shared state files. Here is an example: 1921shared state files. Here is an example::
1937::
1938 1922
1939 SSTATE_MIRRORS ?= "\ 1923 SSTATE_MIRRORS ?= "\
1940 file://.\* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ 1924 file://.\* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
@@ -2116,8 +2100,7 @@ accomplished using fakeroot.
2116 under fakeroot. Otherwise, the task cannot run root-only operations, 2100 under fakeroot. Otherwise, the task cannot run root-only operations,
2117 and cannot see the fake file ownership and permissions set by the 2101 and cannot see the fake file ownership and permissions set by the
2118 other task. You need to also add a dependency on 2102 other task. You need to also add a dependency on
2119 ``virtual/fakeroot-native:do_populate_sysroot``, giving the following: 2103 ``virtual/fakeroot-native:do_populate_sysroot``, giving the following::
2120 ::
2121 2104
2122 fakeroot do_mytask () { 2105 fakeroot do_mytask () {
2123 ... 2106 ...