Once source code is fetched and unpacked, BitBake locates patch files and applies them to the source files:
![]() |
The
do_patch
task uses a recipe's
SRC_URI
statements and the
FILESPATH
variable to locate applicable patch files.
Default processing for patch files assumes the files have
either *.patch
or
*.diff
file types.
You can use SRC_URI
parameters to
change the way the build system recognizes patch files.
See the
do_patch
task for more information.
BitBake finds and applies multiple patches for a single
recipe in the order in which it locates the patches.
The FILESPATH
variable defines the
default set of directories that the build system uses to
search for patch files.
Once found, patches are applied to the recipe's source
files, which are located in the
S
directory.
For more information on how the source directories are
created, see the
"Source Fetching"
section.
For more information on how to create patches and how the
build system processes patches, see the
"Patching Code"
section in the Yocto Project Development Tasks Manual.
You can also see the
"Use devtool modify
to Modify the Source of an Existing Component"
section in the Yocto Project Application Development and
the Extensible Software Development Kit (SDK) manual and
the
"Using Traditional Kernel Development to Patch the Kernel"
section in the Yocto Project Linux Kernel Development
Manual.