During a build, the unpacked temporary source code used by recipes
to build packages is available in the Build Directory as
defined by the
S
variable.
Below is the default value for the S
variable as defined in the
meta/conf/bitbake.conf
configuration file in the
Source Directory:
S = "${WORKDIR}/${BP}"
You should be aware that many recipes override the S
variable.
For example, recipes that fetch their source from Git usually set
S
to ${WORKDIR}/git
.
BP
represents the base recipe name, which consists of the name and version:
BP = "${BPN}-${PV}"
The path to the work directory for the recipe
(WORKDIR
)
is defined as follows:
${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
The actual directory depends on several things:
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.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
Now that you know where to locate the directory that has the temporary source code, you can use a Quilt or Git workflow to make your edits, test the changes, and preserve the changes in the form of patches.