Translation(s): English - Italiano

This page describes building a new kernel based on upstream sources.

Who needs this page?

If you just want to apply some configuration changes or patches to a kernel that is already in Debian, following other guides such as HowToRebuildAnOfficialDebianKernelPackage should be much easier.

You only need this page if, for example, you need functionality not provided by the newest kernel already packaged for Debian.

See also

See also DebianKernelCustomCompilation and HowToRebuildAnOfficialDebianKernelPackage, which, despite its name, seems to address similar problems.

What to do

The authoritative source on information on building Debian kernels is the Kernel Handbook. The relevant section is http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-kernel-org-package .

Verifying the signature

Verifying the signature fails for me - not sure how I should get hold of the public key. Installing various -keyring packages did not help:

 arnouten@jaga:~/dev/kernel$ gpg --verify linux-2.6.34.tar.bz2.sign 
 gpg: Signature made Sun 16 May 2010 11:43:56 PM CEST using DSA key ID 517D0F0E
 gpg: Can't check signature: public key not found

hint: you need to import key (517D0F0E) before:

 $ gpg --recv-keys 517D0F0E
 gpg: requesting key 517D0F0E from hkp server keys.gnupg.net
 gpg: key 517D0F0E: public key "Linux Kernel Archives Verification Key <ftpadmin@kernel.org>" imported
 gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
 gpg: depth: 0  valid:   2  signed:   1  trust: 0-, 0q, 0n, 0m, 0f, 2u
 gpg: depth: 1  valid:   1  signed:   1  trust: 0-, 0q, 0n, 0m, 1f, 0u
 gpg: depth: 2  valid:   1  signed:   0  trust: 1-, 0q, 0n, 0m, 0f, 0u
 gpg: Total number processed: 1
 gpg:               imported: 1

Configuration

To get a good starting point for the configuration, it is convenient to take a configuration from a previous kernel version (cp /boot/config-... ./.config), and then run make oldconfig. This will create a configuration for the newer kernel, taking defaults from the configuration for the old kernel you provided. It will prompt you for any new options - usually I just follow the default.

Building the kernel

You may now follow the procedure as described in the handbook in http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-building