%poky; ] > Tasks Tasks are units of execution for BitBake. Recipes (.bb files) use tasks to complete configuring, compiling, and packaging software. This chapter provides a reference of the tasks defined in the OpenEmbedded build system.
Normal Recipe Build Tasks The following sections describe normal tasks associated with building a recipe.
<filename>do_build</filename> The default task for all recipes. This task depends on all other normal tasks required to build a recipe.
<filename>do_checkpkg</filename> Provides information about the recipe including its upstream version and status. The upstream version and status reveals whether or not a version of the recipe exists upstream and a status of not updated, updated, or unknown. The checkpkg task is included as part of the distrodata class. To build the checkpkg task, use the bitbake command with the "-c" option and task name: $ bitbake core-image-minimal -c checkpkg By default, the results are stored in $LOG_DIR (e.g. $BUILD_DIR/tmp/log).
<filename>do_compile</filename> Compiles the source in the compilation directory, which is pointed to by the B variable.
<filename>do_compile_ptest_base</filename> Compiles the runtime test suite included in the software being built.
<filename>do_configure</filename> Configures the source by enabling and disabling any build-time and configuration options for the software being built.
<filename>do_configure_ptest_base</filename> Configures the runtime test suite included in the software being built.
<filename>do_deploy</filename> Writes output files that are to be deployed to the deploy directory, which is defined by the DEPLOYDIR variable. The do_deploy task is a shared state (sstate) task, which means that the task can be accelerated through sstate use. Realize also that if the task is re-executed, any previous output is removed (i.e. "cleaned").
<filename>do_distrodata</filename> Provides information about the recipe. The distrodata task is included as part of the distrodata class. To build the distrodata task, use the bitbake command with the "-c" option and task name: $ bitbake core-image-minimal -c distrodata By default, the results are stored in $LOG_DIR (e.g. $BUILD_DIR/tmp/log).
<filename>do_fetch</filename> Fetches the source code. This task uses the SRC_URI variable and the argument's prefix to determine the correct fetcher module.
<filename>do_image</filename> Starts the image generation process. The do_image task runs after the OpenEmbedded build system has run the do_rootfs task during which packages are identified for installation into the image and the root filesystem is created, complete with post-processing. The do_image task performs pre-processing on the image through the IMAGE_PREPROCESS_COMMAND and dynamically generates supporting do_image_* tasks as needed. For more information on image creation, see the "Image Generation" section.
<filename>do_image_complete</filename> Completes the image generation process. The do_image_complete task runs after the OpenEmbedded build system has run the do_image task during which image pre-processing occurs and through dynamically generated do_image_* tasks the image is constructed. The do_image_complete task performs post-processing on the image through the IMAGE_POSTPROCESS_COMMAND. For more information on image creation, see the "Image Generation" section.
<filename>do_install</filename> Copies files from the compilation directory, which is defined by the B variable, to a holding area defined by the D variable.
<filename>do_install_ptest_base</filename> Copies the runtime test suite files from the compilation directory to a holding area.
<filename>do_package</filename> Analyzes the content of the holding area and splits it into subsets based on available packages and files.
<filename>do_package_qa</filename> Runs QA checks on packaged files. For more information on these checks, see the insane class.
<filename>do_package_write_deb</filename> Creates Debian packages (i.e. *.deb files) and places them in the ${DEPLOY_DIR_DEB} directory in the package feeds area. For more information, see the "Package Feeds" section.
<filename>do_package_write_ipk</filename> Creates IPK packages (i.e. *.ipk files) and places them in the ${DEPLOY_DIR_IPK} directory in the package feeds area. For more information, see the "Package Feeds" section.
<filename>do_package_write_rpm</filename> Creates RPM packages (i.e. *.rpm files) and places them in the ${DEPLOY_DIR_RPM} directory in the package feeds area. For more information, see the "Package Feeds" section.
<filename>do_package_write_tar</filename> Creates tarballs and places them in the ${DEPLOY_DIR_TAR} directory in the package feeds area. For more information, see the "Package Feeds" section.
<filename>do_packagedata</filename> Creates package metadata used by the build system to generate the final packages.
<filename>do_patch</filename> Locates patch files and applies them to the source code. See the "Patching" section for more information.
<filename>do_populate_lic</filename> Writes license information for the recipe that is collected later when the image is constructed.
<filename>do_populate_sdk</filename> Creates the file and directory structure for an installable SDK. See the "SDK Generation" section for more information.
<filename>do_populate_sysroot</filename> Copies a subset of the files installed by the do_install task into the sysroot to make them available to other recipes. Files that would typically not be needed by other recipes at build time are skipped. Skipped files include files installed into /etc. For information on what files are copied, see the staging class. The do_populate_sysroot task is a shared state (sstate) task, which means that the task can be accelerated through sstate use. Realize also that if the task is re-executed, any previous output is removed (i.e. "cleaned").
<filename>do_rm_work</filename> Removes work files after the OpenEmbedded build system has finished with them. You can learn more by looking at the "rm_work.bbclass" section.
<filename>do_rm_work_all</filename> Top-level task for removing work files after the build system has finished with them.
<filename>do_unpack</filename> Unpacks the source code into a working directory pointed to by ${WORKDIR}. The S variable also plays a role in where unpacked source files ultimately reside. For more information on how source files are unpacked, see the "Source Fetching" section and the WORKDIR and S variable descriptions.
Manually Called Tasks These tasks are typically manually triggered (e.g. by using the bitbake -c command-line option):
<filename>do_checkuri</filename> Validates the SRC_URI value.
<filename>do_checkuriall</filename> Validates the SRC_URI value for all recipes required to build a target.
<filename>do_clean</filename> Removes all output files for a target from the do_unpack task forward (i.e. do_unpack, do_configure, do_compile, do_install, and do_package). You can run this task using BitBake as follows: $ bitbake -c clean recipe Running this task does not remove the sstate) cache files. Consequently, if no changes have been made and the recipe is rebuilt after cleaning, output files are simply restored from the sstate cache. If you want to remove the sstate cache files for the recipe, you need to use the do_cleansstate task instead (i.e. bitbake -c cleansstate recipe).
<filename>do_cleanall</filename> Removes all output files, shared state (sstate) cache, and downloaded source files for a target (i.e. the contents of DL_DIR). Essentially, the do_cleanall task is identical to the do_cleansstate task with the added removal of downloaded source files. You can run this task using BitBake as follows: $ bitbake -c cleanall recipe Typically, you would not normally use the cleanall task. Do so only if you want to start fresh with the do_fetch task.
<filename>do_cleansstate</filename> Removes all output files and shared state (sstate) cache for a target. Essentially, the do_cleansstate task is identical to the do_clean task with the added removal of shared state (sstate) cache. You can run this task using BitBake as follows: $ bitbake -c cleansstate recipe When you run the do_cleansstate task, the OpenEmbedded build system no longer uses any sstate. Consequently, building the recipe from scratch is guaranteed. The do_cleansstate task cannot remove sstate from a remote sstate mirror. If you need to build a target from scratch using remote mirrors, use the "-f" option as follows: $ bitbake -f -c do_cleansstate target
<filename>do_devshell</filename> Starts a shell whose environment is set up for development, debugging, or both. See the "Using a Development Shell" section in the Yocto Project Development Manual for more information about using devshell.
<filename>do_fetchall</filename> Fetches all remote sources required to build a target.
<filename>do_listtasks</filename> Lists all defined tasks for a target.
<filename>do_package_index</filename> Creates or updates the index in the Package Feeds area. This task is not triggered with the bitbake -c command-line option as are the other tasks in this section. Because this task is specifically for the package-index recipe, you run it using bitbake package-index.
Miscellaneous Tasks The following sections describe miscellaneous tasks.
<filename>do_spdx</filename> A build stage that takes the source code and scans it on a remote FOSSOLOGY server in order to produce an SPDX document. This task applies only to the spdx class.