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