diff options
Diffstat (limited to 'documentation/overview-manual')
-rw-r--r-- | documentation/overview-manual/concepts.rst | 91 | ||||
-rw-r--r-- | documentation/overview-manual/yp-intro.rst | 2 |
2 files changed, 70 insertions, 23 deletions
diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst index 62f2327a7e..56dd3b3b55 100644 --- a/documentation/overview-manual/concepts.rst +++ b/documentation/overview-manual/concepts.rst | |||
@@ -98,7 +98,7 @@ files, and how to package the compiled output. | |||
98 | 98 | ||
99 | The term "package" is sometimes used to refer to recipes. However, since | 99 | The term "package" is sometimes used to refer to recipes. However, since |
100 | the word "package" is used for the packaged output from the OpenEmbedded | 100 | the word "package" is used for the packaged output from the OpenEmbedded |
101 | build system (i.e. ``.ipk`` or ``.deb`` files), this document avoids | 101 | build system (i.e. ``.ipk``, ``.deb`` or ``.rpm`` files), this document avoids |
102 | using the term "package" when referring to recipes. | 102 | using the term "package" when referring to recipes. |
103 | 103 | ||
104 | Classes | 104 | Classes |
@@ -256,7 +256,7 @@ development environment. | |||
256 | .. note:: | 256 | .. note:: |
257 | 257 | ||
258 | The | 258 | The |
259 | scripts/oe-setup-builddir | 259 | ``scripts/oe-setup-builddir`` |
260 | script uses the | 260 | script uses the |
261 | ``$TEMPLATECONF`` | 261 | ``$TEMPLATECONF`` |
262 | variable to determine which sample configuration files to locate. | 262 | variable to determine which sample configuration files to locate. |
@@ -352,7 +352,7 @@ layers the build system uses to further control the build. These layers | |||
352 | provide Metadata for the software, machine, and policies. | 352 | provide Metadata for the software, machine, and policies. |
353 | 353 | ||
354 | In general, there are three types of layer input. You can see them below | 354 | In general, there are three types of layer input. You can see them below |
355 | the "User Configuration" box in the `general workflow | 355 | the "User Configuration" box in the :ref:`general workflow |
356 | figure <overview-manual/concepts:openembedded build system concepts>`: | 356 | figure <overview-manual/concepts:openembedded build system concepts>`: |
357 | 357 | ||
358 | - *Metadata (.bb + Patches):* Software layers containing | 358 | - *Metadata (.bb + Patches):* Software layers containing |
@@ -420,14 +420,14 @@ build. | |||
420 | Distro Layer | 420 | Distro Layer |
421 | ~~~~~~~~~~~~ | 421 | ~~~~~~~~~~~~ |
422 | 422 | ||
423 | The distribution layer provides policy configurations for your | 423 | A distribution layer provides policy configurations for your |
424 | distribution. Best practices dictate that you isolate these types of | 424 | distribution. Best practices dictate that you isolate these types of |
425 | configurations into their own layer. Settings you provide in | 425 | configurations into their own layer. Settings you provide in |
426 | ``conf/distro/distro.conf`` override similar settings that BitBake finds | 426 | ``conf/distro/distro.conf`` override similar settings that BitBake finds |
427 | in your ``conf/local.conf`` file in the :term:`Build Directory`. | 427 | in your ``conf/local.conf`` file in the :term:`Build Directory`. |
428 | 428 | ||
429 | The following list provides some explanation and references for what you | 429 | The following list provides some explanation and references for what you |
430 | typically find in the distribution layer: | 430 | typically find in a distribution layer: |
431 | 431 | ||
432 | - *classes:* Class files (``.bbclass``) hold common functionality that | 432 | - *classes:* Class files (``.bbclass``) hold common functionality that |
433 | can be shared among recipes in the distribution. When your recipes | 433 | can be shared among recipes in the distribution. When your recipes |
@@ -454,7 +454,7 @@ typically find in the distribution layer: | |||
454 | BSP Layer | 454 | BSP Layer |
455 | ~~~~~~~~~ | 455 | ~~~~~~~~~ |
456 | 456 | ||
457 | The BSP Layer provides machine configurations that target specific | 457 | A BSP layer provides machine configurations that target specific |
458 | hardware. Everything in this layer is specific to the machine for which | 458 | hardware. Everything in this layer is specific to the machine for which |
459 | you are building the image or the SDK. A common structure or form is | 459 | you are building the image or the SDK. A common structure or form is |
460 | defined for BSP layers. You can learn more about this structure in the | 460 | defined for BSP layers. You can learn more about this structure in the |
@@ -465,7 +465,7 @@ defined for BSP layers. You can learn more about this structure in the | |||
465 | In order for a BSP layer to be considered compliant with the Yocto | 465 | In order for a BSP layer to be considered compliant with the Yocto |
466 | Project, it must meet some structural requirements. | 466 | Project, it must meet some structural requirements. |
467 | 467 | ||
468 | The BSP Layer's configuration directory contains configuration files for | 468 | A BSP layer's configuration directory contains configuration files for |
469 | the machine (``conf/machine/machine.conf``) and, of course, the layer | 469 | the machine (``conf/machine/machine.conf``) and, of course, the layer |
470 | (``conf/layer.conf``). | 470 | (``conf/layer.conf``). |
471 | 471 | ||
@@ -477,18 +477,18 @@ formfactors, graphics support systems, and so forth. | |||
477 | .. note:: | 477 | .. note:: |
478 | 478 | ||
479 | While the figure shows several | 479 | While the figure shows several |
480 | recipes-\* | 480 | ``recipes-*`` |
481 | directories, not all these directories appear in all BSP layers. | 481 | directories, not all these directories appear in all BSP layers. |
482 | 482 | ||
483 | Software Layer | 483 | Software Layer |
484 | ~~~~~~~~~~~~~~ | 484 | ~~~~~~~~~~~~~~ |
485 | 485 | ||
486 | The software layer provides the Metadata for additional software | 486 | A software layer provides the Metadata for additional software |
487 | packages used during the build. This layer does not include Metadata | 487 | packages used during the build. This layer does not include Metadata |
488 | that is specific to the distribution or the machine, which are found in | 488 | that is specific to the distribution or the machine, which are found in |
489 | their respective layers. | 489 | their respective layers. |
490 | 490 | ||
491 | This layer contains any recipes, append files, and patches, that your | 491 | This layer contains any recipes, append files, and patches that your |
492 | project needs. | 492 | project needs. |
493 | 493 | ||
494 | Sources | 494 | Sources |
@@ -560,9 +560,8 @@ source tree used by the group). | |||
560 | 560 | ||
561 | The canonical method through which to include a local project is to use the | 561 | The canonical method through which to include a local project is to use the |
562 | :ref:`ref-classes-externalsrc` class to include that local project. You use | 562 | :ref:`ref-classes-externalsrc` class to include that local project. You use |
563 | either the ``local.conf`` or a recipe's append file to override or set the | 563 | either ``local.conf`` or a recipe's append file to override or set the |
564 | recipe to point to the local directory on your disk to pull in the whole | 564 | recipe to point to the local directory from which to fetch the source. |
565 | source tree. | ||
566 | 565 | ||
567 | Source Control Managers (Optional) | 566 | Source Control Managers (Optional) |
568 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 567 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -736,9 +735,6 @@ following list describe the :term:`Build Directory`'s hierarchy: | |||
736 | - :term:`PV`: The version of the | 735 | - :term:`PV`: The version of the |
737 | recipe used to build the package. | 736 | recipe used to build the package. |
738 | 737 | ||
739 | - :term:`PR`: The revision of the | ||
740 | recipe used to build the package. | ||
741 | |||
742 | - :term:`S`: Contains the unpacked source | 738 | - :term:`S`: Contains the unpacked source |
743 | files for a given recipe. | 739 | files for a given recipe. |
744 | 740 | ||
@@ -912,11 +908,62 @@ the analysis and package splitting process use several areas: | |||
912 | execute on a system and it generates code for yet another machine | 908 | execute on a system and it generates code for yet another machine |
913 | (e.g. :ref:`ref-classes-cross-canadian` recipes). | 909 | (e.g. :ref:`ref-classes-cross-canadian` recipes). |
914 | 910 | ||
915 | The :term:`FILES` variable defines the | 911 | Packages for a recipe are listed in the :term:`PACKAGES` variable. The |
916 | files that go into each package in | 912 | :oe_git:`bitbake.conf </openembedded-core/tree/meta/conf/bitbake.conf>` |
917 | :term:`PACKAGES`. If you want | 913 | configuration file defines the following default list of packages:: |
918 | details on how this is accomplished, you can look at | 914 | |
919 | :yocto_git:`package.bbclass </poky/tree/meta/classes-global/package.bbclass>`. | 915 | PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" |
916 | |||
917 | Each of these packages contains a default list of files defined with the | ||
918 | :term:`FILES` variable. For example, the package ``${PN}-dev`` represents files | ||
919 | useful to the development of applications depending on ``${PN}``. The default | ||
920 | list of files for ``${PN}-dev``, also defined in :oe_git:`bitbake.conf | ||
921 | </openembedded-core/tree/meta/conf/bitbake.conf>`, is defined as follows:: | ||
922 | |||
923 | FILES:${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \ | ||
924 | ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \ | ||
925 | ${datadir}/aclocal ${base_libdir}/*.o \ | ||
926 | ${libdir}/${BPN}/*.la ${base_libdir}/*.la \ | ||
927 | ${libdir}/cmake ${datadir}/cmake" | ||
928 | |||
929 | The paths in this list must be *absolute* paths from the point of view of the | ||
930 | root filesystem on the target, and must *not* make a reference to the variable | ||
931 | :term:`D` or any :term:`WORKDIR` related variable. A correct example would be:: | ||
932 | |||
933 | ${sysconfdir}/foo.conf | ||
934 | |||
935 | .. note:: | ||
936 | |||
937 | The list of files for a package is defined using the override syntax by | ||
938 | separating :term:`FILES` and the package name by a semi-colon (``:``). | ||
939 | |||
940 | A given file can only ever be in one package. By iterating from the leftmost to | ||
941 | rightmost package in :term:`PACKAGES`, each file matching one of the patterns | ||
942 | defined in the corresponding :term:`FILES` definition is included in the | ||
943 | package. | ||
944 | |||
945 | .. note:: | ||
946 | |||
947 | To find out which package installs a file, the ``oe-pkgdata-util`` | ||
948 | command-line utility can be used:: | ||
949 | |||
950 | $ oe-pkgdata-util find-path '/etc/fstab' | ||
951 | base-files: /etc/fstab | ||
952 | |||
953 | For more information on the ``oe-pkgdata-util`` utility, see the section | ||
954 | :ref:`dev-manual/debugging:Viewing Package Information with | ||
955 | ``oe-pkgdata-util``` of the Yocto Project Development Tasks Manual. | ||
956 | |||
957 | To add a custom package variant of the ``${PN}`` recipe named | ||
958 | ``${PN}-extra`` (name is arbitrary), one can add it to the | ||
959 | :term:`PACKAGE_BEFORE_PN` variable:: | ||
960 | |||
961 | PACKAGE_BEFORE_PN += "${PN}-extra" | ||
962 | |||
963 | Alternatively, a custom package can be added by adding it to the | ||
964 | :term:`PACKAGES` variable using the prepend operator (``=+``):: | ||
965 | |||
966 | PACKAGES =+ "${PN}-extra" | ||
920 | 967 | ||
921 | Depending on the type of packages being created (RPM, DEB, or IPK), the | 968 | Depending on the type of packages being created (RPM, DEB, or IPK), the |
922 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` | 969 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` |
@@ -2153,7 +2200,7 @@ require root privileges, the fact that some earlier steps ran in a fake | |||
2153 | root environment does not cause problems. | 2200 | root environment does not cause problems. |
2154 | 2201 | ||
2155 | The capability to run tasks in a fake root environment is known as | 2202 | The capability to run tasks in a fake root environment is known as |
2156 | "`fakeroot <http://man.he.net/man1/fakeroot>`__", which is derived from | 2203 | ":manpage:`fakeroot <fakeroot(1)>`", which is derived from |
2157 | the BitBake keyword/variable flag that requests a fake root environment | 2204 | the BitBake keyword/variable flag that requests a fake root environment |
2158 | for a task. | 2205 | for a task. |
2159 | 2206 | ||
diff --git a/documentation/overview-manual/yp-intro.rst b/documentation/overview-manual/yp-intro.rst index 4a27e12e01..11e6d99e32 100644 --- a/documentation/overview-manual/yp-intro.rst +++ b/documentation/overview-manual/yp-intro.rst | |||
@@ -400,7 +400,7 @@ Yocto Project: | |||
400 | Autobuilder :doc:`here </test-manual/understand-autobuilder>`. | 400 | Autobuilder :doc:`here </test-manual/understand-autobuilder>`. |
401 | 401 | ||
402 | - *Pseudo:* Pseudo is the Yocto Project implementation of | 402 | - *Pseudo:* Pseudo is the Yocto Project implementation of |
403 | `fakeroot <http://man.he.net/man1/fakeroot>`__, which is used to run | 403 | :manpage:`fakeroot <fakeroot(1)>`, which is used to run |
404 | commands in an environment that seemingly has root privileges. | 404 | commands in an environment that seemingly has root privileges. |
405 | 405 | ||
406 | During a build, it can be necessary to perform operations that | 406 | During a build, it can be necessary to perform operations that |