http://ubuntuforums.org/showthread.php?t=1470264
1. Download the source. Find it here:
mainline kernel source: http://www.kernel.org/pub/linux/kernel/v2.6/
rt patch: http://www.kernel.org/pub/linux/kernel/projects/rt/
Make sure the version numbers of the kernel source and the rt patch are the same!!
(I create a /home/<username>/Downloads/kernel directory and put everything in there.)
Extract the kernel source and the rt patch. Rename the extracted kernel source directory from linux-2.6.33.4 to linux-2.6.33.4-rt20.
Open a terminal and go to that directory - we'll run our commands from there.
cd /home/<username>/Downloads/kernel/linux-2.6.33.4-rt20
cat /home/<username>/Downloads/kernel/patch-2.6.33.4-rt20 |patch -p1
make oldconfig
Note: If you install 2.6.33-rt from one of the ppa's above and build your new kernel from there, 'make oldconfig' should complete with no questions asked.
make menuconfig
Essential changes: (kernel build will fail unless these changes are made)
Under device drivers/staging drivers, de-select Data acquisition support (comedi).
Under device drivers/staging drivers, de-select POHMELFS filesystem support.
Suggested tweaks:
Under Processor Type and Features, set Timer frequency to 1000 Hz. This will improve real time performance.
Under Processor Type and Features, make sure you have Preemption Mode set to Complete Preemption (Real Time).
Under kernel hacking, de-select 'compile kernel with debug info'. Not doing so results in an unnecessarily large kernel.
Under kernel hacking, de-select tracers. This eliminates a warning message on bootup and may help to keep latencies down.
make-kpkg clean
3. Build the kernel: (And be prepared to wait a while)
time fakeroot make-kpkg --initrd kernel-image kernel-headers
sudo cp /usr/share/doc/kernel-package/examples/etc/kernel/postinst.d/initramfs /etc/kernel/postinst.d/
sudo mv /etc/kernel/postinst.d/nvidia-common /etc/kernel/postinst.d/nvidia-common.bak
5. Install the packages! (kernel-image first, then kernel-headers.)
They will be in the same directory as your kernel source directory. I usually double-click them in Nautilus and let gdebi do the installation.
With any luck, you should be able to reboot into a working system on the new kernel.
Last edited by trulan; July 29th, 2010 at 07:40 AM..