summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/common-tasks.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/dev-manual/common-tasks.rst')
-rw-r--r--documentation/dev-manual/common-tasks.rst269
1 files changed, 115 insertions, 154 deletions
diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst
index 189f415c8c..c747c0deac 100644
--- a/documentation/dev-manual/common-tasks.rst
+++ b/documentation/dev-manual/common-tasks.rst
@@ -418,10 +418,10 @@ Enabling Your Layer
418Before the OpenEmbedded build system can use your new layer, you need to 418Before the OpenEmbedded build system can use your new layer, you need to
419enable it. To enable your layer, simply add your layer's path to the 419enable it. To enable your layer, simply add your layer's path to the
420:term:`BBLAYERS` variable in your ``conf/bblayers.conf`` file, which is 420:term:`BBLAYERS` variable in your ``conf/bblayers.conf`` file, which is
421found in the :term:`Build Directory`. 421found in the :term:`Build Directory`. The following example shows how to
422The following example shows how to enable your new 422enable your new ``meta-mylayer`` layer (note how your new layer exists
423``meta-mylayer`` layer (note how your new layer exists outside of 423outside of the official ``poky`` repository which you would have checked
424the official ``poky`` repository which you would have checked out earlier):: 424out earlier)::
425 425
426 # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf 426 # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
427 # changes incompatibly 427 # changes incompatibly
@@ -969,8 +969,7 @@ high-level image features by using the
969variables. Although the functions for both variables are nearly 969variables. Although the functions for both variables are nearly
970equivalent, best practices dictate using :term:`IMAGE_FEATURES` from within 970equivalent, best practices dictate using :term:`IMAGE_FEATURES` from within
971a recipe and using :term:`EXTRA_IMAGE_FEATURES` from within your 971a recipe and using :term:`EXTRA_IMAGE_FEATURES` from within your
972``local.conf`` file, which is found in the 972``local.conf`` file, which is found in the :term:`Build Directory`.
973:term:`Build Directory`.
974 973
975To understand how these features work, the best reference is 974To understand how these features work, the best reference is
976:ref:`meta/classes-recipe/image.bbclass <ref-classes-image>`. 975:ref:`meta/classes-recipe/image.bbclass <ref-classes-image>`.
@@ -1206,11 +1205,10 @@ application that builds using Autotools. Creating the base recipe using
1206``recipetool`` results in a recipe that has the pre-build dependencies, 1205``recipetool`` results in a recipe that has the pre-build dependencies,
1207license requirements, and checksums configured. 1206license requirements, and checksums configured.
1208 1207
1209To run the tool, you just need to be in your 1208To run the tool, you just need to be in your :term:`Build Directory` and
1210:term:`Build Directory` and have sourced the 1209have sourced the build environment setup script (i.e.
1211build environment setup script (i.e. 1210:ref:`structure-core-script`). To get help on the tool, use the following
1212:ref:`structure-core-script`). 1211command::
1213To get help on the tool, use the following command::
1214 1212
1215 $ recipetool -h 1213 $ recipetool -h
1216 NOTE: Starting bitbake server... 1214 NOTE: Starting bitbake server...
@@ -1342,8 +1340,7 @@ using BitBake to process the recipe multiple times in order to
1342progressively discover and add information to the recipe file. 1340progressively discover and add information to the recipe file.
1343 1341
1344Assuming you have sourced the build environment setup script (i.e. 1342Assuming you have sourced the build environment setup script (i.e.
1345:ref:`structure-core-script`) and you are in 1343:ref:`structure-core-script`) and you are in the :term:`Build Directory`, use
1346the :term:`Build Directory`, use
1347BitBake to process your recipe. All you need to provide is the 1344BitBake to process your recipe. All you need to provide is the
1348``basename`` of the recipe as described in the previous section:: 1345``basename`` of the recipe as described in the previous section::
1349 1346
@@ -1362,7 +1359,7 @@ is to have BitBake return it by running the following::
1362 $ bitbake -e basename | grep ^WORKDIR= 1359 $ bitbake -e basename | grep ^WORKDIR=
1363 1360
1364As an example, assume a Source Directory 1361As an example, assume a Source Directory
1365top-level folder named ``poky``, a default Build Directory at 1362top-level folder named ``poky``, a default :term:`Build Directory` at
1366``poky/build``, and a ``qemux86-poky-linux`` machine target system. 1363``poky/build``, and a ``qemux86-poky-linux`` machine target system.
1367Furthermore, suppose your recipe is named ``foo_1.3.0.bb``. In this 1364Furthermore, suppose your recipe is named ``foo_1.3.0.bb``. In this
1368case, the work directory the build system uses to build the package 1365case, the work directory the build system uses to build the package
@@ -3017,15 +3014,14 @@ The following steps describe how to set up the AUH utility:
3017 AUH is not part of the :term:`OpenEmbedded-Core (OE-Core)` or 3014 AUH is not part of the :term:`OpenEmbedded-Core (OE-Core)` or
3018 :term:`Poky` repositories. 3015 :term:`Poky` repositories.
3019 3016
30204. *Create a Dedicated Build Directory:* Run the 30174. *Create a Dedicated Build Directory:* Run the :ref:`structure-core-script`
3021 :ref:`structure-core-script` 3018 script to create a fresh :term:`Build Directory` that you use exclusively
3022 script to create a fresh build directory that you use exclusively for 3019 for running the AUH utility::
3023 running the AUH utility::
3024 3020
3025 $ cd poky 3021 $ cd poky
3026 $ source oe-init-build-env your_AUH_build_directory 3022 $ source oe-init-build-env your_AUH_build_directory
3027 3023
3028 Re-using an existing build directory and its configurations is not 3024 Re-using an existing :term:`Build Directory` and its configurations is not
3029 recommended as existing settings could cause AUH to fail or behave 3025 recommended as existing settings could cause AUH to fail or behave
3030 undesirably. 3026 undesirably.
3031 3027
@@ -3045,7 +3041,7 @@ The following steps describe how to set up the AUH utility:
3045 With this configuration and a successful 3041 With this configuration and a successful
3046 upgrade, a build history "diff" file appears in the 3042 upgrade, a build history "diff" file appears in the
3047 ``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in 3043 ``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in
3048 your build directory. 3044 your :term:`Build Directory`.
3049 3045
3050 - If you want to enable testing through the 3046 - If you want to enable testing through the
3051 :ref:`testimage <ref-classes-testimage>` 3047 :ref:`testimage <ref-classes-testimage>`
@@ -3070,7 +3066,7 @@ The following steps describe how to set up the AUH utility:
3070 3066
30717. *Create and Edit an AUH Configuration File:* You need to have the 30677. *Create and Edit an AUH Configuration File:* You need to have the
3072 ``upgrade-helper/upgrade-helper.conf`` configuration file in your 3068 ``upgrade-helper/upgrade-helper.conf`` configuration file in your
3073 build directory. You can find a sample configuration file in the 3069 :term:`Build Directory`. You can find a sample configuration file in the
3074 :yocto_git:`AUH source repository </auto-upgrade-helper/tree/>`. 3070 :yocto_git:`AUH source repository </auto-upgrade-helper/tree/>`.
3075 3071
3076 Read through the sample file and make configurations as needed. For 3072 Read through the sample file and make configurations as needed. For
@@ -3118,7 +3114,7 @@ This next set of examples describes how to use the AUH:
3118 $ upgrade-helper.py -e all 3114 $ upgrade-helper.py -e all
3119 3115
3120Once you have run the AUH utility, you can find the results in the AUH 3116Once you have run the AUH utility, you can find the results in the AUH
3121build directory:: 3117:term:`Build Directory`::
3122 3118
3123 ${BUILDDIR}/upgrade-helper/timestamp 3119 ${BUILDDIR}/upgrade-helper/timestamp
3124 3120
@@ -3179,8 +3175,7 @@ example, assume that the layer has been cloned into following area::
3179 3175
3180 /home/scottrif/meta-openembedded 3176 /home/scottrif/meta-openembedded
3181 3177
3182The following command from your 3178The following command from your :term:`Build Directory` adds the layer to
3183:term:`Build Directory` adds the layer to
3184your build configuration (i.e. ``${BUILDDIR}/conf/bblayers.conf``):: 3179your build configuration (i.e. ``${BUILDDIR}/conf/bblayers.conf``)::
3185 3180
3186 $ bitbake-layers add-layer /home/scottrif/meta-openembedded/meta-oe 3181 $ bitbake-layers add-layer /home/scottrif/meta-openembedded/meta-oe
@@ -3341,16 +3336,14 @@ source code used by recipes to build packages. For example, suppose you
3341are developing a patch and you need to experiment a bit to figure out 3336are developing a patch and you need to experiment a bit to figure out
3342your solution. After you have initially built the package, you can 3337your solution. After you have initially built the package, you can
3343iteratively tweak the source code, which is located in the 3338iteratively tweak the source code, which is located in the
3344:term:`Build Directory`, and then you can 3339:term:`Build Directory`, and then you can force a re-compile and quickly
3345force a re-compile and quickly test your altered code. Once you settle 3340test your altered code. Once you settle on a solution, you can then preserve
3346on a solution, you can then preserve your changes in the form of 3341your changes in the form of patches.
3347patches.
3348 3342
3349During a build, the unpacked temporary source code used by recipes to 3343During a build, the unpacked temporary source code used by recipes to
3350build packages is available in the Build Directory as defined by the 3344build packages is available in the :term:`Build Directory` as defined by the
3351:term:`S` variable. Below is the default 3345:term:`S` variable. Below is the default value for the :term:`S` variable as
3352value for the :term:`S` variable as defined in the 3346defined in the ``meta/conf/bitbake.conf`` configuration file in the
3353``meta/conf/bitbake.conf`` configuration file in the
3354:term:`Source Directory`:: 3347:term:`Source Directory`::
3355 3348
3356 S = "${WORKDIR}/${BP}" 3349 S = "${WORKDIR}/${BP}"
@@ -3392,7 +3385,7 @@ The actual directory depends on several things:
3392- :term:`PR`: The recipe revision. 3385- :term:`PR`: The recipe revision.
3393 3386
3394As an example, assume a Source Directory top-level folder named 3387As an example, assume a Source Directory top-level folder named
3395``poky``, a default Build Directory at ``poky/build``, and a 3388``poky``, a default :term:`Build Directory` at ``poky/build``, and a
3396``qemux86-poky-linux`` machine target system. Furthermore, suppose your 3389``qemux86-poky-linux`` machine target system. Furthermore, suppose your
3397recipe is named ``foo_1.3.0.bb``. In this case, the work directory the 3390recipe is named ``foo_1.3.0.bb``. In this case, the work directory the
3398build system uses to build the package would be as follows:: 3391build system uses to build the package would be as follows::
@@ -3420,8 +3413,7 @@ form of a patch all using Quilt.
3420Follow these general steps: 3413Follow these general steps:
3421 3414
34221. *Find the Source Code:* Temporary source code used by the 34151. *Find the Source Code:* Temporary source code used by the
3423 OpenEmbedded build system is kept in the 3416 OpenEmbedded build system is kept in the :term:`Build Directory`. See the
3424 :term:`Build Directory`. See the
3425 ":ref:`dev-manual/common-tasks:finding temporary source code`" section to 3417 ":ref:`dev-manual/common-tasks:finding temporary source code`" section to
3426 learn how to locate the directory that has the temporary source code for a 3418 learn how to locate the directory that has the temporary source code for a
3427 particular package. 3419 particular package.
@@ -3649,10 +3641,10 @@ build host running Linux.
3649 :doc:`/brief-yoctoprojectqs/index` document. 3641 :doc:`/brief-yoctoprojectqs/index` document.
3650 3642
3651The build process creates an entire Linux distribution from source and 3643The build process creates an entire Linux distribution from source and
3652places it in your :term:`Build Directory` under 3644places it in your :term:`Build Directory` under ``tmp/deploy/images``. For
3653``tmp/deploy/images``. For detailed information on the build process 3645detailed information on the build process using BitBake, see the
3654using BitBake, see the ":ref:`overview-manual/concepts:images`" section in the 3646":ref:`overview-manual/concepts:images`" section in the Yocto Project Overview
3655Yocto Project Overview and Concepts Manual. 3647and Concepts Manual.
3656 3648
3657The following figure and list overviews the build process: 3649The following figure and list overviews the build process:
3658 3650
@@ -3672,25 +3664,23 @@ The following figure and list overviews the build process:
3672 When you use the initialization script, the OpenEmbedded build system 3664 When you use the initialization script, the OpenEmbedded build system
3673 uses ``build`` as the default :term:`Build Directory` in your current work 3665 uses ``build`` as the default :term:`Build Directory` in your current work
3674 directory. You can use a `build_dir` argument with the script to 3666 directory. You can use a `build_dir` argument with the script to
3675 specify a different build directory. 3667 specify a different :term:`Build Directory`.
3676 3668
3677 .. note:: 3669 .. note::
3678 3670
3679 A common practice is to use a different Build Directory for 3671 A common practice is to use a different :term:`Build Directory` for
3680 different targets; for example, ``~/build/x86`` for a ``qemux86`` 3672 different targets; for example, ``~/build/x86`` for a ``qemux86``
3681 target, and ``~/build/arm`` for a ``qemuarm`` target. In any 3673 target, and ``~/build/arm`` for a ``qemuarm`` target. In any
3682 event, it's typically cleaner to locate the build directory 3674 event, it's typically cleaner to locate the :term:`Build Directory`
3683 somewhere outside of your source directory. 3675 somewhere outside of your source directory.
3684 3676
36853. *Make Sure Your* ``local.conf`` *File is Correct*: Ensure the 36773. *Make Sure Your* ``local.conf`` *File is Correct*: Ensure the
3686 ``conf/local.conf`` configuration file, which is found in the Build 3678 ``conf/local.conf`` configuration file, which is found in the
3687 Directory, is set up how you want it. This file defines many aspects 3679 :term:`Build Directory`, is set up how you want it. This file defines many
3688 of the build environment including the target machine architecture 3680 aspects of the build environment including the target machine architecture
3689 through the :term:`MACHINE` variable, the packaging format used during 3681 through the :term:`MACHINE` variable, the packaging format used during
3690 the build 3682 the build (:term:`PACKAGE_CLASSES`), and a centralized tarball download
3691 (:term:`PACKAGE_CLASSES`), 3683 directory through the :term:`DL_DIR` variable.
3692 and a centralized tarball download directory through the
3693 :term:`DL_DIR` variable.
3694 3684
36954. *Build the Image:* Build the image using the ``bitbake`` command:: 36854. *Build the Image:* Build the image using the ``bitbake`` command::
3696 3686
@@ -3718,7 +3708,7 @@ The following figure and list overviews the build process:
3718 Once an 3708 Once an
3719 image has been built, it often needs to be installed. The images and 3709 image has been built, it often needs to be installed. The images and
3720 kernels built by the OpenEmbedded build system are placed in the 3710 kernels built by the OpenEmbedded build system are placed in the
3721 Build Directory in ``tmp/deploy/images``. For information on how to 3711 :term:`Build Directory` in ``tmp/deploy/images``. For information on how to
3722 run pre-built images such as ``qemux86`` and ``qemuarm``, see the 3712 run pre-built images such as ``qemux86`` and ``qemuarm``, see the
3723 :doc:`/sdk-manual/index` manual. For 3713 :doc:`/sdk-manual/index` manual. For
3724 information about how to install these images, see the documentation 3714 information about how to install these images, see the documentation
@@ -3772,7 +3762,7 @@ Follow these steps to set up and execute multiple configuration builds:
3772 TMPDIR = "${TOPDIR}/tmpmultix86" 3762 TMPDIR = "${TOPDIR}/tmpmultix86"
3773 3763
3774 The location for these multiconfig configuration files is specific. 3764 The location for these multiconfig configuration files is specific.
3775 They must reside in the current build directory in a sub-directory of 3765 They must reside in the current :term:`Build Directory` in a sub-directory of
3776 ``conf`` named ``multiconfig`` or within a layer's ``conf`` directory 3766 ``conf`` named ``multiconfig`` or within a layer's ``conf`` directory
3777 under a directory named ``multiconfig``. Following is an example that defines 3767 under a directory named ``multiconfig``. Following is an example that defines
3778 two configuration files for the "x86" and "arm" multiconfigs: 3768 two configuration files for the "x86" and "arm" multiconfigs:
@@ -4275,15 +4265,13 @@ If build speed and package feed maintenance are considerations, you
4275should consider the points in this section that can help you optimize 4265should consider the points in this section that can help you optimize
4276your tunings to best consider build times and package feed maintenance. 4266your tunings to best consider build times and package feed maintenance.
4277 4267
4278- *Share the Build Directory:* If at all possible, share the 4268- *Share the :term:`Build Directory`:* If at all possible, share the
4279 :term:`TMPDIR` across builds. The 4269 :term:`TMPDIR` across builds. The Yocto Project supports switching between
4280 Yocto Project supports switching between different 4270 different :term:`MACHINE` values in the same :term:`TMPDIR`. This practice
4281 :term:`MACHINE` values in the same 4271 is well supported and regularly used by developers when building for
4282 :term:`TMPDIR`. This practice is well supported and regularly used by 4272 multiple machines. When you use the same :term:`TMPDIR` for multiple
4283 developers when building for multiple machines. When you use the same 4273 machine builds, the OpenEmbedded build system can reuse the existing native
4284 :term:`TMPDIR` for multiple machine builds, the OpenEmbedded build system 4274 and often cross-recipes for multiple machines. Thus, build time decreases.
4285 can reuse the existing native and often cross-recipes for multiple
4286 machines. Thus, build time decreases.
4287 4275
4288 .. note:: 4276 .. note::
4289 4277
@@ -4399,10 +4387,10 @@ your tunings to best consider build times and package feed maintenance.
4399Building Software from an External Source 4387Building Software from an External Source
4400----------------------------------------- 4388-----------------------------------------
4401 4389
4402By default, the OpenEmbedded build system uses the 4390By default, the OpenEmbedded build system uses the :term:`Build Directory`
4403:term:`Build Directory` when building source 4391when building source code. The build process involves fetching the source
4404code. The build process involves fetching the source files, unpacking 4392files, unpacking them, and then patching them if necessary before the build
4405them, and then patching them if necessary before the build takes place. 4393takes place.
4406 4394
4407There are situations where you might want to build software from source 4395There are situations where you might want to build software from source
4408files that are external to and thus outside of the OpenEmbedded build 4396files that are external to and thus outside of the OpenEmbedded build
@@ -4519,9 +4507,8 @@ directory:
4519 from your "own-mirror" are used. 4507 from your "own-mirror" are used.
4520 4508
45212. *Start With a Clean Build:* You can start with a clean build by 45092. *Start With a Clean Build:* You can start with a clean build by
4522 removing the 4510 removing the ``${``\ :term:`TMPDIR`\ ``}`` directory or using a new
4523 ``${``\ :term:`TMPDIR`\ ``}`` 4511 :term:`Build Directory`.
4524 directory or using a new :term:`Build Directory`.
4525 4512
45263. *Build Your Target:* Use BitBake to build your target:: 45133. *Build Your Target:* Use BitBake to build your target::
4527 4514
@@ -4622,8 +4609,7 @@ Following are additional factors that can affect build speed:
4622 the benefits are limited due to the compiler using ``-pipe``. The 4609 the benefits are limited due to the compiler using ``-pipe``. The
4623 build system goes to some lengths to avoid ``sync()`` calls into the 4610 build system goes to some lengths to avoid ``sync()`` calls into the
4624 file system on the principle that if there was a significant failure, 4611 file system on the principle that if there was a significant failure,
4625 the :term:`Build Directory` 4612 the :term:`Build Directory` contents could easily be rebuilt.
4626 contents could easily be rebuilt.
4627 4613
4628- Inheriting the 4614- Inheriting the
4629 :ref:`rm_work <ref-classes-rm-work>` class: 4615 :ref:`rm_work <ref-classes-rm-work>` class:
@@ -4820,8 +4806,7 @@ Using Multilib
4820After you have set up the recipes, you need to define the actual 4806After you have set up the recipes, you need to define the actual
4821combination of multiple libraries you want to build. You accomplish this 4807combination of multiple libraries you want to build. You accomplish this
4822through your ``local.conf`` configuration file in the 4808through your ``local.conf`` configuration file in the
4823:term:`Build Directory`. An example 4809:term:`Build Directory`. An example configuration would be as follows::
4824configuration would be as follows::
4825 4810
4826 MACHINE = "qemux86-64" 4811 MACHINE = "qemux86-64"
4827 require conf/multilib.conf 4812 require conf/multilib.conf
@@ -4871,10 +4856,9 @@ Here are the implementation details for the RPM Package Management System:
4871 4856
4872- A unique architecture is defined for the Multilib packages, along 4857- A unique architecture is defined for the Multilib packages, along
4873 with creating a unique deploy folder under ``tmp/deploy/rpm`` in the 4858 with creating a unique deploy folder under ``tmp/deploy/rpm`` in the
4874 :term:`Build Directory`. For 4859 :term:`Build Directory`. For example, consider ``lib32`` in a
4875 example, consider ``lib32`` in a ``qemux86-64`` image. The possible 4860 ``qemux86-64`` image. The possible architectures in the system are "all",
4876 architectures in the system are "all", "qemux86_64", 4861 "qemux86_64", "lib32:qemux86_64", and "lib32:x86".
4877 "lib32:qemux86_64", and "lib32:x86".
4878 4862
4879- The ``${MLPREFIX}`` variable is stripped from ``${PN}`` during RPM 4863- The ``${MLPREFIX}`` variable is stripped from ``${PN}`` during RPM
4880 packaging. The naming for a normal RPM package and a Multilib RPM 4864 packaging. The naming for a normal RPM package and a Multilib RPM
@@ -5460,8 +5444,7 @@ system needs to meet the following requirements:
5460 your development host system. 5444 your development host system.
5461 5445
5462- You must have sourced the build environment setup script (i.e. 5446- You must have sourced the build environment setup script (i.e.
5463 :ref:`structure-core-script`) found in the 5447 :ref:`structure-core-script`) found in the :term:`Build Directory`.
5464 :term:`Build Directory`.
5465 5448
5466- You need to have the build artifacts already available, which 5449- You need to have the build artifacts already available, which
5467 typically means that you must have already created an image using the 5450 typically means that you must have already created an image using the
@@ -5569,11 +5552,10 @@ Raw Mode
5569 5552
5570Running Wic in raw mode allows you to specify all the partitions through 5553Running Wic in raw mode allows you to specify all the partitions through
5571the ``wic`` command line. The primary use for raw mode is if you have 5554the ``wic`` command line. The primary use for raw mode is if you have
5572built your kernel outside of the Yocto Project 5555built your kernel outside of the Yocto Project :term:`Build Directory`.
5573:term:`Build Directory`. In other words, you 5556In other words, you can point to arbitrary kernel, root filesystem locations,
5574can point to arbitrary kernel, root filesystem locations, and so forth. 5557and so forth. Contrast this behavior with cooked mode where Wic looks in the
5575Contrast this behavior with cooked mode where Wic looks in the Build 5558:term:`Build Directory` (e.g. ``tmp/deploy/images/``\ machine).
5576Directory (e.g. ``tmp/deploy/images/``\ machine).
5577 5559
5578The general form of the ``wic`` command in raw mode is:: 5560The general form of the ``wic`` command in raw mode is::
5579 5561
@@ -5626,11 +5608,11 @@ The general form of the ``wic`` command in raw mode is::
5626Cooked Mode 5608Cooked Mode
5627~~~~~~~~~~~ 5609~~~~~~~~~~~
5628 5610
5629Running Wic in cooked mode leverages off artifacts in the Build 5611Running Wic in cooked mode leverages off artifacts in the
5630Directory. In other words, you do not have to specify kernel or root 5612:term:`Build Directory`. In other words, you do not have to specify kernel or
5631filesystem locations as part of the command. All you need to provide is 5613root filesystem locations as part of the command. All you need to provide is
5632a kickstart file and the name of the image from which to use artifacts 5614a kickstart file and the name of the image from which to use artifacts
5633by using the "-e" option. Wic looks in the Build Directory (e.g. 5615by using the "-e" option. Wic looks in the :term:`Build Directory` (e.g.
5634``tmp/deploy/images/``\ machine) for artifacts. 5616``tmp/deploy/images/``\ machine) for artifacts.
5635 5617
5636The general form of the ``wic`` command using Cooked Mode is as follows:: 5618The general form of the ``wic`` command using Cooked Mode is as follows::
@@ -5878,9 +5860,9 @@ and kickstart file information.
5878 You should always verify the details provided in the output to make 5860 You should always verify the details provided in the output to make
5879 sure that the image was indeed created exactly as expected. 5861 sure that the image was indeed created exactly as expected.
5880 5862
5881Continuing with the example, you can now write the image from the Build 5863Continuing with the example, you can now write the image from the
5882Directory onto a USB stick, or whatever media for which you built your 5864:term:`Build Directory` onto a USB stick, or whatever media for which you
5883image, and boot from the media. You can write the image by using 5865built your image, and boot from the media. You can write the image by using
5884``bmaptool`` or ``dd``:: 5866``bmaptool`` or ``dd``::
5885 5867
5886 $ oe-run-native bmap-tools-native bmaptool copy mkefidisk-201804191017-sda.direct /dev/sdX 5868 $ oe-run-native bmap-tools-native bmaptool copy mkefidisk-201804191017-sda.direct /dev/sdX
@@ -6152,7 +6134,7 @@ any type of image. Use these steps to flash an image using Bmaptool:
6152 6134
61533. *Flash the Device:* Flash the device with the image by using Bmaptool 61353. *Flash the Device:* Flash the device with the image by using Bmaptool
6154 depending on your particular setup. The following commands assume the 6136 depending on your particular setup. The following commands assume the
6155 image resides in the Build Directory's ``deploy/images/`` area: 6137 image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
6156 6138
6157 - If you have write access to the media, use this command form:: 6139 - If you have write access to the media, use this command form::
6158 6140
@@ -6399,11 +6381,9 @@ layer. The following steps provide some more detail:
6399 variable from the ``local.conf`` file. The variables you use are not 6381 variable from the ``local.conf`` file. The variables you use are not
6400 limited to the list in the previous bulleted item. 6382 limited to the list in the previous bulleted item.
6401 6383
6402- *Point to Your distribution configuration file:* In your 6384- *Point to Your distribution configuration file:* In your ``local.conf``
6403 ``local.conf`` file in the :term:`Build Directory`, 6385 file in the :term:`Build Directory`, set your :term:`DISTRO` variable to
6404 set your 6386 point to your distribution's configuration file. For example, if your
6405 :term:`DISTRO` variable to point to
6406 your distribution's configuration file. For example, if your
6407 distribution's configuration file is named ``mydistro.conf``, then 6387 distribution's configuration file is named ``mydistro.conf``, then
6408 you point to it as follows:: 6388 you point to it as follows::
6409 6389
@@ -6438,7 +6418,7 @@ Creating a Custom Template Configuration Directory
6438If you are producing your own customized version of the build system for 6418If you are producing your own customized version of the build system for
6439use by other users, you might want to provide a custom build configuration 6419use by other users, you might want to provide a custom build configuration
6440that includes all the necessary settings and layers (i.e. ``local.conf`` and 6420that includes all the necessary settings and layers (i.e. ``local.conf`` and
6441``bblayers.conf`` that are created in a new build directory) and a custom 6421``bblayers.conf`` that are created in a new :term:`Build Directory`) and a custom
6442message that is shown when setting up the build. This can be done by 6422message that is shown when setting up the build. This can be done by
6443creating one or more template configuration directories in your 6423creating one or more template configuration directories in your
6444custom distribution layer. 6424custom distribution layer.
@@ -6452,7 +6432,7 @@ This can be done by using ``bitbake-layers save-build-conf``::
6452 You can try out the configuration with 6432 You can try out the configuration with
6453 TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1 6433 TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1
6454 6434
6455The above command takes the config files from the currently active build directory under ``conf``, 6435The above command takes the config files from the currently active :term:`Build Directory` under ``conf``,
6456replaces site-specific paths in ``bblayers.conf`` with ``##OECORE##``-relative paths, and copies 6436replaces site-specific paths in ``bblayers.conf`` with ``##OECORE##``-relative paths, and copies
6457the config files into a specified layer under a specified template name. 6437the config files into a specified layer under a specified template name.
6458 6438
@@ -6684,10 +6664,9 @@ generated are just "self consistent". The build system adds and removes
6684packages and there are no guarantees about upgrade paths but images will 6664packages and there are no guarantees about upgrade paths but images will
6685be consistent and correct with the latest changes. 6665be consistent and correct with the latest changes.
6686 6666
6687The simplest form for a PR Service is for a single host 6667The simplest form for a PR Service is for a single host development system
6688development system that builds the package feed (building system). For 6668that builds the package feed (building system). For this scenario, you can
6689this scenario, you can enable a local PR Service by setting 6669enable a local PR Service by setting :term:`PRSERV_HOST` in your
6690:term:`PRSERV_HOST` in your
6691``local.conf`` file in the :term:`Build Directory`:: 6670``local.conf`` file in the :term:`Build Directory`::
6692 6671
6693 PRSERV_HOST = "localhost:0" 6672 PRSERV_HOST = "localhost:0"
@@ -7043,7 +7022,7 @@ machine does not necessarily have to be the package server. The build
7043machine could push its artifacts to another machine that acts as the 7022machine could push its artifacts to another machine that acts as the
7044server (e.g. Internet-facing). In fact, doing so is advantageous for a 7023server (e.g. Internet-facing). In fact, doing so is advantageous for a
7045production environment as getting the packages away from the development 7024production environment as getting the packages away from the development
7046system's build directory prevents accidental overwrites. 7025system's :term:`Build Directory` prevents accidental overwrites.
7047 7026
7048A simple build that targets just one device produces more than one 7027A simple build that targets just one device produces more than one
7049package database. In other words, the packages produced by a build are 7028package database. In other words, the packages produced by a build are
@@ -7075,8 +7054,7 @@ to use. In your configuration, you use the
7075:term:`PACKAGE_CLASSES` 7054:term:`PACKAGE_CLASSES`
7076variable to specify the format: 7055variable to specify the format:
7077 7056
70781. Open the ``local.conf`` file inside your 70571. Open the ``local.conf`` file inside your :term:`Build Directory` (e.g.
7079 :term:`Build Directory` (e.g.
7080 ``poky/build/conf/local.conf``). 7058 ``poky/build/conf/local.conf``).
7081 7059
70822. Select the desired package format as follows:: 70602. Select the desired package format as follows::
@@ -7162,12 +7140,10 @@ environment, the setup is simple and straight forward. Should you want
7162to use a different server more suited for production (e.g. Apache 2, 7140to use a different server more suited for production (e.g. Apache 2,
7163Lighttpd, or Nginx), take the appropriate steps to do so. 7141Lighttpd, or Nginx), take the appropriate steps to do so.
7164 7142
7165From within the build directory where you have built an image based on 7143From within the :term:`Build Directory` where you have built an image based on
7166your packaging choice (i.e. the 7144your packaging choice (i.e. the :term:`PACKAGE_CLASSES` setting), simply start
7167:term:`PACKAGE_CLASSES` 7145the server. The following example assumes a :term:`Build Directory` of ``poky/build``
7168setting), simply start the server. The following example assumes a build 7146and a :term:`PACKAGE_CLASSES` setting of "package_rpm"::
7169directory of ``poky/build/tmp/deploy/rpm`` and a :term:`PACKAGE_CLASSES`
7170setting of "package_rpm"::
7171 7147
7172 $ cd poky/build/tmp/deploy/rpm 7148 $ cd poky/build/tmp/deploy/rpm
7173 $ python3 -m http.server 7149 $ python3 -m http.server
@@ -7439,11 +7415,9 @@ see the :yocto_wiki:`Ptest </Ptest>` wiki page.
7439Adding ptest to Your Build 7415Adding ptest to Your Build
7440~~~~~~~~~~~~~~~~~~~~~~~~~~ 7416~~~~~~~~~~~~~~~~~~~~~~~~~~
7441 7417
7442To add package testing to your build, add the 7418To add package testing to your build, add the :term:`DISTRO_FEATURES` and
7443:term:`DISTRO_FEATURES` and 7419:term:`EXTRA_IMAGE_FEATURES` variables to your ``local.conf`` file, which
7444:term:`EXTRA_IMAGE_FEATURES` 7420is found in the :term:`Build Directory`::
7445variables to your ``local.conf`` file, which is found in the
7446:term:`Build Directory`::
7447 7421
7448 DISTRO_FEATURES:append = " ptest" 7422 DISTRO_FEATURES:append = " ptest"
7449 EXTRA_IMAGE_FEATURES += "ptest-pkgs" 7423 EXTRA_IMAGE_FEATURES += "ptest-pkgs"
@@ -8093,7 +8067,7 @@ image's recipe file via the :term:`IMAGE_FEATURES` variable::
8093 IMAGE_FEATURES += "read-only-rootfs" 8067 IMAGE_FEATURES += "read-only-rootfs"
8094 8068
8095As an alternative, you can add the same feature 8069As an alternative, you can add the same feature
8096from within your build directory's ``local.conf`` file with the 8070from within your :term:`Build Directory`'s ``local.conf`` file with the
8097associated :term:`EXTRA_IMAGE_FEATURES` variable, as in:: 8071associated :term:`EXTRA_IMAGE_FEATURES` variable, as in::
8098 8072
8099 EXTRA_IMAGE_FEATURES = "read-only-rootfs" 8073 EXTRA_IMAGE_FEATURES = "read-only-rootfs"
@@ -8188,9 +8162,8 @@ Enabling and Disabling Build History
8188------------------------------------ 8162------------------------------------
8189 8163
8190Build history is disabled by default. To enable it, add the following 8164Build history is disabled by default. To enable it, add the following
8191:term:`INHERIT` statement and set the 8165:term:`INHERIT` statement and set the :term:`BUILDHISTORY_COMMIT` variable to
8192:term:`BUILDHISTORY_COMMIT` 8166"1" at the end of your ``conf/local.conf`` file found in the
8193variable to "1" at the end of your ``conf/local.conf`` file found in the
8194:term:`Build Directory`:: 8167:term:`Build Directory`::
8195 8168
8196 INHERIT += "buildhistory" 8169 INHERIT += "buildhistory"
@@ -8213,10 +8186,8 @@ your ``conf/local.conf`` file.
8213Understanding What the Build History Contains 8186Understanding What the Build History Contains
8214--------------------------------------------- 8187---------------------------------------------
8215 8188
8216Build history information is kept in 8189Build history information is kept in ``${``\ :term:`TOPDIR`\ ``}/buildhistory``
8217``${``\ :term:`TOPDIR`\ ``}/buildhistory`` 8190in the :term:`Build Directory` as defined by the :term:`BUILDHISTORY_DIR`
8218in the Build Directory as defined by the
8219:term:`BUILDHISTORY_DIR`
8220variable. Here is an example abbreviated listing: 8191variable. Here is an example abbreviated listing:
8221 8192
8222.. image:: figures/buildhistory.png 8193.. image:: figures/buildhistory.png
@@ -8883,11 +8854,9 @@ Running Tests
8883 8854
8884You can start the tests automatically or manually: 8855You can start the tests automatically or manually:
8885 8856
8886- *Automatically running tests:* To run the tests automatically after 8857- *Automatically running tests:* To run the tests automatically after the
8887 the OpenEmbedded build system successfully creates an image, first 8858 OpenEmbedded build system successfully creates an image, first set the
8888 set the 8859 :term:`TESTIMAGE_AUTO` variable to "1" in your ``local.conf`` file in the
8889 :term:`TESTIMAGE_AUTO`
8890 variable to "1" in your ``local.conf`` file in the
8891 :term:`Build Directory`:: 8860 :term:`Build Directory`::
8892 8861
8893 TESTIMAGE_AUTO = "1" 8862 TESTIMAGE_AUTO = "1"
@@ -8982,10 +8951,9 @@ following BitBake command form::
8982 8951
8983 $ bitbake image -c testexport 8952 $ bitbake image -c testexport
8984 8953
8985Exporting the tests places them in the 8954Exporting the tests places them in the :term:`Build Directory` in
8986:term:`Build Directory` in 8955``tmp/testexport/``\ image, which is controlled by the :term:`TEST_EXPORT_DIR`
8987``tmp/testexport/``\ image, which is controlled by the 8956variable.
8988:term:`TEST_EXPORT_DIR` variable.
8989 8957
8990You can now run the tests outside of the build environment:: 8958You can now run the tests outside of the build environment::
8991 8959
@@ -9212,9 +9180,8 @@ section:
9212 9180
9213- ":ref:`dev-manual/common-tasks:viewing task variable dependencies`" describes 9181- ":ref:`dev-manual/common-tasks:viewing task variable dependencies`" describes
9214 how to use the ``bitbake-dumpsig`` command in conjunction with key 9182 how to use the ``bitbake-dumpsig`` command in conjunction with key
9215 subdirectories in the 9183 subdirectories in the :term:`Build Directory` to determine variable
9216 :term:`Build Directory` to determine 9184 dependencies.
9217 variable dependencies.
9218 9185
9219- ":ref:`dev-manual/common-tasks:running specific tasks`" describes 9186- ":ref:`dev-manual/common-tasks:running specific tasks`" describes
9220 how to use several BitBake options (e.g. ``-c``, ``-C``, and ``-f``) 9187 how to use several BitBake options (e.g. ``-c``, ``-C``, and ``-f``)
@@ -10363,13 +10330,11 @@ Here are some other tips that you might find useful:
10363 is also possible to switch out of the splashscreen by switching the 10330 is also possible to switch out of the splashscreen by switching the
10364 virtual console (e.g. Fn+Left or Fn+Right on a Zaurus). 10331 virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
10365 10332
10366- Removing :term:`TMPDIR` (usually 10333- Removing :term:`TMPDIR` (usually ``tmp/``, within the
10367 ``tmp/``, within the 10334 :term:`Build Directory`) can often fix temporary build issues. Removing
10368 :term:`Build Directory`) can often fix 10335 :term:`TMPDIR` is usually a relatively cheap operation, because task output
10369 temporary build issues. Removing :term:`TMPDIR` is usually a relatively 10336 will be cached in :term:`SSTATE_DIR` (usually ``sstate-cache/``, which is
10370 cheap operation, because task output will be cached in 10337 also in the :term:`Build Directory`).
10371 :term:`SSTATE_DIR` (usually
10372 ``sstate-cache/``, which is also in the Build Directory).
10373 10338
10374 .. note:: 10339 .. note::
10375 10340
@@ -10383,8 +10348,8 @@ Here are some other tips that you might find useful:
10383 10348
10384 Using GNU Grep, you can use the following shell function to 10349 Using GNU Grep, you can use the following shell function to
10385 recursively search through common recipe-related files, skipping 10350 recursively search through common recipe-related files, skipping
10386 binary files, ``.git`` directories, and the Build Directory (assuming 10351 binary files, ``.git`` directories, and the :term:`Build Directory`
10387 its name starts with "build"):: 10352 (assuming its name starts with "build")::
10388 10353
10389 g() { 10354 g() {
10390 grep -Ir \ 10355 grep -Ir \
@@ -11282,8 +11247,7 @@ of compliance in mind.
11282 11247
11283One way of doing this (but certainly not the only way) is to release 11248One way of doing this (but certainly not the only way) is to release
11284just the source as a tarball. You can do this by adding the following to 11249just the source as a tarball. You can do this by adding the following to
11285the ``local.conf`` file found in the 11250the ``local.conf`` file found in the :term:`Build Directory`::
11286:term:`Build Directory`::
11287 11251
11288 INHERIT += "archiver" 11252 INHERIT += "archiver"
11289 ARCHIVER_MODE[src] = "original" 11253 ARCHIVER_MODE[src] = "original"
@@ -11442,9 +11406,9 @@ this function, you have to follow the following steps:
11442 11406
114433. Meta-spdxscanner provides several methods within the bbclass to create spdx files. 114073. Meta-spdxscanner provides several methods within the bbclass to create spdx files.
11444 Please choose one that you want to use and enable the spdx task. You have to 11408 Please choose one that you want to use and enable the spdx task. You have to
11445 add some config options in ``local.conf`` file in your :term:`Build 11409 add some config options in ``local.conf`` file in your :term:`Build Directory`.
11446 Directory`. Here is an example showing how to generate spdx files 11410 Here is an example showing how to generate spdx files during BitBake using the
11447 during BitBake using the fossology-python.bbclass:: 11411 fossology-python.bbclass::
11448 11412
11449 # Select fossology-python.bbclass. 11413 # Select fossology-python.bbclass.
11450 INHERIT += "fossology-python" 11414 INHERIT += "fossology-python"
@@ -11737,12 +11701,9 @@ Enabling and Using the Tool
11737--------------------------- 11701---------------------------
11738 11702
11739By default, the error reporting tool is disabled. You can enable it by 11703By default, the error reporting tool is disabled. You can enable it by
11740inheriting the 11704inheriting the :ref:`report-error <ref-classes-report-error>`
11741:ref:`report-error <ref-classes-report-error>`
11742class by adding the following statement to the end of your 11705class by adding the following statement to the end of your
11743``local.conf`` file in your 11706``local.conf`` file in your :term:`Build Directory`::
11744:term:`Build Directory`.
11745::
11746 11707
11747 INHERIT += "report-error" 11708 INHERIT += "report-error"
11748 11709