2379
Comment:
|
2482
Add link to Debian Administrator's Guide
|
Deletions are marked like this. | Additions are marked like this. |
Line 57: | Line 57: |
{{{make-kpkg}} | {{{make-kpkg}}} |
Line 59: | Line 59: |
== See also == | |
Line 60: | Line 61: |
## You can add other _helpful_ links here. ##== See also == |
The "Compiling a Kernel" section in the [[https://debian-handbook.info/browse/stable/|Debian Administrator's Guide]] |
Line 63: | Line 63: |
[[UsingDistccWithMake-kpkg]] |
Translation(s): none
This is a guide on how to build the Linux Kernel with make-kpkg.
Install the Required Packages
To download and compile the Linux Kernel source we will need the following packages:
- build-essential - Essential packages required for compiling.
- linux-source - The Linux Kernel Source
- kernel-package - Provides make-kpkg which we will use to build a Debian Kernel package.
- libncurses5-dev - Development files for ncurses5. This alows for a curses based menu driven configuration.
To install these packages run the following command as root:
apt-get install build-essential linux-source kernel-package libncurses5-dev
Configuring Kernel-Package
As root, using the editor of your choice open /etc/kernel-pkg.conf, in this example we will be using emacs.
emacs -nw /etc/kernel-pkg.conf
Navigate to this section of the configuration file:
# The maintainer information. maintainer := Unknown Kernel Package Maintainer email := unknown@unconfigured.in.etc.kernel-pkg.conf
Update the maintainer and email fields, then save and quit.
Extracting the Kernel Source
As root, change directories to /usr/src:
cd /usr/src
Here you will find a file looking like linux-source-x.x.tar.bz2. 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 3.2 Kernel under Sid.
Extract the Kernel Source with the following command (NOTE: You will need to change 3.2 to match the .tar.bz2 file in /usr/src):
tar xjvf linux-source-3.2.tar.bz2
Configuring the Kernel
Change directories to the newly extracted linux source (again, match 3.2 to your version):
cd linux-source-3.2
Create a defconfig with the following command, please change ARCH=i386 to match your target architecture:
make ARCH=i386 defconfig
Building the Debian Package
Use make-kpkg to build the kernel:
make-kpkg
See also
The "Compiling a Kernel" section in the Debian Administrator's Guide