Lindqvist — a blog about Linux and Science. Mostly.: Compiling kernel 3.4 on debian
Compiling kernel 3.4 on debian
The steps are the usual ones. At this point compiling your kernel is perhaps more of a hobby than a necessity to most people, unless you happen to have some fancy piece of hardware that’s about to become supported.
It’s not difficult, so there’s no reason not to give it a spin.
— Start Here —
sudo apt-get install kernel-package fakeroot build-essential
mkdir ~/tmp
cd ~/tmp
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.4.tar.bz2
tar xvf linux-3.4.tar.bz2
cd linux-3.4/
cat /boot/config-`uname -r`>.config
make oldconfig
If your current kernel is 3.3.5 the questions that await are given at the bottom of this post with links to descriptions of the different options. As usual, if in doubt, just hit enter.
make-kpkg clean
Building takes ages (depending on number of cores committed), so don’t launch it at 4 pm on a Friday if you need to shut down your computer before going home… As usual, use the -jX switch for parallel builds, where X is the number of cores+1 (i.e. 4 cores => -j5)
The following command goes on a single line
time fakeroot make-kpkg -j5 –initrd –revision=3.4.0 –append-to-version=-amd64 kernel_image kernel_headers
Once the build is done, move the .deb files out of the way and to your linux-3.4 directory for safe-keeping
mv ../*3.4.0*.deb .
sudo dpkg -i *.deb
Done.
The image weighs in at about 33 Mb and the headers at 7.6 Mb
And compile time? Well, not too bad:
real 34m51.027s
user 73m35.644s
sys 15m9.169s