任务是 BitBake 的执行单位。配方(.bb 文件)使用任务来完成软件的配置、编译和打包。本章提供 OpenEmbedded 构建系统中定义的任务参考。
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.
1, Normal Recipe Build Tasks
以下各节将介绍与构建配方相关的常规任务。
The following sections describe normal tasks associated with building a recipe.
1.1, do_build
所有配方的默认任务。该任务取决于构建配方所需的所有其他正常任务。
The default task for all recipes. This task depends on all other normal tasks required to build a recipe.
1.2, do_compile
编译源代码。该任务运行时的当前工作目录设置为 ${B}。
Compiles the source code. This task runs with the current working directory set to ${B}.
该任务的默认行为是,如果找到 makefile(Makefile、makefile 或 GNUmakefile),则运行 oe_runmake 函数。如果找不到此类文件,do_compile 任务将不执行任何操作。
The default behavior of this task is to run the oe_runmake function if a makefile (Makefile, makefile, or GNUmakefile) is found. If no such file is found, the do_compile task does nothing.
1.3, do_configure
通过启用或禁用正在构建的软件的任何构建时选项和配置选项来配置源代码。任务运行时的当前工作目录设置为 ${B}。
Configures the source by enabling and disabling any build-time and configuration options for the software being built. The task runs with the current working directory set to ${B}.
该任务的默认行为是,如果找到 makefile(Makefile、makefile 或 GNUmakefile),且 CLEANBROKEN 未设为 "1",则运行 oe_runmake clean。如果找不到这样的文件,或者 CLEANBROKEN 变量被设置为 "1",do_configure 任务将什么也不做。
The default behavior of this task is to run oe_runmake clean if a makefile (Makefile, makefile, or GNUmakefile) is found and CLEANBROKEN is not set to “1”. If no such file is found or the CLEANBROKEN variable is set to “1”, the do_configure task does nothing.
1.4, do_deploy
写入要部署到 ${DEPLOY_DIR_IMAGE} 的输出文件。任务运行时的当前工作目录设置为 ${B}。
Writes output files that are to be deployed to ${DEPLOY_DIR_IMAGE}. The task runs with the current working directory set to ${B}.
执行该任务的配方应继承 deploy 类,并将输出写入 ${DEPLOYDIR},不要与 ${DEPLOY_DIR} 混淆。deploy 类将 do_deploy 设置为共享状态(sstate)任务,可通过使用 sstate 加速。sstate 机制负责将输出从 ${DEPLOYDIR} 复制到 ${DEPLOY_DIR_IMAGE}。
Recipes implementing thi

最低0.47元/天 解锁文章
992

被折叠的 条评论
为什么被折叠?



