blob: e6cf68670bd2a64945120627cf4966ec3046fc64 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='ref-tasks'>
6<title>Tasks</title>
7
8<para>
9 Tasks are units of execution for BitBake.
10 Recipes (<filename>.bb</filename> files) use tasks to complete
11 configuring, compiling, and packaging software.
12 This chapter provides a reference of the tasks defined in the
13 OpenEmbedded build system.
14</para>
15
16<section id='normal-recipe-build-tasks'>
17 <title>Normal Recipe Build Tasks</title>
18
19 <para>
20 The following sections describe normal tasks associated with building
21 a recipe.
Patrick Williamsc0f7c042017-02-23 20:41:17 -060022 For more information on tasks and dependencies, see the
23 "<ulink url='&YOCTO_DOCS_BB_URL;#tasks'>Tasks</ulink>" and
24 "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>"
25 sections in the BitBake User Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 </para>
27
28 <section id='ref-tasks-build'>
29 <title><filename>do_build</filename></title>
30
31 <para>
32 The default task for all recipes.
33 This task depends on all other normal tasks
34 required to build a recipe.
35 </para>
36 </section>
37
38 <section id='ref-tasks-compile'>
39 <title><filename>do_compile</filename></title>
40
41 <para>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060042 Compiles the source code.
43 This task runs with the current working directory set
44 to
45 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>.
46 </para>
47
48 <para>
49 The default behavior of this task is to run the
50 <filename>oe_runmake</filename> function if a makefile
51 (<filename>Makefile</filename>, <filename>makefile</filename>,
52 or <filename>GNUmakefile</filename>) is found.
53 If no such file is found, the <filename>do_compile</filename>
54 task does nothing.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050055 </para>
56 </section>
57
58 <section id='ref-tasks-compile_ptest_base'>
59 <title><filename>do_compile_ptest_base</filename></title>
60
61 <para>
62 Compiles the runtime test suite included in the software being
63 built.
64 </para>
65 </section>
66
67 <section id='ref-tasks-configure'>
68 <title><filename>do_configure</filename></title>
69
70 <para>
71 Configures the source by enabling and disabling any build-time and
72 configuration options for the software being built.
Patrick Williamsc0f7c042017-02-23 20:41:17 -060073 The task runs with the current working directory set to
74 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>.
75 </para>
76
77 <para>
78 The default behavior of this task is to run
79 <filename>oe_runmake clean</filename> if a makefile
80 (<filename>Makefile</filename>, <filename>makefile</filename>,
81 or <filename>GNUmakefile</filename>) is found and
82 <link linkend='var-CLEANBROKEN'><filename>CLEANBROKEN</filename></link>
83 is not set to "1".
84 If no such file is found or the <filename>CLEANBROKEN</filename>
85 variable is set to "1", the <filename>do_configure</filename>
86 task does nothing.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050087 </para>
88 </section>
89
90 <section id='ref-tasks-configure_ptest_base'>
91 <title><filename>do_configure_ptest_base</filename></title>
92
93 <para>
94 Configures the runtime test suite included in the software being
95 built.
96 </para>
97 </section>
98
99 <section id='ref-tasks-deploy'>
100 <title><filename>do_deploy</filename></title>
101
102 <para>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600103 Writes output files that are to be deployed to
104 <filename>${</filename><link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link><filename>}</filename>.
105 The task runs with the current working directory set to
106 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500107 </para>
108
109 <para>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600110 Recipes implementing this task should inherit the
111 <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
112 class and should write the output to
113 <filename>${</filename><link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link><filename>}</filename>,
Brad Bishop316dfdd2018-06-25 12:45:53 -0400114 which is not to be confused with <filename>${DEPLOY_DIR}</filename>.
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600115 The <filename>deploy</filename> class sets up
116 <filename>do_deploy</filename> as a shared state (sstate) task that
117 can be accelerated through sstate use.
118 The sstate mechanism takes care of copying the output from
119 <filename>${DEPLOYDIR}</filename> to
120 <filename>${DEPLOY_DIR_IMAGE}</filename>.
121 <note>
122 <title>Caution</title>
123 Do not write the output directly to
124 <filename>${DEPLOY_DIR_IMAGE}</filename>, as this causes
125 the sstate mechanism to malfunction.
126 </note>
127 </para>
128
129 <para>
130 The <filename>do_deploy</filename> task is not added as a task
131 by default and consequently needs to be added manually.
132 If you want the task to run after
133 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
134 you can add it by doing the following:
135 <literallayout class='monospaced'>
136 addtask deploy after do_compile
137 </literallayout>
138 Adding <filename>do_deploy</filename> after other tasks works the
139 same way.
140 <note>
141 You do not need to add <filename>before do_build</filename>
142 to the <filename>addtask</filename> command (though it is
143 harmless), because the
144 <link linkend='ref-classes-base'><filename>base</filename></link>
145 class contains the following:
146 <literallayout class='monospaced'>
147 do_build[recrdeptask] += "do_deploy"
148 </literallayout>
149 See the
150 "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>"
151 section in the BitBake User Manual for more information.
152 </note>
153 </para>
154
155 <para>
156 If the <filename>do_deploy</filename> task re-executes, any
157 previous output is removed (i.e. "cleaned").
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500158 </para>
159 </section>
160
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500161 <section id='ref-tasks-distrodata'>
162 <title><filename>do_distrodata</filename></title>
163
164 <para>
165 Provides information about the recipe.
166 </para>
167
168 <para>
169 The <filename>distrodata</filename> task is included as part of the
170 <link linkend='ref-classes-distrodata'><filename>distrodata</filename></link>
171 class.
172 </para>
173
174 <para>
175 To build the <filename>distrodata</filename> task, use the
176 <filename>bitbake</filename> command with the "-c" option and
177 task name:
178 <literallayout class='monospaced'>
179 $ bitbake core-image-minimal -c distrodata
180 </literallayout>
181 By default, the results are stored in
182 <link linkend='var-LOG_DIR'><filename>$LOG_DIR</filename></link>
183 (e.g. <filename>$BUILD_DIR/tmp/log</filename>).
184 </para>
185 </section>
186
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500187 <section id='ref-tasks-fetch'>
188 <title><filename>do_fetch</filename></title>
189
190 <para>
191 Fetches the source code.
192 This task uses the
193 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
194 variable and the argument's prefix to determine the correct
195 fetcher module.
196 </para>
197 </section>
198
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500199 <section id='ref-tasks-image'>
200 <title><filename>do_image</filename></title>
201
202 <para>
203 Starts the image generation process.
204 The <filename>do_image</filename> task runs after the
205 OpenEmbedded build system has run the
206 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
207 task during which packages are identified for installation into
208 the image and the root filesystem is created, complete with
209 post-processing.
210 </para>
211
212 <para>
213 The <filename>do_image</filename> task performs pre-processing
214 on the image through the
215 <link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link>
216 and dynamically generates supporting
217 <filename>do_image_*</filename> tasks as needed.
218 </para>
219
220 <para>
221 For more information on image creation, see the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400222 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
223 section in the Yocto Project Overview and Concepts Manual.
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500224 </para>
225 </section>
226
227 <section id='ref-tasks-image-complete'>
228 <title><filename>do_image_complete</filename></title>
229
230 <para>
231 Completes the image generation process.
232 The <filename>do_image_complete</filename> task runs after the
233 OpenEmbedded build system has run the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400234 <link linkend='ref-tasks-image'><filename>do_image</filename></link>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500235 task during which image pre-processing occurs and through
236 dynamically generated <filename>do_image_*</filename> tasks the
237 image is constructed.
238 </para>
239
240 <para>
241 The <filename>do_image_complete</filename> task performs
242 post-processing on the image through the
243 <link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>.
244 </para>
245
246 <para>
247 For more information on image creation, see the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400248 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
249 section in the Yocto Project Overview and Concepts Manual.
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500250 </para>
251 </section>
252
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500253 <section id='ref-tasks-install'>
254 <title><filename>do_install</filename></title>
255
256 <para>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600257 Copies files that are to be packaged into the holding area
258 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>.
259 This task runs with the current working directory set to
260 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>,
261 which is the compilation directory.
262 The <filename>do_install</filename> task, as well as other tasks
263 that either directly or indirectly depend on the installed files
264 (e.g.
265 <link linkend='ref-tasks-package'><filename>do_package</filename></link>,
266 <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link>,
267 and
268 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>),
269 run under
Brad Bishop316dfdd2018-06-25 12:45:53 -0400270 <ulink url='&YOCTO_DOCS_OM_URL;#fakeroot-and-pseudo'>fakeroot</ulink>.
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600271 <note>
272 <title>Caution</title>
273
274 <para>
275 When installing files, be careful not to set the owner and
276 group IDs of the installed files to unintended values.
277 Some methods of copying files, notably when using the
278 recursive <filename>cp</filename> command, can preserve the
279 UID and/or GID of the original file, which is usually not
280 what you want.
281 The
Brad Bishop316dfdd2018-06-25 12:45:53 -0400282 <link linkend='insane-host-user-contaminated'><filename>host-user-contaminated</filename></link>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600283 QA check checks for files that probably have the wrong
284 ownership.
285 </para>
286
287 <para>
288 Safe methods for installing files include the following:
289 <itemizedlist>
290 <listitem><para>
291 The <filename>install</filename> utility.
292 This utility is the preferred method.
293 </para></listitem>
294 <listitem><para>
295 The <filename>cp</filename> command with the
296 "--no-preserve=ownership" option.
297 </para></listitem>
298 <listitem><para>
299 The <filename>tar</filename> command with the
300 "--no-same-owner" option.
301 See the <filename>bin_package.bbclass</filename>
302 file in the <filename>meta/classes</filename>
303 directory of the
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500304 <link linkend='source-directory'>Source Directory</link>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600305 for an example.
306 </para></listitem>
307 </itemizedlist>
308 </para>
309 </note>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500310 </para>
311 </section>
312
313 <section id='ref-tasks-install_ptest_base'>
314 <title><filename>do_install_ptest_base</filename></title>
315
316 <para>
317 Copies the runtime test suite files from the compilation directory
318 to a holding area.
319 </para>
320 </section>
321
322 <section id='ref-tasks-package'>
323 <title><filename>do_package</filename></title>
324
325 <para>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600326 Analyzes the content of the holding area
327 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
328 and splits the content into subsets based on available packages
329 and files.
330 This task makes use of the
331 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
332 and
333 <link linkend='var-FILES'><filename>FILES</filename></link>
334 variables.
335 </para>
336
337 <para>
338 The <filename>do_package</filename> task, in conjunction with the
339 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
340 task, also saves some important package metadata.
341 For additional information, see the
342 <link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link>
343 variable and the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400344 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
345 section in the Yocto Project Overview and Concepts Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500346 </para>
347 </section>
348
349 <section id='ref-tasks-package_qa'>
350 <title><filename>do_package_qa</filename></title>
351
352 <para>
353 Runs QA checks on packaged files.
354 For more information on these checks, see the
355 <link linkend='ref-classes-insane'><filename>insane</filename></link>
356 class.
357 </para>
358 </section>
359
360 <section id='ref-tasks-package_write_deb'>
361 <title><filename>do_package_write_deb</filename></title>
362
363 <para>
364 Creates Debian packages (i.e. <filename>*.deb</filename> files) and
365 places them in the
366 <filename>${</filename><link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link><filename>}</filename>
367 directory in the package feeds area.
368 For more information, see the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400369 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
370 section in the Yocto Project Overview and Concepts Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500371 </para>
372 </section>
373
374 <section id='ref-tasks-package_write_ipk'>
375 <title><filename>do_package_write_ipk</filename></title>
376
377 <para>
378 Creates IPK packages (i.e. <filename>*.ipk</filename> files) and
379 places them in the
380 <filename>${</filename><link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link><filename>}</filename>
381 directory in the package feeds area.
382 For more information, see the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400383 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
384 section in the Yocto Project Overview and Concepts Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500385 </para>
386 </section>
387
388 <section id='ref-tasks-package_write_rpm'>
389 <title><filename>do_package_write_rpm</filename></title>
390
391 <para>
392 Creates RPM packages (i.e. <filename>*.rpm</filename> files) and
393 places them in the
394 <filename>${</filename><link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link><filename>}</filename>
395 directory in the package feeds area.
396 For more information, see the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400397 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
398 section in the Yocto Project Overview and Concepts Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500399 </para>
400 </section>
401
402 <section id='ref-tasks-package_write_tar'>
403 <title><filename>do_package_write_tar</filename></title>
404
405 <para>
406 Creates tarballs and places them in the
407 <filename>${</filename><link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link><filename>}</filename>
408 directory in the package feeds area.
409 For more information, see the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400410 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
411 section in the Yocto Project Overview and Concepts Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500412 </para>
413 </section>
414
415 <section id='ref-tasks-packagedata'>
416 <title><filename>do_packagedata</filename></title>
417
418 <para>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600419 Saves package metadata generated by the
420 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
421 task in
422 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
423 to make it available globally.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500424 </para>
425 </section>
426
427 <section id='ref-tasks-patch'>
428 <title><filename>do_patch</filename></title>
429
430 <para>
431 Locates patch files and applies them to the source code.
Brad Bishop316dfdd2018-06-25 12:45:53 -0400432 </para>
433
434 <para>
435 After fetching and unpacking source files, the build system
436 uses the recipe's
437 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
438 statements to locate and apply patch files to the source code.
439 <note>
440 The build system uses the
441 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
442 variable to determine the default set of directories when
443 searching for patches.
444 </note>
445 Patch files, by default, are <filename>*.patch</filename> and
446 <filename>*.diff</filename> files created and kept in a
447 subdirectory of the directory holding the recipe file.
448 For example, consider the
449 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/bluez5'><filename>bluez5</filename></ulink>
450 recipe from the OE-Core layer (i.e.
451 <filename>poky/meta</filename>):
452 <literallayout class='monospaced'>
453 poky/meta/recipes-connectivity/bluez5
454 </literallayout>
455 This recipe has two patch files located here:
456 <literallayout class='monospaced'>
457 poky/meta/recipes-connectivity/bluez5/bluez5
458 </literallayout>
459 </para>
460
461 <para>
462 In the <filename>bluez5</filename> recipe, the
463 <filename>SRC_URI</filename> statements point to the source and
464 patch files needed to build the package.
465 <note>
466 In the case for the <filename>bluez5_5.48.bb</filename>
467 recipe, the <filename>SRC_URI</filename> statements are from an
468 include file <filename>bluez5.inc</filename>.
469 </note>
470 </para>
471
472 <para>
473 As mentioned earlier, the build system treats files whose file
474 types are <filename>.patch</filename> and
475 <filename>.diff</filename> as patch files.
476 However, you can use the "apply=yes" parameter with the
477 <filename>SRC_URI</filename> statement to indicate any file as a
478 patch file:
479 <literallayout class='monospaced'>
480 SRC_URI = " \
481 git://<replaceable>path_to_repo</replaceable>/<replaceable>some_package</replaceable> \
482 file://<replaceable>file</replaceable>;apply=yes \
483 "
484 </literallayout>
485 </para>
486
487 <para>
488 Conversely, if you have a directory full of patch files and you
489 want to exclude some so that the <filename>do_patch</filename>
490 task does not apply them during the patch phase, you can use
491 the "apply=no" parameter with the <filename>SRC_URI</filename>
492 statement:
493 <literallayout class='monospaced'>
494 SRC_URI = " \
495 git://<replaceable>path_to_repo</replaceable>/<replaceable>some_package</replaceable> \
496 file://<replaceable>path_to_lots_of_patch_files</replaceable> \
497 file://<replaceable>path_to_lots_of_patch_files</replaceable>/<replaceable>patch_file5</replaceable>;apply=no \
498 "
499 </literallayout>
500 In the previous example, assuming all the files in the directory
501 holding the patch files end with either <filename>.patch</filename>
502 or <filename>.diff</filename>, every file would be applied as a
503 patch by default except for the
504 <replaceable>patch_file5</replaceable> patch.
505 </para>
506
507 <para>
508 You can find out more about the patching process in the
509 "<ulink url='&YOCTO_DOCS_OM_URL;#patching-dev-environment'>Patching</ulink>"
510 section in the Yocto Project Overview and Concepts Manual and the
511 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code'>Patching Code</ulink>"
512 section in the Yocto Project Development Tasks Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500513 </para>
514 </section>
515
516 <section id='ref-tasks-populate_lic'>
517 <title><filename>do_populate_lic</filename></title>
518
519 <para>
520 Writes license information for the recipe that is collected later
521 when the image is constructed.
522 </para>
523 </section>
524
525 <section id='ref-tasks-populate_sdk'>
526 <title><filename>do_populate_sdk</filename></title>
527
528 <para>
529 Creates the file and directory structure for an installable SDK.
530 See the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400531 "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-generation-dev-environment'>SDK Generation</ulink>"
532 section in the Yocto Project Overview and Concepts Manual for more
533 information.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500534 </para>
535 </section>
536
537 <section id='ref-tasks-populate_sysroot'>
538 <title><filename>do_populate_sysroot</filename></title>
539
540 <para>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600541 Stages (copies) a subset of the files installed by the
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500542 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600543 task into the appropriate sysroot.
544 For information on how to access these files from other recipes,
545 see the
546 <link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR*</filename></link>
547 variables.
548 Directories that would typically not be needed by other recipes at
549 build time (e.g. <filename>/etc</filename>) are not copied by
550 default.
551 </para>
552
553 <para>
554 For information on what directories are copied by default, see the
555 <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS*</filename></link>
556 variables.
557 You can change these variables inside your recipe if you need
558 to make additional (or fewer) directories available to other
559 recipes at build time.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500560 </para>
561
562 <para>
563 The <filename>do_populate_sysroot</filename> task is a
564 shared state (sstate) task, which means that the task can
565 be accelerated through sstate use.
566 Realize also that if the task is re-executed, any previous output
567 is removed (i.e. "cleaned").
568 </para>
569 </section>
570
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500571 <section id='ref-tasks-prepare_recipe_sysroot'>
572 <title><filename>do_prepare_recipe_sysroot</filename></title>
573
574 <para>
575 Installs the files into the individual recipe specific sysroots
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500576 (i.e. <filename>recipe-sysroot</filename> and
577 <filename>recipe-sysroot-native</filename> under
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500578 <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>
579 based upon the dependencies specified by
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500580 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>).
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500581 See the
582 "<link linkend='ref-classes-staging'><filename>staging</filename></link>"
583 class for more information.
584 </para>
585 </section>
586
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500587 <section id='ref-tasks-rm_work'>
588 <title><filename>do_rm_work</filename></title>
589
590 <para>
591 Removes work files after the OpenEmbedded build system has
592 finished with them.
593 You can learn more by looking at the
594 "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>"
595 section.
596 </para>
597 </section>
598
599 <section id='ref-tasks-rm_work_all'>
600 <title><filename>do_rm_work_all</filename></title>
601
602 <para>
603 Top-level task for removing work files after the build system has
604 finished with them.
605 </para>
606 </section>
607
608 <section id='ref-tasks-unpack'>
609 <title><filename>do_unpack</filename></title>
610
611 <para>
612 Unpacks the source code into a working directory pointed to
613 by
614 <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>.
615 The
616 <link linkend='var-S'><filename>S</filename></link> variable also
617 plays a role in where unpacked source files ultimately reside.
618 For more information on how source files are unpacked, see the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400619 "<ulink url='&YOCTO_DOCS_OM_URL;#source-fetching-dev-environment'>Source Fetching</ulink>"
620 section in the Yocto Project Overview and Concepts Manual and also
621 see the <filename>WORKDIR</filename> and
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500622 <filename>S</filename> variable descriptions.
623 </para>
624 </section>
625</section>
626
627<section id='manually-called-tasks'>
628 <title>Manually Called Tasks</title>
629
630 <para>
631 These tasks are typically manually triggered (e.g. by using the
632 <filename>bitbake -c</filename> command-line option):
633 </para>
634
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600635 <section id='ref-tasks-checkpkg'>
636 <title><filename>do_checkpkg</filename></title>
637
638 <para>
639 Provides information about the recipe including its upstream
640 version and status.
641 The upstream version and status reveals whether or not a version
642 of the recipe exists upstream and a status of not updated, updated,
643 or unknown.
644 </para>
645
646 <para>
647 The <filename>checkpkg</filename> task is included as part of the
648 <link linkend='ref-classes-distrodata'><filename>distrodata</filename></link>
649 class.
650 </para>
651
652 <para>
653 To build the <filename>checkpkg</filename> task, use the
654 <filename>bitbake</filename> command with the "-c" option and
655 task name:
656 <literallayout class='monospaced'>
657 $ bitbake core-image-minimal -c checkpkg
658 </literallayout>
659 By default, the results are stored in
660 <link linkend='var-LOG_DIR'><filename>$LOG_DIR</filename></link>
661 (e.g. <filename>$BUILD_DIR/tmp/log</filename>).
662 </para>
663 </section>
664
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500665 <section id='ref-tasks-checkuri'>
666 <title><filename>do_checkuri</filename></title>
667
668 <para>
669 Validates the
670 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
671 value.
672 </para>
673 </section>
674
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500675 <section id='ref-tasks-clean'>
676 <title><filename>do_clean</filename></title>
677
678 <para>
679 Removes all output files for a target from the
680 <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400681 task forward (i.e. <filename>do_unpack</filename>,
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500682 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>,
683 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
684 <link linkend='ref-tasks-install'><filename>do_install</filename></link>,
685 and
686 <link linkend='ref-tasks-package'><filename>do_package</filename></link>).
687 </para>
688
689 <para>
690 You can run this task using BitBake as follows:
691 <literallayout class='monospaced'>
692 $ bitbake -c clean <replaceable>recipe</replaceable>
693 </literallayout>
694 </para>
695
696 <para>
697 Running this task does not remove the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400698 <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>
699 cache files.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500700 Consequently, if no changes have been made and the recipe is
701 rebuilt after cleaning, output files are simply restored from the
702 sstate cache.
703 If you want to remove the sstate cache files for the recipe,
704 you need to use the
705 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
706 task instead (i.e. <filename>bitbake -c cleansstate</filename> <replaceable>recipe</replaceable>).
707 </para>
708 </section>
709
710 <section id='ref-tasks-cleanall'>
711 <title><filename>do_cleanall</filename></title>
712
713 <para>
714 Removes all output files, shared state
Brad Bishop316dfdd2018-06-25 12:45:53 -0400715 (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
716 cache, and downloaded source files for a target (i.e. the contents
717 of
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500718 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>).
719 Essentially, the <filename>do_cleanall</filename> task is
720 identical to the
721 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
722 task with the added removal of downloaded source files.
723 </para>
724
725 <para>
726 You can run this task using BitBake as follows:
727 <literallayout class='monospaced'>
728 $ bitbake -c cleanall <replaceable>recipe</replaceable>
729 </literallayout>
730 </para>
731
732 <para>
733 Typically, you would not normally use the
734 <filename>cleanall</filename> task.
735 Do so only if you want to start fresh with the
736 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
737 task.
738 </para>
739 </section>
740
741 <section id='ref-tasks-cleansstate'>
742 <title><filename>do_cleansstate</filename></title>
743
744 <para>
745 Removes all output files and shared state
Brad Bishop316dfdd2018-06-25 12:45:53 -0400746 (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500747 cache for a target.
748 Essentially, the <filename>do_cleansstate</filename> task is
749 identical to the
750 <link linkend='ref-tasks-clean'><filename>do_clean</filename></link>
751 task with the added removal of shared state
Brad Bishop316dfdd2018-06-25 12:45:53 -0400752 (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
753 cache.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500754 </para>
755
756 <para>
757 You can run this task using BitBake as follows:
758 <literallayout class='monospaced'>
759 $ bitbake -c cleansstate <replaceable>recipe</replaceable>
760 </literallayout>
761 </para>
762
763 <para>
764 When you run the <filename>do_cleansstate</filename> task,
765 the OpenEmbedded build system no longer uses any
766 sstate.
767 Consequently, building the recipe from scratch is guaranteed.
768 <note>
769 The <filename>do_cleansstate</filename> task cannot remove
770 sstate from a remote sstate mirror.
771 If you need to build a target from scratch using remote
772 mirrors, use the "-f" option as follows:
773 <literallayout class='monospaced'>
774 $ bitbake -f -c do_cleansstate <replaceable>target</replaceable>
775 </literallayout>
776 </note>
777 </para>
778 </section>
779
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600780 <section id='ref-tasks-devpyshell'>
781 <title><filename>do_devpyshell</filename></title>
782
783 <para>
784 Starts a shell in which an interactive Python interpreter allows
785 you to interact with the BitBake build environment.
786 From within this shell, you can directly examine and set
787 bits from the data store and execute functions as if within
788 the BitBake environment.
789 See the
790 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devpyshell'>Using a Development Python Shell</ulink>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500791 section in the Yocto Project Development Tasks Manual for more
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600792 information about using <filename>devpyshell</filename>.
793 </para>
794 </section>
795
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500796 <section id='ref-tasks-devshell'>
797 <title><filename>do_devshell</filename></title>
798
799 <para>
800 Starts a shell whose environment is set up for
801 development, debugging, or both.
802 See the
803 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500804 section in the Yocto Project Development Tasks Manual for more
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500805 information about using <filename>devshell</filename>.
806 </para>
807 </section>
808
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500809 <section id='ref-tasks-listtasks'>
810 <title><filename>do_listtasks</filename></title>
811
812 <para>
813 Lists all defined tasks for a target.
814 </para>
815 </section>
816
817 <section id='ref-tasks-package_index'>
818 <title><filename>do_package_index</filename></title>
819
820 <para>
821 Creates or updates the index in the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400822 <ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500823 area.
824 <note>
825 This task is not triggered with the
826 <filename>bitbake -c</filename> command-line option as
827 are the other tasks in this section.
828 Because this task is specifically for the
829 <filename>package-index</filename> recipe,
830 you run it using
831 <filename>bitbake package-index</filename>.
832 </note>
833 </para>
834 </section>
835</section>
836
837<section id='image-related-tasks'>
838 <title>Image-Related Tasks</title>
839
840 <para>
841 The following tasks are applicable to image recipes.
842 </para>
843
844 <section id='ref-tasks-bootimg'>
845 <title><filename>do_bootimg</filename></title>
846
847 <para>
848 Creates a bootable live image.
849 See the
850 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
851 variable for additional information on live image types.
852 </para>
853 </section>
854
855 <section id='ref-tasks-bundle_initramfs'>
856 <title><filename>do_bundle_initramfs</filename></title>
857
858 <para>
859 Combines an initial RAM disk (initramfs) image and kernel
860 together to form a single image.
861 The
862 <link linkend='var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></link>
863 variable has some more information about these types of images.
864 </para>
865 </section>
866
867 <section id='ref-tasks-rootfs'>
868 <title><filename>do_rootfs</filename></title>
869
870 <para>
871 Creates the root filesystem (file and directory structure) for an
872 image.
873 See the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400874 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
875 section in the Yocto Project Overview and Concepts Manual for more
876 information on how the root filesystem is created.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500877 </para>
878 </section>
879
880 <section id='ref-tasks-testimage'>
881 <title><filename>do_testimage</filename></title>
882
883 <para>
884 Boots an image and performs runtime tests within the image.
885 For information on automatically testing images, see the
886 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500887 section in the Yocto Project Development Tasks Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500888 </para>
889 </section>
890
891 <section id='ref-tasks-testimage_auto'>
892 <title><filename>do_testimage_auto</filename></title>
893
894 <para>
895 Boots an image and performs runtime tests within the image
896 immediately after it has been built.
897 This task is enabled when you set
898 <link linkend='var-TEST_IMAGE'><filename>TEST_IMAGE</filename></link>
899 equal to "1".
900 </para>
901
902 <para>
903 For information on automatically testing images, see the
904 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500905 section in the Yocto Project Development Tasks Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500906 </para>
907 </section>
908</section>
909
910<section id='kernel-related-tasks'>
911 <title>Kernel-Related Tasks</title>
912
913 <para>
914 The following tasks are applicable to kernel recipes.
915 Some of these tasks (e.g. the
916 <link linkend='ref-tasks-menuconfig'><filename>do_menuconfig</filename></link>
917 task) are also applicable to recipes that use
918 Linux kernel style configuration such as the BusyBox recipe.
919 </para>
920
921 <section id='ref-tasks-compile_kernelmodules'>
922 <title><filename>do_compile_kernelmodules</filename></title>
923
924 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500925 Runs the step that builds the kernel modules (if needed).
926 Building a kernel consists of two steps: 1) the kernel
927 (<filename>vmlinux</filename>) is built, and 2) the modules
928 are built (i.e. <filename>make modules</filename>).
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500929 </para>
930 </section>
931
932 <section id='ref-tasks-diffconfig'>
933 <title><filename>do_diffconfig</filename></title>
934
935 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500936 When invoked by the user, this task creates a file containing the
937 differences between the original config as produced by
938 <link linkend='ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></link>
939 task and the changes made by the user with other methods
940 (i.e. using
941 (<link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link>).
942 Once the file of differences is created, it can be used to create
943 a config fragment that only contains the differences.
944 You can invoke this task from the command line as follows:
945 <literallayout class='monospaced'>
946 $ bitbake linux-yocto -c diffconfig
947 </literallayout>
948 For more information, see the
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500949 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500950 section in the Yocto Project Linux Kernel Development Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500951 </para>
952 </section>
953
954 <section id='ref-tasks-kernel_checkout'>
955 <title><filename>do_kernel_checkout</filename></title>
956
957 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500958 Converts the newly unpacked kernel source into a form with which
959 the OpenEmbedded build system can work.
960 Because the kernel source can be fetched in several different ways,
961 the <filename>do_kernel_checkout</filename> task makes sure that
962 subsequent tasks are given a clean working tree copy of the kernel
963 with the correct branches checked out.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500964 </para>
965 </section>
966
967 <section id='ref-tasks-kernel_configcheck'>
968 <title><filename>do_kernel_configcheck</filename></title>
969
970 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500971 Validates the configuration produced by the
972 <link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link>
973 task.
974 The <filename>do_kernel_configcheck</filename> task produces
975 warnings when a requested configuration does not appear in the
976 final <filename>.config</filename> file or when you override a
977 policy configuration in a hardware configuration fragment.
978 You can run this task explicitly and view the output by using
979 the following command:
980 <literallayout class='monospaced'>
981 $ bitbake linux-yocto -c kernel_configcheck -f
982 </literallayout>
983 For more information, see the
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500984 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#validating-configuration'>Validating Configuration</ulink>"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500985 section in the Yocto Project Linux Kernel Development Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500986 </para>
987 </section>
988
989 <section id='ref-tasks-kernel_configme'>
990 <title><filename>do_kernel_configme</filename></title>
991
992 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500993 After the kernel is patched by the
994 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
995 task, the <filename>do_kernel_configme</filename> task assembles
996 and merges all the kernel config fragments into a merged
997 configuration that can then be passed to the kernel configuration
998 phase proper.
999 This is also the time during which user-specified defconfigs
1000 are applied if present, and where configuration modes such as
1001 <filename>--allnoconfig</filename> are applied.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001002 </para>
1003 </section>
1004
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001005 <section id='ref-tasks-kernel_menuconfig'>
1006 <title><filename>do_kernel_menuconfig</filename></title>
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001007
1008 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001009 Invoked by the user to manipulate the
1010 <filename>.config</filename> file used to build a linux-yocto
1011 recipe.
1012 This task starts the Linux kernel configuration tool, which you
1013 then use to modify the kernel configuration.
1014 <note>
1015 You can also invoke this tool from the command line as
1016 follows:
1017 <literallayout class='monospaced'>
1018 $ bitbake linux-yocto -c menuconfig
1019 </literallayout>
1020 </note>
1021 See the
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001022 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001023 section in the Yocto Project Linux Kernel Development Manual
1024 for more information on this configuration tool.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001025 </para>
1026 </section>
1027
Patrick Williamsf1e5d692016-03-30 15:21:19 -05001028 <section id='ref-tasks-kernel_metadata'>
1029 <title><filename>do_kernel_metadata</filename></title>
1030
1031 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001032 Collects all the features required for a given kernel build,
1033 whether the features come from
1034 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
1035 or from Git repositories.
1036 After collection, the <filename>do_kernel_metadata</filename> task
1037 processes the features into a series of config fragments and
1038 patches, which can then be applied by subsequent tasks such as
1039 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
1040 and
1041 <link linkend='ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></link>.
Patrick Williamsf1e5d692016-03-30 15:21:19 -05001042 </para>
1043 </section>
1044
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001045 <section id='ref-tasks-menuconfig'>
1046 <title><filename>do_menuconfig</filename></title>
1047
1048 <para>
1049 Runs <filename>make menuconfig</filename> for the kernel.
1050 For information on <filename>menuconfig</filename>, see the
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001051 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using&nbsp;&nbsp;<filename>menuconfig</filename></ulink>"
1052 section in the Yocto Project Linux Kernel Development Manual.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001053 </para>
1054 </section>
1055
1056 <section id='ref-tasks-savedefconfig'>
1057 <title><filename>do_savedefconfig</filename></title>
1058
1059 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001060 When invoked by the user, creates a defconfig file that can be
1061 used instead of the default defconfig.
1062 The saved defconfig contains the differences between the default
1063 defconfig and the changes made by the user using other methods
1064 (i.e. the
1065 <link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link>
1066 task.
1067 You can invoke the task using the following command:
1068 <literallayout class='monospaced'>
1069 $ bitbake linux-yocto -c savedefconfig
1070 </literallayout>
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001071 </para>
1072 </section>
1073
Patrick Williamsf1e5d692016-03-30 15:21:19 -05001074 <section id='ref-tasks-shared_workdir'>
1075 <title><filename>do_shared_workdir</filename></title>
1076
1077 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001078 After the kernel has been compiled but before the kernel modules
1079 have been compiled, this task copies files required for module
1080 builds and which are generated from the kernel build into the
1081 shared work directory.
1082 With these copies successfully copied, the
1083 <link linkend='ref-tasks-compile_kernelmodules'><filename>do_compile_kernelmodules</filename></link>
1084 task can successfully build the kernel modules in the next step
1085 of the build.
Patrick Williamsf1e5d692016-03-30 15:21:19 -05001086 </para>
1087 </section>
1088
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001089 <section id='ref-tasks-sizecheck'>
1090 <title><filename>do_sizecheck</filename></title>
1091
1092 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001093 After the kernel has been built, this task checks the size of the
1094 stripped kernel image against
1095 <link linkend='var-KERNEL_IMAGE_MAXSIZE'><filename>KERNEL_IMAGE_MAXSIZE</filename></link>.
1096 If that variable was set and the size of the stripped kernel
1097 exceeds that size, the kernel build produces a warning to that
1098 effect.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001099 </para>
1100 </section>
1101
1102 <section id='ref-tasks-strip'>
1103 <title><filename>do_strip</filename></title>
1104
1105 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001106 If
1107 <filename>KERNEL_IMAGE_STRIP_EXTRA_SECTIONS</filename> is defined,
1108 this task strips the sections named in that variable from
1109 <filename>vmlinux</filename>.
1110 This stripping is typically used to remove nonessential sections
1111 such as <filename>.comment</filename> sections from a
1112 size-sensitive configuration.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001113 </para>
1114 </section>
1115
1116 <section id='ref-tasks-validate_branches'>
1117 <title><filename>do_validate_branches</filename></title>
1118
1119 <para>
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001120 After the kernel is unpacked but before it is patched, this task
1121 makes sure that the machine and metadata branches as specified
1122 by the <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
1123 variables actually exist on the specified branches.
1124 If these branches do not exist and
1125 <link linkend='var-AUTOREV'><filename>AUTOREV</filename></link>
1126 is not being used, the <filename>do_validate_branches</filename>
1127 task fails during the build.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001128 </para>
1129 </section>
1130</section>
1131
1132<section id='miscellaneous-tasks'>
1133 <title>Miscellaneous Tasks</title>
1134
1135 <para>
1136 The following sections describe miscellaneous tasks.
1137 </para>
1138
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001139 <section id='ref-tasks-spdx'>
1140 <title><filename>do_spdx</filename></title>
1141
1142 <para>
1143 A build stage that takes the source code and scans it on a remote
1144 FOSSOLOGY server in order to produce an SPDX document.
1145 This task applies only to the
1146 <link linkend='ref-classes-spdx'><filename>spdx</filename></link>
1147 class.
1148 </para>
1149 </section>
1150</section>
1151
1152</chapter>
1153<!--
1154vim: expandtab tw=80 ts=4
1155-->