diff options
Diffstat (limited to 'documentation/ref-manual/tasks.rst')
-rw-r--r-- | documentation/ref-manual/tasks.rst | 282 |
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 | ||
15 | The following sections describe normal tasks associated with building a | 15 | The following sections describe normal tasks associated with building a |
16 | recipe. For more information on tasks and dependencies, see the | 16 | recipe. 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 |
19 | BitBake User Manual. | 19 | BitBake User Manual. |
20 | 20 | ||
21 | .. _ref-tasks-build: | 21 | .. _ref-tasks-build: |
@@ -36,7 +36,7 @@ directory set to ``${``\ :term:`B`\ ``}``. | |||
36 | 36 | ||
37 | The default behavior of this task is to run the ``oe_runmake`` function | 37 | The default behavior of this task is to run the ``oe_runmake`` function |
38 | if a makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found. | 38 | if a makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found. |
39 | If no such file is found, the ``do_compile`` task does nothing. | 39 | If 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`\ ``}``. | |||
57 | The default behavior of this task is to run ``oe_runmake clean`` if a | 57 | The default behavior of this task is to run ``oe_runmake clean`` if a |
58 | makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and | 58 | makefile (``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 |
60 | file is found or the ``CLEANBROKEN`` variable is set to "1", the | 60 | file 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 | ||
80 | Recipes implementing this task should inherit the | 80 | Recipes 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 |
82 | to ``${``\ :term:`DEPLOYDIR`\ ``}``, which is not to be | 82 | to ``${``\ :term:`DEPLOYDIR`\ ``}``, which is not to be |
83 | confused with ``${DEPLOY_DIR}``. The ``deploy`` class sets up | 83 | confused 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 |
85 | through sstate use. The sstate mechanism takes care of copying the | 85 | through sstate use. The sstate mechanism takes care of copying the |
86 | output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``. | 86 | output 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 | ||
93 | The ``do_deploy`` task is not added as a task by default and | 93 | The :ref:`ref-tasks-deploy` task is not added as a task by default and |
94 | consequently needs to be added manually. If you want the task to run | 94 | consequently needs to be added manually. If you want the task to run |
95 | after :ref:`ref-tasks-compile`, you can add it by doing | 95 | after :ref:`ref-tasks-compile`, you can add it by doing |
96 | the following: | 96 | the following:: |
97 | :: | ||
98 | 97 | ||
99 | addtask deploy after do_compile | 98 | addtask deploy after do_compile |
100 | 99 | ||
101 | Adding ``do_deploy`` after other tasks works the same way. | 100 | Adding :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 | ||
115 | If the ``do_deploy`` task re-executes, any previous output is removed | 113 | If 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 | ||
123 | Fetches the source code. This task uses the | 121 | Fetches the source code. This task uses the :term:`SRC_URI` variable and the |
124 | :term:`SRC_URI` variable and the argument's prefix to | 122 | argument's prefix to determine the correct |
125 | determine the correct :ref:`fetcher <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` | 123 | :ref:`fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` |
126 | module. | 124 | module. |
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 | ||
133 | Starts the image generation process. The ``do_image`` task runs after | 131 | Starts the image generation process. The :ref:`ref-tasks-image` task runs after |
134 | the OpenEmbedded build system has run the | 132 | the 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 |
136 | identified for installation into the image and the root filesystem is | 134 | identified for installation into the image and the root filesystem is |
137 | created, complete with post-processing. | 135 | created, complete with post-processing. |
138 | 136 | ||
139 | The ``do_image`` task performs pre-processing on the image through the | 137 | The :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 |
141 | dynamically generates supporting ``do_image_*`` tasks as needed. | 139 | dynamically generates supporting :ref:`do_image_* <ref-tasks-image>` tasks as needed. |
142 | 140 | ||
143 | For more information on image creation, see the ":ref:`overview-manual/concepts:image generation`" | 141 | For more information on image creation, see the ":ref:`overview-manual/concepts:image generation`" |
144 | section in the Yocto Project Overview and Concepts Manual. | 142 | section 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 | ||
151 | Completes the image generation process. The ``do_image_complete`` task | 149 | Completes the image generation process. The :ref:`do_image_complete <ref-tasks-image-complete>` task |
152 | runs after the OpenEmbedded build system has run the | 150 | runs 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 |
154 | pre-processing occurs and through dynamically generated ``do_image_*`` | 152 | pre-processing occurs and through dynamically generated :ref:`do_image_* <ref-tasks-image>` |
155 | tasks the image is constructed. | 153 | tasks the image is constructed. |
156 | 154 | ||
157 | The ``do_image_complete`` task performs post-processing on the image | 155 | The :ref:`do_image_complete <ref-tasks-image-complete>` task performs post-processing on the image |
158 | through the | 156 | through 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. | |||
170 | Copies files that are to be packaged into the holding area | 168 | Copies 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 |
172 | working directory set to ``${``\ :term:`B`\ ``}``, which is the | 170 | working directory set to ``${``\ :term:`B`\ ``}``, which is the |
173 | compilation directory. The ``do_install`` task, as well as other tasks | 171 | compilation directory. The :ref:`ref-tasks-install` task, as well as other tasks |
174 | that either directly or indirectly depend on the installed files (e.g. | 172 | that 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` |
215 | variables. | 213 | variables. |
216 | 214 | ||
217 | The ``do_package`` task, in conjunction with the | 215 | The :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 |
219 | important package metadata. For additional information, see the | 217 | important 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 | ||
229 | Runs QA checks on packaged files. For more information on these checks, | 227 | Runs QA checks on packaged files. For more information on these checks, |
230 | see the :ref:`insane <ref-classes-insane>` class. | 228 | see 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 |
263 | the Yocto Project Overview and Concepts Manual. | 261 | the Yocto Project Overview and Concepts Manual. |
264 | 262 | ||
265 | .. _ref-tasks-package_write_tar: | ||
266 | |||
267 | ``do_package_write_tar`` | ||
268 | ------------------------ | ||
269 | |||
270 | Creates tarballs and places them in the | ||
271 | ``${``\ :term:`DEPLOY_DIR_TAR`\ ``}`` directory in | ||
272 | the package feeds area. For more information, see the | ||
273 | ":ref:`overview-manual/concepts:package feeds`" section in | ||
274 | the 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 | |||
302 | and kept in a subdirectory of the directory holding the recipe file. For | 289 | and kept in a subdirectory of the directory holding the recipe file. For |
303 | example, consider the | 290 | example, consider the |
304 | :yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>` | 291 | :yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>` |
305 | recipe from the OE-Core layer (i.e. ``poky/meta``): | 292 | recipe 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 | ||
310 | This recipe has two patch files located here: | 296 | This 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 | ||
315 | In the ``bluez5`` recipe, the ``SRC_URI`` statements point to the source | 300 | In the ``bluez5`` recipe, the :term:`SRC_URI` statements point to the source |
316 | and patch files needed to build the package. | 301 | and 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 | ||
323 | As mentioned earlier, the build system treats files whose file types are | 308 | As 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 |
326 | file as a patch file: | 311 | file 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 | ||
334 | Conversely, if you have a directory full of patch files and you want to | 318 | Conversely, if you have a file whose file type is ``.patch`` or ``.diff`` |
335 | exclude some so that the ``do_patch`` task does not apply them during | 319 | and you want to exclude it so that the :ref:`ref-tasks-patch` task does not apply |
336 | the patch phase, you can use the "apply=no" parameter with the | 320 | it 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 | ||
346 | In the | 329 | In the previous example ``file1.patch`` would be applied as a patch by default |
347 | previous example, assuming all the files in the directory holding the | 330 | while ``file2.patch`` would not be applied. |
348 | patch files end with either ``.patch`` or ``.diff``, every file would be | ||
349 | applied as a patch by default except for the ``patch_file5`` patch. | ||
350 | 331 | ||
351 | You can find out more about the patching process in the | 332 | You 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 |
353 | the Yocto Project Overview and Concepts Manual and the | 334 | the 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 |
355 | Yocto Project Development Tasks Manual. | 336 | Yocto 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 | ||
380 | Creates the file and directory structure for an installable extensible | 361 | Creates the file and directory structure for an installable extensible |
381 | SDK (eSDK). See the ":ref:`overview-manual/concepts:sdk generation`" | 362 | SDK (eSDK). See the ":ref:`overview-manual/concepts:sdk generation`" |
382 | section in the Yocto Project Overview and Concepts Manual for more | 363 | section in the Yocto Project Overview and Concepts Manual for more |
383 | information. | 364 | information. |
@@ -400,7 +381,7 @@ For information on what directories are copied by default, see the | |||
400 | these variables inside your recipe if you need to make additional (or | 381 | these variables inside your recipe if you need to make additional (or |
401 | fewer) directories available to other recipes at build time. | 382 | fewer) directories available to other recipes at build time. |
402 | 383 | ||
403 | The ``do_populate_sysroot`` task is a shared state (sstate) task, which | 384 | The :ref:`ref-tasks-populate_sysroot` task is a shared state (sstate) task, which |
404 | means that the task can be accelerated through sstate use. Realize also | 385 | means that the task can be accelerated through sstate use. Realize also |
405 | that if the task is re-executed, any previous output is removed (i.e. | 386 | that 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 |
416 | dependencies specified by :term:`DEPENDS`). See the | 397 | dependencies 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 | |||
405 | Performs QA check on recipes that can operate entirely from recipe metadata and | ||
406 | do not need any of the build artefacts or source code. | ||
407 | |||
408 | The 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 | ||
424 | Removes work files after the OpenEmbedded build system has finished with | 416 | Removes work files after the OpenEmbedded build system has finished with |
425 | them. You can learn more by looking at the | 417 | them. 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 | ||
433 | Unpacks the source code into a working directory pointed to by | 425 | Unpacks the source code into a working directory pointed to by |
434 | ``${``\ :term:`WORKDIR`\ ``}``. The :term:`S` | 426 | ``${``\ :term:`UNPACKDIR`\ ``}``. |
435 | variable also plays a role in where unpacked source files ultimately | 427 | For more information on how source files are unpacked, see the |
436 | reside. 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`" |
438 | section in the Yocto Project Overview and Concepts Manual and also see | 429 | section in the Yocto Project Overview and Concepts Manual. |
439 | the ``WORKDIR`` and ``S`` variable descriptions. | ||
440 | 430 | ||
441 | Manually Called Tasks | 431 | Manually Called Tasks |
442 | ===================== | 432 | ===================== |
@@ -444,39 +434,6 @@ Manually Called Tasks | |||
444 | These tasks are typically manually triggered (e.g. by using the | 434 | These 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 | |||
452 | Provides information about the recipe including its upstream version and | ||
453 | status. The upstream version and status reveals whether or not a version | ||
454 | of the recipe exists upstream and a status of not updated, updated, or | ||
455 | unknown. | ||
456 | |||
457 | To check the upstream version and status of a recipe, use the following | ||
458 | devtool commands: | ||
459 | :: | ||
460 | |||
461 | $ devtool latest-version | ||
462 | $ devtool check-upgrade-status | ||
463 | |||
464 | See the ":ref:`ref-manual/devtool-reference:\`\`devtool\`\` quick reference`" | ||
465 | chapter for more information on | ||
466 | ``devtool``. See the ":ref:`devtool-checking-on-the-upgrade-status-of-a-recipe`" | ||
467 | section for information on checking the upgrade status of a recipe. | ||
468 | |||
469 | To 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 | |||
475 | By 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 | ||
490 | Removes all output files for a target from the | 447 | Removes 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 | ||
497 | You can run this task using BitBake as follows: | 454 | You 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 | |||
515 | Removes all output files, shared state | 471 | Removes 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 |
517 | downloaded source files for a target (i.e. the contents of | 473 | downloaded 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 |
519 | identical to the :ref:`ref-tasks-cleansstate` task | 475 | identical to the :ref:`ref-tasks-cleansstate` task |
520 | with the added removal of downloaded source files. | 476 | with the added removal of downloaded source files. |
521 | 477 | ||
522 | You can run this task using BitBake as follows: | 478 | You can run this task using BitBake as follows:: |
523 | :: | ||
524 | 479 | ||
525 | $ bitbake -c cleanall recipe | 480 | $ bitbake -c cleanall recipe |
526 | 481 | ||
527 | Typically, you would not normally use the ``cleanall`` task. Do so only | 482 | You should never use the :ref:`ref-tasks-cleanall` task in a normal |
528 | if you want to start fresh with the :ref:`ref-tasks-fetch` | 483 | scenario. If you want to start fresh with the :ref:`ref-tasks-fetch` task, |
529 | task. | 484 | use 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 | ||
536 | Removes all output files and shared state | 511 | Removes 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 |
538 | target. Essentially, the ``do_cleansstate`` task is identical to the | 513 | target. 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 |
540 | shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`) | 515 | shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`) |
541 | cache. | 516 | cache. |
542 | 517 | ||
543 | You can run this task using BitBake as follows: | 518 | You can run this task using BitBake as follows:: |
544 | :: | ||
545 | 519 | ||
546 | $ bitbake -c cleansstate recipe | 520 | $ bitbake -c cleansstate recipe |
547 | 521 | ||
548 | When you run the ``do_cleansstate`` task, the OpenEmbedded build system | 522 | When you run the :ref:`ref-tasks-cleansstate` task, the OpenEmbedded build system |
549 | no longer uses any sstate. Consequently, building the recipe from | 523 | no longer uses any sstate. Consequently, building the recipe from |
550 | scratch is guaranteed. | 524 | scratch 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 | ||
567 | Starts a shell in which an interactive Python interpreter allows you to | 552 | Starts a shell in which an interactive Python interpreter allows you to |
568 | interact with the BitBake build environment. From within this shell, you | 553 | interact with the BitBake build environment. From within this shell, you |
569 | can directly examine and set bits from the data store and execute | 554 | can directly examine and set bits from the data store and execute |
570 | functions as if within the BitBake environment. See the ":ref:`dev-manual/common-tasks:using a development python shell`" section in | 555 | functions as if within the BitBake environment. See the ":ref:`dev-manual/python-development-shell:using a Python development shell`" section in |
571 | the Yocto Project Development Tasks Manual for more information about | 556 | the Yocto Project Development Tasks Manual for more information about |
572 | using ``devpyshell``. | 557 | using ``pydevshell``. |
573 | 558 | ||
574 | .. _ref-tasks-devshell: | 559 | .. _ref-tasks-devshell: |
575 | 560 | ||
@@ -577,7 +562,7 @@ using ``devpyshell``. | |||
577 | --------------- | 562 | --------------- |
578 | 563 | ||
579 | Starts a shell whose environment is set up for development, debugging, | 564 | Starts a shell whose environment is set up for development, debugging, |
580 | or both. See the ":ref:`dev-manual/common-tasks:using a development shell`" section in the | 565 | or both. See the ":ref:`dev-manual/development-shell:using a development shell`" section in the |
581 | Yocto Project Development Tasks Manual for more information about using | 566 | Yocto 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 | ||
623 | Combines an initial RAM disk (initramfs) image and kernel together to | 608 | Combines an :term:`Initramfs` image and kernel together to |
624 | form a single image. The | 609 | form a single image. |
625 | :term:`CONFIG_INITRAMFS_SOURCE` variable | ||
626 | has 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 | ||
643 | Boots an image and performs runtime tests within the image. For | 626 | Boots an image and performs runtime tests within the image. For |
644 | information on automatically testing images, see the | 627 | information 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`" |
646 | section in the Yocto Project Development Tasks Manual. | 629 | section 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 | ||
657 | For information on automatically testing images, see the | 640 | For 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`" |
659 | section in the Yocto Project Development Tasks Manual. | 642 | section in the Yocto Project Test Environment Manual. |
660 | 643 | ||
661 | Kernel-Related Tasks | 644 | Kernel-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 |
688 | file of differences is created, it can be used to create a config | 671 | file of differences is created, it can be used to create a config |
689 | fragment that only contains the differences. You can invoke this task | 672 | fragment that only contains the differences. You can invoke this task |
690 | from the command line as follows: | 673 | from 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 | ||
704 | Converts the newly unpacked kernel source into a form with which the | 686 | Converts the newly unpacked kernel source into a form with which the |
705 | OpenEmbedded build system can work. Because the kernel source can be | 687 | OpenEmbedded build system can work. Because the kernel source can be |
706 | fetched in several different ways, the ``do_kernel_checkout`` task makes | 688 | fetched in several different ways, the :ref:`ref-tasks-kernel_checkout` task makes |
707 | sure that subsequent tasks are given a clean working tree copy of the | 689 | sure that subsequent tasks are given a clean working tree copy of the |
708 | kernel with the correct branches checked out. | 690 | kernel with the correct branches checked out. |
709 | 691 | ||
@@ -714,12 +696,11 @@ kernel with the correct branches checked out. | |||
714 | 696 | ||
715 | Validates the configuration produced by the | 697 | Validates 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 |
718 | configuration does not appear in the final ``.config`` file or when you | 700 | configuration does not appear in the final ``.config`` file or when you |
719 | override a policy configuration in a hardware configuration fragment. | 701 | override a policy configuration in a hardware configuration fragment. |
720 | You can run this task explicitly and view the output by using the | 702 | You can run this task explicitly and view the output by using the |
721 | following command: | 703 | following 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 | ||
735 | After the kernel is patched by the :ref:`ref-tasks-patch` | 716 | After the kernel is patched by the :ref:`ref-tasks-patch` |
736 | task, the ``do_kernel_configme`` task assembles and merges all the | 717 | task, the :ref:`ref-tasks-kernel_configme` task assembles and merges all the |
737 | kernel config fragments into a merged configuration that can then be | 718 | kernel config fragments into a merged configuration that can then be |
738 | passed to the kernel configuration phase proper. This is also the time | 719 | passed to the kernel configuration phase proper. This is also the time |
739 | during which user-specified defconfigs are applied if present, and where | 720 | during 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 | ||
759 | See the ":ref:`kernel-dev/common:using \`\`menuconfig\`\``" | 739 | See the ":ref:`kernel-dev/common:using ``menuconfig```" |
760 | section in the Yocto Project Linux Kernel Development Manual for more | 740 | section in the Yocto Project Linux Kernel Development Manual for more |
761 | information on this configuration tool. | 741 | information on this configuration tool. |
762 | 742 | ||
@@ -767,7 +747,7 @@ information on this configuration tool. | |||
767 | 747 | ||
768 | Collects all the features required for a given kernel build, whether the | 748 | Collects all the features required for a given kernel build, whether the |
769 | features come from :term:`SRC_URI` or from Git | 749 | features come from :term:`SRC_URI` or from Git |
770 | repositories. After collection, the ``do_kernel_metadata`` task | 750 | repositories. After collection, the :ref:`ref-tasks-kernel_metadata` task |
771 | processes the features into a series of config fragments and patches, | 751 | processes the features into a series of config fragments and patches, |
772 | which can then be applied by subsequent tasks such as | 752 | which 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 | ||
781 | Runs ``make menuconfig`` for the kernel. For information on | 761 | Runs ``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```" |
784 | section in the Yocto Project Linux Kernel Development Manual. | 764 | section 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 | |||
793 | differences between the default defconfig and the changes made by the | 773 | differences between the default defconfig and the changes made by the |
794 | user using other methods (i.e. the | 774 | user using other methods (i.e. the |
795 | :ref:`ref-tasks-kernel_menuconfig` task. You | 775 | :ref:`ref-tasks-kernel_menuconfig` task. You |
796 | can invoke the task using the following command: | 776 | can 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. | |||
839 | After the kernel is unpacked but before it is patched, this task makes | 818 | After the kernel is unpacked but before it is patched, this task makes |
840 | sure that the machine and metadata branches as specified by the | 819 | sure 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 |
842 | branches. If these branches do not exist and | 821 | branches. 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. | ||