Translation(s): none

This is an obsolete now guide on how to build the Linux Kernel into a .deb package. Don't use this, or take with a grain of salt. Instead, see

Install the Required Packages

To download and compile the Linux Kernel source we will need the following packages:

To install these packages run the following command as root:

Extracting the Kernel Source

Under /usr/src you will find a file looking like linux-source-x.x.tar.xz. Please note that x.x will match the current Linux Kernel source for your release of Debian. In this example we will be using the 4.15 Kernel under Sid.

Extract the Kernel Source with the following command (NOTE: You will need to change 4.15 to match the .tar.xz file in /usr/src):

Configuring the Kernel

Change directories to the newly extracted linux source (again, match 4.15 to your version):

Create a defconfig with the following command, please change ARCH=i386 to match your target architecture:

Building the Debian Package

Use make bindeb-pkg target to build the kernel. the -j`nproc` argument sets the build to use as many cpu's as you have.

See also

The "Compiling a Kernel" section in the Debian Administrator's Guide (WARNING: outdated)