OK, let’s just get right to it. We both know why you’re here and you’re probably raring to get JACK and some client apps running in RT mode with low latencies as quickly as possible.
Make sure you have the requisite packages:
|
1 2 |
$ apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 --> build-essential zlib1g-dev |
By the way, there’s no need to build your kernel in /usr/src or to do anything as root until the actual installation. I like to create a ~/KERNEL dir to work in:
|
1 2 |
$ mkdir ~/KERNEL $ cd ~/KERNEL |
The next thing you’ll want to do is grab the source for desired matching versions of the kernel and the RT patch. For this post, I’ll use: 2.6.26.8.
|
1 2 |
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.8.tar.bz2 $ wget http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.26.8-rt16.bz2 |
Unpack, do some finagling, jerry-rigging, and ceremonial black magick:
|
1 2 3 4 5 |
$ tar xvjf linux-2.6.26.8.tar.bz2 $ mv linux-2.6.26.8 linux-2.6.26.8-rt16 $ ln -s linux-2.6.31.6-rt16 linux $ bzcat ../patch-2.6.26.8-rt16.bz2 | patch -p1 $ cd linux |
At this point, you have a few options for handling your kernel config. You could start with your current kernel’s config:
|
1 |
$ make oldconfig |
If you want to start fresh (well, sort of …) skip that step and go right to:
|
1 |
$ make menuconfig |
A few important settings should be pre-configured for you at this point, but to be sure, double-check the following:
Processor type and features ---> Preemption Mode (Complete Preemption (Real-Time))
Processor type and features ---> Timer frequency (1000 HZ)
Kernel hacking ---> [ ] Kernel debugging
IMPORTANT: note that Kernel debugging is DISABLED.
Now, just build your kernel in that oh-so-special Debian way … but first, a time saver: If you have a dual core processor, use all of it!
|
1 |
$ export CONCURRENCY_LEVEL=2 |
Of course, if you have a quad core proc, I imagine you can do the math. (If you have a tri core proc, I have some real-estate you might be interested in.) Carry on:
|
1 2 |
$ make-kpkg clean $ time fakeroot make-kpkg --initrd kernel_image kernel_headers |
NOTE: you could specify a -rev switch on the make command. For example: time fakeroot make-kpkg --initrd -rev my_custom_kernel_v1 kernel_image kernel_headers
Now is a good time to go pour yourself a pint … or three … this could take a while.
If all goes well, you can now install your kernel packages (found in your ~/KERNEL dir.) If you get an error, it’s usually because of a missing package, but is occasionally a known issue that could require you making modifications to your .config, or even so far as tweaking some source. No matter, the Google machine is your best bet.
Let’s assume all went well:
|
1 2 3 |
$ cd .. $ su $ dpkg -i linux-headers-*.deb linux-image-*.deb |
NOTE: of course, if you have multiple versions of the .deb files in your ~/KERNEL dir, be more specific.
Reboot. And you should see your new kernel in the GRUB menu. Now go pour another pint.

Thanks. Its: zlib1g-dev
regards
Thanks, burdy. Fixed the typo.
[...] OK, let’s just get right to it. We both know why you’re here and you’re probably raring to get JACK and some client apps running in RT mode with low latencies as quickly as possible. More here [...]
Many many thanks for this, I’ll try with the 2.6.31…