After source code is patched, BitBake executes tasks that configure and compile the source code. Once compilation occurs, the files are copied to a holding area (staged) in preparation for packaging:
![]() |
This step in the build process consists of the following tasks:
do_prepare_recipe_sysroot
:
This task sets up the two sysroots in
${
WORKDIR
}
(i.e. recipe-sysroot
and
recipe-sysroot-native
) so that
during the packaging phase the sysroots can contain
the contents of the
do_populate_sysroot
tasks of the recipes on which the recipe
containing the tasks depends.
A sysroot exists for both the target and for the
native binaries, which run on the host system.
do_configure
:
This task configures the source by enabling and
disabling any build-time and configuration options
for the software being built.
Configurations can come from the recipe itself as
well as from an inherited class.
Additionally, the software itself might configure
itself depending on the target for which it is
being built.
The configurations handled by the
do_configure
task are specific to configurations for the source
code being built by the recipe.
If you are using the
autotools
class, you can add additional configuration options
by using the
EXTRA_OECONF
or
PACKAGECONFIG_CONFARGS
variables.
For information on how this variable works within
that class, see the
autotools
class
here.
do_compile
:
Once a configuration task has been satisfied,
BitBake compiles the source using the
do_compile
task.
Compilation occurs in the directory pointed to by
the
B
variable.
Realize that the B
directory
is, by default, the same as the
S
directory.
do_install
:
After compilation completes, BitBake executes the
do_install
task.
This task copies files from the
B
directory and places them
in a holding area pointed to by the
D
variable.
Packaging occurs later using files from this
holding directory.