This section is meant to give a brief overview of how make-kpkg
works with respect to patch handling. For more details please refer to the
make-kpkg(1)
manpage.
make-kpkg
to build patched kernels
The default configuration of make-kpkg
is to ignore any available
patches and build a package with whatever kernel source is in the current
directory. You can tell it to use patches from under
/usr/src/kernel-patches/
, either by setting the
PATCH_THE_KERNEL environment variable to YES [1].
When asked to apply patches, make-kpkg
will apply all patches it
finds for the current architecture and version for the kernel being built. You
may want to only select some of them using the --added_patches
option.
make-kpkg
applies patches
It looks for apply
scripts in the following subdirectories of
/usr/src/kernel-patches/
:
$ARCH/$VERSION/apply/
$ARCH/apply/
all/$VERSION/apply/
all/apply/
At the time it will want to remove those patches, it will then look into
similar directories with name unpatch
.
Typically the main job of these scripts is to apply a diff, but well, they are
scripts after all, and more complex tasks in need of something more smart than
patch
may make use of this power.
Kernel-patch sub-policy draft document
$Revision: 1.5 $dirson@debian.org