kpatch/man/kpatch-build.1
Artem Savkov 4a7dab17c8 Allow OOT modules to be built with non-distro kernels
Previously OOT-module builds used `--sourcedir` to specify oot-module
source directory which was a bit confusing and also denied users ability
to build kpatches agains oot modules built against non-distro kernels.

This patch adds `-p/--oot-module-src` option to specify source dir for
oot module while keeping `--sourcedir` for kernel source directory
specification.

I also tried to disambiguate `SRCDIR` in kpatch-build a bit. Now there
are 3 variables:
 - `KERNEL_SRCDIR` - contains path to kernel source directory
 - `OOT_MODULEL_SRCDIR` - contains path to out-of-tree module source directory
 - `BUILDDIR` - can be set to either of the above and is used for
   patch-related actions

Another attempt at this was done by @omatiusha in #1234

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2021-12-13 18:51:52 +01:00

84 lines
1.9 KiB
Groff

.\" Manpage for kpatch-build.
.\" Contact udoseidel@gmx.de to correct errors or typos.
.TH man 1 "23 Mar 2014" "1.0" "kpatch-build man page"
.SH NAME
kpatch-build \- build script
.SH SYNOPSIS
kpatch-build [options] <patch file>
.SH DESCRIPTION
This script takes a patch based on the version of the kernel
currently running and creates a kernel module that will replace
modified functions in the kernel such that the patched code takes
effect.
.SH OPTIONS
-h|--help
Show this help message
-a|--archversion
Specify the kernel arch version
-r|--sourcerpm
Specify kernel source RPM
-s|--sourcedir
Specify kernel source directory
-c|--config
Specify kernel config file
-v|--vmlinux
Specify original vmlinux
-j|--jobs
Specify the number of make jobs
-t|--target
Specify custom kernel build targets
-n|--name
Specify the name of the kpatch module
-o|--output
Specify output folder
-d|--debug
Keep scratch files in /tmp
(can be specified multiple times)
--oot-module
Enable patching out-of-tree module,
specify current version of module
--oot-module-src
Specify out-of-tree module source directory
-R|--non-replace
Disable replace flag of KLP
(replace is on by default)
--skip-cleanup
Skip post-build cleanup
--skip-compiler-check
Skips check that ensures that the system compiler version and
the compiler version that built the kernel match. Skipping this
check is not recommended, but is useful if the exact compiler
version is not available or is not easily installed. Use
only when confident that the two versions of compiler output
identical objects for a given target. Otherwise, use of
this option might result in unexpected changed objects
being detected.
.SH SEE ALSO
kpatch(1)
.SH BUGS
No known bugs.
.SH AUTHOR
Udo Seidel (udoseidel@gmx.de)
.SH COPYRIGHT
Copyright (C) 2014: Seth Jennings <sjenning@redhat.com>, Copyright (C)
2013,2014: Josh Poimboeuf <jpoimboe@redhat.com>