xref: /OK3568_Linux_fs/yocto/poky/documentation/ref-manual/tasks.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun*****
4*4882a593SmuzhiyunTasks
5*4882a593Smuzhiyun*****
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunTasks are units of execution for BitBake. Recipes (``.bb`` files) use
8*4882a593Smuzhiyuntasks to complete configuring, compiling, and packaging software. This
9*4882a593Smuzhiyunchapter provides a reference of the tasks defined in the OpenEmbedded
10*4882a593Smuzhiyunbuild system.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunNormal Recipe Build Tasks
13*4882a593Smuzhiyun=========================
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunThe following sections describe normal tasks associated with building a
16*4882a593Smuzhiyunrecipe. For more information on tasks and dependencies, see the
17*4882a593Smuzhiyun":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
18*4882a593Smuzhiyun":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
19*4882a593SmuzhiyunBitBake User Manual.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun.. _ref-tasks-build:
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun``do_build``
24*4882a593Smuzhiyun------------
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunThe default task for all recipes. This task depends on all other normal
27*4882a593Smuzhiyuntasks required to build a recipe.
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun.. _ref-tasks-compile:
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun``do_compile``
32*4882a593Smuzhiyun--------------
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunCompiles the source code. This task runs with the current working
35*4882a593Smuzhiyundirectory set to ``${``\ :term:`B`\ ``}``.
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunThe default behavior of this task is to run the ``oe_runmake`` function
38*4882a593Smuzhiyunif a makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found.
39*4882a593SmuzhiyunIf no such file is found, the ``do_compile`` task does nothing.
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun.. _ref-tasks-compile_ptest_base:
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun``do_compile_ptest_base``
44*4882a593Smuzhiyun-------------------------
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunCompiles the runtime test suite included in the software being built.
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun.. _ref-tasks-configure:
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun``do_configure``
51*4882a593Smuzhiyun----------------
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunConfigures the source by enabling and disabling any build-time and
54*4882a593Smuzhiyunconfiguration options for the software being built. The task runs with
55*4882a593Smuzhiyunthe current working directory set to ``${``\ :term:`B`\ ``}``.
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunThe default behavior of this task is to run ``oe_runmake clean`` if a
58*4882a593Smuzhiyunmakefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and
59*4882a593Smuzhiyun:term:`CLEANBROKEN` is not set to "1". If no such
60*4882a593Smuzhiyunfile is found or the :term:`CLEANBROKEN` variable is set to "1", the
61*4882a593Smuzhiyun``do_configure`` task does nothing.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun.. _ref-tasks-configure_ptest_base:
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun``do_configure_ptest_base``
66*4882a593Smuzhiyun---------------------------
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunConfigures the runtime test suite included in the software being built.
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun.. _ref-tasks-deploy:
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun``do_deploy``
73*4882a593Smuzhiyun-------------
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunWrites output files that are to be deployed to
76*4882a593Smuzhiyun``${``\ :term:`DEPLOY_DIR_IMAGE`\ ``}``. The
77*4882a593Smuzhiyuntask runs with the current working directory set to
78*4882a593Smuzhiyun``${``\ :term:`B`\ ``}``.
79*4882a593Smuzhiyun
80*4882a593SmuzhiyunRecipes implementing this task should inherit the
81*4882a593Smuzhiyun:ref:`deploy <ref-classes-deploy>` class and should write the output
82*4882a593Smuzhiyunto ``${``\ :term:`DEPLOYDIR`\ ``}``, which is not to be
83*4882a593Smuzhiyunconfused with ``${DEPLOY_DIR}``. The :ref:`deploy <ref-classes-deploy>` class sets up
84*4882a593Smuzhiyun``do_deploy`` as a shared state (sstate) task that can be accelerated
85*4882a593Smuzhiyunthrough sstate use. The sstate mechanism takes care of copying the
86*4882a593Smuzhiyunoutput from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``.
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun.. note::
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun   Do not write the output directly to ``${DEPLOY_DIR_IMAGE}``, as this causes
91*4882a593Smuzhiyun   the sstate mechanism to malfunction.
92*4882a593Smuzhiyun
93*4882a593SmuzhiyunThe ``do_deploy`` task is not added as a task by default and
94*4882a593Smuzhiyunconsequently needs to be added manually. If you want the task to run
95*4882a593Smuzhiyunafter :ref:`ref-tasks-compile`, you can add it by doing
96*4882a593Smuzhiyunthe following::
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun      addtask deploy after do_compile
99*4882a593Smuzhiyun
100*4882a593SmuzhiyunAdding ``do_deploy`` after other tasks works the same way.
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun.. note::
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun   You do not need to add ``before do_build`` to the ``addtask`` command
105*4882a593Smuzhiyun   (though it is harmless), because the :ref:`base <ref-classes-base>` class contains the following::
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun           do_build[recrdeptask] += "do_deploy"
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun   See the ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`"
111*4882a593Smuzhiyun   section in the BitBake User Manual for more information.
112*4882a593Smuzhiyun
113*4882a593SmuzhiyunIf the ``do_deploy`` task re-executes, any previous output is removed
114*4882a593Smuzhiyun(i.e. "cleaned").
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun.. _ref-tasks-fetch:
117*4882a593Smuzhiyun
118*4882a593Smuzhiyun``do_fetch``
119*4882a593Smuzhiyun------------
120*4882a593Smuzhiyun
121*4882a593SmuzhiyunFetches the source code. This task uses the
122*4882a593Smuzhiyun:term:`SRC_URI` variable and the argument's prefix to
123*4882a593Smuzhiyundetermine the correct :ref:`fetcher <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
124*4882a593Smuzhiyunmodule.
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun.. _ref-tasks-image:
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun``do_image``
129*4882a593Smuzhiyun------------
130*4882a593Smuzhiyun
131*4882a593SmuzhiyunStarts the image generation process. The ``do_image`` task runs after
132*4882a593Smuzhiyunthe OpenEmbedded build system has run the
133*4882a593Smuzhiyun:ref:`ref-tasks-rootfs` task during which packages are
134*4882a593Smuzhiyunidentified for installation into the image and the root filesystem is
135*4882a593Smuzhiyuncreated, complete with post-processing.
136*4882a593Smuzhiyun
137*4882a593SmuzhiyunThe ``do_image`` task performs pre-processing on the image through the
138*4882a593Smuzhiyun:term:`IMAGE_PREPROCESS_COMMAND` and
139*4882a593Smuzhiyundynamically generates supporting ``do_image_*`` tasks as needed.
140*4882a593Smuzhiyun
141*4882a593SmuzhiyunFor more information on image creation, see the ":ref:`overview-manual/concepts:image generation`"
142*4882a593Smuzhiyunsection in the Yocto Project Overview and Concepts Manual.
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun.. _ref-tasks-image-complete:
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun``do_image_complete``
147*4882a593Smuzhiyun---------------------
148*4882a593Smuzhiyun
149*4882a593SmuzhiyunCompletes the image generation process. The ``do_image_complete`` task
150*4882a593Smuzhiyunruns after the OpenEmbedded build system has run the
151*4882a593Smuzhiyun:ref:`ref-tasks-image` task during which image
152*4882a593Smuzhiyunpre-processing occurs and through dynamically generated ``do_image_*``
153*4882a593Smuzhiyuntasks the image is constructed.
154*4882a593Smuzhiyun
155*4882a593SmuzhiyunThe ``do_image_complete`` task performs post-processing on the image
156*4882a593Smuzhiyunthrough the
157*4882a593Smuzhiyun:term:`IMAGE_POSTPROCESS_COMMAND`.
158*4882a593Smuzhiyun
159*4882a593SmuzhiyunFor more information on image creation, see the
160*4882a593Smuzhiyun":ref:`overview-manual/concepts:image generation`"
161*4882a593Smuzhiyunsection in the Yocto Project Overview and Concepts Manual.
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun.. _ref-tasks-install:
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun``do_install``
166*4882a593Smuzhiyun--------------
167*4882a593Smuzhiyun
168*4882a593SmuzhiyunCopies files that are to be packaged into the holding area
169*4882a593Smuzhiyun``${``\ :term:`D`\ ``}``. This task runs with the current
170*4882a593Smuzhiyunworking directory set to ``${``\ :term:`B`\ ``}``, which is the
171*4882a593Smuzhiyuncompilation directory. The ``do_install`` task, as well as other tasks
172*4882a593Smuzhiyunthat either directly or indirectly depend on the installed files (e.g.
173*4882a593Smuzhiyun:ref:`ref-tasks-package`, ``do_package_write_*``, and
174*4882a593Smuzhiyun:ref:`ref-tasks-rootfs`), run under
175*4882a593Smuzhiyun:ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun.. note::
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun   When installing files, be careful not to set the owner and group IDs
180*4882a593Smuzhiyun   of the installed files to unintended values. Some methods of copying
181*4882a593Smuzhiyun   files, notably when using the recursive ``cp`` command, can preserve
182*4882a593Smuzhiyun   the UID and/or GID of the original file, which is usually not what
183*4882a593Smuzhiyun   you want. The ``host-user-contaminated`` QA check checks for files
184*4882a593Smuzhiyun   that probably have the wrong ownership.
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun   Safe methods for installing files include the following:
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun   -  The ``install`` utility. This utility is the preferred method.
189*4882a593Smuzhiyun
190*4882a593Smuzhiyun   -  The ``cp`` command with the ``--no-preserve=ownership`` option.
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun   -  The ``tar`` command with the ``--no-same-owner`` option. See the
193*4882a593Smuzhiyun      ``bin_package.bbclass`` file in the ``meta/classes`` directory of
194*4882a593Smuzhiyun      the :term:`Source Directory` for an example.
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun.. _ref-tasks-install_ptest_base:
197*4882a593Smuzhiyun
198*4882a593Smuzhiyun``do_install_ptest_base``
199*4882a593Smuzhiyun-------------------------
200*4882a593Smuzhiyun
201*4882a593SmuzhiyunCopies the runtime test suite files from the compilation directory to a
202*4882a593Smuzhiyunholding area.
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun.. _ref-tasks-package:
205*4882a593Smuzhiyun
206*4882a593Smuzhiyun``do_package``
207*4882a593Smuzhiyun--------------
208*4882a593Smuzhiyun
209*4882a593SmuzhiyunAnalyzes the content of the holding area
210*4882a593Smuzhiyun``${``\ :term:`D`\ ``}`` and splits the content into subsets
211*4882a593Smuzhiyunbased on available packages and files. This task makes use of the
212*4882a593Smuzhiyun:term:`PACKAGES` and :term:`FILES`
213*4882a593Smuzhiyunvariables.
214*4882a593Smuzhiyun
215*4882a593SmuzhiyunThe ``do_package`` task, in conjunction with the
216*4882a593Smuzhiyun:ref:`ref-tasks-packagedata` task, also saves some
217*4882a593Smuzhiyunimportant package metadata. For additional information, see the
218*4882a593Smuzhiyun:term:`PKGDESTWORK` variable and the
219*4882a593Smuzhiyun":ref:`overview-manual/concepts:automatically added runtime dependencies`"
220*4882a593Smuzhiyunsection in the Yocto Project Overview and Concepts Manual.
221*4882a593Smuzhiyun
222*4882a593Smuzhiyun.. _ref-tasks-package_qa:
223*4882a593Smuzhiyun
224*4882a593Smuzhiyun``do_package_qa``
225*4882a593Smuzhiyun-----------------
226*4882a593Smuzhiyun
227*4882a593SmuzhiyunRuns QA checks on packaged files. For more information on these checks,
228*4882a593Smuzhiyunsee the :ref:`insane <ref-classes-insane>` class.
229*4882a593Smuzhiyun
230*4882a593Smuzhiyun.. _ref-tasks-package_write_deb:
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun``do_package_write_deb``
233*4882a593Smuzhiyun------------------------
234*4882a593Smuzhiyun
235*4882a593SmuzhiyunCreates Debian packages (i.e. ``*.deb`` files) and places them in the
236*4882a593Smuzhiyun``${``\ :term:`DEPLOY_DIR_DEB`\ ``}`` directory in
237*4882a593Smuzhiyunthe package feeds area. For more information, see the
238*4882a593Smuzhiyun":ref:`overview-manual/concepts:package feeds`" section in
239*4882a593Smuzhiyunthe Yocto Project Overview and Concepts Manual.
240*4882a593Smuzhiyun
241*4882a593Smuzhiyun.. _ref-tasks-package_write_ipk:
242*4882a593Smuzhiyun
243*4882a593Smuzhiyun``do_package_write_ipk``
244*4882a593Smuzhiyun------------------------
245*4882a593Smuzhiyun
246*4882a593SmuzhiyunCreates IPK packages (i.e. ``*.ipk`` files) and places them in the
247*4882a593Smuzhiyun``${``\ :term:`DEPLOY_DIR_IPK`\ ``}`` directory in
248*4882a593Smuzhiyunthe package feeds area. For more information, see the
249*4882a593Smuzhiyun":ref:`overview-manual/concepts:package feeds`" section in
250*4882a593Smuzhiyunthe Yocto Project Overview and Concepts Manual.
251*4882a593Smuzhiyun
252*4882a593Smuzhiyun.. _ref-tasks-package_write_rpm:
253*4882a593Smuzhiyun
254*4882a593Smuzhiyun``do_package_write_rpm``
255*4882a593Smuzhiyun------------------------
256*4882a593Smuzhiyun
257*4882a593SmuzhiyunCreates RPM packages (i.e. ``*.rpm`` files) and places them in the
258*4882a593Smuzhiyun``${``\ :term:`DEPLOY_DIR_RPM`\ ``}`` directory in
259*4882a593Smuzhiyunthe package feeds area. For more information, see the
260*4882a593Smuzhiyun":ref:`overview-manual/concepts:package feeds`" section in
261*4882a593Smuzhiyunthe Yocto Project Overview and Concepts Manual.
262*4882a593Smuzhiyun
263*4882a593Smuzhiyun.. _ref-tasks-package_write_tar:
264*4882a593Smuzhiyun
265*4882a593Smuzhiyun``do_package_write_tar``
266*4882a593Smuzhiyun------------------------
267*4882a593Smuzhiyun
268*4882a593SmuzhiyunCreates tarballs and places them in the
269*4882a593Smuzhiyun``${``\ :term:`DEPLOY_DIR_TAR`\ ``}`` directory in
270*4882a593Smuzhiyunthe package feeds area. For more information, see the
271*4882a593Smuzhiyun":ref:`overview-manual/concepts:package feeds`" section in
272*4882a593Smuzhiyunthe Yocto Project Overview and Concepts Manual.
273*4882a593Smuzhiyun
274*4882a593Smuzhiyun.. _ref-tasks-packagedata:
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun``do_packagedata``
277*4882a593Smuzhiyun------------------
278*4882a593Smuzhiyun
279*4882a593SmuzhiyunSaves package metadata generated by the
280*4882a593Smuzhiyun:ref:`ref-tasks-package` task in
281*4882a593Smuzhiyun:term:`PKGDATA_DIR` to make it available globally.
282*4882a593Smuzhiyun
283*4882a593Smuzhiyun.. _ref-tasks-patch:
284*4882a593Smuzhiyun
285*4882a593Smuzhiyun``do_patch``
286*4882a593Smuzhiyun------------
287*4882a593Smuzhiyun
288*4882a593SmuzhiyunLocates patch files and applies them to the source code.
289*4882a593Smuzhiyun
290*4882a593SmuzhiyunAfter fetching and unpacking source files, the build system uses the
291*4882a593Smuzhiyunrecipe's :term:`SRC_URI` statements
292*4882a593Smuzhiyunto locate and apply patch files to the source code.
293*4882a593Smuzhiyun
294*4882a593Smuzhiyun.. note::
295*4882a593Smuzhiyun
296*4882a593Smuzhiyun   The build system uses the :term:`FILESPATH` variable to determine the
297*4882a593Smuzhiyun   default set of directories when searching for patches.
298*4882a593Smuzhiyun
299*4882a593SmuzhiyunPatch files, by default, are ``*.patch`` and ``*.diff`` files created
300*4882a593Smuzhiyunand kept in a subdirectory of the directory holding the recipe file. For
301*4882a593Smuzhiyunexample, consider the
302*4882a593Smuzhiyun:yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>`
303*4882a593Smuzhiyunrecipe from the OE-Core layer (i.e. ``poky/meta``)::
304*4882a593Smuzhiyun
305*4882a593Smuzhiyun   poky/meta/recipes-connectivity/bluez5
306*4882a593Smuzhiyun
307*4882a593SmuzhiyunThis recipe has two patch files located here::
308*4882a593Smuzhiyun
309*4882a593Smuzhiyun   poky/meta/recipes-connectivity/bluez5/bluez5
310*4882a593Smuzhiyun
311*4882a593SmuzhiyunIn the ``bluez5`` recipe, the :term:`SRC_URI` statements point to the source
312*4882a593Smuzhiyunand patch files needed to build the package.
313*4882a593Smuzhiyun
314*4882a593Smuzhiyun.. note::
315*4882a593Smuzhiyun
316*4882a593Smuzhiyun   In the case for the ``bluez5_5.48.bb`` recipe, the :term:`SRC_URI` statements
317*4882a593Smuzhiyun   are from an include file ``bluez5.inc``.
318*4882a593Smuzhiyun
319*4882a593SmuzhiyunAs mentioned earlier, the build system treats files whose file types are
320*4882a593Smuzhiyun``.patch`` and ``.diff`` as patch files. However, you can use the
321*4882a593Smuzhiyun"apply=yes" parameter with the :term:`SRC_URI` statement to indicate any
322*4882a593Smuzhiyunfile as a patch file::
323*4882a593Smuzhiyun
324*4882a593Smuzhiyun   SRC_URI = " \
325*4882a593Smuzhiyun       git://path_to_repo/some_package \
326*4882a593Smuzhiyun       file://file;apply=yes \
327*4882a593Smuzhiyun       "
328*4882a593Smuzhiyun
329*4882a593SmuzhiyunConversely, if you have a file whose file type is ``.patch`` or ``.diff``
330*4882a593Smuzhiyunand you want to exclude it so that the ``do_patch`` task does not apply
331*4882a593Smuzhiyunit during the patch phase, you can use the "apply=no" parameter with the
332*4882a593Smuzhiyun:term:`SRC_URI` statement::
333*4882a593Smuzhiyun
334*4882a593Smuzhiyun   SRC_URI = " \
335*4882a593Smuzhiyun       git://path_to_repo/some_package \
336*4882a593Smuzhiyun       file://file1.patch \
337*4882a593Smuzhiyun       file://file2.patch;apply=no \
338*4882a593Smuzhiyun       "
339*4882a593Smuzhiyun
340*4882a593SmuzhiyunIn the previous example ``file1.patch`` would be applied as a patch by default
341*4882a593Smuzhiyunwhile ``file2.patch`` would not be applied.
342*4882a593Smuzhiyun
343*4882a593SmuzhiyunYou can find out more about the patching process in the
344*4882a593Smuzhiyun":ref:`overview-manual/concepts:patching`" section in
345*4882a593Smuzhiyunthe Yocto Project Overview and Concepts Manual and the
346*4882a593Smuzhiyun":ref:`dev-manual/common-tasks:patching code`" section in the
347*4882a593SmuzhiyunYocto Project Development Tasks Manual.
348*4882a593Smuzhiyun
349*4882a593Smuzhiyun.. _ref-tasks-populate_lic:
350*4882a593Smuzhiyun
351*4882a593Smuzhiyun``do_populate_lic``
352*4882a593Smuzhiyun-------------------
353*4882a593Smuzhiyun
354*4882a593SmuzhiyunWrites license information for the recipe that is collected later when
355*4882a593Smuzhiyunthe image is constructed.
356*4882a593Smuzhiyun
357*4882a593Smuzhiyun.. _ref-tasks-populate_sdk:
358*4882a593Smuzhiyun
359*4882a593Smuzhiyun``do_populate_sdk``
360*4882a593Smuzhiyun-------------------
361*4882a593Smuzhiyun
362*4882a593SmuzhiyunCreates the file and directory structure for an installable SDK. See the
363*4882a593Smuzhiyun":ref:`overview-manual/concepts:sdk generation`"
364*4882a593Smuzhiyunsection in the Yocto Project Overview and Concepts Manual for more
365*4882a593Smuzhiyuninformation.
366*4882a593Smuzhiyun
367*4882a593Smuzhiyun.. _ref-tasks-populate_sdk_ext:
368*4882a593Smuzhiyun
369*4882a593Smuzhiyun``do_populate_sdk_ext``
370*4882a593Smuzhiyun-----------------------
371*4882a593Smuzhiyun
372*4882a593SmuzhiyunCreates the file and directory structure for an installable extensible
373*4882a593SmuzhiyunSDK (eSDK). See the ":ref:`overview-manual/concepts:sdk generation`"
374*4882a593Smuzhiyunsection in the Yocto Project Overview and Concepts Manual for more
375*4882a593Smuzhiyuninformation.
376*4882a593Smuzhiyun
377*4882a593Smuzhiyun
378*4882a593Smuzhiyun.. _ref-tasks-populate_sysroot:
379*4882a593Smuzhiyun
380*4882a593Smuzhiyun``do_populate_sysroot``
381*4882a593Smuzhiyun-----------------------
382*4882a593Smuzhiyun
383*4882a593SmuzhiyunStages (copies) a subset of the files installed by the
384*4882a593Smuzhiyun:ref:`ref-tasks-install` task into the appropriate
385*4882a593Smuzhiyunsysroot. For information on how to access these files from other
386*4882a593Smuzhiyunrecipes, see the :term:`STAGING_DIR* <STAGING_DIR_HOST>` variables.
387*4882a593SmuzhiyunDirectories that would typically not be needed by other recipes at build
388*4882a593Smuzhiyuntime (e.g. ``/etc``) are not copied by default.
389*4882a593Smuzhiyun
390*4882a593SmuzhiyunFor information on what directories are copied by default, see the
391*4882a593Smuzhiyun:term:`SYSROOT_DIRS* <SYSROOT_DIRS>` variables. You can change
392*4882a593Smuzhiyunthese variables inside your recipe if you need to make additional (or
393*4882a593Smuzhiyunfewer) directories available to other recipes at build time.
394*4882a593Smuzhiyun
395*4882a593SmuzhiyunThe ``do_populate_sysroot`` task is a shared state (sstate) task, which
396*4882a593Smuzhiyunmeans that the task can be accelerated through sstate use. Realize also
397*4882a593Smuzhiyunthat if the task is re-executed, any previous output is removed (i.e.
398*4882a593Smuzhiyun"cleaned").
399*4882a593Smuzhiyun
400*4882a593Smuzhiyun.. _ref-tasks-prepare_recipe_sysroot:
401*4882a593Smuzhiyun
402*4882a593Smuzhiyun``do_prepare_recipe_sysroot``
403*4882a593Smuzhiyun-----------------------------
404*4882a593Smuzhiyun
405*4882a593SmuzhiyunInstalls the files into the individual recipe specific sysroots (i.e.
406*4882a593Smuzhiyun``recipe-sysroot`` and ``recipe-sysroot-native`` under
407*4882a593Smuzhiyun``${``\ :term:`WORKDIR`\ ``}`` based upon the
408*4882a593Smuzhiyundependencies specified by :term:`DEPENDS`). See the
409*4882a593Smuzhiyun":ref:`staging <ref-classes-staging>`" class for more information.
410*4882a593Smuzhiyun
411*4882a593Smuzhiyun.. _ref-tasks-rm_work:
412*4882a593Smuzhiyun
413*4882a593Smuzhiyun``do_rm_work``
414*4882a593Smuzhiyun--------------
415*4882a593Smuzhiyun
416*4882a593SmuzhiyunRemoves work files after the OpenEmbedded build system has finished with
417*4882a593Smuzhiyunthem. You can learn more by looking at the
418*4882a593Smuzhiyun":ref:`ref-classes-rm-work`" section.
419*4882a593Smuzhiyun
420*4882a593Smuzhiyun.. _ref-tasks-unpack:
421*4882a593Smuzhiyun
422*4882a593Smuzhiyun``do_unpack``
423*4882a593Smuzhiyun-------------
424*4882a593Smuzhiyun
425*4882a593SmuzhiyunUnpacks the source code into a working directory pointed to by
426*4882a593Smuzhiyun``${``\ :term:`WORKDIR`\ ``}``. The :term:`S`
427*4882a593Smuzhiyunvariable also plays a role in where unpacked source files ultimately
428*4882a593Smuzhiyunreside. For more information on how source files are unpacked, see the
429*4882a593Smuzhiyun":ref:`overview-manual/concepts:source fetching`"
430*4882a593Smuzhiyunsection in the Yocto Project Overview and Concepts Manual and also see
431*4882a593Smuzhiyunthe :term:`WORKDIR` and :term:`S` variable descriptions.
432*4882a593Smuzhiyun
433*4882a593SmuzhiyunManually Called Tasks
434*4882a593Smuzhiyun=====================
435*4882a593Smuzhiyun
436*4882a593SmuzhiyunThese tasks are typically manually triggered (e.g. by using the
437*4882a593Smuzhiyun``bitbake -c`` command-line option):
438*4882a593Smuzhiyun
439*4882a593Smuzhiyun``do_checkuri``
440*4882a593Smuzhiyun---------------
441*4882a593Smuzhiyun
442*4882a593SmuzhiyunValidates the :term:`SRC_URI` value.
443*4882a593Smuzhiyun
444*4882a593Smuzhiyun.. _ref-tasks-clean:
445*4882a593Smuzhiyun
446*4882a593Smuzhiyun``do_clean``
447*4882a593Smuzhiyun------------
448*4882a593Smuzhiyun
449*4882a593SmuzhiyunRemoves all output files for a target from the
450*4882a593Smuzhiyun:ref:`ref-tasks-unpack` task forward (i.e. ``do_unpack``,
451*4882a593Smuzhiyun:ref:`ref-tasks-configure`,
452*4882a593Smuzhiyun:ref:`ref-tasks-compile`,
453*4882a593Smuzhiyun:ref:`ref-tasks-install`, and
454*4882a593Smuzhiyun:ref:`ref-tasks-package`).
455*4882a593Smuzhiyun
456*4882a593SmuzhiyunYou can run this task using BitBake as follows::
457*4882a593Smuzhiyun
458*4882a593Smuzhiyun   $ bitbake -c clean recipe
459*4882a593Smuzhiyun
460*4882a593SmuzhiyunRunning this task does not remove the
461*4882a593Smuzhiyun:ref:`sstate <overview-manual/concepts:shared state cache>` cache files.
462*4882a593SmuzhiyunConsequently, if no changes have been made and the recipe is rebuilt
463*4882a593Smuzhiyunafter cleaning, output files are simply restored from the sstate cache.
464*4882a593SmuzhiyunIf you want to remove the sstate cache files for the recipe, you need to
465*4882a593Smuzhiyunuse the :ref:`ref-tasks-cleansstate` task instead
466*4882a593Smuzhiyun(i.e. ``bitbake -c cleansstate`` recipe).
467*4882a593Smuzhiyun
468*4882a593Smuzhiyun.. _ref-tasks-cleanall:
469*4882a593Smuzhiyun
470*4882a593Smuzhiyun``do_cleanall``
471*4882a593Smuzhiyun---------------
472*4882a593Smuzhiyun
473*4882a593SmuzhiyunRemoves all output files, shared state
474*4882a593Smuzhiyun(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache, and
475*4882a593Smuzhiyundownloaded source files for a target (i.e. the contents of
476*4882a593Smuzhiyun:term:`DL_DIR`). Essentially, the ``do_cleanall`` task is
477*4882a593Smuzhiyunidentical to the :ref:`ref-tasks-cleansstate` task
478*4882a593Smuzhiyunwith the added removal of downloaded source files.
479*4882a593Smuzhiyun
480*4882a593SmuzhiyunYou can run this task using BitBake as follows::
481*4882a593Smuzhiyun
482*4882a593Smuzhiyun   $ bitbake -c cleanall recipe
483*4882a593Smuzhiyun
484*4882a593SmuzhiyunTypically, you would not normally use the ``cleanall`` task. Do so only
485*4882a593Smuzhiyunif you want to start fresh with the :ref:`ref-tasks-fetch`
486*4882a593Smuzhiyuntask.
487*4882a593Smuzhiyun
488*4882a593Smuzhiyun.. _ref-tasks-cleansstate:
489*4882a593Smuzhiyun
490*4882a593Smuzhiyun``do_cleansstate``
491*4882a593Smuzhiyun------------------
492*4882a593Smuzhiyun
493*4882a593SmuzhiyunRemoves all output files and shared state
494*4882a593Smuzhiyun(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache for a
495*4882a593Smuzhiyuntarget. Essentially, the ``do_cleansstate`` task is identical to the
496*4882a593Smuzhiyun:ref:`ref-tasks-clean` task with the added removal of
497*4882a593Smuzhiyunshared state (:ref:`sstate <overview-manual/concepts:shared state cache>`)
498*4882a593Smuzhiyuncache.
499*4882a593Smuzhiyun
500*4882a593SmuzhiyunYou can run this task using BitBake as follows::
501*4882a593Smuzhiyun
502*4882a593Smuzhiyun   $ bitbake -c cleansstate recipe
503*4882a593Smuzhiyun
504*4882a593SmuzhiyunWhen you run the ``do_cleansstate`` task, the OpenEmbedded build system
505*4882a593Smuzhiyunno longer uses any sstate. Consequently, building the recipe from
506*4882a593Smuzhiyunscratch is guaranteed.
507*4882a593Smuzhiyun
508*4882a593Smuzhiyun.. note::
509*4882a593Smuzhiyun
510*4882a593Smuzhiyun   The ``do_cleansstate`` task cannot remove sstate from a remote sstate
511*4882a593Smuzhiyun   mirror. If you need to build a target from scratch using remote mirrors, use
512*4882a593Smuzhiyun   the "-f" option as follows::
513*4882a593Smuzhiyun
514*4882a593Smuzhiyun      $ bitbake -f -c do_cleansstate target
515*4882a593Smuzhiyun
516*4882a593Smuzhiyun
517*4882a593Smuzhiyun.. _ref-tasks-pydevshell:
518*4882a593Smuzhiyun
519*4882a593Smuzhiyun``do_pydevshell``
520*4882a593Smuzhiyun-----------------
521*4882a593Smuzhiyun
522*4882a593SmuzhiyunStarts a shell in which an interactive Python interpreter allows you to
523*4882a593Smuzhiyuninteract with the BitBake build environment. From within this shell, you
524*4882a593Smuzhiyuncan directly examine and set bits from the data store and execute
525*4882a593Smuzhiyunfunctions as if within the BitBake environment. See the ":ref:`dev-manual/common-tasks:using a python development shell`" section in
526*4882a593Smuzhiyunthe Yocto Project Development Tasks Manual for more information about
527*4882a593Smuzhiyunusing ``pydevshell``.
528*4882a593Smuzhiyun
529*4882a593Smuzhiyun.. _ref-tasks-devshell:
530*4882a593Smuzhiyun
531*4882a593Smuzhiyun``do_devshell``
532*4882a593Smuzhiyun---------------
533*4882a593Smuzhiyun
534*4882a593SmuzhiyunStarts a shell whose environment is set up for development, debugging,
535*4882a593Smuzhiyunor both. See the ":ref:`dev-manual/common-tasks:using a development shell`" section in the
536*4882a593SmuzhiyunYocto Project Development Tasks Manual for more information about using
537*4882a593Smuzhiyun``devshell``.
538*4882a593Smuzhiyun
539*4882a593Smuzhiyun.. _ref-tasks-listtasks:
540*4882a593Smuzhiyun
541*4882a593Smuzhiyun``do_listtasks``
542*4882a593Smuzhiyun----------------
543*4882a593Smuzhiyun
544*4882a593SmuzhiyunLists all defined tasks for a target.
545*4882a593Smuzhiyun
546*4882a593Smuzhiyun.. _ref-tasks-package_index:
547*4882a593Smuzhiyun
548*4882a593Smuzhiyun``do_package_index``
549*4882a593Smuzhiyun--------------------
550*4882a593Smuzhiyun
551*4882a593SmuzhiyunCreates or updates the index in the :ref:`overview-manual/concepts:package feeds` area.
552*4882a593Smuzhiyun
553*4882a593Smuzhiyun.. note::
554*4882a593Smuzhiyun
555*4882a593Smuzhiyun   This task is not triggered with the ``bitbake -c`` command-line option as
556*4882a593Smuzhiyun   are the other tasks in this section. Because this task is specifically for
557*4882a593Smuzhiyun   the ``package-index`` recipe, you run it using ``bitbake package-index``.
558*4882a593Smuzhiyun
559*4882a593SmuzhiyunImage-Related Tasks
560*4882a593Smuzhiyun===================
561*4882a593Smuzhiyun
562*4882a593SmuzhiyunThe following tasks are applicable to image recipes.
563*4882a593Smuzhiyun
564*4882a593Smuzhiyun.. _ref-tasks-bootimg:
565*4882a593Smuzhiyun
566*4882a593Smuzhiyun``do_bootimg``
567*4882a593Smuzhiyun--------------
568*4882a593Smuzhiyun
569*4882a593SmuzhiyunCreates a bootable live image. See the
570*4882a593Smuzhiyun:term:`IMAGE_FSTYPES` variable for additional
571*4882a593Smuzhiyuninformation on live image types.
572*4882a593Smuzhiyun
573*4882a593Smuzhiyun.. _ref-tasks-bundle_initramfs:
574*4882a593Smuzhiyun
575*4882a593Smuzhiyun``do_bundle_initramfs``
576*4882a593Smuzhiyun-----------------------
577*4882a593Smuzhiyun
578*4882a593SmuzhiyunCombines an initial RAM disk (initramfs) image and kernel together to
579*4882a593Smuzhiyunform a single image. The
580*4882a593Smuzhiyun:term:`CONFIG_INITRAMFS_SOURCE` variable
581*4882a593Smuzhiyunhas some more information about these types of images.
582*4882a593Smuzhiyun
583*4882a593Smuzhiyun.. _ref-tasks-rootfs:
584*4882a593Smuzhiyun
585*4882a593Smuzhiyun``do_rootfs``
586*4882a593Smuzhiyun-------------
587*4882a593Smuzhiyun
588*4882a593SmuzhiyunCreates the root filesystem (file and directory structure) for an image.
589*4882a593SmuzhiyunSee the ":ref:`overview-manual/concepts:image generation`"
590*4882a593Smuzhiyunsection in the Yocto Project Overview and Concepts Manual for more
591*4882a593Smuzhiyuninformation on how the root filesystem is created.
592*4882a593Smuzhiyun
593*4882a593Smuzhiyun.. _ref-tasks-testimage:
594*4882a593Smuzhiyun
595*4882a593Smuzhiyun``do_testimage``
596*4882a593Smuzhiyun----------------
597*4882a593Smuzhiyun
598*4882a593SmuzhiyunBoots an image and performs runtime tests within the image. For
599*4882a593Smuzhiyuninformation on automatically testing images, see the
600*4882a593Smuzhiyun":ref:`dev-manual/common-tasks:performing automated runtime testing`"
601*4882a593Smuzhiyunsection in the Yocto Project Development Tasks Manual.
602*4882a593Smuzhiyun
603*4882a593Smuzhiyun.. _ref-tasks-testimage_auto:
604*4882a593Smuzhiyun
605*4882a593Smuzhiyun``do_testimage_auto``
606*4882a593Smuzhiyun---------------------
607*4882a593Smuzhiyun
608*4882a593SmuzhiyunBoots an image and performs runtime tests within the image immediately
609*4882a593Smuzhiyunafter it has been built. This task is enabled when you set
610*4882a593Smuzhiyun:term:`TESTIMAGE_AUTO` equal to "1".
611*4882a593Smuzhiyun
612*4882a593SmuzhiyunFor information on automatically testing images, see the
613*4882a593Smuzhiyun":ref:`dev-manual/common-tasks:performing automated runtime testing`"
614*4882a593Smuzhiyunsection in the Yocto Project Development Tasks Manual.
615*4882a593Smuzhiyun
616*4882a593SmuzhiyunKernel-Related Tasks
617*4882a593Smuzhiyun====================
618*4882a593Smuzhiyun
619*4882a593SmuzhiyunThe following tasks are applicable to kernel recipes. Some of these
620*4882a593Smuzhiyuntasks (e.g. the :ref:`ref-tasks-menuconfig` task) are
621*4882a593Smuzhiyunalso applicable to recipes that use Linux kernel style configuration
622*4882a593Smuzhiyunsuch as the BusyBox recipe.
623*4882a593Smuzhiyun
624*4882a593Smuzhiyun.. _ref-tasks-compile_kernelmodules:
625*4882a593Smuzhiyun
626*4882a593Smuzhiyun``do_compile_kernelmodules``
627*4882a593Smuzhiyun----------------------------
628*4882a593Smuzhiyun
629*4882a593SmuzhiyunRuns the step that builds the kernel modules (if needed). Building a
630*4882a593Smuzhiyunkernel consists of two steps: 1) the kernel (``vmlinux``) is built, and
631*4882a593Smuzhiyun2) the modules are built (i.e. ``make modules``).
632*4882a593Smuzhiyun
633*4882a593Smuzhiyun.. _ref-tasks-diffconfig:
634*4882a593Smuzhiyun
635*4882a593Smuzhiyun``do_diffconfig``
636*4882a593Smuzhiyun-----------------
637*4882a593Smuzhiyun
638*4882a593SmuzhiyunWhen invoked by the user, this task creates a file containing the
639*4882a593Smuzhiyundifferences between the original config as produced by
640*4882a593Smuzhiyun:ref:`ref-tasks-kernel_configme` task and the
641*4882a593Smuzhiyunchanges made by the user with other methods (i.e. using
642*4882a593Smuzhiyun(:ref:`ref-tasks-kernel_menuconfig`). Once the
643*4882a593Smuzhiyunfile of differences is created, it can be used to create a config
644*4882a593Smuzhiyunfragment that only contains the differences. You can invoke this task
645*4882a593Smuzhiyunfrom the command line as follows::
646*4882a593Smuzhiyun
647*4882a593Smuzhiyun   $ bitbake linux-yocto -c diffconfig
648*4882a593Smuzhiyun
649*4882a593SmuzhiyunFor more information, see the
650*4882a593Smuzhiyun":ref:`kernel-dev/common:creating configuration fragments`"
651*4882a593Smuzhiyunsection in the Yocto Project Linux Kernel Development Manual.
652*4882a593Smuzhiyun
653*4882a593Smuzhiyun.. _ref-tasks-kernel_checkout:
654*4882a593Smuzhiyun
655*4882a593Smuzhiyun``do_kernel_checkout``
656*4882a593Smuzhiyun----------------------
657*4882a593Smuzhiyun
658*4882a593SmuzhiyunConverts the newly unpacked kernel source into a form with which the
659*4882a593SmuzhiyunOpenEmbedded build system can work. Because the kernel source can be
660*4882a593Smuzhiyunfetched in several different ways, the ``do_kernel_checkout`` task makes
661*4882a593Smuzhiyunsure that subsequent tasks are given a clean working tree copy of the
662*4882a593Smuzhiyunkernel with the correct branches checked out.
663*4882a593Smuzhiyun
664*4882a593Smuzhiyun.. _ref-tasks-kernel_configcheck:
665*4882a593Smuzhiyun
666*4882a593Smuzhiyun``do_kernel_configcheck``
667*4882a593Smuzhiyun-------------------------
668*4882a593Smuzhiyun
669*4882a593SmuzhiyunValidates the configuration produced by the
670*4882a593Smuzhiyun:ref:`ref-tasks-kernel_menuconfig` task. The
671*4882a593Smuzhiyun``do_kernel_configcheck`` task produces warnings when a requested
672*4882a593Smuzhiyunconfiguration does not appear in the final ``.config`` file or when you
673*4882a593Smuzhiyunoverride a policy configuration in a hardware configuration fragment.
674*4882a593SmuzhiyunYou can run this task explicitly and view the output by using the
675*4882a593Smuzhiyunfollowing command::
676*4882a593Smuzhiyun
677*4882a593Smuzhiyun   $ bitbake linux-yocto -c kernel_configcheck -f
678*4882a593Smuzhiyun
679*4882a593SmuzhiyunFor more information, see the
680*4882a593Smuzhiyun":ref:`kernel-dev/common:validating configuration`"
681*4882a593Smuzhiyunsection in the Yocto Project Linux Kernel Development Manual.
682*4882a593Smuzhiyun
683*4882a593Smuzhiyun.. _ref-tasks-kernel_configme:
684*4882a593Smuzhiyun
685*4882a593Smuzhiyun``do_kernel_configme``
686*4882a593Smuzhiyun----------------------
687*4882a593Smuzhiyun
688*4882a593SmuzhiyunAfter the kernel is patched by the :ref:`ref-tasks-patch`
689*4882a593Smuzhiyuntask, the ``do_kernel_configme`` task assembles and merges all the
690*4882a593Smuzhiyunkernel config fragments into a merged configuration that can then be
691*4882a593Smuzhiyunpassed to the kernel configuration phase proper. This is also the time
692*4882a593Smuzhiyunduring which user-specified defconfigs are applied if present, and where
693*4882a593Smuzhiyunconfiguration modes such as ``--allnoconfig`` are applied.
694*4882a593Smuzhiyun
695*4882a593Smuzhiyun.. _ref-tasks-kernel_menuconfig:
696*4882a593Smuzhiyun
697*4882a593Smuzhiyun``do_kernel_menuconfig``
698*4882a593Smuzhiyun------------------------
699*4882a593Smuzhiyun
700*4882a593SmuzhiyunInvoked by the user to manipulate the ``.config`` file used to build a
701*4882a593Smuzhiyunlinux-yocto recipe. This task starts the Linux kernel configuration
702*4882a593Smuzhiyuntool, which you then use to modify the kernel configuration.
703*4882a593Smuzhiyun
704*4882a593Smuzhiyun.. note::
705*4882a593Smuzhiyun
706*4882a593Smuzhiyun   You can also invoke this tool from the command line as follows::
707*4882a593Smuzhiyun
708*4882a593Smuzhiyun           $ bitbake linux-yocto -c menuconfig
709*4882a593Smuzhiyun
710*4882a593Smuzhiyun
711*4882a593SmuzhiyunSee the ":ref:`kernel-dev/common:using \`\`menuconfig\`\``"
712*4882a593Smuzhiyunsection in the Yocto Project Linux Kernel Development Manual for more
713*4882a593Smuzhiyuninformation on this configuration tool.
714*4882a593Smuzhiyun
715*4882a593Smuzhiyun.. _ref-tasks-kernel_metadata:
716*4882a593Smuzhiyun
717*4882a593Smuzhiyun``do_kernel_metadata``
718*4882a593Smuzhiyun----------------------
719*4882a593Smuzhiyun
720*4882a593SmuzhiyunCollects all the features required for a given kernel build, whether the
721*4882a593Smuzhiyunfeatures come from :term:`SRC_URI` or from Git
722*4882a593Smuzhiyunrepositories. After collection, the ``do_kernel_metadata`` task
723*4882a593Smuzhiyunprocesses the features into a series of config fragments and patches,
724*4882a593Smuzhiyunwhich can then be applied by subsequent tasks such as
725*4882a593Smuzhiyun:ref:`ref-tasks-patch` and
726*4882a593Smuzhiyun:ref:`ref-tasks-kernel_configme`.
727*4882a593Smuzhiyun
728*4882a593Smuzhiyun.. _ref-tasks-menuconfig:
729*4882a593Smuzhiyun
730*4882a593Smuzhiyun``do_menuconfig``
731*4882a593Smuzhiyun-----------------
732*4882a593Smuzhiyun
733*4882a593SmuzhiyunRuns ``make menuconfig`` for the kernel. For information on
734*4882a593Smuzhiyun``menuconfig``, see the
735*4882a593Smuzhiyun":ref:`kernel-dev/common:using \`\`menuconfig\`\``"
736*4882a593Smuzhiyunsection in the Yocto Project Linux Kernel Development Manual.
737*4882a593Smuzhiyun
738*4882a593Smuzhiyun.. _ref-tasks-savedefconfig:
739*4882a593Smuzhiyun
740*4882a593Smuzhiyun``do_savedefconfig``
741*4882a593Smuzhiyun--------------------
742*4882a593Smuzhiyun
743*4882a593SmuzhiyunWhen invoked by the user, creates a defconfig file that can be used
744*4882a593Smuzhiyuninstead of the default defconfig. The saved defconfig contains the
745*4882a593Smuzhiyundifferences between the default defconfig and the changes made by the
746*4882a593Smuzhiyunuser using other methods (i.e. the
747*4882a593Smuzhiyun:ref:`ref-tasks-kernel_menuconfig` task. You
748*4882a593Smuzhiyuncan invoke the task using the following command::
749*4882a593Smuzhiyun
750*4882a593Smuzhiyun   $ bitbake linux-yocto -c savedefconfig
751*4882a593Smuzhiyun
752*4882a593Smuzhiyun.. _ref-tasks-shared_workdir:
753*4882a593Smuzhiyun
754*4882a593Smuzhiyun``do_shared_workdir``
755*4882a593Smuzhiyun---------------------
756*4882a593Smuzhiyun
757*4882a593SmuzhiyunAfter the kernel has been compiled but before the kernel modules have
758*4882a593Smuzhiyunbeen compiled, this task copies files required for module builds and
759*4882a593Smuzhiyunwhich are generated from the kernel build into the shared work
760*4882a593Smuzhiyundirectory. With these copies successfully copied, the
761*4882a593Smuzhiyun:ref:`ref-tasks-compile_kernelmodules` task
762*4882a593Smuzhiyuncan successfully build the kernel modules in the next step of the build.
763*4882a593Smuzhiyun
764*4882a593Smuzhiyun.. _ref-tasks-sizecheck:
765*4882a593Smuzhiyun
766*4882a593Smuzhiyun``do_sizecheck``
767*4882a593Smuzhiyun----------------
768*4882a593Smuzhiyun
769*4882a593SmuzhiyunAfter the kernel has been built, this task checks the size of the
770*4882a593Smuzhiyunstripped kernel image against
771*4882a593Smuzhiyun:term:`KERNEL_IMAGE_MAXSIZE`. If that
772*4882a593Smuzhiyunvariable was set and the size of the stripped kernel exceeds that size,
773*4882a593Smuzhiyunthe kernel build produces a warning to that effect.
774*4882a593Smuzhiyun
775*4882a593Smuzhiyun.. _ref-tasks-strip:
776*4882a593Smuzhiyun
777*4882a593Smuzhiyun``do_strip``
778*4882a593Smuzhiyun------------
779*4882a593Smuzhiyun
780*4882a593SmuzhiyunIf ``KERNEL_IMAGE_STRIP_EXTRA_SECTIONS`` is defined, this task strips
781*4882a593Smuzhiyunthe sections named in that variable from ``vmlinux``. This stripping is
782*4882a593Smuzhiyuntypically used to remove nonessential sections such as ``.comment``
783*4882a593Smuzhiyunsections from a size-sensitive configuration.
784*4882a593Smuzhiyun
785*4882a593Smuzhiyun.. _ref-tasks-validate_branches:
786*4882a593Smuzhiyun
787*4882a593Smuzhiyun``do_validate_branches``
788*4882a593Smuzhiyun------------------------
789*4882a593Smuzhiyun
790*4882a593SmuzhiyunAfter the kernel is unpacked but before it is patched, this task makes
791*4882a593Smuzhiyunsure that the machine and metadata branches as specified by the
792*4882a593Smuzhiyun:term:`SRCREV` variables actually exist on the specified
793*4882a593Smuzhiyunbranches. Otherwise, if :term:`AUTOREV` is not being used, the
794*4882a593Smuzhiyun``do_validate_branches`` task fails during the build.
795