Copy a your .config
file to the kernel directory and run:
make deb-pkg -j $(getconf _NPROCESSORS_ONLN) LOCALVERSION=-custom KDEB_PKGVERSION=$(make kernelversion)-1
Set
CONFIG_DEBUG_INFO=n
if you want to avoid to build the debug symbol package.
Cross compiling
Install the target cross compile toolchain and add the following variable to the make command:
ARCH=<arch> CROSS_COMPILE=/usr/bin/<toolchain-arch>-linux-gnu-
<arch>
should match one directory in./arch/
.<toolchain-arch>
is the prefix of the cross compilation tools.
Example:
ARCH=s390 CROSS_COMPILE=/usr/bin/s390x-linux-gnu-
Note that
ARCH
useds390
whileCROSS_COMPILE
useds390x
.