Monthly Archives: August 2009

Howto make a linux RT Kernel (2.6.31-rc7)

Get the kernel sources and corresponding rt patch (the versions might be different, this was done at the end of August 2008, when the latest rt patch available was for the kernel 2.6.31-rc7, the important thing to consider is to use a patch matching with the kernel source):

sudo apt-get install build-essential
sudo -s
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.31-rc7.tar.bz2
wget http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.31-rc7-rt8.bz2
chmod 755 *
tar xjfv linux-2.6.31-rc7.tar.bz2
rm linux
ln -s linux-2.6.31-rc7 linux
cd linux
bzip2 -dc /usr/src/patch-2.6.31-rc7-rt8.bz2 | patch -p1 --dry-run
bzip2 -dc /usr/src/patch-2.6.31-rc7-rt8.bz2 | patch -p1
cp /boot/config-`uname -r` .config
make menuconfig

Change the following parameters:

Processor type and features --->
Preemption Mode (Complete Preemption (Real-Time)) --->
( ) No Forced Preemption (Server)
( ) Voluntary Kernel Preemption (Desktop)
( ) Preemptible Kernel (Low-Latency Desktop)
(X) Complete Preemption (Real-Time)
Processor type and features  --->
Timer frequency (1000 HZ) --->
(X) 1000 HZ
Drivers
 ( ) Staging drivers 

Now build the kernel and install it:

make-kpkg clean
make-kpkg modules_clean
make-kpkg --revision 1 --initrd kernel_image kernel_headers modules_image
cd ..
chmod 755 *
dpkg -i *31-rc7*.deb

To avoid the following error during / after kernel installation:

/etc/kernel/postinst.d/nvidia-common exited with return code 20

I had to execute this command:

sudo apt-get remove –purge nvidia-common

This worked for me because I have no NVidia components on my system (graphic card or chipset).

Continue reading

Posted in Linux | Tagged , | Leave a comment