12.3. Patching¶
Once source code is fetched and unpacked, BitBake locates patch files and applies them to the source files. The do_patch task processes recipes by using the SRC_URI variable to locate applicable patch files. BitBake finds and applies multiple patches for a single recipe.
Patching in Recipe¶
http://git.yoctoproject.org/cgit/cgit.cgi/poky
http://cgit.openembedded.org/meta-openembedded
The poky/meta
and meta-openembedded/meta-oe
layer provides
support recipes. The following related SRC_URI being used:
boost_1.75.0.bb:
SRC_URI += "file://boost-CVE-2012-2677.patch ..."
opencv_4.5.0.bb:
SRC_URI = "git://github.com/opencv/opencv.git;name=opencv ... file://download.patch ..."
Files in the SRC_URI list variable with the .patch
or .diff
extension are automatically identified as a patch and
applied if present beside the recipe.