Regard this guide highly experimental
Why would you want to build an older lowlatency kernel?
If you have issues with the newer kernels, there may be cause to try an older kernel. These instructions assume you have the current lowlatency kernel installed and will be using its config as base.
Observe that kernel versions below 2.6.39 will not be able to support the use of irq threading, as is done with the rtirq script.
First install build tools
sudo apt-get install kernel-package
Get Natty source (Oneiric linux source is at security.ubuntu.com/ubuntu/pool/main/l/linux/linux-source-3.0.0_3.0.0-20.34_all.deb) and install it
wget http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-source-2.6.38_2.6.38-16.67_all.deb sudo dpkg -i linux-source-2.6.38_2.6.38-16.67_all.deb
Go to the source dir, where we find the recently installed linux-source package and extract the source
cd /usr/src tar xvf linux-source-2.6.38.tar.bz2 cd linux-source-2.6.38
We will use current lowlatency config (Replace with your version of lowlatency)
cp /boot/config-3.2.0-*-lowlatency .config
After hitting the next command you probably want to answer no to cgroups for 2.6.38 kernels (might cause problems for realtime audio) and debug related questions in the beginning. After that, just click *Enter* for everything else (will set everything to default)
Build the kernel (concurrency level 2 will use two processor cores). For each new build, you can just set a new revision number, to keep track of the builds (you might want to try different configs)
CONCURRENCY_LEVEL=2 make-kpkg --append-to-version "-customlowlatency" --revision "1" --initrd kernel-image kernel-headers
Hopefully the build went well, and the resulting two packages, the kernel image, and the kernel headers are now installable. Depending on arch, the packages will be named accordingly If you rebuild using the same source again, make sure to uninstall the previous built kernel before installing the new build
dpkg -i ../linux-image-22.214.171.124-customlowlatency* dpkg -i ../linux-headers-126.96.36.199-customlowlatency*
Reboot, and boot into this new kernel