summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/ref-tasks.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/ref-manual/ref-tasks.xml')
-rw-r--r--documentation/ref-manual/ref-tasks.xml695
1 files changed, 695 insertions, 0 deletions
diff --git a/documentation/ref-manual/ref-tasks.xml b/documentation/ref-manual/ref-tasks.xml
new file mode 100644
index 0000000000..f325f0e233
--- /dev/null
+++ b/documentation/ref-manual/ref-tasks.xml
@@ -0,0 +1,695 @@
1<!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.
22 </para>
23
24 <section id='ref-tasks-build'>
25 <title><filename>do_build</filename></title>
26
27 <para>
28 The default task for all recipes.
29 This task depends on all other normal tasks
30 required to build a recipe.
31 </para>
32 </section>
33
34 <section id='ref-tasks-compile'>
35 <title><filename>do_compile</filename></title>
36
37 <para>
38 Compiles the source in the compilation directory, which is pointed
39 to by the
40 <link linkend='var-B'><filename>B</filename></link> variable.
41 </para>
42 </section>
43
44 <section id='ref-tasks-compile_ptest_base'>
45 <title><filename>do_compile_ptest_base</filename></title>
46
47 <para>
48 Compiles the runtime test suite included in the software being
49 built.
50 </para>
51 </section>
52
53 <section id='ref-tasks-configure'>
54 <title><filename>do_configure</filename></title>
55
56 <para>
57 Configures the source by enabling and disabling any build-time and
58 configuration options for the software being built.
59 </para>
60 </section>
61
62 <section id='ref-tasks-configure_ptest_base'>
63 <title><filename>do_configure_ptest_base</filename></title>
64
65 <para>
66 Configures the runtime test suite included in the software being
67 built.
68 </para>
69 </section>
70
71 <section id='ref-tasks-deploy'>
72 <title><filename>do_deploy</filename></title>
73
74 <para>
75 Writes output files that are to be deployed to the deploy
76 directory, which is defined by the
77 <link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link>
78 variable.
79 </para>
80
81 <para>
82 The <filename>do_deploy</filename> task is a
83 shared state (sstate) task, which means that the task can
84 be accelerated through sstate use.
85 Realize also that if the task is re-executed, any previous output
86 is removed (i.e. "cleaned").
87 </para>
88 </section>
89
90 <section id='ref-tasks-fetch'>
91 <title><filename>do_fetch</filename></title>
92
93 <para>
94 Fetches the source code.
95 This task uses the
96 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
97 variable and the argument's prefix to determine the correct
98 fetcher module.
99 </para>
100 </section>
101
102 <section id='ref-tasks-install'>
103 <title><filename>do_install</filename></title>
104
105 <para>
106 Copies files from the compilation directory, which is defined by
107 the
108 <link linkend='var-B'><filename>B</filename></link> variable,
109 to a holding area defined by the
110 <link linkend='var-D'><filename>D</filename></link> variable.
111 </para>
112 </section>
113
114 <section id='ref-tasks-install_ptest_base'>
115 <title><filename>do_install_ptest_base</filename></title>
116
117 <para>
118 Copies the runtime test suite files from the compilation directory
119 to a holding area.
120 </para>
121 </section>
122
123 <section id='ref-tasks-package'>
124 <title><filename>do_package</filename></title>
125
126 <para>
127 Analyzes the content of the holding area and splits it into subsets
128 based on available packages and files.
129 </para>
130 </section>
131
132 <section id='ref-tasks-package_qa'>
133 <title><filename>do_package_qa</filename></title>
134
135 <para>
136 Runs QA checks on packaged files.
137 For more information on these checks, see the
138 <link linkend='ref-classes-insane'><filename>insane</filename></link>
139 class.
140 </para>
141 </section>
142
143 <section id='ref-tasks-package_write_deb'>
144 <title><filename>do_package_write_deb</filename></title>
145
146 <para>
147 Creates the actual DEB packages and places them in the
148 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
149 area.
150 </para>
151 </section>
152
153 <section id='ref-tasks-package_write_ipk'>
154 <title><filename>do_package_write_ipk</filename></title>
155
156 <para>
157 Creates the actual IPK packages and places them in the
158 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
159 area.
160 </para>
161 </section>
162
163 <section id='ref-tasks-package_write_rpm'>
164 <title><filename>do_package_write_rpm</filename></title>
165
166 <para>
167 Creates the actual RPM packages and places them in the
168 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
169 area.
170 </para>
171 </section>
172
173 <section id='ref-tasks-package_write_tar'>
174 <title><filename>do_package_write_tar</filename></title>
175
176 <para>
177 Creates tar archives for packages and places them in the
178 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
179 area.
180 </para>
181 </section>
182
183 <section id='ref-tasks-packagedata'>
184 <title><filename>do_packagedata</filename></title>
185
186 <para>
187 Creates package metadata used by the build system to generate the
188 final packages.
189 </para>
190 </section>
191
192 <section id='ref-tasks-patch'>
193 <title><filename>do_patch</filename></title>
194
195 <para>
196 Locates patch files and applies them to the source code.
197 See the
198 "<link linkend='patching-dev-environment'>Patching</link>"
199 section for more information.
200 </para>
201 </section>
202
203 <section id='ref-tasks-populate_lic'>
204 <title><filename>do_populate_lic</filename></title>
205
206 <para>
207 Writes license information for the recipe that is collected later
208 when the image is constructed.
209 </para>
210 </section>
211
212 <section id='ref-tasks-populate_sdk'>
213 <title><filename>do_populate_sdk</filename></title>
214
215 <para>
216 Creates the file and directory structure for an installable SDK.
217 See the
218 "<link linkend='sdk-generation-dev-environment'>SDK Generation</link>"
219 section for more information.
220 </para>
221 </section>
222
223 <section id='ref-tasks-populate_sysroot'>
224 <title><filename>do_populate_sysroot</filename></title>
225
226 <para>
227 Copies a subset of files installed by the
228 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
229 task into the sysroot in order to make them available to other
230 recipes.
231 </para>
232
233 <para>
234 The <filename>do_populate_sysroot</filename> task is a
235 shared state (sstate) task, which means that the task can
236 be accelerated through sstate use.
237 Realize also that if the task is re-executed, any previous output
238 is removed (i.e. "cleaned").
239 </para>
240 </section>
241
242 <section id='ref-tasks-rm_work'>
243 <title><filename>do_rm_work</filename></title>
244
245 <para>
246 Removes work files after the OpenEmbedded build system has
247 finished with them.
248 You can learn more by looking at the
249 "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>"
250 section.
251 </para>
252 </section>
253
254 <section id='ref-tasks-rm_work_all'>
255 <title><filename>do_rm_work_all</filename></title>
256
257 <para>
258 Top-level task for removing work files after the build system has
259 finished with them.
260 </para>
261 </section>
262
263 <section id='ref-tasks-unpack'>
264 <title><filename>do_unpack</filename></title>
265
266 <para>
267 Unpacks the source code into a working directory pointed to
268 by
269 <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>.
270 The
271 <link linkend='var-S'><filename>S</filename></link> variable also
272 plays a role in where unpacked source files ultimately reside.
273 For more information on how source files are unpacked, see the
274 "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
275 section and the <filename>WORKDIR</filename> and
276 <filename>S</filename> variable descriptions.
277 </para>
278 </section>
279</section>
280
281<section id='manually-called-tasks'>
282 <title>Manually Called Tasks</title>
283
284 <para>
285 These tasks are typically manually triggered (e.g. by using the
286 <filename>bitbake -c</filename> command-line option):
287 </para>
288
289 <section id='ref-tasks-checkuri'>
290 <title><filename>do_checkuri</filename></title>
291
292 <para>
293 Validates the
294 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
295 value.
296 </para>
297 </section>
298
299 <section id='ref-tasks-checkuriall'>
300 <title><filename>do_checkuriall</filename></title>
301
302 <para>
303 Validates the
304 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
305 value for all recipes required to build a target.
306 </para>
307 </section>
308
309 <section id='ref-tasks-clean'>
310 <title><filename>do_clean</filename></title>
311
312 <para>
313 Removes all output files for a target from the
314 <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
315 task forward (i.e.
316 <link linkend='ref-tasks-patch'><filename>do_unpack</filename></link>,
317 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>,
318 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
319 <link linkend='ref-tasks-install'><filename>do_install</filename></link>,
320 and
321 <link linkend='ref-tasks-package'><filename>do_package</filename></link>).
322 </para>
323
324 <para>
325 You can run this task using BitBake as follows:
326 <literallayout class='monospaced'>
327 $ bitbake -c clean <replaceable>recipe</replaceable>
328 </literallayout>
329 </para>
330
331 <para>
332 Running this task does not remove the
333 <link linkend='shared-state-cache'>sstate</link>) cache
334 files.
335 Consequently, if no changes have been made and the recipe is
336 rebuilt after cleaning, output files are simply restored from the
337 sstate cache.
338 If you want to remove the sstate cache files for the recipe,
339 you need to use the
340 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
341 task instead (i.e. <filename>bitbake -c cleansstate</filename> <replaceable>recipe</replaceable>).
342 </para>
343 </section>
344
345 <section id='ref-tasks-cleanall'>
346 <title><filename>do_cleanall</filename></title>
347
348 <para>
349 Removes all output files, shared state
350 (<link linkend='shared-state-cache'>sstate</link>) cache, and
351 downloaded source files for a target (i.e. the contents of
352 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>).
353 Essentially, the <filename>do_cleanall</filename> task is
354 identical to the
355 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
356 task with the added removal of downloaded source files.
357 </para>
358
359 <para>
360 You can run this task using BitBake as follows:
361 <literallayout class='monospaced'>
362 $ bitbake -c cleanall <replaceable>recipe</replaceable>
363 </literallayout>
364 </para>
365
366 <para>
367 Typically, you would not normally use the
368 <filename>cleanall</filename> task.
369 Do so only if you want to start fresh with the
370 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
371 task.
372 </para>
373 </section>
374
375 <section id='ref-tasks-cleansstate'>
376 <title><filename>do_cleansstate</filename></title>
377
378 <para>
379 Removes all output files and shared state
380 (<link linkend='shared-state-cache'>sstate</link>)
381 cache for a target.
382 Essentially, the <filename>do_cleansstate</filename> task is
383 identical to the
384 <link linkend='ref-tasks-clean'><filename>do_clean</filename></link>
385 task with the added removal of shared state
386 (<link linkend='shared-state-cache'>sstate</link>) cache.
387 </para>
388
389 <para>
390 You can run this task using BitBake as follows:
391 <literallayout class='monospaced'>
392 $ bitbake -c cleansstate <replaceable>recipe</replaceable>
393 </literallayout>
394 </para>
395
396 <para>
397 When you run the <filename>do_cleansstate</filename> task,
398 the OpenEmbedded build system no longer uses any
399 sstate.
400 Consequently, building the recipe from scratch is guaranteed.
401 <note>
402 The <filename>do_cleansstate</filename> task cannot remove
403 sstate from a remote sstate mirror.
404 If you need to build a target from scratch using remote
405 mirrors, use the "-f" option as follows:
406 <literallayout class='monospaced'>
407 $ bitbake -f -c do_cleansstate <replaceable>target</replaceable>
408 </literallayout>
409 </note>
410 </para>
411 </section>
412
413 <section id='ref-tasks-devshell'>
414 <title><filename>do_devshell</filename></title>
415
416 <para>
417 Starts a shell whose environment is set up for
418 development, debugging, or both.
419 See the
420 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>"
421 section in the Yocto Project Development Manual for more
422 information about using <filename>devshell</filename>.
423 </para>
424 </section>
425
426 <section id='ref-tasks-fetchall'>
427 <title><filename>do_fetchall</filename></title>
428
429 <para>
430 Fetches all remote sources required to build a target.
431 </para>
432 </section>
433
434 <section id='ref-tasks-listtasks'>
435 <title><filename>do_listtasks</filename></title>
436
437 <para>
438 Lists all defined tasks for a target.
439 </para>
440 </section>
441
442 <section id='ref-tasks-package_index'>
443 <title><filename>do_package_index</filename></title>
444
445 <para>
446 Creates or updates the index in the
447 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
448 area.
449 <note>
450 This task is not triggered with the
451 <filename>bitbake -c</filename> command-line option as
452 are the other tasks in this section.
453 Because this task is specifically for the
454 <filename>package-index</filename> recipe,
455 you run it using
456 <filename>bitbake package-index</filename>.
457 </note>
458 </para>
459 </section>
460</section>
461
462<section id='image-related-tasks'>
463 <title>Image-Related Tasks</title>
464
465 <para>
466 The following tasks are applicable to image recipes.
467 </para>
468
469 <section id='ref-tasks-bootimg'>
470 <title><filename>do_bootimg</filename></title>
471
472 <para>
473 Creates a bootable live image.
474 See the
475 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
476 variable for additional information on live image types.
477 </para>
478 </section>
479
480 <section id='ref-tasks-bundle_initramfs'>
481 <title><filename>do_bundle_initramfs</filename></title>
482
483 <para>
484 Combines an initial RAM disk (initramfs) image and kernel
485 together to form a single image.
486 The
487 <link linkend='var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></link>
488 variable has some more information about these types of images.
489 </para>
490 </section>
491
492 <section id='ref-tasks-rootfs'>
493 <title><filename>do_rootfs</filename></title>
494
495 <para>
496 Creates the root filesystem (file and directory structure) for an
497 image.
498 See the
499 "<link linkend='image-generation-dev-environment'>Image Generation</link>"
500 section for more information on how the root filesystem is created.
501 </para>
502 </section>
503
504 <section id='ref-tasks-testimage'>
505 <title><filename>do_testimage</filename></title>
506
507 <para>
508 Boots an image and performs runtime tests within the image.
509 For information on automatically testing images, see the
510 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
511 section in the Yocto Project Development Manual.
512 </para>
513 </section>
514
515 <section id='ref-tasks-testimage_auto'>
516 <title><filename>do_testimage_auto</filename></title>
517
518 <para>
519 Boots an image and performs runtime tests within the image
520 immediately after it has been built.
521 This task is enabled when you set
522 <link linkend='var-TEST_IMAGE'><filename>TEST_IMAGE</filename></link>
523 equal to "1".
524 </para>
525
526 <para>
527 For information on automatically testing images, see the
528 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
529 section in the Yocto Project Development Manual.
530 </para>
531 </section>
532
533 <section id='ref-tasks-vmdkimg'>
534 <title><filename>do_vmdkimg</filename></title>
535
536 <para>
537 Creates a <filename>.vmdk</filename> image for use with
538 <ulink url='http://www.vmware.com/'>VMware</ulink>
539 and compatible virtual machine hosts.
540 </para>
541 </section>
542</section>
543
544<section id='kernel-related-tasks'>
545 <title>Kernel-Related Tasks</title>
546
547 <para>
548 The following tasks are applicable to kernel recipes.
549 Some of these tasks (e.g. the
550 <link linkend='ref-tasks-menuconfig'><filename>do_menuconfig</filename></link>
551 task) are also applicable to recipes that use
552 Linux kernel style configuration such as the BusyBox recipe.
553 </para>
554
555 <section id='ref-tasks-compile_kernelmodules'>
556 <title><filename>do_compile_kernelmodules</filename></title>
557
558 <para>
559 Compiles loadable modules for the Linux kernel.
560 </para>
561 </section>
562
563 <section id='ref-tasks-diffconfig'>
564 <title><filename>do_diffconfig</filename></title>
565
566 <para>
567 Compares the old and new config files after running the
568 <link linkend='ref-tasks-menuconfig'><filename>do_menuconfig</filename></link>
569 task for the kernel.
570 </para>
571 </section>
572
573 <section id='ref-tasks-kernel_checkout'>
574 <title><filename>do_kernel_checkout</filename></title>
575
576 <para>
577 Checks out source/meta branches for a linux-yocto style kernel.
578 </para>
579 </section>
580
581 <section id='ref-tasks-kernel_configcheck'>
582 <title><filename>do_kernel_configcheck</filename></title>
583
584 <para>
585 Validates the kernel configuration for a linux-yocto style kernel.
586 </para>
587 </section>
588
589 <section id='ref-tasks-kernel_configme'>
590 <title><filename>do_kernel_configme</filename></title>
591
592 <para>
593 Assembles the kernel configuration for a linux-yocto style kernel.
594 </para>
595 </section>
596
597 <section id='ref-tasks-kernel_link_vmlinux'>
598 <title><filename>do_kernel_link_vmlinux</filename></title>
599
600 <para>
601 Creates a symbolic link in
602 <filename>arch/$arch/boot</filename> for vmlinux kernel
603 images.
604 </para>
605 </section>
606
607 <section id='ref-tasks-menuconfig'>
608 <title><filename>do_menuconfig</filename></title>
609
610 <para>
611 Runs <filename>make menuconfig</filename> for the kernel.
612 For information on <filename>menuconfig</filename>, see the
613 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-menuconfig'>Using&nbsp;&nbsp;<filename>menuconfig</filename></ulink>"
614 section in the Yocto Project Development Manual.
615 </para>
616 </section>
617
618 <section id='ref-tasks-savedefconfig'>
619 <title><filename>do_savedefconfig</filename></title>
620
621 <para>
622 Creates a minimal Linux kernel configuration file.
623 </para>
624 </section>
625
626 <section id='ref-tasks-sizecheck'>
627 <title><filename>do_sizecheck</filename></title>
628
629 <para>
630 Checks the size of the kernel image against
631 <filename>KERNEL_IMAGE_MAXSIZE</filename> when set.
632 </para>
633 </section>
634
635 <section id='ref-tasks-strip'>
636 <title><filename>do_strip</filename></title>
637
638 <para>
639 Strips unneeded sections out of the Linux kernel image.
640 </para>
641 </section>
642
643 <section id='ref-tasks-uboot_mkimage'>
644 <title><filename>do_uboot_mkimage</filename></title>
645
646 <para>
647 Creates a uImage file from the kernel for the U-Boot bootloader.
648 </para>
649 </section>
650
651 <section id='ref-tasks-validate_branches'>
652 <title><filename>do_validate_branches</filename></title>
653
654 <para>
655 Ensures that the source, metadata (or both) branches are on the
656 locations specified by their
657 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
658 values for a linux-yocto style kernel.
659 </para>
660 </section>
661</section>
662
663<section id='miscellaneous-tasks'>
664 <title>Miscellaneous Tasks</title>
665
666 <para>
667 The following sections describe miscellaneous tasks.
668 </para>
669
670 <section id='ref-tasks-generate_qt_config_file'>
671 <title><filename>do_generate_qt_config_file</filename></title>
672
673 <para>
674 Writes a <filename>qt.conf</filename> configuration
675 file used for building a Qt-based application.
676 </para>
677 </section>
678
679 <section id='ref-tasks-spdx'>
680 <title><filename>do_spdx</filename></title>
681
682 <para>
683 A build stage that takes the source code and scans it on a remote
684 FOSSOLOGY server in order to produce an SPDX document.
685 This task applies only to the
686 <link linkend='ref-classes-spdx'><filename>spdx</filename></link>
687 class.
688 </para>
689 </section>
690</section>
691
692</chapter>
693<!--
694vim: expandtab tw=80 ts=4
695-->