# Build process - Tasks This describes all tasks that are executed when building a recipe or distribution. ## `do_package_write_` For all packages selected with `PACKAGE_CLASSES`, packages are downloaded into `DL_DIR` Default: `poky/build/tmp/deploy///` - pkgtype: rpm, ipk, deb - arch: genericx86, ... Those packages can also be built from sources with the folowing commands. ## `do_fetch` & `do_unpack` Downloads and extracts the package sources. ```text poky/build/tmp/work/ └── -poky-linux or -poky-linux └── └── - : The package is built from here └── - : Package sources ``` ## `do_patch` Apply some yocto-related patches to package source The patches are listed in `SRC_URI` in the recipe file ## `do_configure`, `do_compile`, `do_install` In most cases: - `do_configure`: `./configure` - `do_compile`: `make` - `do_install`: `make install` The work directory is: ```text poky/build/tmp/work/ └── -poky-linux or -poky-linux └── └── - ``` From the work directory: - `-`: Built files - `image` : installed files (eg `./configure --prefix`) ## `do_package` & `do_packagedata` `do_package` analyses the `image` dir: - splits out debugging symbols - checks shared library dependencies - looks at package relationships `do_packagedata` creates the package metadata file. From working dir: - `package`: The destination directory for packages before they are split - `pkgdata`: A temporary work area used by the do_package task - `packages-split`: The parent directory for packages after they have been split These folders are used by `do_package_write_*` and generated packages are put into the package feed area (`poky/build/tmp/deploy//a/`) ## `do_rootfs` Unpacks the packages from the package feed area (`poky/build/tmp/deploy///`) to build the root filesystem, depending on the configuration : - `IMAGE_INSTALL`: Which base package to install - `PACKAGE_EXCLUDE`: Which packages to not install - `IMAGE_FEATURES`: Which features to install. Features maps to specific packages to be installed. - `PACKAGE_CLASSES`: Package type to use (deb, ipk, tar, ...) - `IMAGE_LINGUAS`: Languages to install