summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/tasks.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/ref-manual/tasks.rst')
-rw-r--r--documentation/ref-manual/tasks.rst282
1 files changed, 130 insertions, 152 deletions
diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst
index 9fe1c296aa..90f70c1ac1 100644
--- a/documentation/ref-manual/tasks.rst
+++ b/documentation/ref-manual/tasks.rst
@@ -14,8 +14,8 @@ Normal Recipe Build Tasks
14 14
15The following sections describe normal tasks associated with building a 15The following sections describe normal tasks associated with building a
16recipe. For more information on tasks and dependencies, see the 16recipe. For more information on tasks and dependencies, see the
17":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and 17":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
18":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the 18":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
19BitBake User Manual. 19BitBake User Manual.
20 20
21.. _ref-tasks-build: 21.. _ref-tasks-build:
@@ -36,7 +36,7 @@ directory set to ``${``\ :term:`B`\ ``}``.
36 36
37The default behavior of this task is to run the ``oe_runmake`` function 37The default behavior of this task is to run the ``oe_runmake`` function
38if a makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found. 38if a makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found.
39If no such file is found, the ``do_compile`` task does nothing. 39If no such file is found, the :ref:`ref-tasks-compile` task does nothing.
40 40
41.. _ref-tasks-compile_ptest_base: 41.. _ref-tasks-compile_ptest_base:
42 42
@@ -57,8 +57,8 @@ the current working directory set to ``${``\ :term:`B`\ ``}``.
57The default behavior of this task is to run ``oe_runmake clean`` if a 57The default behavior of this task is to run ``oe_runmake clean`` if a
58makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and 58makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and
59:term:`CLEANBROKEN` is not set to "1". If no such 59:term:`CLEANBROKEN` is not set to "1". If no such
60file is found or the ``CLEANBROKEN`` variable is set to "1", the 60file is found or the :term:`CLEANBROKEN` variable is set to "1", the
61``do_configure`` task does nothing. 61:ref:`ref-tasks-configure` task does nothing.
62 62
63.. _ref-tasks-configure_ptest_base: 63.. _ref-tasks-configure_ptest_base:
64 64
@@ -78,10 +78,10 @@ task runs with the current working directory set to
78``${``\ :term:`B`\ ``}``. 78``${``\ :term:`B`\ ``}``.
79 79
80Recipes implementing this task should inherit the 80Recipes implementing this task should inherit the
81:ref:`deploy <ref-classes-deploy>` class and should write the output 81:ref:`ref-classes-deploy` class and should write the output
82to ``${``\ :term:`DEPLOYDIR`\ ``}``, which is not to be 82to ``${``\ :term:`DEPLOYDIR`\ ``}``, which is not to be
83confused with ``${DEPLOY_DIR}``. The ``deploy`` class sets up 83confused with ``${DEPLOY_DIR}``. The :ref:`ref-classes-deploy` class sets up
84``do_deploy`` as a shared state (sstate) task that can be accelerated 84:ref:`ref-tasks-deploy` as a shared state (sstate) task that can be accelerated
85through sstate use. The sstate mechanism takes care of copying the 85through sstate use. The sstate mechanism takes care of copying the
86output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``. 86output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``.
87 87
@@ -90,21 +90,19 @@ output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``.
90 Do not write the output directly to ``${DEPLOY_DIR_IMAGE}``, as this causes 90 Do not write the output directly to ``${DEPLOY_DIR_IMAGE}``, as this causes
91 the sstate mechanism to malfunction. 91 the sstate mechanism to malfunction.
92 92
93The ``do_deploy`` task is not added as a task by default and 93The :ref:`ref-tasks-deploy` task is not added as a task by default and
94consequently needs to be added manually. If you want the task to run 94consequently needs to be added manually. If you want the task to run
95after :ref:`ref-tasks-compile`, you can add it by doing 95after :ref:`ref-tasks-compile`, you can add it by doing
96the following: 96the following::
97::
98 97
99 addtask deploy after do_compile 98 addtask deploy after do_compile
100 99
101Adding ``do_deploy`` after other tasks works the same way. 100Adding :ref:`ref-tasks-deploy` after other tasks works the same way.
102 101
103.. note:: 102.. note::
104 103
105 You do not need to add ``before do_build`` to the ``addtask`` command 104 You do not need to add ``before do_build`` to the ``addtask`` command
106 (though it is harmless), because the ``base`` class contains the following: 105 (though it is harmless), because the :ref:`ref-classes-base` class contains the following::
107 ::
108 106
109 do_build[recrdeptask] += "do_deploy" 107 do_build[recrdeptask] += "do_deploy"
110 108
@@ -112,7 +110,7 @@ Adding ``do_deploy`` after other tasks works the same way.
112 See the ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" 110 See the ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`"
113 section in the BitBake User Manual for more information. 111 section in the BitBake User Manual for more information.
114 112
115If the ``do_deploy`` task re-executes, any previous output is removed 113If the :ref:`ref-tasks-deploy` task re-executes, any previous output is removed
116(i.e. "cleaned"). 114(i.e. "cleaned").
117 115
118.. _ref-tasks-fetch: 116.. _ref-tasks-fetch:
@@ -120,9 +118,9 @@ If the ``do_deploy`` task re-executes, any previous output is removed
120``do_fetch`` 118``do_fetch``
121------------ 119------------
122 120
123Fetches the source code. This task uses the 121Fetches the source code. This task uses the :term:`SRC_URI` variable and the
124:term:`SRC_URI` variable and the argument's prefix to 122argument's prefix to determine the correct
125determine the correct :ref:`fetcher <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` 123:ref:`fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
126module. 124module.
127 125
128.. _ref-tasks-image: 126.. _ref-tasks-image:
@@ -130,15 +128,15 @@ module.
130``do_image`` 128``do_image``
131------------ 129------------
132 130
133Starts the image generation process. The ``do_image`` task runs after 131Starts the image generation process. The :ref:`ref-tasks-image` task runs after
134the OpenEmbedded build system has run the 132the OpenEmbedded build system has run the
135:ref:`ref-tasks-rootfs` task during which packages are 133:ref:`ref-tasks-rootfs` task during which packages are
136identified for installation into the image and the root filesystem is 134identified for installation into the image and the root filesystem is
137created, complete with post-processing. 135created, complete with post-processing.
138 136
139The ``do_image`` task performs pre-processing on the image through the 137The :ref:`ref-tasks-image` task performs pre-processing on the image through the
140:term:`IMAGE_PREPROCESS_COMMAND` and 138:term:`IMAGE_PREPROCESS_COMMAND` and
141dynamically generates supporting ``do_image_*`` tasks as needed. 139dynamically generates supporting :ref:`do_image_* <ref-tasks-image>` tasks as needed.
142 140
143For more information on image creation, see the ":ref:`overview-manual/concepts:image generation`" 141For more information on image creation, see the ":ref:`overview-manual/concepts:image generation`"
144section in the Yocto Project Overview and Concepts Manual. 142section in the Yocto Project Overview and Concepts Manual.
@@ -148,13 +146,13 @@ section in the Yocto Project Overview and Concepts Manual.
148``do_image_complete`` 146``do_image_complete``
149--------------------- 147---------------------
150 148
151Completes the image generation process. The ``do_image_complete`` task 149Completes the image generation process. The :ref:`do_image_complete <ref-tasks-image-complete>` task
152runs after the OpenEmbedded build system has run the 150runs after the OpenEmbedded build system has run the
153:ref:`ref-tasks-image` task during which image 151:ref:`ref-tasks-image` task during which image
154pre-processing occurs and through dynamically generated ``do_image_*`` 152pre-processing occurs and through dynamically generated :ref:`do_image_* <ref-tasks-image>`
155tasks the image is constructed. 153tasks the image is constructed.
156 154
157The ``do_image_complete`` task performs post-processing on the image 155The :ref:`do_image_complete <ref-tasks-image-complete>` task performs post-processing on the image
158through the 156through the
159:term:`IMAGE_POSTPROCESS_COMMAND`. 157:term:`IMAGE_POSTPROCESS_COMMAND`.
160 158
@@ -170,9 +168,9 @@ section in the Yocto Project Overview and Concepts Manual.
170Copies files that are to be packaged into the holding area 168Copies files that are to be packaged into the holding area
171``${``\ :term:`D`\ ``}``. This task runs with the current 169``${``\ :term:`D`\ ``}``. This task runs with the current
172working directory set to ``${``\ :term:`B`\ ``}``, which is the 170working directory set to ``${``\ :term:`B`\ ``}``, which is the
173compilation directory. The ``do_install`` task, as well as other tasks 171compilation directory. The :ref:`ref-tasks-install` task, as well as other tasks
174that either directly or indirectly depend on the installed files (e.g. 172that either directly or indirectly depend on the installed files (e.g.
175:ref:`ref-tasks-package`, ``do_package_write_*``, and 173:ref:`ref-tasks-package`, :ref:`do_package_write_* <ref-tasks-package_write_deb>`, and
176:ref:`ref-tasks-rootfs`), run under 174:ref:`ref-tasks-rootfs`), run under
177:ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. 175:ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
178 176
@@ -189,11 +187,11 @@ that either directly or indirectly depend on the installed files (e.g.
189 187
190 - The ``install`` utility. This utility is the preferred method. 188 - The ``install`` utility. This utility is the preferred method.
191 189
192 - The ``cp`` command with the "--no-preserve=ownership" option. 190 - The ``cp`` command with the ``--no-preserve=ownership`` option.
193 191
194 - The ``tar`` command with the "--no-same-owner" option. See the 192 - The ``tar`` command with the ``--no-same-owner`` option. See the
195 ``bin_package.bbclass`` file in the ``meta/classes`` directory of 193 ``bin_package.bbclass`` file in the ``meta/classes-recipe``
196 the :term:`Source Directory` for an example. 194 subdirectory of the :term:`Source Directory` for an example.
197 195
198.. _ref-tasks-install_ptest_base: 196.. _ref-tasks-install_ptest_base:
199 197
@@ -214,7 +212,7 @@ based on available packages and files. This task makes use of the
214:term:`PACKAGES` and :term:`FILES` 212:term:`PACKAGES` and :term:`FILES`
215variables. 213variables.
216 214
217The ``do_package`` task, in conjunction with the 215The :ref:`ref-tasks-package` task, in conjunction with the
218:ref:`ref-tasks-packagedata` task, also saves some 216:ref:`ref-tasks-packagedata` task, also saves some
219important package metadata. For additional information, see the 217important package metadata. For additional information, see the
220:term:`PKGDESTWORK` variable and the 218:term:`PKGDESTWORK` variable and the
@@ -227,7 +225,7 @@ section in the Yocto Project Overview and Concepts Manual.
227----------------- 225-----------------
228 226
229Runs QA checks on packaged files. For more information on these checks, 227Runs QA checks on packaged files. For more information on these checks,
230see the :ref:`insane <ref-classes-insane>` class. 228see the :doc:`/ref-manual/qa-checks` document.
231 229
232.. _ref-tasks-package_write_deb: 230.. _ref-tasks-package_write_deb:
233 231
@@ -262,17 +260,6 @@ the package feeds area. For more information, see the
262":ref:`overview-manual/concepts:package feeds`" section in 260":ref:`overview-manual/concepts:package feeds`" section in
263the Yocto Project Overview and Concepts Manual. 261the Yocto Project Overview and Concepts Manual.
264 262
265.. _ref-tasks-package_write_tar:
266
267``do_package_write_tar``
268------------------------
269
270Creates tarballs and places them in the
271``${``\ :term:`DEPLOY_DIR_TAR`\ ``}`` directory in
272the package feeds area. For more information, see the
273":ref:`overview-manual/concepts:package feeds`" section in
274the Yocto Project Overview and Concepts Manual.
275
276.. _ref-tasks-packagedata: 263.. _ref-tasks-packagedata:
277 264
278``do_packagedata`` 265``do_packagedata``
@@ -302,56 +289,50 @@ Patch files, by default, are ``*.patch`` and ``*.diff`` files created
302and kept in a subdirectory of the directory holding the recipe file. For 289and kept in a subdirectory of the directory holding the recipe file. For
303example, consider the 290example, consider the
304:yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>` 291:yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>`
305recipe from the OE-Core layer (i.e. ``poky/meta``): 292recipe from the OE-Core layer (i.e. ``poky/meta``)::
306::
307 293
308 poky/meta/recipes-connectivity/bluez5 294 poky/meta/recipes-connectivity/bluez5
309 295
310This recipe has two patch files located here: 296This recipe has two patch files located here::
311::
312 297
313 poky/meta/recipes-connectivity/bluez5/bluez5 298 poky/meta/recipes-connectivity/bluez5/bluez5
314 299
315In the ``bluez5`` recipe, the ``SRC_URI`` statements point to the source 300In the ``bluez5`` recipe, the :term:`SRC_URI` statements point to the source
316and patch files needed to build the package. 301and patch files needed to build the package.
317 302
318.. note:: 303.. note::
319 304
320 In the case for the ``bluez5_5.48.bb`` recipe, the ``SRC_URI`` statements 305 In the case for the ``bluez5_5.48.bb`` recipe, the :term:`SRC_URI` statements
321 are from an include file ``bluez5.inc``. 306 are from an include file ``bluez5.inc``.
322 307
323As mentioned earlier, the build system treats files whose file types are 308As mentioned earlier, the build system treats files whose file types are
324``.patch`` and ``.diff`` as patch files. However, you can use the 309``.patch`` and ``.diff`` as patch files. However, you can use the
325"apply=yes" parameter with the ``SRC_URI`` statement to indicate any 310"apply=yes" parameter with the :term:`SRC_URI` statement to indicate any
326file as a patch file: 311file as a patch file::
327::
328 312
329 SRC_URI = " \ 313 SRC_URI = " \
330 git://path_to_repo/some_package \ 314 git://path_to_repo/some_package \
331 file://file;apply=yes \ 315 file://file;apply=yes \
332 " 316 "
333 317
334Conversely, if you have a directory full of patch files and you want to 318Conversely, if you have a file whose file type is ``.patch`` or ``.diff``
335exclude some so that the ``do_patch`` task does not apply them during 319and you want to exclude it so that the :ref:`ref-tasks-patch` task does not apply
336the patch phase, you can use the "apply=no" parameter with the 320it during the patch phase, you can use the "apply=no" parameter with the
337``SRC_URI`` statement: 321:term:`SRC_URI` statement::
338::
339 322
340 SRC_URI = " \ 323 SRC_URI = " \
341 git://path_to_repo/some_package \ 324 git://path_to_repo/some_package \
342 file://path_to_lots_of_patch_files \ 325 file://file1.patch \
343 file://path_to_lots_of_patch_files/patch_file5;apply=no \ 326 file://file2.patch;apply=no \
344 " 327 "
345 328
346In the 329In the previous example ``file1.patch`` would be applied as a patch by default
347previous example, assuming all the files in the directory holding the 330while ``file2.patch`` would not be applied.
348patch files end with either ``.patch`` or ``.diff``, every file would be
349applied as a patch by default except for the ``patch_file5`` patch.
350 331
351You can find out more about the patching process in the 332You can find out more about the patching process in the
352":ref:`overview-manual/concepts:patching`" section in 333":ref:`overview-manual/concepts:patching`" section in
353the Yocto Project Overview and Concepts Manual and the 334the Yocto Project Overview and Concepts Manual and the
354":ref:`dev-manual/common-tasks:patching code`" section in the 335":ref:`dev-manual/new-recipe:patching code`" section in the
355Yocto Project Development Tasks Manual. 336Yocto Project Development Tasks Manual.
356 337
357.. _ref-tasks-populate_lic: 338.. _ref-tasks-populate_lic:
@@ -377,7 +358,7 @@ information.
377``do_populate_sdk_ext`` 358``do_populate_sdk_ext``
378----------------------- 359-----------------------
379 360
380Creates the file and directory structure for an installable extensible 361Creates the file and directory structure for an installable extensible
381SDK (eSDK). See the ":ref:`overview-manual/concepts:sdk generation`" 362SDK (eSDK). See the ":ref:`overview-manual/concepts:sdk generation`"
382section in the Yocto Project Overview and Concepts Manual for more 363section in the Yocto Project Overview and Concepts Manual for more
383information. 364information.
@@ -400,7 +381,7 @@ For information on what directories are copied by default, see the
400these variables inside your recipe if you need to make additional (or 381these variables inside your recipe if you need to make additional (or
401fewer) directories available to other recipes at build time. 382fewer) directories available to other recipes at build time.
402 383
403The ``do_populate_sysroot`` task is a shared state (sstate) task, which 384The :ref:`ref-tasks-populate_sysroot` task is a shared state (sstate) task, which
404means that the task can be accelerated through sstate use. Realize also 385means that the task can be accelerated through sstate use. Realize also
405that if the task is re-executed, any previous output is removed (i.e. 386that if the task is re-executed, any previous output is removed (i.e.
406"cleaned"). 387"cleaned").
@@ -414,7 +395,18 @@ Installs the files into the individual recipe specific sysroots (i.e.
414``recipe-sysroot`` and ``recipe-sysroot-native`` under 395``recipe-sysroot`` and ``recipe-sysroot-native`` under
415``${``\ :term:`WORKDIR`\ ``}`` based upon the 396``${``\ :term:`WORKDIR`\ ``}`` based upon the
416dependencies specified by :term:`DEPENDS`). See the 397dependencies specified by :term:`DEPENDS`). See the
417":ref:`staging <ref-classes-staging>`" class for more information. 398":ref:`ref-classes-staging`" class for more information.
399
400.. _ref-tasks-recipe-qa:
401
402``do_recipe_qa``
403----------------
404
405Performs QA check on recipes that can operate entirely from recipe metadata and
406do not need any of the build artefacts or source code.
407
408The list of QA checks that this tasks defines are documented in
409:doc:`/ref-manual/qa-checks`.
418 410
419.. _ref-tasks-rm_work: 411.. _ref-tasks-rm_work:
420 412
@@ -423,7 +415,7 @@ dependencies specified by :term:`DEPENDS`). See the
423 415
424Removes work files after the OpenEmbedded build system has finished with 416Removes work files after the OpenEmbedded build system has finished with
425them. You can learn more by looking at the 417them. You can learn more by looking at the
426":ref:`rm_work.bbclass <ref-classes-rm-work>`" section. 418":ref:`ref-classes-rm-work`" section.
427 419
428.. _ref-tasks-unpack: 420.. _ref-tasks-unpack:
429 421
@@ -431,12 +423,10 @@ them. You can learn more by looking at the
431------------- 423-------------
432 424
433Unpacks the source code into a working directory pointed to by 425Unpacks the source code into a working directory pointed to by
434``${``\ :term:`WORKDIR`\ ``}``. The :term:`S` 426``${``\ :term:`UNPACKDIR`\ ``}``.
435variable also plays a role in where unpacked source files ultimately 427For more information on how source files are unpacked, see the
436reside. For more information on how source files are unpacked, see the
437":ref:`overview-manual/concepts:source fetching`" 428":ref:`overview-manual/concepts:source fetching`"
438section in the Yocto Project Overview and Concepts Manual and also see 429section in the Yocto Project Overview and Concepts Manual.
439the ``WORKDIR`` and ``S`` variable descriptions.
440 430
441Manually Called Tasks 431Manually Called Tasks
442===================== 432=====================
@@ -444,39 +434,6 @@ Manually Called Tasks
444These tasks are typically manually triggered (e.g. by using the 434These tasks are typically manually triggered (e.g. by using the
445``bitbake -c`` command-line option): 435``bitbake -c`` command-line option):
446 436
447.. _ref-tasks-checkpkg:
448
449``do_checkpkg``
450---------------
451
452Provides information about the recipe including its upstream version and
453status. The upstream version and status reveals whether or not a version
454of the recipe exists upstream and a status of not updated, updated, or
455unknown.
456
457To check the upstream version and status of a recipe, use the following
458devtool commands:
459::
460
461 $ devtool latest-version
462 $ devtool check-upgrade-status
463
464See the ":ref:`ref-manual/devtool-reference:\`\`devtool\`\` quick reference`"
465chapter for more information on
466``devtool``. See the ":ref:`devtool-checking-on-the-upgrade-status-of-a-recipe`"
467section for information on checking the upgrade status of a recipe.
468
469To build the ``checkpkg`` task, use the ``bitbake`` command with the
470"-c" option and task name:
471::
472
473 $ bitbake core-image-minimal -c checkpkg
474
475By default, the results are stored in :term:`$LOG_DIR <LOG_DIR>` (e.g.
476``$BUILD_DIR/tmp/log``).
477
478.. _ref-tasks-checkuri:
479
480``do_checkuri`` 437``do_checkuri``
481--------------- 438---------------
482 439
@@ -488,14 +445,13 @@ Validates the :term:`SRC_URI` value.
488------------ 445------------
489 446
490Removes all output files for a target from the 447Removes all output files for a target from the
491:ref:`ref-tasks-unpack` task forward (i.e. ``do_unpack``, 448:ref:`ref-tasks-unpack` task forward (i.e. :ref:`ref-tasks-unpack`,
492:ref:`ref-tasks-configure`, 449:ref:`ref-tasks-configure`,
493:ref:`ref-tasks-compile`, 450:ref:`ref-tasks-compile`,
494:ref:`ref-tasks-install`, and 451:ref:`ref-tasks-install`, and
495:ref:`ref-tasks-package`). 452:ref:`ref-tasks-package`).
496 453
497You can run this task using BitBake as follows: 454You can run this task using BitBake as follows::
498::
499 455
500 $ bitbake -c clean recipe 456 $ bitbake -c clean recipe
501 457
@@ -515,18 +471,37 @@ use the :ref:`ref-tasks-cleansstate` task instead
515Removes all output files, shared state 471Removes all output files, shared state
516(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache, and 472(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache, and
517downloaded source files for a target (i.e. the contents of 473downloaded source files for a target (i.e. the contents of
518:term:`DL_DIR`). Essentially, the ``do_cleanall`` task is 474:term:`DL_DIR`). Essentially, the :ref:`ref-tasks-cleanall` task is
519identical to the :ref:`ref-tasks-cleansstate` task 475identical to the :ref:`ref-tasks-cleansstate` task
520with the added removal of downloaded source files. 476with the added removal of downloaded source files.
521 477
522You can run this task using BitBake as follows: 478You can run this task using BitBake as follows::
523::
524 479
525 $ bitbake -c cleanall recipe 480 $ bitbake -c cleanall recipe
526 481
527Typically, you would not normally use the ``cleanall`` task. Do so only 482You should never use the :ref:`ref-tasks-cleanall` task in a normal
528if you want to start fresh with the :ref:`ref-tasks-fetch` 483scenario. If you want to start fresh with the :ref:`ref-tasks-fetch` task,
529task. 484use instead::
485
486 $ bitbake -f -c fetch recipe
487
488.. note::
489
490 The reason to prefer ``bitbake -f -c fetch`` is that the
491 :ref:`ref-tasks-cleanall` task would break in some cases, such as::
492
493 $ bitbake -c fetch recipe
494 $ bitbake -c cleanall recipe-native
495 $ bitbake -c unpack recipe
496
497 because after step 1 there is a stamp file for the
498 :ref:`ref-tasks-fetch` task of ``recipe``, and it won't be removed at
499 step 2 because step 2 uses a different work directory. So the unpack task
500 at step 3 will try to extract the downloaded archive and fail as it has
501 been deleted in step 2.
502
503 Note that this also applies to BitBake from concurrent processes when a
504 shared download directory (:term:`DL_DIR`) is setup.
530 505
531.. _ref-tasks-cleansstate: 506.. _ref-tasks-cleansstate:
532 507
@@ -535,41 +510,51 @@ task.
535 510
536Removes all output files and shared state 511Removes all output files and shared state
537(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache for a 512(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache for a
538target. Essentially, the ``do_cleansstate`` task is identical to the 513target. Essentially, the :ref:`ref-tasks-cleansstate` task is identical to the
539:ref:`ref-tasks-clean` task with the added removal of 514:ref:`ref-tasks-clean` task with the added removal of
540shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`) 515shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`)
541cache. 516cache.
542 517
543You can run this task using BitBake as follows: 518You can run this task using BitBake as follows::
544::
545 519
546 $ bitbake -c cleansstate recipe 520 $ bitbake -c cleansstate recipe
547 521
548When you run the ``do_cleansstate`` task, the OpenEmbedded build system 522When you run the :ref:`ref-tasks-cleansstate` task, the OpenEmbedded build system
549no longer uses any sstate. Consequently, building the recipe from 523no longer uses any sstate. Consequently, building the recipe from
550scratch is guaranteed. 524scratch is guaranteed.
551 525
552.. note:: 526.. note::
553 527
554 The ``do_cleansstate`` task cannot remove sstate from a remote sstate 528 Using :ref:`ref-tasks-cleansstate` with a shared :term:`SSTATE_DIR` is
529 not recommended because it could trigger an error during the build of a
530 separate BitBake instance. This is because the builds check sstate "up
531 front" but download the files later, so it if is deleted in the
532 meantime, it will cause an error but not a total failure as it will
533 rebuild it.
534
535 The reliable and preferred way to force a new build is to use ``bitbake
536 -f`` instead.
537
538.. note::
539
540 The :ref:`ref-tasks-cleansstate` task cannot remove sstate from a remote sstate
555 mirror. If you need to build a target from scratch using remote mirrors, use 541 mirror. If you need to build a target from scratch using remote mirrors, use
556 the "-f" option as follows: 542 the "-f" option as follows::
557 ::
558 543
559 $ bitbake -f -c do_cleansstate target 544 $ bitbake -f -c do_cleansstate target
560 545
561 546
562.. _ref-tasks-devpyshell: 547.. _ref-tasks-pydevshell:
563 548
564``do_devpyshell`` 549``do_pydevshell``
565----------------- 550-----------------
566 551
567Starts a shell in which an interactive Python interpreter allows you to 552Starts a shell in which an interactive Python interpreter allows you to
568interact with the BitBake build environment. From within this shell, you 553interact with the BitBake build environment. From within this shell, you
569can directly examine and set bits from the data store and execute 554can directly examine and set bits from the data store and execute
570functions as if within the BitBake environment. See the ":ref:`dev-manual/common-tasks:using a development python shell`" section in 555functions as if within the BitBake environment. See the ":ref:`dev-manual/python-development-shell:using a Python development shell`" section in
571the Yocto Project Development Tasks Manual for more information about 556the Yocto Project Development Tasks Manual for more information about
572using ``devpyshell``. 557using ``pydevshell``.
573 558
574.. _ref-tasks-devshell: 559.. _ref-tasks-devshell:
575 560
@@ -577,7 +562,7 @@ using ``devpyshell``.
577--------------- 562---------------
578 563
579Starts a shell whose environment is set up for development, debugging, 564Starts a shell whose environment is set up for development, debugging,
580or both. See the ":ref:`dev-manual/common-tasks:using a development shell`" section in the 565or both. See the ":ref:`dev-manual/development-shell:using a development shell`" section in the
581Yocto Project Development Tasks Manual for more information about using 566Yocto Project Development Tasks Manual for more information about using
582``devshell``. 567``devshell``.
583 568
@@ -620,10 +605,8 @@ information on live image types.
620``do_bundle_initramfs`` 605``do_bundle_initramfs``
621----------------------- 606-----------------------
622 607
623Combines an initial RAM disk (initramfs) image and kernel together to 608Combines an :term:`Initramfs` image and kernel together to
624form a single image. The 609form a single image.
625:term:`CONFIG_INITRAMFS_SOURCE` variable
626has some more information about these types of images.
627 610
628.. _ref-tasks-rootfs: 611.. _ref-tasks-rootfs:
629 612
@@ -642,8 +625,8 @@ information on how the root filesystem is created.
642 625
643Boots an image and performs runtime tests within the image. For 626Boots an image and performs runtime tests within the image. For
644information on automatically testing images, see the 627information on automatically testing images, see the
645":ref:`dev-manual/common-tasks:performing automated runtime testing`" 628":ref:`test-manual/runtime-testing:performing automated runtime testing`"
646section in the Yocto Project Development Tasks Manual. 629section in the Yocto Project Test Environment Manual.
647 630
648.. _ref-tasks-testimage_auto: 631.. _ref-tasks-testimage_auto:
649 632
@@ -655,8 +638,8 @@ after it has been built. This task is enabled when you set
655:term:`TESTIMAGE_AUTO` equal to "1". 638:term:`TESTIMAGE_AUTO` equal to "1".
656 639
657For information on automatically testing images, see the 640For information on automatically testing images, see the
658":ref:`dev-manual/common-tasks:performing automated runtime testing`" 641":ref:`test-manual/runtime-testing:performing automated runtime testing`"
659section in the Yocto Project Development Tasks Manual. 642section in the Yocto Project Test Environment Manual.
660 643
661Kernel-Related Tasks 644Kernel-Related Tasks
662==================== 645====================
@@ -687,8 +670,7 @@ changes made by the user with other methods (i.e. using
687(:ref:`ref-tasks-kernel_menuconfig`). Once the 670(:ref:`ref-tasks-kernel_menuconfig`). Once the
688file of differences is created, it can be used to create a config 671file of differences is created, it can be used to create a config
689fragment that only contains the differences. You can invoke this task 672fragment that only contains the differences. You can invoke this task
690from the command line as follows: 673from the command line as follows::
691::
692 674
693 $ bitbake linux-yocto -c diffconfig 675 $ bitbake linux-yocto -c diffconfig
694 676
@@ -703,7 +685,7 @@ section in the Yocto Project Linux Kernel Development Manual.
703 685
704Converts the newly unpacked kernel source into a form with which the 686Converts the newly unpacked kernel source into a form with which the
705OpenEmbedded build system can work. Because the kernel source can be 687OpenEmbedded build system can work. Because the kernel source can be
706fetched in several different ways, the ``do_kernel_checkout`` task makes 688fetched in several different ways, the :ref:`ref-tasks-kernel_checkout` task makes
707sure that subsequent tasks are given a clean working tree copy of the 689sure that subsequent tasks are given a clean working tree copy of the
708kernel with the correct branches checked out. 690kernel with the correct branches checked out.
709 691
@@ -714,12 +696,11 @@ kernel with the correct branches checked out.
714 696
715Validates the configuration produced by the 697Validates the configuration produced by the
716:ref:`ref-tasks-kernel_menuconfig` task. The 698:ref:`ref-tasks-kernel_menuconfig` task. The
717``do_kernel_configcheck`` task produces warnings when a requested 699:ref:`ref-tasks-kernel_configcheck` task produces warnings when a requested
718configuration does not appear in the final ``.config`` file or when you 700configuration does not appear in the final ``.config`` file or when you
719override a policy configuration in a hardware configuration fragment. 701override a policy configuration in a hardware configuration fragment.
720You can run this task explicitly and view the output by using the 702You can run this task explicitly and view the output by using the
721following command: 703following command::
722::
723 704
724 $ bitbake linux-yocto -c kernel_configcheck -f 705 $ bitbake linux-yocto -c kernel_configcheck -f
725 706
@@ -733,7 +714,7 @@ section in the Yocto Project Linux Kernel Development Manual.
733---------------------- 714----------------------
734 715
735After the kernel is patched by the :ref:`ref-tasks-patch` 716After the kernel is patched by the :ref:`ref-tasks-patch`
736task, the ``do_kernel_configme`` task assembles and merges all the 717task, the :ref:`ref-tasks-kernel_configme` task assembles and merges all the
737kernel config fragments into a merged configuration that can then be 718kernel config fragments into a merged configuration that can then be
738passed to the kernel configuration phase proper. This is also the time 719passed to the kernel configuration phase proper. This is also the time
739during which user-specified defconfigs are applied if present, and where 720during which user-specified defconfigs are applied if present, and where
@@ -750,13 +731,12 @@ tool, which you then use to modify the kernel configuration.
750 731
751.. note:: 732.. note::
752 733
753 You can also invoke this tool from the command line as follows: 734 You can also invoke this tool from the command line as follows::
754 ::
755 735
756 $ bitbake linux-yocto -c menuconfig 736 $ bitbake linux-yocto -c menuconfig
757 737
758 738
759See the ":ref:`kernel-dev/common:using \`\`menuconfig\`\``" 739See the ":ref:`kernel-dev/common:using ``menuconfig```"
760section in the Yocto Project Linux Kernel Development Manual for more 740section in the Yocto Project Linux Kernel Development Manual for more
761information on this configuration tool. 741information on this configuration tool.
762 742
@@ -767,7 +747,7 @@ information on this configuration tool.
767 747
768Collects all the features required for a given kernel build, whether the 748Collects all the features required for a given kernel build, whether the
769features come from :term:`SRC_URI` or from Git 749features come from :term:`SRC_URI` or from Git
770repositories. After collection, the ``do_kernel_metadata`` task 750repositories. After collection, the :ref:`ref-tasks-kernel_metadata` task
771processes the features into a series of config fragments and patches, 751processes the features into a series of config fragments and patches,
772which can then be applied by subsequent tasks such as 752which can then be applied by subsequent tasks such as
773:ref:`ref-tasks-patch` and 753:ref:`ref-tasks-patch` and
@@ -780,7 +760,7 @@ which can then be applied by subsequent tasks such as
780 760
781Runs ``make menuconfig`` for the kernel. For information on 761Runs ``make menuconfig`` for the kernel. For information on
782``menuconfig``, see the 762``menuconfig``, see the
783":ref:`kernel-dev/common:using \`\`menuconfig\`\``" 763":ref:`kernel-dev/common:using ``menuconfig```"
784section in the Yocto Project Linux Kernel Development Manual. 764section in the Yocto Project Linux Kernel Development Manual.
785 765
786.. _ref-tasks-savedefconfig: 766.. _ref-tasks-savedefconfig:
@@ -793,8 +773,7 @@ instead of the default defconfig. The saved defconfig contains the
793differences between the default defconfig and the changes made by the 773differences between the default defconfig and the changes made by the
794user using other methods (i.e. the 774user using other methods (i.e. the
795:ref:`ref-tasks-kernel_menuconfig` task. You 775:ref:`ref-tasks-kernel_menuconfig` task. You
796can invoke the task using the following command: 776can invoke the task using the following command::
797::
798 777
799 $ bitbake linux-yocto -c savedefconfig 778 $ bitbake linux-yocto -c savedefconfig
800 779
@@ -839,6 +818,5 @@ sections from a size-sensitive configuration.
839After the kernel is unpacked but before it is patched, this task makes 818After the kernel is unpacked but before it is patched, this task makes
840sure that the machine and metadata branches as specified by the 819sure that the machine and metadata branches as specified by the
841:term:`SRCREV` variables actually exist on the specified 820:term:`SRCREV` variables actually exist on the specified
842branches. If these branches do not exist and 821branches. Otherwise, if :term:`AUTOREV` is not being used, the
843:term:`AUTOREV` is not being used, the 822:ref:`ref-tasks-validate_branches` task fails during the build.
844``do_validate_branches`` task fails during the build.