WORKDIR in a yocto recipe
From the Yocto Project Reference Manual
WORKDIR
The pathname of the work directory in which the OpenEmbedded build system builds a recipe. This directory is located within the TMPDIR directory structure and is specific to the recipe being built and the system for which it is being built.
The WORKDIR directory is defined as follows:
${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
The actual directory depends on several things:
TMPDIR: The top-level build output directory MULTIMACH_TARGET_SYS: The target system identifier PN: The recipe name EXTENDPE: The epoch - (if PE is not specified, which is usually the >case for most recipes, then EXTENDPE is blank) PV: The recipe version PR: The recipe revision
As an example, assume a Source Directory top-level folder name poky, a default Build Directory at poky/build, and a qemux86-poky-linux machine target system. Furthermore, suppose your recipe is named foo_1.3.0-r0.bb. In this case, the work directory the build system uses to build the package would be as follows:
poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-WORKDIR
${TMPDIR} will be the folder named "tmp" within your Yocto build directory.
WORKDIR is definied in the following files.
bitbake/conf/bitbake.conf
oe-core/meta/conf/bitbake.conf
The default value of ${WORKDIR}
is defined in bitbake variables. But you can change it in the recipe. It points toward the directory where bitbake unpacks the package
You can get the value of ${WORKDIR}
from the bitbake environment
bitbake -e <recipe-name> | grep ^WORKDIR=
For a specific recipe, you can get all the variables' value by getting an environment file as:
bitbake -e recipe_name > env