building a Debian kernel
Posted 11-27-2011 at 06:14 PM by neonsignal
To build a Debian kernel, first install the build tools. The ncurses package is used by the configuration menu.
Also get the source package
The source is archived, and has to be extracted into /usr/src:
It is helpful for other tasks (such as modules) to have access to the linux headers, through a symbolic link in /usr/src:
Then the build is done from within the linux directory. If this is not a fresh start, the old generated files can be cleaned out:
The configuration can be copied from the existing configuration:
Or the configuration can be changed through the menu system:
If it is not a fresh build, the old files can be cleaned out:
And then the new kernel built. It is useful to append a tag to the version, so it is not confused with default configurations. The build doesn't have to be done from a root account, but fakeroot at least is required to generate the install files.
This will generate a dpkg image file, ready for installation:
apt-get install kernel-package ncurses-dev
apt-get install linux-source-2.6
tar xfj linux-source-2.6.32.tar.bz2
ln -s /usr/src/kernel-source-2.6.32 /usr/src/linux
make clean && make mrproper
fakeroot make-kpkg buildpackage linux-image --initrd --append-to-version "-test0"
dpkg -i linux-image-2.6.32.deb
Total Comments 0