Edit 05.27.08 Updated for latest kernel 2.6.25.4
Edit 02.29.08 Added some tips, small revision.
Edit 01.28.08 Updated for latest kernel 2.6.24
Edit 10.12.07 Updated for latest 2.6.23-rt1 patch.
Added bootsplash patch.
Added downloadable pre-patched kernel source.
A big THANKS to hotlinkfiles.com for free file uploads and direct links.
linux-2.6.25.4-rt3.bz2
linux-2.6.25.4-rt3.md5sum
Execpt for the last step, (dpkg -i) there is no need to do any of this as root.
I prefer to create a simple build directory for all kernels something like KERNEL No need to do it in /usr/src since $USER cannot write there.
Code: Select all
mkdir KERNEL
cd KERNEL
wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.4.tar.bz2
wget http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.25.4-rt3.bz2
wget http://fatcat.ftj.agh.edu.pl/~przyboro/other/bootsplash/bootsplash-3.1.6a-2.6.25.diff
unp linux-2.6.25.4.tar.bz2
mv linux-2.6.25.4 linux-2.6.25.4-rt3
cd linux-2.6.25.4-rt3
bzcat ../patch-2.6.25.4-rt3.bz2 |patch -p1
patch -p1<../bootsplash-3.1.6a-2.6.25.diff
Code: Select all
EXTRAVERSION = .4-rt3
Code: Select all
make menuconfig
Code: Select all
make oldconfig
Code: Select all
make menuconfig
Code: Select all
Processor type and features> Preemption Mode (Complete Preemption (Real-Time))
Code: Select all
Processor type and features>Timer frequency (1000 HZ)
Code: Select all
make-kpkg clean
time fakeroot make-kpkg --initrd -rev mz1 kernel_image kernel_headers
Code: Select all
$ dpkg -i ../linux-headers-*.deb ../linux-image-*.deb
Dual core CPU?
Use paralell make processes:
Code: Select all
export CONCURRENCY_LEVEL=2
Skip the patches.
You can just skip the realtime patch and/or the bootsplash patch(es) all together for a basic kernel build. No need to apply either patch.
Nvidia graphics driver:
You might want to disable Paravirtualization in make menuconfig. The Nvidia driver does not build against kernels with this enabled.
You can build the nvidia-kernel driver (or any other drivers like ndiswrapper or rfswitch) before you even boot into your new kernel if you prefer but it must be done as root. If you use sudo it might work w/ fakeroot. You must be in the same dir as your kernel source.
Code: Select all
root@finn:/home/glenn/KERNEL#
m-a -t -k linux-2.6.25.4-rt3/ -l linux-2.6.25.4-rt3 a-b nvidia
m-a -t -k linux-2.6.25.4-rt3/ -l linux-2.6.25.4-rt3 a-b ndiswrapper
m-a -t -k linux-2.6.25.4-rt3/ -l linux-2.6.25.4-rt3 a-b rfswitch
Code: Select all
m-a -t -k linux-2.6.25.4-rt3/ -l linux-2.6.25.4-rt3 a-b nvidia ndiswrapper rfswitch
After booting your new kernel, log in as root on a VT and build Nvidia the Debian way via module assistant:
Code: Select all
m-a a-i nvidia
Code: Select all
/etc/init.d/gdm restart
When you build modules against this kernel your source will automatically be found. No need to link anything to /some/dir/linux. An exceprt from nvidia-kernel-source.buildlog.2.6.23-rt1
Code: Select all
NVIDIA: calling KBUILD...
make CC=gcc-4.2 -C /lib/modules/2.6.23-rt1/source SUBDIRS=/usr/src/modules/nvidia-kernel/nv modules
make[3]: Entering directory `/home/glenn/Storage/KERNEL/linux-2.6.23-rt1'
Code: Select all
KERNEL# ls|grep .deb
linux-headers-2.6.25.4-rt3_mz1_amd64.deb
linux-image-2.6.25.4-rt3_mz1_amd64.deb
nvidia-kernel-2.6.25.4-rt3_169.12-3+mz1_amd64.deb
rfswitch-modules-2.6.25.4-rt3_1.3-1+mz1_amd64.deb
Code: Select all
patch -p1 -R <../bootsplash-3.1.6a-2.6.25.diff
Make an optional tarball of your patched linux source:
Code: Select all
tar cjvf linux-2.6.25.4-rt3.bz2 linux-2.6.25.4-rt3
You can make a .deb of your kernel source for easy portability
Code: Select all
fakeroot make-kpkg -rev mz1 kernel_source
Code: Select all
fakeroot make-kpkg --initrd -rev mz1 kernel_image kernel_headers kernel_source
Code: Select all
$ uname -r
Linux hestviken 2.6.25.4-rt3